uEdition-Editor 2.0.0b2__py3-none-any.whl → 2.0.0b4__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.
- uedition_editor/__about__.py +1 -1
- uedition_editor/api/branches.py +40 -2
- uedition_editor/api/configs.py +14 -3
- uedition_editor/api/files.py +158 -85
- uedition_editor/api/util.py +34 -10
- uedition_editor/frontend/dist/assets/{CodeMirrorEditor-BFeD7k_m.js → CodeMirrorEditor-CscxspV6.js} +1 -1
- uedition_editor/frontend/dist/assets/{FolderEditor-DIEGEh84.js → FolderEditor-Bj2w6MKI.js} +1 -1
- uedition_editor/frontend/dist/assets/ImageEditor-BCtwmSpD.js +1 -0
- uedition_editor/frontend/dist/assets/TeiEditor-FqXheBay.js +192 -0
- uedition_editor/frontend/dist/assets/index-CD2zWAAU.js +17 -0
- uedition_editor/frontend/dist/assets/{index-C9d-OSiG.css → index-HmBQiVS_.css} +1 -1
- uedition_editor/frontend/dist/index.html +2 -2
- uedition_editor/settings.py +11 -6
- {uedition_editor-2.0.0b2.dist-info → uedition_editor-2.0.0b4.dist-info}/METADATA +13 -9
- uedition_editor-2.0.0b4.dist-info/RECORD +27 -0
- uedition_editor/frontend/dist/assets/ImageEditor-BRTKiGoH.js +0 -1
- uedition_editor/frontend/dist/assets/TeiEditor-BeHkuEAu.js +0 -192
- uedition_editor/frontend/dist/assets/index-BtIoSLIQ.js +0 -16
- uedition_editor-2.0.0b2.dist-info/RECORD +0 -27
- {uedition_editor-2.0.0b2.dist-info → uedition_editor-2.0.0b4.dist-info}/WHEEL +0 -0
- {uedition_editor-2.0.0b2.dist-info → uedition_editor-2.0.0b4.dist-info}/entry_points.txt +0 -0
- {uedition_editor-2.0.0b2.dist-info → uedition_editor-2.0.0b4.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-CscxspV6.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-FqXheBay.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 gs=(t,e,n)=>bf(t,typeof e!="symbol"?e+"":e,n),bs=(t,e,n)=>e.has(t)||Po("Cannot "+n);var T=(t,e,n)=>(bs(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),re=(t,e,n,r)=>(bs(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),$e=(t,e,n)=>(bs(t,e,"access private method"),n);var Oi=(t,e,n,r)=>({set _(i){re(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 me(){}const ts=t=>t;function ne(t,e){for(const n in e)t[n]=e[n];return t}function ia(t){return t()}function Lo(){return Object.create(null)}function Te(t){t.forEach(ia)}function Zn(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 so(t,...e){if(t==null){for(const r of e)r(void 0);return me}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function $r(t){let e;return so(t,n=>e=n)(),e}function J(t,e,n){t.$$.on_destroy.push(so(e,n))}function pe(t,e,n,r){if(t){const i=sa(t,e,n,r);return t[0](i)}}function sa(t,e,n,r){return t[1]&&r?ne(n.ctx.slice(),t[1](r(e))):n.ctx}function he(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 _e(t,e,n,r,i,s){if(i){const o=sa(e,n,r,s);t.p(o,i)}}function ge(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 vt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function je(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&&Zn(t.destroy)?t.destroy:me}const oa=typeof window<"u";let oo=oa?()=>window.performance.now():()=>Date.now(),lo=oa?t=>requestAnimationFrame(t):me;const or=new Set;function la(t){or.forEach(e=>{e.c(t)||(or.delete(e),e.f())}),or.size!==0&&lo(la)}function uo(t){let e;return or.size===0&&lo(la),{promise:new Promise(n=>{or.add(e={c:t,f:n})}),abort(){or.delete(e)}}}function D(t,e){t.appendChild(e)}function ua(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=S("style");return e.textContent="/* empty */",kf(ua(t),e),e.sheet}function kf(t,e){return D(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 S(t){return document.createElement(t)}function Ds(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function U(){return Z(" ")}function Fe(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function M(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Cf=["width","height"];function ie(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]:M(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:M(t,e,n)}function Vi(t){return/-/.test(t)?Ef:ie}function Of(t){return Array.from(t.childNodes)}function qe(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 aa(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 Bi=new Map;let Ui=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 Bi.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 g=e+(n-e)*s(v);a+=v*100+`%{${o(g,1-g)}}
|
|
4
|
+
`}const f=a+`100% {${o(n,1-n)}}
|
|
5
|
+
}`,c=`__svelte_${Tf(f)}_${u}`,d=ua(t),{stylesheet:m,rules:p}=Bi.get(d)||$f(d,t);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Ui+=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(", "),Ui-=i,Ui||Sf())}function Sf(){lo(()=>{Ui||(Bi.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),Bi.clear())})}let Zr;function zr(t){Zr=t}function ci(){if(!Zr)throw new Error("Function called outside component initialization");return Zr}function ns(t){ci().$$.on_mount.push(t)}function rs(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=aa(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function bt(t,e){return ci().$$.context.set(t,e),e}function at(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 sr=[],Ce=[];let lr=[];const Ps=[],fa=Promise.resolve();let Ls=!1;function ca(){Ls||(Ls=!0,fa.then(da))}function Wt(){return ca(),fa}function ft(t){lr.push(t)}function Bt(t){Ps.push(t)}const ys=new Set;let er=0;function da(){if(er!==0)return;const t=Zr;do{try{for(;er<sr.length;){const e=sr[er];er++,zr(e),Ff(e.$$)}}catch(e){throw sr.length=0,er=0,e}for(zr(null),sr.length=0,er=0;Ce.length;)Ce.pop()();for(let e=0;e<lr.length;e+=1){const n=lr[e];ys.has(n)||(ys.add(n),n())}lr.length=0}while(sr.length);for(;Ps.length;)Ps.pop()();Ls=!1,ys.clear(),zr(t)}function Ff(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(ft)}}function Df(t){const e=[],n=[];lr.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),lr=e}let Br;function ao(){return Br||(Br=Promise.resolve(),Br.then(()=>{Br=null})),Br}function Wn(t,e,n){t.dispatchEvent(aa(`${e?"intro":"outro"}${n}`))}const Mi=new Set;let xt;function ce(){xt={r:0,c:[],p:xt}}function de(){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 fo={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:d=0,duration:m=300,easing:p=ts,tick:_=me,css:v}=i||fo;v&&(o=Ki(t,0,1,m,d,p,v,l++)),_(0,1);const g=oo()+d,h=g+m;u&&u.abort(),s=!0,ft(()=>Wn(t,!0,"start")),u=uo(k=>{if(s){if(k>=h)return _(1,0),Wn(t,!0,"end"),a(),s=!1;if(k>=g){const O=p((k-g)/m);_(O,1-O)}}return s})}let c=!1;return{start(){c||(c=!0,ji(t),Zn(i)?(i=i(r),ao().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Pn(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:d=ts,tick:m=me,css:p}=i||fo;p&&(o=Ki(t,1,0,c,f,d,p));const _=oo()+f,v=_+c;ft(()=>Wn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),uo(g=>{if(s){if(g>=v)return m(0,1),Wn(t,!1,"end"),--u.r||Te(u.c),!1;if(g>=_){const h=d((g-_)/c);m(1-h,h)}}return s})}return Zn(i)?ao().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 $n(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 d(p,_){const v=p.b-o;return _*=Math.abs(v),{a:o,b:p.b,d:v,duration:_,start:p.start,end:p.start+_,group:p.group}}function m(p){const{delay:_=0,duration:v=300,easing:g=ts,tick:h=me,css:k}=s||fo,O={start:oo()+_,b:p};p||(O.group=xt,xt.r+=1),"inert"in t&&(p?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=O:(k&&(c(),a=Ki(t,o,p,v,_,g,k)),p&&h(0,1),u=d(O,v),ft(()=>Wn(t,p,"start")),uo($=>{if(l&&$>l.start&&(u=d(l,v),l=null,Wn(t,u.b,"start"),k&&(c(),a=Ki(t,o,u.b,u.duration,0,g,s.css))),u){if($>=u.end)h(o=u.b,1-o),Wn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if($>=u.start){const C=$-u.start;o=u.a+u.d*g(C/u.duration),h(o,1-o)}}return!!(u||l)}))}return{run(p){Zn(s)?ao().then(()=>{s=s({direction:p?"in":"out"}),m(p)}):m(p)},end(){c(),u=l=null}}}function nn(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Ne(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 B(t){t&&t.c()}function H(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),ft(()=>{const s=t.$$.on_mount.map(ia).filter(Zn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(ft)}function V(t,e){const n=t.$$;n.fragment!==null&&(Df(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&&(sr.push(t),ca(),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:me,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,d,...m)=>{const p=m.length?m[0]:d;return a.ctx&&i(a.ctx[c],a.ctx[c]=p)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](p),f&&Pf(t,c)),d}):[],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),H(t,e.target,e.anchor),da()}zr(l)}class ve{constructor(){gs(this,"$$");gs(this,"$$set")}$destroy(){V(this,1),this.$destroy=me}$on(e,n){if(!Zn(n))return me;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(){}},Or=typeof window>"u"||"Deno"in globalThis;function Ht(){}function If(t,e){return typeof t=="function"?t(e):t}function Is(t){return typeof t=="number"&&t>=0&&t!==1/0}function ma(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ur(t,e){return typeof t=="function"?t(e):t}function qt(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!==co(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(Qn(e.options.mutationKey)!==Qn(s))return!1}else if(!Xr(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function co(t,e){return((e==null?void 0:e.queryKeyHashFn)||Qn)(t)}function Qn(t){return JSON.stringify(t,(e,n)=>Ms(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 pa(t,e){if(t===e)return t;const n=Vo(t)&&Vo(e);if(n||Ms(t)&&Ms(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]=pa(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 Ms(t){if(!Bo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Bo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Bo(t){return Object.prototype.toString.call(t)==="[object Object]"}function Mf(t){return new Promise(e=>{setTimeout(e,t)})}function Ns(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?pa(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 mo=Symbol();function ha(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===mo?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hn,bn,dr,Gu,Vf=(Gu=class extends Sr{constructor(){super();be(this,Hn);be(this,bn);be(this,dr);re(this,dr,e=>{if(!Or&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,bn)||this.setEventListener(T(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,bn))==null||e.call(this),re(this,bn,void 0))}setEventListener(e){var n;re(this,dr,e),(n=T(this,bn))==null||n.call(this),re(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){T(this,Hn)!==e&&(re(this,Hn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof T(this,Hn)=="boolean"?T(this,Hn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hn=new WeakMap,bn=new WeakMap,dr=new WeakMap,Gu),po=new Vf,mr,yn,pr,Yu,Bf=(Yu=class extends Sr{constructor(){super();be(this,mr,!0);be(this,yn);be(this,pr);re(this,pr,e=>{if(!Or&&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,pr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,yn))==null||e.call(this),re(this,yn,void 0))}setEventListener(e){var n;re(this,pr,e),(n=T(this,yn))==null||n.call(this),re(this,yn,e(this.setOnline.bind(this)))}setOnline(e){T(this,mr)!==e&&(re(this,mr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return T(this,mr)}},mr=new WeakMap,yn=new WeakMap,pr=new WeakMap,Yu),Wi=new Bf;function Hs(){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 Uf(t){return Math.min(1e3*2**t,3e4)}function _a(t){return(t??"online")==="online"?Wi.isOnline():!0}var ga=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function vs(t){return t instanceof ga}function ba(t){let e=!1,n=0,r=!1,i;const s=Hs(),o=_=>{var v;r||(d(new ga(_)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>po.isFocused()&&(t.networkMode==="always"||Wi.isOnline())&&t.canRun(),f=()=>_a(t.networkMode)&&t.canRun(),c=_=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,_),i==null||i(),s.resolve(_))},d=_=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,_),i==null||i(),s.reject(_))},m=()=>new Promise(_=>{var v;i=g=>{(r||a())&&_(g)},(v=t.onPause)==null||v.call(t)}).then(()=>{var _;i=void 0,r||(_=t.onContinue)==null||_.call(t)}),p=()=>{if(r)return;let _;const v=n===0?t.initialPromise:void 0;try{_=v??t.fn()}catch(g){_=Promise.reject(g)}Promise.resolve(_).then(c).catch(g=>{var C;if(r)return;const h=t.retry??(Or?0:3),k=t.retryDelay??Uf,O=typeof k=="function"?k(n,g):k,$=h===!0||typeof h=="number"&&n<h||typeof h=="function"&&h(n,g);if(e||!$){d(g);return}n++,(C=t.onFail)==null||C.call(t,n,g),Mf(O).then(()=>a()?void 0:m()).then(()=>{e?d(g):p()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?p():m().then(p),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(),Vn,Zu,ya=(Zu=class{constructor(){be(this,Vn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Is(this.gcTime)&&re(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Or?1/0:5*60*1e3))}clearGcTimeout(){T(this,Vn)&&(clearTimeout(T(this,Vn)),re(this,Vn,void 0))}},Vn=new WeakMap,Zu),hr,_r,Nt,Ct,oi,Bn,Kt,on,Xu,jf=(Xu=class extends ya{constructor(e){super();be(this,Kt);be(this,hr);be(this,_r);be(this,Nt);be(this,Ct);be(this,oi);be(this,Bn);re(this,Bn,!1),re(this,oi,e.defaultOptions),this.setOptions(e.options),this.observers=[],re(this,Nt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,re(this,hr,qf(this.options)),this.state=e.state??T(this,hr),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=Ns(this.state.data,e,this.options);return $e(this,Kt,on).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,Kt,on).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,hr))}isActive(){return this.observers.some(e=>qt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mo||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||!ma(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,Bn)?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,Kt,on).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(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(re(this,Bn,!0),r.signal)})},s=()=>{const c=ha(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),re(this,Bn,!1),this.options.persister?this.options.persister(c,d,this):c(d)},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),re(this,_r,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&$e(this,Kt,on).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,m,p,_;vs(c)&&c.silent||$e(this,Kt,on).call(this,{type:"error",error:c}),vs(c)||((m=(d=T(this,Nt).config).onError)==null||m.call(d,c,this),(_=(p=T(this,Nt).config).onSettled)==null||_.call(p,this.state.data,c,this)),this.scheduleGc()};return re(this,Ct,ba({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,m,p,_;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(m=(d=T(this,Nt).config).onSuccess)==null||m.call(d,c,this),(_=(p=T(this,Nt).config).onSettled)==null||_.call(p,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{$e(this,Kt,on).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{$e(this,Kt,on).call(this,{type:"pause"})},onContinue:()=>{$e(this,Kt,on).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Ct).start()}},hr=new WeakMap,_r=new WeakMap,Nt=new WeakMap,Ct=new WeakMap,oi=new WeakMap,Bn=new WeakMap,Kt=new WeakSet,on=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,...va(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 vs(i)&&i.revert&&T(this,_r)?{...T(this,_r),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})})},Xu);function va(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_a(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,Ju,Wf=(Ju=class extends Sr{constructor(e={}){super();be(this,Yt);this.config=e,re(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??co(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,Ju),Zt,Ot,Un,Xt,_n,xu,Qf=(xu=class extends ya{constructor(e){super();be(this,Xt);be(this,Zt);be(this,Ot);be(this,Un);this.mutationId=e.mutationId,re(this,Ot,e.mutationCache),re(this,Zt,[]),this.state=e.state||ka(),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,Ot).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){re(this,Zt,T(this,Zt).filter(n=>n!==e)),this.scheduleGc(),T(this,Ot).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){T(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():T(this,Ot).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,d,m,p,_,v,g,h,k,O,$,C,P;re(this,Un,ba({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,K)=>{$e(this,Xt,_n).call(this,{type:"failed",failureCount:R,error:K})},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,Ot).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,Ot).config).onMutate)==null?void 0:s.call(i,e,this));const K=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));K!==this.state.context&&$e(this,Xt,_n).call(this,{type:"pending",context:K,variables:e,isPaused:r})}const R=await T(this,Un).start();return await((a=(l=T(this,Ot).config).onSuccess)==null?void 0:a.call(l,R,e,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,R,e,this.state.context)),await((m=(d=T(this,Ot).config).onSettled)==null?void 0:m.call(d,R,null,this.state.variables,this.state.context,this)),await((_=(p=this.options).onSettled)==null?void 0:_.call(p,R,null,e,this.state.context)),$e(this,Xt,_n).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(v=T(this,Ot).config).onError)==null?void 0:g.call(v,R,e,this.state.context,this)),await((k=(h=this.options).onError)==null?void 0:k.call(h,R,e,this.state.context)),await(($=(O=T(this,Ot).config).onSettled)==null?void 0:$.call(O,void 0,R,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,R,e,this.state.context)),R}finally{$e(this,Xt,_n).call(this,{type:"error",error:R})}}finally{T(this,Ot).runNext(this)}}},Zt=new WeakMap,Ot=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,Ot).notify({mutation:this,type:"updated",action:e})})},xu);function ka(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var an,jt,li,ea,zf=(ea=class extends Sr{constructor(e={}){super();be(this,an);be(this,jt);be(this,li);this.config=e,re(this,an,new Set),re(this,jt,new Map),re(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,an).add(e);const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).get(n);r?r.push(e):T(this,jt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(T(this,an).delete(e)){const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).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,jt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).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,jt).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,an).forEach(e=>{this.notify({type:"removed",mutation:e})}),T(this,an).clear(),T(this,jt).clear()})}getAll(){return Array.from(T(this,an))}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))))}},an=new WeakMap,jt=new WeakMap,li=new WeakMap,ea);function Ti(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Uo(t){return{onFetch:(e,n)=>{var f,c,d,m,p;const r=e.options,i=(d=(c=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((m=e.state.data)==null?void 0:m.pages)||[],o=((p=e.state.data)==null?void 0:p.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let _=!1;const v=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?_=!0:e.signal.addEventListener("abort",()=>{_=!0}),e.signal)})},g=ha(e.options,e.fetchOptions),h=async(k,O,$)=>{if(_)return Promise.reject();if(O==null&&k.pages.length)return Promise.resolve(k);const C={queryKey:e.queryKey,pageParam:O,direction:$?"backward":"forward",meta:e.options.meta};v(C);const P=await g(C),{maxPages:R}=e.options,K=$?Hf:Nf;return{pages:K(k.pages,P,R),pageParams:K(k.pageParams,O,R)}};if(i&&s.length){const k=i==="backward",O=k?Gf:Ko,$={pages:s,pageParams:o},C=O(r,$);u=await h($,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 _,v;return(v=(_=e.options).persister)==null?void 0:v.call(_,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,gr,br,Cn,yr,vr,ta,Ca=(ta=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,gr);be(this,br);be(this,Cn);be(this,yr);be(this,vr);re(this,nt,t.queryCache||new Wf),re(this,vn,t.mutationCache||new zf),re(this,kn,t.defaultOptions||{}),re(this,gr,new Map),re(this,br,new Map),re(this,Cn,0)}mount(){Oi(this,Cn)._++,T(this,Cn)===1&&(re(this,yr,po.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),re(this,vr,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,yr))==null||t.call(this),re(this,yr,void 0),(e=T(this,vr))==null||e.call(this),re(this,vr,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(ur(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(ur(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=Uo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ht).catch(Ht)}ensureInfiniteQueryData(t){return t.behavior=Uo(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){re(this,kn,t)}setQueryDefaults(t,e){T(this,gr).set(Qn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...T(this,gr).values()],n={};return e.forEach(r=>{Xr(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){T(this,br).set(Qn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...T(this,br).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=co(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===mo&&(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,gr=new WeakMap,br=new WeakMap,Cn=new WeakMap,yr=new WeakMap,vr=new WeakMap,ta),St,Ve,ui,At,Kn,kr,En,Jt,ai,Cr,Er,jn,qn,wn,wr,Ye,Wr,Vs,Bs,Us,Ks,js,qs,Ws,Ea,na,Yf=(na=class extends Sr{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,ui);be(this,At);be(this,Kn);be(this,kr);be(this,En);be(this,Jt);be(this,ai);be(this,Cr);be(this,Er);be(this,jn);be(this,qn);be(this,wn);be(this,wr,new Set);this.options=n,re(this,St,e),re(this,Jt,null),re(this,En,Hs()),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,Ks).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qs(T(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qs(T(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ye,js).call(this),$e(this,Ye,qs).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 qt(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,Ws).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||qt(this.options.enabled,T(this,Ve))!==qt(r.enabled,T(this,Ve))||ur(this.options.staleTime,T(this,Ve))!==ur(r.staleTime,T(this,Ve)))&&$e(this,Ye,Vs).call(this);const o=$e(this,Ye,Bs).call(this);s&&(T(this,Ve)!==i||qt(this.options.enabled,T(this,Ve))!==qt(r.enabled,T(this,Ve))||o!==T(this,wn))&&$e(this,Ye,Us).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)&&(re(this,At,r),re(this,kr,this.options),re(this,Kn,T(this,Ve).state)),r}getCurrentResult(){return T(this,At)}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,wr).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,At)))}createResult(e,n){var R;const r=T(this,Ve),i=this.options,s=T(this,At),o=T(this,Kn),u=T(this,kr),a=e!==r?e.state:T(this,ui),{state:f}=e;let c={...f},d=!1,m;if(n._optimisticResults){const K=this.hasListeners(),N=!K&&jo(e,n),F=K&&qo(e,r,n,i);(N||F)&&(c={...c,...va(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:_,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))m=T(this,Cr);else try{re(this,ai,n.select),m=n.select(c.data),m=Ns(s==null?void 0:s.data,m,n),re(this,Cr,m),re(this,Jt,null)}catch(K){re(this,Jt,K)}else m=c.data;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let K;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))K=s.data;else if(K=typeof n.placeholderData=="function"?n.placeholderData((R=T(this,Er))==null?void 0:R.state.data,T(this,Er)):n.placeholderData,n.select&&K!==void 0)try{K=n.select(K),re(this,Jt,null)}catch(N){re(this,Jt,N)}K!==void 0&&(v="success",m=Ns(s==null?void 0:s.data,K,n),d=!0)}T(this,Jt)&&(p=T(this,Jt),m=T(this,Cr),_=Date.now(),v="error");const g=c.fetchStatus==="fetching",h=v==="pending",k=v==="error",O=h&&g,$=m!==void 0,P={status:v,fetchStatus:c.fetchStatus,isPending:h,isSuccess:v==="success",isError:k,isInitialLoading:O,isLoading:O,data:m,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:_,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:g,isRefetching:g&&!h,isLoadingError:k&&!$,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&$,isStale:ho(e,n),refetch:this.refetch,promise:T(this,En)};if(this.options.experimental_prefetchInRender){const K=I=>{P.status==="error"?I.reject(P.error):P.data!==void 0&&I.resolve(P.data)},N=()=>{const I=re(this,En,P.promise=Hs());K(I)},F=T(this,En);switch(F.status){case"pending":e.queryHash===r.queryHash&&K(F);break;case"fulfilled":(P.status==="error"||P.data!==F.value)&&N();break;case"rejected":(P.status!=="error"||P.error!==F.reason)&&N();break}}return P}updateResult(e){const n=T(this,At),r=this.createResult(T(this,Ve),this.options);if(re(this,Kn,T(this,Ve).state),re(this,kr,this.options),T(this,Kn).data!==void 0&&re(this,Er,T(this,Ve)),qi(r,n))return;re(this,At,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,wr).size)return!0;const l=new Set(u??T(this,wr));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,At)).some(a=>{const f=a;return T(this,At)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),$e(this,Ye,Ea).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ye,Ks).call(this)}},St=new WeakMap,Ve=new WeakMap,ui=new WeakMap,At=new WeakMap,Kn=new WeakMap,kr=new WeakMap,En=new WeakMap,Jt=new WeakMap,ai=new WeakMap,Cr=new WeakMap,Er=new WeakMap,jn=new WeakMap,qn=new WeakMap,wn=new WeakMap,wr=new WeakMap,Ye=new WeakSet,Wr=function(e){$e(this,Ye,Ws).call(this);let n=T(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ht)),n},Vs=function(){$e(this,Ye,js).call(this);const e=ur(this.options.staleTime,T(this,Ve));if(Or||T(this,At).isStale||!Is(e))return;const r=ma(T(this,At).dataUpdatedAt,e)+1;re(this,jn,setTimeout(()=>{T(this,At).isStale||this.updateResult()},r))},Bs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Ve)):this.options.refetchInterval)??!1},Us=function(e){$e(this,Ye,qs).call(this),re(this,wn,e),!(Or||qt(this.options.enabled,T(this,Ve))===!1||!Is(T(this,wn))||T(this,wn)===0)&&re(this,qn,setInterval(()=>{(this.options.refetchIntervalInBackground||po.isFocused())&&$e(this,Ye,Wr).call(this)},T(this,wn)))},Ks=function(){$e(this,Ye,Vs).call(this),$e(this,Ye,Us).call(this,$e(this,Ye,Bs).call(this))},js=function(){T(this,jn)&&(clearTimeout(T(this,jn)),re(this,jn,void 0))},qs=function(){T(this,qn)&&(clearInterval(T(this,qn)),re(this,qn,void 0))},Ws=function(){const e=T(this,St).getQueryCache().build(T(this,St),this.options);if(e===T(this,Ve))return;const n=T(this,Ve);re(this,Ve,e),re(this,ui,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ea=function(e){ut.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(T(this,At))}),T(this,St).getQueryCache().notify({query:T(this,Ve),type:"observerResultsUpdated"})})},na);function Zf(t,e){return qt(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&&Qs(t,e,e.refetchOnMount)}function Qs(t,e,n){if(qt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&ho(t,e)}return!1}function qo(t,e,n,r){return(t!==e||qt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&ho(t,n)}function ho(t,e){return qt(e.enabled,t)!==!1&&t.isStaleByTime(ur(e.staleTime,t))}function Xf(t,e){return!qi(t.getCurrentResult(),e)}var On,An,Rt,fn,dn,Ni,zs,ra,Jf=(ra=class extends Sr{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Rt);be(this,fn);re(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&&Qn(r.mutationKey)!==Qn(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,zs).call(this,n)}getCurrentResult(){return T(this,An)}reset(){var n;(n=T(this,Rt))==null||n.removeObserver(this),re(this,Rt,void 0),$e(this,dn,Ni).call(this),$e(this,dn,zs).call(this)}mutate(n,r){var i;return re(this,fn,r),(i=T(this,Rt))==null||i.removeObserver(this),re(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,fn=new WeakMap,dn=new WeakSet,Ni=function(){var r;const n=((r=T(this,Rt))==null?void 0:r.state)??ka();re(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})},zs=function(n){ut.batch(()=>{var r,i,s,o,u,l,a,f;if(T(this,fn)&&this.hasListeners()){const c=T(this,An).variables,d=T(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=T(this,fn)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=T(this,fn)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=T(this,fn)).onError)==null||l.call(u,n.error,c,d),(f=(a=T(this,fn)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(T(this,An))})})},ra);const tr=[];function yt(t,e){return{subscribe:De(t,e).subscribe}}function De(t,e=me){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!tr.length;for(const a of r)a[1](),tr.push(a,t);if(l){for(let a=0;a<tr.length;a+=2)tr[a][0](tr[a+1]);tr.length=0}}}function s(u){i(u(t))}function o(u,l=me){const a=[u,l];return r.add(a),r.size===1&&(n=e(i,s)||me),u(t),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}function Be(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 yt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=me;const d=()=>{if(f)return;c();const p=e(r?a[0]:a,o,u);s?o(p):c=Zn(p)?p:me},m=i.map((p,_)=>so(p,v=>{a[_]=v,f&=~(1<<_),l&&d()},()=>{f|=1<<_}));return l=!0,d(),function(){Te(m),c(),l=!1}})}function Wo(t){return{subscribe:t.subscribe.bind(t)}}const wa="$$_queryClient",xf=()=>{const t=at(wa);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=>{bt(wa,t)},tc="$$_isRestoring",nc=()=>{try{const t=at(tc);return t||yt(!1)}catch{return yt(!1)}};function rc(){return nc()}function Et(t){return xf()}function Oa(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Aa(){}function ic(t,e,n){const r=Et(),i=rc(),s=Oa(t)?t:yt(t),o=Be([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,$r(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=Be(i,(f,c)=>{const d=f?Aa:u.subscribe(ut.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=Be([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Tn(t,e){return ic(t,Yf)}function di(t,e){const n=Et(),r=Oa(t)?t:yt(t),i=new Jf(n,$r(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Aa)},i.setOptions(l)});const o=yt(i.getCurrentResult(),l=>i.subscribe(ut.batchCalls(a=>l(a)))),{subscribe:u}=Be(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function sc(t){let e;const n=t[2].default,r=pe(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)&&_e(r,n,i,i[1],e?he(n,i[1],s,null):ge(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 Ca}=e;return ns(()=>{s.mount()}),ec(s),rs(()=>{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(ar(n,e))return n}function ar(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--&&ar(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)||!ar(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)||!ar(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=ar){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Dt(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}Dt({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function is(t){if(t!==null)return""}function Go(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function x0(t){if(!pt)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return x(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 Be(n,u=>{const l=i(u);if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,a}return $i({...l,[`data-melt-${t}`]:"",action:r??ze})});{const u=i,l=u==null?void 0:u();if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,Go(a)}return Go($i({...l,[`data-melt-${t}`]:"",action:r??ze}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Xn(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 pt=typeof document<"u",Ta=t=>typeof t=="function";function mi(t){return t instanceof Element}function x(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 ln(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 x(t)?t.isContentEditable:!1}function fc(t){return t!==null&&typeof t=="object"}function $a(t){return fc(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ze(){}function gt(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(!x(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 Gs(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const Jr=t=>{try{ns(t)}catch{return t}},Sa=t=>{try{rs(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])=>!ar(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=De(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 fr=(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 cn(t){return new Promise(e=>setTimeout(e,t))}let pc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ra=(t=21)=>{let e="",n=t|0;for(;n--;)e+=pc[Math.random()*64|0];return e};function hc(){return Ra(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],Ys=[..._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 Fa=()=>typeof window<"u";function kc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Da=t=>Fa()&&t.test(kc().toLowerCase()),Cc=()=>Fa()&&!!navigator.maxTouchPoints,Ec=()=>Da(/^mac/)&&!Cc(),wc=()=>Da(/mac|iphone|ipad|ipod/i),Oc=()=>wc()&&!Ec(),ks="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 _o(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(ks))return ze;i.setAttribute(ks,"");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:m,scrollY:p,visualViewport:_}=n,v=(_==null?void 0:_.offsetLeft)??0,g=(_==null?void 0:_.offsetTop)??0,h=Zo(i,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(g))}px`,left:`${-(m-Math.floor(v))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{h==null||h(),n.scrollTo(m,p)}},d=[u(),Oc()?c():f()];return()=>{d.forEach(m=>m==null?void 0:m()),i.removeAttribute(ks)}}function Qi(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return Be([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=Be(t,s=>{n==null||n(),n=e(s)}).subscribe(ze),i=()=>{r(),n==null||n()};return Sa(i),i}function Pt(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(De(i))}),e}function et(t){pt&&cn(1).then(()=>{const e=document.activeElement;!x(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Pa(){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 La(t){const e=Pa(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&x(i)?i:null}function Ia(t){const e=Pa(),r=e.indexOf(t)-1,i=e[r];return r>=0&&x(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(De([])),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(""),d=x(u)?a.indexOf(u):-1;let m=ac(a,Math.max(d,0));c.length===1&&(m=m.filter(v=>v!==u));const _=m.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));x(_)&&_!==u&&e.onMatch(_),r()}}}function Fc(t){let e=t.parentElement;for(;x(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Ar(t,e){return e!==void 0?e:Fc(t)==="body"?document.body:null}async function ti(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([cn(1),Wt]),e===void 0){n==null||n.focus();return}const r=Ta(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!x(i))return;i.focus()}else x(r)&&r.focus()}yt(void 0,t=>{function e(r){t(r),t(void 0)}return gt(document,"pointerup",e,{passive:!1,capture:!0})});const Dc=yt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return gt(document,"keydown",e,{passive:!1})}),ni=(t,e={})=>{let n=ze;function r(i={}){n();const s={enabled:!0,...i},o=$a(s.enabled)?s.enabled:yt(s.enabled);n=rt(Dc.subscribe(u=>{var a;if(!u||!$r(o))return;const l=u.target;if(!(!x(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(Ta(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()}}},Sn=Math.min,Ft=Math.max,zi=Math.round,Si=Math.floor,tn=t=>({x:t,y:t}),Pc={left:"right",right:"left",bottom:"top",top:"bottom"},Lc={start:"end",end:"start"};function Zs(t,e,n){return Ft(t,Sn(e,n))}function Fr(t,e){return typeof t=="function"?t(e):t}function Rn(t){return t.split("-")[0]}function Dr(t){return t.split("-")[1]}function Ma(t){return t==="x"?"y":"x"}function go(t){return t==="y"?"height":"width"}function zn(t){return["top","bottom"].includes(Rn(t))?"y":"x"}function bo(t){return Ma(zn(t))}function Ic(t,e,n){n===void 0&&(n=!1);const r=Dr(t),i=bo(t),s=go(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[Xs(t),e,Xs(e)]}function Xs(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=Dr(t);let s=Nc(Rn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Xs)))),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 Na(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=zn(e),o=bo(e),u=go(o),l=Rn(e),a=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[u]/2-i[u]/2;let m;switch(l){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:c};break;case"left":m={x:r.x-i.width,y:c};break;default:m={x:r.x,y:r.y}}switch(Dr(e)){case"start":m[o]-=d*(n&&a?-1:1);break;case"end":m[o]+=d*(n&&a?-1:1);break}return m}const Bc=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),d=r,m={},p=0;for(let _=0;_<u.length;_++){const{name:v,fn:g}=u[_],{x:h,y:k,data:O,reset:$}=await g({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:m,rects:a,platform:o,elements:{reference:t,floating:e}});f=h??f,c=k??c,m={...m,[v]:{...m[v],...O}},$&&p<=50&&(p++,typeof $=="object"&&($.placement&&(d=$.placement),$.rects&&(a=$.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):$.rects),{x:f,y:c}=Xo(a,d,l)),_=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:m}};async function yo(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:d=!1,padding:m=0}=Fr(e,t),p=Na(m),v=u[d?c==="floating"?"reference":"floating":c],g=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},$=Yi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:k,strategy:l}):h);return{top:(g.top-$.top+p.top)/O.y,bottom:($.bottom-g.bottom+p.bottom)/O.y,left:(g.left-$.left+p.left)/O.x,right:($.right-g.right+p.right)/O.x}}const Uc=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}=Fr(t,e)||{};if(a==null)return{};const c=Na(f),d={x:n,y:r},m=bo(i),p=go(m),_=await o.getDimensions(a),v=m==="y",g=v?"top":"left",h=v?"bottom":"right",k=v?"clientHeight":"clientWidth",O=s.reference[p]+s.reference[m]-d[m]-s.floating[p],$=d[m]-s.reference[m],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[p]);const R=O/2-$/2,K=P/2-_[p]/2-1,N=Sn(c[g],K),F=Sn(c[h],K),I=N,A=P-_[p]-F,L=P/2-_[p]/2+R,q=Zs(I,L,A),W=!l.arrow&&Dr(i)!=null&&L!==q&&s.reference[p]/2-(L<I?N:F)-_[p]/2<0,oe=W?L<I?L-I:L-A:0;return{[m]:d[m]+oe,data:{[m]:q,centerOffset:L-q-oe,...W&&{alignmentOffset:oe}},reset:W}}}),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:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:_=!0,...v}=Fr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Rn(i),h=zn(u),k=Rn(u)===u,O=await(l.isRTL==null?void 0:l.isRTL(a.floating)),$=d||(k||!_?[Gi(u)]:Mc(u)),C=p!=="none";!d&&C&&$.push(...Hc(u,_,p,O));const P=[u,...$],R=await yo(e,v),K=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&K.push(R[g]),c){const L=Ic(i,o,O);K.push(R[L[0]],R[L[1]])}if(N=[...N,{placement:i,overflows:K}],!K.every(L=>L<=0)){var F,I;const L=(((F=s.flip)==null?void 0:F.index)||0)+1,q=P[L];if(q)return{data:{index:L,overflows:N},reset:{placement:q}};let W=(I=N.filter(oe=>oe.overflows[0]<=0).sort((oe,se)=>oe.overflows[1]-se.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(m){case"bestFit":{var A;const oe=(A=N.filter(se=>{if(C){const z=zn(se.placement);return z===h||z==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(z=>z>0).reduce((z,le)=>z+le,0)]).sort((se,z)=>se[1]-z[1])[0])==null?void 0:A[0];oe&&(W=oe);break}case"initialPlacement":W=u;break}if(i!==W)return{reset:{placement:W}}}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=Rn(n),u=Dr(n),l=zn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Fr(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:p}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof p=="number"&&(m=u==="end"?p*-1:p),l?{x:m*f,y:d*a}:{x:d*a,y:m*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:g,y:h}=v;return{x:g,y:h}}},...l}=Fr(t,e),a={x:n,y:r},f=await yo(e,l),c=zn(Rn(i)),d=Ma(c);let m=a[d],p=a[c];if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",h=m+f[v],k=m-f[g];m=Zs(h,m,k)}if(o){const v=c==="y"?"top":"left",g=c==="y"?"bottom":"right",h=p+f[v],k=p-f[g];p=Zs(h,p,k)}const _=u.fn({...e,[d]:m,[c]:p});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[d]: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}=Fr(t,e),f=await yo(e,a),c=Rn(i),d=Dr(i),m=zn(i)==="y",{width:p,height:_}=s.floating;let v,g;c==="top"||c==="bottom"?(v=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(g=c,v=d==="end"?"top":"bottom");const h=_-f.top-f.bottom,k=p-f.left-f.right,O=Sn(_-f[v],h),$=Sn(p-f[g],k),C=!e.middlewareData.shift;let P=O,R=$;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(P=h),C&&!d){const N=Ft(f.left,0),F=Ft(f.right,0),I=Ft(f.top,0),A=Ft(f.bottom,0);m?R=p-2*(N!==0||F!==0?N+F:Ft(f.left,f.right)):P=_-2*(I!==0||A!==0?I+A:Ft(f.top,f.bottom))}await l({...e,availableWidth:R,availableHeight:P});const K=await o.getDimensions(u.floating);return p!==K.width||_!==K.height?{reset:{rects:!0}}:{}}}};function ss(){return typeof window<"u"}function Pr(t){return Ha(t)?(t.nodeName||"").toLowerCase():"#document"}function Lt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function sn(t){var e;return(e=(Ha(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ha(t){return ss()?t instanceof Node||t instanceof Lt(t).Node:!1}function Qt(t){return ss()?t instanceof Element||t instanceof Lt(t).Element:!1}function rn(t){return ss()?t instanceof HTMLElement||t instanceof Lt(t).HTMLElement:!1}function Jo(t){return!ss()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Lt(t).ShadowRoot}function pi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=zt(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 os(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function vo(t){const e=ko(),n=Qt(t)?zt(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=Fn(t);for(;rn(e)&&!Tr(e);){if(vo(e))return e;if(os(e))return null;e=Fn(e)}return null}function ko(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Tr(t){return["html","body","#document"].includes(Pr(t))}function zt(t){return Lt(t).getComputedStyle(t)}function ls(t){return Qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fn(t){if(Pr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Jo(t)&&t.host||sn(t);return Jo(e)?e.host:e}function Va(t){const e=Fn(t);return Tr(e)?t.ownerDocument?t.ownerDocument.body:t.body:rn(e)&&pi(e)?e:Va(e)}function ri(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Va(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Lt(i);if(s){const u=Js(o);return e.concat(o,o.visualViewport||[],pi(i)?i:[],u&&n?ri(u):[])}return e.concat(i,ri(i,[],n))}function Js(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ba(t){const e=zt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=rn(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 Co(t){return Qt(t)?t:t.contextElement}function cr(t){const e=Co(t);if(!rn(e))return tn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=Ba(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=tn(0);function Ua(t){const e=Lt(t);return!ko()||!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!==Lt(t)?!1:e}function Gn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Co(t);let o=tn(1);e&&(r?Qt(r)&&(o=cr(r)):o=cr(t));const u=Zc(s,n,r)?Ua(s):tn(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 d=Lt(s),m=r&&Qt(r)?Lt(r):r;let p=d,_=Js(p);for(;_&&r&&m!==p;){const v=cr(_),g=_.getBoundingClientRect(),h=zt(_),k=g.left+(_.clientLeft+parseFloat(h.paddingLeft))*v.x,O=g.top+(_.clientTop+parseFloat(h.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=k,a+=O,p=Lt(_),_=Js(p)}}return Yi({width:f,height:c,x:l,y:a})}function Eo(t,e){const n=ls(t).scrollLeft;return e?e.left+n:Gn(sn(t)).left+n}function Ka(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Eo(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=sn(r),u=e?os(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=tn(1);const f=tn(0),c=rn(r);if((c||!c&&!s)&&((Pr(r)!=="body"||pi(o))&&(l=ls(r)),rn(r))){const m=Gn(r);a=cr(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const d=o&&!c&&!s?Ka(o,l,!0):tn(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+d.x,y:n.y*a.y-l.scrollTop*a.y+f.y+d.y}}function Jc(t){return Array.from(t.getClientRects())}function xc(t){const e=sn(t),n=ls(t),r=t.ownerDocument.body,i=Ft(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Ft(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Eo(t);const u=-n.scrollTop;return zt(r).direction==="rtl"&&(o+=Ft(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function ed(t,e){const n=Lt(t),r=sn(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=ko();(!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=Gn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=rn(t)?cr(t):tn(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(sn(t));else if(Qt(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 ja(t,e){const n=Fn(t);return n===e||!Qt(n)||Tr(n)?!1:zt(n).position==="fixed"||ja(n,e)}function nd(t,e){const n=e.get(t);if(n)return n;let r=ri(t,[],!1).filter(u=>Qt(u)&&Pr(u)!=="body"),i=null;const s=zt(t).position==="fixed";let o=s?Fn(t):t;for(;Qt(o)&&!Tr(o);){const u=zt(o),l=vo(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pi(o)&&!l&&ja(t,o))?r=r.filter(f=>f!==o):i=u,o=Fn(o)}return e.set(t,r),r}function rd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?os(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=Ft(c.top,a.top),a.right=Sn(c.right,a.right),a.bottom=Sn(c.bottom,a.bottom),a.left=Ft(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}=Ba(t);return{width:e,height:n}}function sd(t,e,n){const r=rn(e),i=sn(e),s=n==="fixed",o=Gn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=tn(0);if(r||!r&&!s)if((Pr(e)!=="body"||pi(i))&&(u=ls(e)),r){const d=Gn(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=Eo(i));const a=i&&!r&&!s?Ka(i,u):tn(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 Cs(t){return zt(t).position==="static"}function el(t,e){if(!rn(t)||zt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return sn(t)===n&&(n=n.ownerDocument.body),n}function qa(t,e){const n=Lt(t);if(os(t))return n;if(!rn(t)){let i=Fn(t);for(;i&&!Tr(i);){if(Qt(i)&&!Cs(i))return i;i=Fn(i)}return n}let r=el(t,e);for(;r&&zc(r)&&Cs(r);)r=el(r,e);return r&&Tr(r)&&Cs(r)&&!vo(r)?n:r||Gc(t)||n}const od=async function(t){const e=this.getOffsetParent||qa,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 zt(t).direction==="rtl"}const ud={convertOffsetParentRelativeRectToViewportRelativeRect:Xc,getDocumentElement:sn,getClippingRect:rd,getOffsetParent:qa,getElementRects:od,getClientRects:Jc,getDimensions:id,getScale:cr,isElement:Qt,isRTL:ld};function ad(t,e){let n=null,r;const i=sn(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:d}=t.getBoundingClientRect();if(u||e(),!c||!d)return;const m=Si(f),p=Si(i.clientWidth-(a+c)),_=Si(i.clientHeight-(f+d)),v=Si(a),h={rootMargin:-m+"px "+-p+"px "+-_+"px "+-v+"px",threshold:Ft(0,Sn(1,l))||1};let k=!0;function O($){const C=$[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=Co(t),f=i||s?[...a?ri(a):[],...ri(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const c=a&&u?ad(a,n):null;let d=-1,m=null;o&&(m=new ResizeObserver(g=>{let[h]=g;h&&h.target===a&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(e)})),n()}),a&&!l&&m.observe(a),m.observe(e));let p,_=l?Gn(t):null;l&&v();function v(){const g=Gn(t);_&&(g.x!==_.x||g.y!==_.y||g.width!==_.width||g.height!==_.height)&&n(),_=g,p=requestAnimationFrame(v)}return n(),()=>{var g;f.forEach(h=>{i&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),c==null||c(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const cd=qc,dd=Wc,md=Kc,pd=Qc,hd=Uc,_d=(t,e,n)=>{const r=new Map,i={platform:ud,...n},s={...i.platform,_c:r};return Bc(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:ze};const r={...gd,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(md({boundary:r.boundary,padding:r.overflowPadding}));const o=x(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||x(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),d=Math.round(f.y),[m,p]=vd(f.placement);if(e.setAttribute("data-side",m),e.setAttribute("data-align",p),Object.assign(e.style,{position:r.strategy,top:`${d}px`,left:`${c}px`}),x(i)&&f.middlewareData.arrow){const{x:_,y:v}=f.middlewareData.arrow,g=f.placement.split("-")[0];i.setAttribute("data-side",g),Object.assign(i.style,{position:"absolute",left:_!=null?`${_}px`:"",top:v!=null?`${v}px`:"",[g]:`calc(100% - ${o}px)`,transform:bd[g],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 Wa=["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=Wa.join(","),Qa=typeof Element>"u",Yn=Qa?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xi=!Qa&&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"},za=function(e,n,r){if(Ji(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Zi));return n&&Yn.call(e,Zi)&&i.unshift(e),i=i.filter(r),i},Ga=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=Yn.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),d=!Ji(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&d){var m=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:o,candidates:m})}else s.unshift.apply(s,o.children)}}return i},Ya=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Nn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||kd(e))&&!Ya(e)?0:e.tabIndex},Cd=function(e,n){var r=Nn(e);return r<0&&n&&!Ya(e)?0:r},Ed=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Za=function(e){return e.tagName==="INPUT"},wd=function(e){return Za(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 Za(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},Fd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Yn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Yn.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},Dd=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 Yn.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)||Fd(n,e)||Od(n)||Dd(n))},xs=function(e,n){return!(Sd(n)||Nn(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=Ga([e],n.includeContainer,{filter:xs.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Pd}):r=za(e,n.includeContainer,xs.bind(null,n)),Ld(r)},Md=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ga([e],n.includeContainer,{filter:xi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=za(e,n.includeContainer,xi.bind(null,n)),r},nr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Zi)===!1?!1:xs(n,e)},Nd=Wa.concat("iframe").join(","),Es=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.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 eo(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 eo(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 Bd(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ud(){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)||Bd(t)||Wd(t)||Ud()}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 eo(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)?eo(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)},Ur=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,q){return A&&A[L]!==void 0?A[L]:s[q||L]},a=function(A,L){var q=typeof(L==null?void 0:L.composedPath)=="function"?L.composedPath():void 0;return o.containerGroups.findIndex(function(W){var oe=W.container,se=W.tabbableNodes;return oe.contains(A)||(q==null?void 0:q.includes(oe))||se.find(function(z){return z===A})})},f=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=L.hasFallback,W=q===void 0?!1:q,oe=L.params,se=oe===void 0?[]:oe,z=s[A];if(typeof z=="function"&&(z=z.apply(void 0,Kd(se))),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(Se){throw new Error("`".concat(A,'` appears to be an invalid selector; error="').concat(Se.message,'"'))}if(!le&&!W)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&&!Es(A,s.tabbableOptions))if(a(r.activeElement)>=0)A=r.activeElement;else{var L=o.tabbableGroups[0],q=L&&L.firstTabbableNode;A=q||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},d=function(){if(o.containerGroups=o.containers.map(function(A){var L=Id(A,s.tabbableOptions),q=Md(A,s.tabbableOptions),W=L.length>0?L[0]:void 0,oe=L.length>0?L[L.length-1]:void 0,se=q.find(function(Se){return nr(Se)}),z=q.slice().reverse().find(function(Se){return nr(Se)}),le=!!L.find(function(Se){return Nn(Se)>0});return{container:A,tabbableNodes:L,focusableNodes:q,posTabIndexesFound:le,firstTabbableNode:W,lastTabbableNode:oe,firstDomTabbableNode:se,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?q.slice(q.indexOf(st)+1).find(function(X){return nr(X)}):q.slice(0,q.indexOf(st)).reverse().find(function(X){return nr(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.")},m=function(A){var L=A.activeElement;if(L)return L.shadowRoot&&L.shadowRoot.activeElement!==null?m(L.shadowRoot):L},p=function(A){if(A!==!1&&A!==m(document)){if(!A||!A.focus){p(c());return}A.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=A,Qd(A)&&A.select()}},_=function(A){var L=f("setReturnFocus",{params:[A]});return L||(L===!1?!1:A)},v=function(A){var L=A.target,q=A.event,W=A.isBackward,oe=W===void 0?!1:W;L=L||Ri(q),d();var se=null;if(o.tabbableGroups.length>0){var z=a(L,q),le=z>=0?o.containerGroups[z]:void 0;if(z<0)oe?se=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:se=o.tabbableGroups[0].firstTabbableNode;else if(oe){var Se=o.tabbableGroups.findIndex(function(_t){var dt=_t.firstTabbableNode;return L===dt});if(Se<0&&(le.container===L||Es(L,s.tabbableOptions)&&!nr(L,s.tabbableOptions)&&!le.nextTabbableNode(L,!1))&&(Se=z),Se>=0){var st=Se===0?o.tabbableGroups.length-1:Se-1,He=o.tabbableGroups[st];se=Nn(L)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else Yr(q)||(se=le.nextTabbableNode(L,!1))}else{var Y=o.tabbableGroups.findIndex(function(_t){var dt=_t.lastTabbableNode;return L===dt});if(Y<0&&(le.container===L||Es(L,s.tabbableOptions)&&!nr(L,s.tabbableOptions)&&!le.nextTabbableNode(L))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,ht=o.tabbableGroups[X];se=Nn(L)>=0?ht.firstTabbableNode:ht.firstDomTabbableNode}else Yr(q)||(se=le.nextTabbableNode(L))}}else se=f("fallbackFocus");return se},g=function(A){var L=Ri(A);if(!(a(L,A)>=0)){if(Ur(s.clickOutsideDeactivates,A)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Ur(s.allowOutsideClick,A)||A.preventDefault()}},h=function(A){var L=Ri(A),q=a(L,A)>=0;if(q||L instanceof Document)q&&(o.mostRecentlyFocusedNode=L);else{A.stopImmediatePropagation();var W,oe=!0;if(o.mostRecentlyFocusedNode)if(Nn(o.mostRecentlyFocusedNode)>0){var se=a(o.mostRecentlyFocusedNode),z=o.containerGroups[se].tabbableNodes;if(z.length>0){var le=z.findIndex(function(Se){return Se===o.mostRecentlyFocusedNode});le>=0&&(s.isKeyForward(o.recentNavEvent)?le+1<z.length&&(W=z[le+1],oe=!1):le-1>=0&&(W=z[le-1],oe=!1))}}else o.containerGroups.some(function(Se){return Se.tabbableNodes.some(function(st){return Nn(st)>0})})||(oe=!1);else oe=!1;oe&&(W=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),p(W||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 q=v({event:A,isBackward:L});q&&(Yr(A)&&A.preventDefault(),p(q))},O=function(A){(s.isKeyForward(A)||s.isKeyBackward(A))&&k(A,s.isKeyBackward(A))},$=function(A){zd(A)&&Ur(s.escapeDeactivates,A)!==!1&&(A.preventDefault(),u.deactivate())},C=function(A){var L=Ri(A);a(L,A)>=0||Ur(s.clickOutsideDeactivates,A)||Ur(s.allowOutsideClick,A)||(A.preventDefault(),A.stopImmediatePropagation())},P=function(){if(o.active)return il.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?sl(function(){p(c())}):p(c()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",O,{capture:!0,passive:!1}),r.addEventListener("keydown",$),u},R=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",O,!0),r.removeEventListener("keydown",$),u},K=function(A){var L=A.some(function(q){var W=Array.from(q.removedNodes);return W.some(function(oe){return oe===o.mostRecentlyFocusedNode})});L&&p(c())},N=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(K):void 0,F=function(){N&&(N.disconnect(),o.active&&!o.paused&&o.containers.map(function(A){N.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"),q=l(A,"onPostActivate"),W=l(A,"checkCanFocusTrap");W||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,L==null||L();var oe=function(){W&&d(),P(),F(),q==null||q()};return W?(W(o.containers.concat()).then(oe,oe),this):(oe(),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,R(),o.active=!1,o.paused=!1,F(),il.deactivateTrap(i,u);var q=l(L,"onDeactivate"),W=l(L,"onPostDeactivate"),oe=l(L,"checkCanReturnFocus"),se=l(L,"returnFocus","returnFocusOnDeactivate");q==null||q();var z=function(){sl(function(){se&&p(_(o.nodeFocusedBeforeActivation)),W==null||W()})};return se&&oe?(oe(_(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(A){if(o.paused||!o.active)return this;var L=l(A,"onPause"),q=l(A,"onPostPause");return o.paused=!0,L==null||L(),R(),F(),q==null||q(),this},unpause:function(A){if(!o.paused||!o.active)return this;var L=l(A,"onUnpause"),q=l(A,"onPostUnpause");return o.paused=!1,L==null||L(),d(),P(),F(),q==null||q(),this},updateContainerElements:function(A){var L=[].concat(A).filter(Boolean);return o.containers=L.map(function(q){return typeof q=="string"?r.querySelector(q):q}),o.active&&d(),F(),this}},u.updateContainerElements(e),u};function Xa(t={}){let e;const{immediate:n,...r}=t,i=De(!1),s=De(!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 d;i.set(!0),(d=t.onActivate)==null||d.call(t)},onDeactivate(){var d;i.set(!1),(d=t.onDeactivate)==null||d.call(t)}}),n&&o(),{destroy(){u(),e=void 0}}),hasFocus:Wo(i),isPaused:Wo(s),activate:o,deactivate:u,pause:l,unpause:a}}const Fi=[],Ja=(t,e)=>{let n=ze;function r(){const s=Fi.indexOf(t);s>=0&&Fi.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;cn(100).then(()=>{o?Fi.push(t):r()});function f(){return uc(Fi)===t}function c(){f()&&u&&(u(),r())}function d(p){const _=p.target;mi(_)&&_&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation())}function m(p){l!=null&&l(p)&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation(),c())}n=xd(t,{onInteractOutsideStart:d,onInteractOutside:a?m: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:ze};const s={...Jd,...i},o=[];if(s.portal!==null&&o.push(us(t,s.portal).destroy),o.push(yd(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=Xa({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(Ja(t,{onClose:()=>{x(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||x(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()}}},us=(t,e="body")=>{let n;if(!x(e)&&typeof e!="string")return{destroy:ze};async function r(s){if(e=s,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await Wt(),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=ze,r=ze,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:d,enabled:m}=f;if(!m)return;function p(g){c&&ol(g,t)&&(d==null||d(g));const h=g.target;mi(h)&&xa(t,h)&&(s=!0),i=!0}function _(g){c==null||c(g)}const v=em(t);if(typeof PointerEvent<"u"){const g=h=>{r();const k=O=>{l(O)&&_(O),a()};if(h.pointerType==="touch"){r=gt(v,"click",k,{capture:!0,once:!0});return}k(h)};n=rt(gt(v,"pointerdown",p,!0),gt(v,"pointerup",g,!0))}else{const g=k=>{o?o=!1:l(k)&&_(k),a()},h=k=>{o=!0,l(k)&&_(k),a()};n=rt(gt(v,"mousedown",p,!0),gt(v,"mouseup",g,!0),gt(v,"touchstart",p,!0),gt(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&&!xa(e,n)}function xa(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];$a(i)?e[r]=Xe(i):e[r]=Xe(yt(i))}),e}const nm={prefix:"",disabled:yt(!1),required:yt(!1),name:yt(void 0)};function oy(t){const e={...nm,...mc(t)},{name:n}=Xn(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,d])=>({name:f,value:a==null?void 0:a.toString(),"aria-hidden":"true",hidden:!0,disabled:c,required:d,tabIndex:-1,style:Dt({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}=Xn(t.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:u,portal:l,forceVisible:a,typeahead:f,loop:c,closeFocus:d,disableFocusFirstItem:m,closeOnItemClick:p,onOutsideClick:_}=t.rootOptions,v=t.rootOpen,g=t.rootActiveTrigger,h=t.nextFocusable,k=t.prevFocusable,O=Xe.writable(!1),$=Xe(De(0)),C=Xe(De(null)),P=Xe(De("right")),R=Xe(De(null)),K=Xe(Be([P,C],([Q,ee])=>te=>Q===(ee==null?void 0:ee.side)&&lm(te,ee==null?void 0:ee.area))),{typed:N,handleTypeaheadSearch:F}=Rc(),I=Pt({...xr(ll),...t.ids}),A=Qi({open:v,forceVisible:a,activeTrigger:g}),L=Pe(e(),{stores:[A,l,I.menu,I.trigger],returned:([Q,ee,te,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Dt({display:Q?void 0:"none"}),id:te,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":is(ee),tabindex:-1}),action:Q=>{let ee=ze;const te=xe([A,g,s,u,l,o],([we,Je,kt,j,Ie,We])=>{ee(),!(!we||!Je)&&Wt().then(()=>{ee(),jr(Q,n),ee=es(Q,{anchorElement:Je,open:v,options:{floating:kt,modal:{closeOnInteractOutside:j,shouldCloseOnInteractOutside:Re=>{var Me;return(Me=_.get())==null||Me(Re),!(Re.defaultPrevented||x(Je)&&Je.contains(Re.target))},onClose:()=>{v.set(!1),Je.focus()},open:we},portal:Ar(Q,Ie),escapeKeydown:We?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,kt=we.currentTarget;if(!x(Je)||!x(kt)||!(Je.closest('[role="menu"]')===kt))return;if(Ys.includes(we.key)&&no(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),v.set(!1),to(we,h,k);return}const Ie=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Ie&&f.get()===!0&&F(we.key,un(kt))}));return{destroy(){te(),ue(),ee()}}}}),q=Pe(e("trigger"),{stores:[v,I.menu,I.trigger],returned:([Q,ee,te])=>({"aria-controls":ee,"aria-expanded":Q,"data-state":Q?"open":"closed",id:te,tabindex:0}),action:Q=>(Qr(Q),g.update(te=>te||Q),{destroy:rt(ke(Q,"click",te=>{const ue=v.get(),we=te.currentTarget;x(we)&&(_t(we),ue||te.preventDefault())}),ke(Q,"keydown",te=>{const ue=te.currentTarget;if(!x(ue)||!(ei.includes(te.key)||te.key===ae.ARROW_DOWN))return;te.preventDefault(),_t(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const kt=un(Je);kt.length&&et(kt[0])}))})}),W=Pe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),oe=Pe(e("overlay"),{stores:[A],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Dt({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":fm(Q)}),action:Q=>{let ee=ze;o.get()&&(ee=ni(Q,{handler:()=>{v.set(!1);const we=g.get();we&&we.focus()}}).destroy);const te=xe([l],([ue])=>{if(ue===null)return ze;const we=Ar(Q,ue);return we===null?ze:us(Q,we).destroy});return{destroy(){ee(),te()}}}}),se=Pe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(jr(Q,n),Qr(Q),{destroy:rt(ke(Q,"pointerdown",te=>{const ue=te.currentTarget;if(x(ue)&&ln(ue)){te.preventDefault();return}}),ke(Q,"click",te=>{const ue=te.currentTarget;if(x(ue)){if(ln(ue)){te.preventDefault();return}if(te.defaultPrevented){et(ue);return}p.get()&&cn(1).then(()=>{v.set(!1)})}}),ke(Q,"keydown",te=>{Nr(te)}),ke(Q,"pointermove",te=>{Ir(te)}),ke(Q,"pointerleave",te=>{Mr(te)}),ke(Q,"focusin",te=>{dt(te)}),ke(Q,"focusout",te=>{mn(te)}))})}),z=Pe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),le=Pe(e("group-label"),{returned:()=>Q=>({id:Q})}),Se={defaultChecked:!1,disabled:!1},st=Q=>{const ee={...Se,...Q},te=ee.checked??De(ee.defaultChecked??null),ue=fr(te,ee.onCheckedChange),we=De(ee.disabled),Je=Pe(e("checkbox-item"),{stores:[ue,we],returned:([Ie,We])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Hr(Ie)?"mixed":Ie?"true":"false","data-disabled":Gr(We),"data-state":_s(Ie)}),action:Ie=>(jr(Ie,n),Qr(Ie),{destroy:rt(ke(Ie,"pointerdown",Re=>{const Me=Re.currentTarget;if(x(Me)&&ln(Me)){Re.preventDefault();return}}),ke(Ie,"click",Re=>{const Me=Re.currentTarget;if(x(Me)){if(ln(Me)){Re.preventDefault();return}if(Re.defaultPrevented){et(Me);return}ue.update(hn=>Hr(hn)?!0:!hn),p.get()&&Wt().then(()=>{v.set(!1)})}}),ke(Ie,"keydown",Re=>{Nr(Re)}),ke(Ie,"pointermove",Re=>{const Me=Re.currentTarget;if(x(Me)){if(ln(Me)){pn(Re);return}Ir(Re,Me)}}),ke(Ie,"pointerleave",Re=>{Mr(Re)}),ke(Ie,"focusin",Re=>{dt(Re)}),ke(Ie,"focusout",Re=>{mn(Re)}))})}),kt=Be(ue,Ie=>Ie===!0),j=Be(ue,Ie=>Ie==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:kt,isIndeterminate:j},options:{disabled:we}}},He=(Q={})=>{const ee=Q.value??De(Q.defaultValue??null),te=fr(ee,Q.onValueChange),ue=Pe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Pe(e("radio-item"),{stores:[te],returned:([j])=>Ie=>{const{value:We,disabled:Re}={...we,...Ie},Me=j===We;return{disabled:Re,role:"menuitemradio","data-state":Me?"checked":"unchecked","aria-checked":Me,"data-disabled":Gr(Re),"data-value":We,"data-orientation":"vertical",tabindex:-1}},action:j=>(jr(j,n),{destroy:rt(ke(j,"pointerdown",We=>{const Re=We.currentTarget;if(!x(Re))return;const Me=j.dataset.value;if(j.dataset.disabled||Me===void 0){We.preventDefault();return}}),ke(j,"click",We=>{const Re=We.currentTarget;if(!x(Re))return;const Me=j.dataset.value;if(j.dataset.disabled||Me===void 0){We.preventDefault();return}if(We.defaultPrevented){if(!x(Re))return;et(Re);return}te.set(Me),p.get()&&Wt().then(()=>{v.set(!1)})}),ke(j,"keydown",We=>{Nr(We)}),ke(j,"pointermove",We=>{const Re=We.currentTarget;if(!x(Re))return;const Me=j.dataset.value;if(j.dataset.disabled||Me===void 0){pn(We);return}Ir(We,Re)}),ke(j,"pointerleave",We=>{Mr(We)}),ke(j,"focusin",We=>{dt(We)}),ke(j,"focusout",We=>{mn(We)}))})}),kt=Be(te,j=>Ie=>j===Ie);return{elements:{radioGroup:ue,radioItem:Je},states:{value:te},helpers:{isChecked:kt}}},{elements:{root:Y}}=Cm({orientation:"horizontal"}),X={...sm,disabled:!1,positioning:{placement:"right-start",gutter:8}},ht=Q=>{const ee={...X,...Q},te=ee.open??De(!1),ue=fr(te,ee==null?void 0:ee.onOpenChange),we=Pt(Rr(ee,"ids")),{positioning:Je,arrowSize:kt,disabled:j}=we,Ie=Xe(De(null)),We=Xe(De(null)),Re=Xe(De(0)),Me=Pt({...xr(ll),...ee.ids});Jr(()=>{const Ke=document.getElementById(Me.trigger.get());Ke&&Ie.set(Ke)});const hn=Qi({open:ue,forceVisible:a,activeTrigger:Ie}),pf=Pe(e("submenu"),{stores:[hn,Me.menu,Me.trigger],returned:([Ke,mt,$t])=>({role:"menu",hidden:Ke?void 0:!0,style:Dt({display:Ke?void 0:"none"}),id:mt,"aria-labelledby":$t,"data-state":Ke?"open":"closed","data-id":mt,tabindex:-1}),action:Ke=>{let mt=ze;const $t=xe([hn,Je],([Ee,Ze])=>{if(mt(),!Ee)return;const tt=Ie.get();tt&&Wt().then(()=>{mt();const ot=Ei(tt);mt=es(Ke,{anchorElement:tt,open:ue,options:{floating:Ze,portal:x(ot)?ot:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Qe=rt(ke(Ke,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!x(Ze)||!x(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(Ys.includes(Ee.key)){Ee.stopImmediatePropagation(),no(Ee,c.get()??!1);return}const Jn=im.ltr.includes(Ee.key),xn=Ee.ctrlKey||Ee.altKey||Ee.metaKey,wi=Ee.key.length===1;if(Jn){const Do=Ie.get();Ee.preventDefault(),ue.update(()=>(Do&&et(Do),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),to(Ee,h,k);return}!xn&&wi&&f.get()===!0&&F(Ee.key,un(tt))}),ke(Ke,"pointermove",Ee=>{hs(Ee)}),ke(Ke,"focusout",Ee=>{const Ze=Ie.get();if(O.get()){const tt=Ee.target,ot=document.getElementById(Me.menu.get());if(!x(ot)||!x(tt))return;!ot.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,ot=Ee.relatedTarget;if(!x(ot)||!x(tt))return;!tt.contains(ot)&&ot!==Ze&&ue.set(!1)}}));return{destroy(){$t(),mt(),Qe()}}}}),hf=Pe(e("subtrigger"),{stores:[ue,j,Me.menu,Me.trigger],returned:([Ke,mt,$t,Qe])=>({role:"menuitem",id:Qe,tabindex:-1,"aria-controls":$t,"aria-expanded":Ke,"data-state":Ke?"open":"closed","data-disabled":Gr(mt),"aria-haspopop":"menu"}),action:Ke=>{jr(Ke,n),Qr(Ke),Ie.update(Qe=>Qe||Ke);const mt=()=>{ws(We),window.clearTimeout(Re.get()),C.set(null)},$t=rt(ke(Ke,"click",Qe=>{if(Qe.defaultPrevented)return;const Ee=Qe.currentTarget;!x(Ee)||ln(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Ie.set(Ee),!Ze)))}),ke(Ke,"keydown",Qe=>{const Ee=N.get(),Ze=Qe.currentTarget;if(!(!x(Ze)||ln(Ze)||Ee.length>0&&Qe.key===ae.SPACE)&&rm.ltr.includes(Qe.key)){if(!ue.get()){Ze.click(),Qe.preventDefault();return}const ot=Ze.getAttribute("aria-controls");if(!ot)return;const Jn=document.getElementById(ot);if(!x(Jn))return;const xn=un(Jn)[0];et(xn)}}),ke(Ke,"pointermove",Qe=>{if(!Kr(Qe)||(In(Qe),Qe.defaultPrevented))return;const Ee=Qe.currentTarget;if(!x(Ee))return;am(Me.menu.get())||et(Ee);const Ze=We.get();!ue.get()&&!Ze&&!ln(Ee)&&We.set(window.setTimeout(()=>{ue.update(()=>(Ie.set(Ee),!0)),ws(We)},100))}),ke(Ke,"pointerleave",Qe=>{if(!Kr(Qe))return;ws(We);const Ee=document.getElementById(Me.menu.get()),Ze=Ee==null?void 0:Ee.getBoundingClientRect();if(Ze){const tt=Ee==null?void 0:Ee.dataset.side,ot=tt==="right",Jn=ot?-5:5,xn=Ze[ot?"left":"right"],wi=Ze[ot?"right":"left"];C.set({area:[{x:Qe.clientX+Jn,y:Qe.clientY},{x:xn,y:Ze.top},{x:wi,y:Ze.top},{x:wi,y:Ze.bottom},{x:xn,y:Ze.bottom}],side:tt}),window.clearTimeout(Re.get()),Re.set(window.setTimeout(()=>{C.set(null)},300))}else{if(ps(Qe),Qe.defaultPrevented)return;C.set(null)}}),ke(Ke,"focusout",Qe=>{const Ee=Qe.currentTarget;if(!x(Ee))return;gn(Ee);const Ze=Qe.relatedTarget;if(!x(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const ot=document.getElementById(tt);ot&&!ot.contains(Ze)&&ue.set(!1)}),ke(Ke,"focusin",Qe=>{dt(Qe)}));return{destroy(){mt(),$t()}}}}),_f=Pe(e("subarrow"),{stores:kt,returned:Ke=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${Ke}px)`,height:`var(--arrow-size, ${Ke}px)`})})});return xe([v],([Ke])=>{Ke||(Ie.set(null),ue.set(!1))}),xe([C],([Ke])=>{!pt||Ke||window.clearTimeout(Re.get())}),xe([ue],([Ke])=>{if(pt&&(Ke&&O.get()&&cn(1).then(()=>{const mt=document.getElementById(Me.menu.get());if(!mt)return;const $t=un(mt);$t.length&&et($t[0])}),!Ke)){const mt=R.get(),$t=document.getElementById(Me.trigger.get());if(mt&&cn(1).then(()=>{const Qe=document.getElementById(Me.menu.get());Qe&&Qe.contains(mt)&&gn(mt)}),!$t||document.activeElement===$t)return;gn($t)}}),{ids:Me,elements:{subTrigger:hf,subMenu:pf,subArrow:_f},states:{subOpen:ue},options:we}};Jr(()=>{const Q=document.getElementById(I.trigger.get());x(Q)&&v.get()&&g.set(Q);const ee=[],te=()=>O.set(!1),ue=()=>{O.set(!0),ee.push(rt(gt(document,"pointerdown",te,{capture:!0,once:!0}),gt(document,"pointermove",te,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return ee.push(gt(document,"keydown",ue,{capture:!0})),ee.push(gt(document,"keydown",we)),()=>{ee.forEach(Je=>Je())}}),xe([v,R],([Q,ee])=>{!Q&&ee&&gn(ee)}),xe([v],([Q])=>{if(pt&&!Q){const ee=g.get();if(!ee)return;const te=d.get();!Q&&ee&&ti({prop:te,defaultEl:ee})}}),xe([v,r],([Q,ee])=>{if(!pt)return;const te=[];return cn(1).then(()=>{const ue=document.getElementById(I.menu.get());if(ue&&Q&&O.get()){if(m.get()){et(ue);return}const we=un(ue);if(!we.length)return;et(we[0])}}),()=>{te.forEach(ue=>ue())}}),xe(v,Q=>{if(!pt)return;const ee=()=>O.set(!1),te=ue=>{if(O.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(gt(document,"pointerdown",ee,{capture:!0,once:!0}),gt(document,"pointermove",ee,{capture:!0,once:!0}),gt(document,"keydown",te,{capture:!0}))});function _t(Q){v.update(ee=>{const te=!ee;return te&&(h.set(La(Q)),k.set(Ia(Q)),g.set(Q)),te})}function dt(Q){const ee=Q.currentTarget;if(!x(ee))return;const te=R.get();te&&gn(te),Gs(ee),R.set(ee)}function mn(Q){const ee=Q.currentTarget;x(ee)&&gn(ee)}function In(Q){Vr(Q)&&Q.preventDefault()}function pn(Q){if(Vr(Q))return;const ee=Q.target;if(!x(ee))return;const te=Ei(ee);te&&et(te)}function ps(Q){Vr(Q)&&Q.preventDefault()}function hs(Q){if(!Kr(Q))return;const ee=Q.target,te=Q.currentTarget;if(!x(te)||!x(ee))return;const ue=$.get(),we=ue!==Q.clientX;if(te.contains(ee)&&we){const Je=Q.clientX>ue?"right":"left";P.set(Je),$.set(Q.clientX)}}function Ir(Q,ee=null){if(!Kr(Q)||(In(Q),Q.defaultPrevented))return;if(ee){et(ee);return}const te=Q.currentTarget;x(te)&&et(te)}function Mr(Q){Kr(Q)&&pn(Q)}function Nr(Q){if(N.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(ei.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!x(ue))return;ue.click()}}function Hr(Q){return Q==="indeterminate"}function _s(Q){return Hr(Q)?"indeterminate":Q?"checked":"unchecked"}function Vr(Q){return K.get()(Q)}function Ei(Q){const ee=Q.closest('[role="menu"]');return x(ee)?ee:null}return{elements:{trigger:q,menu:L,overlay:oe,item:se,group:z,groupLabel:le,arrow:W,separator:Y},builders:{createCheckboxItem:st,createSubmenu:ht,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:F},ids:I,options:t.rootOptions}}function to(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),cn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),cn(1).then(()=>r.focus()),e.set(null))}}function un(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>x(e))}function Qr(t){!t||!ln(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function ws(t){if(!pt)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")}`);x(n)&&t.setAttribute("data-melt-menu-id",n.id)}function no(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!x(n)||!x(r))return;const i=un(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(!x(e))return!1;const n=e.closest(`[data-id="${t}"]`);return x(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:Mn}=Xn("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=Pt(Rr(e,"ids")),{preventScroll:r,closeOnEscape:i,closeOnOutsideClick:s,role:o,portal:u,forceVisible:l,openFocus:a,closeFocus:f,onOutsideClick:c}=n,d=Xe.writable(null),m=Pt({...xr(mm),...e.ids}),p=e.open??De(e.defaultOpen),_=fr(p,e==null?void 0:e.onOpenChange),v=Be([_,l],([F,I])=>F||I);let g=ze;function h(F){const I=F.currentTarget,A=F.currentTarget;!x(I)||!x(A)||(_.set(!0),d.set(A))}function k(){_.set(!1),ti({prop:f.get(),defaultEl:d.get()})}const O=Pe(Mn("trigger"),{stores:[_],returned:([F])=>({"aria-haspopup":"dialog","aria-expanded":F,type:"button"}),action:F=>({destroy:rt(ke(F,"click",A=>{h(A)}),ke(F,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),h(A))}))})}),$=Pe(Mn("overlay"),{stores:[v,_],returned:([F,I])=>({hidden:F?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),"aria-hidden":!0,"data-state":I?"open":"closed"}),action:F=>{let I=ze;return i.get()&&(I=ni(F,{handler:()=>{k()}}).destroy),{destroy(){I()}}}}),C=Pe(Mn("content"),{stores:[v,m.content,m.description,m.title,_],returned:([F,I,A,L,q])=>({id:I,role:o.get(),"aria-describedby":A,"aria-labelledby":L,"aria-modal":F?"true":void 0,"data-state":q?"open":"closed",tabindex:-1,hidden:F?void 0:!0,style:Dt({display:F?void 0:"none"})}),action:F=>{let I=ze,A=ze;const L=rt(xe([_,s,i],([q,W,oe])=>{if(!q)return;const se=Xa({immediate:!1,escapeDeactivates:oe,clickOutsideDeactivates:W,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:F});I=se.activate,A=se.deactivate;const z=se.useFocusTrap(F);return z&&z.destroy?z.destroy:se.deactivate}),xe([s,_],([q,W])=>Ja(F,{open:W,closeOnInteractOutside:q,onClose(){k()},shouldCloseOnInteractOutside(oe){var se;return(se=c.get())==null||se(oe),!oe.defaultPrevented}}).destroy),xe([i],([q])=>q?ni(F,{handler:k}).destroy:ze),xe([v],([q])=>{Wt().then(()=>{q?I():A()})}));return{destroy:()=>{g(),L()}}}}),P=Pe(Mn("portalled"),{stores:u,returned:F=>({"data-portal":is(F)}),action:F=>{const I=xe([u],([A])=>{if(A===null)return ze;const L=Ar(F,A);return L===null?ze:us(F,L).destroy});return{destroy(){I()}}}}),R=Pe(Mn("title"),{stores:[m.title],returned:([F])=>({id:F})}),K=Pe(Mn("description"),{stores:[m.description],returned:([F])=>({id:F})}),N=Pe(Mn("close"),{returned:()=>({type:"button"}),action:F=>({destroy:rt(ke(F,"click",()=>{k()}),ke(F,"keydown",A=>{A.key!==ae.SPACE&&A.key!==ae.ENTER||(A.preventDefault(),k())}))})});return xe([_,r],([F,I])=>{if(pt){if(I&&F&&(g=_o()),F){const A=document.getElementById(m.content.get());ti({prop:a.get(),defaultEl:A})}return()=>{l.get()||g()}}}),{ids:m,elements:{content:C,trigger:O,title:R,description:K,overlay:$,close:N,portalled:P},states:{open:_},options:n}}const ul=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:Os}=Xn("menubar"),hm={loop:!0,closeOnEscape:!0,preventScroll:!1},_m=["menubar"];function gm(t){const e={...hm,...t},n=Pt(Rr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(De("")),u=Xe(De(null)),l=Xe(De(null)),a=Xe(De(null)),f=Xe(De(0));let c=!1;const d=Pt({...xr(_m),...e.ids}),m=Pe(Os(),{stores:[d.menubar],returned([O]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:O}},action:O=>{const $=Array.from(O.querySelectorAll("[data-melt-menubar-trigger]"));return x($[0])?($[0].tabIndex=0,{destroy:ze}):{}}}),p={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},_=O=>{const $={...p,...O},C=Xe(De(!1)),P=Xe(De(null)),R=Pt($),{positioning:K,portal:N,forceVisible:F,closeOnOutsideClick:I,onOutsideClick:A}=R,L=om({rootOptions:{...R,preventScroll:s},rootOpen:Xe(C),rootActiveTrigger:Xe(P),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),q=Qi({open:C,forceVisible:F,activeTrigger:P}),W=Pe(Os("menu"),{stores:[q,N,L.ids.menu,L.ids.trigger,d.menubar],returned:([z,le,Se,st,He])=>({role:"menu",hidden:z?void 0:!0,style:Dt({display:z?void 0:"none"}),id:Se,"aria-labelledby":st,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":is(le),tabindex:-1}),action:z=>{let le=ze;const Se=xe([C,P,K,N,I],([He,Y,X,ht,_t])=>{le(),He&&Y&&Wt().then(()=>{le(),le=es(z,{anchorElement:Y,open:C,options:{floating:X,portal:Ar(z,ht),modal:{closeOnInteractOutside:_t,shouldCloseOnInteractOutside:dt=>{var pn;if((pn=A.get())==null||pn(dt),dt.defaultPrevented)return!1;const mn=dt.target,In=document.getElementById(d.menubar.get());return!In||!mi(mn)?!0:!In.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),st=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!x(X)||!x(Y)||(ul.includes(He.key)&&v(He),!(Y.closest('[role="menu"]')===X)))return;Ys.includes(He.key)&&no(He),He.key===ae.TAB&&(He.preventDefault(),P.set(null),C.set(!1),to(He,u,l));const _t=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&_t&&L.helpers.handleTypeaheadSearch(He.key,un(X))}));return{destroy(){Se(),st(),le()}}}}),oe=Pe(Os("trigger"),{stores:[C,L.ids.menu,L.ids.trigger],returned:([z,le,Se])=>({"aria-controls":le,"aria-expanded":z,"data-state":z?"open":"closed",id:Se,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{Qr(z);const le=document.getElementById(d.menubar.get());if(!le)return{};const Se=Array.from(le.querySelectorAll("[data-melt-menubar-trigger]"));if(!Se.length)return{};const st=xe([a],([Y])=>{!Y&&Se[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});Se[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=C.get(),ht=Y.currentTarget;x(ht)&&(se(ht),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(x(X)&&(ei.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),se(X);const ht=X.getAttribute("aria-controls");if(!ht)return;const _t=document.getElementById(ht);if(!_t)return;const dt=un(_t);if(!dt.length)return;et(dt[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!x(X))return;const ht=o.get(),_t=C.get();ht&&!_t&&(C.set(!0),o.set(L.ids.menu.get()),P.set(X))}));return{destroy(){He(),st()}}}});function se(z){C.update(le=>{const Se=!le;return Se?(u.set(La(z)),l.set(Ia(z)),P.set(z),o.set(L.ids.menu.get())):P.set(null),Se})}return xe([o],([z])=>{if(pt){if(z===L.ids.menu.get()){if(C.get())return;const le=document.getElementById(L.ids.trigger.get());if(!le)return;P.set(le),Gs(le),C.set(!0);return}if(z!==L.ids.menu.get()){if(!pt)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(!pt)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),Gs(le))}}),Jr(()=>{if(!pt)return;const z=document.getElementById(L.ids.trigger.get());x(z)&&C.get()&&P.set(z)}),{ids:L.ids,elements:{...L.elements,menu:W,trigger:oe},builders:L.builders,states:L.states,options:R}};function v(O){if(!pt)return;O.preventDefault();const $=O.currentTarget,C=O.target;if(!x(C)||!x($))return;const P=C.hasAttribute("data-melt-menubar-menu-subtrigger"),R=C.closest('[role="menu"]')!==$,K=ae.ARROW_LEFT,N=O.key===K;if(!N&&P||N&&R)return;const I=document.getElementById(d.menubar.get());if(!x(I))return;const A=g(I),L=$.getAttribute("aria-labelledby"),q=A.findIndex(z=>z.id===L);let W;switch(O.key){case ae.ARROW_RIGHT:W=q<A.length-1?q+1:0;break;case ae.ARROW_LEFT:W=q>0?q-1:A.length-1;break;case ae.HOME:W=0;break;case ae.END:W=A.length-1;break;default:return}const se=A[W].getAttribute("aria-controls");se&&o.set(se)}function g(O){const $=O.closest('[role="menubar"]');return x($)?Array.from($.querySelectorAll("[data-melt-menubar-trigger]")).filter(C=>x(C)):[]}function h(O){O.preventDefault();const $=document.activeElement,C=O.currentTarget;if(!x(C)||!x($))return;const P=g(C);if(!P.length)return;const R=P.filter(I=>!(I.hasAttribute("data-disabled")||I.getAttribute("disabled")==="true")),K=R.indexOf($);let N;const F=r.get();switch(O.key){case ae.ARROW_RIGHT:N=K<R.length-1?K+1:F?0:K;break;case ae.ARROW_LEFT:N=K>0?K-1:F?R.length-1:0;break;case ae.HOME:N=0;break;case ae.END:N=R.length-1;break;default:return}et(R[N])}Jr(()=>{if(!pt)return;const O=document.getElementById(d.menubar.get());if(!O)return;const $=rt(ke(O,"keydown",C=>{const P=C.target,R=C.currentTarget;!x(R)||!x(P)||!P.hasAttribute("data-melt-menubar-trigger")||ul.includes(C.key)&&h(C)}),gt(document,"keydown",C=>{i.get()&&C.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{$()}});const k=[];return xe([o,s],([O,$])=>{!pt||!$||(O?c||(k.push(_o()),c=!0):(k.forEach(C=>C()),c=!1))}),Sa(()=>{k.forEach(O=>O())}),{ids:d,elements:{menubar:m},builders:{createMenu:_},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}=Xn("popover"),ym=["trigger","content"];function vm(t){const e={...bm,...t},n=Pt(Rr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:d,onOutsideClick:m}=n,p=e.open??De(e.defaultOpen),_=fr(p,e==null?void 0:e.onOpenChange),v=Xe.writable(null),g=Pt({...xr(ym),...e.ids});Jr(()=>{v.set(document.getElementById(g.trigger.get()))});function h(){_.set(!1);const F=document.getElementById(g.trigger.get());ti({prop:d.get(),defaultEl:F})}const k=Qi({open:_,activeTrigger:v,forceVisible:f}),O=Pe(qr("content"),{stores:[k,a,g.content],returned:([F,I,A])=>({hidden:F&&pt?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),id:A,"data-state":F?"open":"closed","data-portal":is(I)}),action:F=>{let I=ze;const A=xe([k,v,r,s,u,l,a],([L,q,W,oe,se,z,le])=>{I(),!(!L||!q)&&Wt().then(()=>{I(),I=es(F,{anchorElement:q,open:_,options:{floating:W,focusTrap:oe?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:se},modal:{shouldCloseOnInteractOutside:C,onClose:h,open:L,closeOnInteractOutside:z},escapeKeydown:se?{handler:()=>{h()}}:null,portal:Ar(F,le)}}).destroy})});return{destroy(){A(),I()}}}});function $(F){_.update(I=>!I),F&&F!==v.get()&&v.set(F)}function C(F){var L;if((L=m.get())==null||L(F),F.defaultPrevented)return!1;const I=F.target,A=document.getElementById(g.trigger.get());return!(A&&mi(I)&&(I===A||A.contains(I)))}const P=Pe(qr("trigger"),{stores:[k,g.content,g.trigger],returned:([F,I,A])=>({role:"button","aria-haspopup":"dialog","aria-expanded":F?"true":"false","data-state":al(F),"aria-controls":I,id:A}),action:F=>({destroy:rt(ke(F,"click",()=>{$(F)}),ke(F,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),$(F))}))})}),R=Pe(qr("overlay"),{stores:[k],returned:([F])=>({hidden:F?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),"aria-hidden":"true","data-state":al(F)}),action:F=>{let I=ze,A=ze,L=ze;return u.get()&&(I=ni(F,{handler:()=>{h()}}).destroy),A=xe([a],([q])=>{if(L(),q===null)return;const W=Ar(F,q);W!==null&&(L=us(F,W).destroy)}),{destroy(){I(),A(),L()}}}}),K=Pe(qr("arrow"),{stores:i,returned:F=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${F}px)`,height:`var(--arrow-size, ${F}px)`})})}),N=Pe(qr("close"),{returned:()=>({type:"button"}),action:F=>({destroy:rt(ke(F,"click",A=>{A.defaultPrevented||h()}),ke(F,"keydown",A=>{A.defaultPrevented||A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),$())}))})});return xe([_,v,o],([F,I,A])=>{if(!pt)return;const L=[];if(F){I||Wt().then(()=>{const W=document.getElementById(g.trigger.get());x(W)&&v.set(W)}),A&&L.push(_o());const q=I??document.getElementById(g.trigger.get());ti({prop:c.get(),defaultEl:q})}return()=>{L.forEach(q=>q())}}),{ids:g,elements:{trigger:P,content:O,arrow:K,close:N,overlay:R},states:{open:_},options:n}}function al(t){return t?"open":"closed"}const km={orientation:"horizontal",decorative:!1},Cm=t=>{const e={...km,...t},n=Pt(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:Di,selector:As}=Xn("toolbar"),wm=t=>{const e={...Em,...t},n=Pt(e),{loop:r,orientation:i}=n,s=Pe(Di(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Pe(Di("button"),{returned:()=>({role:"button",type:"button"}),action:d=>(Ts(d),{destroy:ke(d,"keydown",c)})}),u=Pe(Di("link"),{returned:()=>({role:"link"}),action:d=>(Ts(d),{destroy:ke(d,"keydown",c)})}),l=Pe(Di("separator"),{stores:i,returned:d=>({role:"separator","data-orientation":d==="horizontal"?"vertical":"horizontal","aria-orientation":d==="horizontal"?"vertical":"horizontal"})}),a={type:"single",disabled:!1},f=d=>{const m={...a,...d},p=Pt(m),{type:_,disabled:v}=p,g=m.defaultValue?m.defaultValue:m.type==="single"?void 0:[],h=m.value??De(g),k=fr(h,m==null?void 0:m.onValueChange),{name:O}=Xn("toolbar-group"),$=Pe(O(),{stores:i,returned:R=>({role:"group","data-orientation":R})}),C=Pe(O("item"),{stores:[v,_,k,i],returned:([R,K,N,F])=>I=>{const A=typeof I=="string"?I:I.value,L=typeof I=="string"?!1:!!I.disabled,q=R||L,W=Array.isArray(N)?N.includes(A):N===A,oe=K==="single",se=K==="multiple";return{disabled:Gr(q),pressed:W,"data-orientation":F,"data-disabled":Gr(q),"data-value":A,"data-state":W?"on":"off","aria-checked":oe?W:void 0,"aria-pressed":se?W:void 0,type:"button",role:oe?"radio":void 0,"data-melt-toolbar-item":""}},action:R=>{Ts(R);function K(){const I=R.dataset.value,A=R.dataset.disabled==="true";return{value:I,disabled:A}}function N(){const{value:I,disabled:A}=K();I===void 0||A||k.update(L=>Array.isArray(L)?L.includes(I)?L.filter(q=>q!==I):(L.push(I),L):L===I?void 0:I)}return{destroy:rt(ke(R,"click",()=>{N()}),ke(R,"keydown",I=>{if(I.key===ae.ENTER||I.key===ae.SPACE){I.preventDefault(),N();return}c(I)}))}}}),P=Be(k,R=>K=>Array.isArray(R)?R.includes(K):R===K);return{elements:{group:$,item:C},states:{value:k},helpers:{isPressed:P},options:p}};function c(d){const m=i.get(),p=r.get(),_={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[m??"horizontal"],v={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[m??"horizontal"],g=d.currentTarget;if(!x(g))return;const h=g.closest("[data-melt-toolbar]");if(!x(h))return;const k=ef(h),O=k.indexOf(g);if(d.key===_){d.preventDefault();const $=O+1;$>=k.length&&p?et(k[0]):et(k[$])}else if(d.key===v){d.preventDefault();const $=O-1;$<0&&p?et(k[k.length-1]):et(k[$])}else d.key===ae.HOME?(d.preventDefault(),et(k[0])):d.key===ae.END&&(d.preventDefault(),et(k[k.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function Ts(t){const e=t.closest("[data-melt-toolbar]");if(!x(e))return;ef(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function ef(t){return Array.from(t.querySelectorAll(`${As("item")}, ${As("button")}, ${As("link")}`)).filter(e=>x(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 Ln(){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 tf(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 wo(){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}=wo();return at(t)}function $m(t){const{RADIO_GROUP_NAME:e}=wo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=gi(),i=n(t);return bt(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function Sm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=wo(),r=at(n);return bt(e,{...r,value:t}),{...r,value:t}}function Rm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=gi();tf(r)(n)}const Fm=t=>({builder:t&8}),fl=t=>({builder:t[3]}),Dm=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")&&$s(t);return{c(){i&&i.c(),n=Fe()},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=$s(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=$s(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=pe(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)&&_e(r,n,i,i[10],e?he(n,i[10],s,Dm):ge(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 $s(t){let e,n,r,i;const s=t[11].default,o=pe(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=ne(l,u[a]);return{c(){e=S(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)&&_e(o,s,a,a[10],n?he(s,a[10],f,Fm):ge(a[10]),fl),Vi(a[1]?"a":"div")(e,l=Ne(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:d=!1}=e,{el:m=void 0}=e;const{elements:{item:p},getAttrs:_}=gi();J(t,p,k=>n(9,u=k));const v=Ln();function g(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{m=k,n(0,m)})}return t.$$set=k=>{e=ne(ne({},e),vt(k)),n(6,o=je(e,s)),"href"in k&&n(1,f=k.href),"asChild"in k&&n(2,c=k.asChild),"disabled"in k&&n(7,d=k.disabled),"el"in k&&n(0,m=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={..._("item"),...Om(d)}),t.$$.dirty&264&&Object.assign(r,i)},[m,f,c,r,p,v,o,d,i,u,a,l,g,h]}class Vt 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=pe(s,t,t[9],dl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[9],n?he(s,a[9],f,Nm):ge(a[9]),dl),ie(e,l=Ne(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 Bm(t){let e;const n=t[10].default,r=pe(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)&&_e(r,n,i,i[9],e?he(n,i[9],s,Hm):ge(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 Um(t){let e,n,r,i;const s=[Bm,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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a}=e,{disabled:f=!1}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioItem:m},getAttrs:p}=Sm(a);J(t,m,k=>n(8,o=k));const _=p("radio-item"),v=Ln();function g(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{d=k,n(0,d)})}return t.$$set=k=>{e=ne(ne({},e),vt(k)),n(5,s=je(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,d=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,_)},[d,c,r,m,v,s,a,f,o,l,u,g,h]}class jm extends ve{constructor(e){super(),ye(this,e,Km,Um,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=ne(s,i[o]);return{c(){e=S("div"),ie(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Ue(t[3].action(e)),n=!0)},p(o,u){ie(e,s=Ne(i,[u&8&&o[3],u&32&&o[5]]))},i:me,o:me,d(o){o&&E(e),t[8](null),n=!1,r()}}}function Qm(t){let e;const n=t[7].default,r=pe(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)&&_e(r,n,i,i[6],e?he(n,i[6],s,qm):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=gi();J(t,c,_=>n(3,o=_));const m=d("separator");function p(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ne(ne({},e),vt(_)),n(5,s=je(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(6,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,o,c,s,l,u,p]}class as 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=pe(s,t,t[8],hl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,Ym):ge(a[8]),hl),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[8],e?he(n,i[8],s,Zm):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a=void 0}=e,{onValueChange:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioGroup:m},states:{value:p},getAttrs:_}=$m({defaultValue:a,onValueChange:({next:h})=>(h!=null&&h!==a&&(f==null||f(h),n(5,a=h)),h)});J(t,m,h=>n(7,o=h));const v=_("radio-group");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),vt(h)),n(4,s=je(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,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&p.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,m,s,a,f,o,l,u,g]}class tp extends ve{constructor(e){super(),ye(this,e,ep,xm,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function nf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function np(t){const{NAME:e,PARTS:n}=nf(),r=ii(e,n),i={...vm({positioning:{placement:"bottom",gutter:0},...hi(t),forceVisible:!0}),getAttrs:r};return bt(e,i),{...i,updateOption:_i(i.options)}}function Oo(){const{NAME:t}=nf();return at(t)}function rp(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Oo();tf(r)(n)}function rf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function ip(t){const{NAME:e,PARTS:n}=rf(),r=ii(e,n),i={...pm({...hi(t),role:"dialog",forceVisible:!0}),getAttrs:r};return bt(e,i),{...i,updateOption:_i(i.options)}}function Lr(){const{NAME:t}=rf();return at(t)}const sp=t=>({ids:t&1}),gl=t=>({ids:t[0]});function op(t){let e;const n=t[12].default,r=pe(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)&&_e(r,n,i,i[11],e?he(n,i[11],s,sp):ge(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:d=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:p=void 0}=e;const{states:{open:_},updateOption:v,ids:g}=ip({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:m,onOutsideClick:p,onOpenChange:({next:k})=>(f!==k&&(c==null||c(k),n(2,f=k)),k)}),h=Be([g.content,g.description,g.title],([k,O,$])=>({content:k,description:O,title:$}));return J(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,d=k.openFocus),"closeFocus"in k&&n(9,m=k.closeFocus),"onOutsideClick"in k&&n(10,p=k.onOutsideClick),"$$scope"in k&&n(11,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&_.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",d),t.$$.dirty&512&&v("closeFocus",m),t.$$.dirty&1024&&v("onOutsideClick",p)},[r,h,f,o,u,l,a,c,d,m,p,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]&&Ss(t);return{c(){i&&i.c(),n=Fe()},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=Ss(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Ss(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=pe(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)&&_e(r,n,i,i[8],e?he(n,i[8],s,ap):ge(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 Ss(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],bl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,up):ge(a[8]),bl),Vi(a[1])(e,l=Ne(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{level:a="h2"}=e,{asChild:f=!1}=e,{id:c=void 0}=e,{el:d=void 0}=e;const{elements:{title:m},ids:p,getAttrs:_}=Lr();J(t,m,h=>n(7,o=h));const v=_("title");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),vt(h)),n(5,s=je(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,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&p.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,v)},[d,a,f,r,m,s,c,o,l,u,g]}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=pe(s,t,t[7],vl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,pp):ge(a[7]),vl),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[7],e?he(n,i[7],s,hp):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Lr();J(t,c,v=>n(6,o=v));const m=Ln(),p=d("close");function _(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ne(ne({},e),vt(v)),n(5,s=je(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,p)},[f,a,r,c,m,s,o,l,u,_]}class It 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=pe(s,t,t[6],Cl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[6],n?he(s,a[6],f,vp):ge(a[6]),Cl),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[6],e?he(n,i[6],s,kp):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Lr();J(t,c,_=>n(5,o=_));const m=d("portal");function p(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ne(ne({},e),vt(_)),n(4,s=je(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(6,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,s,o,l,u,p]}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]}),Fp=t=>({builder:t[0]&256}),Sl=t=>({builder:t[8]});function Dp(t){let e,n,r,i;const s=t[16].default,o=pe(s,t,t[15],wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[15],n?he(s,a[15],f,Ap):ge(a[15]),wl),ie(e,l=Ne(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=pe(o,t,t[15],Ol);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,Tp):ge(t[15]),Ol),ie(e,a=Ne(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=Pn(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=pe(o,t,t[15],Al);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,$p):ge(t[15]),Al),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ft(()=>{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=pe(u,t,t[15],Tl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),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,d){t=c,l&&l.p&&(!i||d[0]&33024)&&_e(l,u,t,t[15],i?he(u,t[15],d,Sp):ge(t[15]),Tl),ie(e,f=Ne(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ft(()=>{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=Pn(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=pe(o,t,t[15],$l);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,Rp):ge(t[15]),$l),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ft(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(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=pe(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)&&_e(r,n,i,i[15],e?he(n,i[15],s,Fp):ge(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,Dp],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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{el:h=void 0}=e;const{elements:{content:k},states:{open:O},ids:$,getAttrs:C}=Lr();J(t,k,j=>n(14,o=j)),J(t,O,j=>n(9,u=j));const P=C("content");function R(j){Oe.call(this,t,j)}function K(j){Oe.call(this,t,j)}function N(j){Oe.call(this,t,j)}function F(j){Oe.call(this,t,j)}function I(j){Oe.call(this,t,j)}function A(j){Oe.call(this,t,j)}function L(j){Oe.call(this,t,j)}function q(j){Oe.call(this,t,j)}function W(j){Oe.call(this,t,j)}function oe(j){Oe.call(this,t,j)}function se(j){Oe.call(this,t,j)}function z(j){Oe.call(this,t,j)}function le(j){Oe.call(this,t,j)}function Se(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 ht(j){Oe.call(this,t,j)}function _t(j){Oe.call(this,t,j)}function dt(j){Oe.call(this,t,j)}function mn(j){Oe.call(this,t,j)}function In(j){Oe.call(this,t,j)}function pn(j){Oe.call(this,t,j)}function ps(j){Oe.call(this,t,j)}function hs(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 _s(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 ee(j){Oe.call(this,t,j)}function te(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=ne(ne({},e),vt(j)),n(12,s=je(e,i)),"transition"in j&&n(1,f=j.transition),"transitionConfig"in j&&n(2,c=j.transitionConfig),"inTransition"in j&&n(3,d=j.inTransition),"inTransitionConfig"in j&&n(4,m=j.inTransitionConfig),"outTransition"in j&&n(5,p=j.outTransition),"outTransitionConfig"in j&&n(6,_=j.outTransitionConfig),"asChild"in j&&n(7,v=j.asChild),"id"in j&&n(13,g=j.id),"el"in j&&n(0,h=j.el),"$$scope"in j&&n(15,a=j.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&$.content.set(g),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,P)},[h,f,c,d,m,p,_,v,r,u,k,O,s,g,o,a,l,R,K,N,F,I,A,L,q,W,oe,se,z,le,Se,st,He,Y,X,ht,_t,dt,mn,In,pn,ps,hs,Ir,Mr,Nr,Hr,_s,Vr,Ei,Q,ee,te,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 Bp=t=>({builder:t&256}),Rl=t=>({builder:t[8]});function Up(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ne(s,i[o]);return{c(){e=S("div"),ie(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){ie(e,s=Ne(i,[u&256&&o[8],u&4096&&o[12]]))},i:me,o:me,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=ne(u,o[l]);return{c(){e=S("div"),ie(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,ie(e,u=Ne(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(n&&n.end(1),r=!0)},o(l){l&&(n=Pn(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=ne(o,s[u]);return{c(){e=S("div"),ie(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,ie(e,o=Ne(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||ft(()=>{n=Dn(e,t[3],t[4]),n.start()}))},o:me,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=ne(l,u[a]);return{c(){e=S("div"),ie(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,ie(e,l=Ne(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&ft(()=>{i&&(r&&r.end(1),n=Dn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Pn(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=ne(u,o[l]);return{c(){e=S("div"),ie(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,ie(e,u=Ne(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&ft(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=$n(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=pe(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)&&_e(r,n,i,i[14],e?he(n,i[14],s,Bp):ge(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,Up],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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{el:g=void 0}=e;const{elements:{overlay:h},states:{open:k},getAttrs:O}=Lr();J(t,h,W=>n(13,o=W)),J(t,k,W=>n(9,u=W));const $=O("overlay");function C(W){Oe.call(this,t,W)}function P(W){Oe.call(this,t,W)}function R(W){Oe.call(this,t,W)}function K(W){Oe.call(this,t,W)}function N(W){Oe.call(this,t,W)}function F(W){Ce[W?"unshift":"push"](()=>{g=W,n(0,g)})}function I(W){Ce[W?"unshift":"push"](()=>{g=W,n(0,g)})}function A(W){Ce[W?"unshift":"push"](()=>{g=W,n(0,g)})}function L(W){Ce[W?"unshift":"push"](()=>{g=W,n(0,g)})}function q(W){Ce[W?"unshift":"push"](()=>{g=W,n(0,g)})}return t.$$set=W=>{e=ne(ne({},e),vt(W)),n(12,s=je(e,i)),"transition"in W&&n(1,f=W.transition),"transitionConfig"in W&&n(2,c=W.transitionConfig),"inTransition"in W&&n(3,d=W.inTransition),"inTransitionConfig"in W&&n(4,m=W.inTransitionConfig),"outTransition"in W&&n(5,p=W.outTransition),"outTransitionConfig"in W&&n(6,_=W.outTransitionConfig),"asChild"in W&&n(7,v=W.asChild),"el"in W&&n(0,g=W.el),"$$scope"in W&&n(14,a=W.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,$)},[g,f,c,d,m,p,_,v,r,u,h,k,s,o,a,l,C,P,R,K,N,F,I,A,L,q]}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}),Fl=t=>({builder:t[2]}),Zp=t=>({builder:t&4}),Dl=t=>({builder:t[2]});function Xp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Fl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,Yp):ge(a[7]),Fl),ie(e,l=Ne(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=pe(n,t,t[7],Dl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,Zp):ge(i[7]),Dl)},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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Lr();J(t,c,v=>n(6,o=v));const m=Ln(),p=d("trigger");function _(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ne(ne({},e),vt(v)),n(5,s=je(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,p)},[f,a,r,c,m,s,o,l,u,_]}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=pe(s,t,t[27],Pl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[27],n?he(s,a[27],f,th):ge(a[27]),Pl),ie(e,l=Ne(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=pe(o,t,t[27],Ll);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[27],r?he(o,t[27],c,nh):ge(t[27]),Ll),ie(e,a=Ne(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=Pn(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=pe(o,t,t[27],Il);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[27],r?he(o,t[27],c,rh):ge(t[27]),Il),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||ft(()=>{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=pe(u,t,t[27],Ml);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),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,d){t=c,l&&l.p&&(!i||d[0]&134217984)&&_e(l,u,t,t[27],i?he(u,t[27],d,ih):ge(t[27]),Ml),ie(e,f=Ne(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&ft(()=>{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=Pn(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=pe(o,t,t[27],Nl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[27],r?he(o,t[27],c,sh):ge(t[27]),Nl),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&ft(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(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=pe(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)&&_e(r,n,i,i[27],e?he(n,i[27],s,oh):ge(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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:$=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:P=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:K=!1}=e,{fitViewport:N=!1}=e,{strategy:F="absolute"}=e,{overlap:I=!1}=e,{el:A=void 0}=e;const{elements:{menu:L},states:{open:q},ids:W,getAttrs:oe}=gi();J(t,L,X=>n(26,u=X)),J(t,q,X=>n(9,o=X));const se=Ln(),z=oe("content");function le(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function Se(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=ne(ne({},e),vt(X)),n(13,s=je(e,i)),"transition"in X&&n(1,f=X.transition),"transitionConfig"in X&&n(2,c=X.transitionConfig),"inTransition"in X&&n(3,d=X.inTransition),"inTransitionConfig"in X&&n(4,m=X.inTransitionConfig),"outTransition"in X&&n(5,p=X.outTransition),"outTransitionConfig"in X&&n(6,_=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,g=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,$=X.alignOffset),"collisionPadding"in X&&n(19,C=X.collisionPadding),"avoidCollisions"in X&&n(20,P=X.avoidCollisions),"collisionBoundary"in X&&n(21,R=X.collisionBoundary),"sameWidth"in X&&n(22,K=X.sameWidth),"fitViewport"in X&&n(23,N=X.fitViewport),"strategy"in X&&n(24,F=X.strategy),"overlap"in X&&n(25,I=X.overlap),"el"in X&&n(0,A=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&g&&W.menu.set(g),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:$,collisionPadding:C,avoidCollisions:P,collisionBoundary:R,sameWidth:K,fitViewport:N,strategy:F,overlap:I})},[A,f,c,d,m,p,_,v,r,o,L,q,se,s,g,h,k,O,$,C,P,R,K,N,F,I,u,a,l,le,Se,st,He,Y]}class fs 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 cs(){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}=cs(),i=ii(e,["root"]),s=ii(r,n),o={...gm(hi(t)),getAttrs:s,getMenubarAttrs:i};return bt(e,o),{...o,updateOption:_i(o.options)}}function _h(){const{NAME:t}=cs();return at(t)}function gh(t){const{MENU_NAME:e}=cs(),{builders:{createMenu:n},getAttrs:r}=_h(),i={...n({...hi(t),forceVisible:!1}),getAttrs:r};return bt(e,i),{...i,updateOption:_i(i.options)}}function bh(){const{MENU_NAME:t}=cs();return at(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}),Bl=t=>({builder:t[2],ids:t[3]});function kh(t){let e,n,r,i;const s=t[13].default,o=pe(s,t,t[12],Vl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[12],n?he(s,a[12],f,yh):ge(a[12]),Vl),ie(e,l=Ne(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=pe(n,t,t[12],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&_e(r,n,i,i[12],e?he(n,i[12],s,vh):ge(i[12]),Bl)},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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:d=!1}=e,{id:m=void 0}=e,{preventScroll:p=void 0}=e,{el:_=void 0}=e;const{elements:{menubar:v},updateOption:g,ids:h,getMenubarAttrs:k}=hh({loop:f,closeOnEscape:c,preventScroll:p});J(t,v,P=>n(11,o=P));const O=Be([h.menubar],([P])=>({menubar:P}));J(t,O,P=>n(3,u=P));const $=k("root");function C(P){Ce[P?"unshift":"push"](()=>{_=P,n(0,_)})}return t.$$set=P=>{e=ne(ne({},e),vt(P)),n(6,s=je(e,i)),"loop"in P&&n(7,f=P.loop),"closeOnEscape"in P&&n(8,c=P.closeOnEscape),"asChild"in P&&n(1,d=P.asChild),"id"in P&&n(9,m=P.id),"preventScroll"in P&&n(10,p=P.preventScroll),"el"in P&&n(0,_=P.el),"$$scope"in P&&n(12,a=P.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&m&&h.menubar.set(m),t.$$.dirty&128&&g("loop",f),t.$$.dirty&256&&g("closeOnEscape",c),t.$$.dirty&1024&&g("preventScroll",p),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,$)},[_,d,r,u,v,O,s,f,c,m,p,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}),Ul=t=>({menuIds:t[0]});function Th(t){let e;const n=t[15].default,r=pe(n,t,t[14],Ul);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&_e(r,n,i,i[14],e?he(n,i[14],s,Ah):ge(i[14]),Ul)},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:d=void 0}=e,{typeahead:m=void 0}=e,{closeFocus:p=void 0}=e,{disableFocusFirstItem:_=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:g=void 0}=e;const{states:{open:h},updateOption:k,ids:O}=gh({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:m,closeFocus:p,disableFocusFirstItem:_,closeOnItemClick:v,onOutsideClick:g,onOpenChange:({next:C})=>(a!==C&&(f==null||f(C),n(2,a=C)),C)}),$=Be([O.menu,O.trigger],([C,P])=>({menu:C,trigger:P}));return J(t,$,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,d=C.dir),"typeahead"in C&&n(9,m=C.typeahead),"closeFocus"in C&&n(10,p=C.closeFocus),"disableFocusFirstItem"in C&&n(11,_=C.disableFocusFirstItem),"closeOnItemClick"in C&&n(12,v=C.closeOnItemClick),"onOutsideClick"in C&&n(13,g=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",d),t.$$.dirty&1024&&k("closeFocus",p),t.$$.dirty&2048&&k("disableFocusFirstItem",_),t.$$.dirty&512&&k("typeahead",m),t.$$.dirty&4096&&k("closeOnItemClick",v),t.$$.dirty&8192&&k("onOutsideClick",g)},[r,$,a,o,u,l,f,c,d,m,p,_,v,g,s,i]}class ds 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 Fh(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Kl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,Sh):ge(a[8]),Kl),ie(e,l=Ne(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 Dh(t){let e;const n=t[9].default,r=pe(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)&&_e(r,n,i,i[8],e?he(n,i[8],s,Rh):ge(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=[Dh,Fh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(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:d},ids:m,getAttrs:p}=bh();J(t,d,h=>n(7,o=h));const _=Ln(),v=p("trigger");function g(h){Ce[h?"unshift":"push"](()=>{c=h,n(0,c)})}return t.$$set=h=>{e=ne(ne({},e),vt(h)),n(5,s=je(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&&m.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[c,a,r,d,_,s,f,o,l,u,g]}class ms 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=pe(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)&&_e(r,n,i,i[12],e?he(n,i[12],s,Ih):ge(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:d=void 0}=e,{openFocus:m=void 0}=e,{closeFocus:p=void 0}=e,{onOutsideClick:_=void 0}=e;const{updateOption:v,states:{open:g},ids:h}=np({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:m,closeFocus:p,onOutsideClick:_,onOpenChange:({next:O})=>(c!==O&&(d==null||d(O),n(2,c=O)),O),positioning:{gutter:0,offset:{mainAxis:1}}}),k=Be([h.content,h.trigger],([O,$])=>({content:O,trigger:$}));return J(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,d=O.onOpenChange),"openFocus"in O&&n(9,m=O.openFocus),"closeFocus"in O&&n(10,p=O.closeFocus),"onOutsideClick"in O&&n(11,_=O.onOutsideClick),"$$scope"in O&&n(12,s=O.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&g.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",m),t.$$.dirty&1024&&v("closeFocus",p),t.$$.dirty&2048&&v("onOutsideClick",_)},[r,k,c,o,u,l,a,f,d,m,p,_,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]}),Bh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),Uh=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=pe(s,t,t[26],Wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[26],n?he(s,a[26],f,Vh):ge(a[26]),Wl),ie(e,l=Ne(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=pe(o,t,t[26],Ql);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[26],r?he(o,t[26],c,Bh):ge(t[26]),Ql),ie(e,a=Ne(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=Pn(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=pe(o,t,t[26],zl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[26],r?he(o,t[26],c,Uh):ge(t[26]),zl),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ft(()=>{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=pe(u,t,t[26],Gl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=Ue(t[8].action(e)),s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&67109120)&&_e(l,u,t,t[26],i?he(u,t[26],d,Kh):ge(t[26]),Gl),ie(e,f=Ne(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ft(()=>{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=Pn(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=pe(o,t,t[26],Yl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(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)&&_e(u,o,t,t[26],r?he(o,t[26],c,jh):ge(t[26]),Yl),ie(e,a=Ne(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ft(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(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=pe(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)&&_e(r,n,i,i[26],e?he(n,i[26],s,qh):ge(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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:$=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:P=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:K=!1}=e,{fitViewport:N=!1}=e,{strategy:F="absolute"}=e,{overlap:I=!1}=e,{el:A=void 0}=e;const{elements:{content:L},states:{open:q},ids:W,getAttrs:oe}=Oo();J(t,L,Y=>n(25,u=Y)),J(t,q,Y=>n(9,o=Y));const se=oe("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 Se(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=ne(ne({},e),vt(Y)),n(12,s=je(e,i)),"transition"in Y&&n(1,f=Y.transition),"transitionConfig"in Y&&n(2,c=Y.transitionConfig),"inTransition"in Y&&n(3,d=Y.inTransition),"inTransitionConfig"in Y&&n(4,m=Y.inTransitionConfig),"outTransition"in Y&&n(5,p=Y.outTransition),"outTransitionConfig"in Y&&n(6,_=Y.outTransitionConfig),"asChild"in Y&&n(7,v=Y.asChild),"id"in Y&&n(13,g=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,$=Y.alignOffset),"collisionPadding"in Y&&n(18,C=Y.collisionPadding),"avoidCollisions"in Y&&n(19,P=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,R=Y.collisionBoundary),"sameWidth"in Y&&n(21,K=Y.sameWidth),"fitViewport"in Y&&n(22,N=Y.fitViewport),"strategy"in Y&&n(23,F=Y.strategy),"overlap"in Y&&n(24,I=Y.overlap),"el"in Y&&n(0,A=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&W.content.set(g),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,se),t.$$.dirty[0]&33538560&&o&&rp({side:h,align:k,sideOffset:O,alignOffset:$,collisionPadding:C,avoidCollisions:P,collisionBoundary:R,sameWidth:K,fitViewport:N,strategy:F,overlap:I})},[A,f,c,d,m,p,_,v,r,o,L,q,s,g,h,k,O,$,C,P,R,K,N,F,I,u,a,l,z,le,Se,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=pe(s,t,t[11],Xl);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(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)&&_e(o,s,a,a[11],n?he(s,a[11],f,e1):ge(a[11]),Xl),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[11],e?he(n,i[11],s,t1):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:m=void 0}=e;const{elements:{trigger:p},states:{open:_},ids:v,getAttrs:g}=Oo();J(t,p,$=>n(9,u=$)),J(t,_,$=>n(10,l=$));const h=Ln(),k=g("trigger");function O($){Ce[$?"unshift":"push"](()=>{m=$,n(0,m)})}return t.$$set=$=>{e=ne(ne({},e),vt($)),n(6,o=je(e,s)),"asChild"in $&&n(1,c=$.asChild),"id"in $&&n(7,d=$.id),"el"in $&&n(0,m=$.el),"$$scope"in $&&n(11,f=$.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&v.trigger.set(d),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)},[m,c,i,p,_,h,o,d,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 sf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function l1(t){const{NAME:e,PARTS:n}=sf(),r=ii(e,n),i={...wm(hi(t)),getAttrs:r};return bt(e,i),{...i,updateOption:_i(i.options)}}function u1(){const{NAME:t}=sf();return at(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=pe(s,t,t[8],xl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,a1):ge(a[8]),xl),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[8],e?he(n,i[8],s,f1):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{loop:a=!0}=e,{orientation:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{root:m},updateOption:p,getAttrs:_}=l1({loop:a,orientation:f});J(t,m,h=>n(7,o=h));const v=_("root");function g(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),vt(h)),n(4,s=je(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,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&p("loop",a),t.$$.dirty&64&&p("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,m,s,a,f,o,l,u,g]}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=pe(s,t,t[7],tu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,_1):ge(a[7]),tu),ie(e,l=Ne(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=pe(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)&&_e(r,n,i,i[7],e?he(n,i[7],s,g1):ge(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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=u1();J(t,c,g=>n(6,o=g));const m=Ln(),p=d("button");function _(g){Oe.call(this,t,g)}function v(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ne(ne({},e),vt(g)),n(5,s=je(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(7,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,m,s,o,l,u,_,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",F1="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",D1="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",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 6M17 14V17H14V19H17V22H19V19H22V17H19V14H17Z",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 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",Mt="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=Ds("svg"),s&&s.c(),n=Ds("path"),M(n,"d",t[1]),M(e,"class",r="fill-current "+t[2]),M(e,"viewBox","0 0 24 24"),M(e,"aria-hidden",i=t[0]===null?"true":"false")},m(o,u){w(o,e,u),s&&s.m(e,null),D(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&&M(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&M(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&M(e,"aria-hidden",i)},d(o){o&&E(e),s&&s.d()}}}function Q1(t){let e,n;return{c(){e=S("span"),M(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&M(e,"class",n)},d(r){r&&E(e)}}}function ru(t){let e,n;return{c(){e=Ds("title"),n=Z(t[0])},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&1&&qe(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=Fe()},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:me,o:me,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 Le extends ve{constructor(e){super(),ye(this,e,G1,z1,fe,{label:0,path:1,class:2})}}async function en({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 of(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(of(n));return e.join("")}}function my(t){return t.content&&t.content.length>0?of(t.content[0]):"<Empty Document>"}function lf(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 uf(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())}const ct=De(null),Z1=De(null),iu=De(!1);ct.subscribe(t=>{t!==null&&lf("path",t.fullpath)});function Ci(){return at("apiStatus")}function Ao(){return at("currentUser")}function wt(){return at("currentBranch")}function To(){return at("branches")}function $o(){return at("remoteBranches")}function X1(){return at("syncBranches")}function su(t,e,n){const r=t.slice();return r[11]=e[n],r}function J1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),s=Z(i),o=Z(" actions running"),M(r,"class","pl-2")},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),D(r,s),D(r,o),u=!0},p(l,a){(!u||a&3)&&i!==(i=l[0].length+l[1]+"")&&qe(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)),V(e,l)}}}function x1(t){let e,n,r,i;return e=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="1 action running",M(r,"class","pl-2")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function e_(t){let e;return{c(){e=S("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:me,i:me,o:me,d(n){n&&E(e)}}}function t_(t){let e,n,r,i;const s=[e_,x1,J1],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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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 n_(t){let e,n,r,i;return e=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Saving file",M(r,"class","flex-1")},m(s,o){H(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)),V(e,s)}}}function r_(t){let e,n,r,i;return e=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Loading file",M(r,"class","flex-1")},m(s,o){H(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)),V(e,s)}}}function ou(t){let e,n,r,i;const s=[r_,n_],o=[];function u(l,a){return l[11].action==="LoadTextFile"?0:l[11].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=S("li"),r&&r.c(),M(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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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 Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=S("li"),B(n.$$.fragment),r=U(),i=S("span"),i.textContent="Fetching branches",M(i,"class","flex-1"),M(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),H(n,e,null),D(e,r),D(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),V(n)}}}function uu(t){let e,n,r,i,s;return n=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=S("li"),B(n.$$.fragment),r=U(),i=S("span"),i.textContent="Fetching remote branches",M(i,"class","flex-1"),M(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),H(n,e,null),D(e,r),D(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),V(n)}}}function au(t){let e,n,r,i,s;return n=new Le({props:{path:Mt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=S("li"),B(n.$$.fragment),r=U(),i=S("span"),i.textContent="Synchronising with remote git",M(i,"class","flex-1"),M(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),H(n,e,null),D(e,r),D(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),V(n)}}}function i_(t){let e,n,r,i,s,o=nn(t[0]),u=[];for(let d=0;d<o.length;d+=1)u[d]=ou(su(t,o,d));const l=d=>y(u[d],1,1,()=>{u[d]=null});let a=t[2].isFetching&&lu(),f=t[3].isFetching&&uu(),c=t[4].isFetching&&au();return{c(){e=S("ul");for(let d=0;d<u.length;d+=1)u[d].c();n=U(),a&&a.c(),r=U(),f&&f.c(),i=U(),c&&c.c()},m(d,m){w(d,e,m);for(let p=0;p<u.length;p+=1)u[p]&&u[p].m(e,null);D(e,n),a&&a.m(e,null),D(e,r),f&&f.m(e,null),D(e,i),c&&c.m(e,null),s=!0},p(d,m){if(m&1){o=nn(d[0]);let p;for(p=0;p<o.length;p+=1){const _=su(d,o,p);u[p]?(u[p].p(_,m),b(u[p],1)):(u[p]=ou(_),u[p].c(),b(u[p],1),u[p].m(e,n))}for(ce(),p=o.length;p<u.length;p+=1)l(p);de()}d[2].isFetching?a?m&4&&b(a,1):(a=lu(),a.c(),b(a,1),a.m(e,r)):a&&(ce(),y(a,1,1,()=>{a=null}),de()),d[3].isFetching?f?m&8&&b(f,1):(f=uu(),f.c(),b(f,1),f.m(e,i)):f&&(ce(),y(f,1,1,()=>{f=null}),de()),d[4].isFetching?c?m&16&&b(c,1):(c=au(),c.c(),b(c,1),c.m(e,null)):c&&(ce(),y(c,1,1,()=>{c=null}),de())},i(d){if(!s){for(let m=0;m<o.length;m+=1)b(u[m]);b(a),b(f),b(c),s=!0}},o(d){u=u.filter(Boolean);for(let m=0;m<u.length;m+=1)y(u[m]);y(a),y(f),y(c),s=!1},d(d){d&&E(e),fi(u,d),a&&a.d(),f&&f.d(),c&&c.d()}}}function s_(t){let e,n,r,i;return e=new o1({props:{class:"inline-flex items-center",$$slots:{default:[t_]},$$scope:{ctx:t}}}),r=new xh({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[i_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&16387&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&16413&&(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),V(e,s),V(r,s)}}}function fu(t){let e,n;return e=new si({props:{open:!0,onOpenChange:t[10],$$slots:{default:[f_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&16384&&(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){V(e,r)}}}function o_(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function l_(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function u_(t){let e,n,r,i,s,o,u,l;return e=new Tt({props:{$$slots:{default:[o_]},$$scope:{ctx:t}}}),u=new It({props:{"data-button":!0,$$slots:{default:[l_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("div"),i=S("p"),i.textContent="Unfortunately saving the file failed.",s=U(),o=S("div"),B(u.$$.fragment),M(o,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(a,f){H(e,a,f),w(a,n,f),w(a,r,f),D(r,i),D(r,s),D(r,o),H(u,o,null),l=!0},p(a,f){const c={};f&16384&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&16384&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},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)),V(e,a),V(u)}}}function a_(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[u_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&16384&&(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),V(e,s),V(r,s)}}}function f_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[a_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&16384&&(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),V(e,s),V(r,s)}}}function c_(t){let e,n,r,i;e=new Hh({props:{$$slots:{default:[s_]},$$scope:{ctx:t}}});let s=t[5]&&fu(t);return{c(){B(e.$$.fragment),n=U(),s&&s.c(),r=Fe()},m(o,u){H(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&16415&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[5]?s?(s.p(o,u),u&32&&b(s,1)):(s=fu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(ce(),y(s,1,1,()=>{s=null}),de())},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)),V(e,o),s&&s.d(o)}}}const ro=De([]);let io=De(!1);function d_(t){t.status="active",ro.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=m_(t):t.action==="SaveCurrentFile"&&(e=p_(t)),e!==null&&e.then(()=>{ro.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function m_(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function p_(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():io.set(!0)}function h_(t,e,n){let r,i,s,o,u,l;J(t,ro,p=>n(0,r=p)),J(t,io,p=>n(5,l=p));const a=To();J(t,a,p=>n(2,s=p));const f=$o();J(t,f,p=>n(3,o=p));const c=X1();J(t,c,p=>n(4,u=p));const d=Be([a,f,c],p=>{let _=0;for(const v of p)v!==null&&v.isFetching&&(_=_+1);return _});return J(t,d,p=>n(1,i=p)),[r,i,s,o,u,l,a,f,c,d,p=>{p||io.set(!1)}]}let __=class extends ve{constructor(e){super(),ye(this,e,h_,c_,fe,{})}};function g_(t){let e;const n=t[3].default,r=pe(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)&&_e(r,n,i,i[5],e?he(n,i[5],s,null):ge(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 b_(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[g_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function y_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[b_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function v_(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[y_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new si({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function k_(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)}ns(()=>{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,k_,v_,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function C_(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function cu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function E_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[O_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Create",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(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)),V(e,s)}}}function w_(t){let e,n,r,i;return n=new Le({props:{path:Mt,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Creating...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),D(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),V(n)}}}function O_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function A_(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_;e=new Tt({props:{$$slots:{default:[C_]},$$scope:{ctx:t}}});let v=t[2]&&cu(t);const g=[w_,E_],h=[];function k(O,$){return O[3].isPending?0:1}return c=k(t),d=h[c]=g[c](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New branch title",o=U(),u=S("input"),l=U(),v&&v.c(),a=U(),f=S("div"),d.c(),M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(O,$){H(e,O,$),w(O,n,$),w(O,r,$),D(r,i),D(i,s),D(i,o),D(i,u),it(u,t[1]),D(i,l),v&&v.m(i,null),D(r,a),D(r,f),h[c].m(f,null),m=!0,p||(_=[G(u,"input",t[7]),G(r,"submit",t[6])],p=!0)},p(O,$){const C={};$&2048&&(C.$$scope={dirty:$,ctx:O}),e.$set(C),$&2&&u.value!==O[1]&&it(u,O[1]),O[2]?v?v.p(O,$):(v=cu(O),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let P=c;c=k(O),c!==P&&(ce(),y(h[P],1,1,()=>{h[P]=null}),de(),d=h[c],d||(d=h[c]=g[c](O),d.c()),b(d,1),d.m(f,null))},i(O){m||(b(e.$$.fragment,O),b(d),m=!0)},o(O){y(e.$$.fragment,O),y(d),m=!1},d(O){O&&(E(n),E(r)),V(e,O),v&&v.d(),h[c].d(),p=!1,Te(_)}}}function T_(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[A_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function $_(t,e,n){let r;const i=Et(),s=wt();let o=!1,u="",l="";function a(p){p&&n(1,u="")}const f=di({mutationFn:async p=>{const _=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:p.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(_.ok){i.invalidateQueries({queryKey:["branches"]});const v=await _.json();s.set(v),Ge.set(Ae.NONE)}else n(2,l=(await _.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});J(t,f,p=>n(3,r=p));async function c(p){p.preventDefault(),r.mutate({title:u})}function d(){u=this.value,n(1,u)}function m(p){o=p,n(0,o)}return[o,u,l,r,a,f,c,d,m]}class S_ extends ve{constructor(e){super(),ye(this,e,$_,T_,fe,{})}}function R_(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function du(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function F_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[P_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Delete",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(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)),V(e,s)}}}function D_(t){let e,n,r,i;return n=new Le({props:{path:Mt,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Deleting...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),D(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),V(n)}}}function P_(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function L_(t){var F;let e,n,r,i,s,o,u=((F=t[4])==null?void 0:F.title)+"",l,a,f,c,d,m,p,_,v,g,h,k,O,$,C;e=new Tt({props:{$$slots:{default:[R_]},$$scope:{ctx:t}}});let P=t[2]&&du(t);const R=[D_,F_],K=[];function N(I,A){return I[3].isPending?0:1}return h=N(t),k=K[h]=R[h](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the branch "),o=S("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=U(),c=S("label"),d=S("span"),d.textContent="Confirm branch name",m=U(),p=S("input"),_=U(),P&&P.c(),v=U(),g=S("div"),k.c(),M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(g,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(I,A){H(e,I,A),w(I,n,A),w(I,r,A),D(r,i),D(i,s),D(i,o),D(o,l),D(i,a),D(r,f),D(r,c),D(c,d),D(c,m),D(c,p),it(p,t[1]),D(c,_),P&&P.m(c,null),D(r,v),D(r,g),K[h].m(g,null),O=!0,$||(C=[G(p,"input",t[9]),G(r,"submit",t[8])],$=!0)},p(I,A){var W;const L={};A&4096&&(L.$$scope={dirty:A,ctx:I}),e.$set(L),(!O||A&16)&&u!==(u=((W=I[4])==null?void 0:W.title)+"")&&qe(l,u),A&2&&p.value!==I[1]&&it(p,I[1]),I[2]?P?P.p(I,A):(P=du(I),P.c(),P.m(c,null)):P&&(P.d(1),P=null);let q=h;h=N(I),h!==q&&(ce(),y(K[q],1,1,()=>{K[q]=null}),de(),k=K[h],k||(k=K[h]=R[h](I),k.c()),b(k,1),k.m(g,null))},i(I){O||(b(e.$$.fragment,I),b(k),O=!0)},o(I){y(e.$$.fragment,I),y(k),O=!1},d(I){I&&(E(n),E(r)),V(e,I),P&&P.d(),K[h].d(),$=!1,Te(C)}}}function I_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[6],$$slots:{default:[L_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&4126&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function M_(t,e,n){let r,i;const s=Et(),o=wt();J(t,o,_=>n(4,i=_));let u=!1,l="",a="";function f(_){_&&n(1,l="")}const c=di({mutationFn:async()=>{const _=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json"}});_.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)))}});J(t,c,_=>n(3,r=_));function d(_){_.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 m(){l=this.value,n(1,l)}function p(_){u=_,n(0,u)}return[u,l,a,r,i,o,f,c,d,m,p]}class N_ extends ve{constructor(e){super(),ye(this,e,M_,I_,fe,{})}}function mu(t,e,n){const r=t.slice();return r[15]=e[n],r}function H_(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function pu(t){let e,n=t[15].title+"",r,i;return{c(){e=S("option"),r=Z(n),e.__value=i=t[15].id,it(e,e.__value)},m(s,o){w(s,e,o),D(e,r)},p(s,o){o&16&&n!==(n=s[15].title+"")&&qe(r,n),o&16&&i!==(i=s[15].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&E(e)}}}function hu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function V_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[U_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Import",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(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)),V(e,s)}}}function B_(t){let e,n,r,i;return n=new Le({props:{path:Mt,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Importing...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),D(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),V(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 K_(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_;e=new Tt({props:{$$slots:{default:[H_]},$$scope:{ctx:t}}});let v=nn(t[4]),g=[];for(let C=0;C<v.length;C+=1)g[C]=pu(mu(t,v,C));let h=t[2]&&hu(t);const k=[B_,V_],O=[];function $(C,P){return C[3].isPending?0:1}return c=$(t),d=O[c]=k[c](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New branch title",o=U(),u=S("select");for(let C=0;C<g.length;C+=1)g[C].c();l=U(),h&&h.c(),a=U(),f=S("div"),d.c(),M(s,"data-form-field-label",""),M(u,"data-form-field-text",""),t[1]===void 0&&ft(()=>t[9].call(u)),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(C,P){H(e,C,P),w(C,n,P),w(C,r,P),D(r,i),D(i,s),D(i,o),D(i,u);for(let R=0;R<g.length;R+=1)g[R]&&g[R].m(u,null);Io(u,t[1],!0),D(i,l),h&&h.m(i,null),D(r,a),D(r,f),O[c].m(f,null),m=!0,p||(_=[G(u,"change",t[9]),G(r,"submit",t[8])],p=!0)},p(C,P){const R={};if(P&262144&&(R.$$scope={dirty:P,ctx:C}),e.$set(R),P&16){v=nn(C[4]);let N;for(N=0;N<v.length;N+=1){const F=mu(C,v,N);g[N]?g[N].p(F,P):(g[N]=pu(F),g[N].c(),g[N].m(u,null))}for(;N<g.length;N+=1)g[N].d(1);g.length=v.length}P&18&&Io(u,C[1]),C[2]?h?h.p(C,P):(h=hu(C),h.c(),h.m(i,null)):h&&(h.d(1),h=null);let K=c;c=$(C),c!==K&&(ce(),y(O[K],1,1,()=>{O[K]=null}),de(),d=O[c],d||(d=O[c]=k[c](C),d.c()),b(d,1),d.m(f,null))},i(C){m||(b(e.$$.fragment,C),b(d),m=!0)},o(C){y(e.$$.fragment,C),y(d),m=!1},d(C){C&&(E(n),E(r)),V(e,C),fi(g,C),h&&h.d(),O[c].d(),p=!1,Te(_)}}}function j_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[K_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&262174&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function q_(t,e,n){let r,i;const s=Et(),o=wt(),u=To(),l=$o();let a=!1,f="",c="";function d(h){h&&n(1,f="")}const m=Be([u,l],([h,k])=>h.isSuccess&&k.isSuccess?k.data.filter(O=>{let $=!1;for(const C of h.data)if(O.id.endsWith("/"+C.id)){$=!0;break}return!$}).map(O=>({id:O.id.substring(O.id.indexOf("/")+1),title:O.title,nogit:!1})):[]);J(t,m,h=>n(4,i=h));const p=di({mutationFn:async h=>{const k=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:h.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(k.ok){s.invalidateQueries({queryKey:["branches"]});const O=await k.json();o.set(O),Ge.set(Ae.NONE)}else n(2,c=(await k.json()).detail[0].msg),n(2,c=c[0].toUpperCase()+c.substring(1))}});J(t,p,h=>n(3,r=h));async function _(h){h.preventDefault(),r.mutate({title:f})}function v(){f=Af(this),n(1,f)}function g(h){a=h,n(0,a)}return[a,f,c,r,i,d,m,p,_,v,g]}class W_ extends ve{constructor(e){super(),ye(this,e,q_,j_,fe,{})}}function Q_(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 _u(t){let e,n;return{c(){e=S("p"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function z_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[Y_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Merge",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(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)),V(e,s)}}}function G_(t){let e,n,r,i;return n=new Le({props:{path:Mt,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Merging...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),D(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),V(n)}}}function Y_(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Z_(t){var N;let e,n,r,i,s,o,u=t[4].data.git.default_branch+"",l,a,f,c=((N=t[3])==null?void 0:N.title)+"",d,m,p,_,v,g,h,k,O,$;e=new Tt({props:{$$slots:{default:[Q_]},$$scope:{ctx:t}}});let C=t[1]&&_u(t);const P=[G_,z_],R=[];function K(F,I){return F[2].isPending?0:1}return g=K(t),h=R[g]=P[g](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=S("span"),l=Z(u),a=Z(`
|
|
14
|
+
into the current branch`),f=S("span"),d=Z(c),m=Z(". This cannot be undone."),p=U(),C&&C.c(),_=U(),v=S("div"),h.c(),M(o,"class","inline-block mx-1 px-2 border boder-fuchsia-700 rounded font-bold"),M(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(v,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(F,I){H(e,F,I),w(F,n,I),w(F,r,I),D(r,i),D(i,s),D(i,o),D(o,l),D(i,a),D(i,f),D(f,d),D(i,m),D(r,p),C&&C.m(r,null),D(r,_),D(r,v),R[g].m(v,null),k=!0,O||($=G(r,"submit",t[9]),O=!0)},p(F,I){var q;const A={};I&8192&&(A.$$scope={dirty:I,ctx:F}),e.$set(A),(!k||I&16)&&u!==(u=F[4].data.git.default_branch+"")&&qe(l,u),(!k||I&8)&&c!==(c=((q=F[3])==null?void 0:q.title)+"")&&qe(d,c),F[1]?C?C.p(F,I):(C=_u(F),C.c(),C.m(r,_)):C&&(C.d(1),C=null);let L=g;g=K(F),g!==L&&(ce(),y(R[L],1,1,()=>{R[L]=null}),de(),h=R[g],h||(h=R[g]=P[g](F),h.c()),b(h,1),h.m(v,null))},i(F){k||(b(e.$$.fragment,F),b(h),k=!0)},o(F){y(e.$$.fragment,F),y(h),k=!1},d(F){F&&(E(n),E(r)),V(e,F),C&&C.d(),R[g].d(),O=!1,$()}}}function X_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[Z_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function J_(t,e,n){let r,i,s;const o=Et(),u=Ci();J(t,u,_=>n(4,s=_));const l=wt();J(t,l,_=>n(3,i=_));let a=!1,f="";function c(_){}const d=di({mutationFn:async()=>{const _=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});_.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(Ae.NONE)):(n(1,f=(await _.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});J(t,d,_=>n(2,r=_));function m(_){_.preventDefault(),r.mutate()}function p(_){a=_,n(0,a)}return[a,f,r,i,s,u,l,c,d,m,p]}class x_ extends ve{constructor(e){super(),ye(this,e,J_,X_,fe,{})}}function eg(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:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function gu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function tg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ng(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v;e=new Tt({props:{$$slots:{default:[eg]},$$scope:{ctx:t}}});let g=t[2]&&gu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[tg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Folder Name",o=U(),u=S("input"),l=U(),g&&g.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Create",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),D(r,i),D(i,s),D(i,o),D(i,u),it(u,t[1]),D(i,l),g&&g.m(i,null),D(r,a),D(r,f),H(c,f,null),D(f,d),D(f,m),p=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!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]?g?g.p(h,k):(g=gu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),g&&g.d(),V(c),_=!1,Te(v)}}}function rg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[ng]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function ig(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const _=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"}});_.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await _.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let sg=class extends ve{constructor(e){super(),ye(this,e,ig,rg,fe,{})}};function og(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=S("span"),i=Z(r),M(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),D(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&qe(i,r)},d(o){o&&(E(e),E(n))}}}function bu(t){let e,n;return{c(){e=S("span"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function lg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ug(t){var K;let e,n,r,i,s,o,u=((K=t[3])==null?void 0:K.fullpath)+"",l,a,f,c,d,m,p,_,v,g,h,k,O,$,C,P;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[og]},$$scope:{ctx:t}}});let R=t[1]&&bu(t);return h=new It({props:{"data-button":!0,$$slots:{default:[lg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the folder "),o=S("span"),l=Z(u),a=Z(`
|
|
15
|
+
and all the files and folders within that. To confirm the action, please enter
|
|
16
|
+
the name of the folder to delete.`),f=U(),c=S("label"),d=S("span"),d.textContent="Confirmation Folder Name",m=U(),p=S("input"),_=U(),R&&R.c(),v=U(),g=S("div"),B(h.$$.fragment),k=U(),O=S("button"),O.textContent="Delete",M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(c,"class","block"),M(O,"type","submit"),M(O,"data-button",""),M(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),M(g,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(N,F){H(e,N,F),w(N,n,F),w(N,r,F),D(r,i),D(i,s),D(i,o),D(o,l),D(i,a),D(r,f),D(r,c),D(c,d),D(c,m),D(c,p),it(p,t[2]),D(c,_),R&&R.m(c,null),D(r,v),D(r,g),H(h,g,null),D(g,k),D(g,O),$=!0,C||(P=[G(p,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(N,F){var L;const I={};F&2056&&(I.$$scope={dirty:F,ctx:N}),e.$set(I),(!$||F&8)&&u!==(u=((L=N[3])==null?void 0:L.fullpath)+"")&&qe(l,u),F&4&&p.value!==N[2]&&it(p,N[2]),N[1]?R?R.p(N,F):(R=bu(N),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const A={};F&2048&&(A.$$scope={dirty:F,ctx:N}),h.$set(A)},i(N){$||(b(e.$$.fragment,N),b(h.$$.fragment,N),$=!0)},o(N){y(e.$$.fragment,N),y(h.$$.fragment,N),$=!1},d(N){N&&(E(n),E(r)),V(e,N),R&&R.d(),V(h),C=!1,Te(P)}}}function ag(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[ug]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function fg(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){p.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/"]}),ct.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(p){p?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let af=class extends ve{constructor(e){super(),ye(this,e,fg,ag,fe,{})}};function cg(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:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function yu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function dg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function mg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v;e=new Tt({props:{$$slots:{default:[cg]},$$scope:{ctx:t}}});let g=t[2]&&yu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[dg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Folder Name",o=U(),u=S("input"),l=U(),g&&g.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Rename",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),D(r,i),D(i,s),D(i,o),D(i,u),it(u,t[1]),D(i,l),g&&g.m(i,null),D(r,a),D(r,f),H(c,f,null),D(f,d),D(f,m),p=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!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]?g?g.p(h,k):(g=yu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),g&&g.d(),V(c),_=!1,Te(v)}}}function pg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[mg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function hg(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const _=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+_+"/"+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/"]}),ct.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(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let _g=class extends ve{constructor(e){super(),ye(this,e,hg,pg,fe,{})}};function gg(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:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function vu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function bg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function yg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v;e=new Tt({props:{$$slots:{default:[gg]},$$scope:{ctx:t}}});let g=t[2]&&vu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[bg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Filename",o=U(),u=S("input"),l=U(),g&&g.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Create",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),D(r,i),D(i,s),D(i,o),D(i,u),it(u,t[1]),D(i,l),g&&g.m(i,null),D(r,a),D(r,f),H(c,f,null),D(f,d),D(f,m),p=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!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]?g?g.p(h,k):(g=vu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),g&&g.d(),V(c),_=!1,Te(v)}}}function vg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[yg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function kg(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const _=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"}});_.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await _.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class Cg extends ve{constructor(e){super(),ye(this,e,kg,vg,fe,{})}}function Eg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=S("span"),i=Z(r),M(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),D(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&qe(i,r)},d(o){o&&(E(e),E(n))}}}function ku(t){let e,n;return{c(){e=S("span"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function wg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Og(t){var K;let e,n,r,i,s,o,u=((K=t[3])==null?void 0:K.fullpath)+"",l,a,f,c,d,m,p,_,v,g,h,k,O,$,C,P;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[Eg]},$$scope:{ctx:t}}});let R=t[1]&&ku(t);return h=new It({props:{"data-button":!0,$$slots:{default:[wg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the file "),o=S("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=U(),c=S("label"),d=S("span"),d.textContent="Confirm filename",m=U(),p=S("input"),_=U(),R&&R.c(),v=U(),g=S("div"),B(h.$$.fragment),k=U(),O=S("button"),O.textContent="Delete",M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(c,"class","block"),M(O,"type","submit"),M(O,"data-button",""),M(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),M(g,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(N,F){H(e,N,F),w(N,n,F),w(N,r,F),D(r,i),D(i,s),D(i,o),D(o,l),D(i,a),D(r,f),D(r,c),D(c,d),D(c,m),D(c,p),it(p,t[2]),D(c,_),R&&R.m(c,null),D(r,v),D(r,g),H(h,g,null),D(g,k),D(g,O),$=!0,C||(P=[G(p,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(N,F){var L;const I={};F&2056&&(I.$$scope={dirty:F,ctx:N}),e.$set(I),(!$||F&8)&&u!==(u=((L=N[3])==null?void 0:L.fullpath)+"")&&qe(l,u),F&4&&p.value!==N[2]&&it(p,N[2]),N[1]?R?R.p(N,F):(R=ku(N),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const A={};F&2048&&(A.$$scope={dirty:F,ctx:N}),h.$set(A)},i(N){$||(b(e.$$.fragment,N),b(h.$$.fragment,N),$=!0)},o(N){y(e.$$.fragment,N),y(h.$$.fragment,N),$=!1},d(N){N&&(E(n),E(r)),V(e,N),R&&R.d(),V(h),C=!1,Te(P)}}}function Ag(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Og]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Tg(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){p.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/"]}),ct.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(p){p?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class $g extends ve{constructor(e){super(),ye(this,e,Tg,Ag,fe,{})}}function Sg(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:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function Cu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),D(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function Rg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Fg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v;e=new Tt({props:{$$slots:{default:[Sg]},$$scope:{ctx:t}}});let g=t[2]&&Cu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[Rg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Filename",o=U(),u=S("input"),l=U(),g&&g.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Rename",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),D(r,i),D(i,s),D(i,o),D(i,u),it(u,t[1]),D(i,l),g&&g.m(i,null),D(r,a),D(r,f),H(c,f,null),D(f,d),D(f,m),p=!0,_||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],_=!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]?g?g.p(h,k):(g=Cu(h),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){y(e.$$.fragment,h),y(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),g&&g.d(),V(c),_=!1,Te(v)}}}function Dg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Fg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Pg(t,e,n){let r,i;J(t,ct,p=>n(3,i=p));const s=Et(),o=wt();J(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const _=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+_+"/"+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/"]}),ct.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(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class Lg extends ve{constructor(e){super(),ye(this,e,Pg,Dg,fe,{})}}function Eu(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function Ig(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Mg(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ng(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?Mg:Ig}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 d,m;o!==(o=s(f))&&(u.d(1),u=o(f),u&&(u.c(),u.m(e.parentNode,e))),c&64&&n!==(n=((d=f[6])!=null&&d.fullpath?(m=f[6])==null?void 0:m.fullpath:"/")+"")&&qe(r,n)},d(f){f&&(E(e),E(r),E(i)),u.d(f)}}}function Hg(t){let e,n,r,i,s,o,u=nn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=wu(Eu(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new It({props:{"data-button":!0,$$slots:{default:[Qg]},$$scope:{ctx:t}}}),{c(){e=S("div"),n=S("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=U(),i=S("div"),B(s.$$.fragment),M(i,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(f,c){w(f,e,c),D(e,n);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(n,null);D(e,r),D(e,i),H(s,i,null),o=!0},p(f,c){if(c&144){u=nn(f[4]);let m;for(m=0;m<u.length;m+=1){const p=Eu(f,u,m);l[m]?(l[m].p(p,c),b(l[m],1)):(l[m]=wu(p),l[m].c(),b(l[m],1),l[m].m(n,null))}for(ce(),m=u.length;m<l.length;m+=1)a(m);de()}const d={};c&33554464&&(d.$$scope={dirty:c,ctx:f}),s.$set(d)},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),V(s)}}}function Vg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p;return a=new It({props:{"data-button":!0,$$slots:{default:[zg]},$$scope:{ctx:t}}}),{c(){e=S("form"),n=S("label"),r=S("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=U(),s=S("input"),u=U(),l=S("div"),B(a.$$.fragment),f=U(),c=S("button"),c.textContent="Upload",M(s,"type","file"),M(s,"class","sr-only"),M(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),M(c,"type","submit"),M(c,"data-button",""),M(c,"class","sr-only"),M(l,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(_,v){w(_,e,v),D(e,n),D(n,r),D(n,i),D(n,s),t[12](s),D(e,u),D(e,l),H(a,l,null),D(l,f),D(l,c),t[16](c),d=!0,m||(p=[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])],m=!0)},p(_,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(_[2]?"border-solid":"border-dashed")+" rounded"))&&M(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:_}),a.$set(g)},i(_){d||(b(a.$$.fragment,_),d=!0)},o(_){y(a.$$.fragment,_),d=!1},d(_){_&&E(e),t[12](null),V(a),t[16](null),m=!1,Te(p)}}}function Bg(t){let e,n,r,i;return r=new Le({props:{path:O1,class:"w-6 h-6 text-rose-700"}}),{c(){e=S("span"),e.textContent="failed to upload",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(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)),V(r,s)}}}function Ug(t){let e,n,r,i;return r=new Le({props:{path:E1,class:"w-6 h-6 text-lime-500"}}),{c(){e=S("span"),e.textContent="successfully uploaded",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(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)),V(r,s)}}}function Kg(t){let e,n,r,i;return r=new Le({props:{path:Mt,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=S("span"),e.textContent="uploading",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(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)),V(r,s)}}}function jg(t){let e,n,r,i;return r=new Le({props:{path:j1}}),{c(){e=S("span"),e.textContent="waiting to upload",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(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)),V(r,s)}}}function wu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[jg,Kg,Ug,Bg],c=[];function d(m,p){return m[22]===m[7].READY?0:m[22]==m[7].ACTIVE?1:m[22]===m[7].SUCCESS?2:m[22]===m[7].FAILED?3:-1}return~(o=d(t))&&(u=c[o]=f[o](t)),{c(){e=S("li"),n=S("span"),i=Z(r),s=U(),u&&u.c(),l=U(),M(n,"class","flex-1"),M(e,"class","flex flex-row space-x-4")},m(m,p){w(m,e,p),D(e,n),D(n,i),D(e,s),~o&&c[o].m(e,null),D(e,l),a=!0},p(m,p){(!a||p&16)&&r!==(r=m[21].name+"")&&qe(i,r);let _=o;o=d(m),o!==_&&(u&&(ce(),y(c[_],1,1,()=>{c[_]=null}),de()),~o?(u=c[o],u||(u=c[o]=f[o](m),u.c()),b(u,1),u.m(e,l)):u=null)},i(m){a||(b(u),a=!0)},o(m){y(u),a=!1},d(m){m&&E(e),~o&&c[o].d()}}}function qg(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Wg(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qg(t){let e;function n(s,o){return s[5]?Wg:qg}let r=n(t),i=r(t);return{c(){i.c(),e=Fe()},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 zg(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Gg(t){let e,n,r,i,s,o;e=new Tt({props:{$$slots:{default:[Ng]},$$scope:{ctx:t}}});const u=[Vg,Hg],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){B(e.$$.fragment),n=U(),i.c(),s=Fe()},m(f,c){H(e,f,c),w(f,n,c),l[r].m(f,c),w(f,s,c),o=!0},p(f,c){const d={};c&33554512&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);let m=r;r=a(f),r===m?l[r].p(f,c):(ce(),y(l[m],1,1,()=>{l[m]=null}),de(),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)),V(e,f),l[r].d(f)}}}function Yg(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[Gg]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Ut(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(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],Bt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Zg(t,e,n){let r,i;J(t,ct,R=>n(6,i=R));var s=(R=>(R[R.READY=0]="READY",R[R.ACTIVE=1]="ACTIVE",R[R.SUCCESS=2]="SUCCESS",R[R.FAILED=3]="FAILED",R))(s||{});const o=Et(),u=wt();J(t,u,R=>n(18,r=R));let l=null,a=null,f=!1,c=!1,d=[],m=!1;function p(R){R||Ge.set(Ae.NONE)}async function _(R){if(R.preventDefault(),l&&l.files){n(4,d=[]);for(let K of l.files)d.push([K,0]);d.length>0&&g()}}async function v(R){if(R.preventDefault(),n(4,d=[]),R.dataTransfer&&R.dataTransfer.items){for(let K of R.dataTransfer.items)if(K.kind==="file"){const N=K.getAsFile();N!==null&&d.push([N,0])}d.length>0&&g()}}async function g(){n(5,m=!1);for(let R of d){if(!c)break;if(R[1]=1,n(4,d),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"POST",headers:{"X-uEditor-New-Type":"file"}})).ok){const N=new FormData;N.append("content",R[0]),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"PUT",body:N})).ok?R[1]=2:R[1]=3,n(4,d)}else R[1]=3,n(4,d)}o.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),n(5,m=!0)}function h(R){Ce[R?"unshift":"push"](()=>{l=R,n(0,l)})}const k=()=>{a&&a.click()},O=R=>{R.preventDefault(),n(2,f=!0)},$=()=>{n(2,f=!1)};function C(R){Ce[R?"unshift":"push"](()=>{a=R,n(1,a)})}function P(R){c=R,n(3,c)}return[l,a,f,c,d,m,i,s,u,p,_,v,h,k,O,$,C,P]}class Xg extends ve{constructor(e){super(),ye(this,e,Zg,Yg,fe,{})}}function Jg(t){let e,n;return e=new Xg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function xg(t){let e,n;return e=new Lg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function eb(t){let e,n;return e=new $g({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function tb(t){let e,n;return e=new Cg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function nb(t){let e,n;return e=new _g({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function rb(t){let e,n;return e=new af({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ib(t){let e,n;return e=new sg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function sb(t){let e,n;return e=new x_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ob(t){let e,n;return e=new N_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function lb(t){let e,n;return e=new W_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ub(t){let e,n;return e=new S_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ab(t){let e,n,r,i;const s=[ub,lb,ob,sb,ib,rb,nb,tb,eb,xg,Jg],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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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=De(1);function fb(t,e,n){let r,i=me;return J(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let cb=class extends ve{constructor(e){super(),ye(this,e,fb,ab,fe,{})}};const db="modulepreload",mb=function(t){return"/app/"+t},Ou={},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=mb(l),l in Ou)return;Ou[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":db,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((d,m)=>{c.addEventListener("load",d),c.addEventListener("error",()=>m(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 pb(t){let e;return{c(){e=S("div"),e.textContent="Please select a file or folder from the file-browser on the left",M(e,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,r){w(n,e,r)},p:me,i:me,o:me,d(n){n&&E(e)}}}function hb(t){let e,n,r,i;const s=[bb,gb,_b],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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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 _b(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=S("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),M(e,"class","flex-1 px-2 py-1 text-rose-700")},m(o,u){w(o,e,u),D(e,n),D(e,i),D(e,s)},p(o,u){u&2&&r!==(r=o[1].mimetype+"")&&qe(i,r)},i:me,o:me,d(o){o&&E(e)}}}function gb(t){let e;return{c(){e=S("div"),e.textContent="Loading the editor. Please wait...",M(e,"class","flex-1 px-2 py-1")},m(n,r){w(n,e,r)},p:me,i:me,o:me,d(n){n&&E(e)}}}function bb(t){let e=t[3].id,n,r,i=Au(t);return{c(){i.c(),n=Fe()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(ce(),y(i,1,1,me),de(),i=Au(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 Au(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Mo(i,s())),{c(){e&&B(e.$$.fragment),n=Fe()},m(o,u){e&&H(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){ce();const l=e;y(l.$$.fragment,1,0,()=>{V(l,1)}),de()}i?(e=Mo(i,s()),B(e.$$.fragment),b(e.$$.fragment,1),H(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&&V(e,o)}}}function yb(t){let e,n,r,i;const s=[hb,pb],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=Fe()},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):(ce(),y(o[f],1,1,()=>{o[f]=null}),de(),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 vb(t,e,n){let r,i,s;J(t,ct,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=wt();J(t,a,d=>n(3,s=d));const f=Be(ct,d=>{if(d){if(d.type==="folder")return"Folder";if(u.indexOf(d.mimetype)>=0||d.mimetype.startsWith("text/"))return"CodeMirror";if(l.indexOf(d.mimetype)>=0)return"Tei";if(d.mimetype.startsWith("image/"))return"Image"}return null}),c=Be(f,(d,m)=>{let p=null;d==="Folder"?p=Pi(()=>import("./FolderEditor-Bj2w6MKI.js"),[]):d==="CodeMirror"?p=Pi(()=>import("./CodeMirrorEditor-CscxspV6.js"),__vite__mapDeps([0,1,2])):d==="Tei"?p=Pi(()=>import("./TeiEditor-FqXheBay.js"),__vite__mapDeps([3,1])):d==="Image"&&(p=Pi(()=>import("./ImageEditor-BCtwmSpD.js"),[])),p?(n(0,o=!0),p.then(_=>{m(_.default),n(0,o=!1)},()=>{n(0,o=!1)})):m(null)},null);return J(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let kb=class extends ve{constructor(e){super(),ye(this,e,vb,yb,fe,{})}};function Cb(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 Eb(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 Tu(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function $u(t,e){if(!Ob)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")}}),Su=t=>typeof t=="function";Hi("empty");function Hi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Be(n,u=>{const l=i(u);if(Su(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,a}return Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr}))});{const u=i,l=u==null?void 0:u();if(Su(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,Tu(a)}return Tu(Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function wb(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 Ob=typeof document<"u",Ab=t=>/^[a-z]$/i.test(t);function So(t){return t instanceof HTMLElement}function Tb(t){return t.offsetParent===null}function $b(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function rr(){}function Rs(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Rb(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Sb(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 Rb(t){return e=>{const n=Sb(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ro(t){return{...t,get:()=>$r(t)}}Ro.writable=function(t){const e=De(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 Fb=(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 Ra(10)}function Pb(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"};yt(!1),yt(!1),yt(void 0),yt(void 0);const Lb={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"};({...Eb(Lb,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const Ib={forceVisible:!1,defaultExpanded:[]},ir={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Fs}=wb("tree-view");function Mb(t){const e={...Ib,...t},{forceVisible:n}=e,r=De(null),i=De(null),s=e.expanded??De(e.defaultExpanded),o=Fb(s,e==null?void 0:e.onExpandedChange),u=Be([i],([C])=>C==null?void 0:C.getAttribute("data-id")),l=Be([i],([C])=>P=>(C==null?void 0:C.getAttribute("data-id"))===P),a=Be([o],([C])=>P=>C.includes(P)),f=Pb(["tree"]),c=Hi(Fs(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const m=Hi(Fs("item"),{stores:[o,u,r],returned:([C,P,R])=>K=>{const{id:N,hasChildren:F}=K;let I=0;return R!==null&&(I=R===N?0:-1),{role:"treeitem","aria-selected":P===N,"data-id":N,tabindex:I,"aria-expanded":F?C.includes(N):void 0}},action:C=>{const P=$b(Rs(C,"keydown",R=>{const{key:K}=R,N=Ab(K);if(![lt.ARROW_DOWN,lt.ARROW_UP,lt.ARROW_LEFT,lt.ARROW_RIGHT,lt.ENTER,lt.SPACE,lt.END,lt.HOME,lt.ASTERISK].includes(K)&&!N||!$u(f.tree)||!So(C)||C.getAttribute("role")!=="treeitem")return;const A=g(),L=A.findIndex(q=>q===C);if(K!==lt.ENTER&&K!==lt.SPACE&&R.preventDefault(),K===lt.ENTER||K===lt.SPACE)v(C),d=!0;else if(K===lt.ARROW_DOWN&&L!==A.length-1){const q=A[L+1];if(!q)return;_(q)}else if(K===lt.ARROW_UP&&L!==0){const q=A[L-1];if(!q)return;_(q)}else if(K===lt.HOME&&L!==0){const q=A[0];if(!q)return;_(q)}else if(K===lt.END&&L!=A.length-1){const q=Cb(A);if(!q)return;_(q)}else if(K===lt.ARROW_LEFT)if($(C))k(C);else{const q=C==null?void 0:C.closest('[role="group"]'),W=q==null?void 0:q.getAttribute("data-group-id"),oe=A.find(se=>se.getAttribute("data-id")===W);if(!oe)return;_(oe)}else if(K===lt.ARROW_RIGHT)if($(C)){const q=A[L+1];if(!q)return;_(q)}else O(C)&&k(C);else if(N){const q=A.map(se=>{var z;return{value:(z=se.textContent)==null?void 0:z.toLowerCase().trim(),id:se.getAttribute("data-id")}});let W=-1,oe=q.slice(L+1).some((se,z)=>{var le;return((le=se.value)==null?void 0:le.toLowerCase()[0])===K?(W=L+1+z,!0):!1});if(oe||(oe=q.slice(0,L).some((se,z)=>{var le;return((le=se.value)==null?void 0:le.toLowerCase().at(0))===K?(W=z,!0):!1})),oe&&q[W].id){const se=A[W];if(!se)return;_(se)}}}),Rs(C,"click",async()=>{v(C),_(C),d||k(C),d=!1}),Rs(C,"focus",()=>{r.update(R=>C.getAttribute("data-id")??R)}));return{destroy(){P()}}}}),p=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 _(C){r.update(P=>C.getAttribute("data-id")??P),C.focus()}function v(C){C.getAttribute(ir.DATAID)&&i.set(C)}function g(){let C=[];const P=$u(f.tree);return P&&(C=Array.from(P.querySelectorAll('[role="treeitem"]')).filter(R=>!Tb(R))),C}function h(C){const P=C.hasAttribute(ir.EXPANDED),R=C.getAttribute(ir.EXPANDED),K=C.getAttribute(ir.DATAID);return{hasChildren:P,expanded:R,dataId:K}}function k(C){const{hasChildren:P,expanded:R,dataId:K}=h(C);!P||R===null||K===null||(R==="false"?o.update(N=>[...N,K]):o.update(N=>N.filter(F=>F!==K)))}function O(C){return C.hasAttribute(ir.EXPANDED)}function $(C){return C.getAttribute(ir.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:m,group:p},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var Nb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hb(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",Nb,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,d){var m=u[d];return m===void 0&&(m=n[d]),m===void 0&&(m=d),m===l&&(m=" "),c+m.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 Vb=cf.exports;const Bb=Hb(Vb);function Ru(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-${Bb(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=[zb,Qb,Wb,qb],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=Fe()},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&&(ce(),y(u[c],1,1,()=>{u[c]=null}),de(),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 Kb(t){let e,n;return e=new Le({props:{path:M1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:me,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function jb(t){let e,n;return e=new Le({props:{path:I1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:me,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function qb(t){let e,n;return e=new Le({props:{path:D1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Wb(t){let e,n;return e=new Le({props:{path:$1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Qb(t){let e,n;return e=new Le({props:{path:F1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function zb(t){let e,n;return e=new Le({props:{path:S1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Fu(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=ne(u,o[l]);return{c(){e=S("ol"),B(n.$$.fragment),ie(e,u)},m(l,a){w(l,e,a),H(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),ie(e,u=Ne(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),V(n),i=!1,s()}}}function Du(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,m,p,_;const v=[jb,Kb,Ub],g=[];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=g[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=ne(O,k[C]);let $=t[12]&&Fu(t);return{c(){e=S("li"),n=S("button"),s&&s.c(),o=U(),u=S("span"),a=Z(l),c=U(),$&&$.c(),d=U(),M(u,"class","select-none"),ie(n,O),M(e,"role","none")},m(C,P){w(C,e,P),D(e,n),~i&&g[i].m(n,null),D(n,o),D(n,u),D(u,a),n.autofocus&&n.focus(),D(e,c),$&&$.m(e,null),D(e,d),m=!0,p||(_=Ue(t[17].action(n)),p=!0)},p(C,P){let R=i;i=h(C,P),i===R?~i&&g[i].p(C,P):(s&&(ce(),y(g[R],1,1,()=>{g[R]=null}),de()),~i?(s=g[i],s?s.p(C,P):(s=g[i]=v[i](C),s.c()),b(s,1),s.m(n,o)):s=null),(!m||P&1)&&l!==(l=C[9]+"")&&qe(a,l),ie(n,O=Ne(k,[{class:"flex items-center gap-1 p-1"},P&11&&C[17],(!m||P&1&&f!==(f=C[11]))&&{"data-file-path":f}])),C[12]?$?($.p(C,P),P&1&&b($,1)):($=Fu(C),$.c(),b($,1),$.m(e,d)):$&&(ce(),y($,1,1,()=>{$=null}),de())},i(C){m||(b(s),b($),m=!0)},o(C){y(s),y($),m=!1},d(C){C&&E(e),~i&&g[i].d(),$&&$.d(),p=!1,_()}}}function Gb(t){let e,n,r=nn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Du(Ru(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=Fe()},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=nn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=Ru(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Du(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(ce(),l=r.length;l<i.length;l+=1)s(l);de()}},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 Yb(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}}=at("tree");return J(t,l,d=>n(3,i=d)),J(t,a,d=>n(2,r=d)),J(t,f,d=>n(4,s=d)),t.$$set=d=>{"treeItems"in d&&n(0,o=d.treeItems),"level"in d&&n(1,u=d.level)},[o,u,r,i,s,l,a,f]}class df extends ve{constructor(e){super(),ye(this,e,Yb,Gb,fe,{treeItems:0,level:1})}}function Zb(t){let e,n,r,i,s;const o=t[1].default,u=pe(o,t,t[0],null);return i=new Le({props:{path:Mt,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=S("div"),n=S("p"),u&&u.c(),r=U(),B(i.$$.fragment),M(n,"class","sr-only"),M(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),D(e,n),u&&u.m(n,null),D(e,r),H(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&_e(u,o,l,l[0],s?he(o,l[0],a,null):ge(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),V(i)}}}function Xb(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Jb extends ve{constructor(e){super(),ye(this,e,Xb,Zb,fe,{})}}function xb(t){let e,n;return e=new Jb({props:{$$slots:{default:[t2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function e2(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=ne(s,i[o]);return{c(){e=S("ol"),B(n.$$.fragment),ie(e,s)},m(o,u){w(o,e,u),H(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),ie(e,s=Ne(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),V(n)}}}function t2(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 n2(t){let e,n,r,i;const s=[e2,xb],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=S("nav"),r&&r.c(),M(e,"aria-label","Files"),M(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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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 r2(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 i2(t,e,n){let r,i;const s=wt(),o=Ao(),u=Be([s,o],([p,_])=>p?{queryKey:["branches",p.id,"files/"],queryFn:en,enabled:_.isSuccess}:{queryKey:["branches","-","files/"],queryFn:en,enabled:!1}),l=Tn(u);J(t,l,p=>n(0,r=p));const a=Mb({defaultExpanded:["file-tree--1-0"]});bt("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;J(t,f,p=>n(1,i=p));const m=c.subscribe(p=>{if(c!==null&&(p==null?void 0:p.getAttribute("data-file-path"))!==null&&r.isSuccess){const _=mf(r.data,p==null?void 0:p.getAttribute("data-file-path"));ct.set(_)}else ct.set(null)});return rs(m),ns(()=>{let p;p=l.subscribe(_=>{if(_.isSuccess){const v=uf("path");v&&Wt().then(()=>{const g=document.querySelector('[data-file-path="'+v+'"]');g&&(d.set(r2(g)),c.set(g))}),p&&p()}})}),[r,i,l,f]}class s2 extends ve{constructor(e){super(),ye(this,e,i2,n2,fe,{})}}function Pu(t,e,n){const r=t.slice();return r[15]=e[n],r}function Lu(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+"")&&qe(r,n)},d(s){s&&(E(e),E(r),E(i))}}}function o2(t){let e,n,r=t[0]!==null&&Lu(t);return{c(){e=Z("μEditor"),r&&r.c(),n=Fe()},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=Lu(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 l2(t){let e,n,r,i;return e=new Le({props:{path:B1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New Branch"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function Iu(t){let e,n;return e=new Vt({props:{$$slots:{default:[u2]},$$scope:{ctx:t}}}),e.$on("click",t[11]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function u2(t){let e,n,r,i;return e=new Le({props:{class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Import Branch"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function Mu(t){let e,n,r,i=t[2].update_from_default&&Nu(t),s=t[3].data.git.default_branch!==t[2].id&&Hu(t);return{c(){i&&i.c(),e=U(),s&&s.c(),n=Fe()},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[2].update_from_default?i?(i.p(o,u),u&4&&b(i,1)):(i=Nu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(ce(),y(i,1,1,()=>{i=null}),de()),o[3].data.git.default_branch!==o[2].id?s?(s.p(o,u),u&12&&b(s,1)):(s=Hu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(ce(),y(s,1,1,()=>{s=null}),de())},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 Nu(t){let e,n,r,i;return e=new Vt({props:{$$slots:{default:[a2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new as({}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function a2(t){let e,n,r,i,s=t[3].data.git.default_branch+"",o,u;return e=new Le({props:{path:K1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),i=Z("Merge from "),o=Z(s)},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),D(r,i),D(r,o),u=!0},p(l,a){(!u||a&8)&&s!==(s=l[3].data.git.default_branch+"")&&qe(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)),V(e,l)}}}function Hu(t){let e,n,r,i;return e=new Vt({props:{$$slots:{default:[f2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new as({}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&262148&&(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),V(e,s),V(r,s)}}}function f2(t){let e,n,r,i,s=t[2].title+"",o,u;return e=new Le({props:{path:U1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),D(r,i),D(r,o),u=!0},p(l,a){(!u||a&4)&&s!==(s=l[2].title+"")&&qe(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)),V(e,l)}}}function Vu(t){let e,n;return e=new tp({props:{onValueChange:t[14],$$slots:{default:[p2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.onValueChange=r[14]),i&262161&&(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){V(e,r)}}}function c2(t){let e,n;return e=new Le({props:{class:"w-4 h-4"}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function d2(t){let e,n;return e=new Le({props:{path:w1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function m2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[d2,c2],f=[];function c(d,m){return d[0]!==null&&d[0].id===d[15].id?0:1}return e=c(t),n=f[e]=a[e](t),{c(){n.c(),r=U(),i=S("span"),o=Z(s),u=U()},m(d,m){f[e].m(d,m),w(d,r,m),w(d,i,m),D(i,o),w(d,u,m),l=!0},p(d,m){let p=e;e=c(d),e!==p&&(ce(),y(f[p],1,1,()=>{f[p]=null}),de(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||m&16)&&s!==(s=d[15].title+"")&&qe(o,s)},i(d){l||(b(n),l=!0)},o(d){y(n),l=!1},d(d){d&&(E(r),E(i),E(u)),f[e].d(d)}}}function Bu(t){let e,n;return e=new jm({props:{value:t[15].id,$$slots:{default:[m2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.value=r[15].id),i&262161&&(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){V(e,r)}}}function p2(t){let e,n,r=nn(t[4].data),i=[];for(let o=0;o<r.length;o+=1)i[o]=Bu(Pu(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=Fe()},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&17){r=nn(o[4].data);let l;for(l=0;l<r.length;l+=1){const a=Pu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Bu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(ce(),l=r.length;l<i.length;l+=1)s(l);de()}},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,i,s,o,u,l;e=new Vt({props:{$$slots:{default:[l2]},$$scope:{ctx:t}}}),e.$on("click",t[10]);let a=t[1].isSuccess&&t[1].data.length>0&&Iu(t);i=new as({});let f=t[2]!==null&&t[3].isSuccess&&t[3].data.git.enabled&&Mu(t),c=t[4].isSuccess&&t[4].data.length>0&&Vu(t);return{c(){B(e.$$.fragment),n=U(),a&&a.c(),r=U(),B(i.$$.fragment),s=U(),f&&f.c(),o=U(),c&&c.c(),u=Fe()},m(d,m){H(e,d,m),w(d,n,m),a&&a.m(d,m),w(d,r,m),H(i,d,m),w(d,s,m),f&&f.m(d,m),w(d,o,m),c&&c.m(d,m),w(d,u,m),l=!0},p(d,m){const p={};m&262144&&(p.$$scope={dirty:m,ctx:d}),e.$set(p),d[1].isSuccess&&d[1].data.length>0?a?m&2&&b(a,1):(a=Iu(d),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(ce(),y(a,1,1,()=>{a=null}),de()),d[2]!==null&&d[3].isSuccess&&d[3].data.git.enabled?f?(f.p(d,m),m&12&&b(f,1)):(f=Mu(d),f.c(),b(f,1),f.m(o.parentNode,o)):f&&(ce(),y(f,1,1,()=>{f=null}),de()),d[4].isSuccess&&d[4].data.length>0?c?(c.p(d,m),m&16&&b(c,1)):(c=Vu(d),c.c(),b(c,1),c.m(u.parentNode,u)):c&&(ce(),y(c,1,1,()=>{c=null}),de())},i(d){l||(b(e.$$.fragment,d),b(a),b(i.$$.fragment,d),b(f),b(c),l=!0)},o(d){y(e.$$.fragment,d),y(a),y(i.$$.fragment,d),y(f),y(c),l=!1},d(d){d&&(E(n),E(r),E(s),E(o),E(u)),V(e,d),a&&a.d(d),V(i,d),f&&f.d(d),c&&c.d(d)}}}function _2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[o2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[h2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262175&&(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),V(e,s),V(r,s)}}}function g2(t){let e,n;return e=new ds({props:{$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&262175&&(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){V(e,r)}}}function b2(t,e,n){let r,i,s,o,u;const l=Ci();J(t,l,h=>n(3,o=h));const a=To();J(t,a,h=>n(4,u=h));const f=$o();J(t,f,h=>n(1,i=h));const c=wt();J(t,c,h=>n(0,r=h));const d=Be([a,c],([h,k])=>{if(h.isSuccess&&k!==null){for(const O of h.data)if(O.id===k.id)return O}return null});return J(t,d,h=>n(2,s=h)),[r,i,s,o,u,l,a,f,c,d,()=>{Ge.set(Ae.UEDITOR_NEW_BRANCH)},()=>{Ge.set(Ae.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{Ge.set(Ae.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(Ae.UEDITOR_DELETE_BRANCH)},h=>{if(u.isSuccess)for(let k of u.data)k.id===h&&c.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 Le({props:{path:V1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Rename"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function C2(t){let e,n,r,i;return e=new Le({props:{path:q1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Delete"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function E2(t){let e,n,r,i;return e=new Vt({props:{$$slots:{default:[k2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Vt({props:{$$slots:{default:[C2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function w2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[v2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[E2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function O2(t){let e,n;return e=new ds({props:{$$slots:{default:[w2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(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 Le({props:{path:N1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New Folder"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function R2(t){let e,n,r,i;return e=new Le({props:{path:R1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New File"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function F2(t){let e,n,r,i;return e=new Le({props:{path:P1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Upload Files"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function D2(t){let e,n,r,i;return e=new Le({props:{path:L1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Rename"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function P2(t){let e,n,r,i;return e=new Le({props:{path:H1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Delete"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function L2(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Vt({props:{$$slots:{default:[S2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Vt({props:{$$slots:{default:[R2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Vt({props:{$$slots:{default:[F2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new as({}),a=new Vt({props:{$$slots:{default:[D2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Vt({props:{$$slots:{default:[P2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment),i=U(),B(s.$$.fragment),o=U(),B(u.$$.fragment),l=U(),B(a.$$.fragment),f=U(),B(c.$$.fragment)},m(m,p){H(e,m,p),w(m,n,p),H(r,m,p),w(m,i,p),H(s,m,p),w(m,o,p),H(u,m,p),w(m,l,p),H(a,m,p),w(m,f,p),H(c,m,p),d=!0},p(m,p){const _={};p&256&&(_.$$scope={dirty:p,ctx:m}),e.$set(_);const v={};p&256&&(v.$$scope={dirty:p,ctx:m}),r.$set(v);const g={};p&256&&(g.$$scope={dirty:p,ctx:m}),s.$set(g);const h={};p&256&&(h.$$scope={dirty:p,ctx:m}),a.$set(h);const k={};p&256&&(k.$$scope={dirty:p,ctx:m}),c.$set(k)},i(m){d||(b(e.$$.fragment,m),b(r.$$.fragment,m),b(s.$$.fragment,m),b(u.$$.fragment,m),b(a.$$.fragment,m),b(c.$$.fragment,m),d=!0)},o(m){y(e.$$.fragment,m),y(r.$$.fragment,m),y(s.$$.fragment,m),y(u.$$.fragment,m),y(a.$$.fragment,m),y(c.$$.fragment,m),d=!1},d(m){m&&(E(n),E(i),E(o),E(l),E(f)),V(e,m),V(r,m),V(s,m),V(u,m),V(a,m),V(c,m)}}}function I2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[$2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[L2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function Uu(t){let e,n;return e=new af({}),e.$on("close",t[7]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:me,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function M2(t){let e,n,r,i;e=new ds({props:{$$slots:{default:[I2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Uu(t);return{c(){B(e.$$.fragment),n=U(),s&&s.c(),r=Fe()},m(o,u){H(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&&(ce(),y(s,1,1,()=>{s=null}),de())},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)),V(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 Ku(t){let e,n;return e=new ds({props:{$$slots:{default:[K2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(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)+"")&&qe(n,e)},d(i){i&&E(n)}}}function B2(t){let e,n,r,i;return e=new Le({props:{path:T1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Logout"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:me,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function U2(t){let e,n;return e=new Vt({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),e.$on("click",t[4]),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function K2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[U2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function j2(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&Ku(t);return{c(){r&&r.c(),e=Fe()},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=Ku(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(ce(),y(r,1,1,()=>{r=null}),de())},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=Ao();J(t,s,a=>n(1,i=a));const o=Ci();J(t,o,a=>n(0,r=a));const u=Et();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 ju(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=Fe()},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&&(ce(),y(o[f],1,1,()=>{o[f]=null}),de()),~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(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function z2(t){let e,n;return e=new T2({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function G2(t){let e,n,r,i,s,o,u;e=new y2({});let l=t[0]&&ju(t);return o=new W2({}),{c(){B(e.$$.fragment),n=U(),l&&l.c(),r=U(),i=S("span"),s=U(),B(o.$$.fragment),M(i,"class","flex-1")},m(a,f){H(e,a,f),w(a,n,f),l&&l.m(a,f),w(a,r,f),w(a,i,f),w(a,s,f),H(o,a,f),u=!0},p(a,f){a[0]?l?(l.p(a,f),f&1&&b(l,1)):(l=ju(a),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(ce(),y(l,1,1,()=>{l=null}),de())},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)),V(e,a),l&&l.d(a),V(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(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function Z2(t,e,n){let r;return J(t,ct,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 Le({props:{path:A1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:me,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(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(){B(e.$$.fragment)},m(r,i){H(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){V(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(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function t0(t,e,n){let r,i,s,o;J(t,ct,f=>n(4,r=f)),J(t,Z1,f=>n(0,i=f)),J(t,iu,f=>n(1,o=f));const u=Et(),l=wt();J(t,l,f=>n(5,s=f));function a(){r!==null&&i!==null&&d_({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=S("div"),M(e,"class","flex-1")},m(n,r){w(n,e,r)},i:me,o:me,d(n){n&&E(e)}}}function i0(t){let e;return{c(){e=S("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',M(e,"class","flex-1")},m(n,r){w(n,e,r)},i:me,o:me,d(n){n&&E(e)}}}function s0(t){let e,n,r,i,s;return n=new s2({}),i=new kb({}),{c(){e=S("div"),B(n.$$.fragment),r=U(),B(i.$$.fragment),M(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),H(n,e,null),D(e,r),H(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),V(n),V(i)}}}function qu(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+"")&&qe(n,e)},d(r){r&&E(n)}}}function o0(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v,g,h,k,O,$;document.title=e=t[0],o=new X2({}),l=new n0({});const C=[s0,i0,r0],P=[];function R(N,F){return N[1]!==null&&N[3].isSuccess?0:N[1]===null?1:2}f=R(t),c=P[f]=C[f](t);let K=t[4]&&qu(t);return h=new __({}),O=new cb({}),{c(){n=S("link"),i=U(),s=S("main"),B(o.$$.fragment),u=U(),B(l.$$.fragment),a=U(),c.c(),d=U(),m=S("footer"),p=S("div"),K&&K.c(),_=U(),v=S("div"),g=U(),B(h.$$.fragment),k=U(),B(O.$$.fragment),M(n,"rel","stylesheet"),M(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),M(p,"class","font-mono font-bold"),M(v,"class","flex-1"),M(m,"class","flex flex-row px-2 py-1 border-t border-slate-300 text-sm"),M(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(N,F){D(document.head,n),w(N,i,F),w(N,s,F),H(o,s,null),D(s,u),H(l,s,null),D(s,a),P[f].m(s,null),D(s,d),D(s,m),D(m,p),K&&K.m(p,null),D(m,_),D(m,v),D(m,g),H(h,m,null),w(N,k,F),H(O,N,F),$=!0},p(N,[F]){(!$||F&1)&&e!==(e=N[0])&&(document.title=e),(!$||F&6&&r!==(r="/api/branches/"+(N[1]!==null?N[1].id:"-")+"/configs/ui-stylesheet?timestamp="+N[2]))&&M(n,"href",r);let I=f;f=R(N),f!==I&&(ce(),y(P[I],1,1,()=>{P[I]=null}),de(),c=P[f],c||(c=P[f]=C[f](N),c.c()),b(c,1),c.m(s,d)),N[4]?K?K.p(N,F):(K=qu(N),K.c(),K.m(p,null)):K&&(K.d(1),K=null)},i(N){$||(b(o.$$.fragment,N),b(l.$$.fragment,N),b(c),b(h.$$.fragment,N),b(O.$$.fragment,N),$=!0)},o(N){y(o.$$.fragment,N),y(l.$$.fragment,N),y(c),y(h.$$.fragment,N),y(O.$$.fragment,N),$=!1},d(N){N&&(E(i),E(s),E(k)),E(n),V(o),V(l),P[f].d(),K&&K.d(),V(h),V(O,N)}}}function l0(t,e,n){let r,i,s,o,u;J(t,ct,m=>n(4,u=m));const l=at("uEditionConfig"),a=at("uEditorConfig");J(t,a,m=>n(3,o=m));const f=at("currentBranch");J(t,f,m=>n(1,i=m));const c=Be(l,m=>m.isSuccess&&m.data.languages&&m.data.languages.length>0&&m.data.languages[0].code&&m.data.title&&m.data.title[m.data.languages[0].code]?"μEditor - "+m.data.title[m.data.languages[0].code]:"μEditor");J(t,c,m=>n(0,r=m));const d=Be(l,m=>new Date().getTime());return J(t,d,m=>n(2,s=m)),[r,i,s,o,u,a,f,c,d]}class u0 extends ve{constructor(e){super(),ye(this,e,l0,o0,fe,{})}}function Fo(t,{delay:e=0,duration:n=400,easing:r=ts}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}function Wu(t){let e;const n=t[2].default,r=pe(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)&&_e(r,n,i,i[3],e?he(n,i[3],s,null):ge(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(){B(e.$$.fragment),n=U(),r=S("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
|
|
17
|
+
logs to determine what the issue is.</p>`,M(r,"data-dialog-content-area","")},m(s,o){H(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)),V(e,s)}}}function c0(t){let e,n,r,i;return e=new vi({props:{transition:Fo}}),r=new yi({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden",$$slots:{default:[f0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(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(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function m0(t){let e,n,r,i=t[0].isSuccess&&Wu(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=U(),B(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),H(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=Wu(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(ce(),y(i,1,1,()=>{i=null}),de());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),V(n,s)}}}function p0(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Tn({queryKey:[""],queryFn:en,refetchInterval:6e4});return J(t,o,u=>n(0,r=u)),bt("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(){B(e.$$.fragment),n=U(),r=S("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",M(r,"data-dialog-content-area","")},m(s,o){H(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)),V(e,s)}}}function b0(t){let e,n,r,i;return e=new vi({props:{transition:Fo,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[g0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(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(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(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=S("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>',M(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:me,d(n){n&&E(e)}}}function C0(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,_,v,g=t[4].isError&&Qu(),h=t[4].isError&&zu();function k(C,P){return C[4].isPending?w0:E0}let O=k(t),$=O(t);return{c(){e=S("form"),n=S("label"),r=S("span"),r.textContent="E-Mail",i=U(),s=S("input"),o=U(),g&&g.c(),u=U(),l=S("label"),a=S("span"),a.textContent="Password",f=U(),c=S("input"),d=U(),h&&h.c(),m=U(),p=S("div"),$.c(),M(r,"data-form-field-label",""),M(s,"type","text"),M(s,"data-form-field-text",""),M(a,"data-form-field-label",""),M(c,"type","password"),M(c,"data-form-field-text",""),M(p,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(C,P){w(C,e,P),D(e,n),D(n,r),D(n,i),D(n,s),it(s,t[0]),D(n,o),g&&g.m(n,null),D(e,u),D(e,l),D(l,a),D(l,f),D(l,c),it(c,t[1]),D(l,d),h&&h.m(l,null),D(e,m),D(e,p),$.m(p,null),_||(v=[G(s,"input",t[9]),G(c,"input",t[10]),G(e,"submit",t[11])],_=!0)},p(C,P){P&1&&s.value!==C[0]&&it(s,C[0]),C[4].isError?g||(g=Qu(),g.c(),g.m(n,null)):g&&(g.d(1),g=null),P&2&&c.value!==C[1]&&it(c,C[1]),C[4].isError?h||(h=zu(),h.c(),h.m(l,null)):h&&(h.d(1),h=null),O!==(O=k(C))&&($.d(1),$=O(C),$&&($.c(),$.m(p,null)))},d(C){C&&E(e),g&&g.d(),h&&h.d(),$.d(),_=!1,Te(v)}}}function Qu(t){let e;return{c(){e=S("span"),e.textContent="Incorred e-mail address or password",M(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function zu(t){let e;return{c(){e=S("span"),e.textContent="Incorred e-mail address or password",M(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=S("button"),e.textContent="Login",M(e,"type","submit"),M(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function w0(t){let e;return{c(){e=S("span"),e.textContent="Logging in...",M(e,"data-button",""),M(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(){B(e.$$.fragment),n=U(),u&&u.c(),r=Fe()},m(l,a){H(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)),V(e,l),u&&u.d(l)}}}function A0(t){let e,n,r,i;return e=new vi({props:{transition:Fo,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[O0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(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(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(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),V(e,s),V(r,s)}}}function $0(t){let e,n,r,i,s;const o=t[8].default,u=pe(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=U(),B(n.$$.fragment),r=U(),B(i.$$.fragment)},m(l,a){u&&u.m(l,a),w(l,e,a),H(n,l,a),w(l,r,a),H(i,l,a),s=!0},p(l,[a]){u&&u.p&&(!s||a&4096)&&_e(u,o,l,l[12],s?he(o,l[12],a,null):ge(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),V(n,l),V(i,l)}}}function S0(t,e,n){let r,i,s,{$$slots:o={},$$scope:u}=e;const l=Et(),a=Ci();J(t,a,h=>n(3,i=h));const f=Tn({queryKey:["auth","user"],queryFn:en,retry:!1,refetchInterval:2e4});bt("currentUser",f);const c=Be([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);J(t,c,h=>n(2,r=h));let d="",m="";const p=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,d=""),n(1,m="");else throw"Authentication failed"}});J(t,p,h=>n(4,s=h));function _(){d=this.value,n(0,d)}function v(){m=this.value,n(1,m)}const g=h=>{h.preventDefault(),s.isPending||s.mutate([d,m])};return t.$$set=h=>{"$$scope"in h&&n(12,u=h.$$scope)},[d,m,r,i,s,a,c,p,o,_,v,g,u]}class R0 extends ve{constructor(e){super(),ye(this,e,S0,$0,fe,{})}}function F0(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(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 D0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=uf("branch"),o=Ci(),u=Ao(),l=Be([o,u],([h,k])=>({queryKey:["branches"],queryFn:en,refetchInterval:6e4,enabled:h.isSuccess&&h.data.ready&&k.isSuccess})),a=Tn(l);bt("branches",a);const f=Be([o,u],([h,k])=>({queryKey:["branches","?category=remote"],queryFn:en,refetchInterval:6e4,enabled:h.isSuccess&&h.data.ready&&h.data.git.enabled&&k.isSuccess})),c=Tn(f);bt("remoteBranches",c);const d=De(null);bt("currentBranch",d);const m=Be([o,u],([h,k])=>({queryKey:[":internal:","branches"],queryFn:async()=>{if((await window.fetch("/api/branches",{method:"PATCH"})).ok)return!0;throw new Error("Could not fetch data")},refetchInterval:6e4,enabled:h.isSuccess&&h.data.ready&&h.data.git.enabled&&k.isSuccess})),p=Tn(m);bt("syncBranches",p);const _=o.subscribe(h=>{h.isSuccess&&h.data.ready&&!h.data.git.enabled&&d.set({id:"-",nogit:!0,title:"All files"})}),v=d.subscribe(h=>{h!==null?lf("branch",h.id):Y1("branch")}),g=a.subscribe(h=>{if(h.isSuccess){for(let k of h.data)k.id===s&&d.set(k);g()}});return rs(()=>{v(),_()}),t.$$set=h=>{"$$scope"in h&&n(0,i=h.$$scope)},[i,r]}class P0 extends ve{constructor(e){super(),ye(this,e,D0,F0,fe,{})}}function L0(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(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=wt(),o=Be(s,f=>f!==null?{queryKey:["branches",f.id,"configs","uedition"],queryFn:en}:{queryKey:["branches","-","configs","uedition"],queryFn:en,enabled:f!==null}),u=Tn(o);bt("uEditionConfig",u);const l=Be(s,f=>f!==null?{queryKey:["branches",f.id,"configs","ueditor"],queryFn:en}:{queryKey:["branches","-","configs","ueditor"],queryFn:en,enabled:!1}),a=Tn(l);return bt("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(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function H0(t){let e,n;return e=new M0({props:{$$slots:{default:[N0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function V0(t){let e,n;return e=new P0({props:{$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function B0(t){let e,n;return e=new R0({props:{$$slots:{default:[V0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function U0(t){let e,n;return e=new h0({props:{$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function K0(t){let e,n;return e=new lc({props:{client:t[0],$$slots:{default:[U0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(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){V(e,r)}}}function j0(t){return[new Ca]}class q0 extends ve{constructor(e){super(),ye(this,e,j0,K0,fe,{})}}new q0({target:document.getElementById("app")});export{Be as $,L1 as A,H1 as B,Ge as C,Ae as D,Ce as E,Fe as F,me as G,Rf as H,Le as I,Z1 as J,Et as K,wt as L,d_ as M,iu as N,Ut as O,Bt as P,Jb as Q,x as R,ve as S,x0 as T,mi as U,ty as V,Pe as W,ke as X,Xe as Y,De as Z,fr as _,R1 as a,Cm as a$,Pt as a0,Rr as a1,Xn as a2,xr as a3,Rc as a4,Qi as a5,ar as a6,fc as a7,iy as a8,Gr as a9,ze as aA,J0 as aB,gt as aC,ry as aD,sy as aE,ii as aF,hi as aG,bt as aH,_i as aI,at as aJ,tf as aK,pe as aL,_e as aM,ge as aN,he as aO,je as aP,Ln as aQ,ne as aR,vt as aS,Oe as aT,ie as aU,Ue as aV,Ne as aW,Pn as aX,ft as aY,Dn as aZ,$n as a_,rt as aa,ae as ab,ny as ac,Wt as ad,uc as ae,Ys as af,ln as ag,G0 as ah,Y0 as ai,X0 as aj,Z0 as ak,ni as al,Dt 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,pt as av,Gs as aw,gn as ax,_o as ay,ey as az,P1 as b,nn as b0,fi as b1,ay as b2,uy as b3,Mb as b4,h1 as b5,C1 as b6,cy as b7,fy as b8,dy as b9,ly as ba,Nb as bb,my as bc,Io as bd,V1 as be,it as bf,si as bg,ki as bh,bi,vi as bj,yi as bk,Tt as bl,It as bm,Q0 as bn,U as c,B as d,S as e,M as f,w as g,D as h,ye as i,H as j,qe as k,G as l,N1 as m,b as n,ce as o,y as p,de as q,E as r,fe as s,Z as t,V as u,Te as v,J as w,ct as x,ns as y,rs as z};
|