uEdition-Editor 2.0.0b12__py3-none-any.whl → 2.0.0b13__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/frontend/dist/assets/{CodeMirrorEditor-BZHvgu2x.js → CodeMirrorEditor-D1fDPU-Q.js} +1 -1
- uedition_editor/frontend/dist/assets/{FolderEditor-CcG0Qmsw.js → FolderEditor-BXgX8nlH.js} +1 -1
- uedition_editor/frontend/dist/assets/{ImageEditor-DjhHDons.js → ImageEditor-GOZ2PdzP.js} +1 -1
- uedition_editor/frontend/dist/assets/PdfEditor-ll-wimrs.js +1 -0
- uedition_editor/frontend/dist/assets/{TeiEditor-BzZjSfy6.js → TeiEditor-CmDNnibB.js} +1 -1
- uedition_editor/frontend/dist/assets/index-BGKRQ1x3.js +20 -0
- uedition_editor/frontend/dist/index.html +1 -1
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b13.dist-info}/METADATA +1 -1
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b13.dist-info}/RECORD +13 -12
- uedition_editor/frontend/dist/assets/index-Cavrgnlw.js +0 -20
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b13.dist-info}/WHEEL +0 -0
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b13.dist-info}/entry_points.txt +0 -0
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b13.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-D1fDPU-Q.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-CmDNnibB.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Hf=Object.defineProperty;var Ko=t=>{throw TypeError(t)};var Bf=(t,e,n)=>e in t?Hf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var As=(t,e,n)=>Bf(t,typeof e!="symbol"?e+"":e,n),Ts=(t,e,n)=>e.has(t)||Ko("Cannot "+n);var R=(t,e,n)=>(Ts(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?Ko("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),se=(t,e,n,r)=>(Ts(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Se=(t,e,n)=>(Ts(t,e,"access private method"),n);var Ii=(t,e,n,r)=>({set _(i){se(t,e,i,n)},get _(){return R(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 cs=t=>t;function ie(t,e){for(const n in e)t[n]=e[n];return t}function ka(t){return t()}function qo(){return Object.create(null)}function Te(t){t.forEach(ka)}function Xn(t){return typeof t=="function"}function de(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Mi;function G0(t,e){return t===e?!0:(Mi||(Mi=document.createElement("a")),Mi.href=e,t===Mi.href)}function Uf(t){return Object.keys(t).length===0}function bo(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 Lr(t){let e;return bo(t,n=>e=n)(),e}function X(t,e,n){t.$$.on_destroy.push(bo(e,n))}function pe(t,e,n,r){if(t){const i=Ca(t,e,n,r);return t[0](i)}}function Ca(t,e,n,r){return t[1]&&r?ie(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=Ca(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 Et(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function qe(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 je(t){return t&&Xn(t.destroy)?t.destroy:me}const Ea=typeof window<"u";let yo=Ea?()=>window.performance.now():()=>Date.now(),vo=Ea?t=>requestAnimationFrame(t):me;const cr=new Set;function wa(t){cr.forEach(e=>{e.c(t)||(cr.delete(e),e.f())}),cr.size!==0&&vo(wa)}function ko(t){let e;return cr.size===0&&vo(wa),{promise:new Promise(n=>{cr.add(e={c:t,f:n})}),abort(){cr.delete(e)}}}function P(t,e){t.appendChild(e)}function $a(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function jf(t){const e=D("style");return e.textContent="/* empty */",Kf($a(t),e),e.sheet}function Kf(t,e){return P(t.head||t,e),e.sheet}function C(t,e,n){t.insertBefore(e,n||null)}function k(t){t.parentNode&&t.parentNode.removeChild(t)}function Ir(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function Ks(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t){return document.createTextNode(t)}function B(){return Y(" ")}function Oe(){return Y("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function F(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const qf=["width","height"];function le(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&&qf.indexOf(r)===-1?t[r]=e[r]:F(t,r,e[r])}function Wf(t,e){Object.keys(e).forEach(n=>{Qf(t,n,e[n])})}function Qf(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:F(t,e,n)}function Gi(t){return/-/.test(t)?Wf:le}function zf(t){return Array.from(t.childNodes)}function Ne(t,e){e=""+e,t.data!==e&&(t.data=e)}function it(t,e){t.value=e??""}function Wo(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 Gf(t){const e=t.querySelector(":checked");return e&&e.__value}function Oa(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Qo(t,e){return new t(e)}const Yi=new Map;let Zi=0;function Yf(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Zf(t,e){const n={stylesheet:jf(e),rules:{}};return Yi.set(t,n),n}function Xi(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_${Yf(f)}_${u}`,d=$a(t),{stylesheet:m,rules:p}=Yi.get(d)||Zf(d,t);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Zi+=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(", "),Zi-=i,Zi||Xf())}function Xf(){vo(()=>{Zi||(Yi.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&k(e)}),Yi.clear())})}let ui;function si(t){ui=t}function ki(){if(!ui)throw new Error("Function called outside component initialization");return ui}function ds(t){ki().$$.on_mount.push(t)}function ms(t){ki().$$.on_destroy.push(t)}function Jf(){const t=ki();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=Oa(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function ct(t,e){return ki().$$.context.set(t,e),e}function st(t){return ki().$$.context.get(t)}function Ae(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const fr=[],ke=[];let dr=[];const qs=[],Aa=Promise.resolve();let Ws=!1;function Ta(){Ws||(Ws=!0,Aa.then(Da))}function jt(){return Ta(),Aa}function dt(t){dr.push(t)}function Nt(t){qs.push(t)}const Ds=new Set;let sr=0;function Da(){if(sr!==0)return;const t=ui;do{try{for(;sr<fr.length;){const e=fr[sr];sr++,si(e),xf(e.$$)}}catch(e){throw fr.length=0,sr=0,e}for(si(null),fr.length=0,sr=0;ke.length;)ke.pop()();for(let e=0;e<dr.length;e+=1){const n=dr[e];Ds.has(n)||(Ds.add(n),n())}dr.length=0}while(fr.length);for(;qs.length;)qs.pop()();Ws=!1,Ds.clear(),si(t)}function xf(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(dt)}}function ec(t){const e=[],n=[];dr.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),dr=e}let Gr;function Co(){return Gr||(Gr=Promise.resolve(),Gr.then(()=>{Gr=null})),Gr}function Wn(t,e,n){t.dispatchEvent(Oa(`${e?"intro":"outro"}${n}`))}const Wi=new Set;let en;function fe(){en={r:0,c:[],p:en}}function ce(){en.r||Te(en.c),en=en.p}function b(t,e){t&&t.i&&(Wi.delete(t),t.i(e))}function y(t,e,n,r){if(t&&t.o){if(Wi.has(t))return;Wi.add(t),en.c.push(()=>{Wi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const Eo={duration:0};function Rn(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=cs,tick:h=me,css:v}=i||Eo;v&&(o=Xi(t,0,1,m,d,p,v,l++)),h(0,1);const g=yo()+d,_=g+m;u&&u.abort(),s=!0,dt(()=>Wn(t,!0,"start")),u=ko(w=>{if(s){if(w>=_)return h(1,0),Wn(t,!0,"end"),a(),s=!1;if(w>=g){const A=p((w-g)/m);h(A,1-A)}}return s})}let c=!1;return{start(){c||(c=!0,Ji(t),Xn(i)?(i=i(r),Co().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=en;u.r+=1;let l;function a(){const{delay:f=0,duration:c=300,easing:d=cs,tick:m=me,css:p}=i||Eo;p&&(o=Xi(t,1,0,c,f,d,p));const h=yo()+f,v=h+c;dt(()=>Wn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ko(g=>{if(s){if(g>=v)return m(0,1),Wn(t,!1,"end"),--u.r||Te(u.c),!1;if(g>=h){const _=d((g-h)/c);m(1-_,_)}}return s})}return Xn(i)?Co().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 An(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,h){const v=p.b-o;return h*=Math.abs(v),{a:o,b:p.b,d:v,duration:h,start:p.start,end:p.start+h,group:p.group}}function m(p){const{delay:h=0,duration:v=300,easing:g=cs,tick:_=me,css:w}=s||Eo,A={start:yo()+h,b:p};p||(A.group=en,en.r+=1),"inert"in t&&(p?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=A:(w&&(c(),a=Xi(t,o,p,v,h,g,w)),p&&_(0,1),u=d(A,v),dt(()=>Wn(t,p,"start")),ko(T=>{if(l&&T>l.start&&(u=d(l,v),l=null,Wn(t,u.b,"start"),w&&(c(),a=Xi(t,o,u.b,u.duration,0,g,s.css))),u){if(T>=u.end)_(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(T>=u.start){const E=T-u.start;o=u.a+u.d*g(E/u.duration),_(o,1-o)}}return!!(u||l)}))}return{run(p){Xn(s)?Co().then(()=>{s=s({direction:p?"in":"out"}),m(p)}):m(p)},end(){c(),u=l=null}}}function Kt(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Ve(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 Vt(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function M(t){t&&t.c()}function L(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),dt(()=>{const s=t.$$.on_mount.map(ka).filter(Xn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(dt)}function I(t,e){const n=t.$$;n.fragment!==null&&(ec(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function tc(t,e){t.$$.dirty[0]===-1&&(fr.push(t),Ta(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function be(t,e,n,r,i,s,o=null,u=[-1]){const l=ui;si(t);const a=t.$$={fragment:null,ctx:[],props:s,update:me,not_equal:i,bound:qo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:qo(),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&&tc(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=zf(e.target);a.fragment&&a.fragment.l(c),c.forEach(k)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),L(t,e.target,e.anchor),Da()}si(l)}class ye{constructor(){As(this,"$$");As(this,"$$set")}$destroy(){I(this,1),this.$destroy=me}$on(e,n){if(!Xn(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&&!Uf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const nc="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(nc);var Mr=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(){}},Sr=typeof window>"u"||"Deno"in globalThis;function Ut(){}function rc(t,e){return typeof t=="function"?t(e):t}function Qs(t){return typeof t=="number"&&t>=0&&t!==1/0}function Sa(t,e){return Math.max(t+(e||0)-Date.now(),0)}function mr(t,e){return typeof t=="function"?t(e):t}function zt(t,e){return typeof t=="function"?t(e):t}function zo(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==wo(o,e.options))return!1}else if(!ai(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 Go(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(zn(e.options.mutationKey)!==zn(s))return!1}else if(!ai(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function wo(t,e){return((e==null?void 0:e.queryKeyHashFn)||zn)(t)}function zn(t){return JSON.stringify(t,(e,n)=>zs(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ai(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!ai(t[n],e[n])):!1}function Ra(t,e){if(t===e)return t;const n=Yo(t)&&Yo(e);if(n||zs(t)&&zs(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]=Ra(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function xi(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 Yo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zs(t){if(!Zo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Zo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Zo(t){return Object.prototype.toString.call(t)==="[object Object]"}function ic(t){return new Promise(e=>{setTimeout(e,t)})}function Gs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Ra(t,e):e}function sc(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function oc(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var $o=Symbol();function Pa(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===$o?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Vn,bn,gr,ca,lc=(ca=class extends Mr{constructor(){super();ve(this,Vn);ve(this,bn);ve(this,gr);se(this,gr,e=>{if(!Sr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,bn)||this.setEventListener(R(this,gr))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,bn))==null||e.call(this),se(this,bn,void 0))}setEventListener(e){var n;se(this,gr,e),(n=R(this,bn))==null||n.call(this),se(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){R(this,Vn)!==e&&(se(this,Vn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof R(this,Vn)=="boolean"?R(this,Vn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Vn=new WeakMap,bn=new WeakMap,gr=new WeakMap,ca),Oo=new lc,br,yn,yr,da,uc=(da=class extends Mr{constructor(){super();ve(this,br,!0);ve(this,yn);ve(this,yr);se(this,yr,e=>{if(!Sr&&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(){R(this,yn)||this.setEventListener(R(this,yr))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,yn))==null||e.call(this),se(this,yn,void 0))}setEventListener(e){var n;se(this,yr,e),(n=R(this,yn))==null||n.call(this),se(this,yn,e(this.setOnline.bind(this)))}setOnline(e){R(this,br)!==e&&(se(this,br,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return R(this,br)}},br=new WeakMap,yn=new WeakMap,yr=new WeakMap,da),es=new uc;function Ys(){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 ac(t){return Math.min(1e3*2**t,3e4)}function Fa(t){return(t??"online")==="online"?es.isOnline():!0}var La=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ss(t){return t instanceof La}function Ia(t){let e=!1,n=0,r=!1,i;const s=Ys(),o=h=>{var v;r||(d(new La(h)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>Oo.isFocused()&&(t.networkMode==="always"||es.isOnline())&&t.canRun(),f=()=>Fa(t.networkMode)&&t.canRun(),c=h=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,h),i==null||i(),s.resolve(h))},d=h=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,h),i==null||i(),s.reject(h))},m=()=>new Promise(h=>{var v;i=g=>{(r||a())&&h(g)},(v=t.onPause)==null||v.call(t)}).then(()=>{var h;i=void 0,r||(h=t.onContinue)==null||h.call(t)}),p=()=>{if(r)return;let h;const v=n===0?t.initialPromise:void 0;try{h=v??t.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(c).catch(g=>{var E;if(r)return;const _=t.retry??(Sr?0:3),w=t.retryDelay??ac,A=typeof w=="function"?w(n,g):w,T=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,g);if(e||!T){d(g);return}n++,(E=t.onFail)==null||E.call(t,n,g),ic(A).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 fc(){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 ft=fc(),Hn,ma,Ma=(ma=class{constructor(){ve(this,Hn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qs(this.gcTime)&&se(this,Hn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Sr?1/0:5*60*1e3))}clearGcTimeout(){R(this,Hn)&&(clearTimeout(R(this,Hn)),se(this,Hn,void 0))}},Hn=new WeakMap,ma),vr,kr,Bt,$t,gi,Bn,Wt,sn,pa,cc=(pa=class extends Ma{constructor(e){super();ve(this,Wt);ve(this,vr);ve(this,kr);ve(this,Bt);ve(this,$t);ve(this,gi);ve(this,Bn);se(this,Bn,!1),se(this,gi,e.defaultOptions),this.setOptions(e.options),this.observers=[],se(this,Bt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,se(this,vr,dc(this.options)),this.state=e.state??R(this,vr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,$t))==null?void 0:e.promise}setOptions(e){this.options={...R(this,gi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Bt).remove(this)}setData(e,n){const r=Gs(this.state.data,e,this.options);return Se(this,Wt,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Se(this,Wt,sn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=R(this,$t))==null?void 0:r.promise;return(i=R(this,$t))==null||i.cancel(e),n?n.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,vr))}isActive(){return this.observers.some(e=>zt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$o||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||!Sa(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,$t))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,$t))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,Bt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(R(this,$t)&&(R(this,Bn)?R(this,$t).cancel({revert:!0}):R(this,$t).cancelRetry()),this.scheduleGc()),R(this,Bt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Wt,sn).call(this,{type:"invalidate"})}fetch(e,n){var l,a,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,$t))return R(this,$t).continueRetry(),R(this,$t).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:()=>(se(this,Bn,!0),r.signal)})},s=()=>{const c=Pa(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),se(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),se(this,kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&Se(this,Wt,sn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,m,p,h;Ss(c)&&c.silent||Se(this,Wt,sn).call(this,{type:"error",error:c}),Ss(c)||((m=(d=R(this,Bt).config).onError)==null||m.call(d,c,this),(h=(p=R(this,Bt).config).onSettled)==null||h.call(p,this.state.data,c,this)),this.scheduleGc()};return se(this,$t,Ia({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,m,p,h;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(m=(d=R(this,Bt).config).onSuccess)==null||m.call(d,c,this),(h=(p=R(this,Bt).config).onSettled)==null||h.call(p,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{Se(this,Wt,sn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{Se(this,Wt,sn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Wt,sn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),R(this,$t).start()}},vr=new WeakMap,kr=new WeakMap,Bt=new WeakMap,$t=new WeakMap,gi=new WeakMap,Bn=new WeakMap,Wt=new WeakSet,sn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Na(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 Ss(i)&&i.revert&&R(this,kr)?{...R(this,kr),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),ft.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,Bt).notify({query:this,type:"updated",action:e})})},pa);function Na(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fa(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function dc(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 Zt,ha,mc=(ha=class extends Mr{constructor(e={}){super();ve(this,Zt);this.config=e,se(this,Zt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??wo(i,n);let o=this.get(s);return o||(o=new cc({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){R(this,Zt).has(e.queryHash)||(R(this,Zt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=R(this,Zt).get(e.queryHash);n&&(e.destroy(),n===e&&R(this,Zt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ft.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,Zt).get(e)}getAll(){return[...R(this,Zt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>zo(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>zo(e,r)):n}notify(e){ft.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ft.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ft.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zt=new WeakMap,ha),Xt,At,Un,Jt,_n,_a,pc=(_a=class extends Ma{constructor(e){super();ve(this,Jt);ve(this,Xt);ve(this,At);ve(this,Un);this.mutationId=e.mutationId,se(this,At,e.mutationCache),se(this,Xt,[]),this.state=e.state||Va(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,Xt).includes(e)||(R(this,Xt).push(e),this.clearGcTimeout(),R(this,At).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){se(this,Xt,R(this,Xt).filter(n=>n!==e)),this.scheduleGc(),R(this,At).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():R(this,At).remove(this))}continue(){var e;return((e=R(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,h,v,g,_,w,A,T,E,V;se(this,Un,Ia({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,W)=>{Se(this,Jt,_n).call(this,{type:"failed",failureCount:O,error:W})},onPause:()=>{Se(this,Jt,_n).call(this,{type:"pause"})},onContinue:()=>{Se(this,Jt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,At).canRun(this)}));const n=this.state.status==="pending",r=!R(this,Un).canStart();try{if(!n){Se(this,Jt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=R(this,At).config).onMutate)==null?void 0:s.call(i,e,this));const W=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));W!==this.state.context&&Se(this,Jt,_n).call(this,{type:"pending",context:W,variables:e,isPaused:r})}const O=await R(this,Un).start();return await((a=(l=R(this,At).config).onSuccess)==null?void 0:a.call(l,O,e,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,O,e,this.state.context)),await((m=(d=R(this,At).config).onSettled)==null?void 0:m.call(d,O,null,this.state.variables,this.state.context,this)),await((h=(p=this.options).onSettled)==null?void 0:h.call(p,O,null,e,this.state.context)),Se(this,Jt,_n).call(this,{type:"success",data:O}),O}catch(O){try{throw await((g=(v=R(this,At).config).onError)==null?void 0:g.call(v,O,e,this.state.context,this)),await((w=(_=this.options).onError)==null?void 0:w.call(_,O,e,this.state.context)),await((T=(A=R(this,At).config).onSettled)==null?void 0:T.call(A,void 0,O,this.state.variables,this.state.context,this)),await((V=(E=this.options).onSettled)==null?void 0:V.call(E,void 0,O,e,this.state.context)),O}finally{Se(this,Jt,_n).call(this,{type:"error",error:O})}}finally{R(this,At).runNext(this)}}},Xt=new WeakMap,At=new WeakMap,Un=new WeakMap,Jt=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),ft.batch(()=>{R(this,Xt).forEach(r=>{r.onMutationUpdate(e)}),R(this,At).notify({mutation:this,type:"updated",action:e})})},_a);function Va(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,Qt,bi,ga,hc=(ga=class extends Mr{constructor(e={}){super();ve(this,un);ve(this,Qt);ve(this,bi);this.config=e,se(this,un,new Set),se(this,Qt,new Map),se(this,bi,0)}build(e,n,r){const i=new pc({mutationCache:this,mutationId:++Ii(this,bi)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){R(this,un).add(e);const n=Ni(e);if(typeof n=="string"){const r=R(this,Qt).get(n);r?r.push(e):R(this,Qt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,un).delete(e)){const n=Ni(e);if(typeof n=="string"){const r=R(this,Qt).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&R(this,Qt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ni(e);if(typeof n=="string"){const r=R(this,Qt).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=Ni(e);if(typeof n=="string"){const i=(r=R(this,Qt).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(){ft.batch(()=>{R(this,un).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,un).clear(),R(this,Qt).clear()})}getAll(){return Array.from(R(this,un))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Go(n,r))}findAll(e={}){return this.getAll().filter(n=>Go(e,n))}notify(e){ft.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ft.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ut))))}},un=new WeakMap,Qt=new WeakMap,bi=new WeakMap,ga);function Ni(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Xo(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 h=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},g=Pa(e.options,e.fetchOptions),_=async(w,A,T)=>{if(h)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const E={queryKey:e.queryKey,pageParam:A,direction:T?"backward":"forward",meta:e.options.meta};v(E);const V=await g(E),{maxPages:O}=e.options,W=T?oc:sc;return{pages:W(w.pages,V,O),pageParams:W(w.pageParams,A,O)}};if(i&&s.length){const w=i==="backward",A=w?_c:Jo,T={pages:s,pageParams:o},E=A(r,T);u=await _(T,E,w)}else{const w=t??s.length;do{const A=l===0?o[0]??r.initialPageParam:Jo(r,u);if(l>0&&A==null)break;u=await _(u,A),l++}while(l<w)}return u};e.options.persister?e.fetchFn=()=>{var h,v;return(v=(h=e.options).persister)==null?void 0:v.call(h,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Jo(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 _c(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,Cr,Er,Cn,wr,$r,ba,Ha=(ba=class{constructor(t={}){ve(this,nt);ve(this,vn);ve(this,kn);ve(this,Cr);ve(this,Er);ve(this,Cn);ve(this,wr);ve(this,$r);se(this,nt,t.queryCache||new mc),se(this,vn,t.mutationCache||new hc),se(this,kn,t.defaultOptions||{}),se(this,Cr,new Map),se(this,Er,new Map),se(this,Cn,0)}mount(){Ii(this,Cn)._++,R(this,Cn)===1&&(se(this,wr,Oo.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,nt).onFocus())})),se(this,$r,es.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,nt).onOnline())})))}unmount(){var t,e;Ii(this,Cn)._--,R(this,Cn)===0&&((t=R(this,wr))==null||t.call(this),se(this,wr,void 0),(e=R(this,$r))==null||e.call(this),se(this,$r,void 0))}isFetching(t){return R(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=R(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=R(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(mr(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return R(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=R(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=rc(e,s);if(o!==void 0)return R(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return ft.batch(()=>R(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=R(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=R(this,nt);ft.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=R(this,nt),r={type:"active",...t};return ft.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ft.batch(()=>R(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ut).catch(Ut)}invalidateQueries(t,e={}){return ft.batch(()=>{if(R(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=ft.batch(()=>R(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ut)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ut)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=R(this,nt).build(this,e);return n.isStaleByTime(mr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ut).catch(Ut)}fetchInfiniteQuery(t){return t.behavior=Xo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ut).catch(Ut)}ensureInfiniteQueryData(t){return t.behavior=Xo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return es.isOnline()?R(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,nt)}getMutationCache(){return R(this,vn)}getDefaultOptions(){return R(this,kn)}setDefaultOptions(t){se(this,kn,t)}setQueryDefaults(t,e){R(this,Cr).set(zn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,Cr).values()],n={};return e.forEach(r=>{ai(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){R(this,Er).set(zn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,Er).values()];let n={};return e.forEach(r=>{ai(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=wo(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===$o&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,nt).clear(),R(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Cn=new WeakMap,wr=new WeakMap,$r=new WeakMap,ba),St,Be,yi,Tt,jn,Or,En,xt,vi,Ar,Tr,Kn,qn,wn,Dr,Ye,ni,Zs,Xs,Js,xs,eo,to,no,Ba,ya,gc=(ya=class extends Mr{constructor(e,n){super();ve(this,Ye);ve(this,St);ve(this,Be);ve(this,yi);ve(this,Tt);ve(this,jn);ve(this,Or);ve(this,En);ve(this,xt);ve(this,vi);ve(this,Ar);ve(this,Tr);ve(this,Kn);ve(this,qn);ve(this,wn);ve(this,Dr,new Set);this.options=n,se(this,St,e),se(this,xt,null),se(this,En,Ys()),this.options.experimental_prefetchInRender||R(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&&(R(this,Be).addObserver(this),xo(R(this,Be),this.options)?Se(this,Ye,ni).call(this):this.updateResult(),Se(this,Ye,xs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ro(R(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ro(R(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ye,eo).call(this),Se(this,Ye,to).call(this),R(this,Be).removeObserver(this)}setOptions(e,n){const r=this.options,i=R(this,Be);if(this.options=R(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zt(this.options.enabled,R(this,Be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ye,no).call(this),R(this,Be).setOptions(this.options),r._defaulted&&!xi(this.options,r)&&R(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Be),observer:this});const s=this.hasListeners();s&&el(R(this,Be),i,this.options,r)&&Se(this,Ye,ni).call(this),this.updateResult(n),s&&(R(this,Be)!==i||zt(this.options.enabled,R(this,Be))!==zt(r.enabled,R(this,Be))||mr(this.options.staleTime,R(this,Be))!==mr(r.staleTime,R(this,Be)))&&Se(this,Ye,Zs).call(this);const o=Se(this,Ye,Xs).call(this);s&&(R(this,Be)!==i||zt(this.options.enabled,R(this,Be))!==zt(r.enabled,R(this,Be))||o!==R(this,wn))&&Se(this,Ye,Js).call(this,o)}getOptimisticResult(e){const n=R(this,St).getQueryCache().build(R(this,St),e),r=this.createResult(n,e);return yc(this,r)&&(se(this,Tt,r),se(this,Or,this.options),se(this,jn,R(this,Be).state)),r}getCurrentResult(){return R(this,Tt)}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){R(this,Dr).add(e)}getCurrentQuery(){return R(this,Be)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=R(this,St).defaultQueryOptions(e),r=R(this,St).getQueryCache().build(R(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Se(this,Ye,ni).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Tt)))}createResult(e,n){var O;const r=R(this,Be),i=this.options,s=R(this,Tt),o=R(this,jn),u=R(this,Or),a=e!==r?e.state:R(this,yi),{state:f}=e;let c={...f},d=!1,m;if(n._optimisticResults){const W=this.hasListeners(),U=!W&&xo(e,n),S=W&&el(e,r,n,i);(U||S)&&(c={...c,...Na(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:h,status:v}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===R(this,vi))m=R(this,Ar);else try{se(this,vi,n.select),m=n.select(c.data),m=Gs(s==null?void 0:s.data,m,n),se(this,Ar,m),se(this,xt,null)}catch(W){se(this,xt,W)}else m=c.data;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let W;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))W=s.data;else if(W=typeof n.placeholderData=="function"?n.placeholderData((O=R(this,Tr))==null?void 0:O.state.data,R(this,Tr)):n.placeholderData,n.select&&W!==void 0)try{W=n.select(W),se(this,xt,null)}catch(U){se(this,xt,U)}W!==void 0&&(v="success",m=Gs(s==null?void 0:s.data,W,n),d=!0)}R(this,xt)&&(p=R(this,xt),m=R(this,Ar),h=Date.now(),v="error");const g=c.fetchStatus==="fetching",_=v==="pending",w=v==="error",A=_&&g,T=m!==void 0,V={status:v,fetchStatus:c.fetchStatus,isPending:_,isSuccess:v==="success",isError:w,isInitialLoading:A,isLoading:A,data:m,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:h,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&&!_,isLoadingError:w&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&T,isStale:Ao(e,n),refetch:this.refetch,promise:R(this,En)};if(this.options.experimental_prefetchInRender){const W=K=>{V.status==="error"?K.reject(V.error):V.data!==void 0&&K.resolve(V.data)},U=()=>{const K=se(this,En,V.promise=Ys());W(K)},S=R(this,En);switch(S.status){case"pending":e.queryHash===r.queryHash&&W(S);break;case"fulfilled":(V.status==="error"||V.data!==S.value)&&U();break;case"rejected":(V.status!=="error"||V.error!==S.reason)&&U();break}}return V}updateResult(e){const n=R(this,Tt),r=this.createResult(R(this,Be),this.options);if(se(this,jn,R(this,Be).state),se(this,Or,this.options),R(this,jn).data!==void 0&&se(this,Tr,R(this,Be)),xi(r,n))return;se(this,Tt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!R(this,Dr).size)return!0;const l=new Set(u??R(this,Dr));return this.options.throwOnError&&l.add("error"),Object.keys(R(this,Tt)).some(a=>{const f=a;return R(this,Tt)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Se(this,Ye,Ba).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ye,xs).call(this)}},St=new WeakMap,Be=new WeakMap,yi=new WeakMap,Tt=new WeakMap,jn=new WeakMap,Or=new WeakMap,En=new WeakMap,xt=new WeakMap,vi=new WeakMap,Ar=new WeakMap,Tr=new WeakMap,Kn=new WeakMap,qn=new WeakMap,wn=new WeakMap,Dr=new WeakMap,Ye=new WeakSet,ni=function(e){Se(this,Ye,no).call(this);let n=R(this,Be).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ut)),n},Zs=function(){Se(this,Ye,eo).call(this);const e=mr(this.options.staleTime,R(this,Be));if(Sr||R(this,Tt).isStale||!Qs(e))return;const r=Sa(R(this,Tt).dataUpdatedAt,e)+1;se(this,Kn,setTimeout(()=>{R(this,Tt).isStale||this.updateResult()},r))},Xs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Be)):this.options.refetchInterval)??!1},Js=function(e){Se(this,Ye,to).call(this),se(this,wn,e),!(Sr||zt(this.options.enabled,R(this,Be))===!1||!Qs(R(this,wn))||R(this,wn)===0)&&se(this,qn,setInterval(()=>{(this.options.refetchIntervalInBackground||Oo.isFocused())&&Se(this,Ye,ni).call(this)},R(this,wn)))},xs=function(){Se(this,Ye,Zs).call(this),Se(this,Ye,Js).call(this,Se(this,Ye,Xs).call(this))},eo=function(){R(this,Kn)&&(clearTimeout(R(this,Kn)),se(this,Kn,void 0))},to=function(){R(this,qn)&&(clearInterval(R(this,qn)),se(this,qn,void 0))},no=function(){const e=R(this,St).getQueryCache().build(R(this,St),this.options);if(e===R(this,Be))return;const n=R(this,Be);se(this,Be,e),se(this,yi,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ba=function(e){ft.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(R(this,Tt))}),R(this,St).getQueryCache().notify({query:R(this,Be),type:"observerResultsUpdated"})})},ya);function bc(t,e){return zt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function xo(t,e){return bc(t,e)||t.state.data!==void 0&&ro(t,e,e.refetchOnMount)}function ro(t,e,n){if(zt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Ao(t,e)}return!1}function el(t,e,n,r){return(t!==e||zt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Ao(t,n)}function Ao(t,e){return zt(e.enabled,t)!==!1&&t.isStaleByTime(mr(e.staleTime,t))}function yc(t,e){return!xi(t.getCurrentResult(),e)}var $n,On,Rt,an,dn,Qi,io,va,vc=(va=class extends Mr{constructor(n,r){super();ve(this,dn);ve(this,$n);ve(this,On);ve(this,Rt);ve(this,an);se(this,$n,n),this.setOptions(r),this.bindMethods(),Se(this,dn,Qi).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=R(this,$n).defaultMutationOptions(n),xi(this.options,r)||R(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&zn(r.mutationKey)!==zn(this.options.mutationKey)?this.reset():((i=R(this,Rt))==null?void 0:i.state.status)==="pending"&&R(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=R(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){Se(this,dn,Qi).call(this),Se(this,dn,io).call(this,n)}getCurrentResult(){return R(this,On)}reset(){var n;(n=R(this,Rt))==null||n.removeObserver(this),se(this,Rt,void 0),Se(this,dn,Qi).call(this),Se(this,dn,io).call(this)}mutate(n,r){var i;return se(this,an,r),(i=R(this,Rt))==null||i.removeObserver(this),se(this,Rt,R(this,$n).getMutationCache().build(R(this,$n),this.options)),R(this,Rt).addObserver(this),R(this,Rt).execute(n)}},$n=new WeakMap,On=new WeakMap,Rt=new WeakMap,an=new WeakMap,dn=new WeakSet,Qi=function(){var r;const n=((r=R(this,Rt))==null?void 0:r.state)??Va();se(this,On,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},io=function(n){ft.batch(()=>{var r,i,s,o,u,l,a,f;if(R(this,an)&&this.hasListeners()){const c=R(this,On).variables,d=R(this,On).context;(n==null?void 0:n.type)==="success"?((i=(r=R(this,an)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=R(this,an)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=R(this,an)).onError)==null||l.call(u,n.error,c,d),(f=(a=R(this,an)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(R(this,On))})})},va);const or=[];function Ct(t,e){return{subscribe:Fe(t,e).subscribe}}function Fe(t,e=me){let n;const r=new Set;function i(u){if(de(t,u)&&(t=u,n)){const l=!or.length;for(const a of r)a[1](),or.push(a,t);if(l){for(let a=0;a<or.length;a+=2)or[a][0](or[a+1]);or.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 Ue(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 Ct(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=Xn(p)?p:me},m=i.map((p,h)=>bo(p,v=>{a[h]=v,f&=~(1<<h),l&&d()},()=>{f|=1<<h}));return l=!0,d(),function(){Te(m),c(),l=!1}})}function tl(t){return{subscribe:t.subscribe.bind(t)}}const Ua="$$_queryClient",kc=()=>{const t=st(Ua);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},Cc=t=>{ct(Ua,t)},Ec="$$_isRestoring",wc=()=>{try{const t=st(Ec);return t||Ct(!1)}catch{return Ct(!1)}};function $c(){return wc()}function _t(t){return kc()}function ja(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Ka(){}function Oc(t,e,n){const r=_t(),i=$c(),s=ja(t)?t:Ct(t),o=Ue([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,Lr(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=Ue(i,(f,c)=>{const d=f?Ka:u.subscribe(ft.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=Ue([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Rr(t,e){return Oc(t,gc)}function Ci(t,e){const n=_t(),r=ja(t)?t:Ct(t),i=new vc(n,Lr(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Ka)},i.setOptions(l)});const o=Ct(i.getCurrentResult(),l=>i.subscribe(ft.batchCalls(a=>l(a)))),{subscribe:u}=Ue(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function Ac(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 Tc(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new Ha}=e;return ds(()=>{s.mount()}),Cc(s),ms(()=>{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 Dc extends ye{constructor(e){super(),be(this,e,Tc,Ac,de,{client:0})}}var nl=Object.prototype.hasOwnProperty;function rl(t,e,n){for(n of t.keys())if(pr(n,e))return n}function pr(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--&&pr(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=rl(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=rl(e,i),!i)||!pr(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(nl.call(t,n)&&++r&&!nl.call(e,n)||!(n in e)||!pr(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function Z0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function X0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function J0(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 Sc(t){return t[t.length-1]}function Rc(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function ev(t,e,n=pr){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Lt(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function oi(t){return t?!0:void 0}Lt({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function ps(t){if(t!==null)return""}function il(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function tv(t){if(!ht)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return x(e)?e:null}const Vi=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),sl=t=>typeof t=="function";Le("empty");function Le(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Ue(n,u=>{const l=i(u);if(sl(l)){const a=(...f)=>Vi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,a}return Vi({...l,[`data-melt-${t}`]:"",action:r??ze})});{const u=i,l=u==null?void 0:u();if(sl(l)){const a=(...f)=>Vi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,il(a)}return il(Vi({...l,[`data-melt-${t}`]:"",action:r??ze}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Jn(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 ht=typeof document<"u",qa=t=>typeof t=="function";function Ei(t){return t instanceof Element}function x(t){return t instanceof HTMLElement}function nv(t){return t instanceof HTMLInputElement}function rv(t){return t instanceof HTMLLabelElement}function iv(t){return t instanceof HTMLButtonElement}function on(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function sv(t){return x(t)?t.isContentEditable:!1}function Pc(t){return t!==null&&typeof t=="object"}function Wa(t){return Pc(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ze(){}function kt(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 Ce(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Lc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Fc(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 Lc(t){return e=>{const n=Fc(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function so(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const fi=t=>{try{ds(t)}catch{return t}},Qa=t=>{try{ms(t)}catch{return t}};function Nr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function ov(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!pr(i,e)))}function Ic(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:()=>Lr(t)}}Xe.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Xe.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const hr=(t,e)=>{const n=Xe(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function fn(t){return new Promise(e=>setTimeout(e,t))}let Mc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",za=(t=21)=>{let e="",n=t|0;for(;n--;)e+=Mc[Math.random()*64|0];return e};function Nc(){return za(10)}function ci(t){return t.reduce((e,n)=>(e[n]=Nc(),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"},Vc=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],Hc=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],oo=[...Vc,...Hc],di=[ae.ENTER,ae.SPACE],Bc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],Uc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],lv=(t="ltr",e="horizontal")=>({nextKey:Bc(t,e),prevKey:Uc(t,e)});function jc(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const Ga=()=>typeof window<"u";function Kc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Ya=t=>Ga()&&t.test(Kc().toLowerCase()),qc=()=>Ga()&&!!navigator.maxTouchPoints,Wc=()=>Ya(/^mac/)&&!qc(),Qc=()=>Ya(/mac|iphone|ipad|ipod/i),zc=()=>Qc()&&!Wc(),Rs="data-melt-scroll-lock";function ol(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Gc(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 Yc(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function To(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(Rs))return ze;i.setAttribute(Rs,"");const o=n.innerWidth-r.clientWidth,u=()=>Gc(r,"--scrollbar-width",`${o}px`),l=Yc(r),a=n.getComputedStyle(i)[l],f=()=>ol(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:m,scrollY:p,visualViewport:h}=n,v=(h==null?void 0:h.offsetLeft)??0,g=(h==null?void 0:h.offsetTop)??0,_=ol(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()=>{_==null||_(),n.scrollTo(m,p)}},d=[u(),zc()?c():f()];return()=>{d.forEach(m=>m==null?void 0:m()),i.removeAttribute(Rs)}}function ts(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return Ue([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=Ue(t,s=>{n==null||n(),n=e(s)}).subscribe(ze),i=()=>{r(),n==null||n()};return Qa(i),i}function It(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(Fe(i))}),e}function et(t){ht&&fn(1).then(()=>{const e=document.activeElement;!x(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Za(){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 Xa(t){const e=Za(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&x(i)?i:null}function Ja(t){const e=Za(),r=e.indexOf(t)-1,i=e[r];return r>=0&&x(i)?i:null}const Zc=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Xc={onMatch:et,getCurrentItem:()=>document.activeElement};function Jc(t={}){const e={...Xc,...t},n=Xe(Fe([])),r=jc(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if(Zc.has(s))return;const u=e.getCurrentItem(),l=Lr(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=Rc(a,Math.max(d,0));c.length===1&&(m=m.filter(v=>v!==u));const h=m.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));x(h)&&h!==u&&e.onMatch(h),r()}}}function xc(t){let e=t.parentElement;for(;x(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Pr(t,e){return e!==void 0?e:xc(t)==="body"?document.body:null}async function mi(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([fn(1),jt]),e===void 0){n==null||n.focus();return}const r=qa(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!x(i))return;i.focus()}else x(r)&&r.focus()}Ct(void 0,t=>{function e(r){t(r),t(void 0)}return kt(document,"pointerup",e,{passive:!1,capture:!0})});const ed=Ct(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return kt(document,"keydown",e,{passive:!1})}),pi=(t,e={})=>{let n=ze;function r(i={}){n();const s={enabled:!0,...i},o=Wa(s.enabled)?s.enabled:Ct(s.enabled);n=rt(ed.subscribe(u=>{var a;if(!u||!Lr(o))return;const l=u.target;if(!(!x(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(qa(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()}}},Tn=Math.min,Ft=Math.max,ns=Math.round,Hi=Math.floor,tn=t=>({x:t,y:t}),td={left:"right",right:"left",bottom:"top",top:"bottom"},nd={start:"end",end:"start"};function lo(t,e,n){return Ft(t,Tn(e,n))}function Vr(t,e){return typeof t=="function"?t(e):t}function Dn(t){return t.split("-")[0]}function Hr(t){return t.split("-")[1]}function xa(t){return t==="x"?"y":"x"}function Do(t){return t==="y"?"height":"width"}function Gn(t){return["top","bottom"].includes(Dn(t))?"y":"x"}function So(t){return xa(Gn(t))}function rd(t,e,n){n===void 0&&(n=!1);const r=Hr(t),i=So(t),s=Do(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=rs(o)),[o,rs(o)]}function id(t){const e=rs(t);return[uo(t),e,uo(e)]}function uo(t){return t.replace(/start|end/g,e=>nd[e])}function sd(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 od(t,e,n,r){const i=Hr(t);let s=sd(Dn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(uo)))),s}function rs(t){return t.replace(/left|right|bottom|top/g,e=>td[e])}function ld(t){return{top:0,right:0,bottom:0,left:0,...t}}function ef(t){return typeof t!="number"?ld(t):{top:t,right:t,bottom:t,left:t}}function is(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 ll(t,e,n){let{reference:r,floating:i}=t;const s=Gn(e),o=So(e),u=Do(o),l=Dn(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(Hr(e)){case"start":m[o]-=d*(n&&a?-1:1);break;case"end":m[o]+=d*(n&&a?-1:1);break}return m}const ud=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}=ll(a,r,l),d=r,m={},p=0;for(let h=0;h<u.length;h++){const{name:v,fn:g}=u[h],{x:_,y:w,data:A,reset:T}=await g({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:m,rects:a,platform:o,elements:{reference:t,floating:e}});f=_??f,c=w??c,m={...m,[v]:{...m[v],...A}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(a=T.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:f,y:c}=ll(a,d,l)),h=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:m}};async function Ro(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}=Vr(e,t),p=ef(m),v=u[d?c==="floating"?"reference":"floating":c],g=is(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})),_=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),A=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},T=is(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:w,strategy:l}):_);return{top:(g.top-T.top+p.top)/A.y,bottom:(T.bottom-g.bottom+p.bottom)/A.y,left:(g.left-T.left+p.left)/A.x,right:(T.right-g.right+p.right)/A.x}}const ad=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}=Vr(t,e)||{};if(a==null)return{};const c=ef(f),d={x:n,y:r},m=So(i),p=Do(m),h=await o.getDimensions(a),v=m==="y",g=v?"top":"left",_=v?"bottom":"right",w=v?"clientHeight":"clientWidth",A=s.reference[p]+s.reference[m]-d[m]-s.floating[p],T=d[m]-s.reference[m],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let V=E?E[w]:0;(!V||!await(o.isElement==null?void 0:o.isElement(E)))&&(V=u.floating[w]||s.floating[p]);const O=A/2-T/2,W=V/2-h[p]/2-1,U=Tn(c[g],W),S=Tn(c[_],W),K=U,$=V-h[p]-S,N=V/2-h[p]/2+O,H=lo(K,N,$),j=!l.arrow&&Hr(i)!=null&&N!==H&&s.reference[p]/2-(N<K?U:S)-h[p]/2<0,ee=j?N<K?N-K:N-$:0;return{[m]:d[m]+ee,data:{[m]:H,centerOffset:N-H-ee,...j&&{alignmentOffset:ee}},reset:j}}}),fd=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:h=!0,...v}=Vr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Dn(i),_=Gn(u),w=Dn(u)===u,A=await(l.isRTL==null?void 0:l.isRTL(a.floating)),T=d||(w||!h?[rs(u)]:id(u)),E=p!=="none";!d&&E&&T.push(...od(u,h,p,A));const V=[u,...T],O=await Ro(e,v),W=[];let U=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&W.push(O[g]),c){const N=rd(i,o,A);W.push(O[N[0]],O[N[1]])}if(U=[...U,{placement:i,overflows:W}],!W.every(N=>N<=0)){var S,K;const N=(((S=s.flip)==null?void 0:S.index)||0)+1,H=V[N];if(H)return{data:{index:N,overflows:U},reset:{placement:H}};let j=(K=U.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:K.placement;if(!j)switch(m){case"bestFit":{var $;const ee=($=U.filter(te=>{if(E){const z=Gn(te.placement);return z===_||z==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(z=>z>0).reduce((z,oe)=>z+oe,0)]).sort((te,z)=>te[1]-z[1])[0])==null?void 0:$[0];ee&&(j=ee);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};async function cd(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Dn(n),u=Hr(n),l=Gn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Vr(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 dd=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 cd(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}}}}},md=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:_}=v;return{x:g,y:_}}},...l}=Vr(t,e),a={x:n,y:r},f=await Ro(e,l),c=Gn(Dn(i)),d=xa(c);let m=a[d],p=a[c];if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",_=m+f[v],w=m-f[g];m=lo(_,m,w)}if(o){const v=c==="y"?"top":"left",g=c==="y"?"bottom":"right",_=p+f[v],w=p-f[g];p=lo(_,p,w)}const h=u.fn({...e,[d]:m,[c]:p});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:s,[c]:o}}}}}},pd=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}=Vr(t,e),f=await Ro(e,a),c=Dn(i),d=Hr(i),m=Gn(i)==="y",{width:p,height:h}=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,w=p-f.left-f.right,A=Tn(h-f[v],_),T=Tn(p-f[g],w),E=!e.middlewareData.shift;let V=A,O=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(V=_),E&&!d){const U=Ft(f.left,0),S=Ft(f.right,0),K=Ft(f.top,0),$=Ft(f.bottom,0);m?O=p-2*(U!==0||S!==0?U+S:Ft(f.left,f.right)):V=h-2*(K!==0||$!==0?K+$:Ft(f.top,f.bottom))}await l({...e,availableWidth:O,availableHeight:V});const W=await o.getDimensions(u.floating);return p!==W.width||h!==W.height?{reset:{rects:!0}}:{}}}};function hs(){return typeof window<"u"}function Br(t){return tf(t)?(t.nodeName||"").toLowerCase():"#document"}function Mt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rn(t){var e;return(e=(tf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function tf(t){return hs()?t instanceof Node||t instanceof Mt(t).Node:!1}function Gt(t){return hs()?t instanceof Element||t instanceof Mt(t).Element:!1}function nn(t){return hs()?t instanceof HTMLElement||t instanceof Mt(t).HTMLElement:!1}function ul(t){return!hs()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Mt(t).ShadowRoot}function wi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Yt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function hd(t){return["table","td","th"].includes(Br(t))}function _s(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Po(t){const e=Fo(),n=Gt(t)?Yt(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 _d(t){let e=Sn(t);for(;nn(e)&&!Fr(e);){if(Po(e))return e;if(_s(e))return null;e=Sn(e)}return null}function Fo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(t){return["html","body","#document"].includes(Br(t))}function Yt(t){return Mt(t).getComputedStyle(t)}function gs(t){return Gt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Sn(t){if(Br(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ul(t)&&t.host||rn(t);return ul(e)?e.host:e}function nf(t){const e=Sn(t);return Fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:nn(e)&&wi(e)?e:nf(e)}function hi(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=nf(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Mt(i);if(s){const u=ao(o);return e.concat(o,o.visualViewport||[],wi(i)?i:[],u&&n?hi(u):[])}return e.concat(i,hi(i,[],n))}function ao(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rf(t){const e=Yt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=ns(n)!==s||ns(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Lo(t){return Gt(t)?t:t.contextElement}function _r(t){const e=Lo(t);if(!nn(e))return tn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=rf(e);let o=(s?ns(n.width):n.width)/r,u=(s?ns(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const gd=tn(0);function sf(t){const e=Mt(t);return!Fo()||!e.visualViewport?gd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function bd(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Mt(t)?!1:e}function Yn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Lo(t);let o=tn(1);e&&(r?Gt(r)&&(o=_r(r)):o=_r(t));const u=bd(s,n,r)?sf(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=Mt(s),m=r&&Gt(r)?Mt(r):r;let p=d,h=ao(p);for(;h&&r&&m!==p;){const v=_r(h),g=h.getBoundingClientRect(),_=Yt(h),w=g.left+(h.clientLeft+parseFloat(_.paddingLeft))*v.x,A=g.top+(h.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=w,a+=A,p=Mt(h),h=ao(p)}}return is({width:f,height:c,x:l,y:a})}function Io(t,e){const n=gs(t).scrollLeft;return e?e.left+n:Yn(rn(t)).left+n}function of(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Io(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function yd(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rn(r),u=e?_s(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=tn(1);const f=tn(0),c=nn(r);if((c||!c&&!s)&&((Br(r)!=="body"||wi(o))&&(l=gs(r)),nn(r))){const m=Yn(r);a=_r(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const d=o&&!c&&!s?of(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 vd(t){return Array.from(t.getClientRects())}function kd(t){const e=rn(t),n=gs(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+Io(t);const u=-n.scrollTop;return Yt(r).direction==="rtl"&&(o+=Ft(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function Cd(t,e){const n=Mt(t),r=rn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,l=0;if(i){s=i.width,o=i.height;const a=Fo();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function Ed(t,e){const n=Yn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=nn(t)?_r(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 al(t,e,n){let r;if(e==="viewport")r=Cd(t,n);else if(e==="document")r=kd(rn(t));else if(Gt(e))r=Ed(e,n);else{const i=sf(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return is(r)}function lf(t,e){const n=Sn(t);return n===e||!Gt(n)||Fr(n)?!1:Yt(n).position==="fixed"||lf(n,e)}function wd(t,e){const n=e.get(t);if(n)return n;let r=hi(t,[],!1).filter(u=>Gt(u)&&Br(u)!=="body"),i=null;const s=Yt(t).position==="fixed";let o=s?Sn(t):t;for(;Gt(o)&&!Fr(o);){const u=Yt(o),l=Po(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||wi(o)&&!l&&lf(t,o))?r=r.filter(f=>f!==o):i=u,o=Sn(o)}return e.set(t,r),r}function $d(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?_s(e)?[]:wd(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=al(e,f,i);return a.top=Ft(c.top,a.top),a.right=Tn(c.right,a.right),a.bottom=Tn(c.bottom,a.bottom),a.left=Ft(c.left,a.left),a},al(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Od(t){const{width:e,height:n}=rf(t);return{width:e,height:n}}function Ad(t,e,n){const r=nn(e),i=rn(e),s=n==="fixed",o=Yn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=tn(0);if(r||!r&&!s)if((Br(e)!=="body"||wi(i))&&(u=gs(e)),r){const d=Yn(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=Io(i));const a=i&&!r&&!s?of(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 Ps(t){return Yt(t).position==="static"}function fl(t,e){if(!nn(t)||Yt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rn(t)===n&&(n=n.ownerDocument.body),n}function uf(t,e){const n=Mt(t);if(_s(t))return n;if(!nn(t)){let i=Sn(t);for(;i&&!Fr(i);){if(Gt(i)&&!Ps(i))return i;i=Sn(i)}return n}let r=fl(t,e);for(;r&&hd(r)&&Ps(r);)r=fl(r,e);return r&&Fr(r)&&Ps(r)&&!Po(r)?n:r||_d(t)||n}const Td=async function(t){const e=this.getOffsetParent||uf,n=this.getDimensions,r=await n(t.floating);return{reference:Ad(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dd(t){return Yt(t).direction==="rtl"}const Sd={convertOffsetParentRelativeRectToViewportRelativeRect:yd,getDocumentElement:rn,getClippingRect:$d,getOffsetParent:uf,getElementRects:Td,getClientRects:vd,getDimensions:Od,getScale:_r,isElement:Gt,isRTL:Dd};function Rd(t,e){let n=null,r;const i=rn(t);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:c,height:d}=t.getBoundingClientRect();if(u||e(),!c||!d)return;const m=Hi(f),p=Hi(i.clientWidth-(a+c)),h=Hi(i.clientHeight-(f+d)),v=Hi(a),_={rootMargin:-m+"px "+-p+"px "+-h+"px "+-v+"px",threshold:Ft(0,Tn(1,l))||1};let w=!0;function A(T){const E=T[0].intersectionRatio;if(E!==l){if(!w)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(t)}return o(!0),s}function Pd(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=Lo(t),f=i||s?[...a?hi(a):[],...hi(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const c=a&&u?Rd(a,n):null;let d=-1,m=null;o&&(m=new ResizeObserver(g=>{let[_]=g;_&&_.target===a&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(e)})),n()}),a&&!l&&m.observe(a),m.observe(e));let p,h=l?Yn(t):null;l&&v();function v(){const g=Yn(t);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,p=requestAnimationFrame(v)}return n(),()=>{var g;f.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),c==null||c(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const Fd=dd,Ld=md,Id=fd,Md=pd,Nd=ad,Vd=(t,e,n)=>{const r=new Map,i={platform:Sd,...n},s={...i.platform,_c:r};return ud(t,e,{...i,platform:s})},Hd={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 Ud(t,e,n={}){if(!e||!t||n===null)return{destroy:ze};const r={...Hd,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(Id({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(Fd(l))}s.push(Ld({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(Nd({element:i,padding:8})),s.push(Md({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;Vd(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),d=Math.round(f.y),[m,p]=jd(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:h,y:v}=f.middlewareData.arrow,g=f.placement.split("-")[0];i.setAttribute("data-side",g),Object.assign(i.style,{position:"absolute",left:h!=null?`${h}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:Pd(t,e,u)}}function jd(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 af=["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])"],ss=af.join(","),ff=typeof Element>"u",Zn=ff?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,os=!ff&&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},ls=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"},cf=function(e,n,r){if(ls(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(ss));return n&&Zn.call(e,ss)&&i.unshift(e),i=i.filter(r),i},df=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!ls(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=Zn.call(o,ss);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!ls(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},mf=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))&&!mf(e)?0:e.tabIndex},qd=function(e,n){var r=Nn(e);return r<0&&n&&!mf(e)?0:r},Wd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},pf=function(e){return e.tagName==="INPUT"},Qd=function(e){return pf(e)&&e.type==="hidden"},zd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Gd=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Yd=function(e){if(!e.name)return!0;var n=e.form||os(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=Gd(i,e.form);return!s||s===e},Zd=function(e){return pf(e)&&e.type==="radio"},Xd=function(e){return Zd(e)&&!Yd(e)},Jd=function(e){var n,r=e&&os(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=os(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},cl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},xd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Zn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Zn.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=os(e);if(l&&!l.shadowRoot&&i(l)===!0)return cl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(Jd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return cl(e);return!1},em=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 Zn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},us=function(e,n){return!(n.disabled||ls(n)||Qd(n)||xd(n,e)||zd(n)||em(n))},fo=function(e,n){return!(Xd(n)||Nn(n)<0||!us(e,n))},tm=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},nm=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=qd(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(Wd).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},rm=function(e,n){n=n||{};var r;return n.getShadowRoot?r=df([e],n.includeContainer,{filter:fo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:tm}):r=cf(e,n.includeContainer,fo.bind(null,n)),nm(r)},im=function(e,n){n=n||{};var r;return n.getShadowRoot?r=df([e],n.includeContainer,{filter:us.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=cf(e,n.includeContainer,us.bind(null,n)),r},lr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Zn.call(e,ss)===!1?!1:fo(n,e)},sm=af.concat("iframe").join(","),Fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Zn.call(e,sm)===!1?!1:us(n,e)};/*!
|
|
9
|
+
* focus-trap 7.6.2
|
|
10
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
11
|
+
*/function co(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 om(t){if(Array.isArray(t))return co(t)}function lm(t,e,n){return(e=dm(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function um(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function am(){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 dl(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 ml(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dl(Object(n),!0).forEach(function(r){lm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fm(t){return om(t)||um(t)||mm(t)||am()}function cm(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 dm(t){var e=cm(t,"string");return typeof e=="symbol"?e:e+""}function mm(t,e){if(t){if(typeof t=="string")return co(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)?co(t,e):void 0}}var pl={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()}},pm=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},hm=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},li=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},_m=function(e){return li(e)&&!e.shiftKey},gm=function(e){return li(e)&&e.shiftKey},hl=function(e){return setTimeout(e,0)},Yr=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},Bi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},bm=[],ym=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||bm,s=ml({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:_m,isKeyBackward:gm},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function($,N,H){return $&&$[N]!==void 0?$[N]:s[H||N]},a=function($,N){var H=typeof(N==null?void 0:N.composedPath)=="function"?N.composedPath():void 0;return o.containerGroups.findIndex(function(j){var ee=j.container,te=j.tabbableNodes;return ee.contains($)||(H==null?void 0:H.includes(ee))||te.find(function(z){return z===$})})},f=function($){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=N.hasFallback,j=H===void 0?!1:H,ee=N.params,te=ee===void 0?[]:ee,z=s[$];if(typeof z=="function"&&(z=z.apply(void 0,fm(te))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat($,"` was specified but was not a node, or did not return a node"))}var oe=z;if(typeof z=="string"){try{oe=r.querySelector(z)}catch(Re){throw new Error("`".concat($,'` appears to be an invalid selector; error="').concat(Re.message,'"'))}if(!oe&&!j)throw new Error("`".concat($,"` as selector refers to no known node"))}return oe},c=function(){var $=f("initialFocus",{hasFallback:!0});if($===!1)return!1;if($===void 0||$&&!Fs($,s.tabbableOptions))if(a(r.activeElement)>=0)$=r.activeElement;else{var N=o.tabbableGroups[0],H=N&&N.firstTabbableNode;$=H||f("fallbackFocus")}else $===null&&($=f("fallbackFocus"));if(!$)throw new Error("Your focus-trap needs to have at least one focusable element");return $},d=function(){if(o.containerGroups=o.containers.map(function($){var N=rm($,s.tabbableOptions),H=im($,s.tabbableOptions),j=N.length>0?N[0]:void 0,ee=N.length>0?N[N.length-1]:void 0,te=H.find(function(Re){return lr(Re)}),z=H.slice().reverse().find(function(Re){return lr(Re)}),oe=!!N.find(function(Re){return Nn(Re)>0});return{container:$,tabbableNodes:N,focusableNodes:H,posTabIndexesFound:oe,firstTabbableNode:j,lastTabbableNode:ee,firstDomTabbableNode:te,lastDomTabbableNode:z,nextTabbableNode:function(lt){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Z=N.indexOf(lt);return Z<0?He?H.slice(H.indexOf(lt)+1).find(function(J){return lr(J)}):H.slice(0,H.indexOf(lt)).reverse().find(function(J){return lr(J)}):N[Z+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function($){return $.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($){return $.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($){var N=$.activeElement;if(N)return N.shadowRoot&&N.shadowRoot.activeElement!==null?m(N.shadowRoot):N},p=function($){if($!==!1&&$!==m(document)){if(!$||!$.focus){p(c());return}$.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=$,pm($)&&$.select()}},h=function($){var N=f("setReturnFocus",{params:[$]});return N||(N===!1?!1:$)},v=function($){var N=$.target,H=$.event,j=$.isBackward,ee=j===void 0?!1:j;N=N||Bi(H),d();var te=null;if(o.tabbableGroups.length>0){var z=a(N,H),oe=z>=0?o.containerGroups[z]:void 0;if(z<0)ee?te=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:te=o.tabbableGroups[0].firstTabbableNode;else if(ee){var Re=o.tabbableGroups.findIndex(function(vt){var mt=vt.firstTabbableNode;return N===mt});if(Re<0&&(oe.container===N||Fs(N,s.tabbableOptions)&&!lr(N,s.tabbableOptions)&&!oe.nextTabbableNode(N,!1))&&(Re=z),Re>=0){var lt=Re===0?o.tabbableGroups.length-1:Re-1,He=o.tabbableGroups[lt];te=Nn(N)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else li(H)||(te=oe.nextTabbableNode(N,!1))}else{var Z=o.tabbableGroups.findIndex(function(vt){var mt=vt.lastTabbableNode;return N===mt});if(Z<0&&(oe.container===N||Fs(N,s.tabbableOptions)&&!lr(N,s.tabbableOptions)&&!oe.nextTabbableNode(N))&&(Z=z),Z>=0){var J=Z===o.tabbableGroups.length-1?0:Z+1,yt=o.tabbableGroups[J];te=Nn(N)>=0?yt.firstTabbableNode:yt.firstDomTabbableNode}else li(H)||(te=oe.nextTabbableNode(N))}}else te=f("fallbackFocus");return te},g=function($){var N=Bi($);if(!(a(N,$)>=0)){if(Yr(s.clickOutsideDeactivates,$)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Yr(s.allowOutsideClick,$)||$.preventDefault()}},_=function($){var N=Bi($),H=a(N,$)>=0;if(H||N instanceof Document)H&&(o.mostRecentlyFocusedNode=N);else{$.stopImmediatePropagation();var j,ee=!0;if(o.mostRecentlyFocusedNode)if(Nn(o.mostRecentlyFocusedNode)>0){var te=a(o.mostRecentlyFocusedNode),z=o.containerGroups[te].tabbableNodes;if(z.length>0){var oe=z.findIndex(function(Re){return Re===o.mostRecentlyFocusedNode});oe>=0&&(s.isKeyForward(o.recentNavEvent)?oe+1<z.length&&(j=z[oe+1],ee=!1):oe-1>=0&&(j=z[oe-1],ee=!1))}}else o.containerGroups.some(function(Re){return Re.tabbableNodes.some(function(lt){return Nn(lt)>0})})||(ee=!1);else ee=!1;ee&&(j=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),p(j||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},w=function($){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=$;var H=v({event:$,isBackward:N});H&&(li($)&&$.preventDefault(),p(H))},A=function($){(s.isKeyForward($)||s.isKeyBackward($))&&w($,s.isKeyBackward($))},T=function($){hm($)&&Yr(s.escapeDeactivates,$)!==!1&&($.preventDefault(),u.deactivate())},E=function($){var N=Bi($);a(N,$)>=0||Yr(s.clickOutsideDeactivates,$)||Yr(s.allowOutsideClick,$)||($.preventDefault(),$.stopImmediatePropagation())},V=function(){if(o.active)return pl.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?hl(function(){p(c())}):p(c()),r.addEventListener("focusin",_,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",E,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",T),u},O=function(){if(o.active)return r.removeEventListener("focusin",_,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",E,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",T),u},W=function($){var N=$.some(function(H){var j=Array.from(H.removedNodes);return j.some(function(ee){return ee===o.mostRecentlyFocusedNode})});N&&p(c())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(W):void 0,S=function(){U&&(U.disconnect(),o.active&&!o.paused&&o.containers.map(function($){U.observe($,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function($){if(o.active)return this;var N=l($,"onActivate"),H=l($,"onPostActivate"),j=l($,"checkCanFocusTrap");j||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,N==null||N();var ee=function(){j&&d(),V(),S(),H==null||H()};return j?(j(o.containers.concat()).then(ee,ee),this):(ee(),this)},deactivate:function($){if(!o.active)return this;var N=ml({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},$);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,O(),o.active=!1,o.paused=!1,S(),pl.deactivateTrap(i,u);var H=l(N,"onDeactivate"),j=l(N,"onPostDeactivate"),ee=l(N,"checkCanReturnFocus"),te=l(N,"returnFocus","returnFocusOnDeactivate");H==null||H();var z=function(){hl(function(){te&&p(h(o.nodeFocusedBeforeActivation)),j==null||j()})};return te&&ee?(ee(h(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function($){if(o.paused||!o.active)return this;var N=l($,"onPause"),H=l($,"onPostPause");return o.paused=!0,N==null||N(),O(),S(),H==null||H(),this},unpause:function($){if(!o.paused||!o.active)return this;var N=l($,"onUnpause"),H=l($,"onPostUnpause");return o.paused=!1,N==null||N(),d(),V(),S(),H==null||H(),this},updateContainerElements:function($){var N=[].concat($).filter(Boolean);return o.containers=N.map(function(H){return typeof H=="string"?r.querySelector(H):H}),o.active&&d(),S(),this}},u.updateContainerElements(e),u};function hf(t={}){let e;const{immediate:n,...r}=t,i=Fe(!1),s=Fe(!1),o=c=>e==null?void 0:e.activate(c),u=c=>{e==null||e.deactivate(c)},l=()=>{e&&(e.pause(),s.set(!0))},a=()=>{e&&(e.unpause(),s.set(!1))};return{useFocusTrap:c=>(e=ym(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:tl(i),isPaused:tl(s),activate:o,deactivate:u,pause:l,unpause:a}}const Ui=[],_f=(t,e)=>{let n=ze;function r(){const s=Ui.indexOf(t);s>=0&&Ui.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;fn(100).then(()=>{o?Ui.push(t):r()});function f(){return Sc(Ui)===t}function c(){f()&&u&&(u(),r())}function d(p){const h=p.target;Ei(h)&&h&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation())}function m(p){l!=null&&l(p)&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation(),c())}n=km(t,{onInteractOutsideStart:d,onInteractOutside:a?m:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},vm={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},as=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:ze};const s={...vm,...i},o=[];if(s.portal!==null&&o.push(bs(t,s.portal).destroy),o.push(Ud(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=hf({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(_f(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(pi(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},bs=(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 jt(),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}},km=(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&&_l(g,t)&&(d==null||d(g));const _=g.target;Ei(_)&&gf(t,_)&&(s=!0),i=!0}function h(g){c==null||c(g)}const v=Cm(t);if(typeof PointerEvent<"u"){const g=_=>{r();const w=A=>{l(A)&&h(A),a()};if(_.pointerType==="touch"){r=kt(v,"click",w,{capture:!0,once:!0});return}w(_)};n=rt(kt(v,"pointerdown",p,!0),kt(v,"pointerup",g,!0))}else{const g=w=>{o?o=!1:l(w)&&h(w),a()},_=w=>{o=!0,l(w)&&h(w),a()};n=rt(kt(v,"mousedown",p,!0),kt(v,"mouseup",g,!0),kt(v,"touchstart",p,!0),kt(v,"touchend",_,!0))}}function l(f){return!!(i&&!s&&_l(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function _l(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!Ei(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!gf(e,n)}function gf(t,e){return t===e||t.contains(e)}function Cm(t){return(t==null?void 0:t.ownerDocument)??document}function Em(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Wa(i)?e[r]=Xe(i):e[r]=Xe(Ct(i))}),e}const wm={prefix:"",disabled:Ct(!1),required:Ct(!1),name:Ct(void 0)};function uv(t){const e={...wm,...Ic(t)},{name:n}=Jn(e.prefix),{value:r,name:i,disabled:s,required:o}=Em(Nr(e,"prefix")),u=i;return Le(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:Lt({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 $m={ltr:[...di,ae.ARROW_RIGHT],rtl:[...di,ae.ARROW_LEFT]},Om={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},gl=["menu","trigger"],Am={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 Tm(t){const{name:e,selector:n}=Jn(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:h}=t.rootOptions,v=t.rootOpen,g=t.rootActiveTrigger,_=t.nextFocusable,w=t.prevFocusable,A=Xe.writable(!1),T=Xe(Fe(0)),E=Xe(Fe(null)),V=Xe(Fe("right")),O=Xe(Fe(null)),W=Xe(Ue([V,E],([Q,ne])=>re=>Q===(ne==null?void 0:ne.side)&&Dm(re,ne==null?void 0:ne.area))),{typed:U,handleTypeaheadSearch:S}=Jc(),K=It({...ci(gl),...t.ids}),$=ts({open:v,forceVisible:a,activeTrigger:g}),N=Le(e(),{stores:[$,l,K.menu,K.trigger],returned:([Q,ne,re,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Lt({display:Q?void 0:"none"}),id:re,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":ps(ne),tabindex:-1}),action:Q=>{let ne=ze;const re=xe([$,g,s,u,l,o],([$e,Je,wt,q,Ie,We])=>{ne(),!(!$e||!Je)&&jt().then(()=>{ne(),Xr(Q,n),ne=as(Q,{anchorElement:Je,open:v,options:{floating:wt,modal:{closeOnInteractOutside:q,shouldCloseOnInteractOutside:Pe=>{var Me;return(Me=h.get())==null||Me(Pe),!(Pe.defaultPrevented||x(Je)&&Je.contains(Pe.target))},onClose:()=>{v.set(!1),Je.focus()},open:$e},portal:Pr(Q,Ie),escapeKeydown:We?void 0:null}}).destroy})}),ue=rt(Ce(Q,"keydown",$e=>{const Je=$e.target,wt=$e.currentTarget;if(!x(Je)||!x(wt)||!(Je.closest('[role="menu"]')===wt))return;if(oo.includes($e.key)&&po($e,c.get()??!1),$e.key===ae.TAB){$e.preventDefault(),v.set(!1),mo($e,_,w);return}const Ie=$e.key.length===1;!($e.ctrlKey||$e.altKey||$e.metaKey)&&Ie&&f.get()===!0&&S($e.key,ln(wt))}));return{destroy(){re(),ue(),ne()}}}}),H=Le(e("trigger"),{stores:[v,K.menu,K.trigger],returned:([Q,ne,re])=>({"aria-controls":ne,"aria-expanded":Q,"data-state":Q?"open":"closed",id:re,tabindex:0}),action:Q=>(ri(Q),g.update(re=>re||Q),{destroy:rt(Ce(Q,"click",re=>{const ue=v.get(),$e=re.currentTarget;x($e)&&(vt($e),ue||re.preventDefault())}),Ce(Q,"keydown",re=>{const ue=re.currentTarget;if(!x(ue)||!(di.includes(re.key)||re.key===ae.ARROW_DOWN))return;re.preventDefault(),vt(ue);const $e=ue.getAttribute("aria-controls");if(!$e)return;const Je=document.getElementById($e);if(!Je)return;const wt=ln(Je);wt.length&&et(wt[0])}))})}),j=Le(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Lt({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),ee=Le(e("overlay"),{stores:[$],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Lt({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":Pm(Q)}),action:Q=>{let ne=ze;o.get()&&(ne=pi(Q,{handler:()=>{v.set(!1);const $e=g.get();$e&&$e.focus()}}).destroy);const re=xe([l],([ue])=>{if(ue===null)return ze;const $e=Pr(Q,ue);return $e===null?ze:bs(Q,$e).destroy});return{destroy(){ne(),re()}}}}),te=Le(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(Xr(Q,n),ri(Q),{destroy:rt(Ce(Q,"pointerdown",re=>{const ue=re.currentTarget;if(x(ue)&&on(ue)){re.preventDefault();return}}),Ce(Q,"click",re=>{const ue=re.currentTarget;if(x(ue)){if(on(ue)){re.preventDefault();return}if(re.defaultPrevented){et(ue);return}p.get()&&fn(1).then(()=>{v.set(!1)})}}),Ce(Q,"keydown",re=>{Wr(re)}),Ce(Q,"pointermove",re=>{Kr(re)}),Ce(Q,"pointerleave",re=>{qr(re)}),Ce(Q,"focusin",re=>{mt(re)}),Ce(Q,"focusout",re=>{mn(re)}))})}),z=Le(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),oe=Le(e("group-label"),{returned:()=>Q=>({id:Q})}),Re={defaultChecked:!1,disabled:!1},lt=Q=>{const ne={...Re,...Q},re=ne.checked??Fe(ne.defaultChecked??null),ue=hr(re,ne.onCheckedChange),$e=Fe(ne.disabled),Je=Le(e("checkbox-item"),{stores:[ue,$e],returned:([Ie,We])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Qr(Ie)?"mixed":Ie?"true":"false","data-disabled":oi(We),"data-state":Os(Ie)}),action:Ie=>(Xr(Ie,n),ri(Ie),{destroy:rt(Ce(Ie,"pointerdown",Pe=>{const Me=Pe.currentTarget;if(x(Me)&&on(Me)){Pe.preventDefault();return}}),Ce(Ie,"click",Pe=>{const Me=Pe.currentTarget;if(x(Me)){if(on(Me)){Pe.preventDefault();return}if(Pe.defaultPrevented){et(Me);return}ue.update(hn=>Qr(hn)?!0:!hn),p.get()&&jt().then(()=>{v.set(!1)})}}),Ce(Ie,"keydown",Pe=>{Wr(Pe)}),Ce(Ie,"pointermove",Pe=>{const Me=Pe.currentTarget;if(x(Me)){if(on(Me)){pn(Pe);return}Kr(Pe,Me)}}),Ce(Ie,"pointerleave",Pe=>{qr(Pe)}),Ce(Ie,"focusin",Pe=>{mt(Pe)}),Ce(Ie,"focusout",Pe=>{mn(Pe)}))})}),wt=Ue(ue,Ie=>Ie===!0),q=Ue(ue,Ie=>Ie==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:wt,isIndeterminate:q},options:{disabled:$e}}},He=(Q={})=>{const ne=Q.value??Fe(Q.defaultValue??null),re=hr(ne,Q.onValueChange),ue=Le(e("radio-group"),{returned:()=>({role:"group"})}),$e={disabled:!1},Je=Le(e("radio-item"),{stores:[re],returned:([q])=>Ie=>{const{value:We,disabled:Pe}={...$e,...Ie},Me=q===We;return{disabled:Pe,role:"menuitemradio","data-state":Me?"checked":"unchecked","aria-checked":Me,"data-disabled":oi(Pe),"data-value":We,"data-orientation":"vertical",tabindex:-1}},action:q=>(Xr(q,n),{destroy:rt(Ce(q,"pointerdown",We=>{const Pe=We.currentTarget;if(!x(Pe))return;const Me=q.dataset.value;if(q.dataset.disabled||Me===void 0){We.preventDefault();return}}),Ce(q,"click",We=>{const Pe=We.currentTarget;if(!x(Pe))return;const Me=q.dataset.value;if(q.dataset.disabled||Me===void 0){We.preventDefault();return}if(We.defaultPrevented){if(!x(Pe))return;et(Pe);return}re.set(Me),p.get()&&jt().then(()=>{v.set(!1)})}),Ce(q,"keydown",We=>{Wr(We)}),Ce(q,"pointermove",We=>{const Pe=We.currentTarget;if(!x(Pe))return;const Me=q.dataset.value;if(q.dataset.disabled||Me===void 0){pn(We);return}Kr(We,Pe)}),Ce(q,"pointerleave",We=>{qr(We)}),Ce(q,"focusin",We=>{mt(We)}),Ce(q,"focusout",We=>{mn(We)}))})}),wt=Ue(re,q=>Ie=>q===Ie);return{elements:{radioGroup:ue,radioItem:Je},states:{value:re},helpers:{isChecked:wt}}},{elements:{root:Z}}=qm({orientation:"horizontal"}),J={...Am,disabled:!1,positioning:{placement:"right-start",gutter:8}},yt=Q=>{const ne={...J,...Q},re=ne.open??Fe(!1),ue=hr(re,ne==null?void 0:ne.onOpenChange),$e=It(Nr(ne,"ids")),{positioning:Je,arrowSize:wt,disabled:q}=$e,Ie=Xe(Fe(null)),We=Xe(Fe(null)),Pe=Xe(Fe(0)),Me=It({...ci(gl),...ne.ids});fi(()=>{const Ke=document.getElementById(Me.trigger.get());Ke&&Ie.set(Ke)});const hn=ts({open:ue,forceVisible:a,activeTrigger:Ie}),Mf=Le(e("submenu"),{stores:[hn,Me.menu,Me.trigger],returned:([Ke,pt,Dt])=>({role:"menu",hidden:Ke?void 0:!0,style:Lt({display:Ke?void 0:"none"}),id:pt,"aria-labelledby":Dt,"data-state":Ke?"open":"closed","data-id":pt,tabindex:-1}),action:Ke=>{let pt=ze;const Dt=xe([hn,Je],([Ee,Ze])=>{if(pt(),!Ee)return;const tt=Ie.get();tt&&jt().then(()=>{pt();const ut=Fi(tt);pt=as(Ke,{anchorElement:tt,open:ue,options:{floating:Ze,portal:x(ut)?ut:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Qe=rt(Ce(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(oo.includes(Ee.key)){Ee.stopImmediatePropagation(),po(Ee,c.get()??!1);return}const rr=Om.ltr.includes(Ee.key),ir=Ee.ctrlKey||Ee.altKey||Ee.metaKey,Li=Ee.key.length===1;if(rr){const jo=Ie.get();Ee.preventDefault(),ue.update(()=>(jo&&et(jo),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),mo(Ee,_,w);return}!ir&&Li&&f.get()===!0&&S(Ee.key,ln(tt))}),Ce(Ke,"pointermove",Ee=>{$s(Ee)}),Ce(Ke,"focusout",Ee=>{const Ze=Ie.get();if(A.get()){const tt=Ee.target,ut=document.getElementById(Me.menu.get());if(!x(ut)||!x(tt))return;!ut.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,ut=Ee.relatedTarget;if(!x(ut)||!x(tt))return;!tt.contains(ut)&&ut!==Ze&&ue.set(!1)}}));return{destroy(){Dt(),pt(),Qe()}}}}),Nf=Le(e("subtrigger"),{stores:[ue,q,Me.menu,Me.trigger],returned:([Ke,pt,Dt,Qe])=>({role:"menuitem",id:Qe,tabindex:-1,"aria-controls":Dt,"aria-expanded":Ke,"data-state":Ke?"open":"closed","data-disabled":oi(pt),"aria-haspopop":"menu"}),action:Ke=>{Xr(Ke,n),ri(Ke),Ie.update(Qe=>Qe||Ke);const pt=()=>{Ls(We),window.clearTimeout(Pe.get()),E.set(null)},Dt=rt(Ce(Ke,"click",Qe=>{if(Qe.defaultPrevented)return;const Ee=Qe.currentTarget;!x(Ee)||on(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Ie.set(Ee),!Ze)))}),Ce(Ke,"keydown",Qe=>{const Ee=U.get(),Ze=Qe.currentTarget;if(!(!x(Ze)||on(Ze)||Ee.length>0&&Qe.key===ae.SPACE)&&$m.ltr.includes(Qe.key)){if(!ue.get()){Ze.click(),Qe.preventDefault();return}const ut=Ze.getAttribute("aria-controls");if(!ut)return;const rr=document.getElementById(ut);if(!x(rr))return;const ir=ln(rr)[0];et(ir)}}),Ce(Ke,"pointermove",Qe=>{if(!Zr(Qe)||(In(Qe),Qe.defaultPrevented))return;const Ee=Qe.currentTarget;if(!x(Ee))return;Rm(Me.menu.get())||et(Ee);const Ze=We.get();!ue.get()&&!Ze&&!on(Ee)&&We.set(window.setTimeout(()=>{ue.update(()=>(Ie.set(Ee),!0)),Ls(We)},100))}),Ce(Ke,"pointerleave",Qe=>{if(!Zr(Qe))return;Ls(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,ut=tt==="right",rr=ut?-5:5,ir=Ze[ut?"left":"right"],Li=Ze[ut?"right":"left"];E.set({area:[{x:Qe.clientX+rr,y:Qe.clientY},{x:ir,y:Ze.top},{x:Li,y:Ze.top},{x:Li,y:Ze.bottom},{x:ir,y:Ze.bottom}],side:tt}),window.clearTimeout(Pe.get()),Pe.set(window.setTimeout(()=>{E.set(null)},300))}else{if(ws(Qe),Qe.defaultPrevented)return;E.set(null)}}),Ce(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 ut=document.getElementById(tt);ut&&!ut.contains(Ze)&&ue.set(!1)}),Ce(Ke,"focusin",Qe=>{mt(Qe)}));return{destroy(){pt(),Dt()}}}}),Vf=Le(e("subarrow"),{stores:wt,returned:Ke=>({"data-arrow":!0,style:Lt({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([E],([Ke])=>{!ht||Ke||window.clearTimeout(Pe.get())}),xe([ue],([Ke])=>{if(ht&&(Ke&&A.get()&&fn(1).then(()=>{const pt=document.getElementById(Me.menu.get());if(!pt)return;const Dt=ln(pt);Dt.length&&et(Dt[0])}),!Ke)){const pt=O.get(),Dt=document.getElementById(Me.trigger.get());if(pt&&fn(1).then(()=>{const Qe=document.getElementById(Me.menu.get());Qe&&Qe.contains(pt)&&gn(pt)}),!Dt||document.activeElement===Dt)return;gn(Dt)}}),{ids:Me,elements:{subTrigger:Nf,subMenu:Mf,subArrow:Vf},states:{subOpen:ue},options:$e}};fi(()=>{const Q=document.getElementById(K.trigger.get());x(Q)&&v.get()&&g.set(Q);const ne=[],re=()=>A.set(!1),ue=()=>{A.set(!0),ne.push(rt(kt(document,"pointerdown",re,{capture:!0,once:!0}),kt(document,"pointermove",re,{capture:!0,once:!0})))},$e=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return ne.push(kt(document,"keydown",ue,{capture:!0})),ne.push(kt(document,"keydown",$e)),()=>{ne.forEach(Je=>Je())}}),xe([v,O],([Q,ne])=>{!Q&&ne&&gn(ne)}),xe([v],([Q])=>{if(ht&&!Q){const ne=g.get();if(!ne)return;const re=d.get();!Q&&ne&&mi({prop:re,defaultEl:ne})}}),xe([v,r],([Q,ne])=>{if(!ht)return;const re=[];return fn(1).then(()=>{const ue=document.getElementById(K.menu.get());if(ue&&Q&&A.get()){if(m.get()){et(ue);return}const $e=ln(ue);if(!$e.length)return;et($e[0])}}),()=>{re.forEach(ue=>ue())}}),xe(v,Q=>{if(!ht)return;const ne=()=>A.set(!1),re=ue=>{if(A.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(kt(document,"pointerdown",ne,{capture:!0,once:!0}),kt(document,"pointermove",ne,{capture:!0,once:!0}),kt(document,"keydown",re,{capture:!0}))});function vt(Q){v.update(ne=>{const re=!ne;return re&&(_.set(Xa(Q)),w.set(Ja(Q)),g.set(Q)),re})}function mt(Q){const ne=Q.currentTarget;if(!x(ne))return;const re=O.get();re&&gn(re),so(ne),O.set(ne)}function mn(Q){const ne=Q.currentTarget;x(ne)&&gn(ne)}function In(Q){zr(Q)&&Q.preventDefault()}function pn(Q){if(zr(Q))return;const ne=Q.target;if(!x(ne))return;const re=Fi(ne);re&&et(re)}function ws(Q){zr(Q)&&Q.preventDefault()}function $s(Q){if(!Zr(Q))return;const ne=Q.target,re=Q.currentTarget;if(!x(re)||!x(ne))return;const ue=T.get(),$e=ue!==Q.clientX;if(re.contains(ne)&&$e){const Je=Q.clientX>ue?"right":"left";V.set(Je),T.set(Q.clientX)}}function Kr(Q,ne=null){if(!Zr(Q)||(In(Q),Q.defaultPrevented))return;if(ne){et(ne);return}const re=Q.currentTarget;x(re)&&et(re)}function qr(Q){Zr(Q)&&pn(Q)}function Wr(Q){if(U.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(di.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!x(ue))return;ue.click()}}function Qr(Q){return Q==="indeterminate"}function Os(Q){return Qr(Q)?"indeterminate":Q?"checked":"unchecked"}function zr(Q){return W.get()(Q)}function Fi(Q){const ne=Q.closest('[role="menu"]');return x(ne)?ne:null}return{elements:{trigger:H,menu:N,overlay:ee,item:te,group:z,groupLabel:oe,arrow:j,separator:Z},builders:{createCheckboxItem:lt,createSubmenu:yt,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:S},ids:K,options:t.rootOptions}}function mo(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),e.set(null))}}function ln(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>x(e))}function ri(t){!t||!on(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Ls(t){if(!ht)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function Zr(t){return t.pointerType==="mouse"}function Xr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);x(n)&&t.setAttribute("data-melt-menu-id",n.id)}function po(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!x(n)||!x(r))return;const i=ln(r);if(!i.length)return;const s=i.filter(l=>!(l.hasAttribute("data-disabled")||l.getAttribute("disabled")==="true")),o=s.indexOf(n);let u;switch(t.key){case ae.ARROW_DOWN:e?u=o<s.length-1?o+1:0:u=o<s.length-1?o+1:o;break;case ae.ARROW_UP:e?u=o>0?o-1:s.length-1:u=o<0?s.length-1:o>0?o-1:0;break;case ae.HOME:u=0;break;case ae.END:u=s.length-1;break;default:return}et(s[u])}function Dm(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Sm(n,e)}function Sm(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 Rm(t){const e=document.activeElement;if(!x(e))return!1;const n=e.closest(`[data-id="${t}"]`);return x(n)}function Pm(t){return t?"open":"closed"}const Fm={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"};({...Nr(Fm,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:Mn}=Jn("dialog"),Lm={preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,role:"dialog",defaultOpen:!1,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},Im=["content","title","description"];function Mm(t){const e={...Lm,...t},n=It(Nr(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=It({...ci(Im),...e.ids}),p=e.open??Fe(e.defaultOpen),h=hr(p,e==null?void 0:e.onOpenChange),v=Ue([h,l],([S,K])=>S||K);let g=ze;function _(S){const K=S.currentTarget,$=S.currentTarget;!x(K)||!x($)||(h.set(!0),d.set($))}function w(){h.set(!1),mi({prop:f.get(),defaultEl:d.get()})}const A=Le(Mn("trigger"),{stores:[h],returned:([S])=>({"aria-haspopup":"dialog","aria-expanded":S,type:"button"}),action:S=>({destroy:rt(Ce(S,"click",$=>{_($)}),Ce(S,"keydown",$=>{$.key!==ae.ENTER&&$.key!==ae.SPACE||($.preventDefault(),_($))}))})}),T=Le(Mn("overlay"),{stores:[v,h],returned:([S,K])=>({hidden:S?void 0:!0,tabindex:-1,style:Lt({display:S?void 0:"none"}),"aria-hidden":!0,"data-state":K?"open":"closed"}),action:S=>{let K=ze;return i.get()&&(K=pi(S,{handler:()=>{w()}}).destroy),{destroy(){K()}}}}),E=Le(Mn("content"),{stores:[v,m.content,m.description,m.title,h],returned:([S,K,$,N,H])=>({id:K,role:o.get(),"aria-describedby":$,"aria-labelledby":N,"aria-modal":S?"true":void 0,"data-state":H?"open":"closed",tabindex:-1,hidden:S?void 0:!0,style:Lt({display:S?void 0:"none"})}),action:S=>{let K=ze,$=ze;const N=rt(xe([h,s,i],([H,j,ee])=>{if(!H)return;const te=hf({immediate:!1,escapeDeactivates:ee,clickOutsideDeactivates:j,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:S});K=te.activate,$=te.deactivate;const z=te.useFocusTrap(S);return z&&z.destroy?z.destroy:te.deactivate}),xe([s,h],([H,j])=>_f(S,{open:j,closeOnInteractOutside:H,onClose(){w()},shouldCloseOnInteractOutside(ee){var te;return(te=c.get())==null||te(ee),!ee.defaultPrevented}}).destroy),xe([i],([H])=>H?pi(S,{handler:w}).destroy:ze),xe([v],([H])=>{jt().then(()=>{H?K():$()})}));return{destroy:()=>{g(),N()}}}}),V=Le(Mn("portalled"),{stores:u,returned:S=>({"data-portal":ps(S)}),action:S=>{const K=xe([u],([$])=>{if($===null)return ze;const N=Pr(S,$);return N===null?ze:bs(S,N).destroy});return{destroy(){K()}}}}),O=Le(Mn("title"),{stores:[m.title],returned:([S])=>({id:S})}),W=Le(Mn("description"),{stores:[m.description],returned:([S])=>({id:S})}),U=Le(Mn("close"),{returned:()=>({type:"button"}),action:S=>({destroy:rt(Ce(S,"click",()=>{w()}),Ce(S,"keydown",$=>{$.key!==ae.SPACE&&$.key!==ae.ENTER||($.preventDefault(),w())}))})});return xe([h,r],([S,K])=>{if(ht){if(K&&S&&(g=To()),S){const $=document.getElementById(m.content.get());mi({prop:a.get(),defaultEl:$})}return()=>{l.get()||g()}}}),{ids:m,elements:{content:E,trigger:A,title:O,description:W,overlay:T,close:U,portalled:V},states:{open:h},options:n}}const bl=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:Is}=Jn("menubar"),Nm={loop:!0,closeOnEscape:!0,preventScroll:!1},Vm=["menubar"];function Hm(t){const e={...Nm,...t},n=It(Nr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(Fe("")),u=Xe(Fe(null)),l=Xe(Fe(null)),a=Xe(Fe(null)),f=Xe(Fe(0));let c=!1;const d=It({...ci(Vm),...e.ids}),m=Le(Is(),{stores:[d.menubar],returned([A]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:A}},action:A=>{const T=Array.from(A.querySelectorAll("[data-melt-menubar-trigger]"));return x(T[0])?(T[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},h=A=>{const T={...p,...A},E=Xe(Fe(!1)),V=Xe(Fe(null)),O=It(T),{positioning:W,portal:U,forceVisible:S,closeOnOutsideClick:K,onOutsideClick:$}=O,N=Tm({rootOptions:{...O,preventScroll:s},rootOpen:Xe(E),rootActiveTrigger:Xe(V),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),H=ts({open:E,forceVisible:S,activeTrigger:V}),j=Le(Is("menu"),{stores:[H,U,N.ids.menu,N.ids.trigger,d.menubar],returned:([z,oe,Re,lt,He])=>({role:"menu",hidden:z?void 0:!0,style:Lt({display:z?void 0:"none"}),id:Re,"aria-labelledby":lt,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":ps(oe),tabindex:-1}),action:z=>{let oe=ze;const Re=xe([E,V,W,U,K],([He,Z,J,yt,vt])=>{oe(),He&&Z&&jt().then(()=>{oe(),oe=as(z,{anchorElement:Z,open:E,options:{floating:J,portal:Pr(z,yt),modal:{closeOnInteractOutside:vt,shouldCloseOnInteractOutside:mt=>{var pn;if((pn=$.get())==null||pn(mt),mt.defaultPrevented)return!1;const mn=mt.target,In=document.getElementById(d.menubar.get());return!In||!Ei(mn)?!0:!In.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),lt=rt(Ce(z,"keydown",He=>{const Z=He.target,J=He.currentTarget;if(!x(J)||!x(Z)||(bl.includes(He.key)&&v(He),!(Z.closest('[role="menu"]')===J)))return;oo.includes(He.key)&&po(He),He.key===ae.TAB&&(He.preventDefault(),V.set(null),E.set(!1),mo(He,u,l));const vt=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&vt&&N.helpers.handleTypeaheadSearch(He.key,ln(J))}));return{destroy(){Re(),lt(),oe()}}}}),ee=Le(Is("trigger"),{stores:[E,N.ids.menu,N.ids.trigger],returned:([z,oe,Re])=>({"aria-controls":oe,"aria-expanded":z,"data-state":z?"open":"closed",id:Re,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{ri(z);const oe=document.getElementById(d.menubar.get());if(!oe)return{};const Re=Array.from(oe.querySelectorAll("[data-melt-menubar-trigger]"));if(!Re.length)return{};const lt=xe([a],([Z])=>{!Z&&Re[0]===z||Z===z?z.tabIndex=0:z.tabIndex=-1});Re[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(Ce(z,"click",Z=>{const J=E.get(),yt=Z.currentTarget;x(yt)&&(te(yt),J||Z.preventDefault())}),Ce(z,"keydown",Z=>{const J=Z.currentTarget;if(x(J)&&(di.includes(Z.key)||Z.key===ae.ARROW_DOWN)){Z.preventDefault(),te(J);const yt=J.getAttribute("aria-controls");if(!yt)return;const vt=document.getElementById(yt);if(!vt)return;const mt=ln(vt);if(!mt.length)return;et(mt[0])}}),Ce(z,"pointerenter",Z=>{const J=Z.currentTarget;if(!x(J))return;const yt=o.get(),vt=E.get();yt&&!vt&&(E.set(!0),o.set(N.ids.menu.get()),V.set(J))}));return{destroy(){He(),lt()}}}});function te(z){E.update(oe=>{const Re=!oe;return Re?(u.set(Xa(z)),l.set(Ja(z)),V.set(z),o.set(N.ids.menu.get())):V.set(null),Re})}return xe([o],([z])=>{if(ht){if(z===N.ids.menu.get()){if(E.get())return;const oe=document.getElementById(N.ids.trigger.get());if(!oe)return;V.set(oe),so(oe),E.set(!0);return}if(z!==N.ids.menu.get()){if(!ht)return;if(E.get()){const oe=document.getElementById(N.ids.trigger.get());if(!oe)return;V.set(null),E.set(!1),gn(oe)}return}}}),xe([E],([z])=>{if(!ht)return;const oe=document.getElementById(N.ids.trigger.get());if(oe){if(!z&&o.get()===N.ids.menu.get()){V.set(null),o.set(""),gn(oe);return}z&&(a.set(oe),so(oe))}}),fi(()=>{if(!ht)return;const z=document.getElementById(N.ids.trigger.get());x(z)&&E.get()&&V.set(z)}),{ids:N.ids,elements:{...N.elements,menu:j,trigger:ee},builders:N.builders,states:N.states,options:O}};function v(A){if(!ht)return;A.preventDefault();const T=A.currentTarget,E=A.target;if(!x(E)||!x(T))return;const V=E.hasAttribute("data-melt-menubar-menu-subtrigger"),O=E.closest('[role="menu"]')!==T,W=ae.ARROW_LEFT,U=A.key===W;if(!U&&V||U&&O)return;const K=document.getElementById(d.menubar.get());if(!x(K))return;const $=g(K),N=T.getAttribute("aria-labelledby"),H=$.findIndex(z=>z.id===N);let j;switch(A.key){case ae.ARROW_RIGHT:j=H<$.length-1?H+1:0;break;case ae.ARROW_LEFT:j=H>0?H-1:$.length-1;break;case ae.HOME:j=0;break;case ae.END:j=$.length-1;break;default:return}const te=$[j].getAttribute("aria-controls");te&&o.set(te)}function g(A){const T=A.closest('[role="menubar"]');return x(T)?Array.from(T.querySelectorAll("[data-melt-menubar-trigger]")).filter(E=>x(E)):[]}function _(A){A.preventDefault();const T=document.activeElement,E=A.currentTarget;if(!x(E)||!x(T))return;const V=g(E);if(!V.length)return;const O=V.filter(K=>!(K.hasAttribute("data-disabled")||K.getAttribute("disabled")==="true")),W=O.indexOf(T);let U;const S=r.get();switch(A.key){case ae.ARROW_RIGHT:U=W<O.length-1?W+1:S?0:W;break;case ae.ARROW_LEFT:U=W>0?W-1:S?O.length-1:0;break;case ae.HOME:U=0;break;case ae.END:U=O.length-1;break;default:return}et(O[U])}fi(()=>{if(!ht)return;const A=document.getElementById(d.menubar.get());if(!A)return;const T=rt(Ce(A,"keydown",E=>{const V=E.target,O=E.currentTarget;!x(O)||!x(V)||!V.hasAttribute("data-melt-menubar-trigger")||bl.includes(E.key)&&_(E)}),kt(document,"keydown",E=>{i.get()&&E.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{T()}});const w=[];return xe([o,s],([A,T])=>{!ht||!T||(A?c||(w.push(To()),c=!0):(w.forEach(E=>E()),c=!1))}),Qa(()=>{w.forEach(A=>A())}),{ids:d,elements:{menubar:m},builders:{createMenu:h},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:Jr}=Jn("popover"),Um=["trigger","content"];function jm(t){const e={...Bm,...t},n=It(Nr(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??Fe(e.defaultOpen),h=hr(p,e==null?void 0:e.onOpenChange),v=Xe.writable(null),g=It({...ci(Um),...e.ids});fi(()=>{v.set(document.getElementById(g.trigger.get()))});function _(){h.set(!1);const S=document.getElementById(g.trigger.get());mi({prop:d.get(),defaultEl:S})}const w=ts({open:h,activeTrigger:v,forceVisible:f}),A=Le(Jr("content"),{stores:[w,a,g.content],returned:([S,K,$])=>({hidden:S&&ht?void 0:!0,tabindex:-1,style:Lt({display:S?void 0:"none"}),id:$,"data-state":S?"open":"closed","data-portal":ps(K)}),action:S=>{let K=ze;const $=xe([w,v,r,s,u,l,a],([N,H,j,ee,te,z,oe])=>{K(),!(!N||!H)&&jt().then(()=>{K(),K=as(S,{anchorElement:H,open:h,options:{floating:j,focusTrap:ee?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:te},modal:{shouldCloseOnInteractOutside:E,onClose:_,open:N,closeOnInteractOutside:z},escapeKeydown:te?{handler:()=>{_()}}:null,portal:Pr(S,oe)}}).destroy})});return{destroy(){$(),K()}}}});function T(S){h.update(K=>!K),S&&S!==v.get()&&v.set(S)}function E(S){var N;if((N=m.get())==null||N(S),S.defaultPrevented)return!1;const K=S.target,$=document.getElementById(g.trigger.get());return!($&&Ei(K)&&(K===$||$.contains(K)))}const V=Le(Jr("trigger"),{stores:[w,g.content,g.trigger],returned:([S,K,$])=>({role:"button","aria-haspopup":"dialog","aria-expanded":S?"true":"false","data-state":yl(S),"aria-controls":K,id:$}),action:S=>({destroy:rt(Ce(S,"click",()=>{T(S)}),Ce(S,"keydown",$=>{$.key!==ae.ENTER&&$.key!==ae.SPACE||($.preventDefault(),T(S))}))})}),O=Le(Jr("overlay"),{stores:[w],returned:([S])=>({hidden:S?void 0:!0,tabindex:-1,style:Lt({display:S?void 0:"none"}),"aria-hidden":"true","data-state":yl(S)}),action:S=>{let K=ze,$=ze,N=ze;return u.get()&&(K=pi(S,{handler:()=>{_()}}).destroy),$=xe([a],([H])=>{if(N(),H===null)return;const j=Pr(S,H);j!==null&&(N=bs(S,j).destroy)}),{destroy(){K(),$(),N()}}}}),W=Le(Jr("arrow"),{stores:i,returned:S=>({"data-arrow":!0,style:Lt({position:"absolute",width:`var(--arrow-size, ${S}px)`,height:`var(--arrow-size, ${S}px)`})})}),U=Le(Jr("close"),{returned:()=>({type:"button"}),action:S=>({destroy:rt(Ce(S,"click",$=>{$.defaultPrevented||_()}),Ce(S,"keydown",$=>{$.defaultPrevented||$.key!==ae.ENTER&&$.key!==ae.SPACE||($.preventDefault(),T())}))})});return xe([h,v,o],([S,K,$])=>{if(!ht)return;const N=[];if(S){K||jt().then(()=>{const j=document.getElementById(g.trigger.get());x(j)&&v.set(j)}),$&&N.push(To());const H=K??document.getElementById(g.trigger.get());mi({prop:c.get(),defaultEl:H})}return()=>{N.forEach(H=>H())}}),{ids:g,elements:{trigger:V,content:A,arrow:W,close:U,overlay:O},states:{open:h},options:n}}function yl(t){return t?"open":"closed"}const Km={orientation:"horizontal",decorative:!1},qm=t=>{const e={...Km,...t},n=It(e),{orientation:r,decorative:i}=n;return{elements:{root:Le("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}},Wm={loop:!0,orientation:"horizontal"},{name:ji,selector:Ms}=Jn("toolbar"),Qm=t=>{const e={...Wm,...t},n=It(e),{loop:r,orientation:i}=n,s=Le(ji(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Le(ji("button"),{returned:()=>({role:"button",type:"button"}),action:d=>(Ns(d),{destroy:Ce(d,"keydown",c)})}),u=Le(ji("link"),{returned:()=>({role:"link"}),action:d=>(Ns(d),{destroy:Ce(d,"keydown",c)})}),l=Le(ji("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=It(m),{type:h,disabled:v}=p,g=m.defaultValue?m.defaultValue:m.type==="single"?void 0:[],_=m.value??Fe(g),w=hr(_,m==null?void 0:m.onValueChange),{name:A}=Jn("toolbar-group"),T=Le(A(),{stores:i,returned:O=>({role:"group","data-orientation":O})}),E=Le(A("item"),{stores:[v,h,w,i],returned:([O,W,U,S])=>K=>{const $=typeof K=="string"?K:K.value,N=typeof K=="string"?!1:!!K.disabled,H=O||N,j=Array.isArray(U)?U.includes($):U===$,ee=W==="single",te=W==="multiple";return{disabled:oi(H),pressed:j,"data-orientation":S,"data-disabled":oi(H),"data-value":$,"data-state":j?"on":"off","aria-checked":ee?j:void 0,"aria-pressed":te?j:void 0,type:"button",role:ee?"radio":void 0,"data-melt-toolbar-item":""}},action:O=>{Ns(O);function W(){const K=O.dataset.value,$=O.dataset.disabled==="true";return{value:K,disabled:$}}function U(){const{value:K,disabled:$}=W();K===void 0||$||w.update(N=>Array.isArray(N)?N.includes(K)?N.filter(H=>H!==K):(N.push(K),N):N===K?void 0:K)}return{destroy:rt(Ce(O,"click",()=>{U()}),Ce(O,"keydown",K=>{if(K.key===ae.ENTER||K.key===ae.SPACE){K.preventDefault(),U();return}c(K)}))}}}),V=Ue(w,O=>W=>Array.isArray(O)?O.includes(W):O===W);return{elements:{group:T,item:E},states:{value:w},helpers:{isPressed:V},options:p}};function c(d){const m=i.get(),p=r.get(),h={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 _=g.closest("[data-melt-toolbar]");if(!x(_))return;const w=bf(_),A=w.indexOf(g);if(d.key===h){d.preventDefault();const T=A+1;T>=w.length&&p?et(w[0]):et(w[T])}else if(d.key===v){d.preventDefault();const T=A-1;T<0&&p?et(w[w.length-1]):et(w[T])}else d.key===ae.HOME?(d.preventDefault(),et(w[0])):d.key===ae.END&&(d.preventDefault(),et(w[w.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function Ns(t){const e=t.closest("[data-melt-toolbar]");if(!x(e))return;bf(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function bf(t){return Array.from(t.querySelectorAll(`${Ms("item")}, ${Ms("button")}, ${Ms("link")}`)).filter(e=>x(e))}function _i(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function zm(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Fn(){const t=Jf();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 $i(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Oi(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function yf(t){return(e={})=>Gm(t,e)}function Gm(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:Ym(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 Ym(t,e){return e==="center"?t:`${t}-${e}`}function Mo(){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 Ai(){const{NAME:t}=Mo();return st(t)}function Zm(t){const{RADIO_GROUP_NAME:e}=Mo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=Ai(),i=n(t);return ct(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function Xm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=Mo(),r=st(n);return ct(e,{...r,value:t}),{...r,value:t}}function Jm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Ai();yf(r)(n)}const xm=t=>({builder:t&8}),vl=t=>({builder:t[3]}),ep=t=>({builder:t&8}),kl=t=>({builder:t[3]});function tp(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&Vs(t);return{c(){i&&i.c(),n=Oe()},m(s,o){i&&i.m(s,o),C(s,n,o),r=!0},p(s,o){s[1],e?de(e,s[1]?"a":"div")?(i.d(1),i=Vs(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Vs(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&&k(n),i&&i.d(s)}}}function np(t){let e;const n=t[11].default,r=pe(n,t,t[10],kl);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,ep):ge(i[10]),kl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Vs(t){let e,n,r,i;const s=t[11].default,o=pe(s,t,t[10],vl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]?"a":"div"),o&&o.c(),Gi(t[1]?"a":"div")(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[13](e),n=!0,r||(i=[je(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,xm):ge(a[10]),vl),Gi(a[1]?"a":"div")(e,l=Ve(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&&k(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function rp(t){let e,n,r,i;const s=[np,tp],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function ip(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=qe(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:h}=Ai();X(t,p,w=>n(9,u=w));const v=Fn();function g(w){Ae.call(this,t,w)}function _(w){ke[w?"unshift":"push"](()=>{m=w,n(0,m)})}return t.$$set=w=>{e=ie(ie({},e),Et(w)),n(6,o=qe(e,s)),"href"in w&&n(1,f=w.href),"asChild"in w&&n(2,c=w.asChild),"disabled"in w&&n(7,d=w.disabled),"el"in w&&n(0,m=w.el),"$$scope"in w&&n(10,a=w.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={...h("item"),...zm(d)}),t.$$.dirty&264&&Object.assign(r,i)},[m,f,c,r,p,v,o,d,i,u,a,l,g,_]}class Pt extends ye{constructor(e){super(),be(this,e,ip,rp,de,{href:1,asChild:2,disabled:7,el:0})}}const sp=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),op=t=>({builder:t&4}),El=t=>({builder:t[2]});function lp(t){let e,n,r,i;const s=t[10].default,o=pe(s,t,t[9],Cl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[je(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,sp):ge(a[9]),Cl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function up(t){let e;const n=t[10].default,r=pe(n,t,t[9],El);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,op):ge(i[9]),El)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function ap(t){let e,n,r,i;const s=[up,lp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function fp(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=qe(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}=Xm(a);X(t,m,w=>n(8,o=w));const h=p("radio-item"),v=Fn();function g(w){Ae.call(this,t,w)}function _(w){ke[w?"unshift":"push"](()=>{d=w,n(0,d)})}return t.$$set=w=>{e=ie(ie({},e),Et(w)),n(5,s=qe(e,i)),"value"in w&&n(6,a=w.value),"disabled"in w&&n(7,f=w.disabled),"asChild"in w&&n(1,c=w.asChild),"el"in w&&n(0,d=w.el),"$$scope"in w&&n(9,l=w.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,h)},[d,c,r,m,v,s,a,f,o,l,u,g,_]}class cp extends ye{constructor(e){super(),be(this,e,fp,ap,de,{value:6,disabled:7,asChild:1,el:0})}}const dp=t=>({builder:t&4}),wl=t=>({builder:t[2]});function mp(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){C(o,e,u),t[8](e),n||(r=je(t[3].action(e)),n=!0)},p(o,u){le(e,s=Ve(i,[u&8&&o[3],u&32&&o[5]]))},i:me,o:me,d(o){o&&k(e),t[8](null),n=!1,r()}}}function pp(t){let e;const n=t[7].default,r=pe(n,t,t[6],wl);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,dp):ge(i[6]),wl)},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=[pp,mp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function _p(t,e,n){let r;const i=["asChild","el"];let s=qe(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=Ai();X(t,c,h=>n(3,o=h));const m=d("separator");function p(h){ke[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),Et(h)),n(5,s=qe(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$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 Ti extends ye{constructor(e){super(),be(this,e,_p,hp,de,{asChild:1,el:0})}}const gp=t=>({builder:t&4}),$l=t=>({builder:t[2]}),bp=t=>({builder:t&4}),Ol=t=>({builder:t[2]});function yp(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],$l);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=je(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,gp):ge(a[8]),$l),le(e,l=Ve(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&&k(e),o&&o.d(a),t[10](null),r=!1,i()}}}function vp(t){let e;const n=t[9].default,r=pe(n,t,t[8],Ol);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,bp):ge(i[8]),Ol)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function kp(t){let e,n,r,i;const s=[vp,yp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function Cp(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=qe(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:h}=Zm({defaultValue:a,onValueChange:({next:_})=>(_!=null&&_!==a&&(f==null||f(_),n(5,a=_)),_)});X(t,m,_=>n(7,o=_));const v=h("radio-group");function g(_){ke[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),Et(_)),n(4,s=qe(e,i)),"value"in _&&n(5,a=_.value),"onValueChange"in _&&n(6,f=_.onValueChange),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$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 Ep extends ye{constructor(e){super(),be(this,e,Cp,kp,de,{value:5,onValueChange:6,asChild:1,el:0})}}function vf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function wp(t){const{NAME:e,PARTS:n}=vf(),r=_i(e,n),i={...jm({positioning:{placement:"bottom",gutter:0},...$i(t),forceVisible:!0}),getAttrs:r};return ct(e,i),{...i,updateOption:Oi(i.options)}}function No(){const{NAME:t}=vf();return st(t)}function $p(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=No();yf(r)(n)}function kf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function Op(t){const{NAME:e,PARTS:n}=kf(),r=_i(e,n),i={...Mm({...$i(t),role:"dialog",forceVisible:!0}),getAttrs:r};return ct(e,i),{...i,updateOption:Oi(i.options)}}function Ur(){const{NAME:t}=kf();return st(t)}const Ap=t=>({ids:t&1}),Al=t=>({ids:t[0]});function Tp(t){let e;const n=t[12].default,r=pe(n,t,t[11],Al);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,Ap):ge(i[11]),Al)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Dp(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:h},updateOption:v,ids:g}=Op({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:m,onOutsideClick:p,onOpenChange:({next:w})=>(f!==w&&(c==null||c(w),n(2,f=w)),w)}),_=Ue([g.content,g.description,g.title],([w,A,T])=>({content:w,description:A,title:T}));return X(t,_,w=>n(0,r=w)),t.$$set=w=>{"preventScroll"in w&&n(3,o=w.preventScroll),"closeOnEscape"in w&&n(4,u=w.closeOnEscape),"closeOnOutsideClick"in w&&n(5,l=w.closeOnOutsideClick),"portal"in w&&n(6,a=w.portal),"open"in w&&n(2,f=w.open),"onOpenChange"in w&&n(7,c=w.onOpenChange),"openFocus"in w&&n(8,d=w.openFocus),"closeFocus"in w&&n(9,m=w.closeFocus),"onOutsideClick"in w&&n(10,p=w.onOutsideClick),"$$scope"in w&&n(11,s=w.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&h.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,_,f,o,u,l,a,c,d,m,p,s,i]}class Qn extends ye{constructor(e){super(),be(this,e,Dp,Tp,de,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const Sp=t=>({builder:t&8}),Tl=t=>({builder:t[3]}),Rp=t=>({builder:t&8}),Dl=t=>({builder:t[3]});function Pp(t){let e=t[1],n,r,i=t[1]&&Hs(t);return{c(){i&&i.c(),n=Oe()},m(s,o){i&&i.m(s,o),C(s,n,o),r=!0},p(s,o){s[1]?e?de(e,s[1])?(i.d(1),i=Hs(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Hs(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&&k(n),i&&i.d(s)}}}function Fp(t){let e;const n=t[9].default,r=pe(n,t,t[8],Dl);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,Rp):ge(i[8]),Dl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Hs(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Tl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]),o&&o.c(),Gi(t[1])(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=je(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,Sp):ge(a[8]),Tl),Gi(a[1])(e,l=Ve(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&&k(e),o&&o.d(a),t[10](null),r=!1,i()}}}function Lp(t){let e,n,r,i;const s=[Fp,Pp],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function Ip(t,e,n){let r;const i=["level","asChild","id","el"];let s=qe(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:h}=Ur();X(t,m,_=>n(7,o=_));const v=h("title");function g(_){ke[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),Et(_)),n(5,s=qe(e,i)),"level"in _&&n(1,a=_.level),"asChild"in _&&n(2,f=_.asChild),"id"in _&&n(6,c=_.id),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$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 gt extends ye{constructor(e){super(),be(this,e,Ip,Lp,de,{level:1,asChild:2,id:6,el:0})}}const Mp=t=>({builder:t&4}),Sl=t=>({builder:t[2]}),Np=t=>({builder:t&4}),Rl=t=>({builder:t[2]});function Vp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Sl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[je(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,Mp):ge(a[7]),Sl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function Hp(t){let e;const n=t[8].default,r=pe(n,t,t[7],Rl);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,Np):ge(i[7]),Rl)},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=[Hp,Vp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function Up(t,e,n){let r;const i=["asChild","el"];let s=qe(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Ur();X(t,c,v=>n(6,o=v));const m=Fn(),p=d("close");function h(v){ke[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),Et(v)),n(5,s=qe(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,h]}class Ot extends ye{constructor(e){super(),be(this,e,Up,Bp,de,{asChild:1,el:0})}}const jp=t=>({builder:t&4}),Pl=t=>({builder:t[2]}),Kp=t=>({builder:t&4}),Fl=t=>({builder:t[2]});function qp(t){let e,n,r,i;const s=t[7].default,o=pe(s,t,t[6],Pl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=je(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,jp):ge(a[6]),Pl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Wp(t){let e;const n=t[7].default,r=pe(n,t,t[6],Fl);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]),Fl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Qp(t){let e,n,r,i;const s=[Wp,qp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function zp(t,e,n){let r;const i=["asChild","el"];let s=qe(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Ur();X(t,c,h=>n(5,o=h));const m=d("portal");function p(h){ke[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),Et(h)),n(4,s=qe(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$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 xn extends ye{constructor(e){super(),be(this,e,zp,Qp,de,{asChild:1,el:0})}}const Gp=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),Yp=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),Zp=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),Xp=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),Jp=t=>({builder:t[0]&256}),Vl=t=>({builder:t[8]}),xp=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]});function eh(t){let e,n,r,i;const s=t[16].default,o=pe(s,t,t[15],Ll);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[je(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,Gp):ge(a[15]),Ll),le(e,l=Ve(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&&k(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function th(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Il);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[je(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,Yp):ge(t[15]),Il),le(e,a=Ve(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&&k(e),u&&u.d(f),t[55](null),f&&n&&n.end(),i=!1,Te(s)}}}function nh(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Ml);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[je(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,Zp):ge(t[15]),Ml),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||dt(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&k(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function rh(t){let e,n,r,i,s,o;const u=t[16].default,l=pe(u,t,t[15],Nl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){C(c,e,d),l&&l.m(e,null),t[53](e),i=!0,s||(o=[je(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,Xp):ge(t[15]),Nl),le(e,f=Ve(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&dt(()=>{i&&(r&&r.end(1),n=Rn(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&&k(e),l&&l.d(c),t[53](null),c&&r&&r.end(),s=!1,Te(o)}}}function ih(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Vl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[je(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,Jp):ge(t[15]),Vl),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&dt(()=>{r&&(n||(n=An(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=An(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&k(e),u&&u.d(f),t[52](null),f&&n&&n.end(),i=!1,Te(s)}}}function sh(t){let e;const n=t[16].default,r=pe(n,t,t[15],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]&33024)&&_e(r,n,i,i[15],e?he(n,i[15],s,xp):ge(i[15]),Hl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function oh(t){let e,n,r,i;const s=[sh,ih,rh,nh,th,eh],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=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}function lh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=qe(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:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{el:_=void 0}=e;const{elements:{content:w},states:{open:A},ids:T,getAttrs:E}=Ur();X(t,w,q=>n(14,o=q)),X(t,A,q=>n(9,u=q));const V=E("content");function O(q){Ae.call(this,t,q)}function W(q){Ae.call(this,t,q)}function U(q){Ae.call(this,t,q)}function S(q){Ae.call(this,t,q)}function K(q){Ae.call(this,t,q)}function $(q){Ae.call(this,t,q)}function N(q){Ae.call(this,t,q)}function H(q){Ae.call(this,t,q)}function j(q){Ae.call(this,t,q)}function ee(q){Ae.call(this,t,q)}function te(q){Ae.call(this,t,q)}function z(q){Ae.call(this,t,q)}function oe(q){Ae.call(this,t,q)}function Re(q){Ae.call(this,t,q)}function lt(q){Ae.call(this,t,q)}function He(q){Ae.call(this,t,q)}function Z(q){Ae.call(this,t,q)}function J(q){Ae.call(this,t,q)}function yt(q){Ae.call(this,t,q)}function vt(q){Ae.call(this,t,q)}function mt(q){Ae.call(this,t,q)}function mn(q){Ae.call(this,t,q)}function In(q){Ae.call(this,t,q)}function pn(q){Ae.call(this,t,q)}function ws(q){Ae.call(this,t,q)}function $s(q){Ae.call(this,t,q)}function Kr(q){Ae.call(this,t,q)}function qr(q){Ae.call(this,t,q)}function Wr(q){Ae.call(this,t,q)}function Qr(q){Ae.call(this,t,q)}function Os(q){Ae.call(this,t,q)}function zr(q){Ae.call(this,t,q)}function Fi(q){Ae.call(this,t,q)}function Q(q){Ae.call(this,t,q)}function ne(q){Ae.call(this,t,q)}function re(q){ke[q?"unshift":"push"](()=>{_=q,n(0,_)})}function ue(q){ke[q?"unshift":"push"](()=>{_=q,n(0,_)})}function $e(q){ke[q?"unshift":"push"](()=>{_=q,n(0,_)})}function Je(q){ke[q?"unshift":"push"](()=>{_=q,n(0,_)})}function wt(q){ke[q?"unshift":"push"](()=>{_=q,n(0,_)})}return t.$$set=q=>{e=ie(ie({},e),Et(q)),n(12,s=qe(e,i)),"transition"in q&&n(1,f=q.transition),"transitionConfig"in q&&n(2,c=q.transitionConfig),"inTransition"in q&&n(3,d=q.inTransition),"inTransitionConfig"in q&&n(4,m=q.inTransitionConfig),"outTransition"in q&&n(5,p=q.outTransition),"outTransitionConfig"in q&&n(6,h=q.outTransitionConfig),"asChild"in q&&n(7,v=q.asChild),"id"in q&&n(13,g=q.id),"el"in q&&n(0,_=q.el),"$$scope"in q&&n(15,a=q.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&T.content.set(g),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,V)},[_,f,c,d,m,p,h,v,r,u,w,A,s,g,o,a,l,O,W,U,S,K,$,N,H,j,ee,te,z,oe,Re,lt,He,Z,J,yt,vt,mt,mn,In,pn,ws,$s,Kr,qr,Wr,Qr,Os,zr,Fi,Q,ne,re,ue,$e,Je,wt]}class er extends ye{constructor(e){super(),be(this,e,lh,oh,de,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const uh=t=>({builder:t&256}),Bl=t=>({builder:t[8]});function ah(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){C(o,e,u),t[25](e),n||(r=[je(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){le(e,s=Ve(i,[u&256&&o[8],u&4096&&o[12]]))},i:me,o:me,d(o){o&&k(e),t[25](null),n=!1,Te(r)}}}function fh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){C(l,e,a),t[24](e),r=!0,i||(s=[je(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,le(e,u=Ve(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&&k(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function ch(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ie(o,s[u]);return{c(){e=D("div"),le(e,o)},m(u,l){C(u,e,l),t[23](e),r||(i=[je(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,le(e,o=Ve(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||dt(()=>{n=Rn(e,t[3],t[4]),n.start()}))},o:me,d(u){u&&k(e),t[23](null),r=!1,Te(i)}}}function dh(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),le(e,l)},m(a,f){C(a,e,f),t[22](e),i=!0,s||(o=[je(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,le(e,l=Ve(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&dt(()=>{i&&(r&&r.end(1),n=Rn(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&&k(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function mh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){C(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),je(t[8].action(e))],i=!0)},p(l,a){t=l,le(e,u=Ve(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&dt(()=>{r&&(n||(n=An(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=An(e,t[1],t[2],!1)),n.run(0)),r=!1},d(l){l&&k(e),t[21](null),l&&n&&n.end(),i=!1,Te(s)}}}function ph(t){let e;const n=t[15].default,r=pe(n,t,t[14],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&_e(r,n,i,i[14],e?he(n,i[14],s,uh):ge(i[14]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function hh(t){let e,n,r,i;const s=[ph,mh,dh,ch,fh,ah],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=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}function _h(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=qe(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:h=void 0}=e,{asChild:v=!1}=e,{el:g=void 0}=e;const{elements:{overlay:_},states:{open:w},getAttrs:A}=Ur();X(t,_,j=>n(13,o=j)),X(t,w,j=>n(9,u=j));const T=A("overlay");function E(j){Ae.call(this,t,j)}function V(j){Ae.call(this,t,j)}function O(j){Ae.call(this,t,j)}function W(j){Ae.call(this,t,j)}function U(j){Ae.call(this,t,j)}function S(j){ke[j?"unshift":"push"](()=>{g=j,n(0,g)})}function K(j){ke[j?"unshift":"push"](()=>{g=j,n(0,g)})}function $(j){ke[j?"unshift":"push"](()=>{g=j,n(0,g)})}function N(j){ke[j?"unshift":"push"](()=>{g=j,n(0,g)})}function H(j){ke[j?"unshift":"push"](()=>{g=j,n(0,g)})}return t.$$set=j=>{e=ie(ie({},e),Et(j)),n(12,s=qe(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,h=j.outTransitionConfig),"asChild"in j&&n(7,v=j.asChild),"el"in j&&n(0,g=j.el),"$$scope"in j&&n(14,a=j.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,T)},[g,f,c,d,m,p,h,v,r,u,_,w,s,o,a,l,E,V,O,W,U,S,K,$,N,H]}class jr extends ye{constructor(e){super(),be(this,e,_h,hh,de,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const gh=t=>({builder:t&4}),Ul=t=>({builder:t[2]}),bh=t=>({builder:t&4}),jl=t=>({builder:t[2]});function yh(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Ul);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[je(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,gh):ge(a[7]),Ul),le(e,l=Ve(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&&k(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function vh(t){let e;const n=t[8].default,r=pe(n,t,t[7],jl);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,bh):ge(i[7]),jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function kh(t){let e,n,r,i;const s=[vh,yh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function Ch(t,e,n){let r;const i=["asChild","el"];let s=qe(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Ur();X(t,c,v=>n(6,o=v));const m=Fn(),p=d("trigger");function h(v){ke[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),Et(v)),n(5,s=qe(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,h]}class tr extends ye{constructor(e){super(),be(this,e,Ch,kh,de,{asChild:1,el:0})}}const Eh=t=>({builder:t[0]&256}),Kl=t=>({builder:t[8]}),wh=t=>({builder:t[0]&256}),ql=t=>({builder:t[8]}),$h=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),Oh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),Ah=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),Th=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]});function Dh(t){let e,n,r,i;const s=t[28].default,o=pe(s,t,t[27],Kl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[je(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,Eh):ge(a[27]),Kl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function Sh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],ql);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[je(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,wh):ge(t[27]),ql),le(e,a=Ve(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&&k(e),u&&u.d(f),t[32](null),f&&n&&n.end(),i=!1,Te(s)}}}function Rh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Wl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[je(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,$h):ge(t[27]),Wl),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||dt(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&k(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function Ph(t){let e,n,r,i,s,o;const u=t[28].default,l=pe(u,t,t[27],Ql);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){C(c,e,d),l&&l.m(e,null),t[30](e),i=!0,s||(o=[je(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,Oh):ge(t[27]),Ql),le(e,f=Ve(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&dt(()=>{i&&(r&&r.end(1),n=Rn(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&&k(e),l&&l.d(c),t[30](null),c&&r&&r.end(),s=!1,Te(o)}}}function Fh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],zl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[je(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,Ah):ge(t[27]),zl),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&dt(()=>{r&&(n||(n=An(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=An(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&k(e),u&&u.d(f),t[29](null),f&&n&&n.end(),i=!1,Te(s)}}}function Lh(t){let e;const n=t[28].default,r=pe(n,t,t[27],Gl);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,Th):ge(i[27]),Gl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ih(t){let e,n,r,i;const s=[Lh,Fh,Ph,Rh,Sh,Dh],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=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}function Mh(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=qe(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:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:w="center"}=e,{sideOffset:A=0}=e,{alignOffset:T=0}=e,{collisionPadding:E=8}=e,{avoidCollisions:V=!0}=e,{collisionBoundary:O=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:U=!1}=e,{strategy:S="absolute"}=e,{overlap:K=!1}=e,{el:$=void 0}=e;const{elements:{menu:N},states:{open:H},ids:j,getAttrs:ee}=Ai();X(t,N,J=>n(26,u=J)),X(t,H,J=>n(9,o=J));const te=Fn(),z=ee("content");function oe(J){ke[J?"unshift":"push"](()=>{$=J,n(0,$)})}function Re(J){ke[J?"unshift":"push"](()=>{$=J,n(0,$)})}function lt(J){ke[J?"unshift":"push"](()=>{$=J,n(0,$)})}function He(J){ke[J?"unshift":"push"](()=>{$=J,n(0,$)})}function Z(J){ke[J?"unshift":"push"](()=>{$=J,n(0,$)})}return t.$$set=J=>{e=ie(ie({},e),Et(J)),n(13,s=qe(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,h=J.outTransitionConfig),"asChild"in J&&n(7,v=J.asChild),"id"in J&&n(14,g=J.id),"side"in J&&n(15,_=J.side),"align"in J&&n(16,w=J.align),"sideOffset"in J&&n(17,A=J.sideOffset),"alignOffset"in J&&n(18,T=J.alignOffset),"collisionPadding"in J&&n(19,E=J.collisionPadding),"avoidCollisions"in J&&n(20,V=J.avoidCollisions),"collisionBoundary"in J&&n(21,O=J.collisionBoundary),"sameWidth"in J&&n(22,W=J.sameWidth),"fitViewport"in J&&n(23,U=J.fitViewport),"strategy"in J&&n(24,S=J.strategy),"overlap"in J&&n(25,K=J.overlap),"el"in J&&n(0,$=J.el),"$$scope"in J&&n(27,a=J.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&g&&j.menu.set(g),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&Jm({side:_,align:w,sideOffset:A,alignOffset:T,collisionPadding:E,avoidCollisions:V,collisionBoundary:O,sameWidth:W,fitViewport:U,strategy:S,overlap:K})},[$,f,c,d,m,p,h,v,r,o,N,H,te,s,g,_,w,A,T,E,V,O,W,U,S,K,u,a,l,oe,Re,lt,He,Z]}class ys extends ye{constructor(e){super(),be(this,e,Mh,Ih,de,{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 vs(){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 Nh(t){const{NAME:e,PARTS:n,MENU_NAME:r}=vs(),i=_i(e,["root"]),s=_i(r,n),o={...Hm($i(t)),getAttrs:s,getMenubarAttrs:i};return ct(e,o),{...o,updateOption:Oi(o.options)}}function Vh(){const{NAME:t}=vs();return st(t)}function Hh(t){const{MENU_NAME:e}=vs(),{builders:{createMenu:n},getAttrs:r}=Vh(),i={...n({...$i(t),forceVisible:!1}),getAttrs:r};return ct(e,i),{...i,updateOption:Oi(i.options)}}function Bh(){const{MENU_NAME:t}=vs();return st(t)}const Uh=t=>({builder:t&4,ids:t&8}),Yl=t=>({builder:t[2],ids:t[3]}),jh=t=>({builder:t&4,ids:t&8}),Zl=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],Yl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=je(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,Uh):ge(a[12]),Yl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[14](null),r=!1,i()}}}function qh(t){let e;const n=t[13].default,r=pe(n,t,t[12],Zl);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,jh):ge(i[12]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Wh(t){let e,n,r,i;const s=[qh,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=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function Qh(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=qe(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:h=void 0}=e;const{elements:{menubar:v},updateOption:g,ids:_,getMenubarAttrs:w}=Nh({loop:f,closeOnEscape:c,preventScroll:p});X(t,v,V=>n(11,o=V));const A=Ue([_.menubar],([V])=>({menubar:V}));X(t,A,V=>n(3,u=V));const T=w("root");function E(V){ke[V?"unshift":"push"](()=>{h=V,n(0,h)})}return t.$$set=V=>{e=ie(ie({},e),Et(V)),n(6,s=qe(e,i)),"loop"in V&&n(7,f=V.loop),"closeOnEscape"in V&&n(8,c=V.closeOnEscape),"asChild"in V&&n(1,d=V.asChild),"id"in V&&n(9,m=V.id),"preventScroll"in V&&n(10,p=V.preventScroll),"el"in V&&n(0,h=V.el),"$$scope"in V&&n(12,a=V.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&m&&_.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,T)},[h,d,r,u,v,A,s,f,c,m,p,o,a,l,E]}class zh extends ye{constructor(e){super(),be(this,e,Qh,Wh,de,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const Gh=t=>({menuIds:t&1}),Xl=t=>({menuIds:t[0]});function Yh(t){let e;const n=t[15].default,r=pe(n,t,t[14],Xl);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,Gh):ge(i[14]),Xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Zh(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:h=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:g=void 0}=e;const{states:{open:_},updateOption:w,ids:A}=Hh({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:m,closeFocus:p,disableFocusFirstItem:h,closeOnItemClick:v,onOutsideClick:g,onOpenChange:({next:E})=>(a!==E&&(f==null||f(E),n(2,a=E)),E)}),T=Ue([A.menu,A.trigger],([E,V])=>({menu:E,trigger:V}));return X(t,T,E=>n(0,r=E)),t.$$set=E=>{"closeOnOutsideClick"in E&&n(3,o=E.closeOnOutsideClick),"closeOnEscape"in E&&n(4,u=E.closeOnEscape),"portal"in E&&n(5,l=E.portal),"open"in E&&n(2,a=E.open),"onOpenChange"in E&&n(6,f=E.onOpenChange),"loop"in E&&n(7,c=E.loop),"dir"in E&&n(8,d=E.dir),"typeahead"in E&&n(9,m=E.typeahead),"closeFocus"in E&&n(10,p=E.closeFocus),"disableFocusFirstItem"in E&&n(11,h=E.disableFocusFirstItem),"closeOnItemClick"in E&&n(12,v=E.closeOnItemClick),"onOutsideClick"in E&&n(13,g=E.onOutsideClick),"$$scope"in E&&n(14,s=E.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&_.set(a),t.$$.dirty&8&&w("closeOnOutsideClick",o),t.$$.dirty&16&&w("closeOnEscape",u),t.$$.dirty&32&&w("portal",l),t.$$.dirty&128&&w("loop",c),t.$$.dirty&256&&w("dir",d),t.$$.dirty&1024&&w("closeFocus",p),t.$$.dirty&2048&&w("disableFocusFirstItem",h),t.$$.dirty&512&&w("typeahead",m),t.$$.dirty&4096&&w("closeOnItemClick",v),t.$$.dirty&8192&&w("onOutsideClick",g)},[r,T,a,o,u,l,f,c,d,m,p,h,v,g,s,i]}class ks extends ye{constructor(e){super(),be(this,e,Zh,Yh,de,{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 Xh=t=>({builder:t&4}),Jl=t=>({builder:t[2]}),Jh=t=>({builder:t&4}),xl=t=>({builder:t[2]});function xh(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Jl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[je(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,Xh):ge(a[8]),Jl),le(e,l=Ve(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&&k(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function e_(t){let e;const n=t[9].default,r=pe(n,t,t[8],xl);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,Jh):ge(i[8]),xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function t_(t){let e,n,r,i;const s=[e_,xh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function n_(t,e,n){let r;const i=["asChild","id","el"];let s=qe(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();X(t,d,_=>n(7,o=_));const h=Fn(),v=p("trigger");function g(_){ke[_?"unshift":"push"](()=>{c=_,n(0,c)})}return t.$$set=_=>{e=ie(ie({},e),Et(_)),n(5,s=qe(e,i)),"asChild"in _&&n(1,a=_.asChild),"id"in _&&n(6,f=_.id),"el"in _&&n(0,c=_.el),"$$scope"in _&&n(8,l=_.$$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,h,s,f,o,l,u,g]}class Cs extends ye{constructor(e){super(),be(this,e,n_,t_,de,{asChild:1,id:6,el:0})}}const r_=t=>({ids:t&1}),eu=t=>({ids:t[0]});function i_(t){let e;const n=t[13].default,r=pe(n,t,t[12],eu);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,r_):ge(i[12]),eu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function s_(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:h=void 0}=e;const{updateOption:v,states:{open:g},ids:_}=wp({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:m,closeFocus:p,onOutsideClick:h,onOpenChange:({next:A})=>(c!==A&&(d==null||d(A),n(2,c=A)),A),positioning:{gutter:0,offset:{mainAxis:1}}}),w=Ue([_.content,_.trigger],([A,T])=>({content:A,trigger:T}));return X(t,w,A=>n(0,r=A)),t.$$set=A=>{"disableFocusTrap"in A&&n(3,o=A.disableFocusTrap),"closeOnEscape"in A&&n(4,u=A.closeOnEscape),"closeOnOutsideClick"in A&&n(5,l=A.closeOnOutsideClick),"preventScroll"in A&&n(6,a=A.preventScroll),"portal"in A&&n(7,f=A.portal),"open"in A&&n(2,c=A.open),"onOpenChange"in A&&n(8,d=A.onOpenChange),"openFocus"in A&&n(9,m=A.openFocus),"closeFocus"in A&&n(10,p=A.closeFocus),"onOutsideClick"in A&&n(11,h=A.onOutsideClick),"$$scope"in A&&n(12,s=A.$$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",h)},[r,w,c,o,u,l,a,f,d,m,p,h,s,i]}class o_ extends ye{constructor(e){super(),be(this,e,s_,i_,de,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const l_=t=>({builder:t[0]&256}),tu=t=>({builder:t[8]}),u_=t=>({builder:t[0]&256}),nu=t=>({builder:t[8]}),a_=t=>({builder:t[0]&256}),ru=t=>({builder:t[8]}),f_=t=>({builder:t[0]&256}),iu=t=>({builder:t[8]}),c_=t=>({builder:t[0]&256}),su=t=>({builder:t[8]}),d_=t=>({builder:t[0]&256}),ou=t=>({builder:t[8]});function m_(t){let e,n,r,i;const s=t[27].default,o=pe(s,t,t[26],tu);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=je(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,l_):ge(a[26]),tu),le(e,l=Ve(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&&k(e),o&&o.d(a),t[32](null),r=!1,i()}}}function p_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],nu);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=je(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,u_):ge(t[26]),nu),le(e,a=Ve(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&&k(e),u&&u.d(f),t[31](null),f&&n&&n.end(),i=!1,s()}}}function h_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],ru);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=je(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,a_):ge(t[26]),ru),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||dt(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&k(e),u&&u.d(f),t[30](null),i=!1,s()}}}function __(t){let e,n,r,i,s,o;const u=t[27].default,l=pe(u,t,t[26],iu);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){C(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=je(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,f_):ge(t[26]),iu),le(e,f=Ve(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&dt(()=>{i&&(r&&r.end(1),n=Rn(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&&k(e),l&&l.d(c),t[29](null),c&&r&&r.end(),s=!1,o()}}}function g_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],su);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){C(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=je(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,c_):ge(t[26]),su),le(e,a=Ve(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&dt(()=>{r&&(n||(n=An(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=An(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&k(e),u&&u.d(f),t[28](null),f&&n&&n.end(),i=!1,s()}}}function b_(t){let e;const n=t[27].default,r=pe(n,t,t[26],ou);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,d_):ge(i[26]),ou)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function y_(t){let e,n,r,i;const s=[b_,g_,__,h_,p_,m_],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=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}function v_(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=qe(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:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:w="center"}=e,{sideOffset:A=0}=e,{alignOffset:T=0}=e,{collisionPadding:E=8}=e,{avoidCollisions:V=!0}=e,{collisionBoundary:O=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:U=!1}=e,{strategy:S="absolute"}=e,{overlap:K=!1}=e,{el:$=void 0}=e;const{elements:{content:N},states:{open:H},ids:j,getAttrs:ee}=No();X(t,N,Z=>n(25,u=Z)),X(t,H,Z=>n(9,o=Z));const te=ee("content");function z(Z){ke[Z?"unshift":"push"](()=>{$=Z,n(0,$)})}function oe(Z){ke[Z?"unshift":"push"](()=>{$=Z,n(0,$)})}function Re(Z){ke[Z?"unshift":"push"](()=>{$=Z,n(0,$)})}function lt(Z){ke[Z?"unshift":"push"](()=>{$=Z,n(0,$)})}function He(Z){ke[Z?"unshift":"push"](()=>{$=Z,n(0,$)})}return t.$$set=Z=>{e=ie(ie({},e),Et(Z)),n(12,s=qe(e,i)),"transition"in Z&&n(1,f=Z.transition),"transitionConfig"in Z&&n(2,c=Z.transitionConfig),"inTransition"in Z&&n(3,d=Z.inTransition),"inTransitionConfig"in Z&&n(4,m=Z.inTransitionConfig),"outTransition"in Z&&n(5,p=Z.outTransition),"outTransitionConfig"in Z&&n(6,h=Z.outTransitionConfig),"asChild"in Z&&n(7,v=Z.asChild),"id"in Z&&n(13,g=Z.id),"side"in Z&&n(14,_=Z.side),"align"in Z&&n(15,w=Z.align),"sideOffset"in Z&&n(16,A=Z.sideOffset),"alignOffset"in Z&&n(17,T=Z.alignOffset),"collisionPadding"in Z&&n(18,E=Z.collisionPadding),"avoidCollisions"in Z&&n(19,V=Z.avoidCollisions),"collisionBoundary"in Z&&n(20,O=Z.collisionBoundary),"sameWidth"in Z&&n(21,W=Z.sameWidth),"fitViewport"in Z&&n(22,U=Z.fitViewport),"strategy"in Z&&n(23,S=Z.strategy),"overlap"in Z&&n(24,K=Z.overlap),"el"in Z&&n(0,$=Z.el),"$$scope"in Z&&n(26,a=Z.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&j.content.set(g),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,te),t.$$.dirty[0]&33538560&&o&&$p({side:_,align:w,sideOffset:A,alignOffset:T,collisionPadding:E,avoidCollisions:V,collisionBoundary:O,sameWidth:W,fitViewport:U,strategy:S,overlap:K})},[$,f,c,d,m,p,h,v,r,o,N,H,s,g,_,w,A,T,E,V,O,W,U,S,K,u,a,l,z,oe,Re,lt,He]}class k_ extends ye{constructor(e){super(),be(this,e,v_,y_,de,{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 C_=t=>({builder:t&4}),lu=t=>({builder:t[2]}),E_=t=>({builder:t&4}),uu=t=>({builder:t[2]});function w_(t){let e,n,r,i;const s=t[12].default,o=pe(s,t,t[11],lu);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[13](e),n=!0,r||(i=[je(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,C_):ge(a[11]),lu),le(e,l=Ve(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&&k(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function $_(t){let e;const n=t[12].default,r=pe(n,t,t[11],uu);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,E_):ge(i[11]),uu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function O_(t){let e,n,r,i;const s=[$_,w_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function A_(t,e,n){let r,i;const s=["asChild","id","el"];let o=qe(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:h},ids:v,getAttrs:g}=No();X(t,p,T=>n(9,u=T)),X(t,h,T=>n(10,l=T));const _=Fn(),w=g("trigger");function A(T){ke[T?"unshift":"push"](()=>{m=T,n(0,m)})}return t.$$set=T=>{e=ie(ie({},e),Et(T)),n(6,o=qe(e,s)),"asChild"in T&&n(1,c=T.asChild),"id"in T&&n(7,d=T.id),"el"in T&&n(0,m=T.el),"$$scope"in T&&n(11,f=T.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&v.trigger.set(d),t.$$.dirty&1024&&n(8,r={...w,"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,A]}class T_ extends ye{constructor(e){super(),be(this,e,A_,O_,de,{asChild:1,id:7,el:0})}}function Cf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function D_(t){const{NAME:e,PARTS:n}=Cf(),r=_i(e,n),i={...Qm($i(t)),getAttrs:r};return ct(e,i),{...i,updateOption:Oi(i.options)}}function S_(){const{NAME:t}=Cf();return st(t)}const R_=t=>({builder:t&4}),au=t=>({builder:t[2]}),P_=t=>({builder:t&4}),fu=t=>({builder:t[2]});function F_(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],au);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=je(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,R_):ge(a[8]),au),le(e,l=Ve(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&&k(e),o&&o.d(a),t[10](null),r=!1,i()}}}function L_(t){let e;const n=t[9].default,r=pe(n,t,t[8],fu);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,P_):ge(i[8]),fu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function I_(t){let e,n,r,i;const s=[L_,F_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function M_(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=qe(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:h}=D_({loop:a,orientation:f});X(t,m,_=>n(7,o=_));const v=h("root");function g(_){ke[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),Et(_)),n(4,s=qe(e,i)),"loop"in _&&n(5,a=_.loop),"orientation"in _&&n(6,f=_.orientation),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$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 N_ extends ye{constructor(e){super(),be(this,e,M_,I_,de,{loop:5,orientation:6,asChild:1,el:0})}}const V_=t=>({builder:t&4}),cu=t=>({builder:t[2]}),H_=t=>({builder:t&4}),du=t=>({builder:t[2]});function B_(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],cu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(e,l)},m(a,f){C(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[je(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,V_):ge(a[7]),cu),le(e,l=Ve(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&&k(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function U_(t){let e;const n=t[8].default,r=pe(n,t,t[7],du);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,H_):ge(i[7]),du)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function j_(t){let e,n,r,i;const s=[U_,B_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function K_(t,e,n){let r;const i=["asChild","el"];let s=qe(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=S_();X(t,c,g=>n(6,o=g));const m=Fn(),p=d("button");function h(g){Ae.call(this,t,g)}function v(g){ke[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),Et(g)),n(5,s=qe(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,h,v]}class q_ extends ye{constructor(e){super(),be(this,e,K_,j_,de,{asChild:1,el:0})}}var av="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",Ef="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",W_="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",fv="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",cv="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",dv="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",wf="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",Q_="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",z_="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",G_="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",Y_="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",Z_="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",X_="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",J_="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",x_="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",e1="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",t1="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",n1="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",r1="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",i1="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",s1="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",mv="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",o1="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",l1="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",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 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",Ht="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",$f="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",pv="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",a1="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function f1(t){let e,n,r,i,s=t[0]!==null&&mu(t);return{c(){e=Ks("svg"),s&&s.c(),n=Ks("path"),F(n,"d",t[1]),F(e,"class",r="fill-current "+t[2]),F(e,"viewBox","0 0 24 24"),F(e,"aria-hidden",i=t[0]===null?"true":"false")},m(o,u){C(o,e,u),s&&s.m(e,null),P(e,n)},p(o,u){o[0]!==null?s?s.p(o,u):(s=mu(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&F(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&F(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&F(e,"aria-hidden",i)},d(o){o&&k(e),s&&s.d()}}}function c1(t){let e,n;return{c(){e=D("span"),F(e,"class",n="block "+t[2])},m(r,i){C(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&F(e,"class",n)},d(r){r&&k(e)}}}function mu(t){let e,n;return{c(){e=Ks("title"),n=Y(t[0])},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&1&&Ne(n,r[0])},d(r){r&&k(e)}}}function d1(t){let e;function n(s,o){return s[1]===null?c1:f1}let r=n(t),i=r(t);return{c(){i.c(),e=Oe()},m(s,o){i.m(s,o),C(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&&k(e),i.d(s)}}}function m1(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 De extends ye{constructor(e){super(),be(this,e,m1,d1,de,{label:0,path:1,class:2})}}async function cn({queryKey:t}){if(t){const e=["/api"];for(const r of t)r!==""&&(r[0]==="?"||r[0]==="&"||e.push("/"),e.push(r));let n=await window.fetch(e.join(""));if(n.ok)return await n.json()}throw new Error("Could not fetch data")}function 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 hv(t){return t.content&&t.content.length>0?Of(t.content[0]):"<Empty Document>"}function Af(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 Tf(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 p1(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);n.has(t)&&(n.delete(t),window.location.hash=n.toString())}function fs(t){return t[0].toUpperCase()+t.substring(1)}const ot=Fe(null),h1=Fe(null),pu=Fe(!1);ot.subscribe(t=>{t!==null&&Af("path",t.fullpath)});function Ln(){return st("apiStatus")}function Vo(){return st("currentUser")}function _v(){return st("uEditorConfig")}function bt(){return st("currentBranch")}function Ho(){return st("branches")}function _1(){return st("authStatus")}function g1(){return st("hasLoggedOut")}function gv(){return st("configuredTEIBlocks")}function bv(){return st("configuredTEIMarks")}function hu(t,e,n){const r=t.slice();return r[7]=e[n],r}function b1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new De({props:{path:Ht,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),s=Y(i),o=Y(" actions running"),F(r,"class","pl-2")},m(l,a){L(e,l,a),C(l,n,a),C(l,r,a),P(r,s),P(r,o),u=!0},p(l,a){(!u||a&3)&&i!==(i=l[0].length+l[1]+"")&&Ne(s,i)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(k(n),k(r)),I(e,l)}}}function y1(t){let e,n,r,i;return e=new De({props:{path:Ht,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="1 action running",F(r,"class","pl-2")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function v1(t){let e;return{c(){e=D("span"),e.textContent="Idle"},m(n,r){C(n,e,r)},p:me,i:me,o:me,d(n){n&&k(e)}}}function k1(t){let e,n,r,i;const s=[v1,y1,b1],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=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function C1(t){let e,n,r,i;return e=new De({props:{path:Ht,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Saving file",F(r,"class","flex-1")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function E1(t){let e,n,r,i;return e=new De({props:{path:Ht,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Loading file",F(r,"class","flex-1")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function _u(t){let e,n,r,i;const s=[E1,C1],o=[];function u(l,a){return l[7].action==="LoadTextFile"?0:l[7].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=D("li"),r&&r.c(),F(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){C(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,a){let f=n;n=u(l),n!==f&&(r&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(e),~n&&o[n].d()}}}function gu(t){let e,n,r,i,s;return n=new De({props:{path:Ht,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=D("li"),M(n.$$.fragment),r=B(),i=D("span"),i.textContent="Fetching branches",F(i,"class","flex-1"),F(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){C(o,e,u),L(n,e,null),P(e,r),P(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),s=!1},d(o){o&&k(e),I(n)}}}function w1(t){let e,n,r,i=Kt(t[0]),s=[];for(let l=0;l<i.length;l+=1)s[l]=_u(hu(t,i,l));const o=l=>y(s[l],1,1,()=>{s[l]=null});let u=t[2].isFetching&&gu();return{c(){e=D("ul");for(let l=0;l<s.length;l+=1)s[l].c();n=B(),u&&u.c()},m(l,a){C(l,e,a);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);P(e,n),u&&u.m(e,null),r=!0},p(l,a){if(a&1){i=Kt(l[0]);let f;for(f=0;f<i.length;f+=1){const c=hu(l,i,f);s[f]?(s[f].p(c,a),b(s[f],1)):(s[f]=_u(c),s[f].c(),b(s[f],1),s[f].m(e,n))}for(fe(),f=i.length;f<s.length;f+=1)o(f);ce()}l[2].isFetching?u?a&4&&b(u,1):(u=gu(),u.c(),b(u,1),u.m(e,null)):u&&(fe(),y(u,1,1,()=>{u=null}),ce())},i(l){if(!r){for(let a=0;a<i.length;a+=1)b(s[a]);b(u),r=!0}},o(l){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)y(s[a]);y(u),r=!1},d(l){l&&k(e),Ir(s,l),u&&u.d()}}}function $1(t){let e,n,r,i;return e=new T_({props:{class:"inline-flex items-center",$$slots:{default:[k1]},$$scope:{ctx:t}}}),r=new k_({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[w1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&1027&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&1029&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&k(n),I(e,s),I(r,s)}}}function bu(t){let e,n;return e=new Qn({props:{open:!0,onOpenChange:t[6],$$slots:{default:[S1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function O1(t){let e;return{c(){e=Y("Saving failed")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function A1(t){let e;return{c(){e=Y("Close")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function T1(t){let e,n,r,i,s,o,u,l;return e=new gt({props:{$$slots:{default:[O1]},$$scope:{ctx:t}}}),u=new Ot({props:{"data-button":!0,$$slots:{default:[A1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("div"),i=D("p"),i.textContent="Unfortunately saving the file failed.",s=B(),o=D("div"),M(u.$$.fragment),F(o,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(a,f){L(e,a,f),C(a,n,f),C(a,r,f),P(r,i),P(r,s),P(r,o),L(u,o,null),l=!0},p(a,f){const c={};f&1024&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&1024&&(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&&(k(n),k(r)),I(e,a),I(u)}}}function D1(t){let e,n,r,i;return e=new jr({}),r=new er({props:{$$slots:{default:[T1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&k(n),I(e,s),I(r,s)}}}function S1(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[D1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&k(n),I(e,s),I(r,s)}}}function R1(t){let e,n,r,i;e=new o_({props:{$$slots:{default:[$1]},$$scope:{ctx:t}}});let s=t[3]&&bu(t);return{c(){M(e.$$.fragment),n=B(),s&&s.c(),r=Oe()},m(o,u){L(e,o,u),C(o,n,u),s&&s.m(o,u),C(o,r,u),i=!0},p(o,[u]){const l={};u&1031&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[3]?s?(s.p(o,u),u&8&&b(s,1)):(s=bu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(fe(),y(s,1,1,()=>{s=null}),ce())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(k(n),k(r)),I(e,o),s&&s.d(o)}}}const ho=Fe([]);let _o=Fe(!1);function Df(t){t.status="active",ho.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=P1(t):t.action==="SaveCurrentFile"?e=F1(t):t.action==="SynchroniseBranches"&&(e=L1(t)),e!==null&&e.then(()=>{ho.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function P1(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function F1(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():_o.set(!0)}async function L1(t){await window.fetch("/api/branches",{method:"PATCH"}),t.callback&&t.callback()}function I1(t,e,n){let r,i,s,o;X(t,ho,f=>n(0,r=f)),X(t,_o,f=>n(3,o=f));const u=Ho();X(t,u,f=>n(2,s=f));const l=Ue([u],f=>{let c=0;for(const d of f)d!==null&&d.isFetching&&(c=c+1);return c});return X(t,l,f=>n(1,i=f)),[r,i,s,o,u,l,f=>{f||_o.set(!1)}]}let M1=class extends ye{constructor(e){super(),be(this,e,I1,R1,de,{})}};function N1(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 V1(t){let e,n,r,i;return e=new jr({}),r=new er({props:{$$slots:{default:[N1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function H1(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[V1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function B1(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[H1]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Qn({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function U1(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=null;let{open:o=!1}=e;function u(a){a||Ge.set(we.NONE)}ds(()=>{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 qt extends ye{constructor(e){super(),be(this,e,U1,B1,de,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function j1(t){let e;return{c(){e=Y("Create a new branch")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function yu(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function K1(t){let e,n,r,i;return e=new Ot({props:{"data-button":!0,$$slots:{default:[W1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("button"),r.textContent="Create",F(r,"type","submit"),F(r,"data-button","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function q1(t){let e,n,r,i;return n=new De({props:{path:Ht,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),M(n.$$.fragment),r=D("span"),r.textContent="Creating...",F(e,"data-button",""),F(e,"class","inline-flex")},m(s,o){C(s,e,o),L(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&k(e),I(n)}}}function W1(t){let e;return{c(){e=Y("Don't create")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Q1(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h;e=new gt({props:{$$slots:{default:[j1]},$$scope:{ctx:t}}});let v=t[2]&&yu(t);const g=[q1,K1],_=[];function w(A,T){return A[3].isPending?0:1}return c=w(t),d=_[c]=g[c](t),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=B(),u=D("input"),l=B(),v&&v.c(),a=B(),f=D("div"),d.c(),F(s,"data-form-field-label",""),F(u,"type","text"),F(u,"data-form-field-text",""),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(A,T){L(e,A,T),C(A,n,T),C(A,r,T),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),v&&v.m(i,null),P(r,a),P(r,f),_[c].m(f,null),m=!0,p||(h=[G(u,"input",t[7]),G(r,"submit",t[6])],p=!0)},p(A,T){const E={};T&2048&&(E.$$scope={dirty:T,ctx:A}),e.$set(E),T&2&&u.value!==A[1]&&it(u,A[1]),A[2]?v?v.p(A,T):(v=yu(A),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let V=c;c=w(A),c!==V&&(fe(),y(_[V],1,1,()=>{_[V]=null}),ce(),d=_[c],d||(d=_[c]=g[c](A),d.c()),b(d,1),d.m(f,null))},i(A){m||(b(e.$$.fragment,A),b(d),m=!0)},o(A){y(e.$$.fragment,A),y(d),m=!1},d(A){A&&(k(n),k(r)),I(e,A),v&&v.d(),_[c].d(),p=!1,Te(h)}}}function z1(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[Q1]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function G1(t,e,n){let r;const i=_t(),s=bt();let o=!1,u="",l="";function a(p){p&&n(1,u="")}const f=Ci({mutationFn:async p=>{const h=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:p.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(h.ok){i.invalidateQueries({queryKey:["branches"]});const v=await h.json();s.set(v),Ge.set(we.NONE)}else n(2,l=(await h.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});X(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 Y1 extends ye{constructor(e){super(),be(this,e,G1,z1,de,{})}}function Z1(t){let e;return{c(){e=Y("Delete the branch")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function vu(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function X1(t){let e,n,r,i;return e=new Ot({props:{"data-button":!0,$$slots:{default:[x1]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("button"),r.textContent="Delete",F(r,"type","submit"),F(r,"data-button","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function J1(t){let e,n,r,i;return n=new De({props:{path:Ht,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),M(n.$$.fragment),r=D("span"),r.textContent="Deleting...",F(e,"data-button",""),F(e,"class","inline-flex")},m(s,o){C(s,e,o),L(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&k(e),I(n)}}}function x1(t){let e;return{c(){e=Y("Don't delete")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function eg(t){var H;let e,n,r,i,s,o,u=((H=t[5])==null?void 0:H.title)+"",l,a,f,c,d,m,p,h,v,g,_,w,A,T,E,V,O,W,U;e=new gt({props:{$$slots:{default:[Z1]},$$scope:{ctx:t}}});let S=t[2]&&vu(t);const K=[J1,X1],$=[];function N(j,ee){return j[4].isPending?0:1}return E=N(t),V=$[E]=K[E](t),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("p"),s=Y("Please confirm you wish to delete the branch "),o=D("span"),l=Y(u),a=Y(`. This cannot be undone. To confirm the action, please enter the name of
|
|
13
|
+
the branch to delete.`),f=B(),c=D("label"),d=D("span"),d.textContent="Confirm branch name",m=B(),p=D("input"),h=B(),S&&S.c(),v=B(),g=D("label"),_=D("input"),w=Y(` Only delete the local
|
|
14
|
+
branch`),A=B(),T=D("div"),V.c(),F(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),F(i,"class","mb-4"),F(d,"data-form-field-label",""),F(p,"type","text"),F(p,"data-form-field-text",""),F(c,"class","block mb-4"),F(_,"type","checkbox"),F(g,"class","block text-sm"),F(T,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(j,ee){L(e,j,ee),C(j,n,ee),C(j,r,ee),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[1]),P(c,h),S&&S.m(c,null),P(r,v),P(r,g),P(g,_),_.checked=t[3],P(g,w),P(r,A),P(r,T),$[E].m(T,null),O=!0,W||(U=[G(p,"input",t[10]),G(_,"change",t[11]),G(r,"submit",t[9])],W=!0)},p(j,ee){var oe;const te={};ee&16384&&(te.$$scope={dirty:ee,ctx:j}),e.$set(te),(!O||ee&32)&&u!==(u=((oe=j[5])==null?void 0:oe.title)+"")&&Ne(l,u),ee&2&&p.value!==j[1]&&it(p,j[1]),j[2]?S?S.p(j,ee):(S=vu(j),S.c(),S.m(c,null)):S&&(S.d(1),S=null),ee&8&&(_.checked=j[3]);let z=E;E=N(j),E!==z&&(fe(),y($[z],1,1,()=>{$[z]=null}),ce(),V=$[E],V||(V=$[E]=K[E](j),V.c()),b(V,1),V.m(T,null))},i(j){O||(b(e.$$.fragment,j),b(V),O=!0)},o(j){y(e.$$.fragment,j),y(V),O=!1},d(j){j&&(k(n),k(r)),I(e,j),S&&S.d(),$[E].d(),W=!1,Te(U)}}}function tg(t){let e,n,r;function i(o){t[12](o)}let s={onOpenChange:t[7],$$slots:{default:[eg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(e,o,u),r=!0},p(o,[u]){const l={};u&16446&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function ng(t,e,n){let r,i;const s=_t(),o=bt();X(t,o,g=>n(5,i=g));let u=!1,l="",a="",f=!1;function c(g){g&&n(1,l="")}const d=Ci({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json","X-UEDITOR-DELETE-LOCAL-ONLY":f?"true":"false"}});g.ok?(s.invalidateQueries({queryKey:["branches"]}),o.set(null),Ge.set(we.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}});X(t,d,g=>n(4,r=g));function m(g){g.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 p(){l=this.value,n(1,l)}function h(){f=this.checked,n(3,f)}function v(g){u=g,n(0,u)}return[u,l,a,f,r,i,o,c,d,m,p,h,v]}class rg extends ye{constructor(e){super(),be(this,e,ng,tg,de,{})}}function ku(t,e,n){const r=t.slice();return r[14]=e[n],r}function ig(t){let e;return{c(){e=Y("Import a remote branch")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Cu(t){let e,n=t[14].title+"",r,i;return{c(){e=D("option"),r=Y(n),e.__value=i=t[14].id,it(e,e.__value)},m(s,o){C(s,e,o),P(e,r)},p(s,o){o&16&&n!==(n=s[14].title+"")&&Ne(r,n),o&16&&i!==(i=s[14].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&k(e)}}}function Eu(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function sg(t){let e,n,r,i;return e=new Ot({props:{"data-button":!0,$$slots:{default:[lg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("button"),r.textContent="Import",F(r,"type","submit"),F(r,"data-button","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function og(t){let e,n,r,i;return n=new De({props:{path:Ht,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),M(n.$$.fragment),r=D("span"),r.textContent="Importing...",F(e,"data-button",""),F(e,"class","inline-flex")},m(s,o){C(s,e,o),L(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&k(e),I(n)}}}function lg(t){let e;return{c(){e=Y("Don't import")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function ug(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h;e=new gt({props:{$$slots:{default:[ig]},$$scope:{ctx:t}}});let v=Kt(t[4]),g=[];for(let E=0;E<v.length;E+=1)g[E]=Cu(ku(t,v,E));let _=t[2]&&Eu(t);const w=[og,sg],A=[];function T(E,V){return E[3].isPending?0:1}return c=T(t),d=A[c]=w[c](t),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=B(),u=D("select");for(let E=0;E<g.length;E+=1)g[E].c();l=B(),_&&_.c(),a=B(),f=D("div"),d.c(),F(s,"data-form-field-label",""),F(u,"data-form-field-text",""),t[1]===void 0&&dt(()=>t[9].call(u)),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(E,V){L(e,E,V),C(E,n,V),C(E,r,V),P(r,i),P(i,s),P(i,o),P(i,u);for(let O=0;O<g.length;O+=1)g[O]&&g[O].m(u,null);Wo(u,t[1],!0),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),A[c].m(f,null),m=!0,p||(h=[G(u,"change",t[9]),G(r,"submit",t[8])],p=!0)},p(E,V){const O={};if(V&131072&&(O.$$scope={dirty:V,ctx:E}),e.$set(O),V&16){v=Kt(E[4]);let U;for(U=0;U<v.length;U+=1){const S=ku(E,v,U);g[U]?g[U].p(S,V):(g[U]=Cu(S),g[U].c(),g[U].m(u,null))}for(;U<g.length;U+=1)g[U].d(1);g.length=v.length}V&18&&Wo(u,E[1]),E[2]?_?_.p(E,V):(_=Eu(E),_.c(),_.m(i,null)):_&&(_.d(1),_=null);let W=c;c=T(E),c!==W&&(fe(),y(A[W],1,1,()=>{A[W]=null}),ce(),d=A[c],d||(d=A[c]=w[c](E),d.c()),b(d,1),d.m(f,null))},i(E){m||(b(e.$$.fragment,E),b(d),m=!0)},o(E){y(e.$$.fragment,E),y(d),m=!1},d(E){E&&(k(n),k(r)),I(e,E),Ir(g,E),_&&_.d(),A[c].d(),p=!1,Te(h)}}}function ag(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[ug]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(e,o,u),r=!0},p(o,[u]){const l={};u&131102&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function fg(t,e,n){let r,i;const s=_t(),o=bt(),u=Ho();let l=!1,a="",f="";function c(g){g&&n(1,a="")}const d=Ue(u,g=>g.isSuccess?g.data.remote.filter(_=>{let w=!1;for(const A of g.data.local)if(_.id.endsWith("/"+A.id)){w=!0;break}return!w}).map(_=>({id:_.id.substring(_.id.indexOf("/")+1),title:_.title,nogit:!1})):[]);X(t,d,g=>n(4,i=g));const m=Ci({mutationFn:async g=>{const _=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:g.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(_.ok){s.invalidateQueries({queryKey:["branches"]});const w=await _.json();o.set(w),Ge.set(we.NONE)}else n(2,f=(await _.json()).detail[0].msg),n(2,f=f[0].toUpperCase()+f.substring(1))}});X(t,m,g=>n(3,r=g));async function p(g){g.preventDefault(),r.mutate({title:a})}function h(){a=Gf(this),n(1,a)}function v(g){l=g,n(0,l)}return[l,a,f,r,i,c,d,m,p,h,v]}class cg extends ye{constructor(e){super(),be(this,e,fg,ag,de,{})}}function dg(t){let e;return{c(){e=Y("Merge changes from the default branch")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function wu(t){let e,n;return{c(){e=D("p"),n=Y(t[1]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&2&&Ne(n,r[1])},d(r){r&&k(e)}}}function mg(t){let e,n,r,i;return e=new Ot({props:{"data-button":!0,$$slots:{default:[hg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("button"),r.textContent="Merge",F(r,"type","submit"),F(r,"data-button","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function pg(t){let e,n,r,i;return n=new De({props:{path:Ht,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),M(n.$$.fragment),r=D("span"),r.textContent="Merging...",F(e,"data-button",""),F(e,"class","inline-flex")},m(s,o){C(s,e,o),L(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&k(e),I(n)}}}function hg(t){let e;return{c(){e=Y("Don't merge")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function _g(t){var U;let e,n,r,i,s,o,u=fs(t[4].data.git.default_branch)+"",l,a,f,c=((U=t[3])==null?void 0:U.title)+"",d,m,p,h,v,g,_,w,A,T;e=new gt({props:{$$slots:{default:[dg]},$$scope:{ctx:t}}});let E=t[1]&&wu(t);const V=[pg,mg],O=[];function W(S,K){return S[2].isPending?0:1}return g=W(t),_=O[g]=V[g](t),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("p"),s=Y("Please confirm you wish to merge all changes from the default branch "),o=D("span"),l=Y(u),a=Y(`
|
|
15
|
+
into the current branch`),f=D("span"),d=Y(c),m=Y(". This cannot be undone."),p=B(),E&&E.c(),h=B(),v=D("div"),_.c(),F(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),F(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),F(i,"class","mb-4"),F(v,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(S,K){L(e,S,K),C(S,n,K),C(S,r,K),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(i,f),P(f,d),P(i,m),P(r,p),E&&E.m(r,null),P(r,h),P(r,v),O[g].m(v,null),w=!0,A||(T=G(r,"submit",t[9]),A=!0)},p(S,K){var H;const $={};K&8192&&($.$$scope={dirty:K,ctx:S}),e.$set($),(!w||K&16)&&u!==(u=fs(S[4].data.git.default_branch)+"")&&Ne(l,u),(!w||K&8)&&c!==(c=((H=S[3])==null?void 0:H.title)+"")&&Ne(d,c),S[1]?E?E.p(S,K):(E=wu(S),E.c(),E.m(r,h)):E&&(E.d(1),E=null);let N=g;g=W(S),g!==N&&(fe(),y(O[N],1,1,()=>{O[N]=null}),ce(),_=O[g],_||(_=O[g]=V[g](S),_.c()),b(_,1),_.m(v,null))},i(S){w||(b(e.$$.fragment,S),b(_),w=!0)},o(S){y(e.$$.fragment,S),y(_),w=!1},d(S){S&&(k(n),k(r)),I(e,S),E&&E.d(),O[g].d(),A=!1,T()}}}function gg(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[_g]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function bg(t,e,n){let r,i,s;const o=_t(),u=Ln();X(t,u,h=>n(4,s=h));const l=bt();X(t,l,h=>n(3,i=h));let a=!1,f="";function c(h){}const d=Ci({mutationFn:async()=>{const h=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});h.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(we.NONE)):(n(1,f=(await h.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});X(t,d,h=>n(2,r=h));function m(h){h.preventDefault(),r.mutate()}function p(h){a=h,n(0,a)}return[a,f,r,i,s,u,l,c,d,m,p]}class yg extends ye{constructor(e){super(),be(this,e,bg,gg,de,{})}}function vg(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=Y('Create a new Folder in "'),r=Y(n),i=Y('"')},m(u,l){C(u,e,l),C(u,r,l),C(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:"/")+"")&&Ne(r,n)},d(u){u&&(k(e),k(r),k(i))}}}function $u(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function kg(t){let e;return{c(){e=Y("Don't create")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Cg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v;e=new gt({props:{$$slots:{default:[vg]},$$scope:{ctx:t}}});let g=t[2]&&$u(t);return c=new Ot({props:{"data-button":!0,$$slots:{default:[kg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=B(),u=D("input"),l=B(),g&&g.c(),a=B(),f=D("div"),M(c.$$.fragment),d=B(),m=D("button"),m.textContent="Create",F(s,"data-form-field-label",""),F(u,"type","text"),F(u,"data-form-field-text",""),F(m,"type","submit"),F(m,"data-button",""),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(_,w){L(e,_,w),C(_,n,w),C(_,r,w),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),L(c,f,null),P(f,d),P(f,m),p=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,w){const A={};w&2056&&(A.$$scope={dirty:w,ctx:_}),e.$set(A),w&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,w):(g=$u(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};w&2048&&(T.$$scope={dirty:w,ctx:_}),c.$set(T)},i(_){p||(b(e.$$.fragment,_),b(c.$$.fragment,_),p=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),p=!1},d(_){_&&(k(n),k(r)),I(e,_),g&&g.d(),I(c),h=!1,Te(v)}}}function Eg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Cg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function wg(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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 h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(we.NONE)):(n(2,a=(await h.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(we.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 ye{constructor(e){super(),be(this,e,wg,Eg,de,{})}};function Og(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Y("Delete "),n=D("span"),i=Y(r),F(n,"class","font-bold")},m(o,u){C(o,e,u),C(o,n,u),P(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&Ne(i,r)},d(o){o&&(k(e),k(n))}}}function Ou(t){let e,n;return{c(){e=D("span"),n=Y(t[1]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&2&&Ne(n,r[1])},d(r){r&&k(e)}}}function Ag(t){let e;return{c(){e=Y("Don't delete")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Tg(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,m,p,h,v,g,_,w,A,T,E,V;e=new gt({props:{class:"bg-rose-700",$$slots:{default:[Og]},$$scope:{ctx:t}}});let O=t[1]&&Ou(t);return _=new Ot({props:{"data-button":!0,$$slots:{default:[Ag]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("p"),s=Y("Please confirm you wish to delete the folder "),o=D("span"),l=Y(u),a=Y(`
|
|
16
|
+
and all the files and folders within that. To confirm the action, please enter
|
|
17
|
+
the name of the folder to delete.`),f=B(),c=D("label"),d=D("span"),d.textContent="Confirmation Folder Name",m=B(),p=D("input"),h=B(),O&&O.c(),v=B(),g=D("div"),M(_.$$.fragment),w=B(),A=D("button"),A.textContent="Delete",F(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),F(i,"class","mb-4"),F(d,"data-form-field-label",""),F(p,"type","text"),F(p,"data-form-field-text",""),F(c,"class","block"),F(A,"type","submit"),F(A,"data-button",""),F(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),F(g,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(U,S){L(e,U,S),C(U,n,S),C(U,r,S),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[2]),P(c,h),O&&O.m(c,null),P(r,v),P(r,g),L(_,g,null),P(g,w),P(g,A),T=!0,E||(V=[G(p,"input",t[7]),G(r,"submit",t[5])],E=!0)},p(U,S){var N;const K={};S&2056&&(K.$$scope={dirty:S,ctx:U}),e.$set(K),(!T||S&8)&&u!==(u=((N=U[3])==null?void 0:N.fullpath)+"")&&Ne(l,u),S&4&&p.value!==U[2]&&it(p,U[2]),U[1]?O?O.p(U,S):(O=Ou(U),O.c(),O.m(c,null)):O&&(O.d(1),O=null);const $={};S&2048&&($.$$scope={dirty:S,ctx:U}),_.$set($)},i(U){T||(b(e.$$.fragment,U),b(_.$$.fragment,U),T=!0)},o(U){y(e.$$.fragment,U),y(_.$$.fragment,U),T=!1},d(U){U&&(k(n),k(r)),I(e,U),O&&O.d(),I(_),E=!1,Te(V)}}}function Dg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Tg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function Sg(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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/"]}),ot.set(null),n(0,u=!1),Ge.set(we.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(we.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 Sf=class extends ye{constructor(e){super(),be(this,e,Sg,Dg,de,{})}};function Rg(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=Y('Rename "'),r=Y(n),i=Y('"')},m(u,l){C(u,e,l),C(u,r,l),C(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:"/")+"")&&Ne(r,n)},d(u){u&&(k(e),k(r),k(i))}}}function Au(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function Pg(t){let e;return{c(){e=Y("Don't rename")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Fg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v;e=new gt({props:{$$slots:{default:[Rg]},$$scope:{ctx:t}}});let g=t[2]&&Au(t);return c=new Ot({props:{"data-button":!0,$$slots:{default:[Pg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=B(),u=D("input"),l=B(),g&&g.c(),a=B(),f=D("div"),M(c.$$.fragment),d=B(),m=D("button"),m.textContent="Rename",F(s,"data-form-field-label",""),F(u,"type","text"),F(u,"data-form-field-text",""),F(m,"type","submit"),F(m,"data-button",""),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(_,w){L(e,_,w),C(_,n,w),C(_,r,w),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),L(c,f,null),P(f,d),P(f,m),p=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,w){const A={};w&2056&&(A.$$scope={dirty:w,ctx:_}),e.$set(A),w&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,w):(g=Au(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};w&2048&&(T.$$scope={dirty:w,ctx:_}),c.$set(T)},i(_){p||(b(e.$$.fragment,_),b(c.$$.fragment,_),p=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),p=!1},d(_){_&&(k(n),k(r)),I(e,_),g&&g.d(),I(c),h=!1,Te(v)}}}function Lg(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 qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function Ig(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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 h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+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/"]}),ot.set(null),Ge.set(we.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(we.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 Mg=class extends ye{constructor(e){super(),be(this,e,Ig,Lg,de,{})}};function Ng(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=Y('Create a new File in "'),r=Y(n),i=Y('"')},m(u,l){C(u,e,l),C(u,r,l),C(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:"/")+"")&&Ne(r,n)},d(u){u&&(k(e),k(r),k(i))}}}function Tu(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function Vg(t){let e;return{c(){e=Y("Don't create")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Hg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v;e=new gt({props:{$$slots:{default:[Ng]},$$scope:{ctx:t}}});let g=t[2]&&Tu(t);return c=new Ot({props:{"data-button":!0,$$slots:{default:[Vg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=B(),u=D("input"),l=B(),g&&g.c(),a=B(),f=D("div"),M(c.$$.fragment),d=B(),m=D("button"),m.textContent="Create",F(s,"data-form-field-label",""),F(u,"type","text"),F(u,"data-form-field-text",""),F(m,"type","submit"),F(m,"data-button",""),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(_,w){L(e,_,w),C(_,n,w),C(_,r,w),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),L(c,f,null),P(f,d),P(f,m),p=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,w){const A={};w&2056&&(A.$$scope={dirty:w,ctx:_}),e.$set(A),w&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,w):(g=Tu(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};w&2048&&(T.$$scope={dirty:w,ctx:_}),c.$set(T)},i(_){p||(b(e.$$.fragment,_),b(c.$$.fragment,_),p=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),p=!1},d(_){_&&(k(n),k(r)),I(e,_),g&&g.d(),I(c),h=!1,Te(v)}}}function Bg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Hg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function Ug(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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 h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(we.NONE)):(n(2,a=(await h.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(we.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 jg extends ye{constructor(e){super(),be(this,e,Ug,Bg,de,{})}}function Kg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Y("Delete "),n=D("span"),i=Y(r),F(n,"class","font-bold")},m(o,u){C(o,e,u),C(o,n,u),P(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&Ne(i,r)},d(o){o&&(k(e),k(n))}}}function Du(t){let e,n;return{c(){e=D("span"),n=Y(t[1]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&2&&Ne(n,r[1])},d(r){r&&k(e)}}}function qg(t){let e;return{c(){e=Y("Don't delete")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Wg(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,m,p,h,v,g,_,w,A,T,E,V;e=new gt({props:{class:"bg-rose-700",$$slots:{default:[Kg]},$$scope:{ctx:t}}});let O=t[1]&&Du(t);return _=new Ot({props:{"data-button":!0,$$slots:{default:[qg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("p"),s=Y("Please confirm you wish to delete the file "),o=D("span"),l=Y(u),a=Y(". To confirm the action, please enter the name of the file to delete."),f=B(),c=D("label"),d=D("span"),d.textContent="Confirm filename",m=B(),p=D("input"),h=B(),O&&O.c(),v=B(),g=D("div"),M(_.$$.fragment),w=B(),A=D("button"),A.textContent="Delete",F(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),F(i,"class","mb-4"),F(d,"data-form-field-label",""),F(p,"type","text"),F(p,"data-form-field-text",""),F(c,"class","block"),F(A,"type","submit"),F(A,"data-button",""),F(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),F(g,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(U,S){L(e,U,S),C(U,n,S),C(U,r,S),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[2]),P(c,h),O&&O.m(c,null),P(r,v),P(r,g),L(_,g,null),P(g,w),P(g,A),T=!0,E||(V=[G(p,"input",t[7]),G(r,"submit",t[5])],E=!0)},p(U,S){var N;const K={};S&2056&&(K.$$scope={dirty:S,ctx:U}),e.$set(K),(!T||S&8)&&u!==(u=((N=U[3])==null?void 0:N.fullpath)+"")&&Ne(l,u),S&4&&p.value!==U[2]&&it(p,U[2]),U[1]?O?O.p(U,S):(O=Du(U),O.c(),O.m(c,null)):O&&(O.d(1),O=null);const $={};S&2048&&($.$$scope={dirty:S,ctx:U}),_.$set($)},i(U){T||(b(e.$$.fragment,U),b(_.$$.fragment,U),T=!0)},o(U){y(e.$$.fragment,U),y(_.$$.fragment,U),T=!1},d(U){U&&(k(n),k(r)),I(e,U),O&&O.d(),I(_),E=!1,Te(V)}}}function Qg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Wg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function zg(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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/"]}),ot.set(null),n(0,u=!1),Ge.set(we.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(we.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 Gg extends ye{constructor(e){super(),be(this,e,zg,Qg,de,{})}}function Yg(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=Y('Rename "'),r=Y(n),i=Y('"')},m(u,l){C(u,e,l),C(u,r,l),C(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:"/")+"")&&Ne(r,n)},d(u){u&&(k(e),k(r),k(i))}}}function Su(t){let e,n;return{c(){e=D("span"),n=Y(t[2]),F(e,"data-form-field-error","")},m(r,i){C(r,e,i),P(e,n)},p(r,i){i&4&&Ne(n,r[2])},d(r){r&&k(e)}}}function Zg(t){let e;return{c(){e=Y("Don't rename")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Xg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v;e=new gt({props:{$$slots:{default:[Yg]},$$scope:{ctx:t}}});let g=t[2]&&Su(t);return c=new Ot({props:{"data-button":!0,$$slots:{default:[Zg]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=B(),u=D("input"),l=B(),g&&g.c(),a=B(),f=D("div"),M(c.$$.fragment),d=B(),m=D("button"),m.textContent="Rename",F(s,"data-form-field-label",""),F(u,"type","text"),F(u,"data-form-field-text",""),F(m,"type","submit"),F(m,"data-button",""),F(f,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(_,w){L(e,_,w),C(_,n,w),C(_,r,w),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),L(c,f,null),P(f,d),P(f,m),p=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,w){const A={};w&2056&&(A.$$scope={dirty:w,ctx:_}),e.$set(A),w&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,w):(g=Su(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};w&2048&&(T.$$scope={dirty:w,ctx:_}),c.$set(T)},i(_){p||(b(e.$$.fragment,_),b(c.$$.fragment,_),p=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),p=!1},d(_){_&&(k(n),k(r)),I(e,_),g&&g.d(),I(c),h=!1,Te(v)}}}function Jg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Xg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function xg(t,e,n){let r,i;X(t,ot,p=>n(3,i=p));const s=_t(),o=bt();X(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 h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+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/"]}),ot.set(null),Ge.set(we.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(we.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 eb extends ye{constructor(e){super(),be(this,e,xg,Jg,de,{})}}function Ru(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function tb(t){let e;return{c(){e=Y("Replace")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function nb(t){let e;return{c(){e=Y("Uploading")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function rb(t){var l;let e,n=((l=t[6])==null?void 0:l.fullpath)+"",r,i;function s(a,f){return a[4].length>0?nb:tb}let o=s(t),u=o(t);return{c(){u.c(),e=B(),r=Y(n),i=Y('"')},m(a,f){u.m(a,f),C(a,e,f),C(a,r,f),C(a,i,f)},p(a,f){var c;o!==(o=s(a))&&(u.d(1),u=o(a),u&&(u.c(),u.m(e.parentNode,e))),f&64&&n!==(n=((c=a[6])==null?void 0:c.fullpath)+"")&&Ne(r,n)},d(a){a&&(k(e),k(r),k(i)),u.d(a)}}}function ib(t){let e,n,r,i,s,o,u=Kt(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Pu(Ru(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Ot({props:{"data-button":!0,$$slots:{default:[db]},$$scope:{ctx:t}}}),{c(){e=D("div"),n=D("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=B(),i=D("div"),M(s.$$.fragment),F(i,"data-dialog-buttons",""),F(e,"data-dialog-content-area","")},m(f,c){C(f,e,c),P(e,n);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(n,null);P(e,r),P(e,i),L(s,i,null),o=!0},p(f,c){if(c&144){u=Kt(f[4]);let m;for(m=0;m<u.length;m+=1){const p=Ru(f,u,m);l[m]?(l[m].p(p,c),b(l[m],1)):(l[m]=Pu(p),l[m].c(),b(l[m],1),l[m].m(n,null))}for(fe(),m=u.length;m<l.length;m+=1)a(m);ce()}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&&k(e),Ir(l,f),I(s)}}}function sb(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p;return a=new Ot({props:{"data-button":!0,$$slots:{default:[mb]},$$scope:{ctx:t}}}),{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="Drop the replacement file or click to select the replacement file.",i=B(),s=D("input"),u=B(),l=D("div"),M(a.$$.fragment),f=B(),c=D("button"),c.textContent="Upload",F(s,"type","file"),F(s,"class","sr-only"),F(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),F(c,"type","submit"),F(c,"data-button",""),F(c,"class","sr-only"),F(l,"data-dialog-buttons",""),F(e,"data-dialog-content-area","")},m(h,v){C(h,e,v),P(e,n),P(n,r),P(n,i),P(n,s),t[12](s),P(e,u),P(e,l),L(a,l,null),P(l,f),P(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(h,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(h[2]?"border-solid":"border-dashed")+" rounded"))&&F(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:h}),a.$set(g)},i(h){d||(b(a.$$.fragment,h),d=!0)},o(h){y(a.$$.fragment,h),d=!1},d(h){h&&k(e),t[12](null),I(a),t[16](null),m=!1,Te(p)}}}function ob(t){let e,n,r,i;return r=new De({props:{path:wf,class:"w-6 h-6 text-rose-700"}}),{c(){e=D("span"),e.textContent="failed to upload",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function lb(t){let e,n,r,i;return r=new De({props:{path:Ef,class:"w-6 h-6 text-lime-500"}}),{c(){e=D("span"),e.textContent="successfully uploaded",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function ub(t){let e,n,r,i;return r=new De({props:{path:Ht,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=D("span"),e.textContent="uploading",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function ab(t){let e,n,r,i;return r=new De({props:{path:$f}}),{c(){e=D("span"),e.textContent="waiting to upload",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function Pu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[ab,ub,lb,ob],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=D("li"),n=D("span"),i=Y(r),s=B(),u&&u.c(),l=B(),F(n,"class","flex-1"),F(e,"class","flex flex-row space-x-4")},m(m,p){C(m,e,p),P(e,n),P(n,i),P(e,s),~o&&c[o].m(e,null),P(e,l),a=!0},p(m,p){(!a||p&16)&&r!==(r=m[21].name+"")&&Ne(i,r);let h=o;o=d(m),o!==h&&(u&&(fe(),y(c[h],1,1,()=>{c[h]=null}),ce()),~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&&k(e),~o&&c[o].d()}}}function fb(t){let e;return{c(){e=Y("Cancel upload")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function cb(t){let e;return{c(){e=Y("Close")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function db(t){let e;function n(s,o){return s[5]?cb:fb}let r=n(t),i=r(t);return{c(){i.c(),e=Oe()},m(s,o){i.m(s,o),C(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&&k(e),i.d(s)}}}function mb(t){let e;return{c(){e=Y("Don't upload")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function pb(t){let e,n,r,i,s,o;e=new gt({props:{$$slots:{default:[rb]},$$scope:{ctx:t}}});const u=[sb,ib],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){M(e.$$.fragment),n=B(),i.c(),s=Oe()},m(f,c){L(e,f,c),C(f,n,c),l[r].m(f,c),C(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):(fe(),y(l[m],1,1,()=>{l[m]=null}),ce(),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&&(k(n),k(s)),I(e,f),l[r].d(f)}}}function hb(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[pb]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function _b(t,e,n){let r,i;X(t,ot,O=>n(6,r=O));var s=(O=>(O[O.READY=0]="READY",O[O.ACTIVE=1]="ACTIVE",O[O.SUCCESS=2]="SUCCESS",O[O.FAILED=3]="FAILED",O))(s||{});const o=_t(),u=bt();X(t,u,O=>n(18,i=O));let l=null,a=null,f=!1,c=!1,d=[],m=!1;function p(O){O||Ge.set(we.NONE)}async function h(O){if(O.preventDefault(),l&&l.files){n(4,d=[]);for(let W of l.files)d.push([W,0]);d.length>0&&g()}}async function v(O){if(O.preventDefault(),n(4,d=[]),O.dataTransfer&&O.dataTransfer.items){for(let W of O.dataTransfer.items)if(W.kind==="file"){const U=W.getAsFile();if(U!==null){d.push([U,0]);break}}d.length>0&&g()}}async function g(){n(5,m=!1);for(let W of d){if(!c)break;W[1]=1,n(4,d);const U=new FormData;U.append("content",W[0]),(await fetch("/api/branches/"+(i==null?void 0:i.id)+"/files/"+(r==null?void 0:r.fullpath),{method:"PUT",body:U})).ok?W[1]=2:W[1]=3,n(4,d)}o.invalidateQueries({queryKey:["branches",i==null?void 0:i.id,"files/"]});const O=r;ot.set(null),await jt(),ot.set(O),n(5,m=!0),Ge.set(we.NONE)}function _(O){ke[O?"unshift":"push"](()=>{l=O,n(0,l)})}const w=()=>{a&&a.click()},A=O=>{O.preventDefault(),n(2,f=!0)},T=()=>{n(2,f=!1)};function E(O){ke[O?"unshift":"push"](()=>{a=O,n(1,a)})}function V(O){c=O,n(3,c)}return[l,a,f,c,d,m,r,s,u,p,h,v,_,w,A,T,E,V]}class gb extends ye{constructor(e){super(),be(this,e,_b,hb,de,{})}}function Fu(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function bb(t){let e;return{c(){e=Y("Upload")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function yb(t){let e;return{c(){e=Y("Uploading")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function vb(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?yb:bb}let o=s(t),u=o(t);return{c(){u.c(),e=Y(' Files to "'),r=Y(n),i=Y('"')},m(f,c){u.m(f,c),C(f,e,c),C(f,r,c),C(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:"/")+"")&&Ne(r,n)},d(f){f&&(k(e),k(r),k(i)),u.d(f)}}}function kb(t){let e,n,r,i,s,o,u=Kt(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Lu(Fu(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Ot({props:{"data-button":!0,$$slots:{default:[Db]},$$scope:{ctx:t}}}),{c(){e=D("div"),n=D("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=B(),i=D("div"),M(s.$$.fragment),F(i,"data-dialog-buttons",""),F(e,"data-dialog-content-area","")},m(f,c){C(f,e,c),P(e,n);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(n,null);P(e,r),P(e,i),L(s,i,null),o=!0},p(f,c){if(c&144){u=Kt(f[4]);let m;for(m=0;m<u.length;m+=1){const p=Fu(f,u,m);l[m]?(l[m].p(p,c),b(l[m],1)):(l[m]=Lu(p),l[m].c(),b(l[m],1),l[m].m(n,null))}for(fe(),m=u.length;m<l.length;m+=1)a(m);ce()}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&&k(e),Ir(l,f),I(s)}}}function Cb(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p;return a=new Ot({props:{"data-button":!0,$$slots:{default:[Sb]},$$scope:{ctx:t}}}),{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=B(),s=D("input"),u=B(),l=D("div"),M(a.$$.fragment),f=B(),c=D("button"),c.textContent="Upload",F(s,"type","file"),F(s,"class","sr-only"),F(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),F(c,"type","submit"),F(c,"data-button",""),F(c,"class","sr-only"),F(l,"data-dialog-buttons",""),F(e,"data-dialog-content-area","")},m(h,v){C(h,e,v),P(e,n),P(n,r),P(n,i),P(n,s),t[12](s),P(e,u),P(e,l),L(a,l,null),P(l,f),P(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(h,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(h[2]?"border-solid":"border-dashed")+" rounded"))&&F(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:h}),a.$set(g)},i(h){d||(b(a.$$.fragment,h),d=!0)},o(h){y(a.$$.fragment,h),d=!1},d(h){h&&k(e),t[12](null),I(a),t[16](null),m=!1,Te(p)}}}function Eb(t){let e,n,r,i;return r=new De({props:{path:wf,class:"w-6 h-6 text-rose-700"}}),{c(){e=D("span"),e.textContent="failed to upload",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function wb(t){let e,n,r,i;return r=new De({props:{path:Ef,class:"w-6 h-6 text-lime-500"}}),{c(){e=D("span"),e.textContent="successfully uploaded",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function $b(t){let e,n,r,i;return r=new De({props:{path:Ht,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=D("span"),e.textContent="uploading",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function Ob(t){let e,n,r,i;return r=new De({props:{path:$f}}),{c(){e=D("span"),e.textContent="waiting to upload",n=B(),M(r.$$.fragment),F(e,"class","sr-only")},m(s,o){C(s,e,o),C(s,n,o),L(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&&(k(e),k(n)),I(r,s)}}}function Lu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[Ob,$b,wb,Eb],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=D("li"),n=D("span"),i=Y(r),s=B(),u&&u.c(),l=B(),F(n,"class","flex-1"),F(e,"class","flex flex-row space-x-4")},m(m,p){C(m,e,p),P(e,n),P(n,i),P(e,s),~o&&c[o].m(e,null),P(e,l),a=!0},p(m,p){(!a||p&16)&&r!==(r=m[21].name+"")&&Ne(i,r);let h=o;o=d(m),o!==h&&(u&&(fe(),y(c[h],1,1,()=>{c[h]=null}),ce()),~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&&k(e),~o&&c[o].d()}}}function Ab(t){let e;return{c(){e=Y("Cancel upload")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Tb(t){let e;return{c(){e=Y("Close")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Db(t){let e;function n(s,o){return s[5]?Tb:Ab}let r=n(t),i=r(t);return{c(){i.c(),e=Oe()},m(s,o){i.m(s,o),C(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&&k(e),i.d(s)}}}function Sb(t){let e;return{c(){e=Y("Don't upload")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Rb(t){let e,n,r,i,s,o;e=new gt({props:{$$slots:{default:[vb]},$$scope:{ctx:t}}});const u=[Cb,kb],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){M(e.$$.fragment),n=B(),i.c(),s=Oe()},m(f,c){L(e,f,c),C(f,n,c),l[r].m(f,c),C(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):(fe(),y(l[m],1,1,()=>{l[m]=null}),ce(),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&&(k(n),k(s)),I(e,f),l[r].d(f)}}}function Pb(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[Rb]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new qt({props:s}),ke.push(()=>Vt(e,"open",i)),{c(){M(e.$$.fragment)},m(o,u){L(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],Nt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){y(e.$$.fragment,o),r=!1},d(o){I(e,o)}}}function Fb(t,e,n){let r,i;X(t,ot,O=>n(6,i=O));var s=(O=>(O[O.READY=0]="READY",O[O.ACTIVE=1]="ACTIVE",O[O.SUCCESS=2]="SUCCESS",O[O.FAILED=3]="FAILED",O))(s||{});const o=_t(),u=bt();X(t,u,O=>n(18,r=O));let l=null,a=null,f=!1,c=!1,d=[],m=!1;function p(O){O||Ge.set(we.NONE)}async function h(O){if(O.preventDefault(),l&&l.files){n(4,d=[]);for(let W of l.files)d.push([W,0]);d.length>0&&g()}}async function v(O){if(O.preventDefault(),n(4,d=[]),O.dataTransfer&&O.dataTransfer.items){for(let W of O.dataTransfer.items)if(W.kind==="file"){const U=W.getAsFile();U!==null&&d.push([U,0])}d.length>0&&g()}}async function g(){n(5,m=!1);for(let O of d){if(!c)break;if(O[1]=1,n(4,d),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+O[0].name,{method:"POST",headers:{"X-uEditor-New-Type":"file"}})).ok){const U=new FormData;U.append("content",O[0]),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+O[0].name,{method:"PUT",body:U})).ok?O[1]=2:O[1]=3,n(4,d)}else O[1]=3,n(4,d)}o.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),n(5,m=!0)}function _(O){ke[O?"unshift":"push"](()=>{l=O,n(0,l)})}const w=()=>{a&&a.click()},A=O=>{O.preventDefault(),n(2,f=!0)},T=()=>{n(2,f=!1)};function E(O){ke[O?"unshift":"push"](()=>{a=O,n(1,a)})}function V(O){c=O,n(3,c)}return[l,a,f,c,d,m,i,s,u,p,h,v,_,w,A,T,E,V]}class Lb extends ye{constructor(e){super(),be(this,e,Fb,Pb,de,{})}}function Ib(t){let e,n;return e=new Lb({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Mb(t){let e,n;return e=new gb({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Nb(t){let e,n;return e=new eb({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Vb(t){let e,n;return e=new Gg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Hb(t){let e,n;return e=new jg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Bb(t){let e,n;return e=new Mg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Ub(t){let e,n;return e=new Sf({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function jb(t){let e,n;return e=new $g({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Kb(t){let e,n;return e=new yg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function qb(t){let e,n;return e=new rg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Wb(t){let e,n;return e=new cg({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Qb(t){let e,n;return e=new Y1({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function zb(t){let e,n,r,i;const s=[Qb,Wb,qb,Kb,jb,Ub,Bb,Hb,Vb,Nb,Mb,Ib],o=[];function u(l,a){return l[0]===we.UEDITOR_NEW_BRANCH?0:l[0]===we.UEDITOR_IMPORT_REMOTE_BRANCH?1:l[0]===we.UEDITOR_DELETE_BRANCH?2:l[0]===we.UEDITOR_MERGE_FROM_DEFAULT?3:l[0]===we.FOLDER_CREATE?4:l[0]===we.FOLDER_DELETE?5:l[0]===we.FOLDER_RENAME?6:l[0]===we.FILE_CREATE?7:l[0]===we.FILE_DELETE?8:l[0]===we.FILE_RENAME?9:l[0]===we.FILE_REPLACE?10:l[0]===we.FILE_UPLOAD?11:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e!==f&&(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}var we=(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_REPLACE=12]="FILE_REPLACE",t[t.FILE_UPLOAD=13]="FILE_UPLOAD",t))(we||{});const Ge=Fe(1);function Gb(t,e,n){let r,i=me;return X(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let Yb=class extends ye{constructor(e){super(),be(this,e,Gb,zb,de,{})}};const Zb="modulepreload",Xb=function(t){return"/app/"+t},Iu={},xr=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=Xb(l),l in Iu)return;Iu[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":Zb,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 Jb(t){let e;return{c(){e=D("div"),e.textContent="Please select a file or folder from the file-browser on the left",F(e,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,r){C(n,e,r)},p:me,i:me,o:me,d(n){n&&k(e)}}}function xb(t){let e,n,r,i;const s=[n2,t2,e2],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=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function e2(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=D("div"),n=Y("Unfortunately the μEditor does not know how to edit this file ("),i=Y(r),s=Y(")."),F(e,"class","flex-1 px-2 py-1 text-rose-700")},m(o,u){C(o,e,u),P(e,n),P(e,i),P(e,s)},p(o,u){u&2&&r!==(r=o[1].mimetype+"")&&Ne(i,r)},i:me,o:me,d(o){o&&k(e)}}}function t2(t){let e;return{c(){e=D("div"),e.textContent="Loading the editor. Please wait...",F(e,"class","flex-1 px-2 py-1")},m(n,r){C(n,e,r)},p:me,i:me,o:me,d(n){n&&k(e)}}}function n2(t){let e=t[3].id,n,r,i=Mu(t);return{c(){i.c(),n=Oe()},m(s,o){i.m(s,o),C(s,n,o),r=!0},p(s,o){o&8&&de(e,e=s[3].id)?(fe(),y(i,1,1,me),ce(),i=Mu(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&&k(n),i.d(s)}}}function Mu(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Qo(i,s())),{c(){e&&M(e.$$.fragment),n=Oe()},m(o,u){e&&L(e,o,u),C(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){fe();const l=e;y(l.$$.fragment,1,0,()=>{I(l,1)}),ce()}i?(e=Qo(i,s()),M(e.$$.fragment),b(e.$$.fragment,1),L(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&&k(n),e&&I(e,o)}}}function r2(t){let e,n,r,i;const s=[xb,Jb],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=Oe()},m(l,a){o[e].m(l,a),C(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(fe(),y(o[f],1,1,()=>{o[f]=null}),ce(),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&&k(r),o[e].d(l)}}}function i2(t,e,n){let r,i,s;X(t,ot,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=bt();X(t,a,d=>n(3,s=d));const f=Ue(ot,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";if(d.mimetype==="application/pdf")return"Pdf"}return null}),c=Ue(f,(d,m)=>{let p=null;d==="Folder"?p=xr(()=>import("./FolderEditor-BXgX8nlH.js"),[]):d==="CodeMirror"?p=xr(()=>import("./CodeMirrorEditor-D1fDPU-Q.js"),__vite__mapDeps([0,1,2])):d==="Tei"?p=xr(()=>import("./TeiEditor-CmDNnibB.js"),__vite__mapDeps([3,1])):d==="Image"?p=xr(()=>import("./ImageEditor-GOZ2PdzP.js"),[]):d==="Pdf"&&(p=xr(()=>import("./PdfEditor-ll-wimrs.js"),[])),p?(n(0,o=!0),p.then(h=>{m(h.default),n(0,o=!1)},()=>{n(0,o=!1)})):m(null)},null);return X(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let s2=class extends ye{constructor(e){super(),be(this,e,i2,r2,de,{})}};function o2(t){return t[t.length-1]}function Rf(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}Rf({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function l2(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function Ki(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Nu(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Vu(t,e){if(!a2)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return Bo(n)?n:null}const qi=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Hu=t=>typeof t=="function";zi("empty");function zi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Ue(n,u=>{const l=i(u);if(Hu(l)){const a=(...f)=>qi(Ki({...l(...f),[`data-melt-${t}`]:"",action:r??ur}));return a.action=r??ur,a}return qi(Ki({...l,[`data-melt-${t}`]:"",action:r??ur}))});{const u=i,l=u==null?void 0:u();if(Hu(l)){const a=(...f)=>qi(Ki({...l(...f),[`data-melt-${t}`]:"",action:r??ur}));return a.action=r??ur,Nu(a)}return Nu(qi(Ki({...l,[`data-melt-${t}`]:"",action:r??ur})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function u2(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 a2=typeof document<"u",f2=t=>/^[a-z]$/i.test(t);function Bo(t){return t instanceof HTMLElement}function c2(t){return t.offsetParent===null}function d2(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ur(){}function Bs(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=p2(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function m2(t){const e=t.currentTarget;if(!Bo(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function p2(t){return e=>{const n=m2(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Uo(t){return{...t,get:()=>Lr(t)}}Uo.writable=function(t){const e=Fe(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Uo.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 h2=(t,e)=>{const n=Uo(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 _2(){return za(10)}function g2(t){return t.reduce((e,n)=>(e[n]=_2(),e),{})}const at={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"};Ct(!1),Ct(!1),Ct(void 0),Ct(void 0);const b2={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"};({...l2(b2,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const y2={forceVisible:!1,defaultExpanded:[]},ar={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Us}=u2("tree-view");function v2(t){const e={...y2,...t},{forceVisible:n}=e,r=Fe(null),i=Fe(null),s=e.expanded??Fe(e.defaultExpanded),o=h2(s,e==null?void 0:e.onExpandedChange),u=Ue([i],([E])=>E==null?void 0:E.getAttribute("data-id")),l=Ue([i],([E])=>V=>(E==null?void 0:E.getAttribute("data-id"))===V),a=Ue([o],([E])=>V=>E.includes(V)),f=g2(["tree"]),c=zi(Us(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const m=zi(Us("item"),{stores:[o,u,r],returned:([E,V,O])=>W=>{const{id:U,hasChildren:S}=W;let K=0;return O!==null&&(K=O===U?0:-1),{role:"treeitem","aria-selected":V===U,"data-id":U,tabindex:K,"aria-expanded":S?E.includes(U):void 0}},action:E=>{const V=d2(Bs(E,"keydown",O=>{const{key:W}=O,U=f2(W);if(![at.ARROW_DOWN,at.ARROW_UP,at.ARROW_LEFT,at.ARROW_RIGHT,at.ENTER,at.SPACE,at.END,at.HOME,at.ASTERISK].includes(W)&&!U||!Vu(f.tree)||!Bo(E)||E.getAttribute("role")!=="treeitem")return;const $=g(),N=$.findIndex(H=>H===E);if(W!==at.ENTER&&W!==at.SPACE&&O.preventDefault(),W===at.ENTER||W===at.SPACE)v(E),d=!0;else if(W===at.ARROW_DOWN&&N!==$.length-1){const H=$[N+1];if(!H)return;h(H)}else if(W===at.ARROW_UP&&N!==0){const H=$[N-1];if(!H)return;h(H)}else if(W===at.HOME&&N!==0){const H=$[0];if(!H)return;h(H)}else if(W===at.END&&N!=$.length-1){const H=o2($);if(!H)return;h(H)}else if(W===at.ARROW_LEFT)if(T(E))w(E);else{const H=E==null?void 0:E.closest('[role="group"]'),j=H==null?void 0:H.getAttribute("data-group-id"),ee=$.find(te=>te.getAttribute("data-id")===j);if(!ee)return;h(ee)}else if(W===at.ARROW_RIGHT)if(T(E)){const H=$[N+1];if(!H)return;h(H)}else A(E)&&w(E);else if(U){const H=$.map(te=>{var z;return{value:(z=te.textContent)==null?void 0:z.toLowerCase().trim(),id:te.getAttribute("data-id")}});let j=-1,ee=H.slice(N+1).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase()[0])===W?(j=N+1+z,!0):!1});if(ee||(ee=H.slice(0,N).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase().at(0))===W?(j=z,!0):!1})),ee&&H[j].id){const te=$[j];if(!te)return;h(te)}}}),Bs(E,"click",async()=>{v(E),h(E),d||w(E),d=!1}),Bs(E,"focus",()=>{r.update(O=>E.getAttribute("data-id")??O)}));return{destroy(){V()}}}}),p=zi(Us("group"),{stores:[o],returned:([E])=>V=>({role:"group","data-group-id":V.id,hidden:!n&&!E.includes(V.id)?!0:void 0,style:Rf({display:!n&&!E.includes(V.id)?"none":void 0})})});function h(E){r.update(V=>E.getAttribute("data-id")??V),E.focus()}function v(E){E.getAttribute(ar.DATAID)&&i.set(E)}function g(){let E=[];const V=Vu(f.tree);return V&&(E=Array.from(V.querySelectorAll('[role="treeitem"]')).filter(O=>!c2(O))),E}function _(E){const V=E.hasAttribute(ar.EXPANDED),O=E.getAttribute(ar.EXPANDED),W=E.getAttribute(ar.DATAID);return{hasChildren:V,expanded:O,dataId:W}}function w(E){const{hasChildren:V,expanded:O,dataId:W}=_(E);!V||O===null||W===null||(O==="false"?o.update(U=>[...U,W]):o.update(U=>U.filter(S=>S!==W)))}function A(E){return E.hasAttribute(ar.EXPANDED)}function T(E){return E.getAttribute(ar.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:m,group:p},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pf={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",go,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})})(Pf);var C2=Pf.exports;const E2=k2(C2);function Bu(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-${E2(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 w2(t){let e,n,r,i,s;const o=[S2,D2,T2,A2],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=Oe()},m(a,f){u[n].m(a,f),C(a,i,f),s=!0},p(a,f){let c=n;n=l(a,f),n!==c&&(fe(),y(u[c],1,1,()=>{u[c]=null}),ce(),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&&k(i),u[n].d(a)}}}function $2(t){let e,n;return e=new De({props:{path:n1}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function O2(t){let e,n;return e=new De({props:{path:t1}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function A2(t){let e,n;return e=new De({props:{path:J_}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function T2(t){let e,n;return e=new De({props:{path:G_}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function D2(t){let e,n;return e=new De({props:{path:X_}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function S2(t){let e,n;return e=new De({props:{path:Y_}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Uu(t){let e,n,r,i,s;n=new Ff({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("ol"),M(n.$$.fragment),le(e,u)},m(l,a){C(l,e,a),L(n,e,null),r=!0,i||(s=je(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),le(e,u=Ve(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&&k(e),I(n),i=!1,s()}}}function ju(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,m,p,h;const v=[O2,$2,w2],g=[];function _(E,V){return V&19&&(r=null),r==null&&(r=!!(E[10]==="folder"&&E[15]&&E[4](E[14]))),r?0:E[10]==="folder"?1:E[10]==="file"?2:-1}~(i=_(t,-1))&&(s=g[i]=v[i](t));let w=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],A={};for(let E=0;E<w.length;E+=1)A=ie(A,w[E]);let T=t[12]&&Uu(t);return{c(){e=D("li"),n=D("button"),s&&s.c(),o=B(),u=D("span"),a=Y(l),c=B(),T&&T.c(),d=B(),F(u,"class","select-none"),le(n,A),F(e,"role","none")},m(E,V){C(E,e,V),P(e,n),~i&&g[i].m(n,null),P(n,o),P(n,u),P(u,a),n.autofocus&&n.focus(),P(e,c),T&&T.m(e,null),P(e,d),m=!0,p||(h=je(t[17].action(n)),p=!0)},p(E,V){let O=i;i=_(E,V),i===O?~i&&g[i].p(E,V):(s&&(fe(),y(g[O],1,1,()=>{g[O]=null}),ce()),~i?(s=g[i],s?s.p(E,V):(s=g[i]=v[i](E),s.c()),b(s,1),s.m(n,o)):s=null),(!m||V&1)&&l!==(l=E[9]+"")&&Ne(a,l),le(n,A=Ve(w,[{class:"flex items-center gap-1 p-1"},V&11&&E[17],(!m||V&1&&f!==(f=E[11]))&&{"data-file-path":f}])),E[12]?T?(T.p(E,V),V&1&&b(T,1)):(T=Uu(E),T.c(),b(T,1),T.m(e,d)):T&&(fe(),y(T,1,1,()=>{T=null}),ce())},i(E){m||(b(s),b(T),m=!0)},o(E){y(s),y(T),m=!1},d(E){E&&k(e),~i&&g[i].d(),T&&T.d(),p=!1,h()}}}function R2(t){let e,n,r=Kt(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=ju(Bu(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=Oe()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);C(o,e,u),n=!0},p(o,[u]){if(u&31){r=Kt(o[0]);let l;for(l=0;l<r.length;l+=1){const a=Bu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=ju(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(fe(),l=r.length;l<i.length;l+=1)s(l);ce()}},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&&k(e),Ir(i,o)}}}function P2(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}}=st("tree");return X(t,l,d=>n(3,i=d)),X(t,a,d=>n(2,r=d)),X(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 Ff extends ye{constructor(e){super(),be(this,e,P2,R2,de,{treeItems:0,level:1})}}function F2(t){let e,n,r,i,s;const o=t[1].default,u=pe(o,t,t[0],null);return i=new De({props:{path:Ht,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=D("div"),n=D("p"),u&&u.c(),r=B(),M(i.$$.fragment),F(n,"class","sr-only"),F(e,"class","absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2")},m(l,a){C(l,e,a),P(e,n),u&&u.m(n,null),P(e,r),L(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&&k(e),u&&u.d(l),I(i)}}}function L2(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class I2 extends ye{constructor(e){super(),be(this,e,L2,F2,de,{})}}function M2(t){let e,n;return e=new I2({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function N2(t){let e,n,r;n=new Ff({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("ol"),M(n.$$.fragment),le(e,s)},m(o,u){C(o,e,u),L(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),le(e,s=Ve(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&&k(e),I(n)}}}function V2(t){let e;return{c(){e=Y("Loading the file list. Please wait...")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function H2(t){let e,n,r,i;const s=[N2,M2],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=D("nav"),r&&r.c(),F(e,"aria-label","Files"),F(e,"class","relative px-2 py-1 w-3/12 overflow-auto border-r border-gray-300")},m(l,a){C(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&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(e),~n&&o[n].d()}}}function Lf(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=Lf(n.content,e);if(r!==null)return r}}return null}function B2(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 U2(t,e,n){let r,i;const s=bt(),o=Vo(),u=Ue([s,o],([p,h])=>p?{queryKey:["branches",p.id,"files/"],queryFn:cn,enabled:h.isSuccess}:{queryKey:["branches","-","files/"],queryFn:cn,enabled:!1}),l=Rr(u);X(t,l,p=>n(0,r=p));const a=v2({defaultExpanded:["file-tree--1-0"]});ct("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;X(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 h=Lf(r.data,p==null?void 0:p.getAttribute("data-file-path"));ot.set(h)}else ot.set(null)});return ms(m),ds(()=>{let p;p=l.subscribe(h=>{if(h.isSuccess){const v=Tf("path");v&&jt().then(()=>{const g=document.querySelector('[data-file-path="'+v+'"]');g&&(d.set(B2(g)),c.set(g))}),p&&p()}})}),[r,i,l,f]}class j2 extends ye{constructor(e){super(),be(this,e,U2,H2,de,{})}}function Ku(t,e,n){const r=t.slice();return r[15]=e[n],r}function qu(t){let e,n=t[0].title+"",r,i;return{c(){e=Y(" ("),r=Y(n),i=Y(")")},m(s,o){C(s,e,o),C(s,r,o),C(s,i,o)},p(s,o){o&1&&n!==(n=s[0].title+"")&&Ne(r,n)},d(s){s&&(k(e),k(r),k(i))}}}function K2(t){let e,n,r=t[0]!==null&&qu(t);return{c(){e=Y("μEditor"),r&&r.c(),n=Oe()},m(i,s){C(i,e,s),r&&r.m(i,s),C(i,n,s)},p(i,s){i[0]!==null?r?r.p(i,s):(r=qu(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&(k(e),k(n)),r&&r.d(i)}}}function Wu(t){let e,n,r,i,s,o,u,l,a,f;e=new Pt({props:{$$slots:{default:[q2]},$$scope:{ctx:t}}}),e.$on("click",t[9]);let c=t[2].isSuccess&&t[2].data.remote.length>0&&Qu(t);i=new Pt({props:{$$slots:{default:[Q2]},$$scope:{ctx:t}}}),i.$on("click",t[11]),o=new Ti({});let d=t[3]!==null&&zu(t),m=t[2].isSuccess&&t[2].data.local.length>0&&Zu(t);return{c(){M(e.$$.fragment),n=B(),c&&c.c(),r=B(),M(i.$$.fragment),s=B(),M(o.$$.fragment),u=B(),d&&d.c(),l=B(),m&&m.c(),a=Oe()},m(p,h){L(e,p,h),C(p,n,h),c&&c.m(p,h),C(p,r,h),L(i,p,h),C(p,s,h),L(o,p,h),C(p,u,h),d&&d.m(p,h),C(p,l,h),m&&m.m(p,h),C(p,a,h),f=!0},p(p,h){const v={};h&262144&&(v.$$scope={dirty:h,ctx:p}),e.$set(v),p[2].isSuccess&&p[2].data.remote.length>0?c?h&4&&b(c,1):(c=Qu(p),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(fe(),y(c,1,1,()=>{c=null}),ce());const g={};h&262144&&(g.$$scope={dirty:h,ctx:p}),i.$set(g),p[3]!==null?d?(d.p(p,h),h&8&&b(d,1)):(d=zu(p),d.c(),b(d,1),d.m(l.parentNode,l)):d&&(fe(),y(d,1,1,()=>{d=null}),ce()),p[2].isSuccess&&p[2].data.local.length>0?m?(m.p(p,h),h&4&&b(m,1)):(m=Zu(p),m.c(),b(m,1),m.m(a.parentNode,a)):m&&(fe(),y(m,1,1,()=>{m=null}),ce())},i(p){f||(b(e.$$.fragment,p),b(c),b(i.$$.fragment,p),b(o.$$.fragment,p),b(d),b(m),f=!0)},o(p){y(e.$$.fragment,p),y(c),y(i.$$.fragment,p),y(o.$$.fragment,p),y(d),y(m),f=!1},d(p){p&&(k(n),k(r),k(s),k(u),k(l),k(a)),I(e,p),c&&c.d(p),I(i,p),I(o,p),d&&d.d(p),m&&m.d(p)}}}function q2(t){let e,n,r,i;return e=new De({props:{path:o1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="New Branch"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function Qu(t){let e,n;return e=new Pt({props:{$$slots:{default:[W2]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function W2(t){let e,n,r,i;return e=new De({props:{class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Import Branch"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function Q2(t){let e,n,r,i;return e=new De({props:{class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Synchronise Branches"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function zu(t){let e,n,r,i=t[3].update_from_default&&Gu(t),s=t[1].data.git.default_branch!==t[3].id&&Yu(t);return{c(){i&&i.c(),e=B(),s&&s.c(),n=Oe()},m(o,u){i&&i.m(o,u),C(o,e,u),s&&s.m(o,u),C(o,n,u),r=!0},p(o,u){o[3].update_from_default?i?(i.p(o,u),u&8&&b(i,1)):(i=Gu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(fe(),y(i,1,1,()=>{i=null}),ce()),o[1].data.git.default_branch!==o[3].id?s?(s.p(o,u),u&10&&b(s,1)):(s=Yu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(fe(),y(s,1,1,()=>{s=null}),ce())},i(o){r||(b(i),b(s),r=!0)},o(o){y(i),y(s),r=!1},d(o){o&&(k(e),k(n)),i&&i.d(o),s&&s.d(o)}}}function Gu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[z2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new Ti({}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&262146&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&k(n),I(e,s),I(r,s)}}}function z2(t){let e,n,r,i,s=fs(t[1].data.git.default_branch)+"",o,u;return e=new De({props:{path:u1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),i=Y("Merge Updates from "),o=Y(s)},m(l,a){L(e,l,a),C(l,n,a),C(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&2)&&s!==(s=fs(l[1].data.git.default_branch)+"")&&Ne(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(k(n),k(r)),I(e,l)}}}function Yu(t){let e,n,r,i;return e=new Pt({props:{$$slots:{default:[G2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new Ti({}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function G2(t){let e,n,r,i,s=t[3].title+"",o,u;return e=new De({props:{path:l1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),i=Y("Delete Branch "),o=Y(s)},m(l,a){L(e,l,a),C(l,n,a),C(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&8)&&s!==(s=l[3].title+"")&&Ne(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(k(n),k(r)),I(e,l)}}}function Zu(t){let e,n;return e=new Ep({props:{onValueChange:t[14],$$slots:{default:[J2]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.onValueChange=r[14]),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Y2(t){let e,n;return e=new De({props:{class:"w-4 h-4"}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Z2(t){let e,n;return e=new De({props:{path:W_,class:"w-4 h-4"}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function X2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[Z2,Y2],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=B(),i=D("span"),o=Y(s),u=B()},m(d,m){f[e].m(d,m),C(d,r,m),C(d,i,m),P(i,o),C(d,u,m),l=!0},p(d,m){let p=e;e=c(d),e!==p&&(fe(),y(f[p],1,1,()=>{f[p]=null}),ce(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||m&4)&&s!==(s=d[15].title+"")&&Ne(o,s)},i(d){l||(b(n),l=!0)},o(d){y(n),l=!1},d(d){d&&(k(r),k(i),k(u)),f[e].d(d)}}}function Xu(t){let e,n;return e=new cp({props:{value:t[15].id,$$slots:{default:[X2]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.value=r[15].id),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function J2(t){let e,n,r=Kt(t[2].data.local),i=[];for(let o=0;o<r.length;o+=1)i[o]=Xu(Ku(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=Oe()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);C(o,e,u),n=!0},p(o,u){if(u&5){r=Kt(o[2].data.local);let l;for(l=0;l<r.length;l+=1){const a=Ku(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Xu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(fe(),l=r.length;l<i.length;l+=1)s(l);ce()}},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&&k(e),Ir(i,o)}}}function x2(t){let e,n,r=t[1].isSuccess&&t[1].data.git.enabled&&Wu(t);return{c(){r&&r.c(),e=Oe()},m(i,s){r&&r.m(i,s),C(i,e,s),n=!0},p(i,s){i[1].isSuccess&&i[1].data.git.enabled?r?(r.p(i,s),s&2&&b(r,1)):(r=Wu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(fe(),y(r,1,1,()=>{r=null}),ce())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&k(e),r&&r.d(i)}}}function ey(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[K2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[x2]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262159&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&k(n),I(e,s),I(r,s)}}}function ty(t){let e,n;return e=new ks({props:{$$slots:{default:[ey]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,[i]){const s={};i&262159&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function ny(t,e,n){let r,i,s,o;const u=Ln();X(t,u,_=>n(1,i=_));const l=Ho();X(t,l,_=>n(2,s=_));const a=bt();X(t,a,_=>n(0,r=_));const f=_t(),c=Ue([l,a],([_,w])=>{if(_.isSuccess&&w!==null){for(const A of _.data.local)if(A.id===w.id)return A}return null});return X(t,c,_=>n(3,o=_)),[r,i,s,o,u,l,a,f,c,()=>{Ge.set(we.UEDITOR_NEW_BRANCH)},()=>{Ge.set(we.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{Df({action:"SynchroniseBranches",callback:()=>{f.invalidateQueries({queryKey:["branches"]})}})},()=>{Ge.set(we.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(we.UEDITOR_DELETE_BRANCH)},_=>{if(s.isSuccess)for(let w of s.data.local)w.id===_&&a.set(w)}]}class ry extends ye{constructor(e){super(),be(this,e,ny,ty,de,{})}}function iy(t){let e;return{c(){e=Y("File")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function sy(t){let e,n,r,i;return e=new De({props:{path:s1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Rename"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function oy(t){let e,n,r,i;return e=new De({props:{path:Ht,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Replace"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function ly(t){let e,n,r,i;return e=new De({props:{path:a1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Delete"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function uy(t){let e,n,r,i,s,o,u,l;return e=new Pt({props:{$$slots:{default:[sy]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Pt({props:{$$slots:{default:[oy]},$$scope:{ctx:t}}}),r.$on("click",t[1]),s=new Ti({}),u=new Pt({props:{$$slots:{default:[ly]},$$scope:{ctx:t}}}),u.$on("click",t[2]),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment),i=B(),M(s.$$.fragment),o=B(),M(u.$$.fragment)},m(a,f){L(e,a,f),C(a,n,f),L(r,a,f),C(a,i,f),L(s,a,f),C(a,o,f),L(u,a,f),l=!0},p(a,f){const c={};f&8&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&8&&(d.$$scope={dirty:f,ctx:a}),r.$set(d);const m={};f&8&&(m.$$scope={dirty:f,ctx:a}),u.$set(m)},i(a){l||(b(e.$$.fragment,a),b(r.$$.fragment,a),b(s.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(r.$$.fragment,a),y(s.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(k(n),k(i),k(o)),I(e,a),I(r,a),I(s,a),I(u,a)}}}function ay(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[iy]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[uy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&8&&(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&&k(n),I(e,s),I(r,s)}}}function fy(t){let e,n;return e=new ks({props:{$$slots:{default:[ay]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,[i]){const s={};i&8&&(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){I(e,r)}}}function cy(t){return[()=>{Ge.set(we.FILE_RENAME)},()=>{Ge.set(we.FILE_REPLACE)},()=>{Ge.set(we.FILE_DELETE)}]}class dy extends ye{constructor(e){super(),be(this,e,cy,fy,de,{})}}function my(t){let e;return{c(){e=Y("Folder")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function py(t){let e,n,r,i;return e=new De({props:{path:r1,class:"w4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="New Folder"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function hy(t){let e,n,r,i;return e=new De({props:{path:Z_,class:"w4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="New File"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function _y(t){let e,n,r,i;return e=new De({props:{path:x_,class:"w4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Upload Files"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function gy(t){let e,n,r,i;return e=new De({props:{path:e1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Rename"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function by(t){let e,n,r,i;return e=new De({props:{path:i1,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Delete"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function yy(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Pt({props:{$$slots:{default:[py]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Pt({props:{$$slots:{default:[hy]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Pt({props:{$$slots:{default:[_y]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new Ti({}),a=new Pt({props:{$$slots:{default:[gy]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Pt({props:{$$slots:{default:[by]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment),i=B(),M(s.$$.fragment),o=B(),M(u.$$.fragment),l=B(),M(a.$$.fragment),f=B(),M(c.$$.fragment)},m(m,p){L(e,m,p),C(m,n,p),L(r,m,p),C(m,i,p),L(s,m,p),C(m,o,p),L(u,m,p),C(m,l,p),L(a,m,p),C(m,f,p),L(c,m,p),d=!0},p(m,p){const h={};p&256&&(h.$$scope={dirty:p,ctx:m}),e.$set(h);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 _={};p&256&&(_.$$scope={dirty:p,ctx:m}),a.$set(_);const w={};p&256&&(w.$$scope={dirty:p,ctx:m}),c.$set(w)},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&&(k(n),k(i),k(o),k(l),k(f)),I(e,m),I(r,m),I(s,m),I(u,m),I(a,m),I(c,m)}}}function vy(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[my]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[yy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function Ju(t){let e,n;return e=new Sf({}),e.$on("close",t[7]),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function ky(t){let e,n,r,i;e=new ks({props:{$$slots:{default:[vy]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Ju(t);return{c(){M(e.$$.fragment),n=B(),s&&s.c(),r=Oe()},m(o,u){L(e,o,u),C(o,n,u),s&&s.m(o,u),C(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=Ju(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(fe(),y(s,1,1,()=>{s=null}),ce())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(k(n),k(r)),I(e,o),s&&s.d(o)}}}function Cy(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(we.FOLDER_CREATE)},()=>{Ge.set(we.FILE_CREATE)},()=>{Ge.set(we.FILE_UPLOAD)},()=>{Ge.set(we.FOLDER_RENAME)},()=>{Ge.set(we.FOLDER_DELETE)},()=>{console.log("Resetting action"),n(0,i=r.Nothing)}]}class Ey extends ye{constructor(e){super(),be(this,e,Cy,ky,de,{})}}function xu(t){let e,n;return e=new ks({props:{$$slots:{default:[Ay]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&516&&(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){I(e,r)}}}function wy(t){var r;let e=((r=t[2].data)==null?void 0:r.name)+"",n;return{c(){n=Y(e)},m(i,s){C(i,n,s)},p(i,s){var o;s&4&&e!==(e=((o=i[2].data)==null?void 0:o.name)+"")&&Ne(n,e)},d(i){i&&k(n)}}}function $y(t){let e,n,r,i;return e=new De({props:{path:z_,class:"w-4 h-4"}}),{c(){M(e.$$.fragment),n=B(),r=D("span"),r.textContent="Logout"},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function Oy(t){let e,n;return e=new Pt({props:{$$slots:{default:[$y]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&512&&(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){I(e,r)}}}function Ay(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[wy]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[Oy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&516&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&512&&(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&&k(n),I(e,s),I(r,s)}}}function Ty(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&t[1]==="authenticated"&&xu(t);return{c(){r&&r.c(),e=Oe()},m(i,s){r&&r.m(i,s),C(i,e,s),n=!0},p(i,[s]){i[0].isSuccess&&i[0].data.auth.provider!=="no-auth"&&i[1]==="authenticated"?r?(r.p(i,s),s&3&&b(r,1)):(r=xu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(fe(),y(r,1,1,()=>{r=null}),ce())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&k(e),r&&r.d(i)}}}function Dy(t,e,n){let r,i,s;const o=Vo();X(t,o,d=>n(2,s=d));const u=Ln();X(t,u,d=>n(0,r=d));const l=_t(),a=_1();X(t,a,d=>n(1,i=d));const f=g1();async function c(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(l.cancelQueries(),l.invalidateQueries(),f.set(!0))}return[r,i,s,o,u,a,c]}class Sy extends ye{constructor(e){super(),be(this,e,Dy,Ty,de,{})}}function ea(t){let e,n,r,i;const s=[Py,Ry],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=Oe()},m(l,a){~e&&o[e].m(l,a),C(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e!==f&&(n&&(fe(),y(o[f],1,1,()=>{o[f]=null}),ce()),~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&&k(r),~e&&o[e].d(l)}}}function Ry(t){let e,n;return e=new Ey({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Py(t){let e,n;return e=new dy({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Fy(t){var a,f,c;let e,n,r,i,s,o,u;e=new ry({});let l=t[0]&&(!((a=t[1].data)!=null&&a.git.protect_default_branch)||((f=t[1].data)==null?void 0:f.git.default_branch)!==((c=t[2])==null?void 0:c.id))&&ea(t);return o=new Sy({}),{c(){M(e.$$.fragment),n=B(),l&&l.c(),r=B(),i=D("span"),s=B(),M(o.$$.fragment),F(i,"class","flex-1")},m(d,m){L(e,d,m),C(d,n,m),l&&l.m(d,m),C(d,r,m),C(d,i,m),C(d,s,m),L(o,d,m),u=!0},p(d,m){var p,h,v;d[0]&&(!((p=d[1].data)!=null&&p.git.protect_default_branch)||((h=d[1].data)==null?void 0:h.git.default_branch)!==((v=d[2])==null?void 0:v.id))?l?(l.p(d,m),m&7&&b(l,1)):(l=ea(d),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(fe(),y(l,1,1,()=>{l=null}),ce())},i(d){u||(b(e.$$.fragment,d),b(l),b(o.$$.fragment,d),u=!0)},o(d){y(e.$$.fragment,d),y(l),y(o.$$.fragment,d),u=!1},d(d){d&&(k(n),k(r),k(i),k(s)),I(e,d),l&&l.d(d),I(o,d)}}}function Ly(t){let e,n;return e=new zh({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[Fy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,[i]){const s={};i&39&&(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){I(e,r)}}}function Iy(t,e,n){let r,i,s;X(t,ot,l=>n(0,r=l));const o=Ln();X(t,o,l=>n(1,i=l));const u=bt();return X(t,u,l=>n(2,s=l)),[r,i,s,o,u]}class My extends ye{constructor(e){super(),be(this,e,Iy,Ly,de,{})}}function ta(t){let e,n;return e=new q_({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[3]?null:"true",$$slots:{default:[Ny]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&9&&(s["aria-disabled"]=r[0]!==null&&r[3]?null:"true"),i&512&&(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){I(e,r)}}}function Ny(t){let e,n;return e=new De({props:{path:Q_}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function Vy(t){var i,s,o;let e,n,r=(!((i=t[2].data)!=null&&i.git.protect_default_branch)||((s=t[2].data)==null?void 0:s.git.default_branch)!==((o=t[1])==null?void 0:o.id))&&ta(t);return{c(){r&&r.c(),e=Oe()},m(u,l){r&&r.m(u,l),C(u,e,l),n=!0},p(u,l){var a,f,c;!((a=u[2].data)!=null&&a.git.protect_default_branch)||((f=u[2].data)==null?void 0:f.git.default_branch)!==((c=u[1])==null?void 0:c.id)?r?(r.p(u,l),l&6&&b(r,1)):(r=ta(u),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(fe(),y(r,1,1,()=>{r=null}),ce())},i(u){n||(b(r),n=!0)},o(u){y(r),n=!1},d(u){u&&k(e),r&&r.d(u)}}}function Hy(t){let e,n;return e=new N_({props:{class:"border-b border-gray-300",$$slots:{default:[Vy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,[i]){const s={};i&527&&(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){I(e,r)}}}function By(t,e,n){let r,i,s,o,u;X(t,ot,d=>n(7,r=d)),X(t,h1,d=>n(0,i=d)),X(t,pu,d=>n(3,u=d));const l=_t(),a=bt();X(t,a,d=>n(1,s=d));const f=Ln();X(t,f,d=>n(2,o=d));function c(){r!==null&&i!==null&&Df({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){pu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&l.invalidateQueries({queryKey:["configs"]})}})}return[i,s,o,u,a,f,c]}class Uy extends ye{constructor(e){super(),be(this,e,By,Hy,de,{})}}function jy(t){let e;return{c(){e=D("div"),F(e,"class","flex-1")},m(n,r){C(n,e,r)},i:me,o:me,d(n){n&&k(e)}}}function Ky(t){let e;return{c(){e=D("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',F(e,"class","flex-1")},m(n,r){C(n,e,r)},i:me,o:me,d(n){n&&k(e)}}}function qy(t){let e,n,r,i,s;return n=new j2({}),i=new s2({}),{c(){e=D("div"),M(n.$$.fragment),r=B(),M(i.$$.fragment),F(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){C(o,e,u),L(n,e,null),P(e,r),L(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&&k(e),I(n),I(i)}}}function na(t){let e;return{c(){e=D("div"),e.textContent="This branch is protected and cannot be edited directly",F(e,"class","text-red-500")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function ra(t){let e=t[5].fullpath+"",n;return{c(){n=Y(e)},m(r,i){C(r,n,i)},p(r,i){i&32&&e!==(e=r[5].fullpath+"")&&Ne(n,e)},d(r){r&&k(n)}}}function Wy(t){var K,$,N;let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v,g,_,w,A,T,E;document.title=e=t[0],o=new My({}),l=new Uy({});const V=[qy,Ky,jy],O=[];function W(H,j){return H[1]!==null&&H[3].isSuccess?0:H[1]===null?1:2}f=W(t),c=O[f]=V[f](t);let U=((K=t[4].data)==null?void 0:K.git.protect_default_branch)&&(($=t[4].data)==null?void 0:$.git.default_branch)===((N=t[1])==null?void 0:N.id)&&na(),S=t[5]&&ra(t);return w=new M1({}),T=new Yb({}),{c(){n=D("link"),i=B(),s=D("main"),M(o.$$.fragment),u=B(),M(l.$$.fragment),a=B(),c.c(),d=B(),m=D("footer"),U&&U.c(),p=B(),h=D("div"),S&&S.c(),v=B(),g=D("div"),_=B(),M(w.$$.fragment),A=B(),M(T.$$.fragment),F(n,"rel","stylesheet"),F(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),F(h,"class","font-mono font-bold"),F(g,"class","flex-1"),F(m,"class","flex flex-row space-x-4 px-2 py-1 border-t border-slate-300 text-sm items-center"),F(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(H,j){P(document.head,n),C(H,i,j),C(H,s,j),L(o,s,null),P(s,u),L(l,s,null),P(s,a),O[f].m(s,null),P(s,d),P(s,m),U&&U.m(m,null),P(m,p),P(m,h),S&&S.m(h,null),P(m,v),P(m,g),P(m,_),L(w,m,null),C(H,A,j),L(T,H,j),E=!0},p(H,[j]){var te,z,oe;(!E||j&1)&&e!==(e=H[0])&&(document.title=e),(!E||j&6&&r!==(r="/api/branches/"+(H[1]!==null?H[1].id:"-")+"/configs/ui-stylesheet?timestamp="+H[2]))&&F(n,"href",r);let ee=f;f=W(H),f!==ee&&(fe(),y(O[ee],1,1,()=>{O[ee]=null}),ce(),c=O[f],c||(c=O[f]=V[f](H),c.c()),b(c,1),c.m(s,d)),(te=H[4].data)!=null&&te.git.protect_default_branch&&((z=H[4].data)==null?void 0:z.git.default_branch)===((oe=H[1])==null?void 0:oe.id)?U||(U=na(),U.c(),U.m(m,p)):U&&(U.d(1),U=null),H[5]?S?S.p(H,j):(S=ra(H),S.c(),S.m(h,null)):S&&(S.d(1),S=null)},i(H){E||(b(o.$$.fragment,H),b(l.$$.fragment,H),b(c),b(w.$$.fragment,H),b(T.$$.fragment,H),E=!0)},o(H){y(o.$$.fragment,H),y(l.$$.fragment,H),y(c),y(w.$$.fragment,H),y(T.$$.fragment,H),E=!1},d(H){H&&(k(i),k(s),k(A)),k(n),I(o),I(l),O[f].d(),U&&U.d(),S&&S.d(),I(w),I(T,H)}}}function Qy(t,e,n){let r,i,s,o,u,l;X(t,ot,h=>n(5,l=h));const a=st("uEditionConfig"),f=st("uEditorConfig");X(t,f,h=>n(3,o=h));const c=st("currentBranch");X(t,c,h=>n(1,i=h));const d=Ln();X(t,d,h=>n(4,u=h));const m=Ue(a,h=>h.isSuccess&&h.data.languages&&h.data.languages.length>0&&h.data.languages[0].code&&h.data.title&&h.data.title[h.data.languages[0].code]?"μEditor - "+h.data.title[h.data.languages[0].code]:"μEditor");X(t,m,h=>n(0,r=h));const p=Ue(a,h=>new Date().getTime());return X(t,p,h=>n(2,s=h)),[r,i,s,o,u,l,f,c,d,m,p]}class zy extends ye{constructor(e){super(),be(this,e,Qy,Wy,de,{})}}function Es(t,{delay:e=0,duration:n=400,easing:r=cs}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}const ia="2.0.0b13";function sa(t){let e,n,r;const i=t[2].default,s=pe(i,t,t[3],null);let o=t[0].data.version!==ia&&oa(t);return{c(){s&&s.c(),e=B(),o&&o.c(),n=Oe()},m(u,l){s&&s.m(u,l),C(u,e,l),o&&o.m(u,l),C(u,n,l),r=!0},p(u,l){s&&s.p&&(!r||l&8)&&_e(s,i,u,u[3],r?he(i,u[3],l,null):ge(u[3]),null),u[0].data.version!==ia?o?l&1&&b(o,1):(o=oa(u),o.c(),b(o,1),o.m(n.parentNode,n)):o&&(fe(),y(o,1,1,()=>{o=null}),ce())},i(u){r||(b(s,u),b(o),r=!0)},o(u){y(s,u),y(o),r=!1},d(u){u&&(k(e),k(n)),s&&s.d(u),o&&o.d(u)}}}function oa(t){let e,n;return e=new Qn({props:{open:!0,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Xy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function Gy(t){let e;return{c(){e=Y("μEditor update required")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function Yy(t){let e,n,r,i;return e=new gt({props:{$$slots:{default:[Gy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("div"),r.innerHTML=`The μEditor has been updated and you need to reload the μEditor in
|
|
18
|
+
order to benefit from the latest updates.
|
|
19
|
+
<div data-dialog-buttons=""><a href="/" data-button="">Reload</a></div>`,F(r,"data-dialog-content-area","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function Zy(t){let e,n;return e=new er({props:{class:"flex flex-col overflow-hidden","data-update-dialog":!0,$$slots:{default:[Yy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},p(r,i){const s={};i&8&&(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){I(e,r)}}}function Xy(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[Zy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function Jy(t){let e;return{c(){e=Y("μEditor not ready")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function xy(t){let e,n,r,i;return e=new gt({props:{$$slots:{default:[Jy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
|
|
20
|
+
logs to determine what the issue is.</p>`,F(r,"data-dialog-content-area","")},m(s,o){L(e,s,o),C(s,n,o),C(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&&(k(n),k(r)),I(e,s)}}}function e0(t){let e,n,r,i;return e=new jr({props:{transition:Es}}),r=new er({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden left-10",$$slots:{default:[xy]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function t0(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[e0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(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&&k(n),I(e,s),I(r,s)}}}function n0(t){let e,n,r,i=t[0].isSuccess&&sa(t);return n=new Qn({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[t0]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=B(),M(n.$$.fragment)},m(s,o){i&&i.m(s,o),C(s,e,o),L(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=sa(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(fe(),y(i,1,1,()=>{i=null}),ce());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&&k(e),i&&i.d(s),I(n,s)}}}function r0(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Rr({queryKey:[""],queryFn:cn,refetchInterval:6e4});return X(t,o,u=>n(0,r=u)),ct("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class i0 extends ye{constructor(e){super(),be(this,e,r0,n0,de,{})}}function s0(t){let e;return{c(){e=Y("Authenticating")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function o0(t){let e,n,r,i;return e=new gt({props:{$$slots:{default:[s0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",F(r,"data-dialog-content-area","")},m(s,o){L(e,s,o),C(s,n,o),C(s,r,o),i=!0},p(s,o){const u={};o&32768&&(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&&(k(n),k(r)),I(e,s)}}}function l0(t){let e,n,r,i;return e=new jr({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[o0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32768&&(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&&k(n),I(e,s),I(r,s)}}}function u0(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[l0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32768&&(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&&k(n),I(e,s),I(r,s)}}}function a0(t){let e;return{c(){e=Y("Login")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function f0(t){let e;return{c(){e=D("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>',F(e,"data-dialog-content-area","")},m(n,r){C(n,e,r)},p:me,d(n){n&&k(e)}}}function c0(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,h,v,g=t[5].isError&&la(),_=t[5].isError&&ua();function w(E,V){return E[5].isPending?m0:d0}let A=w(t),T=A(t);return{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="E-Mail",i=B(),s=D("input"),o=B(),g&&g.c(),u=B(),l=D("label"),a=D("span"),a.textContent="Password",f=B(),c=D("input"),d=B(),_&&_.c(),m=B(),p=D("div"),T.c(),F(r,"data-form-field-label",""),F(s,"type","text"),F(s,"data-form-field-text",""),F(a,"data-form-field-label",""),F(c,"type","password"),F(c,"data-form-field-text",""),F(p,"data-dialog-buttons",""),F(e,"data-dialog-content-area","")},m(E,V){C(E,e,V),P(e,n),P(n,r),P(n,i),P(n,s),it(s,t[0]),P(n,o),g&&g.m(n,null),P(e,u),P(e,l),P(l,a),P(l,f),P(l,c),it(c,t[1]),P(l,d),_&&_.m(l,null),P(e,m),P(e,p),T.m(p,null),h||(v=[G(s,"input",t[11]),G(c,"input",t[12]),G(e,"submit",t[13])],h=!0)},p(E,V){V&1&&s.value!==E[0]&&it(s,E[0]),E[5].isError?g||(g=la(),g.c(),g.m(n,null)):g&&(g.d(1),g=null),V&2&&c.value!==E[1]&&it(c,E[1]),E[5].isError?_||(_=ua(),_.c(),_.m(l,null)):_&&(_.d(1),_=null),A!==(A=w(E))&&(T.d(1),T=A(E),T&&(T.c(),T.m(p,null)))},d(E){E&&k(e),g&&g.d(),_&&_.d(),T.d(),h=!1,Te(v)}}}function la(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",F(e,"data-form-field-error","")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function ua(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",F(e,"data-form-field-error","")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function d0(t){let e;return{c(){e=D("button"),e.textContent="Login",F(e,"type","submit"),F(e,"data-button","")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function m0(t){let e;return{c(){e=D("span"),e.textContent="Logging in...",F(e,"data-button",""),F(e,"class","inline-flex")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function p0(t){let e,n,r,i;e=new gt({props:{$$slots:{default:[a0]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[4].data)==null?void 0:f.auth.provider)==="email-password")return c0;if(((c=l[4].data)==null?void 0:c.auth.provider)==="github")return f0}let o=s(t),u=o&&o(t);return{c(){M(e.$$.fragment),n=B(),u&&u.c(),r=Oe()},m(l,a){L(e,l,a),C(l,n,a),u&&u.m(l,a),C(l,r,a),i=!0},p(l,a){const f={};a&32768&&(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&&(k(n),k(r)),I(e,l),u&&u.d(l)}}}function h0(t){let e,n,r,i;return e=new jr({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[p0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32819&&(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&&k(n),I(e,s),I(r,s)}}}function _0(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[h0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32819&&(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&&k(n),I(e,s),I(r,s)}}}function g0(t){let e;return{c(){e=Y("Logged out")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function b0(t){let e;return{c(){e=Y("Close")},m(n,r){C(n,e,r)},d(n){n&&k(e)}}}function y0(t){let e,n,r,i,s,o,u,l;return e=new gt({props:{$$slots:{default:[g0]},$$scope:{ctx:t}}}),u=new Ot({props:{"data-button":!0,$$slots:{default:[b0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),r=D("div"),i=D("p"),i.textContent="You have logged out. You can now close the browser tab or window.",s=B(),o=D("div"),M(u.$$.fragment),F(i,"class","mb-4"),F(o,"data-dialog-buttons",""),F(r,"data-dialog-content-area","")},m(a,f){L(e,a,f),C(a,n,f),C(a,r,f),P(r,i),P(r,s),P(r,o),L(u,o,null),l=!0},p(a,f){const c={};f&32768&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&32768&&(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&&(k(n),k(r)),I(e,a),I(u)}}}function v0(t){let e,n,r,i;return e=new jr({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[y0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32768&&(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&&k(n),I(e,s),I(r,s)}}}function k0(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[v0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment),n=B(),M(r.$$.fragment)},m(s,o){L(e,s,o),C(s,n,o),L(r,s,o),i=!0},p(s,o){const u={};o&32768&&(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&&k(n),I(e,s),I(r,s)}}}function C0(t){let e,n,r,i,s,o,u;const l=t[10].default,a=pe(l,t,t[15],null);return n=new Qn({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[u0]},$$scope:{ctx:t}}}),i=new Qn({props:{open:!t[3]&&t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[_0]},$$scope:{ctx:t}}}),o=new Qn({props:{open:t[3],onOpenChange:t[14],$$slots:{default:[k0]},$$scope:{ctx:t}}}),{c(){a&&a.c(),e=B(),M(n.$$.fragment),r=B(),M(i.$$.fragment),s=B(),M(o.$$.fragment)},m(f,c){a&&a.m(f,c),C(f,e,c),L(n,f,c),C(f,r,c),L(i,f,c),C(f,s,c),L(o,f,c),u=!0},p(f,[c]){a&&a.p&&(!u||c&32768)&&_e(a,l,f,f[15],u?he(l,f[15],c,null):ge(f[15]),null);const d={};c&4&&(d.open=f[2]==="pending"),c&32768&&(d.$$scope={dirty:c,ctx:f}),n.$set(d);const m={};c&12&&(m.open=!f[3]&&f[2]==="error"),c&32819&&(m.$$scope={dirty:c,ctx:f}),i.$set(m);const p={};c&8&&(p.open=f[3]),c&32768&&(p.$$scope={dirty:c,ctx:f}),o.$set(p)},i(f){u||(b(a,f),b(n.$$.fragment,f),b(i.$$.fragment,f),b(o.$$.fragment,f),u=!0)},o(f){y(a,f),y(n.$$.fragment,f),y(i.$$.fragment,f),y(o.$$.fragment,f),u=!1},d(f){f&&(k(e),k(r),k(s)),a&&a.d(f),I(n,f),I(i,f),I(o,f)}}}function E0(t,e,n){let r,i,s,o,{$$slots:u={},$$scope:l}=e;const a=_t(),f=Ln();X(t,f,T=>n(4,s=T));const c=Rr({queryKey:["auth","user"],queryFn:cn,retry:!1,refetchInterval:2e4});ct("currentUser",c);const d=Ue([f,c],([T,E])=>T.isSuccess?E.isSuccess?"authenticated":E.isError?T.data.auth.provider==="no-auth"||T.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(V=>{V.ok&&a.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":E.status:T.status);X(t,d,T=>n(2,r=T)),ct("authStatus",d);let m="",p="";const h=Ci({mutationFn:async([T,E])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:T,password:E})})).ok)a.invalidateQueries({queryKey:["auth"]}),a.invalidateQueries({queryKey:["branches"]}),n(0,m=""),n(1,p="");else throw"Authentication failed"}});X(t,h,T=>n(5,o=T));const v=Fe(!1);X(t,v,T=>n(3,i=T)),ct("hasLoggedOut",v);function g(){m=this.value,n(0,m)}function _(){p=this.value,n(1,p)}const w=T=>{T.preventDefault(),o.isPending||o.mutate([m,p])},A=T=>{T||v.set(!1)};return t.$$set=T=>{"$$scope"in T&&n(15,l=T.$$scope)},[m,p,r,i,s,o,f,d,h,v,u,g,_,w,A,l]}class w0 extends ye{constructor(e){super(),be(this,e,E0,C0,de,{})}}function $0(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 O0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=Tf("branch"),o=Ln(),u=Vo(),l=Ue([o,u],([p,h])=>({queryKey:["branches"],queryFn:cn,refetchInterval:6e4,enabled:p.isSuccess&&p.data.ready&&h.isSuccess})),a=Rr(l);ct("branches",a);const f=Fe(null);ct("currentBranch",f);const c=o.subscribe(p=>{p.isSuccess&&p.data.ready&&!p.data.git.enabled&&f.set({id:"-",nogit:!0,title:"All files"})}),d=f.subscribe(p=>{p!==null?Af("branch",p.id):p1("branch")}),m=a.subscribe(p=>{if(p.isSuccess){for(let h of p.data.local)h.id===s&&f.set(h);m()}});return ms(()=>{d(),c()}),t.$$set=p=>{"$$scope"in p&&n(0,i=p.$$scope)},[i,r]}class A0 extends ye{constructor(e){super(),be(this,e,O0,$0,de,{})}}var ii={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.cloneArrayBuffer=void 0;function T0(t){var e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}nr.cloneArrayBuffer=T0;var Di={};Object.defineProperty(Di,"__esModule",{value:!0});Di.cloneDataView=void 0;var D0=nr;function S0(t){var e=(0,D0.cloneArrayBuffer)(t.buffer);return new DataView(e,t.byteOffset,t.byteLength)}Di.cloneDataView=S0;var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.cloneDate=void 0;function R0(t){return new Date(t.getTime())}Si.cloneDate=R0;var Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.cloneRegExp=void 0;function P0(t){var e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}Ri.cloneRegExp=P0;var Pi={};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.cloneTypedArray=void 0;var F0=nr,js={"[object Float32Array]":Float32Array,"[object Float64Array]":Float64Array,"[object Int8Array]":Int8Array,"[object Int16Array]":Int16Array,"[object Int32Array]":Int32Array,"[object Uint8Array]":Uint8Array,"[object Uint16Array]":Uint16Array,"[object Uint32Array]":Uint32Array,"[object Uint8ClampedArray]":Uint8ClampedArray};function L0(t){try{js["[object BigInt64Array]"]=BigInt64Array,js["[object BigUint64Array]"]=BigUint64Array}catch{}var e=(0,F0.cloneArrayBuffer)(t.buffer);return new js[Object.prototype.toString.call(t)](e,t.byteOffset,t.length)}Pi.cloneTypedArray=L0;var ei={},ti={},aa;function I0(){if(aa)return ti;aa=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.cloneMap=void 0;var t=If();function e(n){var r=new Map;return n.forEach(function(i,s){return r.set((0,t.deepCopy)(s),(0,t.deepCopy)(i))}),r}return ti.cloneMap=e,ti}var fa;function If(){if(fa)return ei;fa=1;var t=go&&go.__assign||function(){return t=Object.assign||function(a){for(var f,c=1,d=arguments.length;c<d;c++){f=arguments[c];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(a[m]=f[m])}return a},t.apply(this,arguments)};Object.defineProperty(ei,"__esModule",{value:!0}),ei.deepCopy=void 0;var e=nr,n=Di,r=Si,i=I0(),s=Ri,o=Pi,u={"[object Date]":r.cloneDate,"[object ArrayBuffer]":e.cloneArrayBuffer,"[object DataView]":n.cloneDataView,"[object Float32Array]":o.cloneTypedArray,"[object Float64Array]":o.cloneTypedArray,"[object Int8Array]":o.cloneTypedArray,"[object Int16Array]":o.cloneTypedArray,"[object Int32Array]":o.cloneTypedArray,"[object Uint8Array]":o.cloneTypedArray,"[object Uint8ClampedArray]":o.cloneTypedArray,"[object Uint16Array]":o.cloneTypedArray,"[object Uint32Array]":o.cloneTypedArray,"[object BigInt64Array]":o.cloneTypedArray,"[object BigUint64Array]":o.cloneTypedArray,"[object RegExp]":s.cloneRegExp,"[object Map]":i.cloneMap};function l(a){var f=Object.prototype.toString.call(a);if(u[f])return u[f](a);if(a===null)return a;if(a instanceof Array){var c=[];return a.forEach(function(m){c.push(m)}),c.map(function(m){return l(m)})}if(typeof a=="object"){var d=t({},a);return Object.keys(d).forEach(function(m){d[m]=l(d[m])}),d}return a}return ei.deepCopy=l,ei}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.deepCopy=t.cloneTypedArray=t.cloneRegExp=t.cloneDate=t.cloneDataView=t.cloneArrayBuffer=void 0;var e=nr;Object.defineProperty(t,"cloneArrayBuffer",{enumerable:!0,get:function(){return e.cloneArrayBuffer}});var n=Di;Object.defineProperty(t,"cloneDataView",{enumerable:!0,get:function(){return n.cloneDataView}});var r=Si;Object.defineProperty(t,"cloneDate",{enumerable:!0,get:function(){return r.cloneDate}});var i=Ri;Object.defineProperty(t,"cloneRegExp",{enumerable:!0,get:function(){return i.cloneRegExp}});var s=Pi;Object.defineProperty(t,"cloneTypedArray",{enumerable:!0,get:function(){return s.cloneTypedArray}});var o=If();Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return o.deepCopy}})})(ii);function M0(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 N0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=bt(),o=Ue(s,d=>d!==null?{queryKey:["branches",d.id,"configs","uedition"],queryFn:cn}:{queryKey:["branches","-","configs","uedition"],queryFn:cn,enabled:d!==null}),u=Rr(o);ct("uEditionConfig",u);const l=Ue(s,d=>d!==null?{queryKey:["branches",d.id,"configs","ueditor"],queryFn:cn}:{queryKey:["branches","-","configs","ueditor"],queryFn:cn,enabled:!1}),a=Rr(l);ct("uEditorConfig",a);const f=Ue([u,a],([d,m])=>{if(d.isSuccess&&m.isSuccess){let p=ii.deepCopy(m.data.tei.blocks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.blocks&&(p=p.concat(ii.deepCopy(d.data.sphinx_config.tei.blocks))),p}return[]});ct("configuredTEIBlocks",f);const c=Ue([u,a],([d,m])=>{if(d.isSuccess&&m.isSuccess){let p=ii.deepCopy(m.data.tei.marks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.marks&&(p=p.concat(ii.deepCopy(d.data.sphinx_config.tei.marks))),p}return[]});return ct("configuredTEIMarks",c),t.$$set=d=>{"$$scope"in d&&n(0,i=d.$$scope)},[i,r]}class V0 extends ye{constructor(e){super(),be(this,e,N0,M0,de,{})}}function H0(t){let e,n;return e=new zy({}),{c(){M(e.$$.fragment)},m(r,i){L(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){I(e,r)}}}function B0(t){let e,n;return e=new V0({props:{$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function U0(t){let e,n;return e=new A0({props:{$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function j0(t){let e,n;return e=new w0({props:{$$slots:{default:[U0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function K0(t){let e,n;return e=new i0({props:{$$slots:{default:[j0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function q0(t){let e,n;return e=new Dc({props:{client:t[0],$$slots:{default:[K0]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(r,i){L(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){I(e,r)}}}function W0(t){return[new Ha]}class Q0 extends ye{constructor(e){super(),be(this,e,W0,q0,de,{})}}new Q0({target:document.getElementById("app")});export{hr as $,M as A,L as B,G as C,we as D,I as E,Te as F,e1 as G,i1 as H,De as I,Oe as J,Jf as K,h1 as L,_t as M,Df as N,pu as O,Vt as P,Nt as Q,I2 as R,ye as S,x as T,tv as U,Ei as V,rv as W,Le as X,Ce as Y,Xe as Z,Fe as _,B as a,An as a$,Ue as a0,It as a1,Nr as a2,Jn as a3,ci as a4,Jc as a5,ts as a6,pr as a7,Pc as a8,ov as a9,nv as aA,ze as aB,ev as aC,kt as aD,sv as aE,lv as aF,_i as aG,$i as aH,ct as aI,Oi as aJ,st as aK,yf as aL,pe as aM,_e as aN,ge as aO,he as aP,qe as aQ,Fn as aR,ie as aS,Et as aT,Ae as aU,le as aV,je as aW,Ve as aX,Pn as aY,dt as aZ,Rn as a_,oi as aa,rt as ab,ae as ac,iv as ad,jt as ae,Sc as af,oo as ag,on as ah,Z0 as ai,X0 as aj,x0 as ak,J0 as al,pi as am,Lt as an,xe as ao,as as ap,Pr as aq,Lr as ar,Nc as as,uv as at,tl as au,fi as av,ht as aw,so as ax,gn as ay,To as az,F as b,qm as b0,Kt as b1,Ir as b2,cv as b3,fv as b4,v2 as b5,N_ as b6,q_ as b7,mv as b8,dv as b9,pv as ba,av as bb,gv as bc,bv as bd,hv as be,Wo as bf,it as bg,s1 as bh,Qn as bi,_v as bj,tr as bk,xn as bl,jr as bm,er as bn,gt as bo,Ot as bp,G0 as bq,C as c,P as d,D as e,Ne as f,fe as g,y as h,be as i,ce as j,b as k,k as l,X as m,ot as n,bt as o,ds as p,ms as q,Ge as r,de as s,Y as t,Ln as u,ke as v,me as w,r1 as x,Z_ as y,x_ as z};
|