uEdition-Editor 2.0.0b6__py3-none-any.whl → 2.0.0b8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of uEdition-Editor might be problematic. Click here for more details.

@@ -0,0 +1,18 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-DOG_wssG.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-yaJoIiMq.js"])))=>i.map(i=>d[i]);
2
+ var gf=Object.defineProperty;var Po=t=>{throw TypeError(t)};var bf=(t,e,n)=>e in t?gf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bs=(t,e,n)=>bf(t,typeof e!="symbol"?e+"":e,n),ys=(t,e,n)=>e.has(t)||Po("Cannot "+n);var T=(t,e,n)=>(ys(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?Po("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),se=(t,e,n,r)=>(ys(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),$e=(t,e,n)=>(ys(t,e,"access private method"),n);var Oi=(t,e,n,r)=>({set _(i){se(t,e,i,n)},get _(){return T(t,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ce(){}const ns=t=>t;function ie(t,e){for(const n in e)t[n]=e[n];return t}function ra(t){return t()}function Lo(){return Object.create(null)}function Te(t){t.forEach(ra)}function Yn(t){return typeof t=="function"}function fe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ai;function Q0(t,e){return t===e?!0:(Ai||(Ai=document.createElement("a")),Ai.href=e,t===Ai.href)}function yf(t){return Object.keys(t).length===0}function oo(t,...e){if(t==null){for(const r of e)r(void 0);return ce}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function $r(t){let e;return oo(t,n=>e=n)(),e}function x(t,e,n){t.$$.on_destroy.push(oo(e,n))}function de(t,e,n,r){if(t){const i=ia(t,e,n,r);return t[0](i)}}function ia(t,e,n,r){return t[1]&&r?ie(n.ctx.slice(),t[1](r(e))):n.ctx}function me(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],o=Math.max(e.dirty.length,i.length);for(let u=0;u<o;u+=1)s[u]=e.dirty[u]|i[u];return s}return e.dirty|i}return e.dirty}function pe(t,e,n,r,i,s){if(i){const o=ia(e,n,r,s);t.p(o,i)}}function he(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let r=0;r<n;r++)e[r]=-1;return e}return-1}function yt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Ke(t,e){const n={};e=new Set(e);for(const r in t)!e.has(r)&&r[0]!=="$"&&(n[r]=t[r]);return n}function Ue(t){return t&&Yn(t.destroy)?t.destroy:ce}const sa=typeof window<"u";let lo=sa?()=>window.performance.now():()=>Date.now(),uo=sa?t=>requestAnimationFrame(t):ce;const sr=new Set;function oa(t){sr.forEach(e=>{e.c(t)||(sr.delete(e),e.f())}),sr.size!==0&&uo(oa)}function ao(t){let e;return sr.size===0&&uo(oa),{promise:new Promise(n=>{sr.add(e={c:t,f:n})}),abort(){sr.delete(e)}}}function F(t,e){t.appendChild(e)}function la(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function vf(t){const e=R("style");return e.textContent="/* empty */",kf(la(t),e),e.sheet}function kf(t,e){return F(t.head||t,e),e.sheet}function w(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function fi(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function R(t){return document.createElement(t)}function Ps(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function K(){return Z(" ")}function Se(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function I(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Cf=["width","height"];function oe(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)e[r]==null?t.removeAttribute(r):r==="style"?t.style.cssText=e[r]:r==="__value"?t.value=t[r]=e[r]:n[r]&&n[r].set&&Cf.indexOf(r)===-1?t[r]=e[r]:I(t,r,e[r])}function Ef(t,e){Object.keys(e).forEach(n=>{wf(t,n,e[n])})}function wf(t,e,n){const r=e.toLowerCase();r in t?t[r]=typeof t[r]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:I(t,e,n)}function Vi(t){return/-/.test(t)?Ef:oe}function Of(t){return Array.from(t.childNodes)}function je(t,e){e=""+e,t.data!==e&&(t.data=e)}function it(t,e){t.value=e??""}function Io(t,e,n){for(let r=0;r<t.options.length;r+=1){const i=t.options[r];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Af(t){const e=t.querySelector(":checked");return e&&e.__value}function ua(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Mo(t,e){return new t(e)}const Ui=new Map;let Bi=0;function Tf(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function $f(t,e){const n={stylesheet:vf(e),rules:{}};return Ui.set(t,n),n}function Ki(t,e,n,r,i,s,o,u=0){const l=16.666/r;let a=`{
3
+ `;for(let v=0;v<=1;v+=l){const _=e+(n-e)*s(v);a+=v*100+`%{${o(_,1-_)}}
4
+ `}const f=a+`100% {${o(n,1-n)}}
5
+ }`,c=`__svelte_${Tf(f)}_${u}`,m=la(t),{stylesheet:p,rules:d}=Ui.get(m)||$f(m,t);d[c]||(d[c]=!0,p.insertRule(`@keyframes ${c} ${f}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Bi+=1,c}function ji(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(t.style.animation=r.join(", "),Bi-=i,Bi||Sf())}function Sf(){uo(()=>{Bi||(Ui.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),Ui.clear())})}let Zr;function zr(t){Zr=t}function ci(){if(!Zr)throw new Error("Function called outside component initialization");return Zr}function rs(t){ci().$$.on_mount.push(t)}function is(t){ci().$$.on_destroy.push(t)}function Rf(){const t=ci();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=ua(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function At(t,e){return ci().$$.context.set(t,e),e}function bt(t){return ci().$$.context.get(t)}function Oe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const ir=[],Ce=[];let or=[];const Ls=[],aa=Promise.resolve();let Is=!1;function fa(){Is||(Is=!0,aa.then(ca))}function qt(){return fa(),aa}function at(t){or.push(t)}function Vt(t){Ls.push(t)}const vs=new Set;let xn=0;function ca(){if(xn!==0)return;const t=Zr;do{try{for(;xn<ir.length;){const e=ir[xn];xn++,zr(e),Df(e.$$)}}catch(e){throw ir.length=0,xn=0,e}for(zr(null),ir.length=0,xn=0;Ce.length;)Ce.pop()();for(let e=0;e<or.length;e+=1){const n=or[e];vs.has(n)||(vs.add(n),n())}or.length=0}while(ir.length);for(;Ls.length;)Ls.pop()();Is=!1,vs.clear(),zr(t)}function Df(t){if(t.fragment!==null){t.update(),Te(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(at)}}function Ff(t){const e=[],n=[];or.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),or=e}let Ur;function fo(){return Ur||(Ur=Promise.resolve(),Ur.then(()=>{Ur=null})),Ur}function qn(t,e,n){t.dispatchEvent(ua(`${e?"intro":"outro"}${n}`))}const Mi=new Set;let xt;function _e(){xt={r:0,c:[],p:xt}}function ge(){xt.r||Te(xt.c),xt=xt.p}function b(t,e){t&&t.i&&(Mi.delete(t),t.i(e))}function y(t,e,n,r){if(t&&t.o){if(Mi.has(t))return;Mi.add(t),xt.c.push(()=>{Mi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const co={duration:0};function Dn(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,u,l=0;function a(){o&&ji(t,o)}function f(){const{delay:m=0,duration:p=300,easing:d=ns,tick:g=ce,css:v}=i||co;v&&(o=Ki(t,0,1,p,m,d,v,l++)),g(0,1);const _=lo()+m,h=_+p;u&&u.abort(),s=!0,at(()=>qn(t,!0,"start")),u=ao(k=>{if(s){if(k>=h)return g(1,0),qn(t,!0,"end"),a(),s=!1;if(k>=_){const O=d((k-_)/p);g(O,1-O)}}return s})}let c=!1;return{start(){c||(c=!0,ji(t),Yn(i)?(i=i(r),fo().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Fn(t,e,n){const r={direction:"out"};let i=e(t,n,r),s=!0,o;const u=xt;u.r+=1;let l;function a(){const{delay:f=0,duration:c=300,easing:m=ns,tick:p=ce,css:d}=i||co;d&&(o=Ki(t,1,0,c,f,m,d));const g=lo()+f,v=g+c;at(()=>qn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ao(_=>{if(s){if(_>=v)return p(0,1),qn(t,!1,"end"),--u.r||Te(u.c),!1;if(_>=g){const h=m((_-g)/c);p(1-h,h)}}return s})}return Yn(i)?fo().then(()=>{i=i(r),a()}):a(),{end(f){f&&"inert"in t&&(t.inert=l),f&&i.tick&&i.tick(1,0),s&&(o&&ji(t,o),s=!1)}}}function Tn(t,e,n,r){let s=e(t,n,{direction:"both"}),o=r?0:1,u=null,l=null,a=null,f;function c(){a&&ji(t,a)}function m(d,g){const v=d.b-o;return g*=Math.abs(v),{a:o,b:d.b,d:v,duration:g,start:d.start,end:d.start+g,group:d.group}}function p(d){const{delay:g=0,duration:v=300,easing:_=ns,tick:h=ce,css:k}=s||co,O={start:lo()+g,b:d};d||(O.group=xt,xt.r+=1),"inert"in t&&(d?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=O:(k&&(c(),a=Ki(t,o,d,v,g,_,k)),d&&h(0,1),u=m(O,v),at(()=>qn(t,d,"start")),ao(S=>{if(l&&S>l.start&&(u=m(l,v),l=null,qn(t,u.b,"start"),k&&(c(),a=Ki(t,o,u.b,u.duration,0,_,s.css))),u){if(S>=u.end)h(o=u.b,1-o),qn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if(S>=u.start){const C=S-u.start;o=u.a+u.d*_(C/u.duration),h(o,1-o)}}return!!(u||l)}))}return{run(d){Yn(s)?fo().then(()=>{s=s({direction:d?"in":"out"}),p(d)}):p(d)},end(){c(),u=l=null}}}function tn(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Me(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const o=t[s],u=e[s];if(u){for(const l in o)l in u||(r[l]=1);for(const l in u)i[l]||(n[l]=u[l],i[l]=1);t[s]=u}else for(const l in o)i[l]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Ut(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function V(t){t&&t.c()}function N(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),at(()=>{const s=t.$$.on_mount.map(ra).filter(Yn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(at)}function H(t,e){const n=t.$$;n.fragment!==null&&(Ff(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pf(t,e){t.$$.dirty[0]===-1&&(ir.push(t),fa(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ye(t,e,n,r,i,s,o=null,u=[-1]){const l=Zr;zr(t);const a=t.$$={fragment:null,ctx:[],props:s,update:ce,not_equal:i,bound:Lo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Lo(),dirty:u,skip_bound:!1,root:e.target||l.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(c,m,...p)=>{const d=p.length?p[0]:m;return a.ctx&&i(a.ctx[c],a.ctx[c]=d)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](d),f&&Pf(t,c)),m}):[],a.update(),f=!0,Te(a.before_update),a.fragment=r?r(a.ctx):!1,e.target){if(e.hydrate){const c=Of(e.target);a.fragment&&a.fragment.l(c),c.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),N(t,e.target,e.anchor),ca()}zr(l)}class ve{constructor(){bs(this,"$$");bs(this,"$$set")}$destroy(){H(this,1),this.$destroy=ce}$on(e,n){if(!Yn(n))return ce;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!yf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Lf="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Lf);var Sr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wr=typeof window>"u"||"Deno"in globalThis;function Ht(){}function If(t,e){return typeof t=="function"?t(e):t}function Ms(t){return typeof t=="number"&&t>=0&&t!==1/0}function da(t,e){return Math.max(t+(e||0)-Date.now(),0)}function lr(t,e){return typeof t=="function"?t(e):t}function jt(t,e){return typeof t=="function"?t(e):t}function No(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==mo(o,e.options))return!1}else if(!Xr(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||s&&!s(e))}function Ho(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Wn(e.options.mutationKey)!==Wn(s))return!1}else if(!Xr(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function mo(t,e){return((e==null?void 0:e.queryKeyHashFn)||Wn)(t)}function Wn(t){return JSON.stringify(t,(e,n)=>Ns(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xr(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Xr(t[n],e[n])):!1}function ma(t,e){if(t===e)return t;const n=Vo(t)&&Vo(e);if(n||Ns(t)&&Ns(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,u=n?[]:{};let l=0;for(let a=0;a<o;a++){const f=n?a:s[a];(!n&&r.includes(f)||n)&&t[f]===void 0&&e[f]===void 0?(u[f]=void 0,l++):(u[f]=ma(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function qi(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Vo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ns(t){if(!Uo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Uo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Uo(t){return Object.prototype.toString.call(t)==="[object Object]"}function Mf(t){return new Promise(e=>{setTimeout(e,t)})}function Hs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?ma(t,e):e}function Nf(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Hf(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var po=Symbol();function pa(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===po?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Nn,bn,cr,zu,Vf=(zu=class extends Sr{constructor(){super();be(this,Nn);be(this,bn);be(this,cr);se(this,cr,e=>{if(!wr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,bn)||this.setEventListener(T(this,cr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,bn))==null||e.call(this),se(this,bn,void 0))}setEventListener(e){var n;se(this,cr,e),(n=T(this,bn))==null||n.call(this),se(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){T(this,Nn)!==e&&(se(this,Nn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof T(this,Nn)=="boolean"?T(this,Nn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Nn=new WeakMap,bn=new WeakMap,cr=new WeakMap,zu),ho=new Vf,dr,yn,mr,Gu,Uf=(Gu=class extends Sr{constructor(){super();be(this,dr,!0);be(this,yn);be(this,mr);se(this,mr,e=>{if(!wr&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,yn)||this.setEventListener(T(this,mr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,yn))==null||e.call(this),se(this,yn,void 0))}setEventListener(e){var n;se(this,mr,e),(n=T(this,yn))==null||n.call(this),se(this,yn,e(this.setOnline.bind(this)))}setOnline(e){T(this,dr)!==e&&(se(this,dr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return T(this,dr)}},dr=new WeakMap,yn=new WeakMap,mr=new WeakMap,Gu),Wi=new Uf;function Vs(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function Bf(t){return Math.min(1e3*2**t,3e4)}function ha(t){return(t??"online")==="online"?Wi.isOnline():!0}var _a=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function ks(t){return t instanceof _a}function ga(t){let e=!1,n=0,r=!1,i;const s=Vs(),o=g=>{var v;r||(m(new _a(g)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>ho.isFocused()&&(t.networkMode==="always"||Wi.isOnline())&&t.canRun(),f=()=>ha(t.networkMode)&&t.canRun(),c=g=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,g),i==null||i(),s.resolve(g))},m=g=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,g),i==null||i(),s.reject(g))},p=()=>new Promise(g=>{var v;i=_=>{(r||a())&&g(_)},(v=t.onPause)==null||v.call(t)}).then(()=>{var g;i=void 0,r||(g=t.onContinue)==null||g.call(t)}),d=()=>{if(r)return;let g;const v=n===0?t.initialPromise:void 0;try{g=v??t.fn()}catch(_){g=Promise.reject(_)}Promise.resolve(g).then(c).catch(_=>{var C;if(r)return;const h=t.retry??(wr?0:3),k=t.retryDelay??Bf,O=typeof k=="function"?k(n,_):k,S=h===!0||typeof h=="number"&&n<h||typeof h=="function"&&h(n,_);if(e||!S){m(_);return}n++,(C=t.onFail)==null||C.call(t,n,_),Mf(O).then(()=>a()?void 0:p()).then(()=>{e?m(_):d()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?d():p().then(d),s)}}function Kf(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const s=u=>{e?t.push(u):i(()=>{n(u)})},o=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;e++;try{l=u()}finally{e--,e||o()}return l},batchCalls:u=>(...l)=>{s(()=>{u(...l)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var ut=Kf(),Hn,Yu,ba=(Yu=class{constructor(){be(this,Hn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ms(this.gcTime)&&se(this,Hn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(wr?1/0:5*60*1e3))}clearGcTimeout(){T(this,Hn)&&(clearTimeout(T(this,Hn)),se(this,Hn,void 0))}},Hn=new WeakMap,Yu),pr,hr,Nt,Ct,oi,Vn,Bt,sn,Zu,jf=(Zu=class extends ba{constructor(e){super();be(this,Bt);be(this,pr);be(this,hr);be(this,Nt);be(this,Ct);be(this,oi);be(this,Vn);se(this,Vn,!1),se(this,oi,e.defaultOptions),this.setOptions(e.options),this.observers=[],se(this,Nt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,se(this,pr,qf(this.options)),this.state=e.state??T(this,pr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=T(this,Ct))==null?void 0:e.promise}setOptions(e){this.options={...T(this,oi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Nt).remove(this)}setData(e,n){const r=Hs(this.state.data,e,this.options);return $e(this,Bt,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){$e(this,Bt,sn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=T(this,Ct))==null?void 0:r.promise;return(i=T(this,Ct))==null||i.cancel(e),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,pr))}isActive(){return this.observers.some(e=>jt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===po||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!da(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=T(this,Ct))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=T(this,Ct))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),T(this,Nt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(T(this,Ct)&&(T(this,Vn)?T(this,Ct).cancel({revert:!0}):T(this,Ct).cancelRetry()),this.scheduleGc()),T(this,Nt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Bt,sn).call(this,{type:"invalidate"})}fetch(e,n){var l,a,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Ct))return T(this,Ct).continueRetry(),T(this,Ct).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(m=>m.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(se(this,Vn,!0),r.signal)})},s=()=>{const c=pa(this.options,n),m={queryKey:this.queryKey,meta:this.meta};return i(m),se(this,Vn,!1),this.options.persister?this.options.persister(c,m,this):c(m)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),se(this,hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&$e(this,Bt,sn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var m,p,d,g;ks(c)&&c.silent||$e(this,Bt,sn).call(this,{type:"error",error:c}),ks(c)||((p=(m=T(this,Nt).config).onError)==null||p.call(m,c,this),(g=(d=T(this,Nt).config).onSettled)==null||g.call(d,this.state.data,c,this)),this.scheduleGc()};return se(this,Ct,ga({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var m,p,d,g;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(p=(m=T(this,Nt).config).onSuccess)==null||p.call(m,c,this),(g=(d=T(this,Nt).config).onSettled)==null||g.call(d,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,m)=>{$e(this,Bt,sn).call(this,{type:"failed",failureCount:c,error:m})},onPause:()=>{$e(this,Bt,sn).call(this,{type:"pause"})},onContinue:()=>{$e(this,Bt,sn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Ct).start()}},pr=new WeakMap,hr=new WeakMap,Nt=new WeakMap,Ct=new WeakMap,oi=new WeakMap,Vn=new WeakMap,Bt=new WeakSet,sn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ya(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return ks(i)&&i.revert&&T(this,hr)?{...T(this,hr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Nt).notify({query:this,type:"updated",action:e})})},Zu);function ya(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ha(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function qf(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yt,Xu,Wf=(Xu=class extends Sr{constructor(e={}){super();be(this,Yt);this.config=e,se(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??mo(i,n);let o=this.get(s);return o||(o=new jf({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){T(this,Yt).has(e.queryHash)||(T(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=T(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&T(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return T(this,Yt).get(e)}getAll(){return[...T(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>No(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>No(e,r)):n}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,Xu),Zt,wt,Un,Xt,_n,Ju,Qf=(Ju=class extends ba{constructor(e){super();be(this,Xt);be(this,Zt);be(this,wt);be(this,Un);this.mutationId=e.mutationId,se(this,wt,e.mutationCache),se(this,Zt,[]),this.state=e.state||va(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){T(this,Zt).includes(e)||(T(this,Zt).push(e),this.clearGcTimeout(),T(this,wt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){se(this,Zt,T(this,Zt).filter(n=>n!==e)),this.scheduleGc(),T(this,wt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){T(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():T(this,wt).remove(this))}continue(){var e;return((e=T(this,Un))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,u,l,a,f,c,m,p,d,g,v,_,h,k,O,S,C,P;se(this,Un,ga({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(D,q)=>{$e(this,Xt,_n).call(this,{type:"failed",failureCount:D,error:q})},onPause:()=>{$e(this,Xt,_n).call(this,{type:"pause"})},onContinue:()=>{$e(this,Xt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,wt).canRun(this)}));const n=this.state.status==="pending",r=!T(this,Un).canStart();try{if(!n){$e(this,Xt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=T(this,wt).config).onMutate)==null?void 0:s.call(i,e,this));const q=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));q!==this.state.context&&$e(this,Xt,_n).call(this,{type:"pending",context:q,variables:e,isPaused:r})}const D=await T(this,Un).start();return await((a=(l=T(this,wt).config).onSuccess)==null?void 0:a.call(l,D,e,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,D,e,this.state.context)),await((p=(m=T(this,wt).config).onSettled)==null?void 0:p.call(m,D,null,this.state.variables,this.state.context,this)),await((g=(d=this.options).onSettled)==null?void 0:g.call(d,D,null,e,this.state.context)),$e(this,Xt,_n).call(this,{type:"success",data:D}),D}catch(D){try{throw await((_=(v=T(this,wt).config).onError)==null?void 0:_.call(v,D,e,this.state.context,this)),await((k=(h=this.options).onError)==null?void 0:k.call(h,D,e,this.state.context)),await((S=(O=T(this,wt).config).onSettled)==null?void 0:S.call(O,void 0,D,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,D,e,this.state.context)),D}finally{$e(this,Xt,_n).call(this,{type:"error",error:D})}}finally{T(this,wt).runNext(this)}}},Zt=new WeakMap,wt=new WeakMap,Un=new WeakMap,Xt=new WeakSet,_n=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ut.batch(()=>{T(this,Zt).forEach(r=>{r.onMutationUpdate(e)}),T(this,wt).notify({mutation:this,type:"updated",action:e})})},Ju);function va(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,Kt,li,xu,zf=(xu=class extends Sr{constructor(e={}){super();be(this,un);be(this,Kt);be(this,li);this.config=e,se(this,un,new Set),se(this,Kt,new Map),se(this,li,0)}build(e,n,r){const i=new Qf({mutationCache:this,mutationId:++Oi(this,li)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){T(this,un).add(e);const n=Ti(e);if(typeof n=="string"){const r=T(this,Kt).get(n);r?r.push(e):T(this,Kt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(T(this,un).delete(e)){const n=Ti(e);if(typeof n=="string"){const r=T(this,Kt).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&T(this,Kt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ti(e);if(typeof n=="string"){const r=T(this,Kt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Ti(e);if(typeof n=="string"){const i=(r=T(this,Kt).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{T(this,un).forEach(e=>{this.notify({type:"removed",mutation:e})}),T(this,un).clear(),T(this,Kt).clear()})}getAll(){return Array.from(T(this,un))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ho(n,r))}findAll(e={}){return this.getAll().filter(n=>Ho(e,n))}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ut.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ht))))}},un=new WeakMap,Kt=new WeakMap,li=new WeakMap,xu);function Ti(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Bo(t){return{onFetch:(e,n)=>{var f,c,m,p,d;const r=e.options,i=(m=(c=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:m.direction,s=((p=e.state.data)==null?void 0:p.pages)||[],o=((d=e.state.data)==null?void 0:d.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let g=!1;const v=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},_=pa(e.options,e.fetchOptions),h=async(k,O,S)=>{if(g)return Promise.reject();if(O==null&&k.pages.length)return Promise.resolve(k);const C={queryKey:e.queryKey,pageParam:O,direction:S?"backward":"forward",meta:e.options.meta};v(C);const P=await _(C),{maxPages:D}=e.options,q=S?Hf:Nf;return{pages:q(k.pages,P,D),pageParams:q(k.pageParams,O,D)}};if(i&&s.length){const k=i==="backward",O=k?Gf:Ko,S={pages:s,pageParams:o},C=O(r,S);u=await h(S,C,k)}else{const k=t??s.length;do{const O=l===0?o[0]??r.initialPageParam:Ko(r,u);if(l>0&&O==null)break;u=await h(u,O),l++}while(l<k)}return u};e.options.persister?e.fetchFn=()=>{var g,v;return(v=(g=e.options).persister)==null?void 0:v.call(g,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Ko(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Gf(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var nt,vn,kn,_r,gr,Cn,br,yr,ea,ka=(ea=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,_r);be(this,gr);be(this,Cn);be(this,br);be(this,yr);se(this,nt,t.queryCache||new Wf),se(this,vn,t.mutationCache||new zf),se(this,kn,t.defaultOptions||{}),se(this,_r,new Map),se(this,gr,new Map),se(this,Cn,0)}mount(){Oi(this,Cn)._++,T(this,Cn)===1&&(se(this,br,ho.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),se(this,yr,Wi.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,nt).onOnline())})))}unmount(){var t,e;Oi(this,Cn)._--,T(this,Cn)===0&&((t=T(this,br))==null||t.call(this),se(this,br,void 0),(e=T(this,yr))==null||e.call(this),se(this,yr,void 0))}isFetching(t){return T(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return T(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=T(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=T(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(lr(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return T(this,nt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=T(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=If(e,s);if(o!==void 0)return T(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return ut.batch(()=>T(this,nt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=T(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=T(this,nt);ut.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=T(this,nt),r={type:"active",...t};return ut.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ut.batch(()=>T(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(t,e={}){return ut.batch(()=>{if(T(this,nt).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const n={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(n,e)})}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=ut.batch(()=>T(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=T(this,nt).build(this,e);return n.isStaleByTime(lr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ht).catch(Ht)}fetchInfiniteQuery(t){return t.behavior=Bo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ht).catch(Ht)}ensureInfiniteQueryData(t){return t.behavior=Bo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wi.isOnline()?T(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,nt)}getMutationCache(){return T(this,vn)}getDefaultOptions(){return T(this,kn)}setDefaultOptions(t){se(this,kn,t)}setQueryDefaults(t,e){T(this,_r).set(Wn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...T(this,_r).values()],n={};return e.forEach(r=>{Xr(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){T(this,gr).set(Wn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...T(this,gr).values()];let n={};return e.forEach(r=>{Xr(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...T(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=mo(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===po&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...T(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){T(this,nt).clear(),T(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,_r=new WeakMap,gr=new WeakMap,Cn=new WeakMap,br=new WeakMap,yr=new WeakMap,ea),St,Ve,ui,Ot,Bn,vr,En,Jt,ai,kr,Cr,Kn,jn,wn,Er,Ye,Wr,Us,Bs,Ks,js,qs,Ws,Qs,Ca,ta,Yf=(ta=class extends Sr{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,ui);be(this,Ot);be(this,Bn);be(this,vr);be(this,En);be(this,Jt);be(this,ai);be(this,kr);be(this,Cr);be(this,Kn);be(this,jn);be(this,wn);be(this,Er,new Set);this.options=n,se(this,St,e),se(this,Jt,null),se(this,En,Vs()),this.options.experimental_prefetchInRender||T(this,En).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Ve).addObserver(this),jo(T(this,Ve),this.options)?$e(this,Ye,Wr).call(this):this.updateResult(),$e(this,Ye,js).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zs(T(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zs(T(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ye,qs).call(this),$e(this,Ye,Ws).call(this),T(this,Ve).removeObserver(this)}setOptions(e,n){const r=this.options,i=T(this,Ve);if(this.options=T(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jt(this.options.enabled,T(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Ye,Qs).call(this),T(this,Ve).setOptions(this.options),r._defaulted&&!qi(this.options,r)&&T(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Ve),observer:this});const s=this.hasListeners();s&&qo(T(this,Ve),i,this.options,r)&&$e(this,Ye,Wr).call(this),this.updateResult(n),s&&(T(this,Ve)!==i||jt(this.options.enabled,T(this,Ve))!==jt(r.enabled,T(this,Ve))||lr(this.options.staleTime,T(this,Ve))!==lr(r.staleTime,T(this,Ve)))&&$e(this,Ye,Us).call(this);const o=$e(this,Ye,Bs).call(this);s&&(T(this,Ve)!==i||jt(this.options.enabled,T(this,Ve))!==jt(r.enabled,T(this,Ve))||o!==T(this,wn))&&$e(this,Ye,Ks).call(this,o)}getOptimisticResult(e){const n=T(this,St).getQueryCache().build(T(this,St),e),r=this.createResult(n,e);return Xf(this,r)&&(se(this,Ot,r),se(this,vr,this.options),se(this,Bn,T(this,Ve).state)),r}getCurrentResult(){return T(this,Ot)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){T(this,Er).add(e)}getCurrentQuery(){return T(this,Ve)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=T(this,St).defaultQueryOptions(e),r=T(this,St).getQueryCache().build(T(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return $e(this,Ye,Wr).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Ot)))}createResult(e,n){var D;const r=T(this,Ve),i=this.options,s=T(this,Ot),o=T(this,Bn),u=T(this,vr),a=e!==r?e.state:T(this,ui),{state:f}=e;let c={...f},m=!1,p;if(n._optimisticResults){const q=this.hasListeners(),M=!q&&jo(e,n),$=q&&qo(e,r,n,i);(M||$)&&(c={...c,...ya(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:g,status:v}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,ai))p=T(this,kr);else try{se(this,ai,n.select),p=n.select(c.data),p=Hs(s==null?void 0:s.data,p,n),se(this,kr,p),se(this,Jt,null)}catch(q){se(this,Jt,q)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let q;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))q=s.data;else if(q=typeof n.placeholderData=="function"?n.placeholderData((D=T(this,Cr))==null?void 0:D.state.data,T(this,Cr)):n.placeholderData,n.select&&q!==void 0)try{q=n.select(q),se(this,Jt,null)}catch(M){se(this,Jt,M)}q!==void 0&&(v="success",p=Hs(s==null?void 0:s.data,q,n),m=!0)}T(this,Jt)&&(d=T(this,Jt),p=T(this,kr),g=Date.now(),v="error");const _=c.fetchStatus==="fetching",h=v==="pending",k=v==="error",O=h&&_,S=p!==void 0,P={status:v,fetchStatus:c.fetchStatus,isPending:h,isSuccess:v==="success",isError:k,isInitialLoading:O,isLoading:O,data:p,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:_,isRefetching:_&&!h,isLoadingError:k&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&S,isStale:_o(e,n),refetch:this.refetch,promise:T(this,En)};if(this.options.experimental_prefetchInRender){const q=U=>{P.status==="error"?U.reject(P.error):P.data!==void 0&&U.resolve(P.data)},M=()=>{const U=se(this,En,P.promise=Vs());q(U)},$=T(this,En);switch($.status){case"pending":e.queryHash===r.queryHash&&q($);break;case"fulfilled":(P.status==="error"||P.data!==$.value)&&M();break;case"rejected":(P.status!=="error"||P.error!==$.reason)&&M();break}}return P}updateResult(e){const n=T(this,Ot),r=this.createResult(T(this,Ve),this.options);if(se(this,Bn,T(this,Ve).state),se(this,vr,this.options),T(this,Bn).data!==void 0&&se(this,Cr,T(this,Ve)),qi(r,n))return;se(this,Ot,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!T(this,Er).size)return!0;const l=new Set(u??T(this,Er));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,Ot)).some(a=>{const f=a;return T(this,Ot)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),$e(this,Ye,Ca).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ye,js).call(this)}},St=new WeakMap,Ve=new WeakMap,ui=new WeakMap,Ot=new WeakMap,Bn=new WeakMap,vr=new WeakMap,En=new WeakMap,Jt=new WeakMap,ai=new WeakMap,kr=new WeakMap,Cr=new WeakMap,Kn=new WeakMap,jn=new WeakMap,wn=new WeakMap,Er=new WeakMap,Ye=new WeakSet,Wr=function(e){$e(this,Ye,Qs).call(this);let n=T(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ht)),n},Us=function(){$e(this,Ye,qs).call(this);const e=lr(this.options.staleTime,T(this,Ve));if(wr||T(this,Ot).isStale||!Ms(e))return;const r=da(T(this,Ot).dataUpdatedAt,e)+1;se(this,Kn,setTimeout(()=>{T(this,Ot).isStale||this.updateResult()},r))},Bs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Ve)):this.options.refetchInterval)??!1},Ks=function(e){$e(this,Ye,Ws).call(this),se(this,wn,e),!(wr||jt(this.options.enabled,T(this,Ve))===!1||!Ms(T(this,wn))||T(this,wn)===0)&&se(this,jn,setInterval(()=>{(this.options.refetchIntervalInBackground||ho.isFocused())&&$e(this,Ye,Wr).call(this)},T(this,wn)))},js=function(){$e(this,Ye,Us).call(this),$e(this,Ye,Ks).call(this,$e(this,Ye,Bs).call(this))},qs=function(){T(this,Kn)&&(clearTimeout(T(this,Kn)),se(this,Kn,void 0))},Ws=function(){T(this,jn)&&(clearInterval(T(this,jn)),se(this,jn,void 0))},Qs=function(){const e=T(this,St).getQueryCache().build(T(this,St),this.options);if(e===T(this,Ve))return;const n=T(this,Ve);se(this,Ve,e),se(this,ui,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ca=function(e){ut.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(T(this,Ot))}),T(this,St).getQueryCache().notify({query:T(this,Ve),type:"observerResultsUpdated"})})},ta);function Zf(t,e){return jt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function jo(t,e){return Zf(t,e)||t.state.data!==void 0&&zs(t,e,e.refetchOnMount)}function zs(t,e,n){if(jt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&_o(t,e)}return!1}function qo(t,e,n,r){return(t!==e||jt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&_o(t,n)}function _o(t,e){return jt(e.enabled,t)!==!1&&t.isStaleByTime(lr(e.staleTime,t))}function Xf(t,e){return!qi(t.getCurrentResult(),e)}var On,An,Rt,an,dn,Ni,Gs,na,Jf=(na=class extends Sr{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Rt);be(this,an);se(this,On,n),this.setOptions(r),this.bindMethods(),$e(this,dn,Ni).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=T(this,On).defaultMutationOptions(n),qi(this.options,r)||T(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Wn(r.mutationKey)!==Wn(this.options.mutationKey)?this.reset():((i=T(this,Rt))==null?void 0:i.state.status)==="pending"&&T(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=T(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){$e(this,dn,Ni).call(this),$e(this,dn,Gs).call(this,n)}getCurrentResult(){return T(this,An)}reset(){var n;(n=T(this,Rt))==null||n.removeObserver(this),se(this,Rt,void 0),$e(this,dn,Ni).call(this),$e(this,dn,Gs).call(this)}mutate(n,r){var i;return se(this,an,r),(i=T(this,Rt))==null||i.removeObserver(this),se(this,Rt,T(this,On).getMutationCache().build(T(this,On),this.options)),T(this,Rt).addObserver(this),T(this,Rt).execute(n)}},On=new WeakMap,An=new WeakMap,Rt=new WeakMap,an=new WeakMap,dn=new WeakSet,Ni=function(){var r;const n=((r=T(this,Rt))==null?void 0:r.state)??va();se(this,An,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Gs=function(n){ut.batch(()=>{var r,i,s,o,u,l,a,f;if(T(this,an)&&this.hasListeners()){const c=T(this,An).variables,m=T(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=T(this,an)).onSuccess)==null||i.call(r,n.data,c,m),(o=(s=T(this,an)).onSettled)==null||o.call(s,n.data,null,c,m)):(n==null?void 0:n.type)==="error"&&((l=(u=T(this,an)).onError)==null||l.call(u,n.error,c,m),(f=(a=T(this,an)).onSettled)==null||f.call(a,void 0,n.error,c,m))}this.listeners.forEach(c=>{c(T(this,An))})})},na);const er=[];function gt(t,e){return{subscribe:Fe(t,e).subscribe}}function Fe(t,e=ce){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!er.length;for(const a of r)a[1](),er.push(a,t);if(l){for(let a=0;a<er.length;a+=2)er[a][0](er[a+1]);er.length=0}}}function s(u){i(u(t))}function o(u,l=ce){const a=[u,l];return r.add(a),r.size===1&&(n=e(i,s)||ce),u(t),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}function ze(t,e,n){const r=!Array.isArray(t),i=r?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return gt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=ce;const m=()=>{if(f)return;c();const d=e(r?a[0]:a,o,u);s?o(d):c=Yn(d)?d:ce},p=i.map((d,g)=>oo(d,v=>{a[g]=v,f&=~(1<<g),l&&m()},()=>{f|=1<<g}));return l=!0,m(),function(){Te(p),c(),l=!1}})}function Wo(t){return{subscribe:t.subscribe.bind(t)}}const Ea="$$_queryClient",xf=()=>{const t=bt(Ea);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},ec=t=>{At(Ea,t)},tc="$$_isRestoring",nc=()=>{try{const t=bt(tc);return t||gt(!1)}catch{return gt(!1)}};function rc(){return nc()}function vt(t){return xf()}function wa(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Oa(){}function ic(t,e,n){const r=vt(),i=rc(),s=wa(t)?t:gt(t),o=ze([s,i],([f,c])=>{const m=r.defaultQueryOptions(f);return m._optimisticResults=c?"isRestoring":"optimistic",m}),u=new e(r,$r(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=ze(i,(f,c)=>{const m=f?Oa:u.subscribe(ut.batchCalls(c));return u.updateResult(),m}),{subscribe:a}=ze([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Or(t,e){return ic(t,Yf)}function di(t,e){const n=vt(),r=wa(t)?t:gt(t),i=new Jf(n,$r(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Oa)},i.setOptions(l)});const o=gt(i.getCurrentResult(),l=>i.subscribe(ut.batchCalls(a=>l(a)))),{subscribe:u}=ze(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function sc(t){let e;const n=t[2].default,r=de(n,t,t[1],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2)&&pe(r,n,i,i[1],e?me(n,i[1],s,null):he(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function oc(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new ka}=e;return rs(()=>{s.mount()}),ec(s),is(()=>{s.unmount()}),t.$$set=o=>{"client"in o&&n(0,s=o.client),"$$scope"in o&&n(1,i=o.$$scope)},[s,i,r]}class lc extends ve{constructor(e){super(),ye(this,e,oc,sc,fe,{client:0})}}var Qo=Object.prototype.hasOwnProperty;function zo(t,e,n){for(n of t.keys())if(ur(n,e))return n}function ur(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&ur(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(i=r,i&&typeof i=="object"&&(i=zo(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(i=r[0],i&&typeof i=="object"&&(i=zo(e,i),!i)||!ur(r[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(Qo.call(t,n)&&++r&&!Qo.call(e,n)||!(n in e)||!ur(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function G0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function Y0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function Z0(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function X0(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function uc(t){return t[t.length-1]}function ac(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function J0(t,e,n=ur){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Ft(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function Gr(t){return t?!0:void 0}Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function ss(t){if(t!==null)return""}function Go(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function x0(t){if(!mt)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return J(e)?e:null}const $i=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Yo=t=>typeof t=="function";Pe("empty");function Pe(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return ze(n,u=>{const l=i(u);if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??Qe});return a.action=r??Qe,a}return $i({...l,[`data-melt-${t}`]:"",action:r??Qe})});{const u=i,l=u==null?void 0:u();if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??Qe});return a.action=r??Qe,Go(a)}return Go($i({...l,[`data-melt-${t}`]:"",action:r??Qe}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Zn(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const mt=typeof document<"u",Aa=t=>typeof t=="function";function mi(t){return t instanceof Element}function J(t){return t instanceof HTMLElement}function ey(t){return t instanceof HTMLInputElement}function ty(t){return t instanceof HTMLLabelElement}function ny(t){return t instanceof HTMLButtonElement}function on(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function ry(t){return J(t)?t.isContentEditable:!1}function fc(t){return t!==null&&typeof t=="object"}function Ta(t){return fc(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function Qe(){}function _t(t,e,n,r){const i=Array.isArray(e)?e:[e];return i.forEach(s=>t.addEventListener(s,n,r)),()=>{i.forEach(s=>t.removeEventListener(s,n,r))}}function ke(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=dc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function cc(t){const e=t.currentTarget;if(!J(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function dc(t){return e=>{const n=cc(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ys(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const Jr=t=>{try{rs(t)}catch{return t}},$a=t=>{try{is(t)}catch{return t}};function Rr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function iy(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!ur(i,e)))}function mc(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Xe(t){return{...t,get:()=>$r(t)}}Xe.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Xe.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const ar=(t,e)=>{const n=Xe(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function fn(t){return new Promise(e=>setTimeout(e,t))}let pc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Sa=(t=21)=>{let e="",n=t|0;for(;n--;)e+=pc[Math.random()*64|0];return e};function hc(){return Sa(10)}function xr(t){return t.reduce((e,n)=>(e[n]=hc(),e),{})}const ae={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"},_c=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],gc=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],Zs=[..._c,...gc],ei=[ae.ENTER,ae.SPACE],bc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],yc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],sy=(t="ltr",e="horizontal")=>({nextKey:bc(t,e),prevKey:yc(t,e)});function vc(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const Ra=()=>typeof window<"u";function kc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Da=t=>Ra()&&t.test(kc().toLowerCase()),Cc=()=>Ra()&&!!navigator.maxTouchPoints,Ec=()=>Da(/^mac/)&&!Cc(),wc=()=>Da(/mac|iphone|ipad|ipod/i),Oc=()=>wc()&&!Ec(),Cs="data-melt-scroll-lock";function Zo(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Ac(t,e,n){if(!t)return;const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{r?t.style.setProperty(e,r):t.style.removeProperty(e)}}function Tc(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function go(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(Cs))return Qe;i.setAttribute(Cs,"");const o=n.innerWidth-r.clientWidth,u=()=>Ac(r,"--scrollbar-width",`${o}px`),l=Tc(r),a=n.getComputedStyle(i)[l],f=()=>Zo(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:p,scrollY:d,visualViewport:g}=n,v=(g==null?void 0:g.offsetLeft)??0,_=(g==null?void 0:g.offsetTop)??0,h=Zo(i,{position:"fixed",overflow:"hidden",top:`${-(d-Math.floor(_))}px`,left:`${-(p-Math.floor(v))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{h==null||h(),n.scrollTo(p,d)}},m=[u(),Oc()?c():f()];return()=>{m.forEach(p=>p==null?void 0:p()),i.removeAttribute(Cs)}}function Qi(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return ze([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=ze(t,s=>{n==null||n(),n=e(s)}).subscribe(Qe),i=()=>{r(),n==null||n()};return $a(i),i}function Lt(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(Fe(i))}),e}function et(t){mt&&fn(1).then(()=>{const e=document.activeElement;!J(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Fa(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Pa(t){const e=Fa(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&J(i)?i:null}function La(t){const e=Fa(),r=e.indexOf(t)-1,i=e[r];return r>=0&&J(i)?i:null}const $c=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Sc={onMatch:et,getCurrentItem:()=>document.activeElement};function Rc(t={}){const e={...Sc,...t},n=Xe(Fe([])),r=vc(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if($c.has(s))return;const u=e.getCurrentItem(),l=$r(n);if(!Array.isArray(l))return;l.push(s.toLowerCase()),n.set(l);const a=o.filter(v=>!(v.getAttribute("disabled")==="true"||v.getAttribute("aria-disabled")==="true"||v.hasAttribute("data-disabled"))),c=l.length>1&&l.every(v=>v===l[0])?l[0]:l.join(""),m=J(u)?a.indexOf(u):-1;let p=ac(a,Math.max(m,0));c.length===1&&(p=p.filter(v=>v!==u));const g=p.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));J(g)&&g!==u&&e.onMatch(g),r()}}}function Dc(t){let e=t.parentElement;for(;J(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Ar(t,e){return e!==void 0?e:Dc(t)==="body"?document.body:null}async function ti(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([fn(1),qt]),e===void 0){n==null||n.focus();return}const r=Aa(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!J(i))return;i.focus()}else J(r)&&r.focus()}gt(void 0,t=>{function e(r){t(r),t(void 0)}return _t(document,"pointerup",e,{passive:!1,capture:!0})});const Fc=gt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return _t(document,"keydown",e,{passive:!1})}),ni=(t,e={})=>{let n=Qe;function r(i={}){n();const s={enabled:!0,...i},o=Ta(s.enabled)?s.enabled:gt(s.enabled);n=rt(Fc.subscribe(u=>{var a;if(!u||!$r(o))return;const l=u.target;if(!(!J(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(Aa(s.ignore)){if(s.ignore(u))return}else if(Array.isArray(s.ignore)&&s.ignore.length>0&&s.ignore.some(f=>f&&l===f))return}(a=s.handler)==null||a.call(s,u)}}),xe(o,u=>{u?t.dataset.escapee="":delete t.dataset.escapee}))}return r(e),{update:r,destroy(){t.removeAttribute("data-escapee"),n()}}},$n=Math.min,Dt=Math.max,zi=Math.round,Si=Math.floor,en=t=>({x:t,y:t}),Pc={left:"right",right:"left",bottom:"top",top:"bottom"},Lc={start:"end",end:"start"};function Xs(t,e,n){return Dt(t,$n(e,n))}function Dr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Fr(t){return t.split("-")[1]}function Ia(t){return t==="x"?"y":"x"}function bo(t){return t==="y"?"height":"width"}function Qn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function yo(t){return Ia(Qn(t))}function Ic(t,e,n){n===void 0&&(n=!1);const r=Fr(t),i=yo(t),s=bo(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gi(o)),[o,Gi(o)]}function Mc(t){const e=Gi(t);return[Js(t),e,Js(e)]}function Js(t){return t.replace(/start|end/g,e=>Lc[e])}function Nc(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Hc(t,e,n,r){const i=Fr(t);let s=Nc(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Js)))),s}function Gi(t){return t.replace(/left|right|bottom|top/g,e=>Pc[e])}function Vc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ma(t){return typeof t!="number"?Vc(t):{top:t,right:t,bottom:t,left:t}}function Yi(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Xo(t,e,n){let{reference:r,floating:i}=t;const s=Qn(e),o=yo(e),u=bo(o),l=Sn(e),a=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,m=r[u]/2-i[u]/2;let p;switch(l){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Fr(e)){case"start":p[o]-=m*(n&&a?-1:1);break;case"end":p[o]+=m*(n&&a?-1:1);break}return p}const Uc=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,u=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:c}=Xo(a,r,l),m=r,p={},d=0;for(let g=0;g<u.length;g++){const{name:v,fn:_}=u[g],{x:h,y:k,data:O,reset:S}=await _({x:f,y:c,initialPlacement:r,placement:m,strategy:i,middlewareData:p,rects:a,platform:o,elements:{reference:t,floating:e}});f=h??f,c=k??c,p={...p,[v]:{...p[v],...O}},S&&d<=50&&(d++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(a=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:f,y:c}=Xo(a,m,l)),g=-1)}return{x:f,y:c,placement:m,strategy:i,middlewareData:p}};async function vo(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:u,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:m=!1,padding:p=0}=Dr(e,t),d=Ma(p),v=u[m?c==="floating"?"reference":"floating":c],_=Yi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:a,rootBoundary:f,strategy:l})),h=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),O=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},S=Yi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:k,strategy:l}):h);return{top:(_.top-S.top+d.top)/O.y,bottom:(S.bottom-_.bottom+d.bottom)/O.y,left:(_.left-S.left+d.left)/O.x,right:(S.right-_.right+d.right)/O.x}}const Bc=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:u,middlewareData:l}=e,{element:a,padding:f=0}=Dr(t,e)||{};if(a==null)return{};const c=Ma(f),m={x:n,y:r},p=yo(i),d=bo(p),g=await o.getDimensions(a),v=p==="y",_=v?"top":"left",h=v?"bottom":"right",k=v?"clientHeight":"clientWidth",O=s.reference[d]+s.reference[p]-m[p]-s.floating[d],S=m[p]-s.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let P=C?C[k]:0;(!P||!await(o.isElement==null?void 0:o.isElement(C)))&&(P=u.floating[k]||s.floating[d]);const D=O/2-S/2,q=P/2-g[d]/2-1,M=$n(c[_],q),$=$n(c[h],q),U=M,A=P-g[d]-$,L=P/2-g[d]/2+D,W=Xs(U,L,A),B=!l.arrow&&Fr(i)!=null&&L!==W&&s.reference[d]/2-(L<U?M:$)-g[d]/2<0,ee=B?L<U?L-U:L-A:0;return{[p]:m[p]+ee,data:{[p]:W,centerOffset:L-W-ee,...B&&{alignmentOffset:ee}},reset:B}}}),Kc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:u,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...v}=Dr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=Sn(i),h=Qn(u),k=Sn(u)===u,O=await(l.isRTL==null?void 0:l.isRTL(a.floating)),S=m||(k||!g?[Gi(u)]:Mc(u)),C=d!=="none";!m&&C&&S.push(...Hc(u,g,d,O));const P=[u,...S],D=await vo(e,v),q=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&q.push(D[_]),c){const L=Ic(i,o,O);q.push(D[L[0]],D[L[1]])}if(M=[...M,{placement:i,overflows:q}],!q.every(L=>L<=0)){var $,U;const L=((($=s.flip)==null?void 0:$.index)||0)+1,W=P[L];if(W)return{data:{index:L,overflows:M},reset:{placement:W}};let B=(U=M.filter(ee=>ee.overflows[0]<=0).sort((ee,re)=>ee.overflows[1]-re.overflows[1])[0])==null?void 0:U.placement;if(!B)switch(p){case"bestFit":{var A;const ee=(A=M.filter(re=>{if(C){const z=Qn(re.placement);return z===h||z==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(z=>z>0).reduce((z,le)=>z+le,0)]).sort((re,z)=>re[1]-z[1])[0])==null?void 0:A[0];ee&&(B=ee);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function jc(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sn(n),u=Fr(n),l=Qn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Dr(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:d}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof d=="number"&&(p=u==="end"?d*-1:d),l?{x:p*f,y:m*a}:{x:m*a,y:p*f}}const qc=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:u}=e,l=await jc(e,t);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},Wc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:u={fn:v=>{let{x:_,y:h}=v;return{x:_,y:h}}},...l}=Dr(t,e),a={x:n,y:r},f=await vo(e,l),c=Qn(Sn(i)),m=Ia(c);let p=a[m],d=a[c];if(s){const v=m==="y"?"top":"left",_=m==="y"?"bottom":"right",h=p+f[v],k=p-f[_];p=Xs(h,p,k)}if(o){const v=c==="y"?"top":"left",_=c==="y"?"bottom":"right",h=d+f[v],k=d-f[_];d=Xs(h,d,k)}const g=u.fn({...e,[m]:p,[c]:d});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:s,[c]:o}}}}}},Qc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:u}=e,{apply:l=()=>{},...a}=Dr(t,e),f=await vo(e,a),c=Sn(i),m=Fr(i),p=Qn(i)==="y",{width:d,height:g}=s.floating;let v,_;c==="top"||c==="bottom"?(v=c,_=m===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(_=c,v=m==="end"?"top":"bottom");const h=g-f.top-f.bottom,k=d-f.left-f.right,O=$n(g-f[v],h),S=$n(d-f[_],k),C=!e.middlewareData.shift;let P=O,D=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(P=h),C&&!m){const M=Dt(f.left,0),$=Dt(f.right,0),U=Dt(f.top,0),A=Dt(f.bottom,0);p?D=d-2*(M!==0||$!==0?M+$:Dt(f.left,f.right)):P=g-2*(U!==0||A!==0?U+A:Dt(f.top,f.bottom))}await l({...e,availableWidth:D,availableHeight:P});const q=await o.getDimensions(u.floating);return d!==q.width||g!==q.height?{reset:{rects:!0}}:{}}}};function os(){return typeof window<"u"}function Pr(t){return Na(t)?(t.nodeName||"").toLowerCase():"#document"}function It(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rn(t){var e;return(e=(Na(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Na(t){return os()?t instanceof Node||t instanceof It(t).Node:!1}function Wt(t){return os()?t instanceof Element||t instanceof It(t).Element:!1}function nn(t){return os()?t instanceof HTMLElement||t instanceof It(t).HTMLElement:!1}function Jo(t){return!os()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof It(t).ShadowRoot}function pi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Qt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function zc(t){return["table","td","th"].includes(Pr(t))}function ls(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ko(t){const e=Co(),n=Wt(t)?Qt(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Gc(t){let e=Rn(t);for(;nn(e)&&!Tr(e);){if(ko(e))return e;if(ls(e))return null;e=Rn(e)}return null}function Co(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Tr(t){return["html","body","#document"].includes(Pr(t))}function Qt(t){return It(t).getComputedStyle(t)}function us(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Rn(t){if(Pr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Jo(t)&&t.host||rn(t);return Jo(e)?e.host:e}function Ha(t){const e=Rn(t);return Tr(e)?t.ownerDocument?t.ownerDocument.body:t.body:nn(e)&&pi(e)?e:Ha(e)}function ri(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ha(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=It(i);if(s){const u=xs(o);return e.concat(o,o.visualViewport||[],pi(i)?i:[],u&&n?ri(u):[])}return e.concat(i,ri(i,[],n))}function xs(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Va(t){const e=Qt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=zi(n)!==s||zi(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Eo(t){return Wt(t)?t:t.contextElement}function fr(t){const e=Eo(t);if(!nn(e))return en(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=Va(e);let o=(s?zi(n.width):n.width)/r,u=(s?zi(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const Yc=en(0);function Ua(t){const e=It(t);return!Co()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Zc(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==It(t)?!1:e}function zn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Eo(t);let o=en(1);e&&(r?Wt(r)&&(o=fr(r)):o=fr(t));const u=Zc(s,n,r)?Ua(s):en(0);let l=(i.left+u.x)/o.x,a=(i.top+u.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const m=It(s),p=r&&Wt(r)?It(r):r;let d=m,g=xs(d);for(;g&&r&&p!==d;){const v=fr(g),_=g.getBoundingClientRect(),h=Qt(g),k=_.left+(g.clientLeft+parseFloat(h.paddingLeft))*v.x,O=_.top+(g.clientTop+parseFloat(h.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=k,a+=O,d=It(g),g=xs(d)}}return Yi({width:f,height:c,x:l,y:a})}function wo(t,e){const n=us(t).scrollLeft;return e?e.left+n:zn(rn(t)).left+n}function Ba(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:wo(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function Xc(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rn(r),u=e?ls(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=en(1);const f=en(0),c=nn(r);if((c||!c&&!s)&&((Pr(r)!=="body"||pi(o))&&(l=us(r)),nn(r))){const p=zn(r);a=fr(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=o&&!c&&!s?Ba(o,l,!0):en(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+m.x,y:n.y*a.y-l.scrollTop*a.y+f.y+m.y}}function Jc(t){return Array.from(t.getClientRects())}function xc(t){const e=rn(t),n=us(t),r=t.ownerDocument.body,i=Dt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Dt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+wo(t);const u=-n.scrollTop;return Qt(r).direction==="rtl"&&(o+=Dt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function ed(t,e){const n=It(t),r=rn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,l=0;if(i){s=i.width,o=i.height;const a=Co();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function td(t,e){const n=zn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=nn(t)?fr(t):en(1),o=t.clientWidth*s.x,u=t.clientHeight*s.y,l=i*s.x,a=r*s.y;return{width:o,height:u,x:l,y:a}}function xo(t,e,n){let r;if(e==="viewport")r=ed(t,n);else if(e==="document")r=xc(rn(t));else if(Wt(e))r=td(e,n);else{const i=Ua(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Yi(r)}function Ka(t,e){const n=Rn(t);return n===e||!Wt(n)||Tr(n)?!1:Qt(n).position==="fixed"||Ka(n,e)}function nd(t,e){const n=e.get(t);if(n)return n;let r=ri(t,[],!1).filter(u=>Wt(u)&&Pr(u)!=="body"),i=null;const s=Qt(t).position==="fixed";let o=s?Rn(t):t;for(;Wt(o)&&!Tr(o);){const u=Qt(o),l=ko(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pi(o)&&!l&&Ka(t,o))?r=r.filter(f=>f!==o):i=u,o=Rn(o)}return e.set(t,r),r}function rd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?ls(e)?[]:nd(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=xo(e,f,i);return a.top=Dt(c.top,a.top),a.right=$n(c.right,a.right),a.bottom=$n(c.bottom,a.bottom),a.left=Dt(c.left,a.left),a},xo(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function id(t){const{width:e,height:n}=Va(t);return{width:e,height:n}}function sd(t,e,n){const r=nn(e),i=rn(e),s=n==="fixed",o=zn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=en(0);if(r||!r&&!s)if((Pr(e)!=="body"||pi(i))&&(u=us(e)),r){const m=zn(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&(l.x=wo(i));const a=i&&!r&&!s?Ba(i,u):en(0),f=o.left+u.scrollLeft-l.x-a.x,c=o.top+u.scrollTop-l.y-a.y;return{x:f,y:c,width:o.width,height:o.height}}function Es(t){return Qt(t).position==="static"}function el(t,e){if(!nn(t)||Qt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rn(t)===n&&(n=n.ownerDocument.body),n}function ja(t,e){const n=It(t);if(ls(t))return n;if(!nn(t)){let i=Rn(t);for(;i&&!Tr(i);){if(Wt(i)&&!Es(i))return i;i=Rn(i)}return n}let r=el(t,e);for(;r&&zc(r)&&Es(r);)r=el(r,e);return r&&Tr(r)&&Es(r)&&!ko(r)?n:r||Gc(t)||n}const od=async function(t){const e=this.getOffsetParent||ja,n=this.getDimensions,r=await n(t.floating);return{reference:sd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ld(t){return Qt(t).direction==="rtl"}const ud={convertOffsetParentRelativeRectToViewportRelativeRect:Xc,getDocumentElement:rn,getClippingRect:rd,getOffsetParent:ja,getElementRects:od,getClientRects:Jc,getDimensions:id,getScale:fr,isElement:Wt,isRTL:ld};function ad(t,e){let n=null,r;const i=rn(t);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:c,height:m}=t.getBoundingClientRect();if(u||e(),!c||!m)return;const p=Si(f),d=Si(i.clientWidth-(a+c)),g=Si(i.clientHeight-(f+m)),v=Si(a),h={rootMargin:-p+"px "+-d+"px "+-g+"px "+-v+"px",threshold:Dt(0,$n(1,l))||1};let k=!0;function O(S){const C=S[0].intersectionRatio;if(C!==l){if(!k)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(O,{...h,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,h)}n.observe(t)}return o(!0),s}function fd(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,a=Eo(t),f=i||s?[...a?ri(a):[],...ri(e)]:[];f.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),s&&_.addEventListener("resize",n)});const c=a&&u?ad(a,n):null;let m=-1,p=null;o&&(p=new ResizeObserver(_=>{let[h]=_;h&&h.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(e)})),n()}),a&&!l&&p.observe(a),p.observe(e));let d,g=l?zn(t):null;l&&v();function v(){const _=zn(t);g&&(_.x!==g.x||_.y!==g.y||_.width!==g.width||_.height!==g.height)&&n(),g=_,d=requestAnimationFrame(v)}return n(),()=>{var _;f.forEach(h=>{i&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),c==null||c(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(d)}}const cd=qc,dd=Wc,md=Kc,pd=Qc,hd=Bc,_d=(t,e,n)=>{const r=new Map,i={platform:ud,...n},s={...i.platform,_c:r};return Uc(t,e,{...i,platform:s})},gd={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},bd={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function yd(t,e,n={}){if(!e||!t||n===null)return{destroy:Qe};const r={...gd,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(md({boundary:r.boundary,padding:r.overflowPadding}));const o=J(i)?i.offsetHeight/2:0;if(r.gutter||r.offset){const l=r.gutter?{mainAxis:r.gutter}:r.offset;(l==null?void 0:l.mainAxis)!=null&&(l.mainAxis+=o),s.push(cd(l))}s.push(dd({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(hd({element:i,padding:8})),s.push(pd({padding:r.overflowPadding,apply({rects:l,availableHeight:a,availableWidth:f}){r.sameWidth&&Object.assign(e.style,{width:`${Math.round(l.reference.width)}px`,minWidth:"unset"}),r.fitViewport&&Object.assign(e.style,{maxWidth:`${f}px`,maxHeight:`${a}px`})}}));function u(){if(!t||!e||J(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=r;_d(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),m=Math.round(f.y),[p,d]=vd(f.placement);if(e.setAttribute("data-side",p),e.setAttribute("data-align",d),Object.assign(e.style,{position:r.strategy,top:`${m}px`,left:`${c}px`}),J(i)&&f.middlewareData.arrow){const{x:g,y:v}=f.middlewareData.arrow,_=f.placement.split("-")[0];i.setAttribute("data-side",_),Object.assign(i.style,{position:"absolute",left:g!=null?`${g}px`:"",top:v!=null?`${v}px`:"",[_]:`calc(100% - ${o}px)`,transform:bd[_],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:r.strategy}),{destroy:fd(t,e,u)}}function vd(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
6
+ * tabbable 6.2.0
7
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
8
+ */var qa=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Zi=qa.join(","),Wa=typeof Element>"u",Gn=Wa?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xi=!Wa&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ji=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",o=s||n&&e&&t(e.parentNode);return o},kd=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},Qa=function(e,n,r){if(Ji(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Zi));return n&&Gn.call(e,Zi)&&i.unshift(e),i=i.filter(r),i},za=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ji(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),l=u.length?u:o.children,a=t(l,!0,r);r.flatten?i.push.apply(i,a):i.push({scopeParent:o,candidates:a})}else{var f=Gn.call(o,Zi);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),m=!Ji(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&m){var p=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},Ga=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Mn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||kd(e))&&!Ga(e)?0:e.tabIndex},Cd=function(e,n){var r=Mn(e);return r<0&&n&&!Ga(e)?0:r},Ed=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ya=function(e){return e.tagName==="INPUT"},wd=function(e){return Ya(e)&&e.type==="hidden"},Od=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ad=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Td=function(e){if(!e.name)return!0;var n=e.form||Xi(e),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=Ad(i,e.form);return!s||s===e},$d=function(e){return Ya(e)&&e.type==="radio"},Sd=function(e){return $d(e)&&!Td(e)},Rd=function(e){var n,r=e&&Xi(e),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var o,u,l;for(s=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var a,f,c;r=Xi(i),i=(a=r)===null||a===void 0?void 0:a.host,s=!!((f=i)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return s},tl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Dd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Gn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Gn.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var u=e;e;){var l=e.parentElement,a=Xi(e);if(l&&!l.shadowRoot&&i(l)===!0)return tl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(Rd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tl(e);return!1},Fd=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Gn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},xi=function(e,n){return!(n.disabled||Ji(n)||wd(n)||Dd(n,e)||Od(n)||Fd(n))},eo=function(e,n){return!(Sd(n)||Mn(n)<0||!xi(e,n))},Pd=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ld=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=Cd(u,o),a=o?t(i.candidates):u;l===0?o?n.push.apply(n,a):n.push(u):r.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:a})}),r.sort(Ed).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Id=function(e,n){n=n||{};var r;return n.getShadowRoot?r=za([e],n.includeContainer,{filter:eo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Pd}):r=Qa(e,n.includeContainer,eo.bind(null,n)),Ld(r)},Md=function(e,n){n=n||{};var r;return n.getShadowRoot?r=za([e],n.includeContainer,{filter:xi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Qa(e,n.includeContainer,xi.bind(null,n)),r},tr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Gn.call(e,Zi)===!1?!1:eo(n,e)},Nd=qa.concat("iframe").join(","),ws=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Gn.call(e,Nd)===!1?!1:xi(n,e)};/*!
9
+ * focus-trap 7.6.2
10
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
11
+ */function to(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Hd(t){if(Array.isArray(t))return to(t)}function Vd(t,e,n){return(e=qd(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ud(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){Vd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kd(t){return Hd(t)||Ud(t)||Wd(t)||Bd()}function jd(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qd(t){var e=jd(t,"string");return typeof e=="symbol"?e:e+""}function Wd(t,e){if(t){if(typeof t=="string")return to(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?to(t,e):void 0}}var il={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r.pause()}var i=e.indexOf(n);i===-1||e.splice(i,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Qd=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},zd=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Yr=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Gd=function(e){return Yr(e)&&!e.shiftKey},Yd=function(e){return Yr(e)&&e.shiftKey},sl=function(e){return setTimeout(e,0)},Br=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Ri=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Zd=[],Xd=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||Zd,s=rl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Gd,isKeyBackward:Yd},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function(A,L,W){return A&&A[L]!==void 0?A[L]:s[W||L]},a=function(A,L){var W=typeof(L==null?void 0:L.composedPath)=="function"?L.composedPath():void 0;return o.containerGroups.findIndex(function(B){var ee=B.container,re=B.tabbableNodes;return ee.contains(A)||(W==null?void 0:W.includes(ee))||re.find(function(z){return z===A})})},f=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=L.hasFallback,B=W===void 0?!1:W,ee=L.params,re=ee===void 0?[]:ee,z=s[A];if(typeof z=="function"&&(z=z.apply(void 0,Kd(re))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat(A,"` was specified but was not a node, or did not return a node"))}var le=z;if(typeof z=="string"){try{le=r.querySelector(z)}catch(Re){throw new Error("`".concat(A,'` appears to be an invalid selector; error="').concat(Re.message,'"'))}if(!le&&!B)throw new Error("`".concat(A,"` as selector refers to no known node"))}return le},c=function(){var A=f("initialFocus",{hasFallback:!0});if(A===!1)return!1;if(A===void 0||A&&!ws(A,s.tabbableOptions))if(a(r.activeElement)>=0)A=r.activeElement;else{var L=o.tabbableGroups[0],W=L&&L.firstTabbableNode;A=W||f("fallbackFocus")}else A===null&&(A=f("fallbackFocus"));if(!A)throw new Error("Your focus-trap needs to have at least one focusable element");return A},m=function(){if(o.containerGroups=o.containers.map(function(A){var L=Id(A,s.tabbableOptions),W=Md(A,s.tabbableOptions),B=L.length>0?L[0]:void 0,ee=L.length>0?L[L.length-1]:void 0,re=W.find(function(Re){return tr(Re)}),z=W.slice().reverse().find(function(Re){return tr(Re)}),le=!!L.find(function(Re){return Mn(Re)>0});return{container:A,tabbableNodes:L,focusableNodes:W,posTabIndexesFound:le,firstTabbableNode:B,lastTabbableNode:ee,firstDomTabbableNode:re,lastDomTabbableNode:z,nextTabbableNode:function(st){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=L.indexOf(st);return Y<0?He?W.slice(W.indexOf(st)+1).find(function(X){return tr(X)}):W.slice(0,W.indexOf(st)).reverse().find(function(X){return tr(X)}):L[Y+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(A){return A.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(A){return A.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(A){var L=A.activeElement;if(L)return L.shadowRoot&&L.shadowRoot.activeElement!==null?p(L.shadowRoot):L},d=function(A){if(A!==!1&&A!==p(document)){if(!A||!A.focus){d(c());return}A.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=A,Qd(A)&&A.select()}},g=function(A){var L=f("setReturnFocus",{params:[A]});return L||(L===!1?!1:A)},v=function(A){var L=A.target,W=A.event,B=A.isBackward,ee=B===void 0?!1:B;L=L||Ri(W),m();var re=null;if(o.tabbableGroups.length>0){var z=a(L,W),le=z>=0?o.containerGroups[z]:void 0;if(z<0)ee?re=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:re=o.tabbableGroups[0].firstTabbableNode;else if(ee){var Re=o.tabbableGroups.findIndex(function(ht){var ct=ht.firstTabbableNode;return L===ct});if(Re<0&&(le.container===L||ws(L,s.tabbableOptions)&&!tr(L,s.tabbableOptions)&&!le.nextTabbableNode(L,!1))&&(Re=z),Re>=0){var st=Re===0?o.tabbableGroups.length-1:Re-1,He=o.tabbableGroups[st];re=Mn(L)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else Yr(W)||(re=le.nextTabbableNode(L,!1))}else{var Y=o.tabbableGroups.findIndex(function(ht){var ct=ht.lastTabbableNode;return L===ct});if(Y<0&&(le.container===L||ws(L,s.tabbableOptions)&&!tr(L,s.tabbableOptions)&&!le.nextTabbableNode(L))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,pt=o.tabbableGroups[X];re=Mn(L)>=0?pt.firstTabbableNode:pt.firstDomTabbableNode}else Yr(W)||(re=le.nextTabbableNode(L))}}else re=f("fallbackFocus");return re},_=function(A){var L=Ri(A);if(!(a(L,A)>=0)){if(Br(s.clickOutsideDeactivates,A)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Br(s.allowOutsideClick,A)||A.preventDefault()}},h=function(A){var L=Ri(A),W=a(L,A)>=0;if(W||L instanceof Document)W&&(o.mostRecentlyFocusedNode=L);else{A.stopImmediatePropagation();var B,ee=!0;if(o.mostRecentlyFocusedNode)if(Mn(o.mostRecentlyFocusedNode)>0){var re=a(o.mostRecentlyFocusedNode),z=o.containerGroups[re].tabbableNodes;if(z.length>0){var le=z.findIndex(function(Re){return Re===o.mostRecentlyFocusedNode});le>=0&&(s.isKeyForward(o.recentNavEvent)?le+1<z.length&&(B=z[le+1],ee=!1):le-1>=0&&(B=z[le-1],ee=!1))}}else o.containerGroups.some(function(Re){return Re.tabbableNodes.some(function(st){return Mn(st)>0})})||(ee=!1);else ee=!1;ee&&(B=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),d(B||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},k=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=A;var W=v({event:A,isBackward:L});W&&(Yr(A)&&A.preventDefault(),d(W))},O=function(A){(s.isKeyForward(A)||s.isKeyBackward(A))&&k(A,s.isKeyBackward(A))},S=function(A){zd(A)&&Br(s.escapeDeactivates,A)!==!1&&(A.preventDefault(),u.deactivate())},C=function(A){var L=Ri(A);a(L,A)>=0||Br(s.clickOutsideDeactivates,A)||Br(s.allowOutsideClick,A)||(A.preventDefault(),A.stopImmediatePropagation())},P=function(){if(o.active)return il.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?sl(function(){d(c())}):d(c()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",_,{capture:!0,passive:!1}),r.addEventListener("touchstart",_,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",O,{capture:!0,passive:!1}),r.addEventListener("keydown",S),u},D=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",_,!0),r.removeEventListener("touchstart",_,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",O,!0),r.removeEventListener("keydown",S),u},q=function(A){var L=A.some(function(W){var B=Array.from(W.removedNodes);return B.some(function(ee){return ee===o.mostRecentlyFocusedNode})});L&&d(c())},M=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(q):void 0,$=function(){M&&(M.disconnect(),o.active&&!o.paused&&o.containers.map(function(A){M.observe(A,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(A){if(o.active)return this;var L=l(A,"onActivate"),W=l(A,"onPostActivate"),B=l(A,"checkCanFocusTrap");B||m(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,L==null||L();var ee=function(){B&&m(),P(),$(),W==null||W()};return B?(B(o.containers.concat()).then(ee,ee),this):(ee(),this)},deactivate:function(A){if(!o.active)return this;var L=rl({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},A);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,D(),o.active=!1,o.paused=!1,$(),il.deactivateTrap(i,u);var W=l(L,"onDeactivate"),B=l(L,"onPostDeactivate"),ee=l(L,"checkCanReturnFocus"),re=l(L,"returnFocus","returnFocusOnDeactivate");W==null||W();var z=function(){sl(function(){re&&d(g(o.nodeFocusedBeforeActivation)),B==null||B()})};return re&&ee?(ee(g(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(A){if(o.paused||!o.active)return this;var L=l(A,"onPause"),W=l(A,"onPostPause");return o.paused=!0,L==null||L(),D(),$(),W==null||W(),this},unpause:function(A){if(!o.paused||!o.active)return this;var L=l(A,"onUnpause"),W=l(A,"onPostUnpause");return o.paused=!1,L==null||L(),m(),P(),$(),W==null||W(),this},updateContainerElements:function(A){var L=[].concat(A).filter(Boolean);return o.containers=L.map(function(W){return typeof W=="string"?r.querySelector(W):W}),o.active&&m(),$(),this}},u.updateContainerElements(e),u};function Za(t={}){let e;const{immediate:n,...r}=t,i=Fe(!1),s=Fe(!1),o=c=>e==null?void 0:e.activate(c),u=c=>{e==null||e.deactivate(c)},l=()=>{e&&(e.pause(),s.set(!0))},a=()=>{e&&(e.unpause(),s.set(!1))};return{useFocusTrap:c=>(e=Xd(c,{...r,onActivate(){var m;i.set(!0),(m=t.onActivate)==null||m.call(t)},onDeactivate(){var m;i.set(!1),(m=t.onDeactivate)==null||m.call(t)}}),n&&o(),{destroy(){u(),e=void 0}}),hasFocus:Wo(i),isPaused:Wo(s),activate:o,deactivate:u,pause:l,unpause:a}}const Di=[],Xa=(t,e)=>{let n=Qe;function r(){const s=Di.indexOf(t);s>=0&&Di.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;fn(100).then(()=>{o?Di.push(t):r()});function f(){return uc(Di)===t}function c(){f()&&u&&(u(),r())}function m(d){const g=d.target;mi(g)&&g&&f()&&(d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation())}function p(d){l!=null&&l(d)&&f()&&(d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation(),c())}n=xd(t,{onInteractOutsideStart:m,onInteractOutside:a?p:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},Jd={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},es=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:Qe};const s={...Jd,...i},o=[];if(s.portal!==null&&o.push(as(t,s.portal).destroy),o.push(yd(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=Za({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(Xa(t,{onClose:()=>{J(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||J(n)&&n.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&o.push(ni(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},as=(t,e="body")=>{let n;if(!J(e)&&typeof e!="string")return{destroy:Qe};async function r(s){if(e=s,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await qt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function i(){t.remove()}return r(e),{update:r,destroy:i}},xd=(t,e)=>{let n=Qe,r=Qe,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:m,enabled:p}=f;if(!p)return;function d(_){c&&ol(_,t)&&(m==null||m(_));const h=_.target;mi(h)&&Ja(t,h)&&(s=!0),i=!0}function g(_){c==null||c(_)}const v=em(t);if(typeof PointerEvent<"u"){const _=h=>{r();const k=O=>{l(O)&&g(O),a()};if(h.pointerType==="touch"){r=_t(v,"click",k,{capture:!0,once:!0});return}k(h)};n=rt(_t(v,"pointerdown",d,!0),_t(v,"pointerup",_,!0))}else{const _=k=>{o?o=!1:l(k)&&g(k),a()},h=k=>{o=!0,l(k)&&g(k),a()};n=rt(_t(v,"mousedown",d,!0),_t(v,"mouseup",_,!0),_t(v,"touchstart",d,!0),_t(v,"touchend",h,!0))}}function l(f){return!!(i&&!s&&ol(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function ol(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!mi(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!Ja(e,n)}function Ja(t,e){return t===e||t.contains(e)}function em(t){return(t==null?void 0:t.ownerDocument)??document}function tm(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Ta(i)?e[r]=Xe(i):e[r]=Xe(gt(i))}),e}const nm={prefix:"",disabled:gt(!1),required:gt(!1),name:gt(void 0)};function oy(t){const e={...nm,...mc(t)},{name:n}=Zn(e.prefix),{value:r,name:i,disabled:s,required:o}=tm(Rr(e,"prefix")),u=i;return Pe(n("hidden-input"),{stores:[r,u,s,o],returned:([a,f,c,m])=>({name:f,value:a==null?void 0:a.toString(),"aria-hidden":"true",hidden:!0,disabled:c,required:m,tabIndex:-1,style:Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"})}),action:a=>({destroy:r.subscribe(c=>{a.value=c,a.dispatchEvent(new Event("change",{bubbles:!0}))})})})}const rm={ltr:[...ei,ae.ARROW_RIGHT],rtl:[...ei,ae.ARROW_LEFT]},im={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},ll=["menu","trigger"],sm={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,typeahead:!0,closeOnItemClick:!0,onOutsideClick:void 0};function om(t){const{name:e,selector:n}=Zn(t.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:u,portal:l,forceVisible:a,typeahead:f,loop:c,closeFocus:m,disableFocusFirstItem:p,closeOnItemClick:d,onOutsideClick:g}=t.rootOptions,v=t.rootOpen,_=t.rootActiveTrigger,h=t.nextFocusable,k=t.prevFocusable,O=Xe.writable(!1),S=Xe(Fe(0)),C=Xe(Fe(null)),P=Xe(Fe("right")),D=Xe(Fe(null)),q=Xe(ze([P,C],([Q,te])=>ne=>Q===(te==null?void 0:te.side)&&lm(ne,te==null?void 0:te.area))),{typed:M,handleTypeaheadSearch:$}=Rc(),U=Lt({...xr(ll),...t.ids}),A=Qi({open:v,forceVisible:a,activeTrigger:_}),L=Pe(e(),{stores:[A,l,U.menu,U.trigger],returned:([Q,te,ne,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Ft({display:Q?void 0:"none"}),id:ne,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":ss(te),tabindex:-1}),action:Q=>{let te=Qe;const ne=xe([A,_,s,u,l,o],([we,Je,kt,j,Le,qe])=>{te(),!(!we||!Je)&&qt().then(()=>{te(),jr(Q,n),te=es(Q,{anchorElement:Je,open:v,options:{floating:kt,modal:{closeOnInteractOutside:j,shouldCloseOnInteractOutside:De=>{var Ie;return(Ie=g.get())==null||Ie(De),!(De.defaultPrevented||J(Je)&&Je.contains(De.target))},onClose:()=>{v.set(!1),Je.focus()},open:we},portal:Ar(Q,Le),escapeKeydown:qe?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,kt=we.currentTarget;if(!J(Je)||!J(kt)||!(Je.closest('[role="menu"]')===kt))return;if(Zs.includes(we.key)&&ro(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),v.set(!1),no(we,h,k);return}const Le=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Le&&f.get()===!0&&$(we.key,ln(kt))}));return{destroy(){ne(),ue(),te()}}}}),W=Pe(e("trigger"),{stores:[v,U.menu,U.trigger],returned:([Q,te,ne])=>({"aria-controls":te,"aria-expanded":Q,"data-state":Q?"open":"closed",id:ne,tabindex:0}),action:Q=>(Qr(Q),_.update(ne=>ne||Q),{destroy:rt(ke(Q,"click",ne=>{const ue=v.get(),we=ne.currentTarget;J(we)&&(ht(we),ue||ne.preventDefault())}),ke(Q,"keydown",ne=>{const ue=ne.currentTarget;if(!J(ue)||!(ei.includes(ne.key)||ne.key===ae.ARROW_DOWN))return;ne.preventDefault(),ht(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const kt=ln(Je);kt.length&&et(kt[0])}))})}),B=Pe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),ee=Pe(e("overlay"),{stores:[A],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Ft({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":fm(Q)}),action:Q=>{let te=Qe;o.get()&&(te=ni(Q,{handler:()=>{v.set(!1);const we=_.get();we&&we.focus()}}).destroy);const ne=xe([l],([ue])=>{if(ue===null)return Qe;const we=Ar(Q,ue);return we===null?Qe:as(Q,we).destroy});return{destroy(){te(),ne()}}}}),re=Pe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(jr(Q,n),Qr(Q),{destroy:rt(ke(Q,"pointerdown",ne=>{const ue=ne.currentTarget;if(J(ue)&&on(ue)){ne.preventDefault();return}}),ke(Q,"click",ne=>{const ue=ne.currentTarget;if(J(ue)){if(on(ue)){ne.preventDefault();return}if(ne.defaultPrevented){et(ue);return}d.get()&&fn(1).then(()=>{v.set(!1)})}}),ke(Q,"keydown",ne=>{Nr(ne)}),ke(Q,"pointermove",ne=>{Ir(ne)}),ke(Q,"pointerleave",ne=>{Mr(ne)}),ke(Q,"focusin",ne=>{ct(ne)}),ke(Q,"focusout",ne=>{mn(ne)}))})}),z=Pe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),le=Pe(e("group-label"),{returned:()=>Q=>({id:Q})}),Re={defaultChecked:!1,disabled:!1},st=Q=>{const te={...Re,...Q},ne=te.checked??Fe(te.defaultChecked??null),ue=ar(ne,te.onCheckedChange),we=Fe(te.disabled),Je=Pe(e("checkbox-item"),{stores:[ue,we],returned:([Le,qe])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Hr(Le)?"mixed":Le?"true":"false","data-disabled":Gr(qe),"data-state":gs(Le)}),action:Le=>(jr(Le,n),Qr(Le),{destroy:rt(ke(Le,"pointerdown",De=>{const Ie=De.currentTarget;if(J(Ie)&&on(Ie)){De.preventDefault();return}}),ke(Le,"click",De=>{const Ie=De.currentTarget;if(J(Ie)){if(on(Ie)){De.preventDefault();return}if(De.defaultPrevented){et(Ie);return}ue.update(hn=>Hr(hn)?!0:!hn),d.get()&&qt().then(()=>{v.set(!1)})}}),ke(Le,"keydown",De=>{Nr(De)}),ke(Le,"pointermove",De=>{const Ie=De.currentTarget;if(J(Ie)){if(on(Ie)){pn(De);return}Ir(De,Ie)}}),ke(Le,"pointerleave",De=>{Mr(De)}),ke(Le,"focusin",De=>{ct(De)}),ke(Le,"focusout",De=>{mn(De)}))})}),kt=ze(ue,Le=>Le===!0),j=ze(ue,Le=>Le==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:kt,isIndeterminate:j},options:{disabled:we}}},He=(Q={})=>{const te=Q.value??Fe(Q.defaultValue??null),ne=ar(te,Q.onValueChange),ue=Pe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Pe(e("radio-item"),{stores:[ne],returned:([j])=>Le=>{const{value:qe,disabled:De}={...we,...Le},Ie=j===qe;return{disabled:De,role:"menuitemradio","data-state":Ie?"checked":"unchecked","aria-checked":Ie,"data-disabled":Gr(De),"data-value":qe,"data-orientation":"vertical",tabindex:-1}},action:j=>(jr(j,n),{destroy:rt(ke(j,"pointerdown",qe=>{const De=qe.currentTarget;if(!J(De))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){qe.preventDefault();return}}),ke(j,"click",qe=>{const De=qe.currentTarget;if(!J(De))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){qe.preventDefault();return}if(qe.defaultPrevented){if(!J(De))return;et(De);return}ne.set(Ie),d.get()&&qt().then(()=>{v.set(!1)})}),ke(j,"keydown",qe=>{Nr(qe)}),ke(j,"pointermove",qe=>{const De=qe.currentTarget;if(!J(De))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){pn(qe);return}Ir(qe,De)}),ke(j,"pointerleave",qe=>{Mr(qe)}),ke(j,"focusin",qe=>{ct(qe)}),ke(j,"focusout",qe=>{mn(qe)}))})}),kt=ze(ne,j=>Le=>j===Le);return{elements:{radioGroup:ue,radioItem:Je},states:{value:ne},helpers:{isChecked:kt}}},{elements:{root:Y}}=Cm({orientation:"horizontal"}),X={...sm,disabled:!1,positioning:{placement:"right-start",gutter:8}},pt=Q=>{const te={...X,...Q},ne=te.open??Fe(!1),ue=ar(ne,te==null?void 0:te.onOpenChange),we=Lt(Rr(te,"ids")),{positioning:Je,arrowSize:kt,disabled:j}=we,Le=Xe(Fe(null)),qe=Xe(Fe(null)),De=Xe(Fe(0)),Ie=Lt({...xr(ll),...te.ids});Jr(()=>{const Be=document.getElementById(Ie.trigger.get());Be&&Le.set(Be)});const hn=Qi({open:ue,forceVisible:a,activeTrigger:Le}),pf=Pe(e("submenu"),{stores:[hn,Ie.menu,Ie.trigger],returned:([Be,dt,$t])=>({role:"menu",hidden:Be?void 0:!0,style:Ft({display:Be?void 0:"none"}),id:dt,"aria-labelledby":$t,"data-state":Be?"open":"closed","data-id":dt,tabindex:-1}),action:Be=>{let dt=Qe;const $t=xe([hn,Je],([Ee,Ze])=>{if(dt(),!Ee)return;const tt=Le.get();tt&&qt().then(()=>{dt();const ot=Ei(tt);dt=es(Be,{anchorElement:tt,open:ue,options:{floating:Ze,portal:J(ot)?ot:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),We=rt(ke(Be,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!J(Ze)||!J(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(Zs.includes(Ee.key)){Ee.stopImmediatePropagation(),ro(Ee,c.get()??!1);return}const Xn=im.ltr.includes(Ee.key),Jn=Ee.ctrlKey||Ee.altKey||Ee.metaKey,wi=Ee.key.length===1;if(Xn){const Fo=Le.get();Ee.preventDefault(),ue.update(()=>(Fo&&et(Fo),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),no(Ee,h,k);return}!Jn&&wi&&f.get()===!0&&$(Ee.key,ln(tt))}),ke(Be,"pointermove",Ee=>{_s(Ee)}),ke(Be,"focusout",Ee=>{const Ze=Le.get();if(O.get()){const tt=Ee.target,ot=document.getElementById(Ie.menu.get());if(!J(ot)||!J(tt))return;!ot.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,ot=Ee.relatedTarget;if(!J(ot)||!J(tt))return;!tt.contains(ot)&&ot!==Ze&&ue.set(!1)}}));return{destroy(){$t(),dt(),We()}}}}),hf=Pe(e("subtrigger"),{stores:[ue,j,Ie.menu,Ie.trigger],returned:([Be,dt,$t,We])=>({role:"menuitem",id:We,tabindex:-1,"aria-controls":$t,"aria-expanded":Be,"data-state":Be?"open":"closed","data-disabled":Gr(dt),"aria-haspopop":"menu"}),action:Be=>{jr(Be,n),Qr(Be),Le.update(We=>We||Be);const dt=()=>{Os(qe),window.clearTimeout(De.get()),C.set(null)},$t=rt(ke(Be,"click",We=>{if(We.defaultPrevented)return;const Ee=We.currentTarget;!J(Ee)||on(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Le.set(Ee),!Ze)))}),ke(Be,"keydown",We=>{const Ee=M.get(),Ze=We.currentTarget;if(!(!J(Ze)||on(Ze)||Ee.length>0&&We.key===ae.SPACE)&&rm.ltr.includes(We.key)){if(!ue.get()){Ze.click(),We.preventDefault();return}const ot=Ze.getAttribute("aria-controls");if(!ot)return;const Xn=document.getElementById(ot);if(!J(Xn))return;const Jn=ln(Xn)[0];et(Jn)}}),ke(Be,"pointermove",We=>{if(!Kr(We)||(Ln(We),We.defaultPrevented))return;const Ee=We.currentTarget;if(!J(Ee))return;am(Ie.menu.get())||et(Ee);const Ze=qe.get();!ue.get()&&!Ze&&!on(Ee)&&qe.set(window.setTimeout(()=>{ue.update(()=>(Le.set(Ee),!0)),Os(qe)},100))}),ke(Be,"pointerleave",We=>{if(!Kr(We))return;Os(qe);const Ee=document.getElementById(Ie.menu.get()),Ze=Ee==null?void 0:Ee.getBoundingClientRect();if(Ze){const tt=Ee==null?void 0:Ee.dataset.side,ot=tt==="right",Xn=ot?-5:5,Jn=Ze[ot?"left":"right"],wi=Ze[ot?"right":"left"];C.set({area:[{x:We.clientX+Xn,y:We.clientY},{x:Jn,y:Ze.top},{x:wi,y:Ze.top},{x:wi,y:Ze.bottom},{x:Jn,y:Ze.bottom}],side:tt}),window.clearTimeout(De.get()),De.set(window.setTimeout(()=>{C.set(null)},300))}else{if(hs(We),We.defaultPrevented)return;C.set(null)}}),ke(Be,"focusout",We=>{const Ee=We.currentTarget;if(!J(Ee))return;gn(Ee);const Ze=We.relatedTarget;if(!J(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const ot=document.getElementById(tt);ot&&!ot.contains(Ze)&&ue.set(!1)}),ke(Be,"focusin",We=>{ct(We)}));return{destroy(){dt(),$t()}}}}),_f=Pe(e("subarrow"),{stores:kt,returned:Be=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Be}px)`,height:`var(--arrow-size, ${Be}px)`})})});return xe([v],([Be])=>{Be||(Le.set(null),ue.set(!1))}),xe([C],([Be])=>{!mt||Be||window.clearTimeout(De.get())}),xe([ue],([Be])=>{if(mt&&(Be&&O.get()&&fn(1).then(()=>{const dt=document.getElementById(Ie.menu.get());if(!dt)return;const $t=ln(dt);$t.length&&et($t[0])}),!Be)){const dt=D.get(),$t=document.getElementById(Ie.trigger.get());if(dt&&fn(1).then(()=>{const We=document.getElementById(Ie.menu.get());We&&We.contains(dt)&&gn(dt)}),!$t||document.activeElement===$t)return;gn($t)}}),{ids:Ie,elements:{subTrigger:hf,subMenu:pf,subArrow:_f},states:{subOpen:ue},options:we}};Jr(()=>{const Q=document.getElementById(U.trigger.get());J(Q)&&v.get()&&_.set(Q);const te=[],ne=()=>O.set(!1),ue=()=>{O.set(!0),te.push(rt(_t(document,"pointerdown",ne,{capture:!0,once:!0}),_t(document,"pointermove",ne,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return te.push(_t(document,"keydown",ue,{capture:!0})),te.push(_t(document,"keydown",we)),()=>{te.forEach(Je=>Je())}}),xe([v,D],([Q,te])=>{!Q&&te&&gn(te)}),xe([v],([Q])=>{if(mt&&!Q){const te=_.get();if(!te)return;const ne=m.get();!Q&&te&&ti({prop:ne,defaultEl:te})}}),xe([v,r],([Q,te])=>{if(!mt)return;const ne=[];return fn(1).then(()=>{const ue=document.getElementById(U.menu.get());if(ue&&Q&&O.get()){if(p.get()){et(ue);return}const we=ln(ue);if(!we.length)return;et(we[0])}}),()=>{ne.forEach(ue=>ue())}}),xe(v,Q=>{if(!mt)return;const te=()=>O.set(!1),ne=ue=>{if(O.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(_t(document,"pointerdown",te,{capture:!0,once:!0}),_t(document,"pointermove",te,{capture:!0,once:!0}),_t(document,"keydown",ne,{capture:!0}))});function ht(Q){v.update(te=>{const ne=!te;return ne&&(h.set(Pa(Q)),k.set(La(Q)),_.set(Q)),ne})}function ct(Q){const te=Q.currentTarget;if(!J(te))return;const ne=D.get();ne&&gn(ne),Ys(te),D.set(te)}function mn(Q){const te=Q.currentTarget;J(te)&&gn(te)}function Ln(Q){Vr(Q)&&Q.preventDefault()}function pn(Q){if(Vr(Q))return;const te=Q.target;if(!J(te))return;const ne=Ei(te);ne&&et(ne)}function hs(Q){Vr(Q)&&Q.preventDefault()}function _s(Q){if(!Kr(Q))return;const te=Q.target,ne=Q.currentTarget;if(!J(ne)||!J(te))return;const ue=S.get(),we=ue!==Q.clientX;if(ne.contains(te)&&we){const Je=Q.clientX>ue?"right":"left";P.set(Je),S.set(Q.clientX)}}function Ir(Q,te=null){if(!Kr(Q)||(Ln(Q),Q.defaultPrevented))return;if(te){et(te);return}const ne=Q.currentTarget;J(ne)&&et(ne)}function Mr(Q){Kr(Q)&&pn(Q)}function Nr(Q){if(M.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(ei.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!J(ue))return;ue.click()}}function Hr(Q){return Q==="indeterminate"}function gs(Q){return Hr(Q)?"indeterminate":Q?"checked":"unchecked"}function Vr(Q){return q.get()(Q)}function Ei(Q){const te=Q.closest('[role="menu"]');return J(te)?te:null}return{elements:{trigger:W,menu:L,overlay:ee,item:re,group:z,groupLabel:le,arrow:B,separator:Y},builders:{createCheckboxItem:st,createSubmenu:pt,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:$},ids:U,options:t.rootOptions}}function no(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),e.set(null))}}function ln(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>J(e))}function Qr(t){!t||!on(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Os(t){if(!mt)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function Kr(t){return t.pointerType==="mouse"}function jr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);J(n)&&t.setAttribute("data-melt-menu-id",n.id)}function ro(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!J(n)||!J(r))return;const i=ln(r);if(!i.length)return;const s=i.filter(l=>!(l.hasAttribute("data-disabled")||l.getAttribute("disabled")==="true")),o=s.indexOf(n);let u;switch(t.key){case ae.ARROW_DOWN:e?u=o<s.length-1?o+1:0:u=o<s.length-1?o+1:o;break;case ae.ARROW_UP:e?u=o>0?o-1:s.length-1:u=o<0?s.length-1:o>0?o-1:0;break;case ae.HOME:u=0;break;case ae.END:u=s.length-1;break;default:return}et(s[u])}function lm(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return um(n,e)}function um(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const u=e[s].x,l=e[s].y,a=e[o].x,f=e[o].y;l>r!=f>r&&n<(a-u)*(r-l)/(f-l)+u&&(i=!i)}return i}function am(t){const e=document.activeElement;if(!J(e))return!1;const n=e.closest(`[data-id="${t}"]`);return J(n)}function fm(t){return t?"open":"closed"}const cm={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...Rr(cm,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:In}=Zn("dialog"),dm={preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,role:"dialog",defaultOpen:!1,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},mm=["content","title","description"];function pm(t){const e={...dm,...t},n=Lt(Rr(e,"ids")),{preventScroll:r,closeOnEscape:i,closeOnOutsideClick:s,role:o,portal:u,forceVisible:l,openFocus:a,closeFocus:f,onOutsideClick:c}=n,m=Xe.writable(null),p=Lt({...xr(mm),...e.ids}),d=e.open??Fe(e.defaultOpen),g=ar(d,e==null?void 0:e.onOpenChange),v=ze([g,l],([$,U])=>$||U);let _=Qe;function h($){const U=$.currentTarget,A=$.currentTarget;!J(U)||!J(A)||(g.set(!0),m.set(A))}function k(){g.set(!1),ti({prop:f.get(),defaultEl:m.get()})}const O=Pe(In("trigger"),{stores:[g],returned:([$])=>({"aria-haspopup":"dialog","aria-expanded":$,type:"button"}),action:$=>({destroy:rt(ke($,"click",A=>{h(A)}),ke($,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),h(A))}))})}),S=Pe(In("overlay"),{stores:[v,g],returned:([$,U])=>({hidden:$?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),"aria-hidden":!0,"data-state":U?"open":"closed"}),action:$=>{let U=Qe;return i.get()&&(U=ni($,{handler:()=>{k()}}).destroy),{destroy(){U()}}}}),C=Pe(In("content"),{stores:[v,p.content,p.description,p.title,g],returned:([$,U,A,L,W])=>({id:U,role:o.get(),"aria-describedby":A,"aria-labelledby":L,"aria-modal":$?"true":void 0,"data-state":W?"open":"closed",tabindex:-1,hidden:$?void 0:!0,style:Ft({display:$?void 0:"none"})}),action:$=>{let U=Qe,A=Qe;const L=rt(xe([g,s,i],([W,B,ee])=>{if(!W)return;const re=Za({immediate:!1,escapeDeactivates:ee,clickOutsideDeactivates:B,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:$});U=re.activate,A=re.deactivate;const z=re.useFocusTrap($);return z&&z.destroy?z.destroy:re.deactivate}),xe([s,g],([W,B])=>Xa($,{open:B,closeOnInteractOutside:W,onClose(){k()},shouldCloseOnInteractOutside(ee){var re;return(re=c.get())==null||re(ee),!ee.defaultPrevented}}).destroy),xe([i],([W])=>W?ni($,{handler:k}).destroy:Qe),xe([v],([W])=>{qt().then(()=>{W?U():A()})}));return{destroy:()=>{_(),L()}}}}),P=Pe(In("portalled"),{stores:u,returned:$=>({"data-portal":ss($)}),action:$=>{const U=xe([u],([A])=>{if(A===null)return Qe;const L=Ar($,A);return L===null?Qe:as($,L).destroy});return{destroy(){U()}}}}),D=Pe(In("title"),{stores:[p.title],returned:([$])=>({id:$})}),q=Pe(In("description"),{stores:[p.description],returned:([$])=>({id:$})}),M=Pe(In("close"),{returned:()=>({type:"button"}),action:$=>({destroy:rt(ke($,"click",()=>{k()}),ke($,"keydown",A=>{A.key!==ae.SPACE&&A.key!==ae.ENTER||(A.preventDefault(),k())}))})});return xe([g,r],([$,U])=>{if(mt){if(U&&$&&(_=go()),$){const A=document.getElementById(p.content.get());ti({prop:a.get(),defaultEl:A})}return()=>{l.get()||_()}}}),{ids:p,elements:{content:C,trigger:O,title:D,description:q,overlay:S,close:M,portalled:P},states:{open:g},options:n}}const ul=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:As}=Zn("menubar"),hm={loop:!0,closeOnEscape:!0,preventScroll:!1},_m=["menubar"];function gm(t){const e={...hm,...t},n=Lt(Rr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(Fe("")),u=Xe(Fe(null)),l=Xe(Fe(null)),a=Xe(Fe(null)),f=Xe(Fe(0));let c=!1;const m=Lt({...xr(_m),...e.ids}),p=Pe(As(),{stores:[m.menubar],returned([O]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:O}},action:O=>{const S=Array.from(O.querySelectorAll("[data-melt-menubar-trigger]"));return J(S[0])?(S[0].tabIndex=0,{destroy:Qe}):{}}}),d={positioning:{placement:"bottom-start"},arrowSize:8,dir:"ltr",loop:!1,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,defaultOpen:!1,typeahead:!0,closeFocus:void 0,disableFocusFirstItem:!1,closeOnItemClick:!0,onOutsideClick:void 0},g=O=>{const S={...d,...O},C=Xe(Fe(!1)),P=Xe(Fe(null)),D=Lt(S),{positioning:q,portal:M,forceVisible:$,closeOnOutsideClick:U,onOutsideClick:A}=D,L=om({rootOptions:{...D,preventScroll:s},rootOpen:Xe(C),rootActiveTrigger:Xe(P),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),W=Qi({open:C,forceVisible:$,activeTrigger:P}),B=Pe(As("menu"),{stores:[W,M,L.ids.menu,L.ids.trigger,m.menubar],returned:([z,le,Re,st,He])=>({role:"menu",hidden:z?void 0:!0,style:Ft({display:z?void 0:"none"}),id:Re,"aria-labelledby":st,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":ss(le),tabindex:-1}),action:z=>{let le=Qe;const Re=xe([C,P,q,M,U],([He,Y,X,pt,ht])=>{le(),He&&Y&&qt().then(()=>{le(),le=es(z,{anchorElement:Y,open:C,options:{floating:X,portal:Ar(z,pt),modal:{closeOnInteractOutside:ht,shouldCloseOnInteractOutside:ct=>{var pn;if((pn=A.get())==null||pn(ct),ct.defaultPrevented)return!1;const mn=ct.target,Ln=document.getElementById(m.menubar.get());return!Ln||!mi(mn)?!0:!Ln.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),st=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!J(X)||!J(Y)||(ul.includes(He.key)&&v(He),!(Y.closest('[role="menu"]')===X)))return;Zs.includes(He.key)&&ro(He),He.key===ae.TAB&&(He.preventDefault(),P.set(null),C.set(!1),no(He,u,l));const ht=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&ht&&L.helpers.handleTypeaheadSearch(He.key,ln(X))}));return{destroy(){Re(),st(),le()}}}}),ee=Pe(As("trigger"),{stores:[C,L.ids.menu,L.ids.trigger],returned:([z,le,Re])=>({"aria-controls":le,"aria-expanded":z,"data-state":z?"open":"closed",id:Re,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{Qr(z);const le=document.getElementById(m.menubar.get());if(!le)return{};const Re=Array.from(le.querySelectorAll("[data-melt-menubar-trigger]"));if(!Re.length)return{};const st=xe([a],([Y])=>{!Y&&Re[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});Re[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=C.get(),pt=Y.currentTarget;J(pt)&&(re(pt),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(J(X)&&(ei.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),re(X);const pt=X.getAttribute("aria-controls");if(!pt)return;const ht=document.getElementById(pt);if(!ht)return;const ct=ln(ht);if(!ct.length)return;et(ct[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!J(X))return;const pt=o.get(),ht=C.get();pt&&!ht&&(C.set(!0),o.set(L.ids.menu.get()),P.set(X))}));return{destroy(){He(),st()}}}});function re(z){C.update(le=>{const Re=!le;return Re?(u.set(Pa(z)),l.set(La(z)),P.set(z),o.set(L.ids.menu.get())):P.set(null),Re})}return xe([o],([z])=>{if(mt){if(z===L.ids.menu.get()){if(C.get())return;const le=document.getElementById(L.ids.trigger.get());if(!le)return;P.set(le),Ys(le),C.set(!0);return}if(z!==L.ids.menu.get()){if(!mt)return;if(C.get()){const le=document.getElementById(L.ids.trigger.get());if(!le)return;P.set(null),C.set(!1),gn(le)}return}}}),xe([C],([z])=>{if(!mt)return;const le=document.getElementById(L.ids.trigger.get());if(le){if(!z&&o.get()===L.ids.menu.get()){P.set(null),o.set(""),gn(le);return}z&&(a.set(le),Ys(le))}}),Jr(()=>{if(!mt)return;const z=document.getElementById(L.ids.trigger.get());J(z)&&C.get()&&P.set(z)}),{ids:L.ids,elements:{...L.elements,menu:B,trigger:ee},builders:L.builders,states:L.states,options:D}};function v(O){if(!mt)return;O.preventDefault();const S=O.currentTarget,C=O.target;if(!J(C)||!J(S))return;const P=C.hasAttribute("data-melt-menubar-menu-subtrigger"),D=C.closest('[role="menu"]')!==S,q=ae.ARROW_LEFT,M=O.key===q;if(!M&&P||M&&D)return;const U=document.getElementById(m.menubar.get());if(!J(U))return;const A=_(U),L=S.getAttribute("aria-labelledby"),W=A.findIndex(z=>z.id===L);let B;switch(O.key){case ae.ARROW_RIGHT:B=W<A.length-1?W+1:0;break;case ae.ARROW_LEFT:B=W>0?W-1:A.length-1;break;case ae.HOME:B=0;break;case ae.END:B=A.length-1;break;default:return}const re=A[B].getAttribute("aria-controls");re&&o.set(re)}function _(O){const S=O.closest('[role="menubar"]');return J(S)?Array.from(S.querySelectorAll("[data-melt-menubar-trigger]")).filter(C=>J(C)):[]}function h(O){O.preventDefault();const S=document.activeElement,C=O.currentTarget;if(!J(C)||!J(S))return;const P=_(C);if(!P.length)return;const D=P.filter(U=>!(U.hasAttribute("data-disabled")||U.getAttribute("disabled")==="true")),q=D.indexOf(S);let M;const $=r.get();switch(O.key){case ae.ARROW_RIGHT:M=q<D.length-1?q+1:$?0:q;break;case ae.ARROW_LEFT:M=q>0?q-1:$?D.length-1:0;break;case ae.HOME:M=0;break;case ae.END:M=D.length-1;break;default:return}et(D[M])}Jr(()=>{if(!mt)return;const O=document.getElementById(m.menubar.get());if(!O)return;const S=rt(ke(O,"keydown",C=>{const P=C.target,D=C.currentTarget;!J(D)||!J(P)||!P.hasAttribute("data-melt-menubar-trigger")||ul.includes(C.key)&&h(C)}),_t(document,"keydown",C=>{i.get()&&C.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{S()}});const k=[];return xe([o,s],([O,S])=>{!mt||!S||(O?c||(k.push(go()),c=!0):(k.forEach(C=>C()),c=!1))}),$a(()=>{k.forEach(O=>O())}),{ids:m,elements:{menubar:p},builders:{createMenu:g},options:n}}const bm={positioning:{placement:"bottom"},arrowSize:8,defaultOpen:!1,disableFocusTrap:!1,closeOnEscape:!0,preventScroll:!1,onOpenChange:void 0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},{name:qr}=Zn("popover"),ym=["trigger","content"];function vm(t){const e={...bm,...t},n=Lt(Rr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:m,onOutsideClick:p}=n,d=e.open??Fe(e.defaultOpen),g=ar(d,e==null?void 0:e.onOpenChange),v=Xe.writable(null),_=Lt({...xr(ym),...e.ids});Jr(()=>{v.set(document.getElementById(_.trigger.get()))});function h(){g.set(!1);const $=document.getElementById(_.trigger.get());ti({prop:m.get(),defaultEl:$})}const k=Qi({open:g,activeTrigger:v,forceVisible:f}),O=Pe(qr("content"),{stores:[k,a,_.content],returned:([$,U,A])=>({hidden:$&&mt?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),id:A,"data-state":$?"open":"closed","data-portal":ss(U)}),action:$=>{let U=Qe;const A=xe([k,v,r,s,u,l,a],([L,W,B,ee,re,z,le])=>{U(),!(!L||!W)&&qt().then(()=>{U(),U=es($,{anchorElement:W,open:g,options:{floating:B,focusTrap:ee?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:re},modal:{shouldCloseOnInteractOutside:C,onClose:h,open:L,closeOnInteractOutside:z},escapeKeydown:re?{handler:()=>{h()}}:null,portal:Ar($,le)}}).destroy})});return{destroy(){A(),U()}}}});function S($){g.update(U=>!U),$&&$!==v.get()&&v.set($)}function C($){var L;if((L=p.get())==null||L($),$.defaultPrevented)return!1;const U=$.target,A=document.getElementById(_.trigger.get());return!(A&&mi(U)&&(U===A||A.contains(U)))}const P=Pe(qr("trigger"),{stores:[k,_.content,_.trigger],returned:([$,U,A])=>({role:"button","aria-haspopup":"dialog","aria-expanded":$?"true":"false","data-state":al($),"aria-controls":U,id:A}),action:$=>({destroy:rt(ke($,"click",()=>{S($)}),ke($,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),S($))}))})}),D=Pe(qr("overlay"),{stores:[k],returned:([$])=>({hidden:$?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),"aria-hidden":"true","data-state":al($)}),action:$=>{let U=Qe,A=Qe,L=Qe;return u.get()&&(U=ni($,{handler:()=>{h()}}).destroy),A=xe([a],([W])=>{if(L(),W===null)return;const B=Ar($,W);B!==null&&(L=as($,B).destroy)}),{destroy(){U(),A(),L()}}}}),q=Pe(qr("arrow"),{stores:i,returned:$=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${$}px)`,height:`var(--arrow-size, ${$}px)`})})}),M=Pe(qr("close"),{returned:()=>({type:"button"}),action:$=>({destroy:rt(ke($,"click",A=>{A.defaultPrevented||h()}),ke($,"keydown",A=>{A.defaultPrevented||A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),S())}))})});return xe([g,v,o],([$,U,A])=>{if(!mt)return;const L=[];if($){U||qt().then(()=>{const B=document.getElementById(_.trigger.get());J(B)&&v.set(B)}),A&&L.push(go());const W=U??document.getElementById(_.trigger.get());ti({prop:c.get(),defaultEl:W})}return()=>{L.forEach(W=>W())}}),{ids:_,elements:{trigger:P,content:O,arrow:q,close:M,overlay:D},states:{open:g},options:n}}function al(t){return t?"open":"closed"}const km={orientation:"horizontal",decorative:!1},Cm=t=>{const e={...km,...t},n=Lt(e),{orientation:r,decorative:i}=n;return{elements:{root:Pe("separator",{stores:[r,i],returned:([o,u])=>({role:u?"none":"separator","aria-orientation":o==="vertical"?o:void 0,"aria-hidden":u,"data-orientation":o})})},options:n}},Em={loop:!0,orientation:"horizontal"},{name:Fi,selector:Ts}=Zn("toolbar"),wm=t=>{const e={...Em,...t},n=Lt(e),{loop:r,orientation:i}=n,s=Pe(Fi(),{stores:i,returned:m=>({role:"toolbar","data-orientation":m})}),o=Pe(Fi("button"),{returned:()=>({role:"button",type:"button"}),action:m=>($s(m),{destroy:ke(m,"keydown",c)})}),u=Pe(Fi("link"),{returned:()=>({role:"link"}),action:m=>($s(m),{destroy:ke(m,"keydown",c)})}),l=Pe(Fi("separator"),{stores:i,returned:m=>({role:"separator","data-orientation":m==="horizontal"?"vertical":"horizontal","aria-orientation":m==="horizontal"?"vertical":"horizontal"})}),a={type:"single",disabled:!1},f=m=>{const p={...a,...m},d=Lt(p),{type:g,disabled:v}=d,_=p.defaultValue?p.defaultValue:p.type==="single"?void 0:[],h=p.value??Fe(_),k=ar(h,p==null?void 0:p.onValueChange),{name:O}=Zn("toolbar-group"),S=Pe(O(),{stores:i,returned:D=>({role:"group","data-orientation":D})}),C=Pe(O("item"),{stores:[v,g,k,i],returned:([D,q,M,$])=>U=>{const A=typeof U=="string"?U:U.value,L=typeof U=="string"?!1:!!U.disabled,W=D||L,B=Array.isArray(M)?M.includes(A):M===A,ee=q==="single",re=q==="multiple";return{disabled:Gr(W),pressed:B,"data-orientation":$,"data-disabled":Gr(W),"data-value":A,"data-state":B?"on":"off","aria-checked":ee?B:void 0,"aria-pressed":re?B:void 0,type:"button",role:ee?"radio":void 0,"data-melt-toolbar-item":""}},action:D=>{$s(D);function q(){const U=D.dataset.value,A=D.dataset.disabled==="true";return{value:U,disabled:A}}function M(){const{value:U,disabled:A}=q();U===void 0||A||k.update(L=>Array.isArray(L)?L.includes(U)?L.filter(W=>W!==U):(L.push(U),L):L===U?void 0:U)}return{destroy:rt(ke(D,"click",()=>{M()}),ke(D,"keydown",U=>{if(U.key===ae.ENTER||U.key===ae.SPACE){U.preventDefault(),M();return}c(U)}))}}}),P=ze(k,D=>q=>Array.isArray(D)?D.includes(q):D===q);return{elements:{group:S,item:C},states:{value:k},helpers:{isPressed:P},options:d}};function c(m){const p=i.get(),d=r.get(),g={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[p??"horizontal"],v={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[p??"horizontal"],_=m.currentTarget;if(!J(_))return;const h=_.closest("[data-melt-toolbar]");if(!J(h))return;const k=xa(h),O=k.indexOf(_);if(m.key===g){m.preventDefault();const S=O+1;S>=k.length&&d?et(k[0]):et(k[S])}else if(m.key===v){m.preventDefault();const S=O-1;S<0&&d?et(k[k.length-1]):et(k[S])}else m.key===ae.HOME?(m.preventDefault(),et(k[0])):m.key===ae.END&&(m.preventDefault(),et(k[k.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function $s(t){const e=t.closest("[data-melt-toolbar]");if(!J(e))return;xa(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function xa(t){return Array.from(t.querySelectorAll(`${Ts("item")}, ${Ts("button")}, ${Ts("link")}`)).filter(e=>J(e))}function ii(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function Om(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Pn(){const t=Rf();return e=>{const{originalEvent:n}=e.detail,{cancelable:r}=e,i=n.type;t(i,{originalEvent:n,currentTarget:n.currentTarget},{cancelable:r})||e.preventDefault()}}function hi(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function _i(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function ef(t){return(e={})=>Am(t,e)}function Am(t,e){const r={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(i=>({...i,placement:Tm(r.side,r.align),offset:{...i.offset,mainAxis:r.sideOffset,crossAxis:r.alignOffset},gutter:0,sameWidth:r.sameWidth,flip:r.avoidCollisions,overflowPadding:r.collisionPadding,boundary:r.collisionBoundary,fitViewport:r.fitViewport,strategy:r.strategy,overlap:r.overlap}))}function Tm(t,e){return e==="center"?t:`${t}-${e}`}function Oo(){return{NAME:"menu",SUB_NAME:"menu-submenu",RADIO_GROUP_NAME:"menu-radiogroup",CHECKBOX_ITEM_NAME:"menu-checkboxitem",RADIO_ITEM_NAME:"menu-radioitem",GROUP_NAME:"menu-group",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","radio-indicator","separator","sub-content","sub-trigger","trigger"]}}function gi(){const{NAME:t}=Oo();return bt(t)}function $m(t){const{RADIO_GROUP_NAME:e}=Oo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=gi(),i=n(t);return At(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function Sm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=Oo(),r=bt(n);return At(e,{...r,value:t}),{...r,value:t}}function Rm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=gi();ef(r)(n)}const Dm=t=>({builder:t&8}),fl=t=>({builder:t[3]}),Fm=t=>({builder:t&8}),cl=t=>({builder:t[3]});function Pm(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&Ss(t);return{c(){i&&i.c(),n=Se()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1],e?fe(e,s[1]?"a":"div")?(i.d(1),i=Ss(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Ss(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n))},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function Lm(t){let e;const n=t[11].default,r=de(n,t,t[10],cl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&1032)&&pe(r,n,i,i[10],e?me(n,i[10],s,Fm):he(i[10]),cl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ss(t){let e,n,r,i;const s=t[11].default,o=de(s,t,t[10],fl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R(t[1]?"a":"div"),o&&o.c(),Vi(t[1]?"a":"div")(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[13](e),n=!0,r||(i=[Ue(t[3].action(e)),G(e,"m-click",t[5]),G(e,"m-focusin",t[5]),G(e,"m-focusout",t[5]),G(e,"m-keydown",t[5]),G(e,"m-pointerdown",t[5]),G(e,"m-pointerleave",t[5]),G(e,"m-pointermove",t[5]),G(e,"pointerenter",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f&1032)&&pe(o,s,a,a[10],n?me(s,a[10],f,Dm):he(a[10]),fl),Vi(a[1]?"a":"div")(e,l=Me(u,[(!n||f&2)&&{href:a[1]},f&8&&a[3],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function Im(t){let e,n,r,i;const s=[Lm,Pm],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Mm(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=Ke(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:m=!1}=e,{el:p=void 0}=e;const{elements:{item:d},getAttrs:g}=gi();x(t,d,k=>n(9,u=k));const v=Pn();function _(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{p=k,n(0,p)})}return t.$$set=k=>{e=ie(ie({},e),yt(k)),n(6,o=Ke(e,s)),"href"in k&&n(1,f=k.href),"asChild"in k&&n(2,c=k.asChild),"disabled"in k&&n(7,m=k.disabled),"el"in k&&n(0,p=k.el),"$$scope"in k&&n(10,a=k.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={...g("item"),...Om(m)}),t.$$.dirty&264&&Object.assign(r,i)},[p,f,c,r,d,v,o,m,i,u,a,l,_,h]}class Pt extends ve{constructor(e){super(),ye(this,e,Mm,Im,fe,{href:1,asChild:2,disabled:7,el:0})}}const Nm=t=>({builder:t&4}),dl=t=>({builder:t[2]}),Hm=t=>({builder:t&4}),ml=t=>({builder:t[2]});function Vm(t){let e,n,r,i;const s=t[10].default,o=de(s,t,t[9],dl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-focusin",t[4]),G(e,"m-focusout",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerdown",t[4]),G(e,"m-pointerleave",t[4]),G(e,"m-pointermove",t[4]),G(e,"pointerenter",t[11])],r=!0)},p(a,f){o&&o.p&&(!n||f&516)&&pe(o,s,a,a[9],n?me(s,a[9],f,Nm):he(a[9]),dl),oe(e,l=Me(u,[f&4&&a[2],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function Um(t){let e;const n=t[10].default,r=de(n,t,t[9],ml);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&516)&&pe(r,n,i,i[9],e?me(n,i[9],s,Hm):he(i[9]),ml)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Bm(t){let e,n,r,i;const s=[Um,Vm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Km(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a}=e,{disabled:f=!1}=e,{asChild:c=!1}=e,{el:m=void 0}=e;const{elements:{radioItem:p},getAttrs:d}=Sm(a);x(t,p,k=>n(8,o=k));const g=d("radio-item"),v=Pn();function _(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{m=k,n(0,m)})}return t.$$set=k=>{e=ie(ie({},e),yt(k)),n(5,s=Ke(e,i)),"value"in k&&n(6,a=k.value),"disabled"in k&&n(7,f=k.disabled),"asChild"in k&&n(1,c=k.asChild),"el"in k&&n(0,m=k.el),"$$scope"in k&&n(9,l=k.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,g)},[m,c,r,p,v,s,a,f,o,l,u,_,h]}class jm extends ve{constructor(e){super(),ye(this,e,Km,Bm,fe,{value:6,disabled:7,asChild:1,el:0})}}const qm=t=>({builder:t&4}),pl=t=>({builder:t[2]});function Wm(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("div"),oe(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Ue(t[3].action(e)),n=!0)},p(o,u){oe(e,s=Me(i,[u&8&&o[3],u&32&&o[5]]))},i:ce,o:ce,d(o){o&&E(e),t[8](null),n=!1,r()}}}function Qm(t){let e;const n=t[7].default,r=de(n,t,t[6],pl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&pe(r,n,i,i[6],e?me(n,i[6],s,qm):he(i[6]),pl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function zm(t){let e,n,r,i;const s=[Qm,Wm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Gm(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:m}=gi();x(t,c,g=>n(3,o=g));const p=m("separator");function d(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),yt(g)),n(5,s=Ke(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(6,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,o,c,s,l,u,d]}class fs extends ve{constructor(e){super(),ye(this,e,Gm,zm,fe,{asChild:1,el:0})}}const Ym=t=>({builder:t&4}),hl=t=>({builder:t[2]}),Zm=t=>({builder:t&4}),_l=t=>({builder:t[2]});function Xm(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],hl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,Ym):he(a[8]),hl),oe(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function Jm(t){let e;const n=t[9].default,r=de(n,t,t[8],_l);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,Zm):he(i[8]),_l)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function xm(t){let e,n,r,i;const s=[Jm,Xm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function ep(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a=void 0}=e,{onValueChange:f=void 0}=e,{asChild:c=!1}=e,{el:m=void 0}=e;const{elements:{radioGroup:p},states:{value:d},getAttrs:g}=$m({defaultValue:a,onValueChange:({next:h})=>(h!=null&&h!==a&&(f==null||f(h),n(5,a=h)),h)});x(t,p,h=>n(7,o=h));const v=g("radio-group");function _(h){Ce[h?"unshift":"push"](()=>{m=h,n(0,m)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(4,s=Ke(e,i)),"value"in h&&n(5,a=h.value),"onValueChange"in h&&n(6,f=h.onValueChange),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,m=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&d.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[m,c,r,p,s,a,f,o,l,u,_]}class tp extends ve{constructor(e){super(),ye(this,e,ep,xm,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function tf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function np(t){const{NAME:e,PARTS:n}=tf(),r=ii(e,n),i={...vm({positioning:{placement:"bottom",gutter:0},...hi(t),forceVisible:!0}),getAttrs:r};return At(e,i),{...i,updateOption:_i(i.options)}}function Ao(){const{NAME:t}=tf();return bt(t)}function rp(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Ao();ef(r)(n)}function nf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function ip(t){const{NAME:e,PARTS:n}=nf(),r=ii(e,n),i={...pm({...hi(t),role:"dialog",forceVisible:!0}),getAttrs:r};return At(e,i),{...i,updateOption:_i(i.options)}}function Lr(){const{NAME:t}=nf();return bt(t)}const sp=t=>({ids:t&1}),gl=t=>({ids:t[0]});function op(t){let e;const n=t[12].default,r=de(n,t,t[11],gl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2049)&&pe(r,n,i,i[11],e?me(n,i[11],s,sp):he(i[11]),gl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function lp(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{preventScroll:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{portal:a=void 0}=e,{open:f=void 0}=e,{onOpenChange:c=void 0}=e,{openFocus:m=void 0}=e,{closeFocus:p=void 0}=e,{onOutsideClick:d=void 0}=e;const{states:{open:g},updateOption:v,ids:_}=ip({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:m,closeFocus:p,onOutsideClick:d,onOpenChange:({next:k})=>(f!==k&&(c==null||c(k),n(2,f=k)),k)}),h=ze([_.content,_.description,_.title],([k,O,S])=>({content:k,description:O,title:S}));return x(t,h,k=>n(0,r=k)),t.$$set=k=>{"preventScroll"in k&&n(3,o=k.preventScroll),"closeOnEscape"in k&&n(4,u=k.closeOnEscape),"closeOnOutsideClick"in k&&n(5,l=k.closeOnOutsideClick),"portal"in k&&n(6,a=k.portal),"open"in k&&n(2,f=k.open),"onOpenChange"in k&&n(7,c=k.onOpenChange),"openFocus"in k&&n(8,m=k.openFocus),"closeFocus"in k&&n(9,p=k.closeFocus),"onOutsideClick"in k&&n(10,d=k.onOutsideClick),"$$scope"in k&&n(11,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&g.set(f),t.$$.dirty&8&&v("preventScroll",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("portal",a),t.$$.dirty&256&&v("openFocus",m),t.$$.dirty&512&&v("closeFocus",p),t.$$.dirty&1024&&v("onOutsideClick",d)},[r,h,f,o,u,l,a,c,m,p,d,s,i]}class si extends ve{constructor(e){super(),ye(this,e,lp,op,fe,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const up=t=>({builder:t&8}),bl=t=>({builder:t[3]}),ap=t=>({builder:t&8}),yl=t=>({builder:t[3]});function fp(t){let e=t[1],n,r,i=t[1]&&Rs(t);return{c(){i&&i.c(),n=Se()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1]?e?fe(e,s[1])?(i.d(1),i=Rs(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Rs(s),e=s[1],i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=s[1])},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function cp(t){let e;const n=t[9].default,r=de(n,t,t[8],yl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&264)&&pe(r,n,i,i[8],e?me(n,i[8],s,ap):he(i[8]),yl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Rs(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],bl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R(t[1]),o&&o.c(),Vi(t[1])(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[3].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&264)&&pe(o,s,a,a[8],n?me(s,a[8],f,up):he(a[8]),bl),Vi(a[1])(e,l=Me(u,[f&8&&a[3],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function dp(t){let e,n,r,i;const s=[cp,fp],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function mp(t,e,n){let r;const i=["level","asChild","id","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{level:a="h2"}=e,{asChild:f=!1}=e,{id:c=void 0}=e,{el:m=void 0}=e;const{elements:{title:p},ids:d,getAttrs:g}=Lr();x(t,p,h=>n(7,o=h));const v=g("title");function _(h){Ce[h?"unshift":"push"](()=>{m=h,n(0,m)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(5,s=Ke(e,i)),"level"in h&&n(1,a=h.level),"asChild"in h&&n(2,f=h.asChild),"id"in h&&n(6,c=h.id),"el"in h&&n(0,m=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&d.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,v)},[m,a,f,r,p,s,c,o,l,u,_]}class Tt extends ve{constructor(e){super(),ye(this,e,mp,dp,fe,{level:1,asChild:2,id:6,el:0})}}const pp=t=>({builder:t&4}),vl=t=>({builder:t[2]}),hp=t=>({builder:t&4}),kl=t=>({builder:t[2]});function _p(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],vl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("button"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,pp):he(a[7]),vl),oe(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function gp(t){let e;const n=t[8].default,r=de(n,t,t[7],kl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,hp):he(i[7]),kl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function bp(t){let e,n,r,i;const s=[gp,_p],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function yp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:m}=Lr();x(t,c,v=>n(6,o=v));const p=Pn(),d=m("close");function g(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),yt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,d)},[f,a,r,c,p,s,o,l,u,g]}class Mt extends ve{constructor(e){super(),ye(this,e,yp,bp,fe,{asChild:1,el:0})}}const vp=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),kp=t=>({builder:t&4}),El=t=>({builder:t[2]});function Cp(t){let e,n,r,i;const s=t[7].default,o=de(s,t,t[6],Cl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&68)&&pe(o,s,a,a[6],n?me(s,a[6],f,vp):he(a[6]),Cl),oe(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Ep(t){let e;const n=t[7].default,r=de(n,t,t[6],El);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&pe(r,n,i,i[6],e?me(n,i[6],s,kp):he(i[6]),El)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function wp(t){let e,n,r,i;const s=[Ep,Cp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Op(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:m}=Lr();x(t,c,g=>n(5,o=g));const p=m("portal");function d(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),yt(g)),n(4,s=Ke(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(6,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,s,o,l,u,d]}class bi extends ve{constructor(e){super(),ye(this,e,Op,wp,fe,{asChild:1,el:0})}}const Ap=t=>({builder:t[0]&256}),wl=t=>({builder:t[8]}),Tp=t=>({builder:t[0]&256}),Ol=t=>({builder:t[8]}),$p=t=>({builder:t[0]&256}),Al=t=>({builder:t[8]}),Sp=t=>({builder:t[0]&256}),Tl=t=>({builder:t[8]}),Rp=t=>({builder:t[0]&256}),$l=t=>({builder:t[8]}),Dp=t=>({builder:t[0]&256}),Sl=t=>({builder:t[8]});function Fp(t){let e,n,r,i;const s=t[16].default,o=de(s,t,t[15],wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"pointerdown",t[45]),G(e,"pointermove",t[46]),G(e,"pointerup",t[47]),G(e,"touchcancel",t[48]),G(e,"touchend",t[49]),G(e,"touchmove",t[50],{passive:!1}),G(e,"touchstart",t[51],{passive:!1})],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&33024)&&pe(o,s,a,a[15],n?me(s,a[15],f,Ap):he(a[15]),wl),oe(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function Pp(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],Ol);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[38]),G(e,"pointermove",t[39]),G(e,"pointerup",t[40]),G(e,"touchcancel",t[41]),G(e,"touchend",t[42]),G(e,"touchmove",t[43],{passive:!1}),G(e,"touchstart",t[44],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,Tp):he(t[15]),Ol),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[55](null),f&&n&&n.end(),i=!1,Te(s)}}}function Lp(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],Al);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[31]),G(e,"pointermove",t[32]),G(e,"pointerup",t[33]),G(e,"touchcancel",t[34]),G(e,"touchend",t[35]),G(e,"touchmove",t[36],{passive:!1}),G(e,"touchstart",t[37],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,$p):he(t[15]),Al),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function Ip(t){let e,n,r,i,s,o;const u=t[16].default,l=de(u,t,t[15],Tl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=R("div"),l&&l.c(),oe(e,f)},m(c,m){w(c,e,m),l&&l.m(e,null),t[53](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"pointerdown",t[24]),G(e,"pointermove",t[25]),G(e,"pointerup",t[26]),G(e,"touchcancel",t[27]),G(e,"touchend",t[28]),G(e,"touchmove",t[29],{passive:!1}),G(e,"touchstart",t[30],{passive:!1})],s=!0)},p(c,m){t=c,l&&l.p&&(!i||m[0]&33024)&&pe(l,u,t,t[15],i?me(u,t[15],m,Sp):he(t[15]),Tl),oe(e,f=Me(a,[m[0]&256&&t[8],m[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[53](null),c&&r&&r.end(),s=!1,Te(o)}}}function Mp(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],$l);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"pointerdown",t[17]),G(e,"pointermove",t[18]),G(e,"pointerup",t[19]),G(e,"touchcancel",t[20]),G(e,"touchend",t[21]),G(e,"touchmove",t[22],{passive:!1}),G(e,"touchstart",t[23],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,Rp):he(t[15]),$l),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[52](null),f&&n&&n.end(),i=!1,Te(s)}}}function Np(t){let e;const n=t[16].default,r=de(n,t,t[15],Sl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&33024)&&pe(r,n,i,i[15],e?me(n,i[15],s,Dp):he(i[15]),Sl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Hp(t){let e,n,r,i;const s=[Np,Mp,Ip,Lp,Pp,Fp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Vp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:m=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:d=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{id:_=void 0}=e,{el:h=void 0}=e;const{elements:{content:k},states:{open:O},ids:S,getAttrs:C}=Lr();x(t,k,j=>n(14,o=j)),x(t,O,j=>n(9,u=j));const P=C("content");function D(j){Oe.call(this,t,j)}function q(j){Oe.call(this,t,j)}function M(j){Oe.call(this,t,j)}function $(j){Oe.call(this,t,j)}function U(j){Oe.call(this,t,j)}function A(j){Oe.call(this,t,j)}function L(j){Oe.call(this,t,j)}function W(j){Oe.call(this,t,j)}function B(j){Oe.call(this,t,j)}function ee(j){Oe.call(this,t,j)}function re(j){Oe.call(this,t,j)}function z(j){Oe.call(this,t,j)}function le(j){Oe.call(this,t,j)}function Re(j){Oe.call(this,t,j)}function st(j){Oe.call(this,t,j)}function He(j){Oe.call(this,t,j)}function Y(j){Oe.call(this,t,j)}function X(j){Oe.call(this,t,j)}function pt(j){Oe.call(this,t,j)}function ht(j){Oe.call(this,t,j)}function ct(j){Oe.call(this,t,j)}function mn(j){Oe.call(this,t,j)}function Ln(j){Oe.call(this,t,j)}function pn(j){Oe.call(this,t,j)}function hs(j){Oe.call(this,t,j)}function _s(j){Oe.call(this,t,j)}function Ir(j){Oe.call(this,t,j)}function Mr(j){Oe.call(this,t,j)}function Nr(j){Oe.call(this,t,j)}function Hr(j){Oe.call(this,t,j)}function gs(j){Oe.call(this,t,j)}function Vr(j){Oe.call(this,t,j)}function Ei(j){Oe.call(this,t,j)}function Q(j){Oe.call(this,t,j)}function te(j){Oe.call(this,t,j)}function ne(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function ue(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function we(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function Je(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function kt(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}return t.$$set=j=>{e=ie(ie({},e),yt(j)),n(12,s=Ke(e,i)),"transition"in j&&n(1,f=j.transition),"transitionConfig"in j&&n(2,c=j.transitionConfig),"inTransition"in j&&n(3,m=j.inTransition),"inTransitionConfig"in j&&n(4,p=j.inTransitionConfig),"outTransition"in j&&n(5,d=j.outTransition),"outTransitionConfig"in j&&n(6,g=j.outTransitionConfig),"asChild"in j&&n(7,v=j.asChild),"id"in j&&n(13,_=j.id),"el"in j&&n(0,h=j.el),"$$scope"in j&&n(15,a=j.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&_&&S.content.set(_),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,P)},[h,f,c,m,p,d,g,v,r,u,k,O,s,_,o,a,l,D,q,M,$,U,A,L,W,B,ee,re,z,le,Re,st,He,Y,X,pt,ht,ct,mn,Ln,pn,hs,_s,Ir,Mr,Nr,Hr,gs,Vr,Ei,Q,te,ne,ue,we,Je,kt]}class yi extends ve{constructor(e){super(),ye(this,e,Vp,Hp,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const Up=t=>({builder:t&256}),Rl=t=>({builder:t[8]});function Bp(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("div"),oe(e,s)},m(o,u){w(o,e,u),t[25](e),n||(r=[Ue(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){oe(e,s=Me(i,[u&256&&o[8],u&4096&&o[12]]))},i:ce,o:ce,d(o){o&&E(e),t[25](null),n=!1,Te(r)}}}function Kp(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=R("div"),oe(e,u)},m(l,a){w(l,e,a),t[24](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,oe(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(n&&n.end(1),r=!0)},o(l){l&&(n=Fn(e,t[5],t[6])),r=!1},d(l){l&&E(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function jp(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ie(o,s[u]);return{c(){e=R("div"),oe(e,o)},m(u,l){w(u,e,l),t[23](e),r||(i=[Ue(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,oe(e,o=Me(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()}))},o:ce,d(u){u&&E(e),t[23](null),r=!1,Te(i)}}}function qp(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),oe(e,l)},m(a,f){w(a,e,f),t[22](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,oe(e,l=Me(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Fn(e,t[5],t[6])),i=!1},d(a){a&&E(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function Wp(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=R("div"),oe(e,u)},m(l,a){w(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),Ue(t[8].action(e))],i=!0)},p(l,a){t=l,oe(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(l){l&&E(e),t[21](null),l&&n&&n.end(),i=!1,Te(s)}}}function Qp(t){let e;const n=t[15].default,r=de(n,t,t[14],Rl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&pe(r,n,i,i[14],e?me(n,i[14],s,Up):he(i[14]),Rl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function zp(t){let e,n,r,i;const s=[Qp,Wp,qp,jp,Kp,Bp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Gp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:m=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:d=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{el:_=void 0}=e;const{elements:{overlay:h},states:{open:k},getAttrs:O}=Lr();x(t,h,B=>n(13,o=B)),x(t,k,B=>n(9,u=B));const S=O("overlay");function C(B){Oe.call(this,t,B)}function P(B){Oe.call(this,t,B)}function D(B){Oe.call(this,t,B)}function q(B){Oe.call(this,t,B)}function M(B){Oe.call(this,t,B)}function $(B){Ce[B?"unshift":"push"](()=>{_=B,n(0,_)})}function U(B){Ce[B?"unshift":"push"](()=>{_=B,n(0,_)})}function A(B){Ce[B?"unshift":"push"](()=>{_=B,n(0,_)})}function L(B){Ce[B?"unshift":"push"](()=>{_=B,n(0,_)})}function W(B){Ce[B?"unshift":"push"](()=>{_=B,n(0,_)})}return t.$$set=B=>{e=ie(ie({},e),yt(B)),n(12,s=Ke(e,i)),"transition"in B&&n(1,f=B.transition),"transitionConfig"in B&&n(2,c=B.transitionConfig),"inTransition"in B&&n(3,m=B.inTransition),"inTransitionConfig"in B&&n(4,p=B.inTransitionConfig),"outTransition"in B&&n(5,d=B.outTransition),"outTransitionConfig"in B&&n(6,g=B.outTransitionConfig),"asChild"in B&&n(7,v=B.asChild),"el"in B&&n(0,_=B.el),"$$scope"in B&&n(14,a=B.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,S)},[_,f,c,m,p,d,g,v,r,u,h,k,s,o,a,l,C,P,D,q,M,$,U,A,L,W]}class vi extends ve{constructor(e){super(),ye(this,e,Gp,zp,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const Yp=t=>({builder:t&4}),Dl=t=>({builder:t[2]}),Zp=t=>({builder:t&4}),Fl=t=>({builder:t[2]});function Xp(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],Dl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("button"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,Yp):he(a[7]),Dl),oe(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function Jp(t){let e;const n=t[8].default,r=de(n,t,t[7],Fl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,Zp):he(i[7]),Fl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function xp(t){let e,n,r,i;const s=[Jp,Xp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function eh(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:m}=Lr();x(t,c,v=>n(6,o=v));const p=Pn(),d=m("trigger");function g(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),yt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,d)},[f,a,r,c,p,s,o,l,u,g]}class ki extends ve{constructor(e){super(),ye(this,e,eh,xp,fe,{asChild:1,el:0})}}const th=t=>({builder:t[0]&256}),Pl=t=>({builder:t[8]}),nh=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),rh=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),ih=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),sh=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),oh=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]});function lh(t){let e,n,r,i;const s=t[28].default,o=de(s,t,t[27],Pl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&134217984)&&pe(o,s,a,a[27],n?me(s,a[27],f,th):he(a[27]),Pl),oe(e,l=Me(u,[f[0]&256&&a[8],f[0]&8192&&a[13]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function uh(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Ll);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,nh):he(t[27]),Ll),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[32](null),f&&n&&n.end(),i=!1,Te(s)}}}function ah(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Il);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,rh):he(t[27]),Il),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function fh(t){let e,n,r,i,s,o;const u=t[28].default,l=de(u,t,t[27],Ml);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=R("div"),l&&l.c(),oe(e,f)},m(c,m){w(c,e,m),l&&l.m(e,null),t[30](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],s=!0)},p(c,m){t=c,l&&l.p&&(!i||m[0]&134217984)&&pe(l,u,t,t[27],i?me(u,t[27],m,ih):he(t[27]),Ml),oe(e,f=Me(a,[m[0]&256&&t[8],m[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[30](null),c&&r&&r.end(),s=!1,Te(o)}}}function ch(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Nl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,sh):he(t[27]),Nl),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[29](null),f&&n&&n.end(),i=!1,Te(s)}}}function dh(t){let e;const n=t[28].default,r=de(n,t,t[27],Hl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&134217984)&&pe(r,n,i,i[27],e?me(n,i[27],s,oh):he(i[27]),Hl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function mh(t){let e,n,r,i;const s=[dh,ch,fh,ah,uh,lh],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function ph(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:m=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:d=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{id:_=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:S=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:P=!0}=e,{collisionBoundary:D=void 0}=e,{sameWidth:q=!1}=e,{fitViewport:M=!1}=e,{strategy:$="absolute"}=e,{overlap:U=!1}=e,{el:A=void 0}=e;const{elements:{menu:L},states:{open:W},ids:B,getAttrs:ee}=gi();x(t,L,X=>n(26,u=X)),x(t,W,X=>n(9,o=X));const re=Pn(),z=ee("content");function le(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function Re(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function st(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function He(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function Y(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}return t.$$set=X=>{e=ie(ie({},e),yt(X)),n(13,s=Ke(e,i)),"transition"in X&&n(1,f=X.transition),"transitionConfig"in X&&n(2,c=X.transitionConfig),"inTransition"in X&&n(3,m=X.inTransition),"inTransitionConfig"in X&&n(4,p=X.inTransitionConfig),"outTransition"in X&&n(5,d=X.outTransition),"outTransitionConfig"in X&&n(6,g=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,_=X.id),"side"in X&&n(15,h=X.side),"align"in X&&n(16,k=X.align),"sideOffset"in X&&n(17,O=X.sideOffset),"alignOffset"in X&&n(18,S=X.alignOffset),"collisionPadding"in X&&n(19,C=X.collisionPadding),"avoidCollisions"in X&&n(20,P=X.avoidCollisions),"collisionBoundary"in X&&n(21,D=X.collisionBoundary),"sameWidth"in X&&n(22,q=X.sameWidth),"fitViewport"in X&&n(23,M=X.fitViewport),"strategy"in X&&n(24,$=X.strategy),"overlap"in X&&n(25,U=X.overlap),"el"in X&&n(0,A=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&_&&B.menu.set(_),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&Rm({side:h,align:k,sideOffset:O,alignOffset:S,collisionPadding:C,avoidCollisions:P,collisionBoundary:D,sameWidth:q,fitViewport:M,strategy:$,overlap:U})},[A,f,c,m,p,d,g,v,r,o,L,W,re,s,_,h,k,O,S,C,P,D,q,M,$,U,u,a,l,le,Re,st,He,Y]}class cs extends ve{constructor(e){super(),ye(this,e,ph,mh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}}function ds(){return{NAME:"menubar",MENU_NAME:"menu",SUB_NAME:"menu-submenu",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"]}}function hh(t){const{NAME:e,PARTS:n,MENU_NAME:r}=ds(),i=ii(e,["root"]),s=ii(r,n),o={...gm(hi(t)),getAttrs:s,getMenubarAttrs:i};return At(e,o),{...o,updateOption:_i(o.options)}}function _h(){const{NAME:t}=ds();return bt(t)}function gh(t){const{MENU_NAME:e}=ds(),{builders:{createMenu:n},getAttrs:r}=_h(),i={...n({...hi(t),forceVisible:!1}),getAttrs:r};return At(e,i),{...i,updateOption:_i(i.options)}}function bh(){const{MENU_NAME:t}=ds();return bt(t)}const yh=t=>({builder:t&4,ids:t&8}),Vl=t=>({builder:t[2],ids:t[3]}),vh=t=>({builder:t&4,ids:t&8}),Ul=t=>({builder:t[2],ids:t[3]});function kh(t){let e,n,r,i;const s=t[13].default,o=de(s,t,t[12],Vl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&4108)&&pe(o,s,a,a[12],n?me(s,a[12],f,yh):he(a[12]),Vl),oe(e,l=Me(u,[f&4&&a[2],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[14](null),r=!1,i()}}}function Ch(t){let e;const n=t[13].default,r=de(n,t,t[12],Ul);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&pe(r,n,i,i[12],e?me(n,i[12],s,vh):he(i[12]),Ul)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Eh(t){let e,n,r,i;const s=[Ch,kh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function wh(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:m=!1}=e,{id:p=void 0}=e,{preventScroll:d=void 0}=e,{el:g=void 0}=e;const{elements:{menubar:v},updateOption:_,ids:h,getMenubarAttrs:k}=hh({loop:f,closeOnEscape:c,preventScroll:d});x(t,v,P=>n(11,o=P));const O=ze([h.menubar],([P])=>({menubar:P}));x(t,O,P=>n(3,u=P));const S=k("root");function C(P){Ce[P?"unshift":"push"](()=>{g=P,n(0,g)})}return t.$$set=P=>{e=ie(ie({},e),yt(P)),n(6,s=Ke(e,i)),"loop"in P&&n(7,f=P.loop),"closeOnEscape"in P&&n(8,c=P.closeOnEscape),"asChild"in P&&n(1,m=P.asChild),"id"in P&&n(9,p=P.id),"preventScroll"in P&&n(10,d=P.preventScroll),"el"in P&&n(0,g=P.el),"$$scope"in P&&n(12,a=P.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&p&&h.menubar.set(p),t.$$.dirty&128&&_("loop",f),t.$$.dirty&256&&_("closeOnEscape",c),t.$$.dirty&1024&&_("preventScroll",d),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,S)},[g,m,r,u,v,O,s,f,c,p,d,o,a,l,C]}class Oh extends ve{constructor(e){super(),ye(this,e,wh,Eh,fe,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const Ah=t=>({menuIds:t&1}),Bl=t=>({menuIds:t[0]});function Th(t){let e;const n=t[15].default,r=de(n,t,t[14],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&pe(r,n,i,i[14],e?me(n,i[14],s,Ah):he(i[14]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function $h(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{closeOnOutsideClick:o=void 0}=e,{closeOnEscape:u=void 0}=e,{portal:l=void 0}=e,{open:a=void 0}=e,{onOpenChange:f=void 0}=e,{loop:c=void 0}=e,{dir:m=void 0}=e,{typeahead:p=void 0}=e,{closeFocus:d=void 0}=e,{disableFocusFirstItem:g=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:_=void 0}=e;const{states:{open:h},updateOption:k,ids:O}=gh({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:m,typeahead:p,closeFocus:d,disableFocusFirstItem:g,closeOnItemClick:v,onOutsideClick:_,onOpenChange:({next:C})=>(a!==C&&(f==null||f(C),n(2,a=C)),C)}),S=ze([O.menu,O.trigger],([C,P])=>({menu:C,trigger:P}));return x(t,S,C=>n(0,r=C)),t.$$set=C=>{"closeOnOutsideClick"in C&&n(3,o=C.closeOnOutsideClick),"closeOnEscape"in C&&n(4,u=C.closeOnEscape),"portal"in C&&n(5,l=C.portal),"open"in C&&n(2,a=C.open),"onOpenChange"in C&&n(6,f=C.onOpenChange),"loop"in C&&n(7,c=C.loop),"dir"in C&&n(8,m=C.dir),"typeahead"in C&&n(9,p=C.typeahead),"closeFocus"in C&&n(10,d=C.closeFocus),"disableFocusFirstItem"in C&&n(11,g=C.disableFocusFirstItem),"closeOnItemClick"in C&&n(12,v=C.closeOnItemClick),"onOutsideClick"in C&&n(13,_=C.onOutsideClick),"$$scope"in C&&n(14,s=C.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&h.set(a),t.$$.dirty&8&&k("closeOnOutsideClick",o),t.$$.dirty&16&&k("closeOnEscape",u),t.$$.dirty&32&&k("portal",l),t.$$.dirty&128&&k("loop",c),t.$$.dirty&256&&k("dir",m),t.$$.dirty&1024&&k("closeFocus",d),t.$$.dirty&2048&&k("disableFocusFirstItem",g),t.$$.dirty&512&&k("typeahead",p),t.$$.dirty&4096&&k("closeOnItemClick",v),t.$$.dirty&8192&&k("onOutsideClick",_)},[r,S,a,o,u,l,f,c,m,p,d,g,v,_,s,i]}class ms extends ve{constructor(e){super(),ye(this,e,$h,Th,fe,{closeOnOutsideClick:3,closeOnEscape:4,portal:5,open:2,onOpenChange:6,loop:7,dir:8,typeahead:9,closeFocus:10,disableFocusFirstItem:11,closeOnItemClick:12,onOutsideClick:13})}}const Sh=t=>({builder:t&4}),Kl=t=>({builder:t[2]}),Rh=t=>({builder:t&4}),jl=t=>({builder:t[2]});function Dh(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],Kl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("button"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerenter",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,Sh):he(a[8]),Kl),oe(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function Fh(t){let e;const n=t[9].default,r=de(n,t,t[8],jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,Rh):he(i[8]),jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ph(t){let e,n,r,i;const s=[Fh,Dh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Lh(t,e,n){let r;const i=["asChild","id","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{id:f=void 0}=e,{el:c=void 0}=e;const{elements:{trigger:m},ids:p,getAttrs:d}=bh();x(t,m,h=>n(7,o=h));const g=Pn(),v=d("trigger");function _(h){Ce[h?"unshift":"push"](()=>{c=h,n(0,c)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(5,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"id"in h&&n(6,f=h.id),"el"in h&&n(0,c=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f&&p.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[c,a,r,m,g,s,f,o,l,u,_]}class ps extends ve{constructor(e){super(),ye(this,e,Lh,Ph,fe,{asChild:1,id:6,el:0})}}const Ih=t=>({ids:t&1}),ql=t=>({ids:t[0]});function Mh(t){let e;const n=t[13].default,r=de(n,t,t[12],ql);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&4097)&&pe(r,n,i,i[12],e?me(n,i[12],s,Ih):he(i[12]),ql)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Nh(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{disableFocusTrap:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{preventScroll:a=void 0}=e,{portal:f=void 0}=e,{open:c=void 0}=e,{onOpenChange:m=void 0}=e,{openFocus:p=void 0}=e,{closeFocus:d=void 0}=e,{onOutsideClick:g=void 0}=e;const{updateOption:v,states:{open:_},ids:h}=np({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:p,closeFocus:d,onOutsideClick:g,onOpenChange:({next:O})=>(c!==O&&(m==null||m(O),n(2,c=O)),O),positioning:{gutter:0,offset:{mainAxis:1}}}),k=ze([h.content,h.trigger],([O,S])=>({content:O,trigger:S}));return x(t,k,O=>n(0,r=O)),t.$$set=O=>{"disableFocusTrap"in O&&n(3,o=O.disableFocusTrap),"closeOnEscape"in O&&n(4,u=O.closeOnEscape),"closeOnOutsideClick"in O&&n(5,l=O.closeOnOutsideClick),"preventScroll"in O&&n(6,a=O.preventScroll),"portal"in O&&n(7,f=O.portal),"open"in O&&n(2,c=O.open),"onOpenChange"in O&&n(8,m=O.onOpenChange),"openFocus"in O&&n(9,p=O.openFocus),"closeFocus"in O&&n(10,d=O.closeFocus),"onOutsideClick"in O&&n(11,g=O.onOutsideClick),"$$scope"in O&&n(12,s=O.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&_.set(c),t.$$.dirty&8&&v("disableFocusTrap",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("preventScroll",a),t.$$.dirty&128&&v("portal",f),t.$$.dirty&512&&v("openFocus",p),t.$$.dirty&1024&&v("closeFocus",d),t.$$.dirty&2048&&v("onOutsideClick",g)},[r,k,c,o,u,l,a,f,m,p,d,g,s,i]}class Hh extends ve{constructor(e){super(),ye(this,e,Nh,Mh,fe,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const Vh=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),Uh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),Bh=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),Kh=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]}),jh=t=>({builder:t[0]&256}),Yl=t=>({builder:t[8]}),qh=t=>({builder:t[0]&256}),Zl=t=>({builder:t[8]});function Wh(t){let e,n,r,i;const s=t[27].default,o=de(s,t,t[26],Wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=Ue(t[8].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f[0]&67109120)&&pe(o,s,a,a[26],n?me(s,a[26],f,Vh):he(a[26]),Wl),oe(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[32](null),r=!1,i()}}}function Qh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],Ql);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,Uh):he(t[26]),Ql),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){y(u,f),f&&(n=Fn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),f&&n&&n.end(),i=!1,s()}}}function zh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],zl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,Bh):he(t[26]),zl),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Dn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[30](null),i=!1,s()}}}function Gh(t){let e,n,r,i,s,o;const u=t[27].default,l=de(u,t,t[26],Gl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=R("div"),l&&l.c(),oe(e,f)},m(c,m){w(c,e,m),l&&l.m(e,null),t[29](e),i=!0,s||(o=Ue(t[8].action(e)),s=!0)},p(c,m){t=c,l&&l.p&&(!i||m[0]&67109120)&&pe(l,u,t,t[26],i?me(u,t[26],m,Kh):he(t[26]),Gl),oe(e,f=Me(a,[m[0]&256&&t[8],m[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Fn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[29](null),c&&r&&r.end(),s=!1,o()}}}function Yh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],Yl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=R("div"),u&&u.c(),oe(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,jh):he(t[26]),Yl),oe(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[28](null),f&&n&&n.end(),i=!1,s()}}}function Zh(t){let e;const n=t[27].default,r=de(n,t,t[26],Zl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&67109120)&&pe(r,n,i,i[26],e?me(n,i[26],s,qh):he(i[26]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Xh(t){let e,n,r,i;const s=[Zh,Yh,Gh,zh,Qh,Wh],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Jh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:m=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:d=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{id:_=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:S=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:P=!0}=e,{collisionBoundary:D=void 0}=e,{sameWidth:q=!1}=e,{fitViewport:M=!1}=e,{strategy:$="absolute"}=e,{overlap:U=!1}=e,{el:A=void 0}=e;const{elements:{content:L},states:{open:W},ids:B,getAttrs:ee}=Ao();x(t,L,Y=>n(25,u=Y)),x(t,W,Y=>n(9,o=Y));const re=ee("content");function z(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function le(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function Re(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function st(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function He(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}return t.$$set=Y=>{e=ie(ie({},e),yt(Y)),n(12,s=Ke(e,i)),"transition"in Y&&n(1,f=Y.transition),"transitionConfig"in Y&&n(2,c=Y.transitionConfig),"inTransition"in Y&&n(3,m=Y.inTransition),"inTransitionConfig"in Y&&n(4,p=Y.inTransitionConfig),"outTransition"in Y&&n(5,d=Y.outTransition),"outTransitionConfig"in Y&&n(6,g=Y.outTransitionConfig),"asChild"in Y&&n(7,v=Y.asChild),"id"in Y&&n(13,_=Y.id),"side"in Y&&n(14,h=Y.side),"align"in Y&&n(15,k=Y.align),"sideOffset"in Y&&n(16,O=Y.sideOffset),"alignOffset"in Y&&n(17,S=Y.alignOffset),"collisionPadding"in Y&&n(18,C=Y.collisionPadding),"avoidCollisions"in Y&&n(19,P=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,D=Y.collisionBoundary),"sameWidth"in Y&&n(21,q=Y.sameWidth),"fitViewport"in Y&&n(22,M=Y.fitViewport),"strategy"in Y&&n(23,$=Y.strategy),"overlap"in Y&&n(24,U=Y.overlap),"el"in Y&&n(0,A=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&_&&B.content.set(_),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,re),t.$$.dirty[0]&33538560&&o&&rp({side:h,align:k,sideOffset:O,alignOffset:S,collisionPadding:C,avoidCollisions:P,collisionBoundary:D,sameWidth:q,fitViewport:M,strategy:$,overlap:U})},[A,f,c,m,p,d,g,v,r,o,L,W,s,_,h,k,O,S,C,P,D,q,M,$,U,u,a,l,z,le,Re,st,He]}class xh extends ve{constructor(e){super(),ye(this,e,Jh,Xh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,side:14,align:15,sideOffset:16,alignOffset:17,collisionPadding:18,avoidCollisions:19,collisionBoundary:20,sameWidth:21,fitViewport:22,strategy:23,overlap:24,el:0},null,[-1,-1])}}const e1=t=>({builder:t&4}),Xl=t=>({builder:t[2]}),t1=t=>({builder:t&4}),Jl=t=>({builder:t[2]});function n1(t){let e,n,r,i;const s=t[12].default,o=de(s,t,t[11],Xl);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("button"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[13](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"m-click",t[5]),G(e,"m-keydown",t[5])],r=!0)},p(a,f){o&&o.p&&(!n||f&2052)&&pe(o,s,a,a[11],n?me(s,a[11],f,e1):he(a[11]),Xl),oe(e,l=Me(u,[f&4&&a[2],{type:"button"},f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function r1(t){let e;const n=t[12].default,r=de(n,t,t[11],Jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&2052)&&pe(r,n,i,i[11],e?me(n,i[11],s,t1):he(i[11]),Jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function i1(t){let e,n,r,i;const s=[r1,n1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function s1(t,e,n){let r,i;const s=["asChild","id","el"];let o=Ke(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:m=void 0}=e,{el:p=void 0}=e;const{elements:{trigger:d},states:{open:g},ids:v,getAttrs:_}=Ao();x(t,d,S=>n(9,u=S)),x(t,g,S=>n(10,l=S));const h=Pn(),k=_("trigger");function O(S){Ce[S?"unshift":"push"](()=>{p=S,n(0,p)})}return t.$$set=S=>{e=ie(ie({},e),yt(S)),n(6,o=Ke(e,s)),"asChild"in S&&n(1,c=S.asChild),"id"in S&&n(7,m=S.id),"el"in S&&n(0,p=S.el),"$$scope"in S&&n(11,f=S.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&m&&v.trigger.set(m),t.$$.dirty&1024&&n(8,r={...k,"aria-controls":l?v.content:void 0}),t.$$.dirty&512&&n(2,i=u),t.$$.dirty&260&&Object.assign(i,r)},[p,c,i,d,g,h,o,m,r,u,l,f,a,O]}class o1 extends ve{constructor(e){super(),ye(this,e,s1,i1,fe,{asChild:1,id:7,el:0})}}function rf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function l1(t){const{NAME:e,PARTS:n}=rf(),r=ii(e,n),i={...wm(hi(t)),getAttrs:r};return At(e,i),{...i,updateOption:_i(i.options)}}function u1(){const{NAME:t}=rf();return bt(t)}const a1=t=>({builder:t&4}),xl=t=>({builder:t[2]}),f1=t=>({builder:t&4}),eu=t=>({builder:t[2]});function c1(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],xl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("div"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,a1):he(a[8]),xl),oe(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function d1(t){let e;const n=t[9].default,r=de(n,t,t[8],eu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,f1):he(i[8]),eu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function m1(t){let e,n,r,i;const s=[d1,c1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function p1(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{loop:a=!0}=e,{orientation:f=void 0}=e,{asChild:c=!1}=e,{el:m=void 0}=e;const{elements:{root:p},updateOption:d,getAttrs:g}=l1({loop:a,orientation:f});x(t,p,h=>n(7,o=h));const v=g("root");function _(h){Ce[h?"unshift":"push"](()=>{m=h,n(0,m)})}return t.$$set=h=>{e=ie(ie({},e),yt(h)),n(4,s=Ke(e,i)),"loop"in h&&n(5,a=h.loop),"orientation"in h&&n(6,f=h.orientation),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,m=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&d("loop",a),t.$$.dirty&64&&d("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[m,c,r,p,s,a,f,o,l,u,_]}class h1 extends ve{constructor(e){super(),ye(this,e,p1,m1,fe,{loop:5,orientation:6,asChild:1,el:0})}}const _1=t=>({builder:t&4}),tu=t=>({builder:t[2]}),g1=t=>({builder:t&4}),nu=t=>({builder:t[2]});function b1(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],tu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=R("button"),o&&o.c(),oe(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Ue(t[2].action(e)),G(e,"click",t[9]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,_1):he(a[7]),tu),oe(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function y1(t){let e;const n=t[8].default,r=de(n,t,t[7],nu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,g1):he(i[7]),nu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function v1(t){let e,n,r,i;const s=[y1,b1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function k1(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:m}=u1();x(t,c,_=>n(6,o=_));const p=Pn(),d=m("button");function g(_){Oe.call(this,t,_)}function v(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ie(ie({},e),yt(_)),n(5,s=Ke(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(7,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,d)},[f,a,r,c,p,s,o,l,u,g,v]}class C1 extends ve{constructor(e){super(),ye(this,e,k1,v1,fe,{asChild:1,el:0})}}var ly="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",E1="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",w1="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",uy="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",ay="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",fy="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",O1="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z",A1="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",T1="M19,3H5C3.89,3 3,3.89 3,5V9H5V5H19V19H5V15H3V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10.08,15.58L11.5,17L16.5,12L11.5,7L10.08,8.41L12.67,11H3V13H12.67L10.08,15.58Z",$1="M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H12V20H6V4H13V9H18V12H20V8L14 2M18 14C17.87 14 17.76 14.09 17.74 14.21L17.55 15.53C17.25 15.66 16.96 15.82 16.7 16L15.46 15.5C15.35 15.5 15.22 15.5 15.15 15.63L14.15 17.36C14.09 17.47 14.11 17.6 14.21 17.68L15.27 18.5C15.25 18.67 15.24 18.83 15.24 19C15.24 19.17 15.25 19.33 15.27 19.5L14.21 20.32C14.12 20.4 14.09 20.53 14.15 20.64L15.15 22.37C15.21 22.5 15.34 22.5 15.46 22.5L16.7 22C16.96 22.18 17.24 22.35 17.55 22.47L17.74 23.79C17.76 23.91 17.86 24 18 24H20C20.11 24 20.22 23.91 20.24 23.79L20.43 22.47C20.73 22.34 21 22.18 21.27 22L22.5 22.5C22.63 22.5 22.76 22.5 22.83 22.37L23.83 20.64C23.89 20.53 23.86 20.4 23.77 20.32L22.7 19.5C22.72 19.33 22.74 19.17 22.74 19C22.74 18.83 22.73 18.67 22.7 18.5L23.76 17.68C23.85 17.6 23.88 17.47 23.82 17.36L22.82 15.63C22.76 15.5 22.63 15.5 22.5 15.5L21.27 16C21 15.82 20.73 15.65 20.42 15.53L20.23 14.21C20.22 14.09 20.11 14 20 14M19 17.5C19.83 17.5 20.5 18.17 20.5 19C20.5 19.83 19.83 20.5 19 20.5C18.16 20.5 17.5 19.83 17.5 19C17.5 18.17 18.17 17.5 19 17.5Z",S1="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",R1="M23 18H20V15H18V18H15V20H18V23H20V20H23M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H13.81C13.45 21.38 13.2 20.7 13.08 20H6V4H13V9H18V13.08C18.33 13.03 18.67 13 19 13C19.34 13 19.67 13.03 20 13.08V8L14 2M8 12V14H16V12M8 16V18H13V16Z",D1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M17,13V19H7L12,14L14,16M10,10.5A1.5,1.5 0 0,1 8.5,12A1.5,1.5 0 0,1 7,10.5A1.5,1.5 0 0,1 8.5,9A1.5,1.5 0 0,1 10,10.5Z",F1="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",P1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z",L1="M4 18H12.13L11 19.13V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V10.15C21.74 10.06 21.46 10 21.17 10C20.75 10 20.36 10.11 20 10.3V8H4V18M22.85 13.47L21.53 12.15C21.33 11.95 21 11.95 20.81 12.15L19.83 13.13L21.87 15.17L22.85 14.19C23.05 14 23.05 13.67 22.85 13.47M13 19.96V22H15.04L21.17 15.88L19.13 13.83L13 19.96Z",I1="M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z",M1="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z",N1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z",H1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M22.54 16.88L21.12 15.47L19 17.59L16.88 15.47L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88Z",V1="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",cy="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",U1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M17 14V17H14V19H17V22H19V19H22V17H19V14H17Z",B1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M20.12 14.46L18 16.59L15.88 14.47L14.47 15.88L16.59 18L14.47 20.12L15.88 21.54L18 19.41L20.12 21.54L21.54 20.12L19.41 18L21.54 15.88L20.12 14.46Z",K1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M18 13V14.5C20.21 14.5 22 16.29 22 18.5C22 19.32 21.75 20.08 21.33 20.71L20.24 19.62C20.41 19.28 20.5 18.9 20.5 18.5C20.5 17.12 19.38 16 18 16V17.5L15.75 15.25L15.72 15.22C15.78 15.17 15.85 15.13 18 13M18 24V22.5C15.79 22.5 14 20.71 14 18.5C14 17.68 14.25 16.92 14.67 16.29L15.76 17.38C15.59 17.72 15.5 18.1 15.5 18.5C15.5 19.88 16.62 21 18 21V19.5L20.25 21.75L20.28 21.78C20.22 21.83 20.15 21.87 18 24",zt="M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z",j1="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",dy="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",q1="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function W1(t){let e,n,r,i,s=t[0]!==null&&ru(t);return{c(){e=Ps("svg"),s&&s.c(),n=Ps("path"),I(n,"d",t[1]),I(e,"class",r="fill-current "+t[2]),I(e,"viewBox","0 0 24 24"),I(e,"aria-hidden",i=t[0]===null?"true":"false")},m(o,u){w(o,e,u),s&&s.m(e,null),F(e,n)},p(o,u){o[0]!==null?s?s.p(o,u):(s=ru(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&I(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&I(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&I(e,"aria-hidden",i)},d(o){o&&E(e),s&&s.d()}}}function Q1(t){let e,n;return{c(){e=R("span"),I(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&I(e,"class",n)},d(r){r&&E(e)}}}function ru(t){let e,n;return{c(){e=Ps("title"),n=Z(t[0])},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&1&&je(n,r[0])},d(r){r&&E(e)}}}function z1(t){let e;function n(s,o){return s[1]===null?Q1:W1}let r=n(t),i=r(t);return{c(){i.c(),e=Se()},m(s,o){i.m(s,o),w(s,e,o)},p(s,[o]){r===(r=n(s))&&i?i.p(s,o):(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},i:ce,o:ce,d(s){s&&E(e),i.d(s)}}}function G1(t,e,n){let{label:r=null}=e,{path:i=null}=e,{class:s="w-6 h-6"}=e;return t.$$set=o=>{"label"in o&&n(0,r=o.label),"path"in o&&n(1,i=o.path),"class"in o&&n(2,s=o.class)},[r,i,s]}class Ne extends ve{constructor(e){super(),ye(this,e,G1,z1,fe,{label:0,path:1,class:2})}}async function cn({queryKey:t}){if(t){const e=["/api"];for(const r of t)r!==""&&(r[0]==="?"||r[0]==="&"||e.push("/"),e.push(r));let n=await window.fetch(e.join(""));if(n.ok)return await n.json()}throw new Error("Could not fetch data")}function sf(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(sf(n));return e.join("")}}function my(t){return t.content&&t.content.length>0?sf(t.content[0]):"<Empty Document>"}function of(t,e){let n=window.location.hash;n.startsWith("#")&&(n=n.substring(1));let r=new URLSearchParams(n);r.set(t,e),window.location.hash=r.toString()}function lf(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);return n.has(t)?n.get(t):null}function Y1(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);n.has(t)&&(n.delete(t),window.location.hash=n.toString())}function ts(t){return t[0].toUpperCase()+t.substring(1)}const ft=Fe(null),Z1=Fe(null),iu=Fe(!1);ft.subscribe(t=>{t!==null&&of("path",t.fullpath)});function Ci(){return bt("apiStatus")}function To(){return bt("currentUser")}function Et(){return bt("currentBranch")}function $o(){return bt("branches")}function su(t,e,n){const r=t.slice();return r[7]=e[n],r}function X1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),s=Z(i),o=Z(" actions running"),I(r,"class","pl-2")},m(l,a){N(e,l,a),w(l,n,a),w(l,r,a),F(r,s),F(r,o),u=!0},p(l,a){(!u||a&3)&&i!==(i=l[0].length+l[1]+"")&&je(s,i)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),H(e,l)}}}function J1(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="1 action running",I(r,"class","pl-2")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function x1(t){let e;return{c(){e=R("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function e_(t){let e,n,r,i;const s=[x1,J1,X1],o=[];function u(l,a){return l[0].length+l[1]===0?0:l[0].length+l[1]===1?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function t_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Saving file",I(r,"class","flex-1")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function n_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Loading file",I(r,"class","flex-1")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function ou(t){let e,n,r,i;const s=[n_,t_],o=[];function u(l,a){return l[7].action==="LoadTextFile"?0:l[7].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=R("li"),r&&r.c(),I(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,a){let f=n;n=u(l),n!==f&&(r&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~n?(r=o[n],r||(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function lu(t){let e,n,r,i,s;return n=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=R("li"),V(n.$$.fragment),r=K(),i=R("span"),i.textContent="Fetching branches",I(i,"class","flex-1"),I(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(o,u){w(o,e,u),N(n,e,null),F(e,r),F(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),s=!1},d(o){o&&E(e),H(n)}}}function r_(t){let e,n,r,i=tn(t[0]),s=[];for(let l=0;l<i.length;l+=1)s[l]=ou(su(t,i,l));const o=l=>y(s[l],1,1,()=>{s[l]=null});let u=t[2].isFetching&&lu();return{c(){e=R("ul");for(let l=0;l<s.length;l+=1)s[l].c();n=K(),u&&u.c()},m(l,a){w(l,e,a);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);F(e,n),u&&u.m(e,null),r=!0},p(l,a){if(a&1){i=tn(l[0]);let f;for(f=0;f<i.length;f+=1){const c=su(l,i,f);s[f]?(s[f].p(c,a),b(s[f],1)):(s[f]=ou(c),s[f].c(),b(s[f],1),s[f].m(e,n))}for(_e(),f=i.length;f<s.length;f+=1)o(f);ge()}l[2].isFetching?u?a&4&&b(u,1):(u=lu(),u.c(),b(u,1),u.m(e,null)):u&&(_e(),y(u,1,1,()=>{u=null}),ge())},i(l){if(!r){for(let a=0;a<i.length;a+=1)b(s[a]);b(u),r=!0}},o(l){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)y(s[a]);y(u),r=!1},d(l){l&&E(e),fi(s,l),u&&u.d()}}}function i_(t){let e,n,r,i;return e=new o1({props:{class:"inline-flex items-center",$$slots:{default:[e_]},$$scope:{ctx:t}}}),r=new xh({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[r_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&1027&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&1029&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function uu(t){let e,n;return e=new si({props:{open:!0,onOpenChange:t[6],$$slots:{default:[a_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function s_(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function o_(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function l_(t){let e,n,r,i,s,o,u,l;return e=new Tt({props:{$$slots:{default:[s_]},$$scope:{ctx:t}}}),u=new Mt({props:{"data-button":!0,$$slots:{default:[o_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("div"),i=R("p"),i.textContent="Unfortunately saving the file failed.",s=K(),o=R("div"),V(u.$$.fragment),I(o,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(a,f){N(e,a,f),w(a,n,f),w(a,r,f),F(r,i),F(r,s),F(r,o),N(u,o,null),l=!0},p(a,f){const c={};f&1024&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const m={};f&1024&&(m.$$scope={dirty:f,ctx:a}),u.$set(m)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(E(n),E(r)),H(e,a),H(u)}}}function u_(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[l_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function a_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[u_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function f_(t){let e,n,r,i;e=new Hh({props:{$$slots:{default:[i_]},$$scope:{ctx:t}}});let s=t[3]&&uu(t);return{c(){V(e.$$.fragment),n=K(),s&&s.c(),r=Se()},m(o,u){N(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&1031&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[3]?s?(s.p(o,u),u&8&&b(s,1)):(s=uu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(_e(),y(s,1,1,()=>{s=null}),ge())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),H(e,o),s&&s.d(o)}}}const io=Fe([]);let so=Fe(!1);function uf(t){t.status="active",io.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=c_(t):t.action==="SaveCurrentFile"?e=d_(t):t.action==="SynchroniseBranches"&&(e=m_(t)),e!==null&&e.then(()=>{io.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function c_(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function d_(t){const e=new FormData;e.append("content",new Blob([t.data])),(await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename,{method:"PUT",body:e})).ok?t.callback():so.set(!0)}async function m_(t){await window.fetch("/api/branches",{method:"PATCH"}),t.callback&&t.callback()}function p_(t,e,n){let r,i,s,o;x(t,io,f=>n(0,r=f)),x(t,so,f=>n(3,o=f));const u=$o();x(t,u,f=>n(2,s=f));const l=ze([u],f=>{let c=0;for(const m of f)m!==null&&m.isFetching&&(c=c+1);return c});return x(t,l,f=>n(1,i=f)),[r,i,s,o,u,l,f=>{f||so.set(!1)}]}let h_=class extends ve{constructor(e){super(),ye(this,e,p_,f_,fe,{})}};function __(t){let e;const n=t[3].default,r=de(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&pe(r,n,i,i[5],e?me(n,i[5],s,null):he(i[5]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function g_(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[__]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function b_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[g_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function y_(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[b_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new si({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&32&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function v_(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=null;let{open:o=!1}=e;function u(a){a||Ge.set(Ae.NONE)}rs(()=>{n(0,o=!0)});function l(a){o=a,n(0,o)}return t.$$set=a=>{"open"in a&&n(0,o=a.open),"$$scope"in a&&n(5,i=a.$$scope)},[o,u,s,r,l,i]}class Gt extends ve{constructor(e){super(),ye(this,e,v_,y_,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function k_(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function au(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function C_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[w_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("button"),r.textContent="Create",I(r,"type","submit"),I(r,"data-button","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function E_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=R("span"),V(n.$$.fragment),r=R("span"),r.textContent="Creating...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),N(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),H(n)}}}function w_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function O_(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g;e=new Tt({props:{$$slots:{default:[k_]},$$scope:{ctx:t}}});let v=t[2]&&au(t);const _=[E_,C_],h=[];function k(O,S){return O[3].isPending?0:1}return c=k(t),m=h[c]=_[c](t),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New branch title",o=K(),u=R("input"),l=K(),v&&v.c(),a=K(),f=R("div"),m.c(),I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(O,S){N(e,O,S),w(O,n,S),w(O,r,S),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),v&&v.m(i,null),F(r,a),F(r,f),h[c].m(f,null),p=!0,d||(g=[G(u,"input",t[7]),G(r,"submit",t[6])],d=!0)},p(O,S){const C={};S&2048&&(C.$$scope={dirty:S,ctx:O}),e.$set(C),S&2&&u.value!==O[1]&&it(u,O[1]),O[2]?v?v.p(O,S):(v=au(O),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let P=c;c=k(O),c!==P&&(_e(),y(h[P],1,1,()=>{h[P]=null}),ge(),m=h[c],m||(m=h[c]=_[c](O),m.c()),b(m,1),m.m(f,null))},i(O){p||(b(e.$$.fragment,O),b(m),p=!0)},o(O){y(e.$$.fragment,O),y(m),p=!1},d(O){O&&(E(n),E(r)),H(e,O),v&&v.d(),h[c].d(),d=!1,Te(g)}}}function A_(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[O_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function T_(t,e,n){let r;const i=vt(),s=Et();let o=!1,u="",l="";function a(d){d&&n(1,u="")}const f=di({mutationFn:async d=>{const g=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:d.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(g.ok){i.invalidateQueries({queryKey:["branches"]});const v=await g.json();s.set(v),Ge.set(Ae.NONE)}else n(2,l=(await g.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});x(t,f,d=>n(3,r=d));async function c(d){d.preventDefault(),r.mutate({title:u})}function m(){u=this.value,n(1,u)}function p(d){o=d,n(0,o)}return[o,u,l,r,a,f,c,m,p]}class $_ extends ve{constructor(e){super(),ye(this,e,T_,A_,fe,{})}}function S_(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function fu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function R_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[F_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("button"),r.textContent="Delete",I(r,"type","submit"),I(r,"data-button","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function D_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=R("span"),V(n.$$.fragment),r=R("span"),r.textContent="Deleting...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),N(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),H(n)}}}function F_(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function P_(t){var W;let e,n,r,i,s,o,u=((W=t[5])==null?void 0:W.title)+"",l,a,f,c,m,p,d,g,v,_,h,k,O,S,C,P,D,q,M;e=new Tt({props:{$$slots:{default:[S_]},$$scope:{ctx:t}}});let $=t[2]&&fu(t);const U=[D_,R_],A=[];function L(B,ee){return B[4].isPending?0:1}return C=L(t),P=A[C]=U[C](t),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("p"),s=Z("Please confirm you wish to delete the branch "),o=R("span"),l=Z(u),a=Z(`. This cannot be undone. To confirm the action, please enter the name of
13
+ the branch to delete.`),f=K(),c=R("label"),m=R("span"),m.textContent="Confirm branch name",p=K(),d=R("input"),g=K(),$&&$.c(),v=K(),_=R("label"),h=R("input"),k=Z(` Only delete the local
14
+ branch`),O=K(),S=R("div"),P.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(m,"data-form-field-label",""),I(d,"type","text"),I(d,"data-form-field-text",""),I(c,"class","block mb-4"),I(h,"type","checkbox"),I(_,"class","block text-sm"),I(S,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(B,ee){N(e,B,ee),w(B,n,ee),w(B,r,ee),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,m),F(c,p),F(c,d),it(d,t[1]),F(c,g),$&&$.m(c,null),F(r,v),F(r,_),F(_,h),h.checked=t[3],F(_,k),F(r,O),F(r,S),A[C].m(S,null),D=!0,q||(M=[G(d,"input",t[10]),G(h,"change",t[11]),G(r,"submit",t[9])],q=!0)},p(B,ee){var le;const re={};ee&16384&&(re.$$scope={dirty:ee,ctx:B}),e.$set(re),(!D||ee&32)&&u!==(u=((le=B[5])==null?void 0:le.title)+"")&&je(l,u),ee&2&&d.value!==B[1]&&it(d,B[1]),B[2]?$?$.p(B,ee):($=fu(B),$.c(),$.m(c,null)):$&&($.d(1),$=null),ee&8&&(h.checked=B[3]);let z=C;C=L(B),C!==z&&(_e(),y(A[z],1,1,()=>{A[z]=null}),ge(),P=A[C],P||(P=A[C]=U[C](B),P.c()),b(P,1),P.m(S,null))},i(B){D||(b(e.$$.fragment,B),b(P),D=!0)},o(B){y(e.$$.fragment,B),y(P),D=!1},d(B){B&&(E(n),E(r)),H(e,B),$&&$.d(),A[C].d(),q=!1,Te(M)}}}function L_(t){let e,n,r;function i(o){t[12](o)}let s={onOpenChange:t[7],$$slots:{default:[P_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&16446&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function I_(t,e,n){let r,i;const s=vt(),o=Et();x(t,o,_=>n(5,i=_));let u=!1,l="",a="",f=!1;function c(_){_&&n(1,l="")}const m=di({mutationFn:async()=>{const _=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json","X-UEDITOR-DELETE-LOCAL-ONLY":f?"true":"false"}});_.ok?(s.invalidateQueries({queryKey:["branches"]}),o.set(null),Ge.set(Ae.NONE)):(n(2,a=(await _.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}});x(t,m,_=>n(4,r=_));function p(_){_.preventDefault(),(i==null?void 0:i.title)===l?(n(2,a=""),r.mutate()):n(2,a="Please enter the exact name of the branch to delete.")}function d(){l=this.value,n(1,l)}function g(){f=this.checked,n(3,f)}function v(_){u=_,n(0,u)}return[u,l,a,f,r,i,o,c,m,p,d,g,v]}class M_ extends ve{constructor(e){super(),ye(this,e,I_,L_,fe,{})}}function cu(t,e,n){const r=t.slice();return r[14]=e[n],r}function N_(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function du(t){let e,n=t[14].title+"",r,i;return{c(){e=R("option"),r=Z(n),e.__value=i=t[14].id,it(e,e.__value)},m(s,o){w(s,e,o),F(e,r)},p(s,o){o&16&&n!==(n=s[14].title+"")&&je(r,n),o&16&&i!==(i=s[14].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&E(e)}}}function mu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function H_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[U_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("button"),r.textContent="Import",I(r,"type","submit"),I(r,"data-button","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function V_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=R("span"),V(n.$$.fragment),r=R("span"),r.textContent="Importing...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),N(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),H(n)}}}function U_(t){let e;return{c(){e=Z("Don't import")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function B_(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g;e=new Tt({props:{$$slots:{default:[N_]},$$scope:{ctx:t}}});let v=tn(t[4]),_=[];for(let C=0;C<v.length;C+=1)_[C]=du(cu(t,v,C));let h=t[2]&&mu(t);const k=[V_,H_],O=[];function S(C,P){return C[3].isPending?0:1}return c=S(t),m=O[c]=k[c](t),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New branch title",o=K(),u=R("select");for(let C=0;C<_.length;C+=1)_[C].c();l=K(),h&&h.c(),a=K(),f=R("div"),m.c(),I(s,"data-form-field-label",""),I(u,"data-form-field-text",""),t[1]===void 0&&at(()=>t[9].call(u)),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(C,P){N(e,C,P),w(C,n,P),w(C,r,P),F(r,i),F(i,s),F(i,o),F(i,u);for(let D=0;D<_.length;D+=1)_[D]&&_[D].m(u,null);Io(u,t[1],!0),F(i,l),h&&h.m(i,null),F(r,a),F(r,f),O[c].m(f,null),p=!0,d||(g=[G(u,"change",t[9]),G(r,"submit",t[8])],d=!0)},p(C,P){const D={};if(P&131072&&(D.$$scope={dirty:P,ctx:C}),e.$set(D),P&16){v=tn(C[4]);let M;for(M=0;M<v.length;M+=1){const $=cu(C,v,M);_[M]?_[M].p($,P):(_[M]=du($),_[M].c(),_[M].m(u,null))}for(;M<_.length;M+=1)_[M].d(1);_.length=v.length}P&18&&Io(u,C[1]),C[2]?h?h.p(C,P):(h=mu(C),h.c(),h.m(i,null)):h&&(h.d(1),h=null);let q=c;c=S(C),c!==q&&(_e(),y(O[q],1,1,()=>{O[q]=null}),ge(),m=O[c],m||(m=O[c]=k[c](C),m.c()),b(m,1),m.m(f,null))},i(C){p||(b(e.$$.fragment,C),b(m),p=!0)},o(C){y(e.$$.fragment,C),y(m),p=!1},d(C){C&&(E(n),E(r)),H(e,C),fi(_,C),h&&h.d(),O[c].d(),d=!1,Te(g)}}}function K_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[B_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&131102&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function j_(t,e,n){let r,i;const s=vt(),o=Et(),u=$o();let l=!1,a="",f="";function c(_){_&&n(1,a="")}const m=ze(u,_=>_.isSuccess?_.data.remote.filter(h=>{let k=!1;for(const O of _.data.local)if(h.id.endsWith("/"+O.id)){k=!0;break}return!k}).map(h=>({id:h.id.substring(h.id.indexOf("/")+1),title:h.title,nogit:!1})):[]);x(t,m,_=>n(4,i=_));const p=di({mutationFn:async _=>{const h=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:_.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(h.ok){s.invalidateQueries({queryKey:["branches"]});const k=await h.json();o.set(k),Ge.set(Ae.NONE)}else n(2,f=(await h.json()).detail[0].msg),n(2,f=f[0].toUpperCase()+f.substring(1))}});x(t,p,_=>n(3,r=_));async function d(_){_.preventDefault(),r.mutate({title:a})}function g(){a=Af(this),n(1,a)}function v(_){l=_,n(0,l)}return[l,a,f,r,i,c,m,p,d,g,v]}class q_ extends ve{constructor(e){super(),ye(this,e,j_,K_,fe,{})}}function W_(t){let e;return{c(){e=Z("Merge changes from the default branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function pu(t){let e,n;return{c(){e=R("p"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function Q_(t){let e,n,r,i;return e=new Mt({props:{"data-button":!0,$$slots:{default:[G_]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("button"),r.textContent="Merge",I(r,"type","submit"),I(r,"data-button","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function z_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=R("span"),V(n.$$.fragment),r=R("span"),r.textContent="Merging...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),N(n,e,null),F(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),H(n)}}}function G_(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Y_(t){var M;let e,n,r,i,s,o,u=ts(t[4].data.git.default_branch)+"",l,a,f,c=((M=t[3])==null?void 0:M.title)+"",m,p,d,g,v,_,h,k,O,S;e=new Tt({props:{$$slots:{default:[W_]},$$scope:{ctx:t}}});let C=t[1]&&pu(t);const P=[z_,Q_],D=[];function q($,U){return $[2].isPending?0:1}return _=q(t),h=D[_]=P[_](t),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=R("span"),l=Z(u),a=Z(`
15
+ into the current branch`),f=R("span"),m=Z(c),p=Z(". This cannot be undone."),d=K(),C&&C.c(),g=K(),v=R("div"),h.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(v,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m($,U){N(e,$,U),w($,n,U),w($,r,U),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(i,f),F(f,m),F(i,p),F(r,d),C&&C.m(r,null),F(r,g),F(r,v),D[_].m(v,null),k=!0,O||(S=G(r,"submit",t[9]),O=!0)},p($,U){var W;const A={};U&8192&&(A.$$scope={dirty:U,ctx:$}),e.$set(A),(!k||U&16)&&u!==(u=ts($[4].data.git.default_branch)+"")&&je(l,u),(!k||U&8)&&c!==(c=((W=$[3])==null?void 0:W.title)+"")&&je(m,c),$[1]?C?C.p($,U):(C=pu($),C.c(),C.m(r,g)):C&&(C.d(1),C=null);let L=_;_=q($),_!==L&&(_e(),y(D[L],1,1,()=>{D[L]=null}),ge(),h=D[_],h||(h=D[_]=P[_]($),h.c()),b(h,1),h.m(v,null))},i($){k||(b(e.$$.fragment,$),b(h),k=!0)},o($){y(e.$$.fragment,$),y(h),k=!1},d($){$&&(E(n),E(r)),H(e,$),C&&C.d(),D[_].d(),O=!1,S()}}}function Z_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[Y_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&8222&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function X_(t,e,n){let r,i,s;const o=vt(),u=Ci();x(t,u,g=>n(4,s=g));const l=Et();x(t,l,g=>n(3,i=g));let a=!1,f="";function c(g){}const m=di({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});g.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(Ae.NONE)):(n(1,f=(await g.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});x(t,m,g=>n(2,r=g));function p(g){g.preventDefault(),r.mutate()}function d(g){a=g,n(0,a)}return[a,f,r,i,s,u,l,c,m,p,d]}class J_ extends ve{constructor(e){super(),ye(this,e,X_,Z_,fe,{})}}function x_(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new Folder in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function hu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function eg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function tg(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v;e=new Tt({props:{$$slots:{default:[x_]},$$scope:{ctx:t}}});let _=t[2]&&hu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[eg]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New Folder Name",o=K(),u=R("input"),l=K(),_&&_.c(),a=K(),f=R("div"),V(c.$$.fragment),m=K(),p=R("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){N(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),_&&_.m(i,null),F(r,a),F(r,f),N(c,f,null),F(f,m),F(f,p),d=!0,g||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=hu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){d||(b(e.$$.fragment,h),b(c.$$.fragment,h),d=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),d=!1},d(h){h&&(E(n),E(r)),H(e,h),_&&_.d(),H(c),g=!1,Te(v)}}}function ng(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[tg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function rg(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){if(d.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const g=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder"}});g.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(d){d?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function m(){l=this.value,n(1,l)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}let ig=class extends ve{constructor(e){super(),ye(this,e,rg,ng,fe,{})}};function sg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=R("span"),i=Z(r),I(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),F(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&je(i,r)},d(o){o&&(E(e),E(n))}}}function _u(t){let e,n;return{c(){e=R("span"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function og(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function lg(t){var q;let e,n,r,i,s,o,u=((q=t[3])==null?void 0:q.fullpath)+"",l,a,f,c,m,p,d,g,v,_,h,k,O,S,C,P;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[sg]},$$scope:{ctx:t}}});let D=t[1]&&_u(t);return h=new Mt({props:{"data-button":!0,$$slots:{default:[og]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("p"),s=Z("Please confirm you wish to delete the folder "),o=R("span"),l=Z(u),a=Z(`
16
+ and all the files and folders within that. To confirm the action, please enter
17
+ the name of the folder to delete.`),f=K(),c=R("label"),m=R("span"),m.textContent="Confirmation Folder Name",p=K(),d=R("input"),g=K(),D&&D.c(),v=K(),_=R("div"),V(h.$$.fragment),k=K(),O=R("button"),O.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(m,"data-form-field-label",""),I(d,"type","text"),I(d,"data-form-field-text",""),I(c,"class","block"),I(O,"type","submit"),I(O,"data-button",""),I(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(_,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(M,$){N(e,M,$),w(M,n,$),w(M,r,$),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,m),F(c,p),F(c,d),it(d,t[2]),F(c,g),D&&D.m(c,null),F(r,v),F(r,_),N(h,_,null),F(_,k),F(_,O),S=!0,C||(P=[G(d,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(M,$){var L;const U={};$&2056&&(U.$$scope={dirty:$,ctx:M}),e.$set(U),(!S||$&8)&&u!==(u=((L=M[3])==null?void 0:L.fullpath)+"")&&je(l,u),$&4&&d.value!==M[2]&&it(d,M[2]),M[1]?D?D.p(M,$):(D=_u(M),D.c(),D.m(c,null)):D&&(D.d(1),D=null);const A={};$&2048&&(A.$$scope={dirty:$,ctx:M}),h.$set(A)},i(M){S||(b(e.$$.fragment,M),b(h.$$.fragment,M),S=!0)},o(M){y(e.$$.fragment,M),y(h.$$.fragment,M),S=!1},d(M){M&&(E(n),E(r)),H(e,M),D&&D.d(),H(h),C=!1,Te(P)}}}function ug(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[lg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function ag(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){d.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(d){d?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function m(){a=this.value,n(2,a)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}let af=class extends ve{constructor(e){super(),ye(this,e,ag,ug,fe,{})}};function fg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function gu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function cg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function dg(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v;e=new Tt({props:{$$slots:{default:[fg]},$$scope:{ctx:t}}});let _=t[2]&&gu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[cg]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New Folder Name",o=K(),u=R("input"),l=K(),_&&_.c(),a=K(),f=R("div"),V(c.$$.fragment),m=K(),p=R("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){N(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),_&&_.m(i,null),F(r,a),F(r,f),N(c,f,null),F(f,m),F(f,p),d=!0,g||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=gu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){d||(b(e.$$.fragment,h),b(c.$$.fragment,h),d=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),d=!1},d(h){h&&(E(n),E(r)),H(e,h),_&&_.d(),H(c),g=!1,Te(v)}}}function mg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[dg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function pg(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){if(d.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const g=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+g+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(d){d?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function m(){l=this.value,n(1,l)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}let hg=class extends ve{constructor(e){super(),ye(this,e,pg,mg,fe,{})}};function _g(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new File in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function bu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function gg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function bg(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v;e=new Tt({props:{$$slots:{default:[_g]},$$scope:{ctx:t}}});let _=t[2]&&bu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[gg]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New Filename",o=K(),u=R("input"),l=K(),_&&_.c(),a=K(),f=R("div"),V(c.$$.fragment),m=K(),p=R("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){N(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),_&&_.m(i,null),F(r,a),F(r,f),N(c,f,null),F(f,m),F(f,p),d=!0,g||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=bu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){d||(b(e.$$.fragment,h),b(c.$$.fragment,h),d=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),d=!1},d(h){h&&(E(n),E(r)),H(e,h),_&&_.d(),H(c),g=!1,Te(v)}}}function yg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[bg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function vg(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){if(d.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const g=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l,{method:"POST",headers:{"X-uEditor-New-Type":"file"}});g.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(d){d?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function m(){l=this.value,n(1,l)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}class kg extends ve{constructor(e){super(),ye(this,e,vg,yg,fe,{})}}function Cg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=R("span"),i=Z(r),I(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),F(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&je(i,r)},d(o){o&&(E(e),E(n))}}}function yu(t){let e,n;return{c(){e=R("span"),n=Z(t[1]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&2&&je(n,r[1])},d(r){r&&E(e)}}}function Eg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function wg(t){var q;let e,n,r,i,s,o,u=((q=t[3])==null?void 0:q.fullpath)+"",l,a,f,c,m,p,d,g,v,_,h,k,O,S,C,P;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[Cg]},$$scope:{ctx:t}}});let D=t[1]&&yu(t);return h=new Mt({props:{"data-button":!0,$$slots:{default:[Eg]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("p"),s=Z("Please confirm you wish to delete the file "),o=R("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=K(),c=R("label"),m=R("span"),m.textContent="Confirm filename",p=K(),d=R("input"),g=K(),D&&D.c(),v=K(),_=R("div"),V(h.$$.fragment),k=K(),O=R("button"),O.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(m,"data-form-field-label",""),I(d,"type","text"),I(d,"data-form-field-text",""),I(c,"class","block"),I(O,"type","submit"),I(O,"data-button",""),I(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(_,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(M,$){N(e,M,$),w(M,n,$),w(M,r,$),F(r,i),F(i,s),F(i,o),F(o,l),F(i,a),F(r,f),F(r,c),F(c,m),F(c,p),F(c,d),it(d,t[2]),F(c,g),D&&D.m(c,null),F(r,v),F(r,_),N(h,_,null),F(_,k),F(_,O),S=!0,C||(P=[G(d,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(M,$){var L;const U={};$&2056&&(U.$$scope={dirty:$,ctx:M}),e.$set(U),(!S||$&8)&&u!==(u=((L=M[3])==null?void 0:L.fullpath)+"")&&je(l,u),$&4&&d.value!==M[2]&&it(d,M[2]),M[1]?D?D.p(M,$):(D=yu(M),D.c(),D.m(c,null)):D&&(D.d(1),D=null);const A={};$&2048&&(A.$$scope={dirty:$,ctx:M}),h.$set(A)},i(M){S||(b(e.$$.fragment,M),b(h.$$.fragment,M),S=!0)},o(M){y(e.$$.fragment,M),y(h.$$.fragment,M),S=!1},d(M){M&&(E(n),E(r)),H(e,M),D&&D.d(),H(h),C=!1,Te(P)}}}function Og(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[wg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function Ag(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){d.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(d){d?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function m(){a=this.value,n(2,a)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}class Tg extends ve{constructor(e){super(),ye(this,e,Ag,Og,fe,{})}}function $g(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&je(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function vu(t){let e,n;return{c(){e=R("span"),n=Z(t[2]),I(e,"data-form-field-error","")},m(r,i){w(r,e,i),F(e,n)},p(r,i){i&4&&je(n,r[2])},d(r){r&&E(e)}}}function Sg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Rg(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v;e=new Tt({props:{$$slots:{default:[$g]},$$scope:{ctx:t}}});let _=t[2]&&vu(t);return c=new Mt({props:{"data-button":!0,$$slots:{default:[Sg]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("form"),i=R("label"),s=R("span"),s.textContent="New Filename",o=K(),u=R("input"),l=K(),_&&_.c(),a=K(),f=R("div"),V(c.$$.fragment),m=K(),p=R("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(h,k){N(e,h,k),w(h,n,k),w(h,r,k),F(r,i),F(i,s),F(i,o),F(i,u),it(u,t[1]),F(i,l),_&&_.m(i,null),F(r,a),F(r,f),N(c,f,null),F(f,m),F(f,p),d=!0,g||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=vu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const S={};k&2048&&(S.$$scope={dirty:k,ctx:h}),c.$set(S)},i(h){d||(b(e.$$.fragment,h),b(c.$$.fragment,h),d=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),d=!1},d(h){h&&(E(n),E(r)),H(e,h),_&&_.d(),H(c),g=!1,Te(v)}}}function Dg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Rg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function Fg(t,e,n){let r,i;x(t,ft,d=>n(3,i=d));const s=vt(),o=Et();x(t,o,d=>n(9,r=d));let u=!1,l="",a="";async function f(d){if(d.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const g=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+g+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"file","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(d){d?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function m(){l=this.value,n(1,l)}function p(d){u=d,n(0,u)}return[u,l,a,i,o,f,c,m,p]}class Pg extends ve{constructor(e){super(),ye(this,e,Fg,Dg,fe,{})}}function ku(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function Lg(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ig(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Mg(t){var l,a;let e,n=((l=t[6])!=null&&l.fullpath?(a=t[6])==null?void 0:a.fullpath:"/")+"",r,i;function s(f,c){return f[4].length>0?Ig:Lg}let o=s(t),u=o(t);return{c(){u.c(),e=Z(' Files to "'),r=Z(n),i=Z('"')},m(f,c){u.m(f,c),w(f,e,c),w(f,r,c),w(f,i,c)},p(f,c){var m,p;o!==(o=s(f))&&(u.d(1),u=o(f),u&&(u.c(),u.m(e.parentNode,e))),c&64&&n!==(n=((m=f[6])!=null&&m.fullpath?(p=f[6])==null?void 0:p.fullpath:"/")+"")&&je(r,n)},d(f){f&&(E(e),E(r),E(i)),u.d(f)}}}function Ng(t){let e,n,r,i,s,o,u=tn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Cu(ku(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Mt({props:{"data-button":!0,$$slots:{default:[Wg]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=K(),i=R("div"),V(s.$$.fragment),I(i,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(f,c){w(f,e,c),F(e,n);for(let m=0;m<l.length;m+=1)l[m]&&l[m].m(n,null);F(e,r),F(e,i),N(s,i,null),o=!0},p(f,c){if(c&144){u=tn(f[4]);let p;for(p=0;p<u.length;p+=1){const d=ku(f,u,p);l[p]?(l[p].p(d,c),b(l[p],1)):(l[p]=Cu(d),l[p].c(),b(l[p],1),l[p].m(n,null))}for(_e(),p=u.length;p<l.length;p+=1)a(p);ge()}const m={};c&33554464&&(m.$$scope={dirty:c,ctx:f}),s.$set(m)},i(f){if(!o){for(let c=0;c<u.length;c+=1)b(l[c]);b(s.$$.fragment,f),o=!0}},o(f){l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)y(l[c]);y(s.$$.fragment,f),o=!1},d(f){f&&E(e),fi(l,f),H(s)}}}function Hg(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d;return a=new Mt({props:{"data-button":!0,$$slots:{default:[Qg]},$$scope:{ctx:t}}}),{c(){e=R("form"),n=R("label"),r=R("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=K(),s=R("input"),u=K(),l=R("div"),V(a.$$.fragment),f=K(),c=R("button"),c.textContent="Upload",I(s,"type","file"),I(s,"class","sr-only"),I(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),I(c,"type","submit"),I(c,"data-button",""),I(c,"class","sr-only"),I(l,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(g,v){w(g,e,v),F(e,n),F(n,r),F(n,i),F(n,s),t[12](s),F(e,u),F(e,l),N(a,l,null),F(l,f),F(l,c),t[16](c),m=!0,p||(d=[G(s,"change",t[13]),G(n,"drop",t[11]),G(n,"dragover",t[14]),G(n,"dragleave",t[15]),G(e,"submit",t[10])],p=!0)},p(g,v){(!m||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(g[2]?"border-solid":"border-dashed")+" rounded"))&&I(n,"class",o);const _={};v&33554432&&(_.$$scope={dirty:v,ctx:g}),a.$set(_)},i(g){m||(b(a.$$.fragment,g),m=!0)},o(g){y(a.$$.fragment,g),m=!1},d(g){g&&E(e),t[12](null),H(a),t[16](null),p=!1,Te(d)}}}function Vg(t){let e,n,r,i;return r=new Ne({props:{path:O1,class:"w-6 h-6 text-rose-700"}}),{c(){e=R("span"),e.textContent="failed to upload",n=K(),V(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),N(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),H(r,s)}}}function Ug(t){let e,n,r,i;return r=new Ne({props:{path:E1,class:"w-6 h-6 text-lime-500"}}),{c(){e=R("span"),e.textContent="successfully uploaded",n=K(),V(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),N(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),H(r,s)}}}function Bg(t){let e,n,r,i;return r=new Ne({props:{path:zt,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=R("span"),e.textContent="uploading",n=K(),V(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),N(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),H(r,s)}}}function Kg(t){let e,n,r,i;return r=new Ne({props:{path:j1}}),{c(){e=R("span"),e.textContent="waiting to upload",n=K(),V(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),N(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),H(r,s)}}}function Cu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[Kg,Bg,Ug,Vg],c=[];function m(p,d){return p[22]===p[7].READY?0:p[22]==p[7].ACTIVE?1:p[22]===p[7].SUCCESS?2:p[22]===p[7].FAILED?3:-1}return~(o=m(t))&&(u=c[o]=f[o](t)),{c(){e=R("li"),n=R("span"),i=Z(r),s=K(),u&&u.c(),l=K(),I(n,"class","flex-1"),I(e,"class","flex flex-row space-x-4")},m(p,d){w(p,e,d),F(e,n),F(n,i),F(e,s),~o&&c[o].m(e,null),F(e,l),a=!0},p(p,d){(!a||d&16)&&r!==(r=p[21].name+"")&&je(i,r);let g=o;o=m(p),o!==g&&(u&&(_e(),y(c[g],1,1,()=>{c[g]=null}),ge()),~o?(u=c[o],u||(u=c[o]=f[o](p),u.c()),b(u,1),u.m(e,l)):u=null)},i(p){a||(b(u),a=!0)},o(p){y(u),a=!1},d(p){p&&E(e),~o&&c[o].d()}}}function jg(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function qg(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Wg(t){let e;function n(s,o){return s[5]?qg:jg}let r=n(t),i=r(t);return{c(){i.c(),e=Se()},m(s,o){i.m(s,o),w(s,e,o)},p(s,o){r!==(r=n(s))&&(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},d(s){s&&E(e),i.d(s)}}}function Qg(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function zg(t){let e,n,r,i,s,o;e=new Tt({props:{$$slots:{default:[Mg]},$$scope:{ctx:t}}});const u=[Hg,Ng],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){V(e.$$.fragment),n=K(),i.c(),s=Se()},m(f,c){N(e,f,c),w(f,n,c),l[r].m(f,c),w(f,s,c),o=!0},p(f,c){const m={};c&33554512&&(m.$$scope={dirty:c,ctx:f}),e.$set(m);let p=r;r=a(f),r===p?l[r].p(f,c):(_e(),y(l[p],1,1,()=>{l[p]=null}),ge(),i=l[r],i?i.p(f,c):(i=l[r]=u[r](f),i.c()),b(i,1),i.m(s.parentNode,s))},i(f){o||(b(e.$$.fragment,f),b(i),o=!0)},o(f){y(e.$$.fragment,f),y(i),o=!1},d(f){f&&(E(n),E(s)),H(e,f),l[r].d(f)}}}function Gg(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[zg]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){V(e.$$.fragment)},m(o,u){N(e,o,u),r=!0},p(o,[u]){const l={};u&33554551&&(l.$$scope={dirty:u,ctx:o}),!n&&u&8&&(n=!0,l.open=o[3],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function Yg(t,e,n){let r,i;x(t,ft,D=>n(6,i=D));var s=(D=>(D[D.READY=0]="READY",D[D.ACTIVE=1]="ACTIVE",D[D.SUCCESS=2]="SUCCESS",D[D.FAILED=3]="FAILED",D))(s||{});const o=vt(),u=Et();x(t,u,D=>n(18,r=D));let l=null,a=null,f=!1,c=!1,m=[],p=!1;function d(D){D||Ge.set(Ae.NONE)}async function g(D){if(D.preventDefault(),l&&l.files){n(4,m=[]);for(let q of l.files)m.push([q,0]);m.length>0&&_()}}async function v(D){if(D.preventDefault(),n(4,m=[]),D.dataTransfer&&D.dataTransfer.items){for(let q of D.dataTransfer.items)if(q.kind==="file"){const M=q.getAsFile();M!==null&&m.push([M,0])}m.length>0&&_()}}async function _(){n(5,p=!1);for(let D of m){if(!c)break;if(D[1]=1,n(4,m),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+D[0].name,{method:"POST",headers:{"X-uEditor-New-Type":"file"}})).ok){const M=new FormData;M.append("content",D[0]),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+D[0].name,{method:"PUT",body:M})).ok?D[1]=2:D[1]=3,n(4,m)}else D[1]=3,n(4,m)}o.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),n(5,p=!0)}function h(D){Ce[D?"unshift":"push"](()=>{l=D,n(0,l)})}const k=()=>{a&&a.click()},O=D=>{D.preventDefault(),n(2,f=!0)},S=()=>{n(2,f=!1)};function C(D){Ce[D?"unshift":"push"](()=>{a=D,n(1,a)})}function P(D){c=D,n(3,c)}return[l,a,f,c,m,p,i,s,u,d,g,v,h,k,O,S,C,P]}class Zg extends ve{constructor(e){super(),ye(this,e,Yg,Gg,fe,{})}}function Xg(t){let e,n;return e=new Zg({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Jg(t){let e,n;return e=new Pg({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function xg(t){let e,n;return e=new Tg({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function eb(t){let e,n;return e=new kg({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function tb(t){let e,n;return e=new hg({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function nb(t){let e,n;return e=new af({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function rb(t){let e,n;return e=new ig({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function ib(t){let e,n;return e=new J_({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function sb(t){let e,n;return e=new M_({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function ob(t){let e,n;return e=new q_({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function lb(t){let e,n;return e=new $_({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function ub(t){let e,n,r,i;const s=[lb,ob,sb,ib,rb,nb,tb,eb,xg,Jg,Xg],o=[];function u(l,a){return l[0]===Ae.UEDITOR_NEW_BRANCH?0:l[0]===Ae.UEDITOR_IMPORT_REMOTE_BRANCH?1:l[0]===Ae.UEDITOR_DELETE_BRANCH?2:l[0]===Ae.UEDITOR_MERGE_FROM_DEFAULT?3:l[0]===Ae.FOLDER_CREATE?4:l[0]===Ae.FOLDER_DELETE?5:l[0]===Ae.FOLDER_RENAME?6:l[0]===Ae.FILE_CREATE?7:l[0]===Ae.FILE_DELETE?8:l[0]===Ae.FILE_RENAME?9:l[0]===Ae.FILE_UPLOAD?10:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e!==f&&(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}var Ae=(t=>(t[t.NONE=1]="NONE",t[t.UEDITOR_NEW_BRANCH=2]="UEDITOR_NEW_BRANCH",t[t.UEDITOR_IMPORT_REMOTE_BRANCH=3]="UEDITOR_IMPORT_REMOTE_BRANCH",t[t.UEDITOR_DELETE_BRANCH=4]="UEDITOR_DELETE_BRANCH",t[t.UEDITOR_MERGE_FROM_DEFAULT=5]="UEDITOR_MERGE_FROM_DEFAULT",t[t.FOLDER_CREATE=6]="FOLDER_CREATE",t[t.FOLDER_DELETE=7]="FOLDER_DELETE",t[t.FOLDER_RENAME=8]="FOLDER_RENAME",t[t.FILE_CREATE=9]="FILE_CREATE",t[t.FILE_DELETE=10]="FILE_DELETE",t[t.FILE_RENAME=11]="FILE_RENAME",t[t.FILE_UPLOAD=12]="FILE_UPLOAD",t))(Ae||{});const Ge=Fe(1);function ab(t,e,n){let r,i=ce;return x(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let fb=class extends ve{constructor(e){super(),ye(this,e,ab,ub,fe,{})}};const cb="modulepreload",db=function(t){return"/app/"+t},Eu={},Pi=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=db(l),l in Eu)return;Eu[l]=!0;const a=l.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":cb,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((m,p)=>{c.addEventListener("load",m),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return i.then(o=>{for(const u of o||[])u.status==="rejected"&&s(u.reason);return e().catch(s)})};function mb(t){let e;return{c(){e=R("div"),e.textContent="Please select a file or folder from the file-browser on the left",I(e,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function pb(t){let e,n,r,i;const s=[gb,_b,hb],o=[];function u(l,a){return l[2]!==null?0:l[0]?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function hb(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=R("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),I(e,"class","flex-1 px-2 py-1 text-rose-700")},m(o,u){w(o,e,u),F(e,n),F(e,i),F(e,s)},p(o,u){u&2&&r!==(r=o[1].mimetype+"")&&je(i,r)},i:ce,o:ce,d(o){o&&E(e)}}}function _b(t){let e;return{c(){e=R("div"),e.textContent="Loading the editor. Please wait...",I(e,"class","flex-1 px-2 py-1")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function gb(t){let e=t[3].id,n,r,i=wu(t);return{c(){i.c(),n=Se()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(_e(),y(i,1,1,ce),ge(),i=wu(s),i.c(),b(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){r||(b(i),r=!0)},o(s){y(i),r=!1},d(s){s&&E(n),i.d(s)}}}function wu(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Mo(i,s())),{c(){e&&V(e.$$.fragment),n=Se()},m(o,u){e&&N(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){_e();const l=e;y(l.$$.fragment,1,0,()=>{H(l,1)}),ge()}i?(e=Mo(i,s()),V(e.$$.fragment),b(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&y(e.$$.fragment,o),r=!1},d(o){o&&E(n),e&&H(e,o)}}}function bb(t){let e,n,r,i;const s=[pb,mb],o=[];function u(l,a){return l[1]!==null?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Se()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),y(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function yb(t,e,n){let r,i,s;x(t,ft,m=>n(1,r=m));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=Et();x(t,a,m=>n(3,s=m));const f=ze(ft,m=>{if(m){if(m.type==="folder")return"Folder";if(u.indexOf(m.mimetype)>=0||m.mimetype.startsWith("text/"))return"CodeMirror";if(l.indexOf(m.mimetype)>=0)return"Tei";if(m.mimetype.startsWith("image/"))return"Image"}return null}),c=ze(f,(m,p)=>{let d=null;m==="Folder"?d=Pi(()=>import("./FolderEditor-zj3irnZV.js"),[]):m==="CodeMirror"?d=Pi(()=>import("./CodeMirrorEditor-DOG_wssG.js"),__vite__mapDeps([0,1,2])):m==="Tei"?d=Pi(()=>import("./TeiEditor-yaJoIiMq.js"),__vite__mapDeps([3,1])):m==="Image"&&(d=Pi(()=>import("./ImageEditor-BQLjZvFT.js"),[])),d?(n(0,o=!0),d.then(g=>{p(g.default),n(0,o=!1)},()=>{n(0,o=!1)})):p(null)},null);return x(t,c,m=>n(2,i=m)),[o,r,i,s,a,c]}let vb=class extends ve{constructor(e){super(),ye(this,e,yb,bb,fe,{})}};function kb(t){return t[t.length-1]}function ff(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}ff({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function Cb(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function Li(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Ou(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Au(t,e){if(!wb)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return So(n)?n:null}const Ii=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Tu=t=>typeof t=="function";Hi("empty");function Hi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return ze(n,u=>{const l=i(u);if(Tu(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??nr}));return a.action=r??nr,a}return Ii(Li({...l,[`data-melt-${t}`]:"",action:r??nr}))});{const u=i,l=u==null?void 0:u();if(Tu(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??nr}));return a.action=r??nr,Ou(a)}return Ou(Ii(Li({...l,[`data-melt-${t}`]:"",action:r??nr})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Eb(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const wb=typeof document<"u",Ob=t=>/^[a-z]$/i.test(t);function So(t){return t instanceof HTMLElement}function Ab(t){return t.offsetParent===null}function Tb(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function nr(){}function Ds(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Sb(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function $b(t){const e=t.currentTarget;if(!So(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Sb(t){return e=>{const n=$b(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ro(t){return{...t,get:()=>$r(t)}}Ro.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Ro.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const Rb=(t,e)=>{const n=Ro(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function Db(){return Sa(10)}function Fb(t){return t.reduce((e,n)=>(e[n]=Db(),e),{})}const lt={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"};gt(!1),gt(!1),gt(void 0),gt(void 0);const Pb={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...Cb(Pb,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const Lb={forceVisible:!1,defaultExpanded:[]},rr={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Fs}=Eb("tree-view");function Ib(t){const e={...Lb,...t},{forceVisible:n}=e,r=Fe(null),i=Fe(null),s=e.expanded??Fe(e.defaultExpanded),o=Rb(s,e==null?void 0:e.onExpandedChange),u=ze([i],([C])=>C==null?void 0:C.getAttribute("data-id")),l=ze([i],([C])=>P=>(C==null?void 0:C.getAttribute("data-id"))===P),a=ze([o],([C])=>P=>C.includes(P)),f=Fb(["tree"]),c=Hi(Fs(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let m=!1;const p=Hi(Fs("item"),{stores:[o,u,r],returned:([C,P,D])=>q=>{const{id:M,hasChildren:$}=q;let U=0;return D!==null&&(U=D===M?0:-1),{role:"treeitem","aria-selected":P===M,"data-id":M,tabindex:U,"aria-expanded":$?C.includes(M):void 0}},action:C=>{const P=Tb(Ds(C,"keydown",D=>{const{key:q}=D,M=Ob(q);if(![lt.ARROW_DOWN,lt.ARROW_UP,lt.ARROW_LEFT,lt.ARROW_RIGHT,lt.ENTER,lt.SPACE,lt.END,lt.HOME,lt.ASTERISK].includes(q)&&!M||!Au(f.tree)||!So(C)||C.getAttribute("role")!=="treeitem")return;const A=_(),L=A.findIndex(W=>W===C);if(q!==lt.ENTER&&q!==lt.SPACE&&D.preventDefault(),q===lt.ENTER||q===lt.SPACE)v(C),m=!0;else if(q===lt.ARROW_DOWN&&L!==A.length-1){const W=A[L+1];if(!W)return;g(W)}else if(q===lt.ARROW_UP&&L!==0){const W=A[L-1];if(!W)return;g(W)}else if(q===lt.HOME&&L!==0){const W=A[0];if(!W)return;g(W)}else if(q===lt.END&&L!=A.length-1){const W=kb(A);if(!W)return;g(W)}else if(q===lt.ARROW_LEFT)if(S(C))k(C);else{const W=C==null?void 0:C.closest('[role="group"]'),B=W==null?void 0:W.getAttribute("data-group-id"),ee=A.find(re=>re.getAttribute("data-id")===B);if(!ee)return;g(ee)}else if(q===lt.ARROW_RIGHT)if(S(C)){const W=A[L+1];if(!W)return;g(W)}else O(C)&&k(C);else if(M){const W=A.map(re=>{var z;return{value:(z=re.textContent)==null?void 0:z.toLowerCase().trim(),id:re.getAttribute("data-id")}});let B=-1,ee=W.slice(L+1).some((re,z)=>{var le;return((le=re.value)==null?void 0:le.toLowerCase()[0])===q?(B=L+1+z,!0):!1});if(ee||(ee=W.slice(0,L).some((re,z)=>{var le;return((le=re.value)==null?void 0:le.toLowerCase().at(0))===q?(B=z,!0):!1})),ee&&W[B].id){const re=A[B];if(!re)return;g(re)}}}),Ds(C,"click",async()=>{v(C),g(C),m||k(C),m=!1}),Ds(C,"focus",()=>{r.update(D=>C.getAttribute("data-id")??D)}));return{destroy(){P()}}}}),d=Hi(Fs("group"),{stores:[o],returned:([C])=>P=>({role:"group","data-group-id":P.id,hidden:!n&&!C.includes(P.id)?!0:void 0,style:ff({display:!n&&!C.includes(P.id)?"none":void 0})})});function g(C){r.update(P=>C.getAttribute("data-id")??P),C.focus()}function v(C){C.getAttribute(rr.DATAID)&&i.set(C)}function _(){let C=[];const P=Au(f.tree);return P&&(C=Array.from(P.querySelectorAll('[role="treeitem"]')).filter(D=>!Ab(D))),C}function h(C){const P=C.hasAttribute(rr.EXPANDED),D=C.getAttribute(rr.EXPANDED),q=C.getAttribute(rr.DATAID);return{hasChildren:P,expanded:D,dataId:q}}function k(C){const{hasChildren:P,expanded:D,dataId:q}=h(C);!P||D===null||q===null||(D==="false"?o.update(M=>[...M,q]):o.update(M=>M.filter($=>$!==q)))}function O(C){return C.hasAttribute(rr.EXPANDED)}function S(C){return C.getAttribute(rr.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:p,group:d},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var Mb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cf={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",Mb,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var u=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,a=o.trim===void 0?!0:o.trim,f=s.normalize().split("").reduce(function(c,m){var p=u[m];return p===void 0&&(p=n[m]),p===void 0&&(p=m),p===l&&(p=" "),c+p.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),a&&(f=f.trim()),f=f.replace(/\s+/g,l),o.lower&&(f=f.toLowerCase()),f}return i.extend=function(s){Object.assign(n,s)},i})})(cf);var Hb=cf.exports;const Vb=Nb(Hb);function $u(t,e,n){var l;const r=t.slice();r[9]=e[n].name,r[10]=e[n].type,r[11]=e[n].fullpath,r[12]=e[n].content,r[13]=e[n].mimetype,r[19]=n;const i=`file-tree-${Vb(r[9],{strict:!0})}-${r[1]}-${r[19]}`;r[14]=i;const s=!!((l=r[12])!=null&&l.length);r[15]=s;const o=r[2]({id:r[14]});r[16]=o;const u=r[3]({id:r[14],hasChildren:r[15]});return r[17]=u,r}function Ub(t){let e,n,r,i,s;const o=[Qb,Wb,qb,jb],u=[];function l(a,f){return f&1&&(e=null),a[13]==="text/markdown"||a[13]==="application/tei+xml"?0:(e==null&&(e=!!a[13].startsWith("image/")),e?1:a[13]==="application/yaml"||a[13]==="application/toml"||a[13]==="application/gitignore"?2:3)}return n=l(t,-1),r=u[n]=o[n](t),{c(){r.c(),i=Se()},m(a,f){u[n].m(a,f),w(a,i,f),s=!0},p(a,f){let c=n;n=l(a,f),n!==c&&(_e(),y(u[c],1,1,()=>{u[c]=null}),ge(),r=u[n],r||(r=u[n]=o[n](a),r.c()),b(r,1),r.m(i.parentNode,i))},i(a){s||(b(r),s=!0)},o(a){y(r),s=!1},d(a){a&&E(i),u[n].d(a)}}}function Bb(t){let e,n;return e=new Ne({props:{path:M1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Kb(t){let e,n;return e=new Ne({props:{path:I1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function jb(t){let e,n;return e=new Ne({props:{path:F1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function qb(t){let e,n;return e=new Ne({props:{path:$1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Wb(t){let e,n;return e=new Ne({props:{path:D1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Qb(t){let e,n;return e=new Ne({props:{path:S1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Su(t){let e,n,r,i,s;n=new df({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=R("ol"),V(n.$$.fragment),oe(e,u)},m(l,a){w(l,e,a),N(n,e,null),r=!0,i||(s=Ue(t[16].action(e)),i=!0)},p(l,a){const f={};a&1&&(f.treeItems=l[12]),a&2&&(f.level=l[1]+1),n.$set(f),oe(e,u=Me(o,[a&7&&l[16]]))},i(l){r||(b(n.$$.fragment,l),r=!0)},o(l){y(n.$$.fragment,l),r=!1},d(l){l&&E(e),H(n),i=!1,s()}}}function Ru(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,m,p,d,g;const v=[Kb,Bb,Ub],_=[];function h(C,P){return P&19&&(r=null),r==null&&(r=!!(C[10]==="folder"&&C[15]&&C[4](C[14]))),r?0:C[10]==="folder"?1:C[10]==="file"?2:-1}~(i=h(t,-1))&&(s=_[i]=v[i](t));let k=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],O={};for(let C=0;C<k.length;C+=1)O=ie(O,k[C]);let S=t[12]&&Su(t);return{c(){e=R("li"),n=R("button"),s&&s.c(),o=K(),u=R("span"),a=Z(l),c=K(),S&&S.c(),m=K(),I(u,"class","select-none"),oe(n,O),I(e,"role","none")},m(C,P){w(C,e,P),F(e,n),~i&&_[i].m(n,null),F(n,o),F(n,u),F(u,a),n.autofocus&&n.focus(),F(e,c),S&&S.m(e,null),F(e,m),p=!0,d||(g=Ue(t[17].action(n)),d=!0)},p(C,P){let D=i;i=h(C,P),i===D?~i&&_[i].p(C,P):(s&&(_e(),y(_[D],1,1,()=>{_[D]=null}),ge()),~i?(s=_[i],s?s.p(C,P):(s=_[i]=v[i](C),s.c()),b(s,1),s.m(n,o)):s=null),(!p||P&1)&&l!==(l=C[9]+"")&&je(a,l),oe(n,O=Me(k,[{class:"flex items-center gap-1 p-1"},P&11&&C[17],(!p||P&1&&f!==(f=C[11]))&&{"data-file-path":f}])),C[12]?S?(S.p(C,P),P&1&&b(S,1)):(S=Su(C),S.c(),b(S,1),S.m(e,m)):S&&(_e(),y(S,1,1,()=>{S=null}),ge())},i(C){p||(b(s),b(S),p=!0)},o(C){y(s),y(S),p=!1},d(C){C&&E(e),~i&&_[i].d(),S&&S.d(),d=!1,g()}}}function zb(t){let e,n,r=tn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Ru($u(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Se()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,[u]){if(u&31){r=tn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=$u(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Ru(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(_e(),l=r.length;l<i.length;l+=1)s(l);ge()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)y(i[u]);n=!1},d(o){o&&E(e),fi(i,o)}}}function Gb(t,e,n){let r,i,s,{treeItems:o}=e,{level:u=1}=e;const{elements:{item:l,group:a},helpers:{isExpanded:f,isSelected:c}}=bt("tree");return x(t,l,m=>n(3,i=m)),x(t,a,m=>n(2,r=m)),x(t,f,m=>n(4,s=m)),t.$$set=m=>{"treeItems"in m&&n(0,o=m.treeItems),"level"in m&&n(1,u=m.level)},[o,u,r,i,s,l,a,f]}class df extends ve{constructor(e){super(),ye(this,e,Gb,zb,fe,{treeItems:0,level:1})}}function Yb(t){let e,n,r,i,s;const o=t[1].default,u=de(o,t,t[0],null);return i=new Ne({props:{path:zt,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=R("div"),n=R("p"),u&&u.c(),r=K(),V(i.$$.fragment),I(n,"class","sr-only"),I(e,"class","absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2")},m(l,a){w(l,e,a),F(e,n),u&&u.m(n,null),F(e,r),N(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&pe(u,o,l,l[0],s?me(o,l[0],a,null):he(l[0]),null)},i(l){s||(b(u,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(i.$$.fragment,l),s=!1},d(l){l&&E(e),u&&u.d(l),H(i)}}}function Zb(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Xb extends ve{constructor(e){super(),ye(this,e,Zb,Yb,fe,{})}}function Jb(t){let e,n;return e=new Xb({props:{$$slots:{default:[e2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&2048&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function xb(t){let e,n,r;n=new df({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("ol"),V(n.$$.fragment),oe(e,s)},m(o,u){w(o,e,u),N(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),oe(e,s=Me(i,[u&2&&o[1]]))},i(o){r||(b(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&E(e),H(n)}}}function e2(t){let e;return{c(){e=Z("Loading the file list. Please wait...")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function t2(t){let e,n,r,i;const s=[xb,Jb],o=[];function u(l,a){return l[0].isSuccess?0:l[0].isLoading?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=R("nav"),r&&r.c(),I(e,"aria-label","Files"),I(e,"class","relative px-2 py-1 w-3/12 overflow-auto border-r border-gray-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,[a]){let f=n;n=u(l),n===f?~n&&o[n].p(l,a):(r&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~n?(r=o[n],r?r.p(l,a):(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function mf(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=mf(n.content,e);if(r!==null)return r}}return null}function n2(t){var n,r,i;const e=[];for(;t&&t.getAttribute("role")==="treeitem";)e.splice(0,0,t.getAttribute("data-id")),t=(i=(r=(n=t.parentElement)==null?void 0:n.parentElement)==null?void 0:r.parentElement)==null?void 0:i.querySelector(":scope > [role=treeitem]");return e}function r2(t,e,n){let r,i;const s=Et(),o=To(),u=ze([s,o],([d,g])=>d?{queryKey:["branches",d.id,"files/"],queryFn:cn,enabled:g.isSuccess}:{queryKey:["branches","-","files/"],queryFn:cn,enabled:!1}),l=Or(u);x(t,l,d=>n(0,r=d));const a=Ib({defaultExpanded:["file-tree--1-0"]});At("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:m}}=a;x(t,f,d=>n(1,i=d));const p=c.subscribe(d=>{if(c!==null&&(d==null?void 0:d.getAttribute("data-file-path"))!==null&&r.isSuccess){const g=mf(r.data,d==null?void 0:d.getAttribute("data-file-path"));ft.set(g)}else ft.set(null)});return is(p),rs(()=>{let d;d=l.subscribe(g=>{if(g.isSuccess){const v=lf("path");v&&qt().then(()=>{const _=document.querySelector('[data-file-path="'+v+'"]');_&&(m.set(n2(_)),c.set(_))}),d&&d()}})}),[r,i,l,f]}class i2 extends ve{constructor(e){super(),ye(this,e,r2,t2,fe,{})}}function Du(t,e,n){const r=t.slice();return r[15]=e[n],r}function Fu(t){let e,n=t[0].title+"",r,i;return{c(){e=Z(" ("),r=Z(n),i=Z(")")},m(s,o){w(s,e,o),w(s,r,o),w(s,i,o)},p(s,o){o&1&&n!==(n=s[0].title+"")&&je(r,n)},d(s){s&&(E(e),E(r),E(i))}}}function s2(t){let e,n,r=t[0]!==null&&Fu(t);return{c(){e=Z("μEditor"),r&&r.c(),n=Se()},m(i,s){w(i,e,s),r&&r.m(i,s),w(i,n,s)},p(i,s){i[0]!==null?r?r.p(i,s):(r=Fu(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&(E(e),E(n)),r&&r.d(i)}}}function Pu(t){let e,n,r,i,s,o,u,l,a,f;e=new Pt({props:{$$slots:{default:[o2]},$$scope:{ctx:t}}}),e.$on("click",t[9]);let c=t[2].isSuccess&&t[2].data.remote.length>0&&Lu(t);i=new Pt({props:{$$slots:{default:[u2]},$$scope:{ctx:t}}}),i.$on("click",t[11]),o=new fs({});let m=t[3]!==null&&Iu(t),p=t[2].isSuccess&&t[2].data.local.length>0&&Hu(t);return{c(){V(e.$$.fragment),n=K(),c&&c.c(),r=K(),V(i.$$.fragment),s=K(),V(o.$$.fragment),u=K(),m&&m.c(),l=K(),p&&p.c(),a=Se()},m(d,g){N(e,d,g),w(d,n,g),c&&c.m(d,g),w(d,r,g),N(i,d,g),w(d,s,g),N(o,d,g),w(d,u,g),m&&m.m(d,g),w(d,l,g),p&&p.m(d,g),w(d,a,g),f=!0},p(d,g){const v={};g&262144&&(v.$$scope={dirty:g,ctx:d}),e.$set(v),d[2].isSuccess&&d[2].data.remote.length>0?c?g&4&&b(c,1):(c=Lu(d),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(_e(),y(c,1,1,()=>{c=null}),ge());const _={};g&262144&&(_.$$scope={dirty:g,ctx:d}),i.$set(_),d[3]!==null?m?(m.p(d,g),g&8&&b(m,1)):(m=Iu(d),m.c(),b(m,1),m.m(l.parentNode,l)):m&&(_e(),y(m,1,1,()=>{m=null}),ge()),d[2].isSuccess&&d[2].data.local.length>0?p?(p.p(d,g),g&4&&b(p,1)):(p=Hu(d),p.c(),b(p,1),p.m(a.parentNode,a)):p&&(_e(),y(p,1,1,()=>{p=null}),ge())},i(d){f||(b(e.$$.fragment,d),b(c),b(i.$$.fragment,d),b(o.$$.fragment,d),b(m),b(p),f=!0)},o(d){y(e.$$.fragment,d),y(c),y(i.$$.fragment,d),y(o.$$.fragment,d),y(m),y(p),f=!1},d(d){d&&(E(n),E(r),E(s),E(u),E(l),E(a)),H(e,d),c&&c.d(d),H(i,d),H(o,d),m&&m.d(d),p&&p.d(d)}}}function o2(t){let e,n,r,i;return e=new Ne({props:{path:U1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="New Branch"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function Lu(t){let e,n;return e=new Pt({props:{$$slots:{default:[l2]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function l2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Import Branch"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function u2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Synchronise Branches"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function Iu(t){let e,n,r,i=t[3].update_from_default&&Mu(t),s=t[1].data.git.default_branch!==t[3].id&&Nu(t);return{c(){i&&i.c(),e=K(),s&&s.c(),n=Se()},m(o,u){i&&i.m(o,u),w(o,e,u),s&&s.m(o,u),w(o,n,u),r=!0},p(o,u){o[3].update_from_default?i?(i.p(o,u),u&8&&b(i,1)):(i=Mu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(_e(),y(i,1,1,()=>{i=null}),ge()),o[1].data.git.default_branch!==o[3].id?s?(s.p(o,u),u&10&&b(s,1)):(s=Nu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(_e(),y(s,1,1,()=>{s=null}),ge())},i(o){r||(b(i),b(s),r=!0)},o(o){y(i),y(s),r=!1},d(o){o&&(E(e),E(n)),i&&i.d(o),s&&s.d(o)}}}function Mu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[a2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new fs({}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&262146&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function a2(t){let e,n,r,i,s=ts(t[1].data.git.default_branch)+"",o,u;return e=new Ne({props:{path:K1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),i=Z("Merge Updates from "),o=Z(s)},m(l,a){N(e,l,a),w(l,n,a),w(l,r,a),F(r,i),F(r,o),u=!0},p(l,a){(!u||a&2)&&s!==(s=ts(l[1].data.git.default_branch)+"")&&je(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),H(e,l)}}}function Nu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[f2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new fs({}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&262152&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function f2(t){let e,n,r,i,s=t[3].title+"",o,u;return e=new Ne({props:{path:B1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){N(e,l,a),w(l,n,a),w(l,r,a),F(r,i),F(r,o),u=!0},p(l,a){(!u||a&8)&&s!==(s=l[3].title+"")&&je(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),H(e,l)}}}function Hu(t){let e,n;return e=new tp({props:{onValueChange:t[14],$$slots:{default:[p2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.onValueChange=r[14]),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function c2(t){let e,n;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function d2(t){let e,n;return e=new Ne({props:{path:w1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function m2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[d2,c2],f=[];function c(m,p){return m[0]!==null&&m[0].id===m[15].id?0:1}return e=c(t),n=f[e]=a[e](t),{c(){n.c(),r=K(),i=R("span"),o=Z(s),u=K()},m(m,p){f[e].m(m,p),w(m,r,p),w(m,i,p),F(i,o),w(m,u,p),l=!0},p(m,p){let d=e;e=c(m),e!==d&&(_e(),y(f[d],1,1,()=>{f[d]=null}),ge(),n=f[e],n||(n=f[e]=a[e](m),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||p&4)&&s!==(s=m[15].title+"")&&je(o,s)},i(m){l||(b(n),l=!0)},o(m){y(n),l=!1},d(m){m&&(E(r),E(i),E(u)),f[e].d(m)}}}function Vu(t){let e,n;return e=new jm({props:{value:t[15].id,$$slots:{default:[m2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.value=r[15].id),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function p2(t){let e,n,r=tn(t[2].data.local),i=[];for(let o=0;o<r.length;o+=1)i[o]=Vu(Du(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Se()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,u){if(u&5){r=tn(o[2].data.local);let l;for(l=0;l<r.length;l+=1){const a=Du(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Vu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(_e(),l=r.length;l<i.length;l+=1)s(l);ge()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)y(i[u]);n=!1},d(o){o&&E(e),fi(i,o)}}}function h2(t){let e,n,r=t[1].isSuccess&&t[1].data.git.enabled&&Pu(t);return{c(){r&&r.c(),e=Se()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,s){i[1].isSuccess&&i[1].data.git.enabled?r?(r.p(i,s),s&2&&b(r,1)):(r=Pu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(_e(),y(r,1,1,()=>{r=null}),ge())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function _2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[s2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[h2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262159&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function g2(t){let e,n;return e=new ms({props:{$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,[i]){const s={};i&262159&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function b2(t,e,n){let r,i,s,o;const u=Ci();x(t,u,h=>n(1,i=h));const l=$o();x(t,l,h=>n(2,s=h));const a=Et();x(t,a,h=>n(0,r=h));const f=vt(),c=ze([l,a],([h,k])=>{if(h.isSuccess&&k!==null){for(const O of h.data.local)if(O.id===k.id)return O}return null});return x(t,c,h=>n(3,o=h)),[r,i,s,o,u,l,a,f,c,()=>{Ge.set(Ae.UEDITOR_NEW_BRANCH)},()=>{Ge.set(Ae.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{uf({action:"SynchroniseBranches",callback:()=>{f.invalidateQueries({queryKey:["branches"]})}})},()=>{Ge.set(Ae.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(Ae.UEDITOR_DELETE_BRANCH)},h=>{if(s.isSuccess)for(let k of s.data.local)k.id===h&&a.set(k)}]}class y2 extends ve{constructor(e){super(),ye(this,e,b2,g2,fe,{})}}function v2(t){let e;return{c(){e=Z("File")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function k2(t){let e,n,r,i;return e=new Ne({props:{path:V1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Rename"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function C2(t){let e,n,r,i;return e=new Ne({props:{path:q1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Delete"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function E2(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[k2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Pt({props:{$$slots:{default:[C2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function w2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[v2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[E2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function O2(t){let e,n;return e=new ms({props:{$$slots:{default:[w2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,[i]){const s={};i&4&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function A2(t){return[()=>{Ge.set(Ae.FILE_RENAME)},()=>{Ge.set(Ae.FILE_DELETE)}]}class T2 extends ve{constructor(e){super(),ye(this,e,A2,O2,fe,{})}}function $2(t){let e;return{c(){e=Z("Folder")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function S2(t){let e,n,r,i;return e=new Ne({props:{path:N1,class:"w4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="New Folder"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function R2(t){let e,n,r,i;return e=new Ne({props:{path:R1,class:"w4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="New File"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function D2(t){let e,n,r,i;return e=new Ne({props:{path:P1,class:"w4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Upload Files"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function F2(t){let e,n,r,i;return e=new Ne({props:{path:L1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Rename"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function P2(t){let e,n,r,i;return e=new Ne({props:{path:H1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Delete"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function L2(t){let e,n,r,i,s,o,u,l,a,f,c,m;return e=new Pt({props:{$$slots:{default:[S2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Pt({props:{$$slots:{default:[R2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Pt({props:{$$slots:{default:[D2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new fs({}),a=new Pt({props:{$$slots:{default:[F2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Pt({props:{$$slots:{default:[P2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment),i=K(),V(s.$$.fragment),o=K(),V(u.$$.fragment),l=K(),V(a.$$.fragment),f=K(),V(c.$$.fragment)},m(p,d){N(e,p,d),w(p,n,d),N(r,p,d),w(p,i,d),N(s,p,d),w(p,o,d),N(u,p,d),w(p,l,d),N(a,p,d),w(p,f,d),N(c,p,d),m=!0},p(p,d){const g={};d&256&&(g.$$scope={dirty:d,ctx:p}),e.$set(g);const v={};d&256&&(v.$$scope={dirty:d,ctx:p}),r.$set(v);const _={};d&256&&(_.$$scope={dirty:d,ctx:p}),s.$set(_);const h={};d&256&&(h.$$scope={dirty:d,ctx:p}),a.$set(h);const k={};d&256&&(k.$$scope={dirty:d,ctx:p}),c.$set(k)},i(p){m||(b(e.$$.fragment,p),b(r.$$.fragment,p),b(s.$$.fragment,p),b(u.$$.fragment,p),b(a.$$.fragment,p),b(c.$$.fragment,p),m=!0)},o(p){y(e.$$.fragment,p),y(r.$$.fragment,p),y(s.$$.fragment,p),y(u.$$.fragment,p),y(a.$$.fragment,p),y(c.$$.fragment,p),m=!1},d(p){p&&(E(n),E(i),E(o),E(l),E(f)),H(e,p),H(r,p),H(s,p),H(u,p),H(a,p),H(c,p)}}}function I2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[$2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[L2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&256&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&256&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function Uu(t){let e,n;return e=new af({}),e.$on("close",t[7]),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function M2(t){let e,n,r,i;e=new ms({props:{$$slots:{default:[I2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Uu(t);return{c(){V(e.$$.fragment),n=K(),s&&s.c(),r=Se()},m(o,u){N(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&256&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[0]===o[1].Delete?s?(s.p(o,u),u&1&&b(s,1)):(s=Uu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(_e(),y(s,1,1,()=>{s=null}),ge())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),H(e,o),s&&s.d(o)}}}function N2(t,e,n){var r=(c=>(c[c.Nothing=1]="Nothing",c[c.Rename=2]="Rename",c[c.Move=3]="Move",c[c.Copy=4]="Copy",c[c.Delete=5]="Delete",c))(r||{});let i=1;return[i,r,()=>{Ge.set(Ae.FOLDER_CREATE)},()=>{Ge.set(Ae.FILE_CREATE)},()=>{Ge.set(Ae.FILE_UPLOAD)},()=>{Ge.set(Ae.FOLDER_RENAME)},()=>{Ge.set(Ae.FOLDER_DELETE)},()=>{console.log("Resetting action"),n(0,i=r.Nothing)}]}class H2 extends ve{constructor(e){super(),ye(this,e,N2,M2,fe,{})}}function Bu(t){let e,n;return e=new ms({props:{$$slots:{default:[K2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&66&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function V2(t){var r;let e=((r=t[1].data)==null?void 0:r.name)+"",n;return{c(){n=Z(e)},m(i,s){w(i,n,s)},p(i,s){var o;s&2&&e!==(e=((o=i[1].data)==null?void 0:o.name)+"")&&je(n,e)},d(i){i&&E(n)}}}function U2(t){let e,n,r,i;return e=new Ne({props:{path:T1,class:"w-4 h-4"}}),{c(){V(e.$$.fragment),n=K(),r=R("span"),r.textContent="Logout"},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function B2(t){let e,n;return e=new Pt({props:{$$slots:{default:[U2]},$$scope:{ctx:t}}}),e.$on("click",t[4]),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function K2(t){let e,n,r,i;return e=new ps({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),r=new cs({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&66&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&64&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function j2(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&Bu(t);return{c(){r&&r.c(),e=Se()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,[s]){i[0].isSuccess&&i[0].data.auth.provider!=="no-auth"?r?(r.p(i,s),s&1&&b(r,1)):(r=Bu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(_e(),y(r,1,1,()=>{r=null}),ge())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function q2(t,e,n){let r,i;const s=To();x(t,s,a=>n(1,i=a));const o=Ci();x(t,o,a=>n(0,r=a));const u=vt();async function l(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(u.cancelQueries(),u.invalidateQueries({queryKey:["auth"]}))}return[r,i,s,o,l]}class W2 extends ve{constructor(e){super(),ye(this,e,q2,j2,fe,{})}}function Ku(t){let e,n,r,i;const s=[z2,Q2],o=[];function u(l,a){return l[0].type==="file"?0:l[0].type==="folder"?1:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Se()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e!==f&&(n&&(_e(),y(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Q2(t){let e,n;return e=new H2({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function z2(t){let e,n;return e=new T2({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function G2(t){let e,n,r,i,s,o,u;e=new y2({});let l=t[0]&&Ku(t);return o=new W2({}),{c(){V(e.$$.fragment),n=K(),l&&l.c(),r=K(),i=R("span"),s=K(),V(o.$$.fragment),I(i,"class","flex-1")},m(a,f){N(e,a,f),w(a,n,f),l&&l.m(a,f),w(a,r,f),w(a,i,f),w(a,s,f),N(o,a,f),u=!0},p(a,f){a[0]?l?(l.p(a,f),f&1&&b(l,1)):(l=Ku(a),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(_e(),y(l,1,1,()=>{l=null}),ge())},i(a){u||(b(e.$$.fragment,a),b(l),b(o.$$.fragment,a),u=!0)},o(a){y(e.$$.fragment,a),y(l),y(o.$$.fragment,a),u=!1},d(a){a&&(E(n),E(r),E(i),E(s)),H(e,a),l&&l.d(a),H(o,a)}}}function Y2(t){let e,n;return e=new Oh({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[G2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,[i]){const s={};i&3&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function Z2(t,e,n){let r;return x(t,ft,i=>n(0,r=i)),[r]}class X2 extends ve{constructor(e){super(),ye(this,e,Z2,Y2,fe,{})}}function J2(t){let e,n;return e=new Ne({props:{path:A1}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function x2(t){let e,n;return e=new C1({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[1]?null:"true",$$slots:{default:[J2]},$$scope:{ctx:t}}}),e.$on("click",t[3]),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&3&&(s["aria-disabled"]=r[0]!==null&&r[1]?null:"true"),i&128&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function e0(t){let e,n;return e=new h1({props:{class:"border-b border-gray-300",$$slots:{default:[x2]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,[i]){const s={};i&131&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function t0(t,e,n){let r,i,s,o;x(t,ft,f=>n(4,r=f)),x(t,Z1,f=>n(0,i=f)),x(t,iu,f=>n(1,o=f));const u=vt(),l=Et();x(t,l,f=>n(5,s=f));function a(){r!==null&&i!==null&&uf({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){iu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&u.invalidateQueries({queryKey:["configs"]})}})}return[i,o,l,a]}class n0 extends ve{constructor(e){super(),ye(this,e,t0,e0,fe,{})}}function r0(t){let e;return{c(){e=R("div"),I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function i0(t){let e;return{c(){e=R("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function s0(t){let e,n,r,i,s;return n=new i2({}),i=new vb({}),{c(){e=R("div"),V(n.$$.fragment),r=K(),V(i.$$.fragment),I(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),N(n,e,null),F(e,r),N(i,e,null),s=!0},i(o){s||(b(n.$$.fragment,o),b(i.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),y(i.$$.fragment,o),s=!1},d(o){o&&E(e),H(n),H(i)}}}function ju(t){let e=t[4].fullpath+"",n;return{c(){n=Z(e)},m(r,i){w(r,n,i)},p(r,i){i&16&&e!==(e=r[4].fullpath+"")&&je(n,e)},d(r){r&&E(n)}}}function o0(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v,_,h,k,O,S;document.title=e=t[0],o=new X2({}),l=new n0({});const C=[s0,i0,r0],P=[];function D(M,$){return M[1]!==null&&M[3].isSuccess?0:M[1]===null?1:2}f=D(t),c=P[f]=C[f](t);let q=t[4]&&ju(t);return h=new h_({}),O=new fb({}),{c(){n=R("link"),i=K(),s=R("main"),V(o.$$.fragment),u=K(),V(l.$$.fragment),a=K(),c.c(),m=K(),p=R("footer"),d=R("div"),q&&q.c(),g=K(),v=R("div"),_=K(),V(h.$$.fragment),k=K(),V(O.$$.fragment),I(n,"rel","stylesheet"),I(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),I(d,"class","font-mono font-bold"),I(v,"class","flex-1"),I(p,"class","flex flex-row px-2 py-1 border-t border-slate-300 text-sm"),I(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(M,$){F(document.head,n),w(M,i,$),w(M,s,$),N(o,s,null),F(s,u),N(l,s,null),F(s,a),P[f].m(s,null),F(s,m),F(s,p),F(p,d),q&&q.m(d,null),F(p,g),F(p,v),F(p,_),N(h,p,null),w(M,k,$),N(O,M,$),S=!0},p(M,[$]){(!S||$&1)&&e!==(e=M[0])&&(document.title=e),(!S||$&6&&r!==(r="/api/branches/"+(M[1]!==null?M[1].id:"-")+"/configs/ui-stylesheet?timestamp="+M[2]))&&I(n,"href",r);let U=f;f=D(M),f!==U&&(_e(),y(P[U],1,1,()=>{P[U]=null}),ge(),c=P[f],c||(c=P[f]=C[f](M),c.c()),b(c,1),c.m(s,m)),M[4]?q?q.p(M,$):(q=ju(M),q.c(),q.m(d,null)):q&&(q.d(1),q=null)},i(M){S||(b(o.$$.fragment,M),b(l.$$.fragment,M),b(c),b(h.$$.fragment,M),b(O.$$.fragment,M),S=!0)},o(M){y(o.$$.fragment,M),y(l.$$.fragment,M),y(c),y(h.$$.fragment,M),y(O.$$.fragment,M),S=!1},d(M){M&&(E(i),E(s),E(k)),E(n),H(o),H(l),P[f].d(),q&&q.d(),H(h),H(O,M)}}}function l0(t,e,n){let r,i,s,o,u;x(t,ft,p=>n(4,u=p));const l=bt("uEditionConfig"),a=bt("uEditorConfig");x(t,a,p=>n(3,o=p));const f=bt("currentBranch");x(t,f,p=>n(1,i=p));const c=ze(l,p=>p.isSuccess&&p.data.languages&&p.data.languages.length>0&&p.data.languages[0].code&&p.data.title&&p.data.title[p.data.languages[0].code]?"μEditor - "+p.data.title[p.data.languages[0].code]:"μEditor");x(t,c,p=>n(0,r=p));const m=ze(l,p=>new Date().getTime());return x(t,m,p=>n(2,s=p)),[r,i,s,o,u,a,f,c,m]}class u0 extends ve{constructor(e){super(),ye(this,e,l0,o0,fe,{})}}function Do(t,{delay:e=0,duration:n=400,easing:r=ns}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}function qu(t){let e;const n=t[2].default,r=de(n,t,t[3],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8)&&pe(r,n,i,i[3],e?me(n,i[3],s,null):he(i[3]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function a0(t){let e;return{c(){e=Z("μEditor not ready")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function f0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[a0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
18
+ logs to determine what the issue is.</p>`,I(r,"data-dialog-content-area","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function c0(t){let e,n,r,i;return e=new vi({props:{transition:Do}}),r=new yi({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden",$$slots:{default:[f0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function d0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[c0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function m0(t){let e,n,r,i=t[0].isSuccess&&qu(t);return n=new si({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[d0]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=K(),V(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),N(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=qu(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(_e(),y(i,1,1,()=>{i=null}),ge());const u={};o&1&&(u.open=s[0].isSuccess&&!s[0].data.ready),o&8&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){r||(b(i),b(n.$$.fragment,s),r=!0)},o(s){y(i),y(n.$$.fragment,s),r=!1},d(s){s&&E(e),i&&i.d(s),H(n,s)}}}function p0(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Or({queryKey:[""],queryFn:cn,refetchInterval:6e4});return x(t,o,u=>n(0,r=u)),At("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class h0 extends ve{constructor(e){super(),ye(this,e,p0,m0,fe,{})}}function _0(t){let e;return{c(){e=Z("Authenticating")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function g0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[_0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),r=R("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",I(r,"data-dialog-content-area","")},m(s,o){N(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),H(e,s)}}}function b0(t){let e,n,r,i;return e=new vi({props:{transition:Do,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[g0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function y0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[b0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function v0(t){let e;return{c(){e=Z("Login")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function k0(t){let e;return{c(){e=R("div"),e.innerHTML='<p>Click on the link below to log in via GitHub.</p> <div class="my-8 text-center"><a href="/api/auth/oidc/login" data-button="">Log in via GitHub</a></div>',I(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:ce,d(n){n&&E(e)}}}function C0(t){let e,n,r,i,s,o,u,l,a,f,c,m,p,d,g,v,_=t[4].isError&&Wu(),h=t[4].isError&&Qu();function k(C,P){return C[4].isPending?w0:E0}let O=k(t),S=O(t);return{c(){e=R("form"),n=R("label"),r=R("span"),r.textContent="E-Mail",i=K(),s=R("input"),o=K(),_&&_.c(),u=K(),l=R("label"),a=R("span"),a.textContent="Password",f=K(),c=R("input"),m=K(),h&&h.c(),p=K(),d=R("div"),S.c(),I(r,"data-form-field-label",""),I(s,"type","text"),I(s,"data-form-field-text",""),I(a,"data-form-field-label",""),I(c,"type","password"),I(c,"data-form-field-text",""),I(d,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(C,P){w(C,e,P),F(e,n),F(n,r),F(n,i),F(n,s),it(s,t[0]),F(n,o),_&&_.m(n,null),F(e,u),F(e,l),F(l,a),F(l,f),F(l,c),it(c,t[1]),F(l,m),h&&h.m(l,null),F(e,p),F(e,d),S.m(d,null),g||(v=[G(s,"input",t[9]),G(c,"input",t[10]),G(e,"submit",t[11])],g=!0)},p(C,P){P&1&&s.value!==C[0]&&it(s,C[0]),C[4].isError?_||(_=Wu(),_.c(),_.m(n,null)):_&&(_.d(1),_=null),P&2&&c.value!==C[1]&&it(c,C[1]),C[4].isError?h||(h=Qu(),h.c(),h.m(l,null)):h&&(h.d(1),h=null),O!==(O=k(C))&&(S.d(1),S=O(C),S&&(S.c(),S.m(d,null)))},d(C){C&&E(e),_&&_.d(),h&&h.d(),S.d(),g=!1,Te(v)}}}function Wu(t){let e;return{c(){e=R("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qu(t){let e;return{c(){e=R("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function E0(t){let e;return{c(){e=R("button"),e.textContent="Login",I(e,"type","submit"),I(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function w0(t){let e;return{c(){e=R("span"),e.textContent="Logging in...",I(e,"data-button",""),I(e,"class","inline-flex")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function O0(t){let e,n,r,i;e=new Tt({props:{$$slots:{default:[v0]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[3].data)==null?void 0:f.auth.provider)==="email-password")return C0;if(((c=l[3].data)==null?void 0:c.auth.provider)==="github")return k0}let o=s(t),u=o&&o(t);return{c(){V(e.$$.fragment),n=K(),u&&u.c(),r=Se()},m(l,a){N(e,l,a),w(l,n,a),u&&u.m(l,a),w(l,r,a),i=!0},p(l,a){const f={};a&4096&&(f.$$scope={dirty:a,ctx:l}),e.$set(f),o===(o=s(l))&&u?u.p(l,a):(u&&u.d(1),u=o&&o(l),u&&(u.c(),u.m(r.parentNode,r)))},i(l){i||(b(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){l&&(E(n),E(r)),H(e,l),u&&u.d(l)}}}function A0(t){let e,n,r,i;return e=new vi({props:{transition:Do,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[O0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function T0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[A0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=K(),V(r.$$.fragment)},m(s,o){N(e,s,o),w(s,n,o),N(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),H(e,s),H(r,s)}}}function $0(t){let e,n,r,i,s;const o=t[8].default,u=de(o,t,t[12],null);return n=new si({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[y0]},$$scope:{ctx:t}}}),i=new si({props:{open:t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[T0]},$$scope:{ctx:t}}}),{c(){u&&u.c(),e=K(),V(n.$$.fragment),r=K(),V(i.$$.fragment)},m(l,a){u&&u.m(l,a),w(l,e,a),N(n,l,a),w(l,r,a),N(i,l,a),s=!0},p(l,[a]){u&&u.p&&(!s||a&4096)&&pe(u,o,l,l[12],s?me(o,l[12],a,null):he(l[12]),null);const f={};a&4&&(f.open=l[2]==="pending"),a&4096&&(f.$$scope={dirty:a,ctx:l}),n.$set(f);const c={};a&4&&(c.open=l[2]==="error"),a&4123&&(c.$$scope={dirty:a,ctx:l}),i.$set(c)},i(l){s||(b(u,l),b(n.$$.fragment,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(n.$$.fragment,l),y(i.$$.fragment,l),s=!1},d(l){l&&(E(e),E(r)),u&&u.d(l),H(n,l),H(i,l)}}}function S0(t,e,n){let r,i,s,{$$slots:o={},$$scope:u}=e;const l=vt(),a=Ci();x(t,a,h=>n(3,i=h));const f=Or({queryKey:["auth","user"],queryFn:cn,retry:!1,refetchInterval:2e4});At("currentUser",f);const c=ze([a,f],([h,k])=>h.isSuccess?k.isSuccess?"authenticated":k.isError?h.data.auth.provider==="no-auth"||h.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(O=>{O.ok&&l.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":k.status:h.status);x(t,c,h=>n(2,r=h));let m="",p="";const d=di({mutationFn:async([h,k])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:h,password:k})})).ok)l.invalidateQueries({queryKey:["auth"]}),l.invalidateQueries({queryKey:["branches"]}),n(0,m=""),n(1,p="");else throw"Authentication failed"}});x(t,d,h=>n(4,s=h));function g(){m=this.value,n(0,m)}function v(){p=this.value,n(1,p)}const _=h=>{h.preventDefault(),s.isPending||s.mutate([m,p])};return t.$$set=h=>{"$$scope"in h&&n(12,u=h.$$scope)},[m,p,r,i,s,a,c,d,o,g,v,_,u]}class R0 extends ve{constructor(e){super(),ye(this,e,S0,$0,fe,{})}}function D0(t){let e;const n=t[1].default,r=de(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&pe(r,n,i,i[0],e?me(n,i[0],s,null):he(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function F0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=lf("branch"),o=Ci(),u=To(),l=ze([o,u],([d,g])=>({queryKey:["branches"],queryFn:cn,refetchInterval:6e4,enabled:d.isSuccess&&d.data.ready&&g.isSuccess})),a=Or(l);At("branches",a);const f=Fe(null);At("currentBranch",f);const c=o.subscribe(d=>{d.isSuccess&&d.data.ready&&!d.data.git.enabled&&f.set({id:"-",nogit:!0,title:"All files"})}),m=f.subscribe(d=>{d!==null?of("branch",d.id):Y1("branch")}),p=a.subscribe(d=>{if(d.isSuccess){for(let g of d.data.local)g.id===s&&f.set(g);p()}});return is(()=>{m(),c()}),t.$$set=d=>{"$$scope"in d&&n(0,i=d.$$scope)},[i,r]}class P0 extends ve{constructor(e){super(),ye(this,e,F0,D0,fe,{})}}function L0(t){let e;const n=t[1].default,r=de(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&pe(r,n,i,i[0],e?me(n,i[0],s,null):he(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function I0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=Et(),o=ze(s,f=>f!==null?{queryKey:["branches",f.id,"configs","uedition"],queryFn:cn}:{queryKey:["branches","-","configs","uedition"],queryFn:cn,enabled:f!==null}),u=Or(o);At("uEditionConfig",u);const l=ze(s,f=>f!==null?{queryKey:["branches",f.id,"configs","ueditor"],queryFn:cn}:{queryKey:["branches","-","configs","ueditor"],queryFn:cn,enabled:!1}),a=Or(l);return At("uEditorConfig",a),t.$$set=f=>{"$$scope"in f&&n(0,i=f.$$scope)},[i,r]}class M0 extends ve{constructor(e){super(),ye(this,e,I0,L0,fe,{})}}function N0(t){let e,n;return e=new u0({}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function H0(t){let e,n;return e=new M0({props:{$$slots:{default:[N0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function V0(t){let e,n;return e=new P0({props:{$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function U0(t){let e,n;return e=new R0({props:{$$slots:{default:[V0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function B0(t){let e,n;return e=new h0({props:{$$slots:{default:[U0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function K0(t){let e,n;return e=new lc({props:{client:t[0],$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment)},m(r,i){N(e,r,i),n=!0},p(r,[i]){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){H(e,r)}}}function j0(t){return[new ka]}class q0 extends ve{constructor(e){super(),ye(this,e,j0,K0,fe,{})}}new q0({target:document.getElementById("app")});export{ze as $,L1 as A,H1 as B,Ge as C,Ae as D,Ce as E,Se as F,ce as G,Rf as H,Ne as I,Z1 as J,vt as K,Et as L,uf as M,iu as N,Ut as O,Vt as P,Xb as Q,J as R,ve as S,x0 as T,mi as U,ty as V,Pe as W,ke as X,Xe as Y,Fe as Z,ar as _,R1 as a,Cm as a$,Lt as a0,Rr as a1,Zn as a2,xr as a3,Rc as a4,Qi as a5,ur as a6,fc as a7,iy as a8,Gr as a9,Qe as aA,J0 as aB,_t as aC,ry as aD,sy as aE,ii as aF,hi as aG,At as aH,_i as aI,bt as aJ,ef as aK,de as aL,pe as aM,he as aN,me as aO,Ke as aP,Pn as aQ,ie as aR,yt as aS,Oe as aT,oe as aU,Ue as aV,Me as aW,Fn as aX,at as aY,Dn as aZ,Tn as a_,rt as aa,ae as ab,ny as ac,qt as ad,uc as ae,Zs as af,on as ag,G0 as ah,Y0 as ai,X0 as aj,Z0 as ak,ni as al,Ft as am,xe as an,es as ao,Ar as ap,$r as aq,hc as ar,oy as as,Wo as at,Jr as au,mt as av,Ys as aw,gn as ax,go as ay,ey as az,P1 as b,tn as b0,fi as b1,ay as b2,uy as b3,Ib as b4,h1 as b5,C1 as b6,cy as b7,fy as b8,dy as b9,ly as ba,Mb as bb,my as bc,Io as bd,it as be,V1 as bf,si as bg,ki as bh,bi,vi as bj,yi as bk,Tt as bl,Mt as bm,Q0 as bn,K as c,V as d,R as e,I as f,w as g,F as h,ye as i,N as j,je as k,G as l,N1 as m,b as n,_e as o,y as p,ge as q,E as r,fe as s,Z as t,H as u,Te as v,x as w,ft as x,rs as y,is as z};