From 190af70129365e2c8df75a1f8ff519368d7a0731 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 17:04:15 +0100 Subject: [PATCH] chore: keep embedded web bundle exact --- .gitattributes | 1 + apps/api/internal/webassets/dist/assets/index-DB4gtESA.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4b410ba --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +apps/api/internal/webassets/dist/assets/*.js -whitespace diff --git a/apps/api/internal/webassets/dist/assets/index-DB4gtESA.js b/apps/api/internal/webassets/dist/assets/index-DB4gtESA.js index 7e6a24f..c03a740 100644 --- a/apps/api/internal/webassets/dist/assets/index-DB4gtESA.js +++ b/apps/api/internal/webassets/dist/assets/index-DB4gtESA.js @@ -1,4 +1,4 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const Wl=!1;var Ja=Array.isArray,ql=Array.prototype.indexOf,jn=Array.prototype.includes,da=Array.from,jl=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,hs=Object.getOwnPropertyDescriptors,Vl=Object.prototype,Zl=Array.prototype,$a=Object.getPrototypeOf,Di=Object.isExtensible;const Ra=()=>{};function Yl(t){return t()}function Ia(t){for(var e=0;e{t=r,e=a});return{promise:n,resolve:t,reject:e}}const Ye=2,Vn=4,Or=8,ei=1<<24,Ft=16,Dt=32,on=64,Ca=128,_t=512,Ne=1024,je=2048,Ot=4096,et=8192,ht=16384,Dn=32768,Da=1<<25,cn=65536,Oa=1<<17,gs=1<<18,On=1<<19,vs=1<<20,Ut=1<<25,En=65536,sa=1<<21,Er=1<<22,ln=1<<23,Vt=Symbol("$state"),Xl=Symbol("legacy props"),Kl=Symbol(""),jt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ti=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function ms(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ql(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function $l(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function to(t){throw new Error("https://svelte.dev/e/effect_orphan")}function no(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ro(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ao(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function io(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function so(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const oo=1,co=2,_s=4,uo=8,fo=16,ho=1,po=2,go=4,vo=8,mo=16,_o=1,bo=2,Fe=Symbol(),bs="http://www.w3.org/1999/xhtml",ks="http://www.w3.org/2000/svg",ko="http://www.w3.org/1998/Math/MathML",yo="@attach";function wo(){console.warn("https://svelte.dev/e/derived_inert")}function To(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function So(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ys(t){return t===this.v}function ws(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ts(t){return!ws(t,this.v)}let Xn=!1,xo=!1;function Eo(){Xn=!0}let we=null;function Zn(t){we=t}function xe(t,e=!1,n){we={p:we,i:!1,c:null,e:null,s:t,x:null,r:le,l:Xn&&!e?{s:null,u:null,$:[]}:null}}function Ee(t){var e=we,n=e.e;if(n!==null){e.e=null;for(var r of n)Ws(r)}return t!==void 0&&(e.x=t),e.i=!0,we=e.p,t??{}}function Lr(){return!Xn||we!==null&&we.l===null}let kn=[];function Ss(){var t=kn;kn=[],Ia(t)}function Zt(t){if(kn.length===0&&!Tr){var e=kn;queueMicrotask(()=>{e===kn&&Ss()})}kn.push(t)}function Ao(){for(;kn.length>0;)Ss()}function xs(t){var e=le;if(e===null)return pe.f|=ln,t;if((e.f&Dn)===0&&(e.f&Vn)===0)throw t;rn(t,e)}function rn(t,e){for(;e!==null;){if((e.f&Ca)!==0){if((e.f&Dn)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}const Ro=-7169;function De(t,e){t.f=t.f&Ro|e}function ni(t){(t.f&_t)!==0||t.deps===null?De(t,Ne):De(t,Ot)}function Es(t){if(t!==null)for(const e of t)(e.f&Ye)===0||(e.f&En)===0||(e.f^=En,Es(e.deps))}function As(t,e,n){(t.f&je)!==0?e.add(t):(t.f&Ot)!==0&&n.add(t),Es(t.deps),De(t,Ne)}let Jr=!1;function Io(t){var e=Jr;try{return Jr=!1,[t(),Jr]}finally{Jr=e}}const _n=new Set;let he=null,Rt=null,La=null,Tr=!1,ba=!1,Wn=null,ra=null;var Oi=0;let Co=1;class un{id=Co++;current=new Map;previous=new Map;#n=new Set;#o=new Set;#e=new Set;#a=new Map;#r=new Map;#i=null;#t=[];#s=[];#c=new Set;#u=new Set;#l=new Map;#d=new Set;is_fork=!1;#p=!1;#h=new Set;#f(){return this.is_fork||this.#r.size>0}#m(){for(const r of this.#h)for(const a of r.#r.keys()){for(var e=!1,n=a;n.parent!==null;){if(this.#l.has(n)){e=!0;break}n=n.parent}if(!e)return!0}return!1}skip_effect(e){this.#l.has(e)||this.#l.set(e,{d:[],m:[]}),this.#d.delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=this.#l.get(e);if(r){this.#l.delete(e);for(var a of r.d)De(a,je),n(a);for(a of r.m)De(a,Ot),n(a)}this.#d.add(e)}#g(){if(Oi++>1e3&&(_n.delete(this),Oo()),!this.#f()){for(const c of this.#c)this.#u.delete(c),De(c,je),this.schedule(c);for(const c of this.#u)De(c,Ot),this.schedule(c)}const e=this.#t;this.#t=[],this.apply();var n=Wn=[],r=[],a=ra=[];for(const c of e)try{this.#_(c,n,r)}catch(o){throw Cs(c),o}if(he=null,a.length>0){var i=un.ensure();for(const c of a)i.schedule(c)}if(Wn=null,ra=null,this.#f()||this.#m()){this.#v(r),this.#v(n);for(const[c,o]of this.#l)Is(c,o)}else{this.#a.size===0&&_n.delete(this),this.#c.clear(),this.#u.clear();for(const c of this.#n)c(this);this.#n.clear(),Li(r),Li(n),this.#i?.resolve()}var s=he;if(this.#t.length>0){const c=s??=this;c.#t.push(...this.#t.filter(o=>!c.#t.includes(o)))}s!==null&&(_n.add(s),s.#g())}#_(e,n,r){e.f^=Ne;for(var a=e.first;a!==null;){var i=a.f,s=(i&(Dt|on))!==0,c=s&&(i&Ne)!==0,o=c||(i&et)!==0||this.#l.has(a);if(!o&&a.fn!==null){s?a.f^=Ne:(i&Vn)!==0?n.push(a):Qn(a)&&((i&Ft)!==0&&this.#u.add(a),Rn(a));var u=a.first;if(u!==null){a=u;continue}}for(;a!==null;){var f=a.next;if(f!==null){a=f;break}a=a.parent}}}#v(e){for(var n=0;n!this.current.has(d));if(a.length===0)e&&f.discard();else if(n.length>0){if(e)for(const d of this.#d)f.unskip_effect(d,p=>{(p.f&(Ft|Er))!==0?f.schedule(p):f.#v([p])});f.activate();var i=new Set,s=new Map;for(var c of n)Rs(c,a,i,s);s=new Map;var o=[...f.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d:!0);for(const d of this.#s)(d.f&(ht|et|Oa))===0&&ri(d,o,s)&&((d.f&(Er|Ft))!==0?(De(d,je),f.schedule(d)):f.#c.add(d));if(f.#t.length>0){f.apply();for(var u of f.#t)f.#_(u,[],[]);f.#t=[]}f.deactivate()}}for(const f of _n)f.#h.has(this)&&(f.#h.delete(this),f.#h.size===0&&!f.#f()&&(f.activate(),f.#g()))}increment(e,n){let r=this.#a.get(n)??0;if(this.#a.set(n,r+1),e){let a=this.#r.get(n)??0;this.#r.set(n,a+1)}}decrement(e,n,r){let a=this.#a.get(n)??0;if(a===1?this.#a.delete(n):this.#a.set(n,a-1),e){let i=this.#r.get(n)??0;i===1?this.#r.delete(n):this.#r.set(n,i-1)}this.#p||r||(this.#p=!0,Zt(()=>{this.#p=!1,this.flush()}))}transfer_effects(e,n){for(const r of e)this.#c.add(r);for(const r of n)this.#u.add(r);e.clear(),n.clear()}oncommit(e){this.#n.add(e)}ondiscard(e){this.#o.add(e)}on_fork_commit(e){this.#e.add(e)}run_fork_commit_callbacks(){for(const e of this.#e)e(this);this.#e.clear()}settled(){return(this.#i??=ps()).promise}static ensure(){if(he===null){const e=he=new un;ba||(_n.add(he),Tr||Zt(()=>{he===e&&e.flush()}))}return he}apply(){{Rt=null;return}}schedule(e){if(La=e,e.b?.is_pending&&(e.f&(Vn|Or|ei))!==0&&(e.f&Dn)===0){e.b.defer_effect(e);return}for(var n=e;n.parent!==null;){n=n.parent;var r=n.f;if(Wn!==null&&n===le&&(pe===null||(pe.f&Ye)===0))return;if((r&(on|Dt))!==0){if((r&Ne)===0)return;n.f^=Ne}}this.#t.push(n)}}function Do(t){var e=Tr;Tr=!0;try{for(var n;;){if(Ao(),he===null)return n;he.flush()}}finally{Tr=e}}function Oo(){try{no()}catch(t){rn(t,La)}}let qt=null;function Li(t){var e=t.length;if(e!==0){for(var n=0;n0)){Tn.clear();for(const a of qt){if((a.f&(ht|et))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)qt.has(s)&&(qt.delete(s),i.push(s)),s=s.parent;for(let c=i.length-1;c>=0;c--){const o=i[c];(o.f&(ht|et))===0&&Rn(o)}}qt.clear()}}qt=null}}function Rs(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const a of t.reactions){const i=a.f;(i&Ye)!==0?Rs(a,e,n,r):(i&(Er|Ft))!==0&&(i&je)===0&&ri(a,e,r)&&(De(a,je),ai(a))}}function ri(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const a of t.deps){if(jn.call(e,a))return!0;if((a.f&Ye)!==0&&ri(a,e,n))return n.set(a,!0),!0}return n.set(t,!1),!1}function ai(t){he.schedule(t)}function Is(t,e){if(!((t.f&Dt)!==0&&(t.f&Ne)!==0)){(t.f&je)!==0?e.d.push(t):(t.f&Ot)!==0&&e.m.push(t),De(t,Ne);for(var n=t.first;n!==null;)Is(n,e),n=n.next}}function Cs(t){De(t,Ne);for(var e=t.first;e!==null;)Cs(e),e=e.next}function Lo(t){let e=0,n=An(0),r;return()=>{oi()&&(l(n),zr(()=>(e===0&&(r=qe(()=>t(()=>Sr(n)))),e+=1,()=>{Zt(()=>{e-=1,e===0&&(r?.(),r=void 0,Sr(n))})})))}}var Mo=cn|On;function Po(t,e,n,r){new No(t,e,n,r)}class No{parent;is_pending=!1;transform_error;#n;#o=null;#e;#a;#r;#i=null;#t=null;#s=null;#c=null;#u=0;#l=0;#d=!1;#p=new Set;#h=new Set;#f=null;#m=Lo(()=>(this.#f=An(this.#u),()=>{this.#f=null}));constructor(e,n,r,a){this.#n=e,this.#e=n,this.#a=i=>{var s=le;s.b=this,s.f|=Ca,r(i)},this.parent=le.b,this.transform_error=a??this.parent?.transform_error??(i=>i),this.#r=Kn(()=>{this.#b()},Mo)}#g(){try{this.#i=st(()=>this.#a(this.#n))}catch(e){this.error(e)}}#_(e){const n=this.#e.failed;n&&(this.#s=st(()=>{n(this.#n,()=>e,()=>()=>{})}))}#v(){const e=this.#e.pending;e&&(this.is_pending=!0,this.#t=st(()=>e(this.#n)),Zt(()=>{var n=this.#c=document.createDocumentFragment(),r=Ct();n.append(r),this.#i=this.#y(()=>st(()=>this.#a(r))),this.#l===0&&(this.#n.before(n),this.#c=null,Sn(this.#t,()=>{this.#t=null}),this.#k(he))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#u=0,this.#i=st(()=>{this.#a(this.#n)}),this.#l>0){var e=this.#c=document.createDocumentFragment();fi(this.#i,e);const n=this.#e.pending;this.#t=st(()=>n(this.#n))}else this.#k(he)}catch(n){this.error(n)}}#k(e){this.is_pending=!1,e.transfer_effects(this.#p,this.#h)}defer_effect(e){As(e,this.#p,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#y(e){var n=le,r=pe,a=we;yt(this.#r),kt(this.#r),Zn(this.#r.ctx);try{return un.ensure(),e()}catch(i){return xs(i),null}finally{yt(n),kt(r),Zn(a)}}#w(e,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(e,n);return}this.#l+=e,this.#l===0&&(this.#k(n),this.#t&&Sn(this.#t,()=>{this.#t=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(e,n){this.#w(e,n),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,Zt(()=>{this.#d=!1,this.#f&&Yn(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),l(this.#f)}error(e){if(!this.#e.onerror&&!this.#e.failed)throw e;he?.is_fork?(this.#i&&he.skip_effect(this.#i),this.#t&&he.skip_effect(this.#t),this.#s&&he.skip_effect(this.#s),he.on_fork_commit(()=>{this.#T(e)})):this.#T(e)}#T(e){this.#i&&(Ve(this.#i),this.#i=null),this.#t&&(Ve(this.#t),this.#t=null),this.#s&&(Ve(this.#s),this.#s=null);var n=this.#e.onerror;let r=this.#e.failed;var a=!1,i=!1;const s=()=>{if(a){So();return}a=!0,i&&lo(),this.#s!==null&&Sn(this.#s,()=>{this.#s=null}),this.#y(()=>{this.#b()})},c=o=>{try{i=!0,n?.(o,s),i=!1}catch(u){rn(u,this.#r&&this.#r.parent)}r&&(this.#s=this.#y(()=>{try{return st(()=>{var u=le;u.b=this,u.f|=Ca,r(this.#n,()=>o,()=>s)})}catch(u){return rn(u,this.#r.parent),null}}))};Zt(()=>{var o;try{o=this.transform_error(e)}catch(u){rn(u,this.#r&&this.#r.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(c,u=>rn(u,this.#r&&this.#r.parent)):c(o)})}}function Ds(t,e,n,r){const a=Lr()?Mr:dt;var i=t.filter(p=>!p.settled);if(n.length===0&&i.length===0){r(e.map(a));return}var s=le,c=zo(),o=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(p=>p.promise)):null;function u(p){c();try{r(p)}catch(_){(s.f&ht)===0&&rn(_,s)}la()}if(n.length===0){o.then(()=>u(e.map(a)));return}var f=Os();function d(){Promise.all(n.map(p=>Uo(p))).then(p=>u([...e.map(a),...p])).catch(p=>rn(p,s)).finally(()=>f())}o?o.then(()=>{c(),d(),la()}):d()}function zo(){var t=le,e=pe,n=we,r=he;return function(i=!0){yt(t),kt(e),Zn(n),i&&(t.f&ht)===0&&(r?.activate(),r?.apply())}}function la(t=!0){yt(null),kt(null),Zn(null),t&&he?.deactivate()}function Os(){var t=le,e=t.b,n=he,r=e.is_rendered();return e.update_pending_count(1,n),n.increment(r,t),(a=!1)=>{e.update_pending_count(-1,n),n.decrement(r,t,a)}}function Mr(t){var e=Ye|je;return le!==null&&(le.f|=On),{ctx:we,deps:null,effects:null,equals:ys,f:e,fn:t,reactions:null,rv:0,v:Fe,wv:0,parent:le,ac:null}}function Uo(t,e,n){let r=le;r===null&&Ql();var a=void 0,i=An(Fe),s=!pe,c=new Map;return Xo(()=>{var o=le,u=ps();a=u.promise;try{Promise.resolve(t()).then(u.resolve,u.reject).finally(la)}catch(_){u.reject(_),la()}var f=he;if(s){if((o.f&Dn)!==0)var d=Os();if(r.b.is_rendered())c.get(f)?.reject(jt),c.delete(f);else{for(const _ of c.values())_.reject(jt);c.clear()}c.set(f,u)}const p=(_,g=void 0)=>{if(d){var w=g===jt;d(w)}if(!(g===jt||(o.f&ht)!==0)){if(f.activate(),g)i.f|=ln,Yn(i,g);else{(i.f&ln)!==0&&(i.f^=ln),Yn(i,_);for(const[b,k]of c){if(c.delete(b),b===f)break;k.reject(jt)}}f.deactivate()}};u.promise.then(p,_=>p(null,_||"unknown"))}),ha(()=>{for(const o of c.values())o.reject(jt)}),new Promise(o=>{function u(f){function d(){f===a?o(i):u(a)}f.then(d,d)}u(a)})}function Se(t){const e=Mr(t);return Ks(e),e}function dt(t){const e=Mr(t);return e.equals=Ts,e}function Fo(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n0&&!Ps&&Ho()}return e}function Ho(){Ps=!1;for(const t of Ma)(t.f&Ne)!==0&&De(t,Ot),Qn(t)&&Rn(t);Ma.clear()}function Sr(t){m(t,t.v+1)}function Ns(t,e,n){var r=t.reactions;if(r!==null)for(var a=Lr(),i=r.length,s=0;s{if(xn===i)return c();var o=pe,u=xn;kt(null),Ni(i);var f=c();return kt(o),Ni(u),f};return r&&n.set("length",Be(t.length)),new Proxy(t,{defineProperty(c,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ao();var f=n.get(o);return f===void 0?s(()=>{var d=Be(u.value);return n.set(o,d),d}):m(f,u.value,!0),!0},deleteProperty(c,o){var u=n.get(o);if(u===void 0){if(o in c){const f=s(()=>Be(Fe));n.set(o,f),Sr(a)}}else m(u,Fe),Sr(a);return!0},get(c,o,u){if(o===Vt)return t;var f=n.get(o),d=o in c;if(f===void 0&&(!d||qn(c,o)?.writable)&&(f=s(()=>{var _=an(d?c[o]:Fe),g=Be(_);return g}),n.set(o,f)),f!==void 0){var p=l(f);return p===Fe?void 0:p}return Reflect.get(c,o,u)},getOwnPropertyDescriptor(c,o){var u=Reflect.getOwnPropertyDescriptor(c,o);if(u&&"value"in u){var f=n.get(o);f&&(u.value=l(f))}else if(u===void 0){var d=n.get(o),p=d?.v;if(d!==void 0&&p!==Fe)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(c,o){if(o===Vt)return!0;var u=n.get(o),f=u!==void 0&&u.v!==Fe||Reflect.has(c,o);if(u!==void 0||le!==null&&(!f||qn(c,o)?.writable)){u===void 0&&(u=s(()=>{var p=f?an(c[o]):Fe,_=Be(p);return _}),n.set(o,u));var d=l(u);if(d===Fe)return!1}return f},set(c,o,u,f){var d=n.get(o),p=o in c;if(r&&o==="length")for(var _=u;_Be(Fe)),n.set(_+"",g))}if(d===void 0)(!p||qn(c,o)?.writable)&&(d=s(()=>Be(void 0)),m(d,an(u)),n.set(o,d));else{p=d.v!==Fe;var w=s(()=>an(u));m(d,w)}var b=Reflect.getOwnPropertyDescriptor(c,o);if(b?.set&&b.set.call(f,u),!p){if(r&&typeof o=="string"){var k=n.get("length"),S=Number(o);Number.isInteger(S)&&S>=k.v&&m(k,S+1)}Sr(a)}return!0},ownKeys(c){l(a);var o=Reflect.ownKeys(c).filter(d=>{var p=n.get(d);return p===void 0||p.v!==Fe});for(var[u,f]of n)f.v!==Fe&&!(u in c)&&o.push(u);return o},setPrototypeOf(){io()}})}function Mi(t){try{if(t!==null&&typeof t=="object"&&Vt in t)return t[Vt]}catch{}return t}function Go(t,e){return Object.is(Mi(t),Mi(e))}var Pa,zs,Us,Fs,Bs;function Wo(){if(Pa===void 0){Pa=window,zs=document,Us=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Fs=qn(e,"firstChild").get,Bs=qn(e,"nextSibling").get,Di(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Di(n)&&(n.__t=void 0)}}function Ct(t=""){return document.createTextNode(t)}function sn(t){return Fs.call(t)}function Pr(t){return Bs.call(t)}function v(t,e){return sn(t)}function lt(t,e=!1){{var n=sn(t);return n instanceof Comment&&n.data===""?Pr(n):n}}function y(t,e=1,n=!1){let r=t;for(;e--;)r=Pr(r);return r}function qo(t){t.textContent=""}function Hs(){return!1}function si(t,e,n){return document.createElementNS(e??bs,t,void 0)}function jo(t,e){if(e){const n=document.body;t.autofocus=!0,Zt(()=>{document.activeElement===n&&t.focus()})}}function li(t){var e=pe,n=le;kt(null),yt(null);try{return t()}finally{kt(e),yt(n)}}function Gs(t){le===null&&(pe===null&&to(),eo()),Xt&&$l()}function Vo(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Lt(t,e){var n=le;n!==null&&(n.f&et)!==0&&(t|=et);var r={ctx:we,deps:null,nodes:null,f:t|je|_t,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};he?.register_created_effect(r);var a=r;if((t&Vn)!==0)Wn!==null?Wn.push(r):un.ensure().schedule(r);else if(e!==null){try{Rn(r)}catch(s){throw Ve(r),s}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&On)===0&&(a=a.first,(t&Ft)!==0&&(t&cn)!==0&&a!==null&&(a.f|=cn))}if(a!==null&&(a.parent=n,n!==null&&Vo(a,n),pe!==null&&(pe.f&Ye)!==0&&(t&on)===0)){var i=pe;(i.effects??=[]).push(a)}return r}function oi(){return pe!==null&&!It}function ha(t){const e=Lt(Or,null);return De(e,Ne),e.teardown=t,e}function fn(t){Gs();var e=le.f,n=!pe&&(e&Dt)!==0&&(e&Dn)===0;if(n){var r=we;(r.e??=[]).push(t)}else return Ws(t)}function Ws(t){return Lt(Vn|vs,t)}function Na(t){return Gs(),Lt(Or|vs,t)}function Zo(t){un.ensure();const e=Lt(on|On,t);return(n={})=>new Promise(r=>{n.outro?Sn(e,()=>{Ve(e),r(void 0)}):(Ve(e),r(void 0))})}function Nr(t){return Lt(Vn,t)}function Nt(t,e){var n=we,r={effect:null,ran:!1,deps:t};n.l.$.push(r),r.effect=zr(()=>{if(t(),!r.ran){r.ran=!0;var a=le;try{yt(a.parent),qe(e)}finally{yt(a)}}})}function Yo(){var t=we;zr(()=>{for(var e of t.l.$){e.deps();var n=e.effect;(n.f&Ne)!==0&&n.deps!==null&&De(n,Ot),Qn(n)&&Rn(n),e.ran=!1}})}function Xo(t){return Lt(Er|On,t)}function zr(t,e=0){return Lt(Or|e,t)}function Y(t,e=[],n=[],r=[]){Ds(r,e,n,a=>{Lt(Or,()=>t(...a.map(l)))})}function Kn(t,e=0){var n=Lt(Ft|e,t);return n}function qs(t,e=0){var n=Lt(ei|e,t);return n}function st(t){return Lt(Dt|On,t)}function js(t){var e=t.teardown;if(e!==null){const n=Xt,r=pe;Pi(!0),kt(null);try{e.call(null)}finally{Pi(n),kt(r)}}}function ci(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const a=n.ac;a!==null&&li(()=>{a.abort(jt)});var r=n.next;(n.f&on)!==0?n.parent=null:Ve(n,e),n=r}}function Ko(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Dt)===0&&Ve(e),e=n}}function Ve(t,e=!0){var n=!1;(e||(t.f&gs)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Vs(t.nodes.start,t.nodes.end),n=!0),De(t,Da),ci(t,e&&!n),Ar(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const i of r)i.stop();js(t),t.f^=Da,t.f|=ht;var a=t.parent;a!==null&&a.first!==null&&Zs(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Vs(t,e){for(;t!==null;){var n=t===e?null:Pr(t);t.remove(),t=n}}function Zs(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Sn(t,e,n=!0){var r=[];Ys(t,r,!0);var a=()=>{n&&Ve(t),e&&e()},i=r.length;if(i>0){var s=()=>--i||a();for(var c of r)c.out(s)}else a()}function Ys(t,e,n){if((t.f&et)===0){t.f^=et;var r=t.nodes&&t.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&e.push(c);for(var a=t.first;a!==null;){var i=a.next;if((a.f&on)===0){var s=(a.f&cn)!==0||(a.f&Dt)!==0&&(t.f&Ft)!==0;Ys(a,e,s?n:!1)}a=i}}}function ui(t){Xs(t,!0)}function Xs(t,e){if((t.f&et)!==0){t.f^=et,(t.f&Ne)===0&&(De(t,je),un.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,a=(n.f&cn)!==0||(n.f&Dt)!==0;Xs(n,a?e:!1),n=r}var i=t.nodes&&t.nodes.t;if(i!==null)for(const s of i)(s.is_global||e)&&s.in()}}function fi(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var a=n===r?null:Pr(n);e.append(n),n=a}}let aa=!1,Xt=!1;function Pi(t){Xt=t}let pe=null,It=!1;function kt(t){pe=t}let le=null;function yt(t){le=t}let bt=null;function Ks(t){pe!==null&&(bt===null?bt=[t]:bt.push(t))}let it=null,ft=0,mt=null;function Qo(t){mt=t}let Qs=1,yn=0,xn=yn;function Ni(t){xn=t}function Js(){return++Qs}function Qn(t){var e=t.f;if((e&je)!==0)return!0;if(e&Ye&&(t.f&=~En),(e&Ot)!==0){for(var n=t.deps,r=n.length,a=0;at.wv)return!0}(e&_t)!==0&&Rt===null&&De(t,Ne)}return!1}function $s(t,e,n=!0){var r=t.reactions;if(r!==null&&!(bt!==null&&jn.call(bt,t)))for(var a=0;a{t.ac.abort(jt)}),t.ac=null);try{t.f|=sa;var f=t.fn,d=f();t.f|=Dn;var p=t.deps,_=he?.is_fork;if(it!==null){var g;if(_||Ar(t,ft),p!==null&&ft>0)for(p.length=ft+it.length,g=0;gn?.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Zt(()=>{e.addEventListener(t,a,r)}):e.addEventListener(t,a,r),a}function Bt(t,e,n,r,a){var i={capture:r,passive:a},s=al(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ha(()=>{e.removeEventListener(t,s,i)})}function $(t,e,n){(e[br]??={})[t]=n}function Pe(t){for(var e=0;e{throw b});throw p}}finally{t[br]=e,delete t.currentTarget,kt(f),yt(d)}}}const sc=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function lc(t){return sc?.createHTML(t)??t}function oc(t){var e=si("template");return e.innerHTML=lc(t.replaceAll("","")),e.content}function In(t,e){var n=le;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function W(t,e){var n=(e&_o)!==0,r=(e&bo)!==0,a,i=!t.startsWith("");return()=>{a===void 0&&(a=oc(i?t:""+t),n||(a=sn(a)));var s=r||Us?document.importNode(a,!0):a.cloneNode(!0);if(n){var c=sn(s),o=s.lastChild;In(c,o)}else In(s,s);return s}}function Je(t=""){{var e=Ct(t+"");return In(e,e),e}}function Ht(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Ct();return t.append(e,n),In(e,n),t}function C(t,e){t!==null&&t.before(e)}function K(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=`${n}`)}function cc(t,e){return uc(t,e)}const $r=new Map;function uc(t,{target:e,anchor:n,props:r={},events:a,context:i,intro:s=!0,transformError:c}){Wo();var o=void 0,u=Zo(()=>{var f=n??e.appendChild(Ct());Po(f,{pending:()=>{}},_=>{xe({});var g=we;i&&(g.c=i),a&&(r.$$events=a),o=t(_,r)||{},Ee()},c);var d=new Set,p=_=>{for(var g=0;g<_.length;g++){var w=_[g];if(!d.has(w)){d.add(w);var b=ic(w);for(const A of[e,document]){var k=$r.get(A);k===void 0&&(k=new Map,$r.set(A,k));var S=k.get(w);S===void 0?(A.addEventListener(w,Fa,{passive:b}),k.set(w,1)):k.set(w,S+1)}}}};return p(da(rl)),Ua.add(p),()=>{for(var _ of d)for(const b of[e,document]){var g=$r.get(b),w=g.get(_);--w==0?(b.removeEventListener(_,Fa),g.delete(_),g.size===0&&$r.delete(b)):g.set(_,w)}Ua.delete(p),f!==n&&f.parentNode?.removeChild(f)}});return fc.set(o,u),o}let fc=new WeakMap;class hi{anchor;#n=new Map;#o=new Map;#e=new Map;#a=new Set;#r=!0;constructor(e,n=!0){this.anchor=e,this.#r=n}#i=e=>{if(this.#n.has(e)){var n=this.#n.get(e),r=this.#o.get(n);if(r)ui(r),this.#a.delete(n);else{var a=this.#e.get(n);a&&(this.#o.set(n,a.effect),this.#e.delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,s]of this.#n){if(this.#n.delete(i),i===e)break;const c=this.#e.get(s);c&&(Ve(c.effect),this.#e.delete(s))}for(const[i,s]of this.#o){if(i===n||this.#a.has(i))continue;const c=()=>{if(Array.from(this.#n.values()).includes(i)){var u=document.createDocumentFragment();fi(s,u),u.append(Ct()),this.#e.set(i,{effect:s,fragment:u})}else Ve(s);this.#a.delete(i),this.#o.delete(i)};this.#r||!r?(this.#a.add(i),Sn(s,c,!1)):c()}}};#t=e=>{this.#n.delete(e);const n=Array.from(this.#n.values());for(const[r,a]of this.#e)n.includes(r)||(Ve(a.effect),this.#e.delete(r))};ensure(e,n){var r=he,a=Hs();if(n&&!this.#o.has(e)&&!this.#e.has(e))if(a){var i=document.createDocumentFragment(),s=Ct();i.append(s),this.#e.set(e,{effect:st(()=>n(s)),fragment:i})}else this.#o.set(e,st(()=>n(this.anchor)));if(this.#n.set(r,e),a){for(const[c,o]of this.#o)c===e?r.unskip_effect(o):r.skip_effect(o);for(const[c,o]of this.#e)c===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#i),r.ondiscard(this.#t)}else this.#i(r)}}function ne(t,e,n=!1){var r=new hi(t),a=n?cn:0;function i(s,c){r.ensure(s,c)}Kn(()=>{var s=!1;e((c,o=0)=>{s=!0,i(o,c)}),s||i(-1,null)},a)}function dc(t,e){return e}function hc(t,e,n){for(var r=[],a=e.length,i,s=e.length,c=0;c{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var p=t.outrogroups;Ba(t,da(i.done)),p.delete(i),p.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var o=r.length===0&&n!==null;if(o){var u=n,f=u.parentNode;qo(f),f.append(u),t.items.clear()}Ba(t,e,!o)}else i={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(i)}function Ba(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const s of t.pending.values())for(const c of s)r.add(t.items.get(c).e)}for(var a=0;a{var A=n();return Ja(A)?A:A==null?[]:da(A)}),p,_=new Map,g=!0;function w(A){(S.effect.f&ht)===0&&(S.pending.delete(A),S.fallback=f,pc(S,p,s,e,r),f!==null&&(p.length===0?(f.f&Ut)===0?ui(f):(f.f^=Ut,kr(f,null,s)):Sn(f,()=>{f=null})))}function b(A){S.pending.delete(A)}var k=Kn(()=>{p=l(d);for(var A=p.length,x=new Set,M=he,N=Hs(),z=0;zi(s)):(f=st(()=>i(Ui??=Ct())),f.f|=Ut)),A>x.size&&Jl(),!g)if(_.set(M,x),N){for(const[L,I]of c)x.has(L)||M.skip_effect(I.e);M.oncommit(w),M.ondiscard(b)}else w(M);l(d)}),S={effect:k,items:c,pending:_,outrogroups:null,fallback:f};g=!1}function ur(t){for(;t!==null&&(t.f&Dt)===0;)t=t.next;return t}function pc(t,e,n,r,a){var i=(r&uo)!==0,s=e.length,c=t.items,o=ur(t.effect.first),u,f=null,d,p=[],_=[],g,w,b,k;if(i)for(k=0;k0){var j=(r&_s)!==0&&s===0?n:null;if(i){for(k=0;k{if(d!==void 0)for(b of d)b.nodes?.a?.apply()})}function gc(t,e,n,r,a,i,s,c){var o=(s&oo)!==0?(s&fo)===0?ee(n,!1,!1):An(n):null,u=(s&co)!==0?An(a):null;return{v:o,i:u,e:st(()=>(i(e,o??n,u??a,c),()=>{t.delete(r)}))}}function kr(t,e,n){if(t.nodes)for(var r=t.nodes.start,a=t.nodes.end,i=e&&(e.f&Ut)===0?e.nodes.start:n;r!==null;){var s=Pr(r);if(i.before(r),r===a)return;r=s}}function nn(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Ha(t,e,n=!1,r=!1,a=!1,i=!1){var s=t,c="";if(n)var o=t;Y(()=>{var u=le;if(c!==(c=e()??"")){if(n){u.nodes=null,o.innerHTML=c,c!==""&&In(sn(o),o.lastChild);return}if(u.nodes!==null&&(Vs(u.nodes.start,u.nodes.end),u.nodes=null),c!==""){var f=r?ks:a?ko:void 0,d=si(r?"svg":a?"math":"template",f);d.innerHTML=c;var p=r||a?d:d.content;if(In(sn(p),p.lastChild),r||a)for(;sn(p);)s.before(sn(p));else s.before(p)}}})}function vc(t,e,...n){var r=new hi(t);Kn(()=>{const a=e()??null;r.ensure(a,a&&(i=>a(i,...n)))},cn)}function il(t,e,n,r,a,i){var s=null,c=t,o=new hi(c,!1);Kn(()=>{const u=e()||null;var f=u==="svg"?ks:void 0;if(u===null){o.ensure(null,null);return}return o.ensure(u,d=>{if(u){if(s=si(u,f),In(s,s),r){var p=s.appendChild(Ct());r(s,p)}le.nodes.end=s,d.before(s)}}),()=>{}},cn),ha(()=>{})}function sl(t,e){var n;n=document.head.appendChild(Ct()),Kn(()=>e(n),gs|On)}function mc(t,e,n){Nr(()=>{var r=qe(()=>e(t,n?.())||{});if(n&&r?.update){var a=!1,i={};zr(()=>{var s=n();di(s),a&&ws(i,s)&&(i=s,r.update(s))}),a=!0}if(r?.destroy)return()=>r.destroy()})}function _c(t,e){var n=void 0,r;qs(()=>{n!==(n=e())&&(r&&(Ve(r),r=null),n&&(r=st(()=>{Nr(()=>n(t))})))})}function ll(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const Wl=!1;var Ja=Array.isArray,ql=Array.prototype.indexOf,jn=Array.prototype.includes,da=Array.from,jl=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,hs=Object.getOwnPropertyDescriptors,Vl=Object.prototype,Zl=Array.prototype,$a=Object.getPrototypeOf,Di=Object.isExtensible;const Ra=()=>{};function Yl(t){return t()}function Ia(t){for(var e=0;e{t=r,e=a});return{promise:n,resolve:t,reject:e}}const Ye=2,Vn=4,Or=8,ei=1<<24,Ft=16,Dt=32,on=64,Ca=128,_t=512,Ne=1024,je=2048,Ot=4096,et=8192,ht=16384,Dn=32768,Da=1<<25,cn=65536,Oa=1<<17,gs=1<<18,On=1<<19,vs=1<<20,Ut=1<<25,En=65536,sa=1<<21,Er=1<<22,ln=1<<23,Vt=Symbol("$state"),Xl=Symbol("legacy props"),Kl=Symbol(""),jt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ti=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function ms(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ql(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function $l(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function to(t){throw new Error("https://svelte.dev/e/effect_orphan")}function no(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ro(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ao(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function io(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function so(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const oo=1,co=2,_s=4,uo=8,fo=16,ho=1,po=2,go=4,vo=8,mo=16,_o=1,bo=2,Fe=Symbol(),bs="http://www.w3.org/1999/xhtml",ks="http://www.w3.org/2000/svg",ko="http://www.w3.org/1998/Math/MathML",yo="@attach";function wo(){console.warn("https://svelte.dev/e/derived_inert")}function To(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function So(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ys(t){return t===this.v}function ws(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ts(t){return!ws(t,this.v)}let Xn=!1,xo=!1;function Eo(){Xn=!0}let we=null;function Zn(t){we=t}function xe(t,e=!1,n){we={p:we,i:!1,c:null,e:null,s:t,x:null,r:le,l:Xn&&!e?{s:null,u:null,$:[]}:null}}function Ee(t){var e=we,n=e.e;if(n!==null){e.e=null;for(var r of n)Ws(r)}return t!==void 0&&(e.x=t),e.i=!0,we=e.p,t??{}}function Lr(){return!Xn||we!==null&&we.l===null}let kn=[];function Ss(){var t=kn;kn=[],Ia(t)}function Zt(t){if(kn.length===0&&!Tr){var e=kn;queueMicrotask(()=>{e===kn&&Ss()})}kn.push(t)}function Ao(){for(;kn.length>0;)Ss()}function xs(t){var e=le;if(e===null)return pe.f|=ln,t;if((e.f&Dn)===0&&(e.f&Vn)===0)throw t;rn(t,e)}function rn(t,e){for(;e!==null;){if((e.f&Ca)!==0){if((e.f&Dn)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}const Ro=-7169;function De(t,e){t.f=t.f&Ro|e}function ni(t){(t.f&_t)!==0||t.deps===null?De(t,Ne):De(t,Ot)}function Es(t){if(t!==null)for(const e of t)(e.f&Ye)===0||(e.f&En)===0||(e.f^=En,Es(e.deps))}function As(t,e,n){(t.f&je)!==0?e.add(t):(t.f&Ot)!==0&&n.add(t),Es(t.deps),De(t,Ne)}let Jr=!1;function Io(t){var e=Jr;try{return Jr=!1,[t(),Jr]}finally{Jr=e}}const _n=new Set;let he=null,Rt=null,La=null,Tr=!1,ba=!1,Wn=null,ra=null;var Oi=0;let Co=1;class un{id=Co++;current=new Map;previous=new Map;#n=new Set;#o=new Set;#e=new Set;#a=new Map;#r=new Map;#i=null;#t=[];#s=[];#c=new Set;#u=new Set;#l=new Map;#d=new Set;is_fork=!1;#p=!1;#h=new Set;#f(){return this.is_fork||this.#r.size>0}#m(){for(const r of this.#h)for(const a of r.#r.keys()){for(var e=!1,n=a;n.parent!==null;){if(this.#l.has(n)){e=!0;break}n=n.parent}if(!e)return!0}return!1}skip_effect(e){this.#l.has(e)||this.#l.set(e,{d:[],m:[]}),this.#d.delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=this.#l.get(e);if(r){this.#l.delete(e);for(var a of r.d)De(a,je),n(a);for(a of r.m)De(a,Ot),n(a)}this.#d.add(e)}#g(){if(Oi++>1e3&&(_n.delete(this),Oo()),!this.#f()){for(const c of this.#c)this.#u.delete(c),De(c,je),this.schedule(c);for(const c of this.#u)De(c,Ot),this.schedule(c)}const e=this.#t;this.#t=[],this.apply();var n=Wn=[],r=[],a=ra=[];for(const c of e)try{this.#_(c,n,r)}catch(o){throw Cs(c),o}if(he=null,a.length>0){var i=un.ensure();for(const c of a)i.schedule(c)}if(Wn=null,ra=null,this.#f()||this.#m()){this.#v(r),this.#v(n);for(const[c,o]of this.#l)Is(c,o)}else{this.#a.size===0&&_n.delete(this),this.#c.clear(),this.#u.clear();for(const c of this.#n)c(this);this.#n.clear(),Li(r),Li(n),this.#i?.resolve()}var s=he;if(this.#t.length>0){const c=s??=this;c.#t.push(...this.#t.filter(o=>!c.#t.includes(o)))}s!==null&&(_n.add(s),s.#g())}#_(e,n,r){e.f^=Ne;for(var a=e.first;a!==null;){var i=a.f,s=(i&(Dt|on))!==0,c=s&&(i&Ne)!==0,o=c||(i&et)!==0||this.#l.has(a);if(!o&&a.fn!==null){s?a.f^=Ne:(i&Vn)!==0?n.push(a):Qn(a)&&((i&Ft)!==0&&this.#u.add(a),Rn(a));var u=a.first;if(u!==null){a=u;continue}}for(;a!==null;){var f=a.next;if(f!==null){a=f;break}a=a.parent}}}#v(e){for(var n=0;n!this.current.has(d));if(a.length===0)e&&f.discard();else if(n.length>0){if(e)for(const d of this.#d)f.unskip_effect(d,p=>{(p.f&(Ft|Er))!==0?f.schedule(p):f.#v([p])});f.activate();var i=new Set,s=new Map;for(var c of n)Rs(c,a,i,s);s=new Map;var o=[...f.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d:!0);for(const d of this.#s)(d.f&(ht|et|Oa))===0&&ri(d,o,s)&&((d.f&(Er|Ft))!==0?(De(d,je),f.schedule(d)):f.#c.add(d));if(f.#t.length>0){f.apply();for(var u of f.#t)f.#_(u,[],[]);f.#t=[]}f.deactivate()}}for(const f of _n)f.#h.has(this)&&(f.#h.delete(this),f.#h.size===0&&!f.#f()&&(f.activate(),f.#g()))}increment(e,n){let r=this.#a.get(n)??0;if(this.#a.set(n,r+1),e){let a=this.#r.get(n)??0;this.#r.set(n,a+1)}}decrement(e,n,r){let a=this.#a.get(n)??0;if(a===1?this.#a.delete(n):this.#a.set(n,a-1),e){let i=this.#r.get(n)??0;i===1?this.#r.delete(n):this.#r.set(n,i-1)}this.#p||r||(this.#p=!0,Zt(()=>{this.#p=!1,this.flush()}))}transfer_effects(e,n){for(const r of e)this.#c.add(r);for(const r of n)this.#u.add(r);e.clear(),n.clear()}oncommit(e){this.#n.add(e)}ondiscard(e){this.#o.add(e)}on_fork_commit(e){this.#e.add(e)}run_fork_commit_callbacks(){for(const e of this.#e)e(this);this.#e.clear()}settled(){return(this.#i??=ps()).promise}static ensure(){if(he===null){const e=he=new un;ba||(_n.add(he),Tr||Zt(()=>{he===e&&e.flush()}))}return he}apply(){{Rt=null;return}}schedule(e){if(La=e,e.b?.is_pending&&(e.f&(Vn|Or|ei))!==0&&(e.f&Dn)===0){e.b.defer_effect(e);return}for(var n=e;n.parent!==null;){n=n.parent;var r=n.f;if(Wn!==null&&n===le&&(pe===null||(pe.f&Ye)===0))return;if((r&(on|Dt))!==0){if((r&Ne)===0)return;n.f^=Ne}}this.#t.push(n)}}function Do(t){var e=Tr;Tr=!0;try{for(var n;;){if(Ao(),he===null)return n;he.flush()}}finally{Tr=e}}function Oo(){try{no()}catch(t){rn(t,La)}}let qt=null;function Li(t){var e=t.length;if(e!==0){for(var n=0;n0)){Tn.clear();for(const a of qt){if((a.f&(ht|et))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)qt.has(s)&&(qt.delete(s),i.push(s)),s=s.parent;for(let c=i.length-1;c>=0;c--){const o=i[c];(o.f&(ht|et))===0&&Rn(o)}}qt.clear()}}qt=null}}function Rs(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const a of t.reactions){const i=a.f;(i&Ye)!==0?Rs(a,e,n,r):(i&(Er|Ft))!==0&&(i&je)===0&&ri(a,e,r)&&(De(a,je),ai(a))}}function ri(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const a of t.deps){if(jn.call(e,a))return!0;if((a.f&Ye)!==0&&ri(a,e,n))return n.set(a,!0),!0}return n.set(t,!1),!1}function ai(t){he.schedule(t)}function Is(t,e){if(!((t.f&Dt)!==0&&(t.f&Ne)!==0)){(t.f&je)!==0?e.d.push(t):(t.f&Ot)!==0&&e.m.push(t),De(t,Ne);for(var n=t.first;n!==null;)Is(n,e),n=n.next}}function Cs(t){De(t,Ne);for(var e=t.first;e!==null;)Cs(e),e=e.next}function Lo(t){let e=0,n=An(0),r;return()=>{oi()&&(l(n),zr(()=>(e===0&&(r=qe(()=>t(()=>Sr(n)))),e+=1,()=>{Zt(()=>{e-=1,e===0&&(r?.(),r=void 0,Sr(n))})})))}}var Mo=cn|On;function Po(t,e,n,r){new No(t,e,n,r)}class No{parent;is_pending=!1;transform_error;#n;#o=null;#e;#a;#r;#i=null;#t=null;#s=null;#c=null;#u=0;#l=0;#d=!1;#p=new Set;#h=new Set;#f=null;#m=Lo(()=>(this.#f=An(this.#u),()=>{this.#f=null}));constructor(e,n,r,a){this.#n=e,this.#e=n,this.#a=i=>{var s=le;s.b=this,s.f|=Ca,r(i)},this.parent=le.b,this.transform_error=a??this.parent?.transform_error??(i=>i),this.#r=Kn(()=>{this.#b()},Mo)}#g(){try{this.#i=st(()=>this.#a(this.#n))}catch(e){this.error(e)}}#_(e){const n=this.#e.failed;n&&(this.#s=st(()=>{n(this.#n,()=>e,()=>()=>{})}))}#v(){const e=this.#e.pending;e&&(this.is_pending=!0,this.#t=st(()=>e(this.#n)),Zt(()=>{var n=this.#c=document.createDocumentFragment(),r=Ct();n.append(r),this.#i=this.#y(()=>st(()=>this.#a(r))),this.#l===0&&(this.#n.before(n),this.#c=null,Sn(this.#t,()=>{this.#t=null}),this.#k(he))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#u=0,this.#i=st(()=>{this.#a(this.#n)}),this.#l>0){var e=this.#c=document.createDocumentFragment();fi(this.#i,e);const n=this.#e.pending;this.#t=st(()=>n(this.#n))}else this.#k(he)}catch(n){this.error(n)}}#k(e){this.is_pending=!1,e.transfer_effects(this.#p,this.#h)}defer_effect(e){As(e,this.#p,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#y(e){var n=le,r=pe,a=we;yt(this.#r),kt(this.#r),Zn(this.#r.ctx);try{return un.ensure(),e()}catch(i){return xs(i),null}finally{yt(n),kt(r),Zn(a)}}#w(e,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(e,n);return}this.#l+=e,this.#l===0&&(this.#k(n),this.#t&&Sn(this.#t,()=>{this.#t=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(e,n){this.#w(e,n),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,Zt(()=>{this.#d=!1,this.#f&&Yn(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),l(this.#f)}error(e){if(!this.#e.onerror&&!this.#e.failed)throw e;he?.is_fork?(this.#i&&he.skip_effect(this.#i),this.#t&&he.skip_effect(this.#t),this.#s&&he.skip_effect(this.#s),he.on_fork_commit(()=>{this.#T(e)})):this.#T(e)}#T(e){this.#i&&(Ve(this.#i),this.#i=null),this.#t&&(Ve(this.#t),this.#t=null),this.#s&&(Ve(this.#s),this.#s=null);var n=this.#e.onerror;let r=this.#e.failed;var a=!1,i=!1;const s=()=>{if(a){So();return}a=!0,i&&lo(),this.#s!==null&&Sn(this.#s,()=>{this.#s=null}),this.#y(()=>{this.#b()})},c=o=>{try{i=!0,n?.(o,s),i=!1}catch(u){rn(u,this.#r&&this.#r.parent)}r&&(this.#s=this.#y(()=>{try{return st(()=>{var u=le;u.b=this,u.f|=Ca,r(this.#n,()=>o,()=>s)})}catch(u){return rn(u,this.#r.parent),null}}))};Zt(()=>{var o;try{o=this.transform_error(e)}catch(u){rn(u,this.#r&&this.#r.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(c,u=>rn(u,this.#r&&this.#r.parent)):c(o)})}}function Ds(t,e,n,r){const a=Lr()?Mr:dt;var i=t.filter(p=>!p.settled);if(n.length===0&&i.length===0){r(e.map(a));return}var s=le,c=zo(),o=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(p=>p.promise)):null;function u(p){c();try{r(p)}catch(_){(s.f&ht)===0&&rn(_,s)}la()}if(n.length===0){o.then(()=>u(e.map(a)));return}var f=Os();function d(){Promise.all(n.map(p=>Uo(p))).then(p=>u([...e.map(a),...p])).catch(p=>rn(p,s)).finally(()=>f())}o?o.then(()=>{c(),d(),la()}):d()}function zo(){var t=le,e=pe,n=we,r=he;return function(i=!0){yt(t),kt(e),Zn(n),i&&(t.f&ht)===0&&(r?.activate(),r?.apply())}}function la(t=!0){yt(null),kt(null),Zn(null),t&&he?.deactivate()}function Os(){var t=le,e=t.b,n=he,r=e.is_rendered();return e.update_pending_count(1,n),n.increment(r,t),(a=!1)=>{e.update_pending_count(-1,n),n.decrement(r,t,a)}}function Mr(t){var e=Ye|je;return le!==null&&(le.f|=On),{ctx:we,deps:null,effects:null,equals:ys,f:e,fn:t,reactions:null,rv:0,v:Fe,wv:0,parent:le,ac:null}}function Uo(t,e,n){let r=le;r===null&&Ql();var a=void 0,i=An(Fe),s=!pe,c=new Map;return Xo(()=>{var o=le,u=ps();a=u.promise;try{Promise.resolve(t()).then(u.resolve,u.reject).finally(la)}catch(_){u.reject(_),la()}var f=he;if(s){if((o.f&Dn)!==0)var d=Os();if(r.b.is_rendered())c.get(f)?.reject(jt),c.delete(f);else{for(const _ of c.values())_.reject(jt);c.clear()}c.set(f,u)}const p=(_,g=void 0)=>{if(d){var w=g===jt;d(w)}if(!(g===jt||(o.f&ht)!==0)){if(f.activate(),g)i.f|=ln,Yn(i,g);else{(i.f&ln)!==0&&(i.f^=ln),Yn(i,_);for(const[b,k]of c){if(c.delete(b),b===f)break;k.reject(jt)}}f.deactivate()}};u.promise.then(p,_=>p(null,_||"unknown"))}),ha(()=>{for(const o of c.values())o.reject(jt)}),new Promise(o=>{function u(f){function d(){f===a?o(i):u(a)}f.then(d,d)}u(a)})}function Se(t){const e=Mr(t);return Ks(e),e}function dt(t){const e=Mr(t);return e.equals=Ts,e}function Fo(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n0&&!Ps&&Ho()}return e}function Ho(){Ps=!1;for(const t of Ma)(t.f&Ne)!==0&&De(t,Ot),Qn(t)&&Rn(t);Ma.clear()}function Sr(t){m(t,t.v+1)}function Ns(t,e,n){var r=t.reactions;if(r!==null)for(var a=Lr(),i=r.length,s=0;s{if(xn===i)return c();var o=pe,u=xn;kt(null),Ni(i);var f=c();return kt(o),Ni(u),f};return r&&n.set("length",Be(t.length)),new Proxy(t,{defineProperty(c,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ao();var f=n.get(o);return f===void 0?s(()=>{var d=Be(u.value);return n.set(o,d),d}):m(f,u.value,!0),!0},deleteProperty(c,o){var u=n.get(o);if(u===void 0){if(o in c){const f=s(()=>Be(Fe));n.set(o,f),Sr(a)}}else m(u,Fe),Sr(a);return!0},get(c,o,u){if(o===Vt)return t;var f=n.get(o),d=o in c;if(f===void 0&&(!d||qn(c,o)?.writable)&&(f=s(()=>{var _=an(d?c[o]:Fe),g=Be(_);return g}),n.set(o,f)),f!==void 0){var p=l(f);return p===Fe?void 0:p}return Reflect.get(c,o,u)},getOwnPropertyDescriptor(c,o){var u=Reflect.getOwnPropertyDescriptor(c,o);if(u&&"value"in u){var f=n.get(o);f&&(u.value=l(f))}else if(u===void 0){var d=n.get(o),p=d?.v;if(d!==void 0&&p!==Fe)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(c,o){if(o===Vt)return!0;var u=n.get(o),f=u!==void 0&&u.v!==Fe||Reflect.has(c,o);if(u!==void 0||le!==null&&(!f||qn(c,o)?.writable)){u===void 0&&(u=s(()=>{var p=f?an(c[o]):Fe,_=Be(p);return _}),n.set(o,u));var d=l(u);if(d===Fe)return!1}return f},set(c,o,u,f){var d=n.get(o),p=o in c;if(r&&o==="length")for(var _=u;_Be(Fe)),n.set(_+"",g))}if(d===void 0)(!p||qn(c,o)?.writable)&&(d=s(()=>Be(void 0)),m(d,an(u)),n.set(o,d));else{p=d.v!==Fe;var w=s(()=>an(u));m(d,w)}var b=Reflect.getOwnPropertyDescriptor(c,o);if(b?.set&&b.set.call(f,u),!p){if(r&&typeof o=="string"){var k=n.get("length"),S=Number(o);Number.isInteger(S)&&S>=k.v&&m(k,S+1)}Sr(a)}return!0},ownKeys(c){l(a);var o=Reflect.ownKeys(c).filter(d=>{var p=n.get(d);return p===void 0||p.v!==Fe});for(var[u,f]of n)f.v!==Fe&&!(u in c)&&o.push(u);return o},setPrototypeOf(){io()}})}function Mi(t){try{if(t!==null&&typeof t=="object"&&Vt in t)return t[Vt]}catch{}return t}function Go(t,e){return Object.is(Mi(t),Mi(e))}var Pa,zs,Us,Fs,Bs;function Wo(){if(Pa===void 0){Pa=window,zs=document,Us=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Fs=qn(e,"firstChild").get,Bs=qn(e,"nextSibling").get,Di(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Di(n)&&(n.__t=void 0)}}function Ct(t=""){return document.createTextNode(t)}function sn(t){return Fs.call(t)}function Pr(t){return Bs.call(t)}function v(t,e){return sn(t)}function lt(t,e=!1){{var n=sn(t);return n instanceof Comment&&n.data===""?Pr(n):n}}function y(t,e=1,n=!1){let r=t;for(;e--;)r=Pr(r);return r}function qo(t){t.textContent=""}function Hs(){return!1}function si(t,e,n){return document.createElementNS(e??bs,t,void 0)}function jo(t,e){if(e){const n=document.body;t.autofocus=!0,Zt(()=>{document.activeElement===n&&t.focus()})}}function li(t){var e=pe,n=le;kt(null),yt(null);try{return t()}finally{kt(e),yt(n)}}function Gs(t){le===null&&(pe===null&&to(),eo()),Xt&&$l()}function Vo(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Lt(t,e){var n=le;n!==null&&(n.f&et)!==0&&(t|=et);var r={ctx:we,deps:null,nodes:null,f:t|je|_t,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};he?.register_created_effect(r);var a=r;if((t&Vn)!==0)Wn!==null?Wn.push(r):un.ensure().schedule(r);else if(e!==null){try{Rn(r)}catch(s){throw Ve(r),s}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&On)===0&&(a=a.first,(t&Ft)!==0&&(t&cn)!==0&&a!==null&&(a.f|=cn))}if(a!==null&&(a.parent=n,n!==null&&Vo(a,n),pe!==null&&(pe.f&Ye)!==0&&(t&on)===0)){var i=pe;(i.effects??=[]).push(a)}return r}function oi(){return pe!==null&&!It}function ha(t){const e=Lt(Or,null);return De(e,Ne),e.teardown=t,e}function fn(t){Gs();var e=le.f,n=!pe&&(e&Dt)!==0&&(e&Dn)===0;if(n){var r=we;(r.e??=[]).push(t)}else return Ws(t)}function Ws(t){return Lt(Vn|vs,t)}function Na(t){return Gs(),Lt(Or|vs,t)}function Zo(t){un.ensure();const e=Lt(on|On,t);return(n={})=>new Promise(r=>{n.outro?Sn(e,()=>{Ve(e),r(void 0)}):(Ve(e),r(void 0))})}function Nr(t){return Lt(Vn,t)}function Nt(t,e){var n=we,r={effect:null,ran:!1,deps:t};n.l.$.push(r),r.effect=zr(()=>{if(t(),!r.ran){r.ran=!0;var a=le;try{yt(a.parent),qe(e)}finally{yt(a)}}})}function Yo(){var t=we;zr(()=>{for(var e of t.l.$){e.deps();var n=e.effect;(n.f&Ne)!==0&&n.deps!==null&&De(n,Ot),Qn(n)&&Rn(n),e.ran=!1}})}function Xo(t){return Lt(Er|On,t)}function zr(t,e=0){return Lt(Or|e,t)}function Y(t,e=[],n=[],r=[]){Ds(r,e,n,a=>{Lt(Or,()=>t(...a.map(l)))})}function Kn(t,e=0){var n=Lt(Ft|e,t);return n}function qs(t,e=0){var n=Lt(ei|e,t);return n}function st(t){return Lt(Dt|On,t)}function js(t){var e=t.teardown;if(e!==null){const n=Xt,r=pe;Pi(!0),kt(null);try{e.call(null)}finally{Pi(n),kt(r)}}}function ci(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const a=n.ac;a!==null&&li(()=>{a.abort(jt)});var r=n.next;(n.f&on)!==0?n.parent=null:Ve(n,e),n=r}}function Ko(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Dt)===0&&Ve(e),e=n}}function Ve(t,e=!0){var n=!1;(e||(t.f&gs)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Vs(t.nodes.start,t.nodes.end),n=!0),De(t,Da),ci(t,e&&!n),Ar(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const i of r)i.stop();js(t),t.f^=Da,t.f|=ht;var a=t.parent;a!==null&&a.first!==null&&Zs(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Vs(t,e){for(;t!==null;){var n=t===e?null:Pr(t);t.remove(),t=n}}function Zs(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Sn(t,e,n=!0){var r=[];Ys(t,r,!0);var a=()=>{n&&Ve(t),e&&e()},i=r.length;if(i>0){var s=()=>--i||a();for(var c of r)c.out(s)}else a()}function Ys(t,e,n){if((t.f&et)===0){t.f^=et;var r=t.nodes&&t.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&e.push(c);for(var a=t.first;a!==null;){var i=a.next;if((a.f&on)===0){var s=(a.f&cn)!==0||(a.f&Dt)!==0&&(t.f&Ft)!==0;Ys(a,e,s?n:!1)}a=i}}}function ui(t){Xs(t,!0)}function Xs(t,e){if((t.f&et)!==0){t.f^=et,(t.f&Ne)===0&&(De(t,je),un.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,a=(n.f&cn)!==0||(n.f&Dt)!==0;Xs(n,a?e:!1),n=r}var i=t.nodes&&t.nodes.t;if(i!==null)for(const s of i)(s.is_global||e)&&s.in()}}function fi(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var a=n===r?null:Pr(n);e.append(n),n=a}}let aa=!1,Xt=!1;function Pi(t){Xt=t}let pe=null,It=!1;function kt(t){pe=t}let le=null;function yt(t){le=t}let bt=null;function Ks(t){pe!==null&&(bt===null?bt=[t]:bt.push(t))}let it=null,ft=0,mt=null;function Qo(t){mt=t}let Qs=1,yn=0,xn=yn;function Ni(t){xn=t}function Js(){return++Qs}function Qn(t){var e=t.f;if((e&je)!==0)return!0;if(e&Ye&&(t.f&=~En),(e&Ot)!==0){for(var n=t.deps,r=n.length,a=0;at.wv)return!0}(e&_t)!==0&&Rt===null&&De(t,Ne)}return!1}function $s(t,e,n=!0){var r=t.reactions;if(r!==null&&!(bt!==null&&jn.call(bt,t)))for(var a=0;a{t.ac.abort(jt)}),t.ac=null);try{t.f|=sa;var f=t.fn,d=f();t.f|=Dn;var p=t.deps,_=he?.is_fork;if(it!==null){var g;if(_||Ar(t,ft),p!==null&&ft>0)for(p.length=ft+it.length,g=0;gn?.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Zt(()=>{e.addEventListener(t,a,r)}):e.addEventListener(t,a,r),a}function Bt(t,e,n,r,a){var i={capture:r,passive:a},s=al(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ha(()=>{e.removeEventListener(t,s,i)})}function $(t,e,n){(e[br]??={})[t]=n}function Pe(t){for(var e=0;e{throw b});throw p}}finally{t[br]=e,delete t.currentTarget,kt(f),yt(d)}}}const sc=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function lc(t){return sc?.createHTML(t)??t}function oc(t){var e=si("template");return e.innerHTML=lc(t.replaceAll("","")),e.content}function In(t,e){var n=le;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function W(t,e){var n=(e&_o)!==0,r=(e&bo)!==0,a,i=!t.startsWith("");return()=>{a===void 0&&(a=oc(i?t:""+t),n||(a=sn(a)));var s=r||Us?document.importNode(a,!0):a.cloneNode(!0);if(n){var c=sn(s),o=s.lastChild;In(c,o)}else In(s,s);return s}}function Je(t=""){{var e=Ct(t+"");return In(e,e),e}}function Ht(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Ct();return t.append(e,n),In(e,n),t}function C(t,e){t!==null&&t.before(e)}function K(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=`${n}`)}function cc(t,e){return uc(t,e)}const $r=new Map;function uc(t,{target:e,anchor:n,props:r={},events:a,context:i,intro:s=!0,transformError:c}){Wo();var o=void 0,u=Zo(()=>{var f=n??e.appendChild(Ct());Po(f,{pending:()=>{}},_=>{xe({});var g=we;i&&(g.c=i),a&&(r.$$events=a),o=t(_,r)||{},Ee()},c);var d=new Set,p=_=>{for(var g=0;g<_.length;g++){var w=_[g];if(!d.has(w)){d.add(w);var b=ic(w);for(const A of[e,document]){var k=$r.get(A);k===void 0&&(k=new Map,$r.set(A,k));var S=k.get(w);S===void 0?(A.addEventListener(w,Fa,{passive:b}),k.set(w,1)):k.set(w,S+1)}}}};return p(da(rl)),Ua.add(p),()=>{for(var _ of d)for(const b of[e,document]){var g=$r.get(b),w=g.get(_);--w==0?(b.removeEventListener(_,Fa),g.delete(_),g.size===0&&$r.delete(b)):g.set(_,w)}Ua.delete(p),f!==n&&f.parentNode?.removeChild(f)}});return fc.set(o,u),o}let fc=new WeakMap;class hi{anchor;#n=new Map;#o=new Map;#e=new Map;#a=new Set;#r=!0;constructor(e,n=!0){this.anchor=e,this.#r=n}#i=e=>{if(this.#n.has(e)){var n=this.#n.get(e),r=this.#o.get(n);if(r)ui(r),this.#a.delete(n);else{var a=this.#e.get(n);a&&(this.#o.set(n,a.effect),this.#e.delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,s]of this.#n){if(this.#n.delete(i),i===e)break;const c=this.#e.get(s);c&&(Ve(c.effect),this.#e.delete(s))}for(const[i,s]of this.#o){if(i===n||this.#a.has(i))continue;const c=()=>{if(Array.from(this.#n.values()).includes(i)){var u=document.createDocumentFragment();fi(s,u),u.append(Ct()),this.#e.set(i,{effect:s,fragment:u})}else Ve(s);this.#a.delete(i),this.#o.delete(i)};this.#r||!r?(this.#a.add(i),Sn(s,c,!1)):c()}}};#t=e=>{this.#n.delete(e);const n=Array.from(this.#n.values());for(const[r,a]of this.#e)n.includes(r)||(Ve(a.effect),this.#e.delete(r))};ensure(e,n){var r=he,a=Hs();if(n&&!this.#o.has(e)&&!this.#e.has(e))if(a){var i=document.createDocumentFragment(),s=Ct();i.append(s),this.#e.set(e,{effect:st(()=>n(s)),fragment:i})}else this.#o.set(e,st(()=>n(this.anchor)));if(this.#n.set(r,e),a){for(const[c,o]of this.#o)c===e?r.unskip_effect(o):r.skip_effect(o);for(const[c,o]of this.#e)c===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#i),r.ondiscard(this.#t)}else this.#i(r)}}function ne(t,e,n=!1){var r=new hi(t),a=n?cn:0;function i(s,c){r.ensure(s,c)}Kn(()=>{var s=!1;e((c,o=0)=>{s=!0,i(o,c)}),s||i(-1,null)},a)}function dc(t,e){return e}function hc(t,e,n){for(var r=[],a=e.length,i,s=e.length,c=0;c{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var p=t.outrogroups;Ba(t,da(i.done)),p.delete(i),p.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var o=r.length===0&&n!==null;if(o){var u=n,f=u.parentNode;qo(f),f.append(u),t.items.clear()}Ba(t,e,!o)}else i={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(i)}function Ba(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const s of t.pending.values())for(const c of s)r.add(t.items.get(c).e)}for(var a=0;a{var A=n();return Ja(A)?A:A==null?[]:da(A)}),p,_=new Map,g=!0;function w(A){(S.effect.f&ht)===0&&(S.pending.delete(A),S.fallback=f,pc(S,p,s,e,r),f!==null&&(p.length===0?(f.f&Ut)===0?ui(f):(f.f^=Ut,kr(f,null,s)):Sn(f,()=>{f=null})))}function b(A){S.pending.delete(A)}var k=Kn(()=>{p=l(d);for(var A=p.length,x=new Set,M=he,N=Hs(),z=0;zi(s)):(f=st(()=>i(Ui??=Ct())),f.f|=Ut)),A>x.size&&Jl(),!g)if(_.set(M,x),N){for(const[L,I]of c)x.has(L)||M.skip_effect(I.e);M.oncommit(w),M.ondiscard(b)}else w(M);l(d)}),S={effect:k,items:c,pending:_,outrogroups:null,fallback:f};g=!1}function ur(t){for(;t!==null&&(t.f&Dt)===0;)t=t.next;return t}function pc(t,e,n,r,a){var i=(r&uo)!==0,s=e.length,c=t.items,o=ur(t.effect.first),u,f=null,d,p=[],_=[],g,w,b,k;if(i)for(k=0;k0){var j=(r&_s)!==0&&s===0?n:null;if(i){for(k=0;k{if(d!==void 0)for(b of d)b.nodes?.a?.apply()})}function gc(t,e,n,r,a,i,s,c){var o=(s&oo)!==0?(s&fo)===0?ee(n,!1,!1):An(n):null,u=(s&co)!==0?An(a):null;return{v:o,i:u,e:st(()=>(i(e,o??n,u??a,c),()=>{t.delete(r)}))}}function kr(t,e,n){if(t.nodes)for(var r=t.nodes.start,a=t.nodes.end,i=e&&(e.f&Ut)===0?e.nodes.start:n;r!==null;){var s=Pr(r);if(i.before(r),r===a)return;r=s}}function nn(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Ha(t,e,n=!1,r=!1,a=!1,i=!1){var s=t,c="";if(n)var o=t;Y(()=>{var u=le;if(c!==(c=e()??"")){if(n){u.nodes=null,o.innerHTML=c,c!==""&&In(sn(o),o.lastChild);return}if(u.nodes!==null&&(Vs(u.nodes.start,u.nodes.end),u.nodes=null),c!==""){var f=r?ks:a?ko:void 0,d=si(r?"svg":a?"math":"template",f);d.innerHTML=c;var p=r||a?d:d.content;if(In(sn(p),p.lastChild),r||a)for(;sn(p);)s.before(sn(p));else s.before(p)}}})}function vc(t,e,...n){var r=new hi(t);Kn(()=>{const a=e()??null;r.ensure(a,a&&(i=>a(i,...n)))},cn)}function il(t,e,n,r,a,i){var s=null,c=t,o=new hi(c,!1);Kn(()=>{const u=e()||null;var f=u==="svg"?ks:void 0;if(u===null){o.ensure(null,null);return}return o.ensure(u,d=>{if(u){if(s=si(u,f),In(s,s),r){var p=s.appendChild(Ct());r(s,p)}le.nodes.end=s,d.before(s)}}),()=>{}},cn),ha(()=>{})}function sl(t,e){var n;n=document.head.appendChild(Ct()),Kn(()=>e(n),gs|On)}function mc(t,e,n){Nr(()=>{var r=qe(()=>e(t,n?.())||{});if(n&&r?.update){var a=!1,i={};zr(()=>{var s=n();di(s),a&&ws(i,s)&&(i=s,r.update(s))}),a=!0}if(r?.destroy)return()=>r.destroy()})}function _c(t,e){var n=void 0,r;qs(()=>{n!==(n=e())&&(r&&(Ve(r),r=null),n&&(r=st(()=>{Nr(()=>n(t))})))})}function ll(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e=0;){var c=s+i;(s===0||Fi.includes(r[s-1]))&&(c===r.length||Fi.includes(r[c]))?r=(s===0?"":r.substring(0,s))+r.substring(c+1):s=c}}return r===""?null:r}function Bi(t,e=!1){var n=e?" !important;":";",r="";for(var a of Object.keys(t)){var i=t[a];i!=null&&i!==""&&(r+=" "+a+": "+i+n)}return r}function ka(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function yc(t,e){if(e){var n="",r,a;if(Array.isArray(e)?(r=e[0],a=e[1]):r=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,c=!1,o=[];r&&o.push(...Object.keys(r).map(ka)),a&&o.push(...Object.keys(a).map(ka));var u=0,f=-1;const w=t.length;for(var d=0;d{Ga(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ha(()=>{e.disconnect()})}function Hi(t){return"__value"in t?t.__value:t.value}const fr=Symbol("class"),dr=Symbol("style"),cl=Symbol("is custom element"),ul=Symbol("is html"),Tc=ti?"option":"OPTION",Sc=ti?"select":"SELECT",xc=ti?"progress":"PROGRESS";function Yt(t,e){var n=gi(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!==xc)||(t.value=e??"")}function Ec(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function J(t,e,n,r){var a=gi(t);a[e]!==(a[e]=n)&&(e==="loading"&&(t[Kl]=n),n==null?t.removeAttribute(e):typeof n!="string"&&fl(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Ac(t,e,n,r,a=!1,i=!1){var s=gi(t),c=s[cl],o=!s[ul],u=e||{},f=t.nodeName===Tc;for(var d in e)d in n||(n[d]=null);n.class?n.class=ol(n.class):n[fr]&&(n.class=null),n[dr]&&(n.style??=null);var p=fl(t);for(const x in n){let M=n[x];if(f&&x==="value"&&M==null){t.value=t.__value="",u[x]=M;continue}if(x==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";Ze(t,_,M,r,e?.[fr],n[fr]),u[x]=M,u[fr]=n[fr];continue}if(x==="style"){wt(t,M,e?.[dr],n[dr]),u[x]=M,u[dr]=n[dr];continue}var g=u[x];if(!(M===g&&!(M===void 0&&t.hasAttribute(x)))){u[x]=M;var w=x[0]+x[1];if(w!=="$$")if(w==="on"){const N={},z="$$"+x;let U=x.slice(2);var b=tc(U);if($o(U)&&(U=U.slice(0,-7),N.capture=!0),!b&&g){if(M!=null)continue;t.removeEventListener(U,u[z],N),u[z]=null}if(b)$(U,t,M),Pe([U]);else if(M!=null){let j=function(O){u[x].call(this,O)};var A=j;u[z]=al(U,t,j,N)}}else if(x==="style")J(t,x,M);else if(x==="autofocus")jo(t,!!M);else if(!c&&(x==="__value"||x==="value"&&M!=null))t.value=t.__value=M;else if(x==="selected"&&f)Ec(t,M);else{var k=x;o||(k=rc(k));var S=k==="defaultValue"||k==="defaultChecked";if(M==null&&!c&&!S)if(s[x]=null,k==="value"||k==="checked"){let N=t;const z=e===void 0;if(k==="value"){let U=N.defaultValue;N.removeAttribute(k),N.defaultValue=U,N.value=N.__value=z?U:null}else{let U=N.defaultChecked;N.removeAttribute(k),N.defaultChecked=U,N.checked=z?U:!1}}else t.removeAttribute(x);else S||p.includes(k)&&(c||typeof M!="string")?(t[k]=M,k in s&&(s[k]=Fe)):typeof M!="function"&&J(t,k,M)}}}return u}function pi(t,e,n=[],r=[],a=[],i,s=!1,c=!1){Ds(a,n,r,o=>{var u=void 0,f={},d=t.nodeName===Sc,p=!1;if(qs(()=>{var g=e(...o.map(l)),w=Ac(t,u,g,i,s,c);p&&d&&"value"in g&&Ga(t,g.value);for(let k of Object.getOwnPropertySymbols(f))g[k]||Ve(f[k]);for(let k of Object.getOwnPropertySymbols(g)){var b=g[k];k.description===yo&&(!u||b!==u[k])&&(f[k]&&Ve(f[k]),f[k]=st(()=>_c(t,()=>b))),w[k]=b}u=w}),d){var _=t;Nr(()=>{Ga(_,u.value,!0),wc(_)})}p=!0})}function gi(t){return t.__attributes??={[cl]:t.nodeName.includes("-"),[ul]:t.namespaceURI===bs}}var Gi=new Map;function fl(t){var e=t.getAttribute("is")||t.nodeName,n=Gi.get(e);if(n)return n;Gi.set(e,n=[]);for(var r,a=t,i=Element.prototype;i!==a;){r=hs(a);for(var s in r)r[s].set&&n.push(s);a=$a(a)}return n}function Wi(t,e){return t===e||t?.[Vt]===e}function Jn(t={},e,n,r){var a=we.r,i=le;return Nr(()=>{var s,c;return zr(()=>{s=c,c=[],qe(()=>{t!==n(...c)&&(e(t,...c),s&&Wi(n(...s),t)&&e(null,...s))})}),()=>{let o=i;for(;o!==a&&o.parent!==null&&o.parent.f&Da;)o=o.parent;const u=()=>{c&&Wi(n(...c),t)&&e(null,...c)},f=o.teardown;o.teardown=()=>{u(),f?.()}}}),t}function dl(t=!1){const e=we,n=e.l.u;if(!n)return;let r=()=>di(e.s);if(t){let a=0,i={};const s=Mr(()=>{let c=!1;const o=e.s;for(const u in o)o[u]!==i[u]&&(i[u]=o[u],c=!0);return c&&a++,a});r=()=>l(s)}n.b.length&&Na(()=>{qi(e,r),Ia(n.b)}),fn(()=>{const a=qe(()=>n.m.map(Yl));return()=>{for(const i of a)typeof i=="function"&&i()}}),n.a.length&&fn(()=>{qi(e,r),Ia(n.a)})}function qi(t,e){if(t.l.s)for(const n of t.l.s)l(n);e()}const Rc={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Ic(t,e,n){return new Proxy({props:t,exclude:e},Rc)}function Te(t,e,n,r){var a=!Xn||(n&po)!==0,i=(n&vo)!==0,s=(n&mo)!==0,c=r,o=!0,u=()=>(o&&(o=!1,c=s?qe(r):r),c);let f;if(i){var d=Vt in t||Xl in t;f=qn(t,e)?.set??(d&&e in t?A=>t[e]=A:void 0)}var p,_=!1;i?[p,_]=Io(()=>t[e]):p=t[e],p===void 0&&r!==void 0&&(p=u(),f&&(a&&ro(),f(p)));var g;if(a?g=()=>{var A=t[e];return A===void 0?u():(o=!0,A)}:g=()=>{var A=t[e];return A!==void 0&&(c=void 0),A===void 0?c:A},a&&(n&go)===0)return g;if(f){var w=t.$$legacy;return(function(A,x){return arguments.length>0?((!a||!x||w||_)&&f(x?g():A),A):g()})}var b=!1,k=((n&ho)!==0?Mr:dt)(()=>(b=!1,g()));i&&l(k);var S=le;return(function(A,x){if(arguments.length>0){const M=x?l(k):a&&i?an(A):A;return m(k,M),b=!0,c!==void 0&&(c=M),A}return Xt&&b||(S.f&ht)!==0?k.v:l(k)})}function vi(t){we===null&&ms(),Xn&&we.l!==null?Cc(we).m.push(t):fn(()=>{const e=qe(t);if(typeof e=="function")return e})}function mi(t){we===null&&ms(),vi(()=>()=>qe(t))}function Cc(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const Dc="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Dc);Eo();class hl extends Error{constructor(e,n){super(n),this.status=e}status}async function Ge(t,e={}){const n=new Headers(e.headers);n.set("Accept","application/json"),e.body&&!(e.body instanceof FormData)&&n.set("Content-Type","application/json");const r=await fetch(t,{...e,headers:n});if(!r.ok)throw new hl(r.status,await r.text());return r.json()}async function Oc(t){return t.type.startsWith("image/")?Lc(t):t.type.startsWith("video/")?Mc(t):{width:0,height:0,durationMS:0}}function Lc(t){return new Promise(e=>{const n=URL.createObjectURL(t),r=new Image;r.onload=()=>{const a={width:r.naturalWidth,height:r.naturalHeight,durationMS:0};URL.revokeObjectURL(n),e(a)},r.onerror=()=>{URL.revokeObjectURL(n),e({width:0,height:0,durationMS:0})},r.src=n})}function Mc(t){return new Promise(e=>{const n=URL.createObjectURL(t),r=document.createElement("video");r.preload="metadata",r.muted=!0;const a=()=>{URL.revokeObjectURL(n),r.src=""};r.onloadedmetadata=()=>{const i=Number.isFinite(r.duration)&&r.duration>0?Math.round(r.duration*1e3):0,s={width:r.videoWidth,height:r.videoHeight,durationMS:i};a(),e(s)},r.onerror=()=>{a(),e({width:0,height:0,durationMS:0})},r.src=n})}const Pc=[{title:"Ship it",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYjJ1bm1meHE4N2x3bnN0djJkMWtjNGc5bXYzZDFiOHBsbG16M3F0ZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/l0HlHFRbmaZtBRhXG/giphy.gif",tags:["ship","launch","done"]},{title:"Approved",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExazBpbzJ6ODZ3bXQ3OHBvNGJidWZoajc0cHV6YnVub3MzZ3c1a2Z2dSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/111ebonMs90YLu/giphy.gif",tags:["yes","approved","nice"]},{title:"Deploy dance",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY3NkaTVmZW9ydWNnZnl0ZWQ5aHQyeGNrd2k3NG4wZWNqYzNmd3k1ZCZlcD12MV9naWZzX3NlYXJjaCZjdD1n/GeimqsH0TLDt4tScGw/giphy.gif",tags:["deploy","dance","celebrate"]},{title:"Looking",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYWZ3emE0dm5mN2h0bGVsY2w0OXBodGd2cGJlNDRiZXo1YWNtdWRmZyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/26n6WywJyh39n1pBu/giphy.gif",tags:["search","looking","debug"]},{title:"Typing faster",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOWFlbnJnbnIzbHYxcDIzdXZ3NGF3N2FocHNvMmR5enU3bHpycHBlZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/13HgwGsXF0aiGY/giphy.gif",tags:["typing","code","work"]},{title:"Tiny victory",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExdjJ2b2tqNmF4dG16NjE0eXhuc3h5bTlvamgwNTR0Zmd6ZjhtM2JuaSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/3o7abKhOpu0NwenH3O/giphy.gif",tags:["win","victory","celebrate"]}];function Nc(t){const e=t.trim();if(!e)return"?";const n=e.split(/\s+/);return n.length>=2?(n[0][0]+n[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function Kt(t){if(!t)return"?";const e=t.trim();return e?e[0].toUpperCase():"?"}function dn(t){return t?`@${t}`:""}function Qt(t){let e=0;for(let n=0;n>>0;return e%360}function zc(t,e){return t.members.find(n=>n.id!==e)||t.members[0]}function Ir(t,e){const n=t.members.filter(a=>a.id!==e);return(n.length>0?n:t.members).map(a=>a.display_name).join(", ")}function Uc(t,e,n){const r=new Map;for(const a of e)for(const i of a.members)i.id&&i.id!==n&&r.set(i.id,i);for(const a of[...t].reverse()){const i=a.author;i?.id&&i.id!==n&&r.set(i.id,i)}return[...r.values()].slice(0,12)}function Fc(t,e){return t.find(n=>n.members.some(r=>r.id===e))}const Bc=new Set(["button","checkbox","combobox","link","listbox","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","option","radio","radiogroup","slider","spinbutton","switch","tab","tablist","textbox","tree","treeitem"]),Hc=new Set(["INPUT","TEXTAREA","SELECT","BUTTON","A","DETAILS","SUMMARY","VIDEO","AUDIO"]);function Gc(t){if(!t)return!1;if(t.isContentEditable)return!0;if(t instanceof HTMLInputElement){const e=(t.type||"text").toLowerCase();return e!=="checkbox"&&e!=="radio"&&e!=="button"&&e!=="submit"&&e!=="reset"&&e!=="file"}return t instanceof HTMLTextAreaElement}function Wc(t){if(!t||qc(t))return!1;if(Hc.has(t.tagName))return!0;const e=t.getAttribute("role");if(e&&Bc.has(e))return!0;const n=t.getAttribute("tabindex");return!!(n!==null&&n!=="-1"&&t.hasAttribute("aria-keyshortcuts"))}function qc(t){if(!t.closest(".messages, .thread"))return!1;if(t instanceof HTMLButtonElement||t instanceof HTMLAnchorElement)return!0;const e=t.getAttribute("role");return e==="button"||e==="link"}function jc(){const t=typeof window<"u"?window.getSelection():null;if(!t||t.isCollapsed||t.rangeCount===0)return!1;const e=t.getRangeAt(0).commonAncestorContainer;return e?!!(e.nodeType===Node.ELEMENT_NODE?e:e.parentElement)?.closest(".messages, .thread, .markdown"):!1}function Vc(t,e){if(e.authRequired||e.isModalOpen()||t.defaultPrevented||t.isComposing||t.keyCode===229||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||jc())return!1;const n=document.activeElement;return!(n===e.messageInput||n===e.replyInput||Gc(n)||Wc(n))}function Zc(t,e){if(!Vc(t,e))return;const n=e.target();if(!n||n.disabled||n.readOnly)return;t.key===" "&&t.preventDefault(),n.focus({preventScroll:!0});const r=n.value.length;if(n.setSelectionRange(r,r),t.key===" "){const a=n.selectionStart??r,i=n.selectionEnd??r;n.setRangeText(" ",a,i,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))}}const ji=t=>`clickclack:${t}:cursor`;function Yc(t){const{workspaceID:e,onEvent:n}=t,r=t.reconnectDelayMs??1200;let a=null,i,s=!1;const c=an({connected:!1});function o(){if(s)return;const u=new URL("/api/realtime/ws",window.location.href);u.protocol=window.location.protocol==="https:"?"wss:":"ws:",u.searchParams.set("workspace_id",e);const f=localStorage.getItem(ji(e))||"";f&&u.searchParams.set("after_cursor",f);const d=new WebSocket(u);a=d,d.addEventListener("open",()=>{a===d&&(c.connected=!0)}),d.addEventListener("message",p=>{const _=JSON.parse(String(p.data));_.cursor&&localStorage.setItem(ji(e),_.cursor),n(_)}),d.addEventListener("close",()=>{a!==d||s||(a=null,c.connected=!1,i=window.setTimeout(o,r))})}return o(),{get connected(){return c.connected},close(){s=!0,c.connected=!1,i&&window.clearTimeout(i),a?.close(),a=null}}}function Xc(t,e){const n=()=>{const i=t.style.height;t.style.height="auto";const s=`${t.scrollHeight}px`;i!==s?t.style.height=s:t.style.height=i},r=()=>n(),a=()=>n();return requestAnimationFrame(n),t.addEventListener("input",r),window.addEventListener("resize",a),{update(){requestAnimationFrame(n)},destroy(){t.removeEventListener("input",r),window.removeEventListener("resize",a)}}}function oa(t){return`/api/uploads/${encodeURIComponent(t.id)}`}function Kc(t){return t.content_type.startsWith("image/")}function Qc(t){return t<1024?`${t} B`:t<1024*1024?`${Math.round(t/1024)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}var Jc=W('
');function $c(t,e){xe(e,!0);var n=Jc(),r=v(n),a=y(r,2),i=y(a,2),s=v(i);s.textContent="<>";var c=y(i,2),o=v(c);o.textContent="{}";var u=y(c,2),f=y(u,2);let d;Y(()=>d=Ze(f,1,"",null,d,{active:e.showGifPicker})),$("click",r,()=>e.onWrap("**")),$("click",a,()=>e.onWrap("_")),$("click",i,()=>e.onWrap("`")),$("click",c,()=>e.onWrap("```","\n```")),$("click",u,()=>e.onAppend("[label](https://)")),$("click",f,function(...p){e.onToggleGif?.apply(this,p)}),C(t,n),Ee()}Pe(["click"]);var eu=W(''),tu=W('
GIFs
');function nu(t,e){xe(e,!0);var n=tu(),r=v(n),a=y(v(r),2),i=y(r,2);pt(i,21,()=>e.gifs,s=>s.url,(s,c)=>{var o=eu(),u=v(o),f=y(u,2),d=v(f);Y(()=>{J(u,"src",l(c).url),J(u,"alt",l(c).title),K(d,l(c).title)}),$("click",o,()=>e.onPick(l(c).url,l(c).title)),C(s,o)}),Y(()=>Yt(a,e.query)),$("input",a,s=>e.onQuery(s.currentTarget.value)),C(t,n),Ee()}Pe(["input","click"]);function Wa(t,e=120){if(!t)return"";const n=t.replace(/\s+/g," ").trim();return n.length>e?n.slice(0,e-1)+"...":n}function Vi(t){return t.quoted_author?.display_name||"Unknown"}function ru(t,e){return e===t.id?"Open":"Thread"}function au(t){const e=new Date(t),n=new Date,r=new Date;r.setDate(n.getDate()-1);const a=(i,s)=>i.getFullYear()===s.getFullYear()&&i.getMonth()===s.getMonth()&&i.getDate()===s.getDate();return a(e,n)?"Today":a(e,r)?"Yesterday":new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(e)}function iu(t){const e=[];let n="",r="",a=0;for(const i of t){const s=new Date(i.created_at),c=s.toDateString(),o=i.author?.id||i.author_id||"local",u=c!==n,f=o!==r,d=s.getTime()-a>300*1e3;u||f||d||e.length===0?e.push({key:i.id,dayLabel:u?au(i.created_at):null,messages:[i],authorName:i.author?.display_name||"Local User",authorHandle:i.author?.handle||"",authorAvatarURL:i.author?.avatar_url||"",authorID:o,timestamp:i.created_at}):e[e.length-1].messages.push(i),n=c,r=o,a=s.getTime()}return e}var su=W('
Replying to
');function lu(t,e){xe(e,!0);var n=su(),r=y(v(n),2),a=v(r),i=y(v(a)),s=v(i),c=y(a,2),o=v(c),u=y(r,2);Y(f=>{K(s,e.target.author?.display_name||"Local User"),K(o,f)},[()=>Wa(e.target.body)]),$("click",u,function(...f){e.onClear?.apply(this,f)}),C(t,n),Ee()}Pe(["click"]);var ou=W(''),cu=W('
'),uu=W(''),fu=W('
');function pl(t,e){xe(e,!0);let n=Te(e,"formClass",3,"composer"),r=Te(e,"pendingUpload",3,null),a=Te(e,"replyTarget",3,null),i=Te(e,"showUpload",3,!1),s=Te(e,"showToolbar",3,!1),c=Te(e,"showGifPicker",3,!1),o=Te(e,"gifQuery",3,""),u=Te(e,"filteredGifs",19,()=>[]),f=Te(e,"onUploadFile",3,()=>{}),d=Te(e,"onRemoveUpload",3,()=>{}),p=Te(e,"onClearReply",3,()=>{}),_=Te(e,"onApplyMarkdownWrap",3,()=>{}),g=Te(e,"onAppendToComposer",3,()=>{}),w=Te(e,"onToggleGif",3,()=>{}),b=Te(e,"onGifQuery",3,()=>{}),k=Te(e,"onPickGif",3,()=>{}),S=Be(null);fn(()=>(e.onInputRef(l(S)),()=>e.onInputRef(null)));var A=fu(),x=v(A);{var M=R=>{nu(R,{get gifs(){return u()},get query(){return o()},get onQuery(){return b()},get onPick(){return k()}})};ne(x,R=>{c()&&R(M)})}var N=y(x,2),z=v(N);{var U=R=>{var H=cu(),Q=y(v(H),2);{var q=te=>{var oe=ou();Y(_e=>{J(oe,"src",_e),J(oe,"alt",r().filename)},[()=>oa(r())]),C(te,oe)},re=Se(()=>Kc(r()));ne(Q,te=>{l(re)&&te(q)})}var ae=y(Q,2),ve=v(ae),se=y(ae,2);Y(te=>K(ve,`${r().filename??""} · ${te??""}`),[()=>Qc(r().byte_size)]),$("click",se,function(...te){d()?.apply(this,te)}),C(R,H)};ne(z,R=>{r()&&R(U)})}var j=y(z,2);{var O=R=>{lu(R,{get target(){return a()},get onClear(){return p()}})};ne(j,R=>{a()&&R(O)})}var L=y(j,2),I=v(L);{var D=R=>{var H=uu(),Q=v(H);$("change",Q,function(...q){f()?.apply(this,q)}),C(R,H)};ne(I,R=>{i()&&R(D)})}var B=y(I,2);Jn(B,R=>m(S,R),()=>l(S)),mc(B,(R,H)=>Xc?.(R),()=>e.value);var P=y(B,2),F=y(L,2);{var Z=R=>{$c(R,{get showGifPicker(){return c()},get onWrap(){return _()},get onAppend(){return g()},get onToggleGif(){return w()}})};ne(F,R=>{s()&&R(Z)})}Y(R=>{Ze(A,1,ol(n())),Yt(B,e.value),J(B,"placeholder",e.placeholder),J(B,"aria-label",e.ariaLabel),J(P,"aria-label",e.submitLabel),P.disabled=R},[()=>!e.value.trim()]),Bt("submit",A,R=>{R.preventDefault(),e.onSubmit()}),$("input",B,R=>e.onValue(R.currentTarget.value)),Bt("focus",B,function(...R){e.onFocus?.apply(this,R)}),$("keydown",B,function(...R){e.onKeydown?.apply(this,R)}),C(t,A),Ee()}Pe(["click","change","input","keydown"]);var du=W('');function hu(t,e){var n=du(),r=v(n),a=y(r,2),i=v(a),s=v(i),c=v(s),o=y(s,2),u=v(o),f=y(u,2),d=y(i,2),p=v(d);Y(()=>{K(c,e.title),J(u,"href",e.url),J(p,"src",e.url),J(p,"alt",e.title)}),$("click",r,function(..._){e.onClose?.apply(this,_)}),$("click",f,function(..._){e.onClose?.apply(this,_)}),C(t,n)}Pe(["click"]);const _i=t=>Object.keys(t).reduce((e,n)=>{const r=t[n];return r==null?e:e+`${n}:${r};`},""),pu=(t,e)=>"_"+e,Cr=null,{min:wn,max:xt,abs:Zi,floor:gu}=Math,gl=(t,e,n)=>wn(n,xt(e,t)),vl=t=>[...t].sort((e,n)=>e-n),vu=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)},qa=()=>{let t;return[new Promise(e=>{t=e}),t]},ml=t=>{let e;return()=>(t&&(e=t(),t=void 0),e)},xr=(t,e,n)=>{const r=n?"unshift":"push";for(let a=0;a{const n=t.t[e];return n===-1?t.o:n},mu=(t,e,n)=>{const r=t.t[e]===-1;return t.t[e]=n,t.i=wn(e,t.i),r},ia=(t,e)=>{if(!t.l)return 0;if(t.i>=e)return t.u[e];t.i<0&&(t.u[0]=0,t.i=0);let n=t.i,r=t.u[n];for(;n{let a=n;for(;n<=r;){const i=gu((n+r)/2);ia(t,i)<=e?(a=i,n=i+1):r=i-1}return gl(a,0,t.l-1)},Yi=(t,e,n)=>{const r=e-t.l;return t.i=n?-1:wn(e-1,t.i),t.l=e,r>0?(xr(t.u,r),xr(t.t,r,n),t.o*r):(t.u.splice(r),(n?t.t.splice(0,-r):t.t.splice(r)).reduce((a,i)=>a-(i===-1?t.o:i),0))},_u=t=>t.documentElement,bu=t=>t.ownerDocument,ku=t=>t.defaultView,bl=ml(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>0),yu=ml(()=>"scrollBehavior"in _u(document).style),wu=5,Tu=6,Su=1,xu=4,Eu=8,Au=t=>xt(t.$getTotalSize(),t.$getViewportSize()),Ru=(t,e=40,n=0,r,a=!1)=>{let i=!!n,s=1,c=0,o=0,u=0,f=0,d=0,p=0,_=0,g=0,w=Cr,b=[0,i?xt(n-1,0):-1],k=0,S=!1;const A=((D,B,P)=>({o:B,t:P?xr(P.slice(0,wn(D,P.length)),xt(0,D-P.length)):xr([],D),l:D,i:-1,u:xr([],D+1)}))(t,r?r[1]:e,r&&r[0]),x=new Set,M=()=>u-o,N=()=>M()+d+f,z=(D,B)=>((P,F,Z,R)=>{if(R=wn(R,P.l-1),ia(P,R)<=F){const H=Fn(P,Z,R);return[Fn(P,F,R,H),H]}{const H=Fn(P,F,void 0,R);return[H,Fn(P,Z,H)]}})(A,D,B,b[0]),U=()=>ia(A,A.l),j=(D,B)=>{const P=ia(A,D)-d;return B?U()-P-O(D):P},O=D=>_l(A,D),L=(D,B=-1)=>A.t[D]===B,I=D=>{D&&(bl()&&_!==0||w&&g===1?d+=D:f+=D)};return{$dispose:()=>{x.clear()},$getStateVersion:()=>s,$getCacheSnapshot:()=>(D=>[D.t.slice(),D.o])(A),$getRange:(D=200)=>{if(!S||i)return b;let B,P;if(p)[B,P]=b;else{let F=xt(0,N()),Z=F+c;a||(D=xt(0,D),_!==1&&(F-=D),_!==2&&(Z+=D)),[B,P]=b=z(xt(0,F),xt(0,Z)),w&&(B=wn(B,w[0]),P=xt(P,w[1]))}return[xt(B,0),wn(P,A.l-1)]},$findItemIndex:D=>Fn(A,D-o),$isUnmeasuredItem:L,$getItemOffset:j,$getItemSize:O,$getItemsLength:()=>A.l,$getScrollOffset:()=>u,$isScrolling:()=>_!==0,$getViewportSize:()=>c,$getStartSpacerSize:()=>o,$getTotalSize:U,$:()=>(p=f,f=0,[p,g===2]),$subscribe:(D,B)=>{const P=[D,B];return x.add(P),()=>{x.delete(P)}},$update:(D,B)=>{let P,F,Z=0;switch(D){case 1:{if(B===u&&g===0)break;const R=p;p=0;const H=B-u,Q=Zi(H);R&&Q=-c&&q<=U()&&(Z+=1,F=Q>c);break}case 2:Z=8,_!==0&&(P=!0,Z+=1),_=0,g=0,w=Cr;break;case 3:{const R=B.filter(([H,Q])=>!L(H,Q));if(!R.length)break;I(R.reduce((H,[Q,q])=>{let re;if(g===2)re=!0;else if(w&&g===1)re=Qc&&(I(((H,Q)=>{let q=0;const re=[];H.t.forEach((_e,gt)=>{_e!==-1&&(re.push(_e),gt{Z&R&&H(F)}))}}},bi=setTimeout,wa=(t,e)=>e?-t:t,Iu=(t,e,n,r,a,i)=>{const s=Date.now;let c=0,o=!1,u=!1,f=!1,d=!1;const p=(()=>{let k;const S=()=>{k!=Cr&&clearTimeout(k)},A=()=>{S(),k=bi(()=>{k=Cr,(()=>{if(o||u)return o=!1,void p();f=!1,t.$update(2)})()},150)};return A.p=S,A})(),_=()=>{c=s(),f&&(d=!0),t.$update(1,r()),p()},g=k=>{if(o||!t.$isScrolling()||k.ctrlKey)return;const S=s()-c;150>S&&50{u=!0,f=d=!1},b=()=>{u=!1,bl()&&(f=!0)};return e.addEventListener("scroll",_),e.addEventListener("wheel",g,{passive:!0}),e.addEventListener("touchstart",w,{passive:!0}),e.addEventListener("touchend",b,{passive:!0}),{h:()=>{e.removeEventListener("scroll",_),e.removeEventListener("wheel",g),e.removeEventListener("touchstart",w),e.removeEventListener("touchend",b),p.p()},m:()=>{const[k,S]=t.$();k&&(a(k,S,d),d=!1,S&&t.$getViewportSize()>t.$getTotalSize()&&t.$update(1,r()))}}},Cu=(t,e,n)=>{let r;return[async(a,i)=>{if(!await e())return;r&&r();const s=()=>{const[c,o]=qa();return r=()=>{o(!1)},t.$getViewportSize()&&bi(r,150),[c,t.$subscribe(2,()=>{o(!0)})]};if(i&&yu())t.$update(8,a()),vu(async()=>{for(;;){let c=!0;for(let[f,d]=t.$getRange();f<=d;f++)if(t.$isUnmeasuredItem(f)){c=!1;break}if(c)break;const[o,u]=s();try{if(!await o)return}finally{u()}}t.$update(7),n(a(),i)});else for(;;){const[c,o]=s();try{if(t.$update(7),n(a()),!await c)return}finally{o()}}},()=>{r&&r()}]},Du=(t,e)=>{let n,r,a=qa(),i=!1;const s=e?"scrollLeft":"scrollTop",c=e?"overflowX":"overflowY",[o,u]=Cu(t,()=>a[0],(f,d)=>{f=wa(f,i),d?n.scrollTo({[e?"left":"top"]:f,behavior:"smooth"}):n[s]=f});return{$observe(f,d){n=d,e&&(i=getComputedStyle(d).direction==="rtl"),r=Iu(t,d,e,()=>wa(d[s],i),(p,_,g)=>{if(g){const w=d.style,b=w[c];w[c]="hidden",bi(()=>{w[c]=b})}d[s]=wa(t.$getScrollOffset()+p,i),_&&u()}),a[1](!0)},$dispose(){r&&r.h(),a[1](!1),a=qa()},$isNegative:()=>i,$scrollTo(f){o(()=>f)},$scrollBy(f){f+=t.$getScrollOffset(),o(()=>f)},$scrollToIndex(f,{align:d,smooth:p,offset:_=0}={}){if(f=gl(f,0,t.$getItemsLength()-1),d==="nearest"){const g=t.$getItemOffset(f),w=t.$getScrollOffset();if(gw+t.$getViewportSize()))return;d="end"}}o(()=>_+t.$getStartSpacerSize()+t.$getItemOffset(f)+(d==="end"?t.$getItemSize(f)-t.$getViewportSize():d==="center"?(t.$getItemSize(f)-t.$getViewportSize())/2:0),p)},$fixScrollJump:()=>{r&&r.m()}}},Ou=t=>{let e;return{v(n){(e||(e=new(ku(bu(n))).ResizeObserver(t))).observe(n)},S(n){e.unobserve(n)},h(){e&&e.disconnect()}}},Lu=(t,e)=>{let n;const r=e?"width":"height",a=new WeakMap,i=Ou(s=>{const c=[];for(const{target:o,contentRect:u}of s)if(o.offsetParent)if(o===n)t.$update(4,u[r]);else{const f=a.get(o);f!=Cr&&c.push([f,u[r]])}c.length&&t.$update(3,c)});return{$observeRoot(s){i.v(n=s)},$observeItem:(s,c)=>(a.set(s,c),i.v(s),()=>{a.delete(s),i.S(s)}),$dispose:i.h}};function Mu(t,e){xe(e,!0);let n=Te(e,"as",3,"div"),r,a,i;fn(()=>{i!==e.index&&(a&&a(),a=e.resizer(r,i=e.index))}),mi(()=>{a&&a()});let s=Se(()=>{const u={contain:"layout style",position:"absolute",[e.horizontal?"height":"width"]:"100%",[e.horizontal?"top":"left"]:"0px",[e.horizontal?"left":"top"]:e.offset+"px",visibility:e.hide?"hidden":void 0};return e.horizontal&&(u.display="inline-flex"),_i(u)});var c=Ht(),o=lt(c);il(o,n,!1,(u,f)=>{Jn(u,_=>r=_,()=>r),pi(u,()=>({style:l(s)}));var d=Ht(),p=lt(d);vc(p,()=>e.children,()=>e.item,()=>e.index),C(f,d)}),C(t,c),Ee()}function Pu(t,e){xe(e,!0);let n=Te(e,"getKey",3,pu),r=Te(e,"as",3,"div"),a=Te(e,"shift",3,!1),i=Te(e,"horizontal",3,!1),s=Te(e,"startMargin",3,0);const c=Ru(e.data.length,e.itemSize,e.ssrCount,e.cache,!e.itemSize),o=Lu(c,i()),u=Du(c,i());c.$subscribe(Su,()=>{m(d,c.$getStateVersion(),!0)}),c.$subscribe(xu,()=>{e.onscroll&&e.onscroll(c.$getScrollOffset())}),c.$subscribe(Eu,()=>{e.onscrollend&&e.onscrollend()});let f=Be(void 0),d=Be(an(c.$getStateVersion())),p=Se(()=>l(d)&&c.$getRange(e.bufferSize)),_=Se(()=>l(d)&&c.$isScrolling()),g=Se(()=>l(d)&&c.$getTotalSize()),w=Se(()=>l(d)&&u.$isNegative()),b=Se(()=>{const F=e.data.length,[Z,R]=l(p),H=[];if(e.keepMounted){const Q=new Set(e.keepMounted);for(let q=Z;q<=R;q++)Q.add(q);for(const q of vl([...Q]))q{const F=l(f),Z=R=>{o.$observeRoot(R),u.$observe(F,R)};Rr().then(()=>{e.scrollRef?Z(e.scrollRef):Z(F.parentElement)})}),mi(()=>{c.$dispose(),o.$dispose(),u.$dispose()}),Na(()=>{e.data.length!==c.$getItemsLength()&&c.$update(wu,[e.data.length,a()])}),Na(()=>{s()!==c.$getStartSpacerSize()&&c.$update(Tu,s())});let k;fn(()=>{k!==l(d)&&(k=l(d),u.$fixScrollJump())});const S=c.$getCacheSnapshot,A=c.$getScrollOffset,x=()=>Au(c),M=c.$getViewportSize,N=c.$findItemIndex,z=c.$getItemOffset,U=c.$getItemSize,j=u.$scrollToIndex,O=u.$scrollTo,L=u.$scrollBy;let I=Se(()=>_i({contain:"size style","overflow-anchor":"none",flex:"none",position:"relative",width:i()?l(g)+"px":"100%",height:i()?"100%":l(g)+"px","pointer-events":l(_)?"none":void 0}));var D={getCache:S,getScrollOffset:A,getScrollSize:x,getViewportSize:M,findItemIndex:N,getItemOffset:z,getItemSize:U,scrollToIndex:j,scrollTo:O,scrollBy:L},B=Ht(),P=lt(B);return il(P,r,!1,(F,Z)=>{Jn(F,Q=>m(f,Q,!0),()=>l(f)),pi(F,()=>({style:l(I)}));var R=Ht(),H=lt(R);pt(H,17,()=>l(b),Q=>n()(e.data[Q],Q),(Q,q)=>{const re=Se(()=>e.data[l(q)]);{let ae=Se(()=>l(d)&&c.$getItemOffset(l(q),l(w))),ve=Se(()=>l(d)&&c.$isUnmeasuredItem(l(q)));Mu(Q,{get children(){return e.children},get item(){return l(re)},get index(){return l(q)},get as(){return e.item},get offset(){return l(ae)},get hide(){return l(ve)},get horizontal(){return i()},get resizer(){return o.$observeItem}})}}),C(Z,R)}),C(t,B),Ee(D)}var Nu=W("
");function zu(t,e){xe(e,!0);let n=Ic(e,["$$slots","$$events","$$legacy","data","getKey","bufferSize","itemSize","ssrCount","shift","horizontal","keepMounted","cache","children","onscroll","onscrollend"]),r=Be(void 0);const a=()=>l(r).getCache(),i=()=>l(r).getScrollOffset(),s=()=>l(r).getScrollSize(),c=()=>l(r).getViewportSize(),o=(...S)=>l(r).findItemIndex(...S),u=(...S)=>l(r).getItemOffset(...S),f=(...S)=>l(r).getItemSize(...S),d=(...S)=>l(r).scrollToIndex(...S),p=(...S)=>l(r).scrollTo(...S),_=(...S)=>l(r).scrollBy(...S),g=_i({display:e.horizontal?"inline-block":"block",[e.horizontal?"overflow-x":"overflow-y"]:"auto",contain:"strict",width:"100%",height:"100%"});var w={getCache:a,getScrollOffset:i,getScrollSize:s,getViewportSize:c,findItemIndex:o,getItemOffset:u,getItemSize:f,scrollToIndex:d,scrollTo:p,scrollBy:_},b=Nu();pi(b,()=>({...n,style:`${g??""} ${(e.style||"")??""}`}));var k=v(b);return Jn(Pu(k,{get data(){return e.data},get children(){return e.children},get getKey(){return e.getKey},get bufferSize(){return e.bufferSize},get itemSize(){return e.itemSize},get ssrCount(){return e.ssrCount},get shift(){return e.shift},get horizontal(){return e.horizontal},get keepMounted(){return e.keepMounted},get cache(){return e.cache},get onscroll(){return e.onscroll},get onscrollend(){return e.onscrollend}}),S=>m(r,S,!0),()=>l(r)),C(t,b),Ee(w)}const{entries:kl,setPrototypeOf:Xi,isFrozen:Uu,getPrototypeOf:Fu,getOwnPropertyDescriptor:Bu}=Object;let{freeze:tt,seal:Tt,create:Hn}=Object,{apply:ja,construct:Va}=typeof Reflect<"u"&&Reflect;tt||(tt=function(e){return e});Tt||(Tt=function(e){return e});ja||(ja=function(e,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i1?n-1:0),a=1;a"u"?null:ze(BigInt.prototype.toString),es=typeof Symbol>"u"?null:ze(Symbol.prototype.toString),Ce=ze(Object.prototype.hasOwnProperty),gr=ze(Object.prototype.toString),We=ze(RegExp.prototype.test),ea=Vu(TypeError);function ze(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:yr;if(Xi&&Xi(t,null),!Qe(e))return t;let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const i=n(a);i!==a&&(Uu(e)||(e[r]=i),a=i)}t[a]=!0}return t}function Zu(t){for(let e=0;e/gm),ef=Tt(/\$\{[\w\W]*/gm),tf=Tt(/^data-[\-\w.\u00B7-\uFFFF]+$/),nf=Tt(/^aria-[\-\w]+$/),yl=Tt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rf=Tt(/^(?:\w+script|data):/i),af=Tt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wl=Tt(/^html$/i),sf=Tt(/^[a-z][.\w]*(-[.\w]+)+$/i);var is=Object.freeze({__proto__:null,ARIA_ATTR:nf,ATTR_WHITESPACE:af,CUSTOM_ELEMENT:sf,DATA_ATTR:tf,DOCTYPE_NAME:wl,ERB_EXPR:$u,IS_ALLOWED_URI:yl,IS_SCRIPT_OR_DATA:rf,MUSTACHE_EXPR:Ju,TMPLIT_EXPR:ef});const vr={element:1,text:3,progressingInstruction:7,comment:8,document:9},lf=function(){return typeof window>"u"?null:window},of=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ss=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Tl(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lf();const e=G=>Tl(G);if(e.version="3.4.2",e.removed=[],!t||!t.document||t.document.nodeType!==vr.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,a=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:o,NodeFilter:u,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:_}=t,g=o.prototype,w=Gn(g,"cloneNode"),b=Gn(g,"remove"),k=Gn(g,"nextSibling"),S=Gn(g,"childNodes"),A=Gn(g,"parentNode");if(typeof s=="function"){const G=n.createElement("template");G.content&&G.content.ownerDocument&&(n=G.content.ownerDocument)}let x,M="";const{implementation:N,createNodeIterator:z,createDocumentFragment:U,getElementsByTagName:j}=n,{importNode:O}=r;let L=ss();e.isSupported=typeof kl=="function"&&typeof A=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:I,ERB_EXPR:D,TMPLIT_EXPR:B,DATA_ATTR:P,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:Z,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:H}=is;let{IS_ALLOWED_URI:Q}=is,q=null;const re=ie({},[...ts,...Sa,...xa,...Ea,...ns]);let ae=null;const ve=ie({},[...rs,...Aa,...as,...ta]);let se=Object.seal(Hn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,oe=null;const _e=Object.seal(Hn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let gt=!0,Mt=!0,Pt=!1,vt=!0,de=!1,Ae=!0,me=!1,Ie=!1,ke=!1,ot=!1,Gt=!1,Mn=!1,Fr=!0,Br=!1;const Hr="user-content-";let Jt=!0,hn=!1,$t={},Oe=null;const en=ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gr=null;const Pn=ie({},["audio","video","img","source","image","track"]);let er=null;const tr=ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let Wt=ct,nr=!1,Xe=null;const Wr=ie({},[pn,gn,ct],Ta);let rr=ie({},["mi","mo","mn","ms","mtext"]),ar=ie({},["annotation-xml"]);const va=ie({},["title","style","font","a","script"]);let vn=null;const ir=["application/xhtml+xml","text/html"],ma="text/html";let Le=null,tn=null;const sr=n.createElement("form"),qr=function(h){return h instanceof RegExp||h instanceof Function},Nn=function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(tn&&tn===h)return;(!h||typeof h!="object")&&(h={}),h=at(h),vn=ir.indexOf(h.PARSER_MEDIA_TYPE)===-1?ma:h.PARSER_MEDIA_TYPE,Le=vn==="application/xhtml+xml"?Ta:yr,q=Ce(h,"ALLOWED_TAGS")&&Qe(h.ALLOWED_TAGS)?ie({},h.ALLOWED_TAGS,Le):re,ae=Ce(h,"ALLOWED_ATTR")&&Qe(h.ALLOWED_ATTR)?ie({},h.ALLOWED_ATTR,Le):ve,Xe=Ce(h,"ALLOWED_NAMESPACES")&&Qe(h.ALLOWED_NAMESPACES)?ie({},h.ALLOWED_NAMESPACES,Ta):Wr,er=Ce(h,"ADD_URI_SAFE_ATTR")&&Qe(h.ADD_URI_SAFE_ATTR)?ie(at(tr),h.ADD_URI_SAFE_ATTR,Le):tr,Gr=Ce(h,"ADD_DATA_URI_TAGS")&&Qe(h.ADD_DATA_URI_TAGS)?ie(at(Pn),h.ADD_DATA_URI_TAGS,Le):Pn,Oe=Ce(h,"FORBID_CONTENTS")&&Qe(h.FORBID_CONTENTS)?ie({},h.FORBID_CONTENTS,Le):en,te=Ce(h,"FORBID_TAGS")&&Qe(h.FORBID_TAGS)?ie({},h.FORBID_TAGS,Le):at({}),oe=Ce(h,"FORBID_ATTR")&&Qe(h.FORBID_ATTR)?ie({},h.FORBID_ATTR,Le):at({}),$t=Ce(h,"USE_PROFILES")?h.USE_PROFILES&&typeof h.USE_PROFILES=="object"?at(h.USE_PROFILES):h.USE_PROFILES:!1,gt=h.ALLOW_ARIA_ATTR!==!1,Mt=h.ALLOW_DATA_ATTR!==!1,Pt=h.ALLOW_UNKNOWN_PROTOCOLS||!1,vt=h.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=h.SAFE_FOR_TEMPLATES||!1,Ae=h.SAFE_FOR_XML!==!1,me=h.WHOLE_DOCUMENT||!1,ot=h.RETURN_DOM||!1,Gt=h.RETURN_DOM_FRAGMENT||!1,Mn=h.RETURN_TRUSTED_TYPE||!1,ke=h.FORCE_BODY||!1,Fr=h.SANITIZE_DOM!==!1,Br=h.SANITIZE_NAMED_PROPS||!1,Jt=h.KEEP_CONTENT!==!1,hn=h.IN_PLACE||!1,Q=Xu(h.ALLOWED_URI_REGEXP)?h.ALLOWED_URI_REGEXP:yl,Wt=typeof h.NAMESPACE=="string"?h.NAMESPACE:ct,rr=Ce(h,"MATHML_TEXT_INTEGRATION_POINTS")&&h.MATHML_TEXT_INTEGRATION_POINTS&&typeof h.MATHML_TEXT_INTEGRATION_POINTS=="object"?at(h.MATHML_TEXT_INTEGRATION_POINTS):ie({},["mi","mo","mn","ms","mtext"]),ar=Ce(h,"HTML_INTEGRATION_POINTS")&&h.HTML_INTEGRATION_POINTS&&typeof h.HTML_INTEGRATION_POINTS=="object"?at(h.HTML_INTEGRATION_POINTS):ie({},["annotation-xml"]);const E=Ce(h,"CUSTOM_ELEMENT_HANDLING")&&h.CUSTOM_ELEMENT_HANDLING&&typeof h.CUSTOM_ELEMENT_HANDLING=="object"?at(h.CUSTOM_ELEMENT_HANDLING):Hn(null);if(se=Hn(null),Ce(E,"tagNameCheck")&&qr(E.tagNameCheck)&&(se.tagNameCheck=E.tagNameCheck),Ce(E,"attributeNameCheck")&&qr(E.attributeNameCheck)&&(se.attributeNameCheck=E.attributeNameCheck),Ce(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),de&&(Mt=!1),Gt&&(ot=!0),$t&&(q=ie({},ns),ae=Hn(null),$t.html===!0&&(ie(q,ts),ie(ae,rs)),$t.svg===!0&&(ie(q,Sa),ie(ae,Aa),ie(ae,ta)),$t.svgFilters===!0&&(ie(q,xa),ie(ae,Aa),ie(ae,ta)),$t.mathMl===!0&&(ie(q,Ea),ie(ae,as),ie(ae,ta))),_e.tagCheck=null,_e.attributeCheck=null,Ce(h,"ADD_TAGS")&&(typeof h.ADD_TAGS=="function"?_e.tagCheck=h.ADD_TAGS:Qe(h.ADD_TAGS)&&(q===re&&(q=at(q)),ie(q,h.ADD_TAGS,Le))),Ce(h,"ADD_ATTR")&&(typeof h.ADD_ATTR=="function"?_e.attributeCheck=h.ADD_ATTR:Qe(h.ADD_ATTR)&&(ae===ve&&(ae=at(ae)),ie(ae,h.ADD_ATTR,Le))),Ce(h,"ADD_URI_SAFE_ATTR")&&Qe(h.ADD_URI_SAFE_ATTR)&&ie(er,h.ADD_URI_SAFE_ATTR,Le),Ce(h,"FORBID_CONTENTS")&&Qe(h.FORBID_CONTENTS)&&(Oe===en&&(Oe=at(Oe)),ie(Oe,h.FORBID_CONTENTS,Le)),Ce(h,"ADD_FORBID_CONTENTS")&&Qe(h.ADD_FORBID_CONTENTS)&&(Oe===en&&(Oe=at(Oe)),ie(Oe,h.ADD_FORBID_CONTENTS,Le)),Jt&&(q["#text"]=!0),me&&ie(q,["html","head","body"]),q.table&&(ie(q,["tbody"]),delete te.tbody),h.TRUSTED_TYPES_POLICY){if(typeof h.TRUSTED_TYPES_POLICY.createHTML!="function")throw ea('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof h.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ea('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=h.TRUSTED_TYPES_POLICY,M=x.createHTML("")}else x===void 0&&(x=of(_,a)),x!==null&&typeof M=="string"&&(M=x.createHTML(""));tt&&tt(h),tn=h},jr=ie({},[...Sa,...xa,...Ku]),Vr=ie({},[...Ea,...Qu]),lr=function(h){let E=A(h);(!E||!E.tagName)&&(E={namespaceURI:Wt,tagName:"template"});const V=yr(h.tagName),ue=yr(E.tagName);return Xe[h.namespaceURI]?h.namespaceURI===gn?E.namespaceURI===ct?V==="svg":E.namespaceURI===pn?V==="svg"&&(ue==="annotation-xml"||rr[ue]):!!jr[V]:h.namespaceURI===pn?E.namespaceURI===ct?V==="math":E.namespaceURI===gn?V==="math"&&ar[ue]:!!Vr[V]:h.namespaceURI===ct?E.namespaceURI===gn&&!ar[ue]||E.namespaceURI===pn&&!rr[ue]?!1:!Vr[V]&&(va[V]||!jr[V]):!!(vn==="application/xhtml+xml"&&Xe[h.namespaceURI]):!1},nt=function(h){pr(e.removed,{element:h});try{A(h).removeChild(h)}catch{b(h)}},St=function(h,E){try{pr(e.removed,{attribute:E.getAttributeNode(h),from:E})}catch{pr(e.removed,{attribute:null,from:E})}if(E.removeAttribute(h),h==="is")if(ot||Gt)try{nt(E)}catch{}else try{E.setAttribute(h,"")}catch{}},Zr=function(h){let E=null,V=null;if(ke)h=""+h;else{const Re=Qi(h,/^[\r\n\t ]+/);V=Re&&Re[0]}vn==="application/xhtml+xml"&&Wt===ct&&(h=''+h+"");const ue=x?x.createHTML(h):h;if(Wt===ct)try{E=new p().parseFromString(ue,vn)}catch{}if(!E||!E.documentElement){E=N.createDocument(Wt,"template",null);try{E.documentElement.innerHTML=nr?M:ue}catch{}}const ye=E.body||E.documentElement;return h&&V&&ye.insertBefore(n.createTextNode(V),ye.childNodes[0]||null),Wt===ct?j.call(E,me?"html":"body")[0]:me?E.documentElement:ye},Yr=function(h){return z.call(h.ownerDocument||h,h,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mn=function(h){return h instanceof d&&(typeof h.nodeName!="string"||typeof h.textContent!="string"||typeof h.removeChild!="function"||!(h.attributes instanceof f)||typeof h.removeAttribute!="function"||typeof h.setAttribute!="function"||typeof h.namespaceURI!="string"||typeof h.insertBefore!="function"||typeof h.hasChildNodes!="function")},or=function(h){return typeof c=="function"&&h instanceof c};function ut(G,h,E){hr(G,V=>{V.call(e,h,E,tn)})}const cr=function(h){let E=null;if(ut(L.beforeSanitizeElements,h,null),mn(h))return nt(h),!0;const V=Le(h.nodeName);if(ut(L.uponSanitizeElement,h,{tagName:V,allowedTags:q}),Ae&&h.hasChildNodes()&&!or(h.firstElementChild)&&We(/<[/\w!]/g,h.innerHTML)&&We(/<[/\w!]/g,h.textContent)||Ae&&h.namespaceURI===ct&&V==="style"&&or(h.firstElementChild)||h.nodeType===vr.progressingInstruction||Ae&&h.nodeType===vr.comment&&We(/<[/\w]/g,h.data))return nt(h),!0;if(te[V]||!(_e.tagCheck instanceof Function&&_e.tagCheck(V))&&!q[V]){if(!te[V]&&Kr(V)&&(se.tagNameCheck instanceof RegExp&&We(se.tagNameCheck,V)||se.tagNameCheck instanceof Function&&se.tagNameCheck(V)))return!1;if(Jt&&!Oe[V]){const ue=A(h)||h.parentNode,ye=S(h)||h.childNodes;if(ye&&ue){const Re=ye.length;for(let He=Re-1;He>=0;--He){const Ke=w(ye[He],!0);ue.insertBefore(Ke,k(h))}}}return nt(h),!0}return h instanceof o&&!lr(h)||(V==="noscript"||V==="noembed"||V==="noframes")&&We(/<\/no(script|embed|frames)/i,h.innerHTML)?(nt(h),!0):(de&&h.nodeType===vr.text&&(E=h.textContent,hr([I,D,B],ue=>{E=Bn(E,ue," ")}),h.textContent!==E&&(pr(e.removed,{element:h.cloneNode()}),h.textContent=E)),ut(L.afterSanitizeElements,h,null),!1)},Xr=function(h,E,V){if(oe[E]||Fr&&(E==="id"||E==="name")&&(V in n||V in sr))return!1;const ue=ae[E]||_e.attributeCheck instanceof Function&&_e.attributeCheck(E,h);if(!(Mt&&!oe[E]&&We(P,E))){if(!(gt&&We(F,E))){if(!ue||oe[E]){if(!(Kr(h)&&(se.tagNameCheck instanceof RegExp&&We(se.tagNameCheck,h)||se.tagNameCheck instanceof Function&&se.tagNameCheck(h))&&(se.attributeNameCheck instanceof RegExp&&We(se.attributeNameCheck,E)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(E,h))||E==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&We(se.tagNameCheck,V)||se.tagNameCheck instanceof Function&&se.tagNameCheck(V))))return!1}else if(!er[E]){if(!We(Q,Bn(V,R,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&h!=="script"&&Ji(V,"data:")===0&&Gr[h])){if(!(Pt&&!We(Z,Bn(V,R,"")))){if(V)return!1}}}}}}return!0},_a=ie({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Kr=function(h){return!_a[yr(h)]&&We(H,h)},T=function(h){ut(L.beforeSanitizeAttributes,h,null);const{attributes:E}=h;if(!E||mn(h))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0};let ue=E.length;for(;ue--;){const ye=E[ue],{name:Re,namespaceURI:He,value:Ke}=ye,rt=Le(Re),zn=Ke;let Me=Re==="value"?zn:Wu(zn);if(V.attrName=rt,V.attrValue=Me,V.keepAttr=!0,V.forceKeepAttr=void 0,ut(L.uponSanitizeAttribute,h,V),Me=V.attrValue,Br&&(rt==="id"||rt==="name")&&Ji(Me,Hr)!==0&&(St(Re,h),Me=Hr+Me),Ae&&We(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Me)){St(Re,h);continue}if(rt==="attributename"&&Qi(Me,"href")){St(Re,h);continue}if(V.forceKeepAttr)continue;if(!V.keepAttr){St(Re,h);continue}if(!vt&&We(/\/>/i,Me)){St(Re,h);continue}de&&hr([I,D,B],Un=>{Me=Bn(Me,Un," ")});const Qr=Le(h.nodeName);if(!Xr(Qr,rt,Me)){St(Re,h);continue}if(x&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!He)switch(_.getAttributeType(Qr,rt)){case"TrustedHTML":{Me=x.createHTML(Me);break}case"TrustedScriptURL":{Me=x.createScriptURL(Me);break}}if(Me!==zn)try{He?h.setAttributeNS(He,Re,Me):h.setAttribute(Re,Me),mn(h)?nt(h):Ki(e.removed)}catch{St(Re,h)}}ut(L.afterSanitizeAttributes,h,null)},X=function(h){let E=null;const V=Yr(h);for(ut(L.beforeSanitizeShadowDOM,h,null);E=V.nextNode();)ut(L.uponSanitizeShadowNode,E,null),cr(E),T(E),E.content instanceof i&&X(E.content);ut(L.afterSanitizeShadowDOM,h,null)};return e.sanitize=function(G){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,V=null,ue=null,ye=null;if(nr=!G,nr&&(G=""),typeof G!="string"&&!or(G)&&(G=Yu(G),typeof G!="string"))throw ea("dirty is not a string, aborting");if(!e.isSupported)return G;if(Ie||Nn(h),e.removed=[],typeof G=="string"&&(hn=!1),hn){const Ke=G.nodeName;if(typeof Ke=="string"){const rt=Le(Ke);if(!q[rt]||te[rt])throw ea("root node is forbidden and cannot be sanitized in-place")}}else if(G instanceof c)E=Zr(""),V=E.ownerDocument.importNode(G,!0),V.nodeType===vr.element&&V.nodeName==="BODY"||V.nodeName==="HTML"?E=V:E.appendChild(V);else{if(!ot&&!de&&!me&&G.indexOf("<")===-1)return x&&Mn?x.createHTML(G):G;if(E=Zr(G),!E)return ot?null:Mn?M:""}E&&ke&&nt(E.firstChild);const Re=Yr(hn?G:E);for(;ue=Re.nextNode();)cr(ue),T(ue),ue.content instanceof i&&X(ue.content);if(hn)return G;if(ot){if(de){E.normalize();let Ke=E.innerHTML;hr([I,D,B],rt=>{Ke=Bn(Ke,rt," ")}),E.innerHTML=Ke}if(Gt)for(ye=U.call(E.ownerDocument);E.firstChild;)ye.appendChild(E.firstChild);else ye=E;return(ae.shadowroot||ae.shadowrootmode)&&(ye=O.call(r,ye,!0)),ye}let He=me?E.outerHTML:E.innerHTML;return me&&q["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&We(wl,E.ownerDocument.doctype.name)&&(He=" `+He),de&&hr([I,D,B],Ke=>{He=Bn(He,Ke," ")}),x&&Mn?x.createHTML(He):He},e.setConfig=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nn(G),Ie=!0},e.clearConfig=function(){tn=null,Ie=!1},e.isValidAttribute=function(G,h,E){tn||Nn({});const V=Le(G),ue=Le(h);return Xr(V,ue,E)},e.addHook=function(G,h){typeof h=="function"&&pr(L[G],h)},e.removeHook=function(G,h){if(h!==void 0){const E=Hu(L[G],h);return E===-1?void 0:Gu(L[G],E,1)[0]}return Ki(L[G])},e.removeHooks=function(G){L[G]=[]},e.removeAllHooks=function(){L=ss()},e}var cf=Tl();function ki(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ln=ki();function Sl(t){Ln=t}var bn={exec:()=>null};function fe(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace($e.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var uf=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},ff=/^(?:[ \t]*(?:\n|$))+/,df=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ur=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,El=fe(xl).replace(/bull/g,yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gf=fe(xl).replace(/bull/g,yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vf=/^[^\n]+/,Ti=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,mf=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ti).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_f=fe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yi).getRegex(),pa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Si=/|$))/,bf=fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Si).replace("tag",pa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Al=fe(wi).replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex(),kf=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Al).getRegex(),xi={blockquote:kf,code:df,def:mf,fences:hf,heading:pf,hr:Ur,html:bf,lheading:El,list:_f,newline:ff,paragraph:Al,table:bn,text:vf},ls=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex(),yf={...xi,lheading:gf,table:ls,paragraph:fe(wi).replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ls).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pa).getRegex()},wf={...xi,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Si).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(wi).replace("hr",Ur).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",El).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Tf=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Sf=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Rl=/^( {2,}|\\)\n(?!\s*$)/,xf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",uf?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Cl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Cf=fe(Cl,"u").replace(/punct/g,$n).getRegex(),Df=fe(Cl,"u").replace(/punct/g,Il).getRegex(),Dl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Of=fe(Dl,"gu").replace(/notPunctSpace/g,Ei).replace(/punctSpace/g,ga).replace(/punct/g,$n).getRegex(),Lf=fe(Dl,"gu").replace(/notPunctSpace/g,Rf).replace(/punctSpace/g,Af).replace(/punct/g,Il).getRegex(),Mf=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ei).replace(/punctSpace/g,ga).replace(/punct/g,$n).getRegex(),Pf=fe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$n).getRegex(),Nf="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zf=fe(Nf,"gu").replace(/notPunctSpace/g,Ei).replace(/punctSpace/g,ga).replace(/punct/g,$n).getRegex(),Uf=fe(/\\(punct)/,"gu").replace(/punct/g,$n).getRegex(),Ff=fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Bf=fe(Si).replace("(?:-->|$)","-->").getRegex(),Hf=fe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Bf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ca=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Gf=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ca).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ol=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",ca).replace("ref",Ti).getRegex(),Ll=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ti).getRegex(),Wf=fe("reflink|nolink(?!\\()","g").replace("reflink",Ol).replace("nolink",Ll).getRegex(),os=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ai={_backpedal:bn,anyPunctuation:Uf,autolink:Ff,blockSkip:If,br:Rl,code:Sf,del:bn,delLDelim:bn,delRDelim:bn,emStrongLDelim:Cf,emStrongRDelimAst:Of,emStrongRDelimUnd:Mf,escape:Tf,link:Gf,nolink:Ll,punctuation:Ef,reflink:Ol,reflinkSearch:Wf,tag:Hf,text:xf,url:bn},qf={...Ai,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",ca).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ca).getRegex()},Za={...Ai,emStrongRDelimAst:Lf,emStrongLDelim:Df,delLDelim:Pf,delRDelim:zf,url:fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",os).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},cs=t=>Vf[t];function zt(t,e){if(e){if($e.escapeTest.test(t))return t.replace($e.escapeReplace,cs)}else if($e.escapeTestNoEncode.test(t))return t.replace($e.escapeReplaceNoEncode,cs);return t}function us(t){try{t=encodeURI(t).replace($e.percentDecode,"%")}catch{return null}return t}function fs(t,e){let n=t.replace($e.findPipe,(i,s,c)=>{let o=!1,u=s;for(;--u>=0&&c[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split($e.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0?-2:-1}function Yf(t,e=0){let n=e,r="";for(let a of t)if(a===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=a,n++;return r}function ds(t,e,n,r,a){let i=e.href,s=e.title||null,c=t[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,o}function Xf(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=r[1];return e.split(`