@nanoforge-dev/editor 0.0.2-beta.f0560db → 0.0.2-beta.fc0d1cd
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.
- package/dist/client/_app/immutable/assets/0.Xcgigg-r.css +1 -0
- package/dist/client/_app/immutable/assets/0.Xcgigg-r.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.Xcgigg-r.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CVHDnHfN.js → 1ZbXMhKX.js} +1 -1
- package/dist/client/_app/immutable/chunks/1ZbXMhKX.js.br +0 -0
- package/dist/client/_app/immutable/chunks/{CVHDnHfN.js.gz → 1ZbXMhKX.js.gz} +0 -0
- package/dist/client/_app/immutable/chunks/{DXCLqAaQ.js → BQrdHEHc.js} +1 -1
- package/dist/client/_app/immutable/chunks/BQrdHEHc.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BQrdHEHc.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BnWY0TZI.js → Bn0cfuQz.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bn0cfuQz.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bn0cfuQz.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{IxQBh0uF.js → CGhFTv-9.js} +1 -1
- package/dist/client/_app/immutable/chunks/CGhFTv-9.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CGhFTv-9.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BGzu53pG.js → D1pNP-39.js} +1 -1
- package/dist/client/_app/immutable/chunks/D1pNP-39.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D1pNP-39.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DoLBDi-M.js → O6OXZq52.js} +2 -2
- package/dist/client/_app/immutable/chunks/O6OXZq52.js.br +0 -0
- package/dist/client/_app/immutable/chunks/O6OXZq52.js.gz +0 -0
- package/dist/client/_app/immutable/entry/{app.BDH5Gw2t.js → app.CHlSmumN.js} +2 -2
- package/dist/client/_app/immutable/entry/app.CHlSmumN.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.CHlSmumN.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.Bh2Jirg5.js +1 -0
- package/dist/client/_app/immutable/entry/start.Bh2Jirg5.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.Bh2Jirg5.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.nyMXETd-.js → 1.DgqYc4Es.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.DgqYc4Es.js.br +1 -0
- package/dist/client/_app/immutable/nodes/1.DgqYc4Es.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{10.D5dyxEoB.js → 10.CPntQxrM.js} +1 -1
- package/dist/client/_app/immutable/nodes/10.CPntQxrM.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.CPntQxrM.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.BvtP2uGu.js +1 -0
- package/dist/client/_app/immutable/nodes/2.BvtP2uGu.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.BvtP2uGu.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.Dnvl5O3h.js +6 -0
- package/dist/client/_app/immutable/nodes/3.Dnvl5O3h.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.Dnvl5O3h.js.gz +0 -0
- package/dist/client/_app/version.json +1 -1
- package/dist/client/_app/version.json.br +0 -0
- package/dist/client/_app/version.json.gz +0 -0
- package/dist/server/chunks/{0-DZ9xD1ZS.js → 0-BFVFB4zK.js} +3 -3
- package/dist/server/chunks/{0-DZ9xD1ZS.js.map → 0-BFVFB4zK.js.map} +1 -1
- package/dist/server/chunks/{1-BmDOEhD1.js → 1-CkN1QrF2.js} +5 -5
- package/dist/server/chunks/{1-BmDOEhD1.js.map → 1-CkN1QrF2.js.map} +1 -1
- package/dist/server/chunks/{10-fxkdMQYG.js → 10-CL5Wsw_3.js} +8 -8
- package/dist/server/chunks/{10-fxkdMQYG.js.map → 10-CL5Wsw_3.js.map} +1 -1
- package/dist/server/chunks/{2-CTnsJAeO.js → 2-CeIjPqDr.js} +7 -7
- package/dist/server/chunks/{2-CTnsJAeO.js.map → 2-CeIjPqDr.js.map} +1 -1
- package/dist/server/chunks/{3-sY71Rvnf.js → 3-D-t0y5Vx.js} +8 -8
- package/dist/server/chunks/{3-sY71Rvnf.js.map → 3-D-t0y5Vx.js.map} +1 -1
- package/dist/server/chunks/{4-BYQgShv3.js → 4-qyUzsfZE.js} +2 -2
- package/dist/server/chunks/{4-BYQgShv3.js.map → 4-qyUzsfZE.js.map} +1 -1
- package/dist/server/chunks/{5-B4IXyXqv.js → 5-vEDa-7Ja.js} +2 -2
- package/dist/server/chunks/{5-B4IXyXqv.js.map → 5-vEDa-7Ja.js.map} +1 -1
- package/dist/server/chunks/{6-DH_IMDRv.js → 6-DcothCTl.js} +2 -2
- package/dist/server/chunks/{6-DH_IMDRv.js.map → 6-DcothCTl.js.map} +1 -1
- package/dist/server/chunks/{7-CPMeoSUO.js → 7-Bqxp6Tse.js} +46 -33
- package/dist/server/chunks/7-Bqxp6Tse.js.map +1 -0
- package/dist/server/chunks/{8-CRTa48Fz.js → 8-RoqjqsjL.js} +2 -2
- package/dist/server/chunks/{8-CRTa48Fz.js.map → 8-RoqjqsjL.js.map} +1 -1
- package/dist/server/chunks/{9-DPn3d8kr.js → 9-C77C9kT6.js} +2 -2
- package/dist/server/chunks/{9-DPn3d8kr.js.map → 9-C77C9kT6.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-DrUJljJj.js → _page.svelte-BwaxfCRq.js} +5 -5
- package/dist/server/chunks/{_page.svelte-DrUJljJj.js.map → _page.svelte-BwaxfCRq.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-C9Sfe7iL.js → _page.svelte-CrJhHWN4.js} +6 -6
- package/dist/server/chunks/{_page.svelte-C9Sfe7iL.js.map → _page.svelte-CrJhHWN4.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-CKCWxyuV.js → _page.svelte-DrWgcSCo.js} +32 -57
- package/dist/server/chunks/_page.svelte-DrWgcSCo.js.map +1 -0
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js → _server.ts-BZShw6zf.js} +2 -2
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js.map → _server.ts-BZShw6zf.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js → _server.ts-DeaZ8-KE.js} +2 -2
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js.map → _server.ts-DeaZ8-KE.js.map} +1 -1
- package/dist/server/chunks/{client-wcMzlYMJ.js → client-QmyoVM_0.js} +2 -2
- package/dist/server/chunks/{client-wcMzlYMJ.js.map → client-QmyoVM_0.js.map} +1 -1
- package/dist/server/chunks/{error-yRLerN6-.js → error-Cs7n8fLM.js} +18 -46
- package/dist/server/chunks/error-Cs7n8fLM.js.map +1 -0
- package/dist/server/chunks/{error.svelte-CSc64jDg.js → error.svelte-C06DafpQ.js} +2 -2
- package/dist/server/chunks/{error.svelte-CSc64jDg.js.map → error.svelte-C06DafpQ.js.map} +1 -1
- package/dist/server/chunks/{hooks.server-DZzWiuvp.js → hooks.server-CKf7wcfS.js} +2 -2
- package/dist/server/chunks/{hooks.server-DZzWiuvp.js.map → hooks.server-CKf7wcfS.js.map} +1 -1
- package/dist/server/chunks/{internal2-CymmS2kD.js → internal2-CrUoeHEW.js} +3 -3
- package/dist/server/chunks/{internal2-CymmS2kD.js.map → internal2-CrUoeHEW.js.map} +1 -1
- package/dist/server/chunks/{logo-DQvU3yHs.js → logo-C9NJFJD5.js} +2 -2
- package/dist/server/chunks/logo-C9NJFJD5.js.map +1 -0
- package/dist/server/chunks/{project-loader-WpOsdMow.js → project-loader-Mem_2oUb.js} +3 -3
- package/dist/server/chunks/{project-loader-WpOsdMow.js.map → project-loader-Mem_2oUb.js.map} +1 -1
- package/dist/server/chunks/{request-handler-guINVc1G.js → request-handler-CoqDYYWp.js} +25 -16
- package/dist/server/chunks/request-handler-CoqDYYWp.js.map +1 -0
- package/dist/server/chunks/{schemas-C35GnK5_.js → schemas-D16L65kQ.js} +4 -4
- package/dist/server/chunks/{schemas-C35GnK5_.js.map → schemas-D16L65kQ.js.map} +1 -1
- package/dist/server/chunks/{state-t8aj5-Cf.js → state-Bwq9qDSb.js} +2 -2
- package/dist/server/chunks/{state-t8aj5-Cf.js.map → state-Bwq9qDSb.js.map} +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/manifest.js +18 -18
- package/dist/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/_app/immutable/assets/0.DM_luNRS.css +0 -1
- package/dist/client/_app/immutable/assets/0.DM_luNRS.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.DM_luNRS.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/BGzu53pG.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BGzu53pG.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BnWY0TZI.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BnWY0TZI.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CVHDnHfN.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DXCLqAaQ.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DXCLqAaQ.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DoLBDi-M.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DoLBDi-M.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/IxQBh0uF.js.br +0 -0
- package/dist/client/_app/immutable/chunks/IxQBh0uF.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.BDH5Gw2t.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.BDH5Gw2t.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.D1GEGS4G.js +0 -1
- package/dist/client/_app/immutable/entry/start.D1GEGS4G.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.D1GEGS4G.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.nyMXETd-.js.br +0 -1
- package/dist/client/_app/immutable/nodes/1.nyMXETd-.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.D5dyxEoB.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.D5dyxEoB.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.LU26GJum.js +0 -1
- package/dist/client/_app/immutable/nodes/2.LU26GJum.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.LU26GJum.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.DekRDPns.js +0 -6
- package/dist/client/_app/immutable/nodes/3.DekRDPns.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.DekRDPns.js.gz +0 -0
- package/dist/server/chunks/7-CPMeoSUO.js.map +0 -1
- package/dist/server/chunks/_page.svelte-CKCWxyuV.js.map +0 -1
- package/dist/server/chunks/error-yRLerN6-.js.map +0 -1
- package/dist/server/chunks/logo-DQvU3yHs.js.map +0 -1
- package/dist/server/chunks/request-handler-guINVc1G.js.map +0 -1
- /package/dist/client/_app/immutable/nodes/{0.YMw6-DDI.js → 0.mroIa76t.js} +0 -0
- /package/dist/client/_app/immutable/nodes/{0.YMw6-DDI.js.br → 0.mroIa76t.js.br} +0 -0
- /package/dist/client/_app/immutable/nodes/{0.YMw6-DDI.js.gz → 0.mroIa76t.js.gz} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,Ct as i,D as a,E as o,F as s,G as c,H as l,I as u,M as d,N as f,O as p,Ot as m,Q as h,S as g,St as _,V as v,W as y,Z as b,_t as x,a as S,bt as C,c as w,ct as T,d as ee,dt as te,et as E,ht as D,j as O,k as ne,kt as k,l as A,nt as j,o as M,ot as N,p as P,q as re,r as ie,rt as F,s as I,tt as L,ut as R,vt as ae,w as z,xt as B,y as oe,yt as se}from"./ZLGReh43.js";import{a as ce,h as le,n as ue,o as de,p as fe,r as pe}from"./
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,Ct as i,D as a,E as o,F as s,G as c,H as l,I as u,M as d,N as f,O as p,Ot as m,Q as h,S as g,St as _,V as v,W as y,Z as b,_t as x,a as S,bt as C,c as w,ct as T,d as ee,dt as te,et as E,ht as D,j as O,k as ne,kt as k,l as A,nt as j,o as M,ot as N,p as P,q as re,r as ie,rt as F,s as I,tt as L,ut as R,vt as ae,w as z,xt as B,y as oe,yt as se}from"./ZLGReh43.js";import{a as ce,h as le,n as ue,o as de,p as fe,r as pe}from"./Bn0cfuQz.js";import{t as me}from"./JwdpM2S5.js";import"./xihTtKlq.js";import{A as he,F as ge,I as _e,L as ve,M as ye,N as be,O as xe,R as Se,T as Ce,b as we,d as Te,f as Ee,h as De,i as Oe,j as ke,l as Ae,n as je,t as Me,u as Ne,x as Pe,y as Fe}from"./orCHVlgT.js";var Ie=2**32-1,Le=Ie-1,Re=class extends Error{constructor(e,t,n,r){super(e),this.name=`DevalueError`,this.path=t.join(``),this.value=n,this.root=r}};function ze(e){return e===null||typeof e!=`object`&&typeof e!=`function`}var Be=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ve(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getPrototypeOf(t)===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Be}function He(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ue(e){switch(e){case`"`:return`\\"`;case`<`:return`\\u003C`;case`\\`:return`\\\\`;case`
|
|
2
2
|
`:return`\\n`;case`\r`:return`\\r`;case` `:return`\\t`;case`\b`:return`\\b`;case`\f`:return`\\f`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return e<` `?`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`:``}}function We(e){let t=``,n=0,r=e.length;for(let i=0;i<r;i+=1){let r=e[i],a=Ue(r);a&&(t+=e.slice(n,i)+a,n=i+1)}return`"${n===0?e:t+e.slice(n)}"`}function Ge(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)}var Ke=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function qe(e){return Ke.test(e)?`.`+e:`[`+JSON.stringify(e)+`]`}function Je(e){return!(!Number.isInteger(e)||e<0||e>Le)}function Ye(e){return!(!Number.isInteger(e)||e<0||e>Ie)}function Xe(e){if(e.length===0||e.length>1&&e.charCodeAt(0)===48)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return Je(+e)}function Ze(e){let t=Object.keys(e);for(var n=t.length-1;n>=0&&!Xe(t[n]);n--);return t.length=n+1,t}function Qe(e){return new Uint8Array(e).toBase64()}function $e(e){return Uint8Array.fromBase64(e).buffer}function et(e){return Buffer.from(e).toString(`base64`)}function tt(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function nt(e){let t=new Uint8Array(e),n=``,r=32768;for(let e=0;e<t.length;e+=r){let i=t.subarray(e,e+r);n+=String.fromCharCode.apply(null,i)}return btoa(n)}function rt(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var it=typeof Uint8Array.fromBase64==`function`,at=typeof process==`object`&&process.versions?.node!==void 0,ot=it?Qe:at?et:nt,st=it?$e:at?tt:rt;function ct(e,t){return lt(JSON.parse(e),t)}function lt(e,t){if(typeof e==`number`)return a(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let n=e,r=Array(n.length),i=null;function a(e,o=!1){if(e===-1)return;if(e===-3)return NaN;if(e===-4)return 1/0;if(e===-5)return-1/0;if(e===-6)return-0;if(o||typeof e!=`number`)throw Error(`Invalid input`);if(e in r)return r[e];let s=n[e];if(!s||typeof s!=`object`)r[e]=s;else if(Array.isArray(s))if(typeof s[0]==`string`){let o=s[0],c=t&&Object.hasOwn(t,o)?t[o]:void 0;if(c){let t=s[1];if(typeof t!=`number`&&(t=n.push(s[1])-1),i??=new Set,i.has(t))throw Error(`Invalid circular reference`);return i.add(t),r[e]=c(a(t)),i.delete(t),r[e]}switch(o){case`Date`:r[e]=new Date(s[1]);break;case`Set`:let t=new Set;r[e]=t;for(let e=1;e<s.length;e+=1)t.add(a(s[e]));break;case`Map`:let i=new Map;r[e]=i;for(let e=1;e<s.length;e+=2)i.set(a(s[e]),a(s[e+1]));break;case`RegExp`:r[e]=new RegExp(s[1],s[2]);break;case`Object`:{let t=s[1];if(typeof n[t]==`object`&&n[t][0]!==`BigInt`)throw Error(`Invalid input`);r[e]=Object(a(t));break}case`BigInt`:r[e]=BigInt(s[1]);break;case`null`:let c=Object.create(null);r[e]=c;for(let e=1;e<s.length;e+=2){if(s[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");c[s[e]]=a(s[e+1])}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(n[s[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=globalThis[o],i=a(s[1]);r[e]=s[2]===void 0?new t(i):new t(i,s[2],s[3]);break}case`ArrayBuffer`:{let t=s[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);r[e]=st(t);break}case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:{let t=o.slice(9);r[e]=Temporal[t].from(s[1]);break}case`URL`:r[e]=new URL(s[1]);break;case`URLSearchParams`:r[e]=new URLSearchParams(s[1]);break;default:throw Error(`Unknown type ${o}`)}}else if(s[0]===-7){let t=s[1];if(!Ye(t))throw Error(`Invalid input`);let n=[];r[e]=n,n[Le]=void 0,delete n[Le];for(let e=2;e<s.length;e+=2){let r=s[e];if(!Je(r)||r>=t)throw Error(`Invalid input`);n[r]=a(s[e+1])}n.length=t}else{let t=Array(s.length);r[e]=t;for(let e=0;e<s.length;e+=1){let n=s[e];n!==-2&&(t[e]=a(n))}}else{let t={};r[e]=t;for(let e of Object.keys(s)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");let n=s[e];t[e]=a(n)}}return r[e]}return a(0)}var ut=class extends Se{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=we(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ft(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ke(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!be(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&mt(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ke(this.options.enabled,this.#t)!==ke(t.enabled,this.#t)||ye(this.options.staleTime,this.#t)!==ye(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ke(this.options.enabled,this.#t)!==ke(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return gt(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(xe)),t}#g(){this.#b();let e=ye(this.options.staleTime,this.#t);if(Pe.isServer()||this.#r.isStale||!Ce(e))return;let t=ge(this.#r.dataUpdatedAt,e)+1;this.#d=_e.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Pe.isServer()||ke(this.options.enabled,this.#t)===!1||!Ce(this.#p)||this.#p===0)&&(this.#f=_e.setInterval(()=>{(this.options.refetchIntervalInBackground||ve.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(_e.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(_e.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ft(e,t),o=i&&mt(e,n,t,r);(a||o)&&(l={...l,...De(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=he(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=he(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ht(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ke(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=we())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!be(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Fe.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function dt(e,t){return ke(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&ke(t.retryOnMount,e)===!1)}function ft(e,t){return dt(e,t)||e.state.data!==void 0&&pt(e,t,t.refetchOnMount)}function pt(e,t,n){if(ke(t.enabled,e)!==!1&&ye(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ht(e,t)}return!1}function mt(e,t,n,r){return(e!==t||ke(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ht(e,n)}function ht(e,t){return ke(t.enabled,e)!==!1&&e.isStaleByTime(ye(t.staleTime,e))}function gt(e,t){return!be(e.getCurrentResult(),t)}function _t(){return Te()}function vt(e){return e||Ee()}function yt(e){let t=Array.isArray(e)?[]:{},n=new Ne,r=new Proxy(t,{set(e,t,r,i){if(n.delete(t),t in e)return Reflect.set(e,t,r,i);let a=T(r);return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:()=>l(a)&&St(l(a))?l(a)():l(a),set:e=>{N(a,e)}}),!0},has:(e,t)=>n.has(t)?!1:t in e,ownKeys(e){return Reflect.ownKeys(e).filter(e=>!n.has(e))},getOwnPropertyDescriptor(e,t){if(!n.has(t))return Reflect.getOwnPropertyDescriptor(e,t)},deleteProperty(e,t){return t in e?(e[t]=void 0,n.add(t),Array.isArray(e)&&e.length--,!0):!1}});function i(e){let t=Object.keys(r),n=Object.keys(e),i=t.filter(e=>!n.includes(e));for(let e of i)delete r[e];for(let t of n)r[t]=xt(()=>e[t])}return i(e),[r,i]}var bt=Symbol(`LazyValue`);function xt(e){return e[bt]=!0,e}function St(e){return!!e[bt]}function Ct(t,n){switch(t){case`post`:h(n);break;case`pre`:e(n);break}}var wt=(e,t,n)=>{let r=!1,i=Array.isArray(e)?[]:void 0;Ct(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!r){r=!0,i=t;return}let a=c(()=>n(t,i));return i=t,a})};function Tt(e,t,n){let r=R(()=>vt(n?.())),i=_t(),a=R(()=>{let t=l(r).defaultQueryOptions(e());return t._optimisticResults=i.current?`isRestoring`:`optimistic`,t}),o=T(F(new t(l(r),l(a))));wt(()=>l(r),`pre`,()=>{N(o,new t(l(r),l(a)),!0)});function s(){let e=l(o).getOptimisticResult(l(a));return l(a).notifyOnChangeProps?e:l(o).trackResult(e)}let[c,u]=yt(s());return h(()=>{let e=i.current?()=>void 0:l(o).subscribe(()=>u(s()));return l(o).updateResult(),e}),wt(()=>l(a),`pre`,()=>{l(o).setOptions(l(a))}),wt(()=>[l(a),l(o)],`pre`,()=>{u(s())}),c}function Et(e,t){return Tt(e,ut,t)}var Dt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ot=/\n/g,kt=/^\s*/,At=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,jt=/^:\s*/,Mt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Nt=/^[;\s]*/,Pt=/^\s+|\s+$/g,Ft=`
|
|
3
|
-
`,It=`/`,Lt=`*`,Rt=``,zt=`comment`,Bt=`declaration`;function Vt(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Ot);t&&(n+=t.length);var i=e.lastIndexOf(Ft);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(kt)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(It!=e.charAt(0)||Lt!=e.charAt(1))){for(var n=2;Rt!=e.charAt(n)&&(Lt!=e.charAt(n)||It!=e.charAt(n+1));)++n;if(n+=2,Rt===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:zt,comment:o})}}function f(){var e=a(),t=c(At);if(t){if(d(),!c(jt))return s(`property missing ':'`);var n=c(Mt),r=e({type:Bt,property:Ht(t[0].replace(Dt,Rt)),value:n?Ht(n[0].replace(Dt,Rt)):Rt});return c(Nt),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ht(e){return e?e.replace(Pt,Rt):Rt}function Ut(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Vt(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Wt=`https://docs.nanoforge.eu`,Gt=`https://projects.nanoforge.eu`,Kt=`https://nanoforge.eu`,qt=()=>({mode:`online`}),Jt=`x-project-id`,Yt=class{_baseUrl;_baseOptions;_middlewares;constructor(e,t){this._baseUrl=e,this._baseOptions=t??{headers:{"Content-Type":`application/json`}},this._middlewares=[]}get(e,t){return this._applyMiddlewares(e,t,(e,t)=>this._request(e,{...t,method:`GET`}))}post(e,t,n){return this._applyMiddlewares(e,n,(e,n)=>this._request(e,{...n,method:`POST`,body:t}))}put(e,t,n){return this._applyMiddlewares(e,n,(e,n)=>this._request(e,{...n,method:`PUT`,body:t}))}patch(e,t,n){return this._applyMiddlewares(e,n,async(e,n)=>this._request(e,{...n,method:`PATCH`,body:t}))}delete(e,t){return this._applyMiddlewares(e,t,(e,t)=>this._request(e,{...t,method:`DELETE`}))}useMiddlewares(...e){for(let t of e)this._middlewares.push(t);return this}_request(e,t){return fetch(e,t)}_applyMiddlewares(e,t,n){let r={path:e,fullPath:this._getUrl(e),options:{...this._baseOptions,...t}},i=this._middlewares.slice(),a,o=async e=>{e||=r;let t=i.shift();return a=t?await t(e,o)??a:await n(e.fullPath,e.options),a};return o(r)}_getUrl(e){return`${this._baseUrl}${e}`}};function Xt(e){let t=JSON.parse(e);return t.data&&=ct(t.data,ue.decoders),t}function Zt(e){return HTMLElement.prototype.cloneNode.call(e)}function Qt(e,t=le){let n=async({action:t,result:n,reset:r=!0,invalidateAll:i=!0})=>{n.type===`success`&&(r&&HTMLFormElement.prototype.reset.call(e),i&&await de()),(location.origin+location.pathname===t.origin+t.pathname||n.type===`redirect`||n.type===`error`)&&await pe(n)};async function r(r){if((r.submitter?.hasAttribute(`formmethod`)?r.submitter.formMethod:Zt(e).method)!==`post`)return;r.preventDefault();let i=new URL(r.submitter?.hasAttribute(`formaction`)?r.submitter.formAction:Zt(e).action),a=r.submitter?.hasAttribute(`formenctype`)?r.submitter.formEnctype:Zt(e).enctype,o=new FormData(e,r.submitter),s=new AbortController,c=!1,l=await t({action:i,cancel:()=>c=!0,controller:s,formData:o,formElement:e,submitter:r.submitter})??n;if(c)return;let u;try{let e=new Headers({accept:`application/json`,"x-sveltekit-action":`true`});a!==`multipart/form-data`&&e.set(`Content-Type`,/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(a)?a:`application/x-www-form-urlencoded`);let t=a===`multipart/form-data`?o:new URLSearchParams(o),n=await fetch(i,{method:`POST`,headers:e,cache:`no-store`,body:t,signal:s.signal});u=Xt(await n.text()),u.type===`error`&&(u.status=n.status)}catch(e){if(e?.name===`AbortError`)return;u={type:`error`,error:e}}await l({action:i,formData:o,formElement:e,update:e=>n({action:i,result:u,reset:e?.reset,invalidateAll:e?.invalidateAll}),result:u})}return HTMLFormElement.prototype.addEventListener.call(e,`submit`,r),{destroy(){HTMLFormElement.prototype.removeEventListener.call(e,`submit`,r)}}}var $t=class extends Error{error;message;status;constructor(e,t,n,r){super(`${e}: ${t}`,r),this.error=e,this.message=t,this.status=n}},en=class{_client;constructor(e){this._client=e}run(e,t,n){return this.runRequestBody(e,t,n)}async runRequestBody(e,t,n){let r=Xt(await(await this._client.post(e,this._parseBodyToFormData(t),n)).text());if(r.type===`redirect`)throw Error(`Redirect (${r.status}) - ${r.location}`);if(r.type===`error`)throw r.error?.error&&r.error?.message&&r.status?new $t(r.error.error,r.error.message,r.status):Error(`Error (${r.status}) - ${r.error}`);if(r.type===`failure`)throw r.data?.error&&r.data?.message&&r.status?new $t(r.data.error,r.data.message,r.status):Error(`Failure (${r.status}) - ${r.data}`);return r.data}_parseBodyToFormData(e){let t=new FormData;if(e)for(let[n,r]of Object.entries(e)){let e;e=r instanceof File?r:JSON.stringify(r),t.append(n,e)}return t}},tn=class extends en{readdir(e){return this.run(`/actions/project/fs?/readdir`,e)}},nn=class extends en{env(){return this.run(`/actions/project/loader?/env`)}manifest(){return this.run(`/actions/project/loader?/manifest`)}build(){return this.run(`/actions/project/loader?/build`)}},rn=class extends en{addComponents(e){return this.run(`/actions/project/package?/add-components`,e)}addSystems(e){return this.run(`/actions/project/package?/add-systems`,e)}createComponent(e){return this.run(`/actions/project/package?/create-component`,e)}createSystem(e){return this.run(`/actions/project/package?/create-system`,e)}getComponentsManifests(e){return this.run(`/actions/project/package?/get-components-manifests`,e)}getSystemsManifests(e){return this.run(`/actions/project/package?/get-systems-manifests`,e)}getComponents(){return this.run(`/actions/project/package?/get-components`)}getSystems(){return this.run(`/actions/project/package?/get-systems`)}},an=class extends en{load(e){return this.run(`/actions/project?/load`,e)}new(e){return this.run(`/actions/project?/new`,e)}complete(e){return this.run(`/actions/project?/complete`,e)}getInfo(){return this.run(`/actions/project?/get-info`)}setInfo(e){return this.run(`/actions/project?/set-info`,e)}getGatewayProjects(){return this.run(`/actions/project?/get-gateway-projects`)}},on=class extends en{get(){return this.run(`/actions/project/save?/get`)}set(e){return this.run(`/actions/project/save?/set`,e)}},sn=e=>{let t=new Yt(``,e?{headers:{[Jt]:e}}:{});return{fs:new tn(t),loader:new nn(t),package:new rn(t),project:new an(t),save:new on(t)}},cn=sn(),ln=e=>({id:e.manifest.id,name:e.manifest.name,path:e.save.path,params:e.manifest.params}),un=e=>e.map(ln),dn=e=>({id:e.manifest.id,name:e.manifest.name,path:e.save.path}),fn=e=>e.map(dn),pn=e=>({id:e.path,name:e.name}),mn=e=>e.libraries.map(pn),hn=e=>[{id:`default`,name:`Default Scene`,path:`unknown`,subScenes:[],assets:[],systems:e.systems.map(e=>e.name),entities:e.entities.map(e=>({id:e.id,name:e.id,treePath:e.treePath,components:e.components}))}],gn=class{words;constructor(e){this.words=e}toKebab(){return this.words.join(`-`)}toPascal(){return this.words.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}toCamel(){return this.words.map((e,t)=>t===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1)).join(``)}toSnake(){return this.words.join(`_`)}},_n=e=>e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).replace(/[-_]+/g,` `).trim().split(/\s+/).filter(Boolean),vn={kebab:e=>new gn(e.split(`-`)),pascal:e=>new gn(e.split(/(?=[A-Z])/).map(e=>e.toLowerCase())),camel:e=>new gn(e.split(/(?=[A-Z])/).map(e=>e.toLowerCase())),snake:e=>new gn(e.split(`_`)),all:e=>new gn(_n(e).map(e=>e.toLowerCase()))},yn=e=>e.charAt(0).toUpperCase()+e.slice(1),bn=(e,{numbers:t=!0,lowers:n=!0,uppers:r=!1,specials:i=!1}={})=>{let a=``;return t&&(a+=`0123456789`),n&&(a+=`abcdefghijklmnopqrstuvwxyz`),r&&(a+=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`),i&&(a+="!@#$%^&*()_+~`|}{[]:;?><,./-="),[...Array(e)].map(()=>a[Math.floor(Math.random()*a.length)]).join(``)},xn=e=>{let t=D(e);Object.values(t).forEach(e=>{try{e?.()}catch{}}),e.set({})},Sn=e=>{D(e)?.forEach(e=>{try{e()}catch{}}),e.set(null)},Cn=(e,t,n)=>{let r=D(e);return t in r?r[t]:(r[t]=x(n),e.set(r),r[t])},wn=(e,t)=>{let n=vn.all(t).toSnake(),r=n;for(;e.find(e=>e.id===r);)r=`${n}_${bn(5)}`;return r},Tn=x({}),En=class{_manager;_store;id;static reset(){Tn.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(Tn,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){return this._manager.delete(this.id)}},Dn=x([]),On=x({}),kn=class{static reset(){Dn.set([]),xn(On)}constructor(e){Dn.set(e)}get store(){return Dn}get data(){return D(Dn)}async create(e){let{actions:t,fs:n}=ei(),r=await t.package.createComponent({componentName:e});this._add(ln(r)),await(await n.getDirectory()).readdir(!0)}async import(e){let{actions:t,ecs:n,fs:r}=ei();await t.package.addComponents({componentNames:e}),await this.sync(),await n.components.sync(),await(await r.getDirectory()).readdir(!0)}async sync(){let{actions:e}=ei(),t=await e.package.getComponents();Dn.set(un(t))}get(e){let t=D(Dn).find(t=>t.id===e);if(!t)throw Error(`Component with id ${e} not found`);let n=new En(this,t);return this._subscribe(e,n),n}async delete(e){let t=D(Dn),n=t.find(t=>t.id===e);if(!n)throw Error(`System not found: ${e}`);Dn.set(t.filter(t=>t.id!==e));let{fs:r}=ei();await(await r.getFile(n.path)).delete();let i=D(On);i[e]&&(i[e](),i[e]=null,On.set(i))}_add(e){let t=D(Dn);t.push(e),Dn.set(t)}_subscribe(e,t){setTimeout(()=>{let n=D(On);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),On.set(n))},0)}_update(e,t){let n=D(Dn),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,Dn.set(n))}},An=x({}),jn=class{_manager;id;_store;static reset(){An.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(An,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){this._manager.delete(this.id)}},Mn=x([]),Nn=x({}),Pn=class{static reset(){Mn.set([]),xn(Nn)}constructor(e){Mn.set(e)}get store(){return Mn}get data(){return D(Mn)}add(e){let t=D(Mn);return t.push({...e,id:e.name}),Mn.set(t),e.name}get(e){let t=D(Mn).find(t=>t.id===e);if(!t)throw Error(`Library with id ${e} not found`);let n=new jn(this,t);return this._subscribe(e,n),n}delete(e){let t=D(Mn);Mn.set(t.filter(t=>t.id!==e));let n=D(Nn);n[e]&&(n[e](),n[e]=null,Nn.set(n))}_subscribe(e,t){setTimeout(()=>{let n=D(Nn);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),Nn.set(n))},0)}_update(e,t){let n=D(Mn),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,Mn.set(n))}},Fn=x({}),In=x({}),Ln=x(),Rn=class{manager;id;_store;_valueStore;static reset(){Fn.set({}),In.set({}),Sn(Ln)}constructor(e,t,n){this.manager=e,this.id=t.name;let r=`${this.manager.component.manager.entity.manager.scene.id}/${this.manager.component.manager.entity.id}/${this.manager.component.id}/${this.id}`;this._store=Cn(Fn,r,t),this._valueStore=Cn(In,r,n),this._listen()}get store(){return this._store}get value(){return this._valueStore}delete(){this.manager.delete(this.id)}_listen(){if(D(Ln))return;let e=this.manager.component.store.subscribe(e=>{let t=e.params.find(e=>e.name===this.id);t&&this._store.set(t)});Ln.set([e])}},zn=x({}),Bn=x({}),Vn=x({}),Hn=x(),Un=class{component;_store;_valuesStore;_storageResolvable;static reset(){zn.set({}),Bn.set({}),xn(Vn),Sn(Hn)}constructor(e,t){this.component=e,this._storageResolvable=`${this.component.manager.entity.manager.scene.id}/${this.component.manager.entity.id}/${this.component.id}`,this._store=Cn(zn,this._storageResolvable,D(e.store).params),this._valuesStore=Cn(Bn,this._storageResolvable,t),this._listen()}get store(){return this._store}get values(){return this._valuesStore}get(e){let t=D(this._store).find(t=>t.name===e);if(!t)throw Error(`Param with id ${e} not found`);let n=D(this._valuesStore)[e],r=new Rn(this,t,n);return this._subscribe(e,r),r}delete(e){let t=D(this._store);this._store.set(t.map(t=>t.name===e?{...t,value:void 0}:t));let n=`${this._storageResolvable}/${e}`,r=D(Vn);r[n]&&(r[n](),r[n]=null,Vn.set(r))}_listen(){if(D(Hn))return;let e=this.component.store.subscribe(e=>{this._store.set(e.params)});Hn.set([e])}_subscribe(e,t){setTimeout(()=>{let n=`${this._storageResolvable}/${e}`,r=D(Vn);r[n]||(r[n]=t.value.subscribe(t=>this._update(e,t)),Vn.set(r))},0)}_update(e,t){let n=D(this._valuesStore);n[e]=t,this._valuesStore.set(n)}},Wn=class{manager;id;_store;_params;constructor(e,t,n){this.manager=e,this._store=e.entity.manager.scene.manager.ecs.components.get(t).store,this.id=t,this._params=new Un(this,n)}get store(){return this._store}get data(){return D(this._store)}get params(){return this._params}delete(){this.manager.delete(this.id)}},Gn=x({}),Kn=x({}),qn=x(),Jn=class{entity;_store;_storageResolvable;static reset(){Gn.set({}),xn(Kn),Sn(qn)}constructor(e,t){this.entity=e,this._storageResolvable=`${this.entity.manager.scene.id}/${this.entity.id}`,this._store=Cn(Gn,this._storageResolvable,t),this._listen()}get store(){return this._store}get data(){return D(this._store)}add(e){let t=D(this._store),n=this.entity.manager.scene.manager.ecs.components.get(e).data;t[e]={...Object.fromEntries(n.params.filter(e=>e.default).map(e=>[e.name,e.default]))},this._store.set(t)}get(e){let t=D(this._store)[e];if(!t)throw Error(`Component with id ${e} not found`);let n=new Wn(this,e,t);return this._subscribe(e,n),n}delete(e){let t=D(this._store),n={};Object.entries(t).forEach(([t,r])=>{t!==e&&(n[t]=r)}),this._store.set(n);let r=`${this._storageResolvable}/${e}`,i=D(Kn);i[r]&&(i[r](),i[r]=null,Kn.set(i))}_listen(){if(D(qn))return;let e=this.entity.manager.scene.manager.ecs.components.store.subscribe(e=>{let t=D(this._store),n={};Object.entries(t).forEach(([t,r])=>{e.find(e=>e.id===t)&&(n[t]=r)}),this._store.set(n)});qn.set([e])}_subscribe(e,t){setTimeout(()=>{let n=`${this._storageResolvable}/${e}`,r=D(Kn);r[n]||(r[n]=t.params.values.subscribe(t=>this._update(e,t)),Kn.set(r))},0)}_update(e,t){let n=D(this._store);n[e]=t,this._store.set(n)}},Yn=x({}),Xn=x(),Zn=class{manager;id;_store;_components;static reset(){Yn.set({}),Sn(Xn)}constructor(e,t){this.manager=e,this.id=t.id,this._store=Cn(Yn,`${this.manager.scene.id}/${this.id}`,t),this._components=new Jn(this,t.components),this._listen()}get store(){return this._store}get data(){return D(this._store)}get components(){return this._components}update(e){this._store.set({...D(this._store),...e})}delete(){this.manager.delete(this.id)}setSelected(){this.manager.selected=this}_listen(){if(D(Xn))return;let e=this._components.store.subscribe(e=>{let t=D(this._store);t.components=e,this._store.set(t)});Xn.set([e])}},Qn=x({}),$n=x({}),er=x(void 0),tr=class{scene;_store;static reset(){Qn.set({}),xn($n)}constructor(e,t){this.scene=e,this._store=Cn(Qn,this.scene.id,t)}get store(){return this._store}get data(){return D(this._store)}get selectedData(){return D(er)}get selected(){return er}set selected(e){er.set(e)}add(e){let t=D(this._store),n=wn(this.data,e.name);return t.push({...e,id:n}),this._store.set(t),n}get(e){let t=D(this._store).find(t=>t.id===e);if(!t)throw Error(`Entity with id ${e} not found`);let n=new Zn(this,t);return this._subscribe(e,n),n}delete(e){let t=D(this._store);this._store.set(t.filter(t=>t.id!==e));let n=`${this.scene.id}/${e}`,r=D($n);r[n]&&(r[n](),r[n]=null,$n.set(r)),this.selectedData?.id===e&&(this.selected=void 0)}_subscribe(e,t){setTimeout(()=>{let n=`${this.scene.id}/${e}`,r=D($n);r[n]||(r[n]=t.store.subscribe(t=>this._update(e,t)),$n.set(r))},0)}_update(e,t){let n=D(this._store),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,this._store.set(n))}},nr=class{manager;id;_store;constructor(e,t){this.manager=e,this.id=t,this._store=e.scene.manager.ecs.systems.get(t).store}get store(){return this._store}get data(){return D(this._store)}delete(){this.manager.delete(this.id)}},rr=x({}),ir=x(),ar=class{scene;_store;static reset(){rr.set({}),Sn(ir)}constructor(e,t){this.scene=e,this._store=Cn(rr,this.scene.id,t),this._listen()}get store(){return this._store}get data(){return D(this._store)}add(e){let t=D(this._store);t.push(e),this._store.set(t)}get(e){let t=D(this._store).find(t=>t===e);if(!t)throw Error(`System with id ${e} not found`);return new nr(this,t)}delete(e){let t=D(this._store);this._store.set(t.filter(t=>t!==e))}_listen(){if(D(ir))return;let e=this.scene.manager.ecs.systems.store.subscribe(e=>{let t=D(this._store);t.filter(t=>e.find(e=>e.id===t)),this._store.set(t)});ir.set([e])}},or=x({}),sr=x(),cr=class{manager;id;_store;_entities;_systems;static reset(){or.set({}),Sn(sr)}constructor(e,t){this.manager=e,this.id=t.id,this._store=Cn(or,this.id,t),this._entities=new tr(this,t.entities),this._systems=new ar(this,t.systems),this._listen()}get store(){return this._store}get data(){return D(this._store)}get entities(){return this._entities}get systems(){return this._systems}update(e){this._store.set({...D(this._store),...e})}delete(){this.manager.delete(this.id)}setActive(){this.manager.active=this}setDefault(){this.manager.default=this.id}_listen(){if(D(sr))return;let e=[this._entities.store.subscribe(e=>{let t=D(this._store);t.entities=e,this._store.set(t)}),this._systems.store.subscribe(e=>{let t=D(this._store);t.systems=e,this._store.set(t)})];sr.set(e)}},lr=x([]),ur=x([]),dr=x(),fr=x(),pr=x({}),mr=class{ecs;static reset(){lr.set([]),ur.set([]),dr.set(void 0),fr.set(void 0),xn(pr)}constructor(e,t,n,r){this.ecs=e,lr.set(t);let i=t.find(e=>e.id===r);if(!i)throw Error(`Default scene with id ${r} not found`);dr.set(new cr(this,i)),fr.set(r),ur.set(n)}get store(){return lr}get data(){return D(lr)}get activeData(){return D(dr)}get active(){return dr}set active(e){dr.set(e)}get defaultData(){return D(fr)}get default(){return fr}set default(e){fr.set(e)}get rootScenes(){return D(ur)}get rootScenesStore(){return ur}set rootScenes(e){ur.set(Array.from(new Set(e)))}add(e){let t=D(lr),n=wn(this.data,e.name);return t.push({...e,id:n}),lr.set(t),n}get(e){let t=D(lr).find(t=>t.id===e);if(!t)throw Error(`Scene with id ${e} not found`);let n=new cr(this,t);return this._subscribe(e,n),n}delete(e){let t=D(lr);lr.set(t.filter(t=>t.id!==e));let n=D(pr);n[e]&&(n[e](),n[e]=null,pr.set(n)),this.rootScenes.includes(e)&&(this.rootScenes=this.rootScenes.filter(t=>t!==e)),this.defaultData===e&&this.get(this.data.find(e=>!!e)?.id??``).setDefault(),this.activeData.id===e&&this.get((this.data.find(e=>e.id===this.defaultData)??this.data.find(e=>!!e))?.id??``).setActive()}_subscribe(e,t){setTimeout(()=>{let n=D(pr);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),pr.set(n))},0)}_update(e,t){let n=D(lr),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,lr.set(n))}},hr=x({}),gr=class{_manager;id;_store;static reset(){hr.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(hr,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){return this._manager.delete(this.id)}},_r=x([]),vr=x({}),yr=class{static reset(){_r.set([]),xn(vr)}constructor(e){_r.set(e)}get store(){return _r}get data(){return D(_r)}async create(e){let{actions:t,fs:n}=ei(),r=await t.package.createSystem({systemName:e});this._add(dn(r)),await(await n.getDirectory()).readdir(!0)}async import(e){let{actions:t,ecs:n,fs:r}=ei();await t.package.addSystems({systemNames:e}),await this.sync(),await n.components.sync(),await(await r.getDirectory()).readdir(!0)}async sync(){let{actions:e}=ei(),t=await e.package.getSystems();_r.set(fn(t))}get(e){let t=D(_r).find(t=>t.id===e);if(!t)throw Error(`System with id ${e} not found`);let n=new gr(this,t);return this._subscribe(e,n),n}async delete(e){let t=D(_r),n=t.find(t=>t.id===e);if(!n)throw Error(`System not found: ${e}`);_r.set(t.filter(t=>t.id!==e));let{fs:r}=ei();await(await r.getFile(n.path)).delete();let i=D(vr);i[e]&&(i[e](),i[e]=null,vr.set(i))}_add(e){let t=D(_r);t.push(e),_r.set(t)}_subscribe(e,t){setTimeout(()=>{let n=D(vr);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),vr.set(n))},0)}_update(e,t){let n=D(_r),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,_r.set(n))}},br=class{_project;_sceneManager;_componentManager;_systemManager;_libraryManager;static reset(){En.reset(),kn.reset(),yr.reset(),gr.reset(),Pn.reset(),jn.reset(),cr.reset(),mr.reset(),ar.reset(),Zn.reset(),tr.reset(),Jn.reset(),Rn.reset(),Un.reset()}constructor(e){this._project=e}async init(){let e=await this._project.actions.package.getComponents(),t=await this._project.actions.package.getSystems(),n=await this._project.actions.save.get();this._componentManager=new kn(un(e)),this._systemManager=new yr(fn(t)),this._libraryManager=new Pn(mn(n)),this._sceneManager=new mr(this,hn(n),[`default`],`default`)}get scenes(){if(!this._sceneManager)throw Error(`ECS handler not initialized`);return this._sceneManager}get components(){if(!this._componentManager)throw Error(`ECS handler not initialized`);return this._componentManager}get systems(){if(!this._systemManager)throw Error(`ECS handler not initialized`);return this._systemManager}get libraries(){if(!this._libraryManager)throw Error(`ECS handler not initialized`);return this._libraryManager}},xr=class{listeners={};eventQueue=[];runEvents(){this.eventQueue.forEach(e=>{this._executeEvent(e)}),this.eventQueue=[]}emitEvent(e,...t){this.eventQueue.push({event:e,args:t})}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}on(e,t){this.addListener(e,t)}removeListener(e,t){if(!this.listeners[e])return;let n=this.listeners[e].indexOf(t);n>=0&&this.listeners[e].splice(n,1)}off(e,t){this.removeListener(e,t)}removeListenersForEvent(e){this.listeners[e]&&(this.listeners[e]=[])}removeAllListeners(){this.listeners={}}_executeEvent({event:e,args:t}){this.listeners[e]?.forEach(n=>{try{n(...t)}catch(t){console.error(`Error handling event [${String(e)}]:`,t)}})}},Sr=class{_coreEvents=new xr;_editorEvents=new xr;emit(e,...t){this._coreEvents.emitEvent(e,...t)}on(e,t){this._editorEvents.on(e,t)}},Cr=x(),wr=class{core;static reset(){Cr.set(null)}constructor(e){this.core=e}get(e){return e?D(Cr):this.fetch()}async fetch(e=!1){if(!e){let e=D(Cr);if(e)return e}let t=await this.core.actions.project.getInfo();return Cr.set(t),t}async set(e){await this.core.actions.project.setInfo(e),await this.fetch(!0)}},Tr={aac:`audio/aac`,abw:`application/x-abiword`,apng:`image/apng`,arc:`application/x-freearc`,avi:`video/x-msvideo`,avif:`image/avif`,azw:`application/vnd.amazon.ebook`,bin:`application/octet-stream`,bmp:`image/bmp`,bz:`application/x-bzip`,bz2:`application/x-bzip2`,cda:`application/x-cdf`,cjs:`text/javascript`,csh:`application/x-csh`,css:`text/css`,csv:`text/csv`,doc:`application/msword`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,eot:`application/vnd.ms-fontobject`,epub:`application/epub+zip`,gz:`application/gzip`,gif:`image/gif`,htm:`text/html`,html:`text/html`,ico:`image/vnd.microsoft.icon`,ics:`text/calendar`,jar:`application/java-archive`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,jsonld:`application/ld+json`,md:`text/markdown`,mid:`audio/midi`,midi:`audio/midi`,mjs:`text/javascript`,mp3:`audio/mpeg`,mp4:`video/mp4`,mpeg:`video/mpeg`,mpkg:`application/vnd.apple.installer+xml`,odp:`application/vnd.oasis.opendocument.presentation`,ods:`application/vnd.oasis.opendocument.spreadsheet`,odt:`application/vnd.oasis.opendocument.text`,oga:`audio/ogg`,ogv:`video/ogg`,ogx:`application/ogg`,opus:`audio/ogg`,otf:`font/otf`,png:`image/png`,pdf:`application/pdf`,php:`application/x-httpd-php`,ppt:`application/vnd.ms-powerpoint`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,rar:`application/vnd.rar`,rtf:`application/rtf`,sh:`application/x-sh`,svg:`image/svg+xml`,swf:`application/x-shockwave-flash`,tar:`application/x-tar`,tif:`image/tiff`,tiff:`image/tiff`,ts:`text/plain`,ttf:`font/ttf`,txt:`text/plain`,vsd:`application/vnd.visio`,wasm:`application/wasm`,wav:`audio/x-wav`,weba:`audio/webm`,webm:`video/webm`,webmanifest:`application/manifest+json`,webp:`image/webp`,wgsl:`text/wgsl`,woff:`font/woff`,woff2:`font/woff2`,xhtml:`application/xhtml+xml`,xls:`application/vnd.ms-excel`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,xml:`application/xml`,xul:`application/vnd.mozilla.xul+xml`,zip:`application/zip`,"3gp":`video/3gpp`,"3g2":`video/3gpp2`,"7z":`application/x-7z-compressed`},Er=new Map,Dr=class{handle;constructor(e){this.handle=e}get name(){return this.handle.name}getFile(){return this.handle.getFile()}async isSameFile(e){return await this.handle.isSameEntry(e.handle)}async read(){return(await this.handle.getFile()).text()}async readJson(){let e=await this.read();return JSON.parse(e)}async write(e){let t=await this.handle.createWritable();await t.write(e),await t.close()}async writeBinary(e){let t=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),n=await this.handle.createWritable();await n.write(t),await n.close()}async writeJson(e){let t=JSON.stringify(e);return this.write(t)}async getUrl(){Er.has(this.handle.name)&&URL.revokeObjectURL(Er.get(this.handle.name));let e=await this.handle.getFile(),t=new Blob([await e.arrayBuffer()],{type:this._resolveFileType(e.name)}),n=URL.createObjectURL(t);return Er.set(this.handle.name,n),n}_resolveFileType(e){return Tr[e.split(`.`).pop()]||`text/plain`}},Or=class e{handle;constructor(e){this.handle=e}get name(){return this.handle.name}async getFile(e,t=!0){return new Dr(await this.handle.getFileHandle(e,{create:t}))}async fileExist(e){try{return await this.handle.getFileHandle(e,{create:!1}),!0}catch{return!1}}async getDirectory(t,n=!0){return new e(await this.handle.getDirectoryHandle(t,{create:n}))}async getChildren(){let t=new Map,n=this.handle.entries();for await(let[r,i]of n)t.set(r,i instanceof FileSystemDirectoryHandle?new e(i):new Dr(i));return t}async removeChild(e,t=!0){return this.handle.removeEntry(e,{recursive:t})}async getParents(e){let t=await e.handle.resolve(this.handle),n=[],r=e;if(!t)return null;for(let e of t)r=await r.getDirectory(e),n.push(r);return n}async clear(){for await(let e of this.handle.keys())await this.removeChild(e)}async rename(e){if(`move`in this.handle&&typeof this.handle.move==`function`)return await this.handle.move(e)}},kr=class{fs;rootPath;constructor(e){this.rootPath=e}async getDirectory(e,t){return await this._checkRootHandle(),e?this._getSubDirFromRawPath(this.fs,e,t):this.fs}async getFile(e,t=!0){await this._checkRootHandle();let n=this._parsePath(e),r=n.pop();if(!r)throw Error();return(await this._getSubDirFromPath(this.fs,n,t)).getFileHandle(r,{create:t})}async _checkRootHandle(){this.fs||await this._initRootHandle()}async _initRootHandle(){let e=await navigator.storage.getDirectory();this.fs=await this._getSubDirFromRawPath(e,this.rootPath)}async _getSubDirFromRawPath(e,t,n){let r=this._parsePath(t);return this._getSubDirFromPath(e,r,n)}async _getSubDirFromPath(e,t,n){for(let r of t)e=await this._getSubDir(e,r,n);return e}async _getSubDir(e,t,n=!0){return e.getDirectoryHandle(t,{create:n})}_parsePath(e){return e.split(`/`).filter(e=>!!e)}},Ar=class{fs;constructor(e){this.fs=new kr(e)}async getFile(e,t){return new Dr(await this.fs.getFile(e,t))}async getDirectory(e,t){return new Or(await this.fs.getDirectory(e,t))}async fileExist(e){try{return await this.getFile(e,!1),!0}catch{return!1}}async directoryExist(e){try{return await this.getDirectory(e,!1),!0}catch{return!1}}async clear(){try{return await(await this.getDirectory(`/`)).clear(),!0}catch{return!1}}},jr=class{_handler;_cache;_path;_route;constructor(e,t,n){this._handler=e,this._cache=t,this._path=n,this._route=`${this._handler.route}?path=${encodeURIComponent(`${this._path}?url`)}`}get path(){return this._path}async getUrl(){return await this._preRead(),this._cache.getUrl()}async read(){return await this._preRead(),this._cache.read()}async readJson(){return await this._preRead(),this._cache.readJson()}async fetch(){await this._preWrite();let e=await fetch(this._route,{method:`GET`,headers:{[Jt]:this._handler.project.id}});if(!e.ok||!e.body)throw Error(`Failed to fetch file`);let t=await this._cache.handle.createWritable();await e.body.pipeTo(t)}async write(e){await this._preWrite(),await this._cache.write(e),await this.sync()}async writeJson(e){await this._preWrite(),await this._cache.writeJson(e),await this.sync()}async sync(){if(!this._cache)return;let e=await this._cache.getFile(),t=await fetch(this._route,{body:e,method:`POST`,headers:{[Jt]:this._handler.project.id,"Content-Type":`application/octet-stream`}});if(!t.ok)throw Error(`Failed to sync file: ${await t.text()}`)}async delete(){let e=await fetch(this._route,{method:`DELETE`,headers:{[Jt]:this._handler.project.id}});if(!e.ok)throw Error(`Failed to delete file: ${await e.text()}`)}async getFile(){return await this._preRead(),this._cache}async _preRead(){this._cache||await this.fetch()}async _preWrite(){this._cache||=await this._handler.cache.getFile(this.path,!0)}},Mr=class e{_handler;_cache;_path;constructor(e,t,n){this._handler=e,this._cache=t,this._path=n}get path(){return this._path}async getFile(e){let t=`${this._path}/${e}`;return await this._cache.fileExist(e)?new jr(this._handler,await this._cache?.getFile(e,!1),t):new jr(this._handler,null,t)}async getDirectory(t){let n=`${this._path}/${t}`;return new e(this._handler,await this._cache.getDirectory(t,!0),n)}async readdir(e=!1){let t=null;return!e&&this._handler.treeCache&&(t=await this._handler.treeCache.read(this._path)),t||(t=await this._handler.project.actions.fs.readdir({path:this._path}),this._handler.treeCache&&await this._handler.treeCache.write(this._path,t),t)}},Nr=class{_store;constructor(e){this._store=e}get store(){return this._store}get(e){return new Promise((t,n)=>{let r=this._store.get(e);r.onsuccess=()=>t(r.result??null),r.onerror=()=>n(r.error)})}set(e,t){return new Promise((n,r)=>{let i=this._store.put(t,e);i.onsuccess=()=>n(),i.onerror=()=>r(i.error)})}delete(e){return new Promise((t,n)=>{let r=this._store.delete(e);r.onsuccess=()=>t(),r.onerror=()=>n(r.error)})}},Pr=`nanoforge`,Fr=class{_db;constructor(){}get db(){if(!this._db)throw Error(`Database is not open`);return this._db}async open(e,t){let n=(await me(async()=>{let{default:e}=await import(`./B2921r3t2.js`);return{default:e}},[],import.meta.url)).default;if(!n.indexedDB)throw Error(`Your browser doesn't support a stable version of IndexedDB.`);let r=n.indexedDB.open(Pr,e??1);[this._db]=await Promise.all([new Promise((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e(r.result)}),new Promise(e=>{r.onupgradeneeded=()=>{t?.(r.result)},setTimeout(e,500)})])}close(){this._db?.close()}createStore(e,t){this._assertDB(),this._db.createObjectStore(e,{keyPath:t})}getStore(e){return this._assertDB(),new Nr(this._db.transaction(e,`readwrite`).objectStore(e))}deleteStore(e){this._assertDB(),this._db.deleteObjectStore(e)}_assertDB(){if(!this._db)throw Error(`Database is not open`)}},Ir=`fs-project-tree`,Lr=class extends Fr{projectId;constructor(e){super(),this.projectId=e}init(){return this.open(1,async e=>{e.createObjectStore(Ir)})}async changeId(e){let t=this.getStore(Ir),n=await t.get(this.projectId);n&&(await t.set(e,n),await t.delete(this.projectId))}async read(e){let t=await this.getStore(Ir).get(this.projectId);return this._extractMapFromPath(e,t??null)}async write(e,t){let n=await this.read(e),r=this.getStore(Ir),i=this._generateMapFromPath(e,n??{files:[],directories:{}},t);await r.set(this.projectId,i)}_extractMapFromPath(e,t){let n=e.split(`/`),r=t;for(let e of n){if(r===null)return null;e in r.directories&&(r=r.directories[e]??null)}return r}_generateMapFromPath(e,t,n){if(!e)return n;let r=e.split(`/`);return this._generateMapFromPathRec(r,t,n)}_generateMapFromPathRec(e,t,n){if(e.length===0)return n;let[r,...i]=e;return t.directories[r]=this._generateMapFromPathRec(i,t.directories[r]??{files:[],directories:{}},n),t}},Rr={build:`/fs/build`,project:`/fs/project`},zr=class{project;route;cache;treeCache;constructor(e,t){this.project=e,this.route=Rr[t],this.cache=new Ar(`projects/${e.id}/${t}`),t===`project`&&(this.treeCache=new Lr(e.id))}async init(){await this.treeCache?.init(),await(await this.getDirectory()).readdir(!0)}async getFile(e){return new jr(this,await this.cache.fileExist(e)?await this.cache.getFile(e,!1):null,e)}async getDirectory(e){return new Mr(this,await this.cache.getDirectory(e,!0),e??``)}},Br=class{core;fs;constructor(e){this.core=e,this.fs=new zr(this.core,`build`)}async build(){await this.core.actions.loader.build()}async start(e){let t=await this.fetchManifest(),n=await this.fetchEnv(),{mainFile:r,files:i}=await this.resolveGameFiles(t),a=this.core.save.save;(await this.loadMainFile(r))({files:i,env:n,editor:{save:a,coreEvents:this.core.event._coreEvents,editorEvents:this.core.event._editorEvents},container:e}).then(()=>console.log(`Game started!`))}async loadMainFile(e){let t=await me(()=>import(e),[],import.meta.url);if(t.main)return t.main;throw Error(`No main function found in the main.js file`)}fetchEnv(){return this.core.actions.loader.env()}fetchManifest(){return this.core.actions.loader.manifest()}async resolveGameFiles(e){let t=await this.fetchFiles(e),n,r=new Map;for(let e of t){if(e.gamePath===`/main.js`){n=e.localPath;continue}r.set(e.gamePath,e.localPath)}if(!n)throw Error(`No main.js file found in the manifest`);return{mainFile:n,files:r}}async fetchFiles(e){return await Promise.all(e.files.map(async({path:e})=>{let t=await this.fs.getFile(e);return await t.fetch(),{gamePath:e,localPath:await t.getUrl()}}))}},Vr=class{_project;_componentsManifests=new Map;_systemsManifests=new Map;constructor(e){this._project=e}async init(){}getComponentManifest(e){return this._componentsManifests.get(e)}getSystemManifest(e){return this._systemsManifests.get(e)}async installComponent(e){let t=(await this._project.actions.package.addComponents({componentNames:[e]}))[0];this._project.save.save.components.push(t.save),this._componentsManifests.set(t.save.name,t.manifest)}async installSystem(e){let t=(await this._project.actions.package.addSystems({systemNames:[e]}))[0];this._project.save.save.systems.push(t.save),this._systemsManifests.set(t.save.name,t.manifest)}addComponentManifest(e,t){this._componentsManifests.set(e,t)}addSystemManifest(e,t){this._systemsManifests.set(e,t)}},Hr=class{_project;_save=x({libraries:[],entities:[],components:[],systems:[]});_readyToSync=!0;_syncTimer;_needSync=x(!1);constructor(e){this._project=e}async init(){await this.fetchFromServer(),this._listeners(),this._save.subscribe(()=>{this.syncToServer()})}async fetchFromServer(){this._save.set(await this._project.actions.save.get())}async syncToServer(){this._readyToSync?(this._readyToSync=!1,await this._project.actions.save.set({save:D(this._save)}),this._syncTimer=setTimeout(()=>{this._readyToSync=!0,D(this._needSync)&&(this.syncToServer(),this._needSync.set(!1))},5e3)):this._needSync.set(!0)}async forceSyncToServer(){this._readyToSync=!0,this._needSync.set(!1),clearTimeout(this._syncTimer),await this.syncToServer()}get save(){return D(this._save)}_listeners(){this._project.ecs.components.store.subscribe(e=>{this._save.set({...this.save,components:e.map(e=>({name:e.id,path:e.path,paramsNames:e.params.map(e=>e.name)}))}),this.forceSyncToServer()}),this._project.ecs.scenes.activeData.systems.store.subscribe(e=>{this._save.set({...this.save,systems:e.map(e=>{let t=this._project.ecs.systems.get(e).data;return{name:t.id,path:t.path}})}),this.forceSyncToServer()}),this._project.ecs.scenes.activeData.entities.store.subscribe(e=>{this._save.set({...this.save,entities:e.map(e=>({id:e.id,treePath:e.treePath,components:e.components}))}),this.syncToServer()})}},Ur=class{id;_info;_actions;_fs;_loader;_save;_packageHandler;_eventHandler;_ecsHandler;_inited=!1;static reset(){wr.reset()}constructor(e){this.id=e,this._save=new Hr(this),this._packageHandler=new Vr(this)}async init(){return await this.fs.init(),await this.ecs.init(),await this.save.init(),await this.packages.init(),this._inited=!0,this}isReady(){return this._inited}get info(){return this._info||=new wr(this),this._info}get actions(){return this._actions||=sn(this.id),this._actions}get fs(){return this._fs||=new zr(this,`project`),this._fs}get loader(){return this._loader||=new Br(this),this._loader}get save(){return this._save||=new Hr(this),this._save}get packages(){return this._packageHandler||=new Vr(this),this._packageHandler}get event(){return this._eventHandler||=new Sr,this._eventHandler}get ecs(){return this._ecsHandler||=new br(this),this._ecsHandler}},Wr=class e{static storageKey=`projects`;static isOnline=qt().mode===`online`;static async getProjects(){if(this.isOnline)return e.getOnlineProjects();let t=localStorage.getItem(this.storageKey);return t?JSON.parse(t).sort((e,t)=>t.lastOpened-e.lastOpened):[]}static async getOnlineProjects(){return(await cn.project.getGatewayProjects()).map(e=>({id:bn(10),resolvable:e.gatewayId,lastOpened:Date.now(),name:e.name}))}static async getProject(e){let t=(await this.getProjects()).find(t=>t.id===e);if(t)return t;throw Error(`Project not found`)}static async addProject(e){if(this.isOnline)return;let t=await this.getProjects();t.push(e),localStorage.setItem(this.storageKey,JSON.stringify(t))}static async removeProject(e){if(this.isOnline)return;let t=await this.getProjects();t=t.filter(t=>t.id!==e),localStorage.setItem(this.storageKey,JSON.stringify(t))}static async updateProject(e,t){if(this.isOnline)return;let n=await this.getProjects(),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]={...n[r],...t},localStorage.setItem(this.storageKey,JSON.stringify(n)))}static async invalidateProject(t){return e.updateProject(t,{invalid:!0})}static async clearProjects(){this.isOnline||localStorage.removeItem(this.storageKey)}static async addOrUpdateProject(e){if(this.isOnline)return;let t=await this.getProjects(),n=t.findIndex(t=>t.id===e.id||t.resolvable===e.resolvable);n===-1?t.push(e):t[n]={...t[n],...e},localStorage.setItem(this.storageKey,JSON.stringify(t))}},Gr=(e,t)=>Oe.error(e,{description:t,position:`top-right`,style:`background: oklch(var(--destructive)); color: oklch(var(--destructive-foreground));`}),Kr=qt(),qr=function(e){return e.No_Project=`no_project`,e.No_Init_Project=`no_init_project`,e.Invalid_Create_Action=`invalid_create_action`,e.Invalid_Complete_Action=`invalid_complete_action`,e.Empty_Project=`empty_project`,e}({}),Jr={no_project:`No project found`,no_init_project:`Project not initialized`,invalid_create_action:`Unable to create project`,invalid_complete_action:`Unable to complete project`,empty_project:`Empty project`},Yr={no_project:()=>async()=>{await ce(fe(`/`)),Gr(`No project found`,`Select a project or create a new one`)},no_init_project:e=>async()=>{await ce(fe(`/load?id=${e}`))},invalid_create_action:e=>async()=>{Gr(`Unable to create project`,e.message??`Unknown error`)},invalid_complete_action:e=>async()=>{Gr(`Unable to init project`,e.message??`Unknown error`)},empty_project:(e,t)=>async()=>{Kr.mode===`offline`&&($r.unload(),await ce(fe(`/`)),Gr(`Invalid project`,`Select another project or create a new one`)),await ce(fe(`/load?id=${e}&gatewayId=${t}`))}},Xr=class extends Error{reason;fb;args;constructor(e,...t){super(`Failed to load project: ${Jr[e]}`),this.reason=e,this.fb=Yr[e](...t),this.args=t}},Zr=async(e,t)=>{try{return await e()}catch(e){throw e instanceof Xr?e:t(e)}},Qr=x(null),$r=class e{static async create(t){let n=await Zr(()=>cn.project.new(t),e=>new Xr(qr.Invalid_Create_Action,e));return e.init(n)}static async complete(t){let n=await Zr(()=>cn.project.complete(t),e=>new Xr(qr.Invalid_Complete_Action,e));return e.init(n)}static async loadFromCacheWithTryId(t){try{return await e.loadFromId(t.id)}catch{}return e.loadFromCache(t)}static async loadFromIdWithCacheFetching(t){try{return await e.loadFromId(t)}catch{}let n=await Wr.getProject(t);return e.loadFromCache(n)}static async loadFromCache(t){await Wr.removeProject(t.id);let n=qt().mode===`offline`?{path:t.resolvable}:{gatewayId:t.resolvable},r=await cn.project.load(n),i=new Lr(t.id);return await i.init(),await i.changeId(r.id),await(await new Ar(`projects`).getDirectory(t.id)).rename(r.id),await e.init(r)}static async loadFromPath(t){let n=await cn.project.load({path:t});return e.init(n)}static async loadFromGatewayId(t){let n=await cn.project.load({gatewayId:t});return e.init(n)}static async loadFromId(t){let n=await cn.project.load({id:t});return e.init(n)}static async init(e){Ur.reset();let t=new Ur(e.id);Qr.set(t);let n=await Zr(()=>t.info.get(),()=>new Xr(qr.Empty_Project,e.id,e.cacheResolvable));return await Wr.addOrUpdateProject({id:e.id,resolvable:e.cacheResolvable,name:n.name,lastOpened:Date.now()}),t}static unload(){Qr.set(null),Ur.reset()}},ei=()=>{let e=D(Qr);if(!e){let e=new Xr(qr.No_Project);throw e.fb(),e}if(!e.isReady()){let t=new Xr(qr.No_Init_Project,e.id);throw t.fb(),t}return e},ti=()=>D(Qr),ni=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ri=(e,t)=>({classGroupId:e,validator:t}),ii=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ai=`-`,oi=[],si=`arbitrary..`,ci=e=>{let t=di(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ui(e);let n=e.split(ai);return li(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ni(i,t):t:i||oi}return n[e]||oi}}},li=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=li(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ai):e.slice(t).join(ai),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ui=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?si+r:void 0})(),di=e=>{let{theme:t,classGroups:n}=e;return fi(n,t)},fi=(e,t)=>{let n=ii();for(let r in e){let i=e[r];pi(i,n,r,t)}return n},pi=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];mi(i,t,n,r)}},mi=(e,t,n,r)=>{if(typeof e==`string`){hi(e,t,n);return}if(typeof e==`function`){gi(e,t,n,r);return}_i(e,t,n,r)},hi=(e,t,n)=>{let r=e===``?t:vi(t,e);r.classGroupId=n},gi=(e,t,n,r)=>{if(yi(e)){pi(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ri(n,e))},_i=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];pi(o,vi(t,a),n,r)}},vi=(e,t)=>{let n=e,r=t.split(ai),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ii(),n.nextPart.set(t,i)),n=i}return n},yi=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,bi=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},xi=`!`,Si=`:`,Ci=[],wi=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ti=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Si){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(xi)?(c=s.slice(0,-1),l=!0):s.startsWith(xi)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return wi(t,l,c,u)};if(t){let e=t+Si,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):wi(Ci,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ei=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Di=e=>({cache:bi(e.cacheSize),parseClassName:Ti(e),sortModifiers:Ei(e),postfixLookupClassGroupIds:Oi(e),...ci(e)}),Oi=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ki=/\s+/,Ai=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ki),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+xi:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},ji=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Mi(n))&&(i&&(i+=` `),i+=r);return i},Mi=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Mi(e[r]))&&(n&&(n+=` `),n+=t);return n},Ni=(e,...t)=>{let n,r,i,a,o=o=>(n=Di(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ai(e,n);return i(e,a),a};return a=o,(...e)=>a(ji(...e))},Pi=[],V=e=>{let t=t=>t[e]||Pi;return t.isThemeGetter=!0,t},Fi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ii=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Li=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ri=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ui=e=>Li.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Wi=e=>!!e&&Number.isInteger(Number(e)),Gi=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Ki=e=>Ri.test(e),qi=()=>!0,Ji=e=>zi.test(e)&&!Bi.test(e),Yi=()=>!1,Xi=e=>Vi.test(e),Zi=e=>Hi.test(e),Qi=e=>!U(e)&&!W(e),$i=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ea=e=>ha(e,ya,Yi),U=e=>Fi.test(e),ta=e=>ha(e,ba,Ji),na=e=>ha(e,xa,H),ra=e=>ha(e,Ca,qi),ia=e=>ha(e,Sa,Yi),aa=e=>ha(e,_a,Yi),oa=e=>ha(e,va,Zi),sa=e=>ha(e,wa,Xi),W=e=>Ii.test(e),ca=e=>ga(e,ba),la=e=>ga(e,Sa),ua=e=>ga(e,_a),da=e=>ga(e,ya),fa=e=>ga(e,va),pa=e=>ga(e,wa,!0),ma=e=>ga(e,Ca,!0),ha=(e,t,n)=>{let r=Fi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ga=(e,t,n=!1)=>{let r=Ii.exec(e);return r?r[1]?t(r[1]):n:!1},_a=e=>e===`position`||e===`percentage`,va=e=>e===`image`||e===`url`,ya=e=>e===`length`||e===`size`||e===`bg-size`,ba=e=>e===`length`,xa=e=>e===`number`,Sa=e=>e===`family-name`,Ca=e=>e===`number`||e===`weight`,wa=e=>e===`shadow`,Ta=()=>{let e=V(`color`),t=V(`font`),n=V(`text`),r=V(`font-weight`),i=V(`tracking`),a=V(`leading`),o=V(`breakpoint`),s=V(`container`),c=V(`spacing`),l=V(`radius`),u=V(`shadow`),d=V(`inset-shadow`),f=V(`text-shadow`),p=V(`drop-shadow`),m=V(`blur`),h=V(`perspective`),g=V(`aspect`),_=V(`ease`),v=V(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[Ui,`full`,`auto`,...w()],ee=()=>[Wi,`none`,`subgrid`,W,U],te=()=>[`auto`,{span:[`full`,Wi,W,U]},Wi,W,U],E=()=>[Wi,`auto`,W,U],D=()=>[`auto`,`min`,`max`,`fr`,W,U],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[Ui,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[Ui,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Ui,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,W,U],P=()=>[...b(),ua,aa,{position:[W,U]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,da,ea,{size:[W,U]}],F=()=>[Gi,ca,ta],I=()=>[``,`none`,`full`,l,W,U],L=()=>[``,H,ca,ta],R=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[H,Gi,ua,aa],B=()=>[``,`none`,m,W,U],oe=()=>[`none`,H,W,U],se=()=>[`none`,H,W,U],ce=()=>[H,W,U],le=()=>[Ui,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ki],breakpoint:[Ki],color:[qi],container:[Ki],"drop-shadow":[Ki],ease:[`in`,`out`,`in-out`],font:[Qi],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ki],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ki],shadow:[Ki],spacing:[`px`,H],text:[Ki],"text-shadow":[Ki],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ui,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[$i],columns:[{columns:[H,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Wi,`auto`,W,U]}],basis:[{basis:[Ui,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,Ui,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Wi,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,ca,ta]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ma,ra]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Gi,U]}],"font-family":[{font:[la,ia,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,na]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,ta]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Wi,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Wi,W,U],radial:[``,W,U],conic:[Wi,W,U]},fa,oa]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,ca,ta]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,pa,sa]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,pa,sa]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[H,ta]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,pa,sa]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:B()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,pa,sa]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Wi,W,U]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[H,ca,ta,na]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Ea=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(Da(e,`cacheSize`,t),Da(e,`prefix`,n),Da(e,`experimentalParseClassName`,r),Oa(e.theme,a.theme),Oa(e.classGroups,a.classGroups),Oa(e.conflictingClassGroups,a.conflictingClassGroups),Oa(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Da(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),Da(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),ka(e.theme,i.theme),ka(e.classGroups,i.classGroups),ka(e.conflictingClassGroups,i.conflictingClassGroups),ka(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Aa(e,i,`postfixLookupClassGroups`),Aa(e,i,`orderSensitiveModifiers`),e),Da=(e,t,n)=>{n!==void 0&&(e[t]=n)},Oa=(e,t)=>{if(t)for(let n in t)Da(e,n,t[n])},ka=(e,t)=>{if(t)for(let n in t)Aa(e,t,n)},Aa=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},ja=(e,...t)=>typeof e==`function`?Ni(Ta,e,...t):Ni(()=>Ea(Ta(),e),...t),Ma=Ni(Ta);function G(...e){return Ma(oe(e))}var Na=/\s+/g,Pa=e=>typeof e!=`string`||!e?e:e.replace(Na,` `).trim(),Fa=(...e)=>{let t=[],n=e=>{if(!e&&e!==0&&e!==0n)return;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)n(e[t]);return}let r=typeof e;if(r===`string`||r===`number`||r===`bigint`){if(r===`number`&&e!==e)return;t.push(String(e))}else if(r===`object`){let n=Object.keys(e);for(let r=0,i=n.length;r<i;r++){let i=n[r];e[i]&&t.push(i)}}};for(let t=0,r=e.length;t<r;t++){let r=e[t];r!=null&&n(r)}return t.length>0?Pa(t.join(` `)):void 0},Ia=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,K=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},La=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){let a=n[i];if(!r.includes(a)||e[a]!==t[a])return!1}return!0},Ra=(e,t)=>{for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];n in e?e[n]=Fa(e[n],r):e[n]=r}return e},za=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?za(r,t):r&&t.push(r)}},Ba=(...e)=>{let t=[];za(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},Va=(e,t)=>{let n={};for(let r in e){let i=e[r];if(r in t){let e=t[r];Array.isArray(i)||Array.isArray(e)?n[r]=Ba(e,i):typeof i==`object`&&typeof e==`object`&&i&&e?n[r]=Va(i,e):n[r]=e+` `+i}else n[r]=i}for(let r in t)r in e||(n[r]=t[r]);return n},Ha={twMerge:!0,twMergeConfig:{}};function Ua(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Wa=Ua(),Ga=e=>{let t=(t,n)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=t,l={...Ha,...n},u=r?.base?Fa(r.base,t?.base):t?.base,d=r?.variants&&!K(r.variants)?Va(a,r.variants):a,f=r?.defaultVariants&&!K(r.defaultVariants)?{...r.defaultVariants,...c}:c;!K(l.twMergeConfig)&&!La(l.twMergeConfig,Wa.cachedTwMergeConfig)&&(Wa.didTwMergeConfigChange=!0,Wa.cachedTwMergeConfig=l.twMergeConfig);let p=K(r?.slots),m=K(i)?{}:{base:Fa(t?.base,p&&r?.base),...i},h=p?m:Ra({...r?.slots},K(m)?{base:t?.base}:m),g=K(r?.compoundVariants)?o:Ba(r?.compoundVariants,o),_=t=>{if(K(d)&&K(i)&&p)return e(u,t?.class,t?.className)(l);if(g&&!Array.isArray(g))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof g}`);if(s&&!Array.isArray(s))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let n=(e,n=d,r=null,i=null)=>{let a=n[e];if(!a||K(a))return null;let o=i?.[e]??t?.[e];if(o===null)return null;let s=Ia(o);if(typeof s==`object`)return null;let c=f?.[e];return a[(s??Ia(c))||`false`]},r=()=>{if(!d)return null;let e=Object.keys(d),t=[];for(let r=0;r<e.length;r++){let i=n(e[r],d);i&&t.push(i)}return t},a=(e,t)=>{if(!d||typeof d!=`object`)return null;let r=[];for(let i in d){let a=n(i,d,e,t),o=e===`base`&&typeof a==`string`?a:a&&a[e];o&&r.push(o)}return r},o={};for(let e in t){let n=t[e];n!==void 0&&(o[e]=n)}let c=(e,n)=>{let r=typeof t?.[e]==`object`?{[e]:t[e]?.initial}:{};return{...f,...o,...r,...n}},m=(e=[],t)=>{let n=[],r=e.length;for(let i=0;i<r;i++){let{class:r,className:a,...o}=e[i],s=!0,l=c(null,t);for(let e in o){let t=o[e],n=l[e];if(Array.isArray(t)){if(!t.includes(n)){s=!1;break}}else{if((t==null||t===!1)&&(n==null||n===!1))continue;if(n!==t){s=!1;break}}}s&&(r&&n.push(r),a&&n.push(a))}return n},_=t=>{let n=m(g,t);if(!Array.isArray(n))return n;let r={},i=e;for(let e=0;e<n.length;e++){let t=n[e];if(typeof t==`string`)r.base=i(r.base,t)(l);else if(typeof t==`object`)for(let e in t)r[e]=i(r[e],t[e])(l)}return r},v=e=>{if(s.length<1)return null;let t={},n=c(null,e);for(let e=0;e<s.length;e++){let{slots:r=[],class:i,className:a,...o}=s[e];if(!K(o)){let e=!0;for(let t in o){let r=n[t],i=o[t];if(r===void 0||(Array.isArray(i)?!i.includes(r):i!==r)){e=!1;break}}if(!e)continue}for(let e=0;e<r.length;e++){let n=r[e];t[n]||(t[n]=[]),t[n].push([i,a])}}return t};if(!K(i)||!p){let t={};if(typeof h==`object`&&!K(h)){let n=e;for(let e in h)t[e]=t=>{let r=_(t),i=v(t);return n(h[e],a(e,t),r?r[e]:void 0,i?i[e]:void 0,t?.class,t?.className)(l)}}return t}return e(u,r(),m(g),t?.class,t?.className)(l)};return _.variantKeys=(()=>{if(!(!d||typeof d!=`object`))return Object.keys(d)})(),_.extend=r,_.base=u,_.slots=h,_.variants=d,_.defaultVariants=f,_.compoundSlots=s,_.compoundVariants=g,_};return{tv:t,createTV:e=>(n,r)=>t(n,r?Va(e,r):e)}},Ka=e=>K(e)?Ma:ja({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),qa=(e,t)=>{let n=Fa(e);return!n||!(t?.twMerge??!0)?n:((!Wa.cachedTwMerge||Wa.didTwMergeConfigChange)&&(Wa.didTwMergeConfigChange=!1,Wa.cachedTwMerge=Ka(Wa.cachedTwMergeConfig)),Wa.cachedTwMerge(n)||void 0)},{createTV:Ja,tv:Ya}=Ga((...e)=>t=>qa(e,t)),Xa=Ya({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none cursor-pointer disabled:pointer-events-none disabled:opacity-50 disable:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),Za=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),Qa=f(`<a><!></a>`),$a=f(`<button><!></button>`);function eo(e,t){_(t,!0);let n=S(t,`variant`,3,`default`),i=S(t,`size`,3,`default`),o=S(t,`ref`,15,null),s=S(t,`href`,3,void 0),c=S(t,`type`,3,`button`),l=M(t,Za);var u=d(),f=L(u),p=e=>{var a=Qa();P(a,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:s(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...l}),[()=>G(Xa({variant:n(),size:i()}),t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>o(e),()=>o()),O(e,a)},h=e=>{var a=$a();P(a,e=>({"data-slot":`button`,class:e,type:c(),disabled:t.disabled,...l}),[()=>G(Xa({variant:n(),size:i()}),t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>o(e),()=>o()),O(e,a)};a(f,e=>{s()?e(p):e(h,-1)}),O(e,u),B()}f(`<div><!></div>`);var to=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),no=f(`<div><!></div>`);function ro(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,to);var a=no();P(a,e=>({"data-slot":`card-content`,class:e,...i}),[()=>G(`px-4 group-data-[size=sm]/card:px-3`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var io=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ao=f(`<p><!></p>`);function oo(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,io);var a=ao();P(a,e=>({"data-slot":`card-description`,class:e,...i}),[()=>G(`text-muted-foreground text-sm`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}f(`<div><!></div>`);var so=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),co=f(`<div><!></div>`);function lo(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,so);var a=co();P(a,e=>({"data-slot":`card-header`,class:e,...i}),[()=>G(`gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var uo=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),fo=f(`<div><!></div>`);function po(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,uo);var a=fo();P(a,e=>({"data-slot":`card-title`,class:e,...i}),[()=>G(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var mo=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),ho=f(`<div><!></div>`);function go(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),a=M(t,mo);var o=ho();P(o,e=>({"data-slot":`card`,"data-size":i(),class:e,...a}),[()=>G(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]),r(E(o),()=>t.children??k),m(o),A(o,e=>n(e),()=>n()),O(e,o),B()}function _o(e){return typeof e==`function`}function vo(e){return typeof e==`object`&&!!e}var yo=[`string`,`number`,`bigint`,`boolean`];function bo(e){return e==null||yo.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>bo(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var xo=Symbol(`box`),So=Symbol(`is-writable`);function q(e,t){let n=R(e);return t?{[xo]:!0,[So]:!0,get current(){return l(n)},set current(e){t(e)}}:{[xo]:!0,get current(){return e()}}}function Co(e){return vo(e)&&xo in e}function wo(e){return Co(e)&&So in e}function To(e){return Co(e)?e:_o(e)?q(e):Oo(e)}function Eo(e){return Object.entries(e).reduce((e,[t,n])=>Co(n)?(wo(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function Do(e){return wo(e)?{[xo]:!0,get current(){return e.current}}:e}function Oo(e){let t=T(F(e));return{[xo]:!0,[So]:!0,get current(){return l(t)},set current(e){N(t,e,!0)}}}function ko(e){let t=T(F(e));return{[xo]:!0,[So]:!0,get current(){return l(t)},set current(e){N(t,e,!0)}}}ko.from=To,ko.with=q,ko.flatten=Eo,ko.readonly=Do,ko.isBox=Co,ko.isWritableBox=wo;function Ao(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var jo=/\d/,Mo=[`-`,`_`,`/`,`.`];function No(e=``){if(!jo.test(e))return e!==e.toLowerCase()}function Po(e){let t=[],n=``,r,i;for(let a of e){let e=Mo.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=No(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Fo(e){return e?Po(e).map(e=>Lo(e)).join(``):``}function Io(e){return Ro(Fo(e||``))}function Lo(e){return e?e[0].toUpperCase()+e.slice(1):``}function Ro(e){return e?e[0].toLowerCase()+e.slice(1):``}function zo(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Fo(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Io(e)]=n}return Ut(e,n),t}function Bo(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Vo(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Ho=Vo(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Uo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Ho(t)}: ${e[t]};`).join(`
|
|
3
|
+
`,It=`/`,Lt=`*`,Rt=``,zt=`comment`,Bt=`declaration`;function Vt(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Ot);t&&(n+=t.length);var i=e.lastIndexOf(Ft);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(kt)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(It!=e.charAt(0)||Lt!=e.charAt(1))){for(var n=2;Rt!=e.charAt(n)&&(Lt!=e.charAt(n)||It!=e.charAt(n+1));)++n;if(n+=2,Rt===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:zt,comment:o})}}function f(){var e=a(),t=c(At);if(t){if(d(),!c(jt))return s(`property missing ':'`);var n=c(Mt),r=e({type:Bt,property:Ht(t[0].replace(Dt,Rt)),value:n?Ht(n[0].replace(Dt,Rt)):Rt});return c(Nt),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ht(e){return e?e.replace(Pt,Rt):Rt}function Ut(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Vt(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Wt=`https://docs.nanoforge.eu`,Gt=`https://projects.nanoforge.eu`,Kt=`https://nanoforge.eu`,qt=()=>({mode:`online`}),Jt=`x-project-id`,Yt=class{_baseUrl;_baseOptions;_middlewares;constructor(e,t){this._baseUrl=e,this._baseOptions=t??{headers:{"Content-Type":`application/json`}},this._middlewares=[]}get(e,t){return this._applyMiddlewares(e,t,(e,t)=>this._request(e,{...t,method:`GET`}))}post(e,t,n){return this._applyMiddlewares(e,n,(e,n)=>this._request(e,{...n,method:`POST`,body:t}))}put(e,t,n){return this._applyMiddlewares(e,n,(e,n)=>this._request(e,{...n,method:`PUT`,body:t}))}patch(e,t,n){return this._applyMiddlewares(e,n,async(e,n)=>this._request(e,{...n,method:`PATCH`,body:t}))}delete(e,t){return this._applyMiddlewares(e,t,(e,t)=>this._request(e,{...t,method:`DELETE`}))}useMiddlewares(...e){for(let t of e)this._middlewares.push(t);return this}_request(e,t){return fetch(e,t)}_applyMiddlewares(e,t,n){let r={path:e,fullPath:this._getUrl(e),options:{...this._baseOptions,...t}},i=this._middlewares.slice(),a,o=async e=>{e||=r;let t=i.shift();return a=t?await t(e,o)??a:await n(e.fullPath,e.options),a};return o(r)}_getUrl(e){return`${this._baseUrl}${e}`}};function Xt(e){let t=JSON.parse(e);return t.data&&=ct(t.data,ue.decoders),t}function Zt(e){return HTMLElement.prototype.cloneNode.call(e)}function Qt(e,t=le){let n=async({action:t,result:n,reset:r=!0,invalidateAll:i=!0})=>{n.type===`success`&&(r&&HTMLFormElement.prototype.reset.call(e),i&&await de()),(location.origin+location.pathname===t.origin+t.pathname||n.type===`redirect`||n.type===`error`)&&await pe(n)};async function r(r){if((r.submitter?.hasAttribute(`formmethod`)?r.submitter.formMethod:Zt(e).method)!==`post`)return;r.preventDefault();let i=new URL(r.submitter?.hasAttribute(`formaction`)?r.submitter.formAction:Zt(e).action),a=r.submitter?.hasAttribute(`formenctype`)?r.submitter.formEnctype:Zt(e).enctype,o=new FormData(e,r.submitter),s=new AbortController,c=!1,l=await t({action:i,cancel:()=>c=!0,controller:s,formData:o,formElement:e,submitter:r.submitter})??n;if(c)return;let u;try{let e=new Headers({accept:`application/json`,"x-sveltekit-action":`true`});a!==`multipart/form-data`&&e.set(`Content-Type`,/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(a)?a:`application/x-www-form-urlencoded`);let t=a===`multipart/form-data`?o:new URLSearchParams(o),n=await fetch(i,{method:`POST`,headers:e,cache:`no-store`,body:t,signal:s.signal});u=Xt(await n.text()),u.type===`error`&&(u.status=n.status)}catch(e){if(e?.name===`AbortError`)return;u={type:`error`,error:e}}await l({action:i,formData:o,formElement:e,update:e=>n({action:i,result:u,reset:e?.reset,invalidateAll:e?.invalidateAll}),result:u})}return HTMLFormElement.prototype.addEventListener.call(e,`submit`,r),{destroy(){HTMLFormElement.prototype.removeEventListener.call(e,`submit`,r)}}}var $t=class extends Error{error;message;status;constructor(e,t,n,r){super(`${e}: ${t}`,r),this.error=e,this.message=t,this.status=n}},en=class{_client;constructor(e){this._client=e}run(e,t,n){return this.runRequestBody(e,t,n)}async runRequestBody(e,t,n){let r=Xt(await(await this._client.post(e,this._parseBodyToFormData(t),n)).text());if(r.type===`redirect`)throw Error(`Redirect (${r.status}) - ${r.location}`);if(r.type===`error`)throw r.error?.error&&r.error?.message&&r.status?new $t(r.error.error,r.error.message,r.status):Error(`Error (${r.status}) - ${r.error}`);if(r.type===`failure`)throw r.data?.error&&r.data?.message&&r.status?new $t(r.data.error,r.data.message,r.status):Error(`Failure (${r.status}) - ${r.data}`);return r.data}_parseBodyToFormData(e){let t=new FormData;if(e)for(let[n,r]of Object.entries(e)){let e;e=r instanceof File?r:JSON.stringify(r),t.append(n,e)}return t}},tn=class extends en{readdir(e){return this.run(`/actions/project/fs?/readdir`,e)}},nn=class extends en{env(){return this.run(`/actions/project/loader?/env`)}manifest(){return this.run(`/actions/project/loader?/manifest`)}build(){return this.run(`/actions/project/loader?/build`)}},rn=class extends en{createComponent(e){return this.run(`/actions/project/package?/create-component`,e)}createSystem(e){return this.run(`/actions/project/package?/create-system`,e)}getComponentsManifests(e){return this.run(`/actions/project/package?/get-components-manifests`,e)}getSystemsManifests(e){return this.run(`/actions/project/package?/get-systems-manifests`,e)}getComponents(){return this.run(`/actions/project/package?/get-components`)}getSystems(){return this.run(`/actions/project/package?/get-systems`)}installPackages(e){return this.run(`/actions/project/package?/install-packages`,e)}searchPackages(e){return this.run(`/actions/project/package?/search-packages`,e)}},an=class extends en{load(e){return this.run(`/actions/project?/load`,e)}new(e){return this.run(`/actions/project?/new`,e)}complete(e){return this.run(`/actions/project?/complete`,e)}getInfo(){return this.run(`/actions/project?/get-info`)}setInfo(e){return this.run(`/actions/project?/set-info`,e)}getGatewayProjects(){return this.run(`/actions/project?/get-gateway-projects`)}},on=class extends en{get(){return this.run(`/actions/project/save?/get`)}set(e){return this.run(`/actions/project/save?/set`,e)}},sn=e=>{let t=new Yt(``,e?{headers:{[Jt]:e}}:{});return{fs:new tn(t),loader:new nn(t),package:new rn(t),project:new an(t),save:new on(t)}},cn=sn(),ln=e=>({id:e.manifest.id,name:e.manifest.name,path:e.save.path,params:e.manifest.params}),un=e=>e.map(ln),dn=e=>({id:e.manifest.id,name:e.manifest.name,path:e.save.path}),fn=e=>e.map(dn),pn=e=>({id:e.path,name:e.name}),mn=e=>e.libraries.map(pn),hn=e=>[{id:`default`,name:`Default Scene`,path:`unknown`,subScenes:[],assets:[],systems:e.systems.map(e=>e.name),entities:e.entities.map(e=>({id:e.id,name:e.id,treePath:e.treePath,components:e.components}))}],gn=class{words;constructor(e){this.words=e}toKebab(){return this.words.join(`-`)}toPascal(){return this.words.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}toCamel(){return this.words.map((e,t)=>t===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1)).join(``)}toSnake(){return this.words.join(`_`)}},_n=e=>e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).replace(/[-_]+/g,` `).trim().split(/\s+/).filter(Boolean),vn={kebab:e=>new gn(e.split(`-`)),pascal:e=>new gn(e.split(/(?=[A-Z])/).map(e=>e.toLowerCase())),camel:e=>new gn(e.split(/(?=[A-Z])/).map(e=>e.toLowerCase())),snake:e=>new gn(e.split(`_`)),all:e=>new gn(_n(e).map(e=>e.toLowerCase()))},yn=e=>e.charAt(0).toUpperCase()+e.slice(1),bn=(e,{numbers:t=!0,lowers:n=!0,uppers:r=!1,specials:i=!1}={})=>{let a=``;return t&&(a+=`0123456789`),n&&(a+=`abcdefghijklmnopqrstuvwxyz`),r&&(a+=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`),i&&(a+="!@#$%^&*()_+~`|}{[]:;?><,./-="),[...Array(e)].map(()=>a[Math.floor(Math.random()*a.length)]).join(``)},xn=e=>{let t=D(e);Object.values(t).forEach(e=>{try{e?.()}catch{}}),e.set({})},Sn=e=>{D(e)?.forEach(e=>{try{e()}catch{}}),e.set(null)},Cn=(e,t,n)=>{let r=D(e);return t in r?r[t]:(r[t]=x(n),e.set(r),r[t])},wn=(e,t)=>{let n=vn.all(t).toSnake(),r=n;for(;e.find(e=>e.id===r);)r=`${n}_${bn(5)}`;return r},Tn=x({}),En=class{_manager;_store;id;static reset(){Tn.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(Tn,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){return this._manager.delete(this.id)}},Dn=x([]),On=x({}),kn=class{static reset(){Dn.set([]),xn(On)}constructor(e){Dn.set(e)}get store(){return Dn}get data(){return D(Dn)}async create(e){let{actions:t,fs:n}=ei(),r=await t.package.createComponent({componentName:e});this._add(ln(r)),await(await n.getDirectory()).readdir(!0)}add(e){this._add(ln(e))}async sync(){let{actions:e}=ei(),t=await e.package.getComponents();Dn.set(un(t))}get(e){let t=D(Dn).find(t=>t.id===e);if(!t)throw Error(`Component with id ${e} not found`);let n=new En(this,t);return this._subscribe(e,n),n}async delete(e){let t=D(Dn),n=t.find(t=>t.id===e);if(!n)throw Error(`System not found: ${e}`);Dn.set(t.filter(t=>t.id!==e));let{fs:r}=ei();await(await r.getFile(n.path)).delete();let i=D(On);i[e]&&(i[e](),i[e]=null,On.set(i))}_add(e){let t=D(Dn);t.push(e),Dn.set(t)}_subscribe(e,t){setTimeout(()=>{let n=D(On);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),On.set(n))},0)}_update(e,t){let n=D(Dn),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,Dn.set(n))}},An=x({}),jn=class{_manager;id;_store;static reset(){An.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(An,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){this._manager.delete(this.id)}},Mn=x([]),Nn=x({}),Pn=class{static reset(){Mn.set([]),xn(Nn)}constructor(e){Mn.set(e)}get store(){return Mn}get data(){return D(Mn)}add(e){let t=D(Mn);return t.push({...e,id:e.name}),Mn.set(t),e.name}get(e){let t=D(Mn).find(t=>t.id===e);if(!t)throw Error(`Library with id ${e} not found`);let n=new jn(this,t);return this._subscribe(e,n),n}delete(e){let t=D(Mn);Mn.set(t.filter(t=>t.id!==e));let n=D(Nn);n[e]&&(n[e](),n[e]=null,Nn.set(n))}_subscribe(e,t){setTimeout(()=>{let n=D(Nn);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),Nn.set(n))},0)}_update(e,t){let n=D(Mn),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,Mn.set(n))}},Fn=x({}),In=x({}),Ln=x(),Rn=class{manager;id;_store;_valueStore;static reset(){Fn.set({}),In.set({}),Sn(Ln)}constructor(e,t,n){this.manager=e,this.id=t.name;let r=`${this.manager.component.manager.entity.manager.scene.id}/${this.manager.component.manager.entity.id}/${this.manager.component.id}/${this.id}`;this._store=Cn(Fn,r,t),this._valueStore=Cn(In,r,n),this._listen()}get store(){return this._store}get value(){return this._valueStore}delete(){this.manager.delete(this.id)}_listen(){if(D(Ln))return;let e=this.manager.component.store.subscribe(e=>{let t=e.params.find(e=>e.name===this.id);t&&this._store.set(t)});Ln.set([e])}},zn=x({}),Bn=x({}),Vn=x({}),Hn=x(),Un=class{component;_store;_valuesStore;_storageResolvable;static reset(){zn.set({}),Bn.set({}),xn(Vn),Sn(Hn)}constructor(e,t){this.component=e,this._storageResolvable=`${this.component.manager.entity.manager.scene.id}/${this.component.manager.entity.id}/${this.component.id}`,this._store=Cn(zn,this._storageResolvable,D(e.store).params),this._valuesStore=Cn(Bn,this._storageResolvable,t),this._listen()}get store(){return this._store}get values(){return this._valuesStore}get(e){let t=D(this._store).find(t=>t.name===e);if(!t)throw Error(`Param with id ${e} not found`);let n=D(this._valuesStore)[e],r=new Rn(this,t,n);return this._subscribe(e,r),r}delete(e){let t=D(this._store);this._store.set(t.map(t=>t.name===e?{...t,value:void 0}:t));let n=`${this._storageResolvable}/${e}`,r=D(Vn);r[n]&&(r[n](),r[n]=null,Vn.set(r))}_listen(){if(D(Hn))return;let e=this.component.store.subscribe(e=>{this._store.set(e.params)});Hn.set([e])}_subscribe(e,t){setTimeout(()=>{let n=`${this._storageResolvable}/${e}`,r=D(Vn);r[n]||(r[n]=t.value.subscribe(t=>this._update(e,t)),Vn.set(r))},0)}_update(e,t){let n=D(this._valuesStore);n[e]=t,this._valuesStore.set(n)}},Wn=class{manager;id;_store;_params;constructor(e,t,n){this.manager=e,this._store=e.entity.manager.scene.manager.ecs.components.get(t).store,this.id=t,this._params=new Un(this,n)}get store(){return this._store}get data(){return D(this._store)}get params(){return this._params}delete(){this.manager.delete(this.id)}},Gn=x({}),Kn=x({}),qn=x(),Jn=class{entity;_store;_storageResolvable;static reset(){Gn.set({}),xn(Kn),Sn(qn)}constructor(e,t){this.entity=e,this._storageResolvable=`${this.entity.manager.scene.id}/${this.entity.id}`,this._store=Cn(Gn,this._storageResolvable,t),this._listen()}get store(){return this._store}get data(){return D(this._store)}add(e){let t=D(this._store),n=this.entity.manager.scene.manager.ecs.components.get(e).data;t[e]={...Object.fromEntries(n.params.filter(e=>e.default).map(e=>[e.name,e.default]))},this._store.set(t)}get(e){let t=D(this._store)[e];if(!t)throw Error(`Component with id ${e} not found`);let n=new Wn(this,e,t);return this._subscribe(e,n),n}delete(e){let t=D(this._store),n={};Object.entries(t).forEach(([t,r])=>{t!==e&&(n[t]=r)}),this._store.set(n);let r=`${this._storageResolvable}/${e}`,i=D(Kn);i[r]&&(i[r](),i[r]=null,Kn.set(i))}_listen(){if(D(qn))return;let e=this.entity.manager.scene.manager.ecs.components.store.subscribe(e=>{let t=D(this._store),n={};Object.entries(t).forEach(([t,r])=>{e.find(e=>e.id===t)&&(n[t]=r)}),this._store.set(n)});qn.set([e])}_subscribe(e,t){setTimeout(()=>{let n=`${this._storageResolvable}/${e}`,r=D(Kn);r[n]||(r[n]=t.params.values.subscribe(t=>this._update(e,t)),Kn.set(r))},0)}_update(e,t){let n=D(this._store);n[e]=t,this._store.set(n)}},Yn=x({}),Xn=x(),Zn=class{manager;id;_store;_components;static reset(){Yn.set({}),Sn(Xn)}constructor(e,t){this.manager=e,this.id=t.id,this._store=Cn(Yn,`${this.manager.scene.id}/${this.id}`,t),this._components=new Jn(this,t.components),this._listen()}get store(){return this._store}get data(){return D(this._store)}get components(){return this._components}update(e){this._store.set({...D(this._store),...e})}delete(){this.manager.delete(this.id)}setSelected(){this.manager.selected=this}_listen(){if(D(Xn))return;let e=this._components.store.subscribe(e=>{let t=D(this._store);t.components=e,this._store.set(t)});Xn.set([e])}},Qn=x({}),$n=x({}),er=x(void 0),tr=class{scene;_store;static reset(){Qn.set({}),xn($n)}constructor(e,t){this.scene=e,this._store=Cn(Qn,this.scene.id,t)}get store(){return this._store}get data(){return D(this._store)}get selectedData(){return D(er)}get selected(){return er}set selected(e){er.set(e)}add(e){let t=D(this._store),n=wn(this.data,e.name);return t.push({...e,id:n}),this._store.set(t),n}get(e){let t=D(this._store).find(t=>t.id===e);if(!t)throw Error(`Entity with id ${e} not found`);let n=new Zn(this,t);return this._subscribe(e,n),n}delete(e){let t=D(this._store);this._store.set(t.filter(t=>t.id!==e));let n=`${this.scene.id}/${e}`,r=D($n);r[n]&&(r[n](),r[n]=null,$n.set(r)),this.selectedData?.id===e&&(this.selected=void 0)}_subscribe(e,t){setTimeout(()=>{let n=`${this.scene.id}/${e}`,r=D($n);r[n]||(r[n]=t.store.subscribe(t=>this._update(e,t)),$n.set(r))},0)}_update(e,t){let n=D(this._store),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,this._store.set(n))}},nr=class{manager;id;_store;constructor(e,t){this.manager=e,this.id=t,this._store=e.scene.manager.ecs.systems.get(t).store}get store(){return this._store}get data(){return D(this._store)}delete(){this.manager.delete(this.id)}},rr=x({}),ir=x(),ar=class{scene;_store;static reset(){rr.set({}),Sn(ir)}constructor(e,t){this.scene=e,this._store=Cn(rr,this.scene.id,t),this._listen()}get store(){return this._store}get data(){return D(this._store)}add(e){let t=D(this._store);t.push(e),this._store.set(t)}get(e){let t=D(this._store).find(t=>t===e);if(!t)throw Error(`System with id ${e} not found`);return new nr(this,t)}delete(e){let t=D(this._store);this._store.set(t.filter(t=>t!==e))}_listen(){if(D(ir))return;let e=this.scene.manager.ecs.systems.store.subscribe(e=>{let t=D(this._store);t.filter(t=>e.find(e=>e.id===t)),this._store.set(t)});ir.set([e])}},or=x({}),sr=x(),cr=class{manager;id;_store;_entities;_systems;static reset(){or.set({}),Sn(sr)}constructor(e,t){this.manager=e,this.id=t.id,this._store=Cn(or,this.id,t),this._entities=new tr(this,t.entities),this._systems=new ar(this,t.systems),this._listen()}get store(){return this._store}get data(){return D(this._store)}get entities(){return this._entities}get systems(){return this._systems}update(e){this._store.set({...D(this._store),...e})}delete(){this.manager.delete(this.id)}setActive(){this.manager.active=this}setDefault(){this.manager.default=this.id}_listen(){if(D(sr))return;let e=[this._entities.store.subscribe(e=>{let t=D(this._store);t.entities=e,this._store.set(t)}),this._systems.store.subscribe(e=>{let t=D(this._store);t.systems=e,this._store.set(t)})];sr.set(e)}},lr=x([]),ur=x([]),dr=x(),fr=x(),pr=x({}),mr=class{ecs;static reset(){lr.set([]),ur.set([]),dr.set(void 0),fr.set(void 0),xn(pr)}constructor(e,t,n,r){this.ecs=e,lr.set(t);let i=t.find(e=>e.id===r);if(!i)throw Error(`Default scene with id ${r} not found`);dr.set(new cr(this,i)),fr.set(r),ur.set(n)}get store(){return lr}get data(){return D(lr)}get activeData(){return D(dr)}get active(){return dr}set active(e){dr.set(e)}get defaultData(){return D(fr)}get default(){return fr}set default(e){fr.set(e)}get rootScenes(){return D(ur)}get rootScenesStore(){return ur}set rootScenes(e){ur.set(Array.from(new Set(e)))}add(e){let t=D(lr),n=wn(this.data,e.name);return t.push({...e,id:n}),lr.set(t),n}get(e){let t=D(lr).find(t=>t.id===e);if(!t)throw Error(`Scene with id ${e} not found`);let n=new cr(this,t);return this._subscribe(e,n),n}delete(e){let t=D(lr);lr.set(t.filter(t=>t.id!==e));let n=D(pr);n[e]&&(n[e](),n[e]=null,pr.set(n)),this.rootScenes.includes(e)&&(this.rootScenes=this.rootScenes.filter(t=>t!==e)),this.defaultData===e&&this.get(this.data.find(e=>!!e)?.id??``).setDefault(),this.activeData.id===e&&this.get((this.data.find(e=>e.id===this.defaultData)??this.data.find(e=>!!e))?.id??``).setActive()}_subscribe(e,t){setTimeout(()=>{let n=D(pr);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),pr.set(n))},0)}_update(e,t){let n=D(lr),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,lr.set(n))}},hr=x({}),gr=class{_manager;id;_store;static reset(){hr.set({})}constructor(e,t){this._manager=e,this.id=t.id,this._store=Cn(hr,this.id,t)}get store(){return this._store}get data(){return D(this._store)}update(e){this._store.set({...D(this._store),...e})}delete(){return this._manager.delete(this.id)}},_r=x([]),vr=x({}),yr=class{static reset(){_r.set([]),xn(vr)}constructor(e){_r.set(e)}get store(){return _r}get data(){return D(_r)}async create(e){let{actions:t,fs:n}=ei(),r=await t.package.createSystem({systemName:e});this._add(dn(r)),await(await n.getDirectory()).readdir(!0)}add(e){this._add(dn(e))}async sync(){let{actions:e}=ei(),t=await e.package.getSystems();_r.set(fn(t))}get(e){let t=D(_r).find(t=>t.id===e);if(!t)throw Error(`System with id ${e} not found`);let n=new gr(this,t);return this._subscribe(e,n),n}async delete(e){let t=D(_r),n=t.find(t=>t.id===e);if(!n)throw Error(`System not found: ${e}`);_r.set(t.filter(t=>t.id!==e));let{fs:r}=ei();await(await r.getFile(n.path)).delete();let i=D(vr);i[e]&&(i[e](),i[e]=null,vr.set(i))}_add(e){let t=D(_r);t.push(e),_r.set(t)}_subscribe(e,t){setTimeout(()=>{let n=D(vr);n[e]||(n[e]=t.store.subscribe(t=>this._update(e,t)),vr.set(n))},0)}_update(e,t){let n=D(_r),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]=t,_r.set(n))}},br=class{_project;_sceneManager;_componentManager;_systemManager;_libraryManager;static reset(){En.reset(),kn.reset(),yr.reset(),gr.reset(),Pn.reset(),jn.reset(),cr.reset(),mr.reset(),ar.reset(),Zn.reset(),tr.reset(),Jn.reset(),Rn.reset(),Un.reset()}constructor(e){this._project=e}async init(){let e=await this._project.actions.package.getComponents(),t=await this._project.actions.package.getSystems(),n=await this._project.actions.save.get();this._componentManager=new kn(un(e)),this._systemManager=new yr(fn(t)),this._libraryManager=new Pn(mn(n)),this._sceneManager=new mr(this,hn(n),[`default`],`default`)}get scenes(){if(!this._sceneManager)throw Error(`ECS handler not initialized`);return this._sceneManager}get components(){if(!this._componentManager)throw Error(`ECS handler not initialized`);return this._componentManager}get systems(){if(!this._systemManager)throw Error(`ECS handler not initialized`);return this._systemManager}get libraries(){if(!this._libraryManager)throw Error(`ECS handler not initialized`);return this._libraryManager}},xr=class{listeners={};eventQueue=[];runEvents(){this.eventQueue.forEach(e=>{this._executeEvent(e)}),this.eventQueue=[]}emitEvent(e,...t){this.eventQueue.push({event:e,args:t})}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}on(e,t){this.addListener(e,t)}removeListener(e,t){if(!this.listeners[e])return;let n=this.listeners[e].indexOf(t);n>=0&&this.listeners[e].splice(n,1)}off(e,t){this.removeListener(e,t)}removeListenersForEvent(e){this.listeners[e]&&(this.listeners[e]=[])}removeAllListeners(){this.listeners={}}_executeEvent({event:e,args:t}){this.listeners[e]?.forEach(n=>{try{n(...t)}catch(t){console.error(`Error handling event [${String(e)}]:`,t)}})}},Sr=class{_coreEvents=new xr;_editorEvents=new xr;emit(e,...t){this._coreEvents.emitEvent(e,...t)}on(e,t){this._editorEvents.on(e,t)}},Cr=x(),wr=class{core;static reset(){Cr.set(null)}constructor(e){this.core=e}get(e){return e?D(Cr):this.fetch()}async fetch(e=!1){if(!e){let e=D(Cr);if(e)return e}let t=await this.core.actions.project.getInfo();return Cr.set(t),t}async set(e){await this.core.actions.project.setInfo(e),await this.fetch(!0)}},Tr={aac:`audio/aac`,abw:`application/x-abiword`,apng:`image/apng`,arc:`application/x-freearc`,avi:`video/x-msvideo`,avif:`image/avif`,azw:`application/vnd.amazon.ebook`,bin:`application/octet-stream`,bmp:`image/bmp`,bz:`application/x-bzip`,bz2:`application/x-bzip2`,cda:`application/x-cdf`,cjs:`text/javascript`,csh:`application/x-csh`,css:`text/css`,csv:`text/csv`,doc:`application/msword`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,eot:`application/vnd.ms-fontobject`,epub:`application/epub+zip`,gz:`application/gzip`,gif:`image/gif`,htm:`text/html`,html:`text/html`,ico:`image/vnd.microsoft.icon`,ics:`text/calendar`,jar:`application/java-archive`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,jsonld:`application/ld+json`,md:`text/markdown`,mid:`audio/midi`,midi:`audio/midi`,mjs:`text/javascript`,mp3:`audio/mpeg`,mp4:`video/mp4`,mpeg:`video/mpeg`,mpkg:`application/vnd.apple.installer+xml`,odp:`application/vnd.oasis.opendocument.presentation`,ods:`application/vnd.oasis.opendocument.spreadsheet`,odt:`application/vnd.oasis.opendocument.text`,oga:`audio/ogg`,ogv:`video/ogg`,ogx:`application/ogg`,opus:`audio/ogg`,otf:`font/otf`,png:`image/png`,pdf:`application/pdf`,php:`application/x-httpd-php`,ppt:`application/vnd.ms-powerpoint`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,rar:`application/vnd.rar`,rtf:`application/rtf`,sh:`application/x-sh`,svg:`image/svg+xml`,swf:`application/x-shockwave-flash`,tar:`application/x-tar`,tif:`image/tiff`,tiff:`image/tiff`,ts:`text/plain`,ttf:`font/ttf`,txt:`text/plain`,vsd:`application/vnd.visio`,wasm:`application/wasm`,wav:`audio/x-wav`,weba:`audio/webm`,webm:`video/webm`,webmanifest:`application/manifest+json`,webp:`image/webp`,wgsl:`text/wgsl`,woff:`font/woff`,woff2:`font/woff2`,xhtml:`application/xhtml+xml`,xls:`application/vnd.ms-excel`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,xml:`application/xml`,xul:`application/vnd.mozilla.xul+xml`,zip:`application/zip`,"3gp":`video/3gpp`,"3g2":`video/3gpp2`,"7z":`application/x-7z-compressed`},Er=new Map,Dr=class{handle;constructor(e){this.handle=e}get name(){return this.handle.name}getFile(){return this.handle.getFile()}async isSameFile(e){return await this.handle.isSameEntry(e.handle)}async read(){return(await this.handle.getFile()).text()}async readJson(){let e=await this.read();return JSON.parse(e)}async write(e){let t=await this.handle.createWritable();await t.write(e),await t.close()}async writeBinary(e){let t=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),n=await this.handle.createWritable();await n.write(t),await n.close()}async writeJson(e){let t=JSON.stringify(e);return this.write(t)}async getUrl(){Er.has(this.handle.name)&&URL.revokeObjectURL(Er.get(this.handle.name));let e=await this.handle.getFile(),t=new Blob([await e.arrayBuffer()],{type:this._resolveFileType(e.name)}),n=URL.createObjectURL(t);return Er.set(this.handle.name,n),n}_resolveFileType(e){return Tr[e.split(`.`).pop()]||`text/plain`}},Or=class e{handle;constructor(e){this.handle=e}get name(){return this.handle.name}async getFile(e,t=!0){return new Dr(await this.handle.getFileHandle(e,{create:t}))}async fileExist(e){try{return await this.handle.getFileHandle(e,{create:!1}),!0}catch{return!1}}async getDirectory(t,n=!0){return new e(await this.handle.getDirectoryHandle(t,{create:n}))}async getChildren(){let t=new Map,n=this.handle.entries();for await(let[r,i]of n)t.set(r,i instanceof FileSystemDirectoryHandle?new e(i):new Dr(i));return t}async removeChild(e,t=!0){return this.handle.removeEntry(e,{recursive:t})}async getParents(e){let t=await e.handle.resolve(this.handle),n=[],r=e;if(!t)return null;for(let e of t)r=await r.getDirectory(e),n.push(r);return n}async clear(){for await(let e of this.handle.keys())await this.removeChild(e)}async rename(e){if(`move`in this.handle&&typeof this.handle.move==`function`)return await this.handle.move(e)}},kr=class{fs;rootPath;constructor(e){this.rootPath=e}async getDirectory(e,t){return await this._checkRootHandle(),e?this._getSubDirFromRawPath(this.fs,e,t):this.fs}async getFile(e,t=!0){await this._checkRootHandle();let n=this._parsePath(e),r=n.pop();if(!r)throw Error();return(await this._getSubDirFromPath(this.fs,n,t)).getFileHandle(r,{create:t})}async _checkRootHandle(){this.fs||await this._initRootHandle()}async _initRootHandle(){let e=await navigator.storage.getDirectory();this.fs=await this._getSubDirFromRawPath(e,this.rootPath)}async _getSubDirFromRawPath(e,t,n){let r=this._parsePath(t);return this._getSubDirFromPath(e,r,n)}async _getSubDirFromPath(e,t,n){for(let r of t)e=await this._getSubDir(e,r,n);return e}async _getSubDir(e,t,n=!0){return e.getDirectoryHandle(t,{create:n})}_parsePath(e){return e.split(`/`).filter(e=>!!e)}},Ar=class{fs;constructor(e){this.fs=new kr(e)}async getFile(e,t){return new Dr(await this.fs.getFile(e,t))}async getDirectory(e,t){return new Or(await this.fs.getDirectory(e,t))}async fileExist(e){try{return await this.getFile(e,!1),!0}catch{return!1}}async directoryExist(e){try{return await this.getDirectory(e,!1),!0}catch{return!1}}async clear(){try{return await(await this.getDirectory(`/`)).clear(),!0}catch{return!1}}},jr=class{_handler;_cache;_path;_route;constructor(e,t,n){this._handler=e,this._cache=t,this._path=n,this._route=`${this._handler.route}?path=${encodeURIComponent(`${this._path}?url`)}`}get path(){return this._path}async getUrl(){return await this._preRead(),this._cache.getUrl()}async read(){return await this._preRead(),this._cache.read()}async readJson(){return await this._preRead(),this._cache.readJson()}async fetch(){await this._preWrite();let e=await fetch(this._route,{method:`GET`,headers:{[Jt]:this._handler.project.id}});if(!e.ok||!e.body)throw Error(`Failed to fetch file`);let t=await this._cache.handle.createWritable();await e.body.pipeTo(t)}async write(e){await this._preWrite(),await this._cache.write(e),await this.sync()}async writeJson(e){await this._preWrite(),await this._cache.writeJson(e),await this.sync()}async sync(){if(!this._cache)return;let e=await this._cache.getFile(),t=await fetch(this._route,{body:e,method:`POST`,headers:{[Jt]:this._handler.project.id,"Content-Type":`application/octet-stream`}});if(!t.ok)throw Error(`Failed to sync file: ${await t.text()}`)}async delete(){let e=await fetch(this._route,{method:`DELETE`,headers:{[Jt]:this._handler.project.id}});if(!e.ok)throw Error(`Failed to delete file: ${await e.text()}`)}async getFile(){return await this._preRead(),this._cache}async _preRead(){this._cache||await this.fetch()}async _preWrite(){this._cache||=await this._handler.cache.getFile(this.path,!0)}},Mr=class e{_handler;_cache;_path;constructor(e,t,n){this._handler=e,this._cache=t,this._path=n}get path(){return this._path}async getFile(e){let t=`${this._path}/${e}`;return await this._cache.fileExist(e)?new jr(this._handler,await this._cache?.getFile(e,!1),t):new jr(this._handler,null,t)}async getDirectory(t){let n=`${this._path}/${t}`;return new e(this._handler,await this._cache.getDirectory(t,!0),n)}async readdir(e=!1){let t=null;return!e&&this._handler.treeCache&&(t=await this._handler.treeCache.read(this._path)),t||(t=await this._handler.project.actions.fs.readdir({path:this._path}),this._handler.treeCache&&await this._handler.treeCache.write(this._path,t),t)}},Nr=class{_store;constructor(e){this._store=e}get store(){return this._store}get(e){return new Promise((t,n)=>{let r=this._store.get(e);r.onsuccess=()=>t(r.result??null),r.onerror=()=>n(r.error)})}set(e,t){return new Promise((n,r)=>{let i=this._store.put(t,e);i.onsuccess=()=>n(),i.onerror=()=>r(i.error)})}delete(e){return new Promise((t,n)=>{let r=this._store.delete(e);r.onsuccess=()=>t(),r.onerror=()=>n(r.error)})}},Pr=`nanoforge`,Fr=class{_db;constructor(){}get db(){if(!this._db)throw Error(`Database is not open`);return this._db}async open(e,t){let n=(await me(async()=>{let{default:e}=await import(`./B2921r3t2.js`);return{default:e}},[],import.meta.url)).default;if(!n.indexedDB)throw Error(`Your browser doesn't support a stable version of IndexedDB.`);let r=n.indexedDB.open(Pr,e??1);[this._db]=await Promise.all([new Promise((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e(r.result)}),new Promise(e=>{r.onupgradeneeded=()=>{t?.(r.result)},setTimeout(e,500)})])}close(){this._db?.close()}createStore(e,t){this._assertDB(),this._db.createObjectStore(e,{keyPath:t})}getStore(e){return this._assertDB(),new Nr(this._db.transaction(e,`readwrite`).objectStore(e))}deleteStore(e){this._assertDB(),this._db.deleteObjectStore(e)}_assertDB(){if(!this._db)throw Error(`Database is not open`)}},Ir=`fs-project-tree`,Lr=class extends Fr{projectId;constructor(e){super(),this.projectId=e}init(){return this.open(1,async e=>{e.createObjectStore(Ir)})}async changeId(e){let t=this.getStore(Ir),n=await t.get(this.projectId);n&&(await t.set(e,n),await t.delete(this.projectId))}async read(e){let t=await this.getStore(Ir).get(this.projectId);return this._extractMapFromPath(e,t??null)}async write(e,t){let n=await this.read(e),r=this.getStore(Ir),i=this._generateMapFromPath(e,n??{files:[],directories:{}},t);await r.set(this.projectId,i)}_extractMapFromPath(e,t){let n=e.split(`/`),r=t;for(let e of n){if(r===null)return null;e in r.directories&&(r=r.directories[e]??null)}return r}_generateMapFromPath(e,t,n){if(!e)return n;let r=e.split(`/`);return this._generateMapFromPathRec(r,t,n)}_generateMapFromPathRec(e,t,n){if(e.length===0)return n;let[r,...i]=e;return t.directories[r]=this._generateMapFromPathRec(i,t.directories[r]??{files:[],directories:{}},n),t}},Rr={build:`/fs/build`,project:`/fs/project`},zr=class{project;route;cache;treeCache;constructor(e,t){this.project=e,this.route=Rr[t],this.cache=new Ar(`projects/${e.id}/${t}`),t===`project`&&(this.treeCache=new Lr(e.id))}async init(){await this.treeCache?.init(),await(await this.getDirectory()).readdir(!0)}async getFile(e){return new jr(this,await this.cache.fileExist(e)?await this.cache.getFile(e,!1):null,e)}async getDirectory(e){return new Mr(this,await this.cache.getDirectory(e,!0),e??``)}},Br=class{core;fs;constructor(e){this.core=e,this.fs=new zr(this.core,`build`)}async build(){await this.core.actions.loader.build()}async start(e){let t=await this.fetchManifest(),n=await this.fetchEnv(),{mainFile:r,files:i}=await this.resolveGameFiles(t),a=this.core.save.save;(await this.loadMainFile(r))({files:i,env:n,editor:{save:a,coreEvents:this.core.event._coreEvents,editorEvents:this.core.event._editorEvents},container:e}).then(()=>console.log(`Game started!`))}async loadMainFile(e){let t=await me(()=>import(e),[],import.meta.url);if(t.main)return t.main;throw Error(`No main function found in the main.js file`)}fetchEnv(){return this.core.actions.loader.env()}fetchManifest(){return this.core.actions.loader.manifest()}async resolveGameFiles(e){let t=await this.fetchFiles(e),n,r=new Map;for(let e of t){if(e.gamePath===`/main.js`){n=e.localPath;continue}r.set(e.gamePath,e.localPath)}if(!n)throw Error(`No main.js file found in the manifest`);return{mainFile:n,files:r}}async fetchFiles(e){return await Promise.all(e.files.map(async({path:e})=>{let t=await this.fs.getFile(e);return await t.fetch(),{gamePath:e,localPath:await t.getUrl()}}))}},Vr=class{_project;constructor(e){this._project=e}async installPackages(e){await this._project.actions.package.installPackages({names:e}),await this._project.ecs.components.sync(),await this._project.ecs.systems.sync(),await(await this._project.fs.getDirectory()).readdir(!0)}},Hr=class{_project;_save=x({libraries:[],entities:[],components:[],systems:[]});_readyToSync=!0;_syncTimer;_needSync=x(!1);constructor(e){this._project=e}async init(){await this.fetchFromServer(),this._listeners(),this._save.subscribe(()=>{this.syncToServer()})}async fetchFromServer(){this._save.set(await this._project.actions.save.get())}async syncToServer(){this._readyToSync?(this._readyToSync=!1,await this._project.actions.save.set({save:D(this._save)}),this._syncTimer=setTimeout(()=>{this._readyToSync=!0,D(this._needSync)&&(this.syncToServer(),this._needSync.set(!1))},5e3)):this._needSync.set(!0)}async forceSyncToServer(){this._readyToSync=!0,this._needSync.set(!1),clearTimeout(this._syncTimer),await this.syncToServer()}get save(){return D(this._save)}_listeners(){this._project.ecs.components.store.subscribe(e=>{this._save.set({...this.save,components:e.map(e=>({name:e.id,path:e.path,paramsNames:e.params.map(e=>e.name)}))}),this.forceSyncToServer()}),this._project.ecs.scenes.activeData.systems.store.subscribe(e=>{this._save.set({...this.save,systems:e.map(e=>{let t=this._project.ecs.systems.get(e).data;return{name:t.id,path:t.path}})}),this.forceSyncToServer()}),this._project.ecs.scenes.activeData.entities.store.subscribe(e=>{this._save.set({...this.save,entities:e.map(e=>({id:e.id,treePath:e.treePath,components:e.components}))}),this.syncToServer()})}},Ur=class{id;_info;_actions;_fs;_loader;_save;_packageHandler;_eventHandler;_ecsHandler;_inited=!1;static reset(){wr.reset()}constructor(e){this.id=e,this._save=new Hr(this),this._packageHandler=new Vr(this)}async init(){return await this.fs.init(),await this.ecs.init(),await this.save.init(),this._inited=!0,this}isReady(){return this._inited}get info(){return this._info||=new wr(this),this._info}get actions(){return this._actions||=sn(this.id),this._actions}get fs(){return this._fs||=new zr(this,`project`),this._fs}get loader(){return this._loader||=new Br(this),this._loader}get save(){return this._save||=new Hr(this),this._save}get packages(){return this._packageHandler||=new Vr(this),this._packageHandler}get event(){return this._eventHandler||=new Sr,this._eventHandler}get ecs(){return this._ecsHandler||=new br(this),this._ecsHandler}},Wr=class e{static storageKey=`projects`;static isOnline=qt().mode===`online`;static async getProjects(){if(this.isOnline)return e.getOnlineProjects();let t=localStorage.getItem(this.storageKey);return t?JSON.parse(t).sort((e,t)=>t.lastOpened-e.lastOpened):[]}static async getOnlineProjects(){return(await cn.project.getGatewayProjects()).map(e=>({id:bn(10),resolvable:e.gatewayId,lastOpened:Date.now(),name:e.name}))}static async getProject(e){let t=(await this.getProjects()).find(t=>t.id===e);if(t)return t;throw Error(`Project not found`)}static async addProject(e){if(this.isOnline)return;let t=await this.getProjects();t.push(e),localStorage.setItem(this.storageKey,JSON.stringify(t))}static async removeProject(e){if(this.isOnline)return;let t=await this.getProjects();t=t.filter(t=>t.id!==e),localStorage.setItem(this.storageKey,JSON.stringify(t))}static async updateProject(e,t){if(this.isOnline)return;let n=await this.getProjects(),r=n.findIndex(t=>t.id===e);r!==-1&&(n[r]={...n[r],...t},localStorage.setItem(this.storageKey,JSON.stringify(n)))}static async invalidateProject(t){return e.updateProject(t,{invalid:!0})}static async clearProjects(){this.isOnline||localStorage.removeItem(this.storageKey)}static async addOrUpdateProject(e){if(this.isOnline)return;let t=await this.getProjects(),n=t.findIndex(t=>t.id===e.id||t.resolvable===e.resolvable);n===-1?t.push(e):t[n]={...t[n],...e},localStorage.setItem(this.storageKey,JSON.stringify(t))}},Gr=(e,t)=>Oe.error(e,{description:t,position:`top-right`,style:`background: oklch(var(--destructive)); color: oklch(var(--destructive-foreground));`}),Kr=qt(),qr=function(e){return e.No_Project=`no_project`,e.No_Init_Project=`no_init_project`,e.Invalid_Create_Action=`invalid_create_action`,e.Invalid_Complete_Action=`invalid_complete_action`,e.Empty_Project=`empty_project`,e}({}),Jr={no_project:`No project found`,no_init_project:`Project not initialized`,invalid_create_action:`Unable to create project`,invalid_complete_action:`Unable to complete project`,empty_project:`Empty project`},Yr={no_project:()=>async()=>{await ce(fe(`/`)),Gr(`No project found`,`Select a project or create a new one`)},no_init_project:e=>async()=>{await ce(fe(`/load?id=${e}`))},invalid_create_action:e=>async()=>{Gr(`Unable to create project`,e.message??`Unknown error`)},invalid_complete_action:e=>async()=>{Gr(`Unable to init project`,e.message??`Unknown error`)},empty_project:(e,t)=>async()=>{Kr.mode===`offline`&&($r.unload(),await ce(fe(`/`)),Gr(`Invalid project`,`Select another project or create a new one`)),await ce(fe(`/load?id=${e}&gatewayId=${t}`))}},Xr=class extends Error{reason;fb;args;constructor(e,...t){super(`Failed to load project: ${Jr[e]}`),this.reason=e,this.fb=Yr[e](...t),this.args=t}},Zr=async(e,t)=>{try{return await e()}catch(e){throw e instanceof Xr?e:t(e)}},Qr=x(null),$r=class e{static async create(t){let n=await Zr(()=>cn.project.new(t),e=>new Xr(qr.Invalid_Create_Action,e));return e.init(n)}static async complete(t){let n=await Zr(()=>cn.project.complete(t),e=>new Xr(qr.Invalid_Complete_Action,e));return e.init(n)}static async loadFromCacheWithTryId(t){try{return await e.loadFromId(t.id)}catch{}return e.loadFromCache(t)}static async loadFromIdWithCacheFetching(t){try{return await e.loadFromId(t)}catch{}let n=await Wr.getProject(t);return e.loadFromCache(n)}static async loadFromCache(t){await Wr.removeProject(t.id);let n=qt().mode===`offline`?{path:t.resolvable}:{gatewayId:t.resolvable},r=await cn.project.load(n),i=new Lr(t.id);return await i.init(),await i.changeId(r.id),await(await new Ar(`projects`).getDirectory(t.id)).rename(r.id),await e.init(r)}static async loadFromPath(t){let n=await cn.project.load({path:t});return e.init(n)}static async loadFromGatewayId(t){let n=await cn.project.load({gatewayId:t});return e.init(n)}static async loadFromId(t){let n=await cn.project.load({id:t});return e.init(n)}static async init(e){Ur.reset();let t=new Ur(e.id);Qr.set(t);let n=await Zr(()=>t.info.get(),()=>new Xr(qr.Empty_Project,e.id,e.cacheResolvable));return await Wr.addOrUpdateProject({id:e.id,resolvable:e.cacheResolvable,name:n.name,lastOpened:Date.now()}),t}static unload(){Qr.set(null),Ur.reset()}},ei=()=>{let e=D(Qr);if(!e){let e=new Xr(qr.No_Project);throw e.fb(),e}if(!e.isReady()){let t=new Xr(qr.No_Init_Project,e.id);throw t.fb(),t}return e},ti=()=>D(Qr),ni=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ri=(e,t)=>({classGroupId:e,validator:t}),ii=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ai=`-`,oi=[],si=`arbitrary..`,ci=e=>{let t=di(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ui(e);let n=e.split(ai);return li(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ni(i,t):t:i||oi}return n[e]||oi}}},li=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=li(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ai):e.slice(t).join(ai),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ui=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?si+r:void 0})(),di=e=>{let{theme:t,classGroups:n}=e;return fi(n,t)},fi=(e,t)=>{let n=ii();for(let r in e){let i=e[r];pi(i,n,r,t)}return n},pi=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];mi(i,t,n,r)}},mi=(e,t,n,r)=>{if(typeof e==`string`){hi(e,t,n);return}if(typeof e==`function`){gi(e,t,n,r);return}_i(e,t,n,r)},hi=(e,t,n)=>{let r=e===``?t:vi(t,e);r.classGroupId=n},gi=(e,t,n,r)=>{if(yi(e)){pi(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ri(n,e))},_i=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];pi(o,vi(t,a),n,r)}},vi=(e,t)=>{let n=e,r=t.split(ai),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ii(),n.nextPart.set(t,i)),n=i}return n},yi=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,bi=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},xi=`!`,Si=`:`,Ci=[],wi=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ti=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Si){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(xi)?(c=s.slice(0,-1),l=!0):s.startsWith(xi)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return wi(t,l,c,u)};if(t){let e=t+Si,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):wi(Ci,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ei=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Di=e=>({cache:bi(e.cacheSize),parseClassName:Ti(e),sortModifiers:Ei(e),postfixLookupClassGroupIds:Oi(e),...ci(e)}),Oi=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ki=/\s+/,Ai=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ki),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+xi:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},ji=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Mi(n))&&(i&&(i+=` `),i+=r);return i},Mi=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Mi(e[r]))&&(n&&(n+=` `),n+=t);return n},Ni=(e,...t)=>{let n,r,i,a,o=o=>(n=Di(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ai(e,n);return i(e,a),a};return a=o,(...e)=>a(ji(...e))},Pi=[],V=e=>{let t=t=>t[e]||Pi;return t.isThemeGetter=!0,t},Fi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ii=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Li=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ri=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ui=e=>Li.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Wi=e=>!!e&&Number.isInteger(Number(e)),Gi=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Ki=e=>Ri.test(e),qi=()=>!0,Ji=e=>zi.test(e)&&!Bi.test(e),Yi=()=>!1,Xi=e=>Vi.test(e),Zi=e=>Hi.test(e),Qi=e=>!U(e)&&!W(e),$i=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ea=e=>ha(e,ya,Yi),U=e=>Fi.test(e),ta=e=>ha(e,ba,Ji),na=e=>ha(e,xa,H),ra=e=>ha(e,Ca,qi),ia=e=>ha(e,Sa,Yi),aa=e=>ha(e,_a,Yi),oa=e=>ha(e,va,Zi),sa=e=>ha(e,wa,Xi),W=e=>Ii.test(e),ca=e=>ga(e,ba),la=e=>ga(e,Sa),ua=e=>ga(e,_a),da=e=>ga(e,ya),fa=e=>ga(e,va),pa=e=>ga(e,wa,!0),ma=e=>ga(e,Ca,!0),ha=(e,t,n)=>{let r=Fi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ga=(e,t,n=!1)=>{let r=Ii.exec(e);return r?r[1]?t(r[1]):n:!1},_a=e=>e===`position`||e===`percentage`,va=e=>e===`image`||e===`url`,ya=e=>e===`length`||e===`size`||e===`bg-size`,ba=e=>e===`length`,xa=e=>e===`number`,Sa=e=>e===`family-name`,Ca=e=>e===`number`||e===`weight`,wa=e=>e===`shadow`,Ta=()=>{let e=V(`color`),t=V(`font`),n=V(`text`),r=V(`font-weight`),i=V(`tracking`),a=V(`leading`),o=V(`breakpoint`),s=V(`container`),c=V(`spacing`),l=V(`radius`),u=V(`shadow`),d=V(`inset-shadow`),f=V(`text-shadow`),p=V(`drop-shadow`),m=V(`blur`),h=V(`perspective`),g=V(`aspect`),_=V(`ease`),v=V(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[Ui,`full`,`auto`,...w()],ee=()=>[Wi,`none`,`subgrid`,W,U],te=()=>[`auto`,{span:[`full`,Wi,W,U]},Wi,W,U],E=()=>[Wi,`auto`,W,U],D=()=>[`auto`,`min`,`max`,`fr`,W,U],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[Ui,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[Ui,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Ui,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,W,U],P=()=>[...b(),ua,aa,{position:[W,U]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,da,ea,{size:[W,U]}],F=()=>[Gi,ca,ta],I=()=>[``,`none`,`full`,l,W,U],L=()=>[``,H,ca,ta],R=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[H,Gi,ua,aa],B=()=>[``,`none`,m,W,U],oe=()=>[`none`,H,W,U],se=()=>[`none`,H,W,U],ce=()=>[H,W,U],le=()=>[Ui,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ki],breakpoint:[Ki],color:[qi],container:[Ki],"drop-shadow":[Ki],ease:[`in`,`out`,`in-out`],font:[Qi],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ki],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ki],shadow:[Ki],spacing:[`px`,H],text:[Ki],"text-shadow":[Ki],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ui,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[$i],columns:[{columns:[H,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Wi,`auto`,W,U]}],basis:[{basis:[Ui,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,Ui,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Wi,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,ca,ta]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ma,ra]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Gi,U]}],"font-family":[{font:[la,ia,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,na]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,ta]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Wi,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Wi,W,U],radial:[``,W,U],conic:[Wi,W,U]},fa,oa]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,ca,ta]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,pa,sa]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,pa,sa]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[H,ta]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,pa,sa]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:B()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,pa,sa]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Wi,W,U]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[H,ca,ta,na]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Ea=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(Da(e,`cacheSize`,t),Da(e,`prefix`,n),Da(e,`experimentalParseClassName`,r),Oa(e.theme,a.theme),Oa(e.classGroups,a.classGroups),Oa(e.conflictingClassGroups,a.conflictingClassGroups),Oa(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Da(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),Da(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),ka(e.theme,i.theme),ka(e.classGroups,i.classGroups),ka(e.conflictingClassGroups,i.conflictingClassGroups),ka(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Aa(e,i,`postfixLookupClassGroups`),Aa(e,i,`orderSensitiveModifiers`),e),Da=(e,t,n)=>{n!==void 0&&(e[t]=n)},Oa=(e,t)=>{if(t)for(let n in t)Da(e,n,t[n])},ka=(e,t)=>{if(t)for(let n in t)Aa(e,t,n)},Aa=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},ja=(e,...t)=>typeof e==`function`?Ni(Ta,e,...t):Ni(()=>Ea(Ta(),e),...t),Ma=Ni(Ta);function G(...e){return Ma(oe(e))}var Na=/\s+/g,Pa=e=>typeof e!=`string`||!e?e:e.replace(Na,` `).trim(),Fa=(...e)=>{let t=[],n=e=>{if(!e&&e!==0&&e!==0n)return;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)n(e[t]);return}let r=typeof e;if(r===`string`||r===`number`||r===`bigint`){if(r===`number`&&e!==e)return;t.push(String(e))}else if(r===`object`){let n=Object.keys(e);for(let r=0,i=n.length;r<i;r++){let i=n[r];e[i]&&t.push(i)}}};for(let t=0,r=e.length;t<r;t++){let r=e[t];r!=null&&n(r)}return t.length>0?Pa(t.join(` `)):void 0},Ia=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,K=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},La=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){let a=n[i];if(!r.includes(a)||e[a]!==t[a])return!1}return!0},Ra=(e,t)=>{for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];n in e?e[n]=Fa(e[n],r):e[n]=r}return e},za=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?za(r,t):r&&t.push(r)}},Ba=(...e)=>{let t=[];za(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},Va=(e,t)=>{let n={};for(let r in e){let i=e[r];if(r in t){let e=t[r];Array.isArray(i)||Array.isArray(e)?n[r]=Ba(e,i):typeof i==`object`&&typeof e==`object`&&i&&e?n[r]=Va(i,e):n[r]=e+` `+i}else n[r]=i}for(let r in t)r in e||(n[r]=t[r]);return n},Ha={twMerge:!0,twMergeConfig:{}};function Ua(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Wa=Ua(),Ga=e=>{let t=(t,n)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=t,l={...Ha,...n},u=r?.base?Fa(r.base,t?.base):t?.base,d=r?.variants&&!K(r.variants)?Va(a,r.variants):a,f=r?.defaultVariants&&!K(r.defaultVariants)?{...r.defaultVariants,...c}:c;!K(l.twMergeConfig)&&!La(l.twMergeConfig,Wa.cachedTwMergeConfig)&&(Wa.didTwMergeConfigChange=!0,Wa.cachedTwMergeConfig=l.twMergeConfig);let p=K(r?.slots),m=K(i)?{}:{base:Fa(t?.base,p&&r?.base),...i},h=p?m:Ra({...r?.slots},K(m)?{base:t?.base}:m),g=K(r?.compoundVariants)?o:Ba(r?.compoundVariants,o),_=t=>{if(K(d)&&K(i)&&p)return e(u,t?.class,t?.className)(l);if(g&&!Array.isArray(g))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof g}`);if(s&&!Array.isArray(s))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let n=(e,n=d,r=null,i=null)=>{let a=n[e];if(!a||K(a))return null;let o=i?.[e]??t?.[e];if(o===null)return null;let s=Ia(o);if(typeof s==`object`)return null;let c=f?.[e];return a[(s??Ia(c))||`false`]},r=()=>{if(!d)return null;let e=Object.keys(d),t=[];for(let r=0;r<e.length;r++){let i=n(e[r],d);i&&t.push(i)}return t},a=(e,t)=>{if(!d||typeof d!=`object`)return null;let r=[];for(let i in d){let a=n(i,d,e,t),o=e===`base`&&typeof a==`string`?a:a&&a[e];o&&r.push(o)}return r},o={};for(let e in t){let n=t[e];n!==void 0&&(o[e]=n)}let c=(e,n)=>{let r=typeof t?.[e]==`object`?{[e]:t[e]?.initial}:{};return{...f,...o,...r,...n}},m=(e=[],t)=>{let n=[],r=e.length;for(let i=0;i<r;i++){let{class:r,className:a,...o}=e[i],s=!0,l=c(null,t);for(let e in o){let t=o[e],n=l[e];if(Array.isArray(t)){if(!t.includes(n)){s=!1;break}}else{if((t==null||t===!1)&&(n==null||n===!1))continue;if(n!==t){s=!1;break}}}s&&(r&&n.push(r),a&&n.push(a))}return n},_=t=>{let n=m(g,t);if(!Array.isArray(n))return n;let r={},i=e;for(let e=0;e<n.length;e++){let t=n[e];if(typeof t==`string`)r.base=i(r.base,t)(l);else if(typeof t==`object`)for(let e in t)r[e]=i(r[e],t[e])(l)}return r},v=e=>{if(s.length<1)return null;let t={},n=c(null,e);for(let e=0;e<s.length;e++){let{slots:r=[],class:i,className:a,...o}=s[e];if(!K(o)){let e=!0;for(let t in o){let r=n[t],i=o[t];if(r===void 0||(Array.isArray(i)?!i.includes(r):i!==r)){e=!1;break}}if(!e)continue}for(let e=0;e<r.length;e++){let n=r[e];t[n]||(t[n]=[]),t[n].push([i,a])}}return t};if(!K(i)||!p){let t={};if(typeof h==`object`&&!K(h)){let n=e;for(let e in h)t[e]=t=>{let r=_(t),i=v(t);return n(h[e],a(e,t),r?r[e]:void 0,i?i[e]:void 0,t?.class,t?.className)(l)}}return t}return e(u,r(),m(g),t?.class,t?.className)(l)};return _.variantKeys=(()=>{if(!(!d||typeof d!=`object`))return Object.keys(d)})(),_.extend=r,_.base=u,_.slots=h,_.variants=d,_.defaultVariants=f,_.compoundSlots=s,_.compoundVariants=g,_};return{tv:t,createTV:e=>(n,r)=>t(n,r?Va(e,r):e)}},Ka=e=>K(e)?Ma:ja({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),qa=(e,t)=>{let n=Fa(e);return!n||!(t?.twMerge??!0)?n:((!Wa.cachedTwMerge||Wa.didTwMergeConfigChange)&&(Wa.didTwMergeConfigChange=!1,Wa.cachedTwMerge=Ka(Wa.cachedTwMergeConfig)),Wa.cachedTwMerge(n)||void 0)},{createTV:Ja,tv:Ya}=Ga((...e)=>t=>qa(e,t)),Xa=Ya({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none cursor-pointer disabled:pointer-events-none disabled:opacity-50 disable:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),Za=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),Qa=f(`<a><!></a>`),$a=f(`<button><!></button>`);function eo(e,t){_(t,!0);let n=S(t,`variant`,3,`default`),i=S(t,`size`,3,`default`),o=S(t,`ref`,15,null),s=S(t,`href`,3,void 0),c=S(t,`type`,3,`button`),l=M(t,Za);var u=d(),f=L(u),p=e=>{var a=Qa();P(a,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:s(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...l}),[()=>G(Xa({variant:n(),size:i()}),t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>o(e),()=>o()),O(e,a)},h=e=>{var a=$a();P(a,e=>({"data-slot":`button`,class:e,type:c(),disabled:t.disabled,...l}),[()=>G(Xa({variant:n(),size:i()}),t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>o(e),()=>o()),O(e,a)};a(f,e=>{s()?e(p):e(h,-1)}),O(e,u),B()}f(`<div><!></div>`);var to=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),no=f(`<div><!></div>`);function ro(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,to);var a=no();P(a,e=>({"data-slot":`card-content`,class:e,...i}),[()=>G(`px-4 group-data-[size=sm]/card:px-3`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var io=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ao=f(`<p><!></p>`);function oo(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,io);var a=ao();P(a,e=>({"data-slot":`card-description`,class:e,...i}),[()=>G(`text-muted-foreground text-sm`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}f(`<div><!></div>`);var so=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),co=f(`<div><!></div>`);function lo(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,so);var a=co();P(a,e=>({"data-slot":`card-header`,class:e,...i}),[()=>G(`gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var uo=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),fo=f(`<div><!></div>`);function po(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,uo);var a=fo();P(a,e=>({"data-slot":`card-title`,class:e,...i}),[()=>G(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]),r(E(a),()=>t.children??k),m(a),A(a,e=>n(e),()=>n()),O(e,a),B()}var mo=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),ho=f(`<div><!></div>`);function go(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),a=M(t,mo);var o=ho();P(o,e=>({"data-slot":`card`,"data-size":i(),class:e,...a}),[()=>G(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]),r(E(o),()=>t.children??k),m(o),A(o,e=>n(e),()=>n()),O(e,o),B()}function _o(e){return typeof e==`function`}function vo(e){return typeof e==`object`&&!!e}var yo=[`string`,`number`,`bigint`,`boolean`];function bo(e){return e==null||yo.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>bo(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var xo=Symbol(`box`),So=Symbol(`is-writable`);function q(e,t){let n=R(e);return t?{[xo]:!0,[So]:!0,get current(){return l(n)},set current(e){t(e)}}:{[xo]:!0,get current(){return e()}}}function Co(e){return vo(e)&&xo in e}function wo(e){return Co(e)&&So in e}function To(e){return Co(e)?e:_o(e)?q(e):Oo(e)}function Eo(e){return Object.entries(e).reduce((e,[t,n])=>Co(n)?(wo(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function Do(e){return wo(e)?{[xo]:!0,get current(){return e.current}}:e}function Oo(e){let t=T(F(e));return{[xo]:!0,[So]:!0,get current(){return l(t)},set current(e){N(t,e,!0)}}}function ko(e){let t=T(F(e));return{[xo]:!0,[So]:!0,get current(){return l(t)},set current(e){N(t,e,!0)}}}ko.from=To,ko.with=q,ko.flatten=Eo,ko.readonly=Do,ko.isBox=Co,ko.isWritableBox=wo;function Ao(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var jo=/\d/,Mo=[`-`,`_`,`/`,`.`];function No(e=``){if(!jo.test(e))return e!==e.toLowerCase()}function Po(e){let t=[],n=``,r,i;for(let a of e){let e=Mo.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=No(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Fo(e){return e?Po(e).map(e=>Lo(e)).join(``):``}function Io(e){return Ro(Fo(e||``))}function Lo(e){return e?e[0].toUpperCase()+e.slice(1):``}function Ro(e){return e?e[0].toLowerCase()+e.slice(1):``}function zo(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Fo(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Io(e)]=n}return Ut(e,n),t}function Bo(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Vo(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Ho=Vo(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Uo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Ho(t)}: ${e[t]};`).join(`
|
|
4
4
|
`)}function Wo(e={}){return Uo(e).replace(`
|
|
5
5
|
`,` `)}var Go=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function Ko(e){return Go.has(e)}function J(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&Ko(e))t[e]=Ao(n,i);else if(a&&o)t[e]=Bo(n,i);else if(e===`class`){let r=bo(n),a=bo(i);r&&a?t[e]=oe(n,i):r?t[e]=oe(n):a&&(t[e]=oe(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=zo(i);t[e]={...n,...r}}else if(o&&a)t[e]={...zo(n),...i};else if(o&&s){let r=zo(n),a=zo(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Wo(t.style).replaceAll(`
|
|
6
6
|
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var qo={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`};Wo(qo);var Jo=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Yo(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=Jo,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=te(e=>{let r=n(t,`focusin`,e),i=n(t,`focusout`,e);return()=>{r(),i()}}))}get current(){return this.#t?.(),this.#e?Yo(this.#e):null}};function Xo(e){return typeof e==`function`}function Zo(e,t){if(Xo(e)){let n=e();return n===void 0?t:n}return e===void 0?t:e}var Y=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return C(this.#t)}get(){let e=se(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=se(this.#t);return t===void 0?e:t}set(e){return i(this.#t,e)}};function Qo(e,t){let n=T(null),r=R(()=>Zo(t,250));function i(...t){if(l(n))l(n).timeout&&clearTimeout(l(n).timeout);else{let e,t;N(n,{timeout:null,runner:null,promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t},!0)}return l(n).runner=async()=>{if(!l(n))return;let r=l(n);N(n,null);try{r.resolve(await e.apply(this,t))}catch(e){r.reject(e)}},l(n).timeout=setTimeout(l(n).runner,l(r)),l(n).promise}return i.cancel=async()=>{(!l(n)||l(n).timeout===null)&&(await new Promise(e=>setTimeout(e,0)),!l(n)||l(n).timeout===null)||(clearTimeout(l(n).timeout),l(n).reject(`Cancelled`),N(n,null))},i.runScheduledNow=async()=>{(!l(n)||!l(n).timeout)&&(await new Promise(e=>setTimeout(e,0)),!l(n)||!l(n).timeout)||(clearTimeout(l(n).timeout),l(n).timeout=null,await l(n).runner?.())},Object.defineProperty(i,"pending",{enumerable:!0,get(){return!!l(n)?.timeout}}),i}function $o(t,n){switch(t){case`post`:h(n);break;case`pre`:e(n);break}}function es(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;$o(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=c(()=>n(t,o));return o=t,r})}function ts(e,t,n){let r=re(()=>{let i=!1;es(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});h(()=>r)}function X(e,t,n){es(e,`post`,t,n)}function ns(e,t,n){es(e,`pre`,t,n)}X.pre=ns;function rs(e,t){ts(e,`post`,t)}function is(e,t){ts(e,`pre`,t)}rs.pre=is;function as(e){return Xo(e)?e():e}var os=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=R(()=>(l(this.#s)?.(),this.getSize().width));#o=R(()=>(l(this.#s)?.(),this.getSize().height));#s=R(()=>{let e=as(this.#r);if(e)return te(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??Jo,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=as(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return l(this.#s)?.(),this.getSize()}get width(){return l(this.#a)}get height(){return l(this.#o)}},ss=class{#e=T(!1);constructor(){h(()=>(c(()=>N(this.#e,!0)),()=>{N(this.#e,!1)}))}get current(){return l(this.#e)}},cs=class{#e=()=>void 0;#t=R(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return l(this.#t)}};function ls(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function us(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function ds(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,u=T(F(o)),d=T(!1),f=T(void 0),p=T(F([])),m=()=>{l(p).forEach(e=>e()),N(p,[],!0)},h=e=>{N(p,[...l(p),e],!0)},g=async(e,n,r=!1)=>{try{N(d,!0),N(f,void 0),m();let i=new AbortController;h(()=>i.abort());let a=await t(e,n,{data:l(u),refetching:r,onCleanup:h,signal:i.signal});return N(u,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||N(f,e,!0);return}finally{N(d,!1)}},_=s?ls(g,s):c?us(g,c):g,v=Array.isArray(e)?e:[e],y;return r((t,n)=>{a&&y||(y=t,_(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return l(u)},get loading(){return l(d)},get error(){return l(f)},mutate:e=>{N(u,e,!0)},refetch:t=>{let n=v.map(e=>e());return _(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function fs(e,t,n){return ds(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];X(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function ps(e,t,n){return ds(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];X.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}fs.pre=ps;function ms(e){h(()=>()=>{e()})}function hs(e){h(()=>c(()=>e()))}function gs(e,t){return setTimeout(t,e)}function _s(e){y().then(e)}var vs=1,ys=9,bs=11;function xs(e){return vo(e)&&e.nodeType===vs&&typeof e.nodeName==`string`}function Ss(e){return vo(e)&&e.nodeType===ys}function Cs(e){return vo(e)&&e.constructor?.name===`VisualViewport`}function ws(e){return vo(e)&&e.nodeType!==void 0}function Ts(e){return ws(e)&&e.nodeType===bs&&`host`in e}function Es(e,t){if(!e||!t||!xs(e)||!xs(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ds(e){return Ss(e)?e:Cs(e)?e.document:e?.ownerDocument??document}function Os(e){return Ts(e)?Os(e.host):Ss(e)?e.defaultView??window:xs(e)?e.ownerDocument?.defaultView??window:window}function ks(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var As=class{element;#e=R(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return l(this.#e)}set root(e){N(this.#e,e)}constructor(e){typeof e==`function`?this.element=q(e):this.element=e}getDocument=()=>Ds(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ks(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Z(e,t){return{[v()]:n=>Co(e)?(e.current=n,c(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),c(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function js(e){return e?`true`:`false`}function Ms(e){return e?`true`:void 0}function Ns(e){return e?``:void 0}function Ps(e){return e?!0:void 0}function Fs(e){return e?`open`:`closed`}function Is(e){return e?`checked`:`unchecked`}function Ls(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function Rs(e,t){return t?`mixed`:e?`true`:`false`}var zs=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Bs(e){let t=new zs(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Vs=`ArrowDown`,Hs=`ArrowLeft`,Us=`ArrowRight`,Ws=`ArrowUp`,Gs=`Enter`,Ks=`Home`,qs=`PageDown`,Js=`PageUp`;function Ys(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Xs=[Vs,Js,Ks],Zs=[Ws,qs,`End`];[...Xs,...Zs];function Qs(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Hs:Us,vertical:Vs}[t]}function $s(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Us:Hs,vertical:Ws}[t]}function ec(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Qs(e,t),prevKey:$s(e,t)}}var tc=typeof document<`u`,nc=rc();function rc(){return tc&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ic(e){return e instanceof HTMLElement}function ac(e){return e instanceof Element}function oc(e){return e instanceof Element||e instanceof SVGElement}function sc(e){return e.matches(`:focus-visible`)}function cc(e){return e!==null}function lc(e){return e instanceof HTMLInputElement&&`select`in e}var uc=class{#e;#t=ko(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=ec(Ys(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Ks]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Us:Vs,t=s===`ArrowUp`?Hs:Ws;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!ic(t)||t.focus()}},dc=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,ms(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){this.#a(e);return}let n=this.#r,r=()=>{n===this.#r&&this.#a(e)},i=()=>{if(n!==this.#r)return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===this.#r){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}this.#n=new MutationObserver(()=>{n===this.#r&&(t.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,a()))}),this.#n.observe(t,{attributes:!0,attributeFilter:[e]})})}#a(e){let t=()=>{e()};this.#e.afterTick?_s(t):t()}},fc=class{#e;#t;#n;#r=T(!1);#i=T(void 0);#a=!1;#o=null;constructor(e){this.#e=e,N(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new dc({ref:this.#e.ref,afterTick:this.#e.open}),ms(()=>this.#s()),X(()=>this.#e.open.current,e=>{if(!this.#a){this.#a=!0;return}if(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()){N(this.#r,!1),N(this.#i,void 0),this.#e.onComplete?.();return}if(e&&N(this.#r,!0),N(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&N(this.#i,void 0)})),!this.#t){e||N(this.#r,!1),N(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||N(this.#r,!1),N(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return l(this.#r)}get transitionStatus(){return l(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Q(){}function pc(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function mc(e,t){var n=d();o(L(n),()=>t.children,e=>{var n=d();r(L(n),()=>t.children??k),O(e,n)}),O(e,n)}var hc=new Y(`BitsConfig`);function gc(){let e=new _c(null,{});return hc.getOr(e).opts}var _c=class{opts;constructor(e,t){let n=vc(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function vc(e,t){return n=>q(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function yc(e,t){return n=>{let r=gc();return q(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var bc=yc(e=>e.defaultPortalTo,`body`);function xc(e,n){_(n,!0);let i=bc(()=>n.to),o=ae(),s=R(c);function c(){if(!tc||n.disabled)return null;let e=null;return e=typeof i.current==`string`?document.querySelector(i.current):i.current,e}let u;function f(){u&&=(t(u),null)}X([()=>l(s),()=>n.disabled],([e,t])=>{if(!e||t){f();return}return u=p(mc,{target:e,props:{children:n.children},context:o}),()=>{f()}});var m=d(),h=L(m),g=e=>{var t=d();r(L(t),()=>n.children??k),O(e,t)};a(h,e=>{n.disabled&&e(g)}),O(e,m),B()}var Sc=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,r){return n(e,this.eventName,e=>{t(e)},r)}};function Cc(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function wc(e,t){return e===t||e.contains(t)}function Tc(e){return e?.ownerDocument??document}function Ec(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var Dc=[Gs,` `],Oc=[Vs,Js,Ks],kc=[Ws,qs,`End`],Ac=[...Oc,...kc];[...Dc],[...Dc];function $(e){return e.pointerType===`mouse`}function jc(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=Ds(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&lc(e)&&t&&e.select()}function Mc(e,{select:t=!1}={},n){let r=n();for(let i of e)if(jc(i,{select:t}),n()!==r)return!0}var Nc=T(!1),Pc=class e{static _refs=0;static _cleanup;constructor(){h(()=>(e._refs===0&&(e._cleanup=re(()=>{let e=[],t=e=>{N(Nc,!1)};return e.push(n(document,`pointerdown`,t,{capture:!0}),n(document,`pointermove`,t,{capture:!0}),n(document,`keydown`,e=>{N(Nc,!0)},{capture:!0})),Bo(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(N(Nc,!1),e._cleanup?.())}))}get current(){return l(Nc)}set current(e){N(Nc,e,!0)}},Fc=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],Ic=Fc.join(`,`),Lc=typeof Element>`u`,Rc=Lc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zc=!Lc&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Bc=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Bc(e.parentNode))},Vc=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Hc=function(e,t,n){if(Bc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ic));return t&&Rc.call(e,Ic)&&r.unshift(e),r=r.filter(n),r},Uc=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Bc(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Uc(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Rc.call(a,Ic)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Bc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Uc(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Wc=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Gc=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Vc(e))&&!Wc(e)?0:e.tabIndex},Kc=function(e,t){var n=Gc(e);return n<0&&t&&!Wc(e)?0:n},qc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Jc=function(e){return e.tagName===`INPUT`},Yc=function(e){return Jc(e)&&e.type===`hidden`},Xc=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Zc=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Qc=function(e){if(!e.name)return!0;var t=e.form||zc(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){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`,e.message),!1}var i=Zc(r,e.form);return!i||i===e},$c=function(e){return Jc(e)&&e.type===`radio`},el=function(e){return $c(e)&&!Qc(e)},tl=function(e){var t=e&&zc(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=zc(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},nl=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},rl=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Rc.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Rc.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=zc(e);if(o&&!o.shadowRoot&&r(o)===!0)return nl(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(tl(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return nl(e);return!1},il=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Rc.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},al=function(e,t){return!(t.disabled||Yc(t)||rl(t,e)||Xc(t)||il(t))},ol=function(e,t){return!(el(t)||Gc(t)<0||!al(e,t))},sl=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},cl=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Kc(a,i),s=i?cl(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(qc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},ll=function(e,t){return t||={},cl(t.getShadowRoot?Uc([e],t.includeContainer,{filter:ol.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sl}):Hc(e,t.includeContainer,ol.bind(null,t)))},ul=function(e,t){return t||={},t.getShadowRoot?Uc([e],t.includeContainer,{filter:al.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Hc(e,t.includeContainer,al.bind(null,t))},dl=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Rc.call(e,Ic)===!1?!1:ol(t,e)},fl=Fc.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),pl=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Rc.call(e,fl)===!1?!1:al(t,e)};function ml(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function hl(e,t){if(!dl(e,ml()))return gl(e,t);let n=Ds(e),r=ll(n.body,ml());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function gl(e,t){let n=Ds(e);if(!pl(e,ml()))return n.body;let r=ul(n.body,ml());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>dl(e,ml()))??n.body}function _l(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function vl(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function yl(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function bl(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function xl(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return xl(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return Sl(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=Sl(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function Sl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cl={afterMs:1e4,onChange:Q};function wl(e,t){let{afterMs:n,onChange:r,getWindow:i}={...Cl,...t},a=null,o=T(F(e));function s(){return i().setTimeout(()=>{N(o,e,!0),r?.(e)},n)}return h(()=>()=>{a&&i().clearTimeout(a)}),q(()=>l(o),e=>{N(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var Tl=class{#e;#t;#n=R(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=R(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=wl(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=l(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=xl(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&l(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},El=`data-context-menu-trigger`,Dl=`data-context-menu-content`,Ol=new Y(`Menu.Root`),kl=new Y(`Menu.Root | Menu.Sub`),Al=new Y(`Menu.Content`);new Y(`Menu.Group | Menu.RadioGroup`),new Y(`Menu.RadioGroup`),new Y(`Menu.CheckboxGroup`);var jl=new Sc(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),Ml=Bs({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),Nl=class{#e;#t=null;#n=null;#r=!1;#i=null;#a=null;#o=null;#s=null;constructor(e){this.#e=e,X([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(this.#_(),!e||!t||!n)return;let r=e=>{$(e)&&(this.#s={x:e.clientX,y:e.clientY},this.#r||this.#d(e,`content`))},i=e=>{$(e)&&this.#f(e,`content`)},a=e=>{$(e)&&(this.#r||this.#d(e,`trigger`))},o=e=>{if($(e)){if(ac(e.relatedTarget)){let n=this.#e.subContentSelector(),r=e.relatedTarget.closest(n);if(r&&r!==t&&r.id&&t.querySelector(`[aria-controls="${r.id}"]`))return}this.#f(e,`trigger`)}},s=e=>{$(e)&&this.#m()},c=e=>{$(e)&&this.#m()};return e.addEventListener(`pointermove`,r),e.addEventListener(`pointerleave`,i),e.addEventListener(`pointerenter`,s),t.addEventListener(`pointermove`,a),t.addEventListener(`pointerleave`,o),t.addEventListener(`pointerenter`,c),()=>{e.removeEventListener(`pointermove`,r),e.removeEventListener(`pointerleave`,i),e.removeEventListener(`pointerenter`,s),t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerleave`,o),t.removeEventListener(`pointerenter`,c),this.#_()}}),ms(()=>{this.#_()})}#c(){let e=this.#e.parentContentNode();return e?e.getBoundingClientRect():this.#e.triggerNode()?.getBoundingClientRect()??null}#l(e,t){let n=this.#e.triggerNode(),r=this.#e.contentNode();if(!n||!r)return null;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=Ll(i,a),s,c,l;return t===`content`?(s=this.#r?this.#a??e:e,c=a):(s=this.#s??e,c=this.#c()??i,l=a),this.#a=s,{corridor:Rl(i,a,o),intent:zl(s,c,o,t,l),targetRect:c,side:o}}#u(e,t,n){return Pl(e,t)||Pl(e,n)}#d(e,t){let n={x:e.clientX,y:e.clientY};this.#l(n,t)&&(this.#i=t,this.#o=n)}#f(e,t){if(!this.#e.enabled())return;let n=this.#e.triggerNode(),r=this.#e.contentNode();if(!n||!r)return;let i=e.relatedTarget;if(ac(i)&&(t===`content`&&r.contains(i)||t===`trigger`&&n.contains(i)))return;let a={x:e.clientX,y:e.clientY},o=this.#l(a,t);if(o){if(!Fl(a,o.targetRect)&&!this.#u(a,o.corridor,o.intent)){this.#w();return}this.#r=!0,this.#i=t,this.#o=a,this.#e.setIsPointerInTransit(!0),this.#b(),this.#S()}}#p=null;#m(){if(!this.#r)return;let e=this.#i===`trigger`;this.#x(),this.#C(),this.#r=!1,this.#w(),e?(this.#h(),this.#p=setTimeout(()=>{this.#p=null,this.#e.setIsPointerInTransit(!1)},100)):this.#e.setIsPointerInTransit(!1)}#h(){this.#p!==null&&(clearTimeout(this.#p),this.#p=null)}#g(){let e=this.#o;this.#x(),this.#C(),this.#h(),this.#r=!1,this.#e.setIsPointerInTransit(!1),this.#w(),this.#e.onIntentExit(e)}#_(){this.#x(),this.#C(),this.#h(),this.#r&&this.#e.setIsPointerInTransit(!1),this.#r=!1,this.#i=null,this.#a=null,this.#o=null,this.#s=null}#v(e){let t=this.#e.contentNode();if(!t)return!1;let n=t.ownerDocument.elementFromPoint(e.x,e.y);if(!n)return!1;let r=this.#e.subContentSelector(),i=n.closest(r);return!i||i===t?!1:i.id?!!t.querySelector(`[aria-controls="${i.id}"]`):!1}#y=e=>{if(!this.#r||!this.#i||!$(e))return;let t=this.#e.triggerNode(),n=this.#e.contentNode();if(!t||!n){this.#g();return}this.#C();let r={x:e.clientX,y:e.clientY};this.#o=r;let i=t.getBoundingClientRect(),a=n.getBoundingClientRect();if(this.#i===`content`&&Fl(r,a)){this.#m();return}if(this.#i===`trigger`&&Il(r,i,4)){this.#m();return}if(this.#v(r)){this.#S();return}let o=this.#l(r,this.#i);if(!o){this.#g();return}if(this.#u(r,o.corridor,o.intent)){this.#S();return}this.#g()};#b(){if(this.#t)return;let e=Ds(this.#e.triggerNode()??this.#e.contentNode());e&&(e.addEventListener(`pointermove`,this.#y,!0),this.#t=()=>{e.removeEventListener(`pointermove`,this.#y,!0),this.#t=null})}#x(){this.#t?.()}#S(){this.#C(),this.#n=setTimeout(()=>{this.#n=null,this.#r&&this.#g()},500)}#C(){this.#n!==null&&(clearTimeout(this.#n),this.#n=null)}#w(){this.#i=null,this.#a=null,this.#o=null}};function Pl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Fl(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function Il(e,t,n){return e.x>=t.left+n&&e.x<=t.right-n&&e.y>=t.top+n&&e.y<=t.bottom-n}function Ll(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}function Rl(e,t,n){switch(n){case`top`:return[{x:Math.min(e.left,t.left)-2,y:e.top},{x:Math.min(e.left,t.left)-2,y:t.bottom},{x:Math.max(e.right,t.right)+2,y:t.bottom},{x:Math.max(e.right,t.right)+2,y:e.top}];case`bottom`:return[{x:Math.min(e.left,t.left)-2,y:e.bottom},{x:Math.min(e.left,t.left)-2,y:t.top},{x:Math.max(e.right,t.right)+2,y:t.top},{x:Math.max(e.right,t.right)+2,y:e.bottom}];case`left`:return[{x:e.left,y:Math.min(e.top,t.top)-2},{x:t.right,y:Math.min(e.top,t.top)-2},{x:t.right,y:Math.max(e.bottom,t.bottom)+2},{x:e.left,y:Math.max(e.bottom,t.bottom)+2}];case`right`:return[{x:e.right,y:Math.min(e.top,t.top)-2},{x:t.left,y:Math.min(e.top,t.top)-2},{x:t.left,y:Math.max(e.bottom,t.bottom)+2},{x:e.right,y:Math.max(e.bottom,t.bottom)+2}]}}function zl(e,t,n,r,i){let a=r===`trigger`?Bl(n):n,o=i?Math.min(t.top,i.top)-8:t.top-8,s=i?Math.max(t.bottom,i.bottom)+8:t.bottom+8,c=i?Math.min(t.left,i.left)-8:t.left-8,l=i?Math.max(t.right,i.right)+8:t.right+8;switch(a){case`right`:return[e,{x:t.left,y:o},{x:t.left,y:s}];case`left`:return[e,{x:t.right,y:o},{x:t.right,y:s}];case`bottom`:return[e,{x:c,y:t.top},{x:l,y:t.top}];case`top`:return[e,{x:c,y:t.bottom},{x:l,y:t.bottom}]}}function Bl(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Vl=class e{static create(t){let n=new e(t);return Ol.set(n)}opts;isUsingKeyboard=new Pc;#e=T(!1);get ignoreCloseAutoFocus(){return l(this.#e)}set ignoreCloseAutoFocus(e){N(this.#e,e,!0)}#t=T(!1);get isPointerInTransit(){return l(this.#t)}set isPointerInTransit(e){N(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>Ml.getAttr(e,this.opts.variant.current)},Hl=class e{static create(t,n){return kl.set(new e(t,n,null))}opts;root;parentMenu;contentId=q(()=>``);#e=T(null);get contentNode(){return l(this.#e)}set contentNode(e){N(this.#e,e,!0)}contentPresence;#t=T(null);get triggerNode(){return l(this.#t)}set triggerNode(e){N(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new fc({ref:q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)},shouldSkipExitAnimation:()=>this.root.opts.variant.current!==`menubar`||this.parentMenu!==null?!1:this.root.opts.shouldSkipExitAnimation?.()??!1}),n&&X(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}},Ul=class e{static create(t){return Al.set(new e(t,kl.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=T(``);get search(){return l(this.#e)}set search(e){N(this.#e,e,!0)}#t=0;#n;#r=T(!1);get mounted(){return l(this.#r)}set mounted(e){N(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new As(e.ref),this.attachment=Z(this.opts.ref,e=>{this.parentMenu.contentNode!==e&&(this.parentMenu.contentNode=e)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Nl({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,parentContentNode:()=>this.parentMenu.parentMenu?.contentNode??null,subContentSelector:()=>`[${this.parentMenu.root.getBitsAttr(`sub-content`)}]`,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`)),onIntentExit:e=>{this.parentMenu.opts.open.current=!1,this.#s(e)},setIsPointerInTransit:e=>{this.parentMenu.root.isPointerInTransit=e}}),this.#n=new Tl({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new uc({rootNode:q(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:q(()=>`vertical`)}),X(()=>this.parentMenu.contentNode,e=>e?jl.listen(e,()=>{_s(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),h(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){let e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}#s(e){if(!e)return;let t=this.parentMenu.parentMenu?.contentNode;if(!t)return;let n=this.domContext.getDocument().elementFromPoint(e.x,e.y);if(!ac(n))return;let r=n.closest(`[${this.parentMenu.root.getBitsAttr(`sub-trigger`)}]`);!r||!t.contains(r)||r!==this.parentMenu.triggerNode&&r.dispatchEvent(new PointerEvent(`pointermove`,{bubbles:!0,cancelable:!0,pointerType:`mouse`,clientX:e.x,clientY:e.y}))}onCloseAutoFocus=e=>{if(this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)){if(this.parentMenu.root.ignoreCloseAutoFocus){e.preventDefault();return}this.parentMenu.triggerNode&&dl(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())}};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();let n=hl(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),_s(()=>{n.focus(),_s(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===`Tab`){this.handleTabKeyDown(e);return}let t=e.target,n=e.currentTarget;if(!ic(t)||!ic(n))return;let r=t.closest(`[${this.parentMenu.root.getBitsAttr(`content`)}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,a=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code===`Space`)return;let o=this.#a();r&&!i&&a&&this.#n(e.key,o),e.target?.id===this.parentMenu.contentId.current&&Ac.includes(e.key)&&(e.preventDefault(),kc.includes(e.key)&&o.reverse(),Mc(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){ac(e.currentTarget)&&ac(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&_s(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(e){e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`))||this.#o()||this.parentMenu.root.isUsingKeyboard.current||(this.parentMenu.contentNode?.focus({preventScroll:!0}),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!oc(e.target))return;let t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}if(e.target.closest(`#${t}`)){e.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus=!0,_s(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#c=R(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return l(this.#c)}set snippetProps(e){N(this.#c,e)}#l=R(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":Fs(this.parentMenu.opts.open.current),...Ls(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:`auto`,contain:`layout style`},...this.attachment}));get props(){return l(this.#l)}set props(e){N(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},Wl=class{opts;content;attachment;#e=T(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=Z(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&$(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!ic(t))return;t.focus({preventScroll:!0})}}onpointerleave(e){e.defaultPrevented||$(e)&&this.content.onItemLeave(e)}onfocus(e){_s(()=>{e.defaultPrevented||this.opts.disabled.current||N(this.#e,!0)})}onblur(e){_s(()=>{e.defaultPrevented||N(this.#e,!1)})}#t=R(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":js(this.opts.disabled.current),"data-disabled":Ns(this.opts.disabled.current),"data-highlighted":l(this.#e)?``:void 0,[this.content.parentMenu.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},Gl=class e{static create(t){return new e(t,new Wl(t,Al.get()))}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;let e=new CustomEvent(`menuitemselect`,{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){let t=this.item.content.search!==``;if(!(this.item.opts.disabled.current||t&&e.key===` `)&&Dc.includes(e.key)){if(!ic(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!ic(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=R(()=>J(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return l(this.#n)}set props(e){N(this.#n,e)}},Kl=class e{static create(t){return new e(t,Ol.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Z(this.opts.ref)}#e=R(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return l(this.#e)}set props(e){N(this.#e,e)}},ql=class e{static create(t){return new e(t,kl.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=Z(this.opts.ref,e=>this.parentMenu.triggerNode=e)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType===`touch`)return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType===`touch`&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===` `||e.key===`Enter`){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===`ArrowDown`&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=R(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=R(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":js(this.parentMenu.opts.open.current),"aria-controls":l(this.#e),"data-disabled":Ns(this.opts.disabled.current),"data-state":Fs(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr(`trigger`)]:``,onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},Jl=class e{static create(t){return new e(t,kl.get())}opts;parentMenu;attachment;#e=T(F({x:0,y:0}));virtualElement=Oo({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l(this.#e)})});#t=null;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=Z(this.opts.ref,e=>this.parentMenu.triggerNode=e),this.oncontextmenu=this.oncontextmenu.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointercancel=this.onpointercancel.bind(this),this.onpointerup=this.onpointerup.bind(this),X(()=>l(this.#e),e=>{this.virtualElement.current={getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...e})}}),X(()=>this.opts.disabled.current,e=>{e&&this.#n()}),ms(()=>this.#n())}#n(){this.#t!==null&&Os(this.opts.ref.current).clearTimeout(this.#t)}#r(e){N(this.#e,{x:e.clientX,y:e.clientY},!0),this.parentMenu.onOpen()}oncontextmenu(e){e.defaultPrevented||this.opts.disabled.current||(this.#n(),this.#r(e),e.preventDefault(),this.parentMenu.contentNode?.focus())}onpointerdown(e){this.opts.disabled.current||$(e)||(this.#n(),this.#t=Os(this.opts.ref.current).setTimeout(()=>this.#r(e),700))}onpointermove(e){this.opts.disabled.current||$(e)||this.#n()}onpointercancel(e){this.opts.disabled.current||$(e)||this.#n()}onpointerup(e){this.opts.disabled.current||$(e)||this.#n()}#i=R(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"data-disabled":Ns(this.opts.disabled.current),"data-state":Fs(this.parentMenu.opts.open.current),[El]:``,tabindex:-1,onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointercancel:this.onpointercancel,onpointerup:this.onpointerup,oncontextmenu:this.oncontextmenu,...this.attachment}));get props(){return l(this.#i)}set props(e){N(this.#i,e)}};globalThis.bitsDismissableLayers??=new Map;var Yl=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=Q;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,h(()=>{this.#a=Tc(this.opts.ref.current)});let t=Q,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};X([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return gs(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),ms(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&_s(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Bo(n(this.#a,`pointerdown`,Bo(this.#f,this.#m),{capture:!0}),n(this.#a,`pointerdown`,Bo(this.#p,this.#d)),n(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=$l(e)),this.#e.current(e)};#d=Cc(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Ql(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let r=e;if(r.defaultPrevented&&(r=$l(r)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=n(this.#a,`click`,this.#u,{once:!0})):this.#e.current(r)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=Zl(this.opts.ref.current))};#h=e=>this.opts.ref.current?wc(this.opts.ref.current,e):!1;#g=Cc(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function Xl(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Zl(e){let t=[...globalThis.bitsDismissableLayers],n=Xl(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Ql(e,t){let n=e.target;if(!oc(n))return!1;let r=!!n.closest(`[${El}]`),i=!!t.closest(`[${Dl}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:Tc(n).documentElement.contains(n)&&!wc(t,n)&&Ec(e,t)}function $l(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function eu(e,t){_(t,!0);let n=S(t,`interactOutsideBehavior`,3,`close`),i=S(t,`onInteractOutside`,3,Q),a=S(t,`onFocusOutside`,3,Q),o=S(t,`isValidEvent`,3,()=>!1),s=Yl.create({id:q(()=>t.id),interactOutsideBehavior:q(()=>n()),onInteractOutside:q(()=>i()),enabled:q(()=>t.enabled),onFocusOutside:q(()=>a()),isValidEvent:q(()=>o()),ref:t.ref});var c=d();r(L(c),()=>t.children??k,()=>({props:s.props})),O(e,c),B()}globalThis.bitsEscapeLayers??=new Map;var tu=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new As(this.opts.ref);let t=Q;X(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>n(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!nu(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function nu(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function ru(e,t){_(t,!0);let n=S(t,`escapeKeydownBehavior`,3,`close`),i=S(t,`onEscapeKeydown`,3,Q);tu.create({escapeKeydownBehavior:q(()=>n()),onEscapeKeydown:q(()=>i()),enabled:q(()=>t.enabled),ref:t.ref});var a=d();r(L(a),()=>t.children??k),O(e,a),B()}var iu=class e{static instance;#e=Oo([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},au=class e{#e=!1;#t=null;#n=iu.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(n(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&pl(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),n(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let r=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});r.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>r.disconnect())}#l(){return this.#t?ll(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?ul(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return X([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),ms(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function ou(e,t){_(t,!0);let n=S(t,`enabled`,3,!1),i=S(t,`trapFocus`,3,!1),a=S(t,`loop`,3,!1),o=S(t,`onCloseAutoFocus`,3,Q),s=S(t,`onOpenAutoFocus`,3,Q),c=au.use({enabled:q(()=>n()),trap:q(()=>i()),loop:a(),onCloseAutoFocus:q(()=>o()),onOpenAutoFocus:q(()=>s()),ref:t.ref});var l=d();r(L(l),()=>t.focusScope??k,()=>({props:c.props})),O(e,l),B()}var su=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var cu=class e{static create(t){return new e(t)}opts;domContext;#e=Q;#t=!1;#n=su;#r=su;constructor(e){this.opts=e,this.domContext=new As(e.ref);let t=Q;X(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Bo(n(this.domContext.getDocument(),`pointerdown`,this.#o),n(this.domContext.getDocument(),`pointerup`,Ao(this.#s,this.#a)))}#a=e=>{this.#r(e)};#o=e=>{let t=this.opts.ref.current,n=e.target;!ic(t)||!ic(n)||!this.#t||!fu(this)||!Es(t,n)||(this.#n(e),!e.defaultPrevented&&(this.#e=uu(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=Q}},lu=e=>e.style.userSelect||e.style.webkitUserSelect;function uu(e,t){let n=lu(t),r=lu(e);return du(t,`none`),du(e,`text`),()=>{du(t,n),du(e,r)}}function du(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function fu(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function pu(e,t){_(t,!0);let n=S(t,`preventOverflowTextSelection`,3,!0),i=S(t,`onPointerDown`,3,Q),a=S(t,`onPointerUp`,3,Q);cu.create({id:q(()=>t.id),onPointerDown:q(()=>i()),onPointerUp:q(()=>a()),enabled:q(()=>t.enabled&&n()),ref:t.ref});var o=d();r(L(o),()=>t.children??k),O(e,o),B()}globalThis.bitsIdCounter??={current:0};function mu(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var hu=class{#e;#t=0;#n=T();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),N(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,l(this.#n)===void 0&&(this.#r=re(()=>{N(this.#n,this.#e(...e),!0)})),h(()=>()=>{this.#i()}),l(this.#n)}},gu=new Ae,_u=T(null),vu=null,yu=null,bu=!1,xu=q(()=>{for(let e of gu.values())if(e)return!0;return!1}),Su=null,Cu=new hu(()=>{function e(){document.body.setAttribute(`style`,l(_u)??``),document.body.style.removeProperty(`--scrollbar-width`),nc&&vu?.(),N(_u,null)}function t(){yu!==null&&(window.clearTimeout(yu),yu=null)}function r(e,n){t(),bu=!0,Su=Date.now();let r=Su,i=()=>{yu=null,Su===r&&(Tu(gu)?bu=!1:(bu=!1,n()))},a=e===null?24:e;yu=window.setTimeout(i,a)}function i(){l(_u)===null&&gu.size===0&&!bu&&N(_u,document.body.getAttribute(`style`),!0)}return X(()=>xu.current,()=>{if(!xu.current)return;i(),bu=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),r=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),a=window.innerWidth-document.documentElement.clientWidth,o={padding:Number.parseInt(t.paddingRight??`0`,10)+a,margin:Number.parseInt(t.marginRight??`0`,10)};a>0&&!r&&(document.body.style.paddingRight=`${o.padding}px`,document.body.style.marginRight=`${o.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${a}px`)),document.body.style.overflow=`hidden`,nc&&(vu=n(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),_s(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),ms(()=>()=>{vu?.()}),{get lockMap(){return gu},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:i}}),wu=class{#e=mu();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=Cu.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=q(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),ms(()=>{if(this.#r.lockMap.delete(this.#e),Tu(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function Tu(e){for(let[t,n]of e)if(n)return!0;return!1}function Eu(e,t){_(t,!0);let n=S(t,`preventScroll`,3,!0),r=S(t,`restoreScrollDelay`,3,null);n()&&new wu(n(),()=>r()),B()}var Du=new Set([`$$slots`,`$$events`,`$$legacy`,`value`]),Ou=f(`<input/>`);function ku(e,t){_(t,!0);let n=S(t,`value`,15),r=M(t,Du),i=R(()=>J(r,{"aria-hidden":`true`,tabindex:-1,style:{...qo,position:`absolute`,top:`0`,left:`0`}}));var o=d(),s=L(o),c=e=>{var t=Ou();P(t,()=>({...l(i),value:n()}),void 0,void 0,void 0,void 0,!0),O(e,t)},u=e=>{var t=Ou();P(t,()=>({...l(i)}),void 0,void 0,void 0,void 0,!0),ee(t,n),O(e,t)};a(s,e=>{l(i).type===`checkbox`?e(c):e(u,-1)}),O(e,o),B()}var Au=[`top`,`right`,`bottom`,`left`],ju=Math.min,Mu=Math.max,Nu=Math.round,Pu=Math.floor,Fu=e=>({x:e,y:e}),Iu={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Lu(e,t,n){return Mu(e,ju(t,n))}function Ru(e,t){return typeof e==`function`?e(t):e}function zu(e){return e.split(`-`)[0]}function Bu(e){return e.split(`-`)[1]}function Vu(e){return e===`x`?`y`:`x`}function Hu(e){return e===`y`?`height`:`width`}function Uu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Wu(e){return Vu(Uu(e))}function Gu(e,t,n){n===void 0&&(n=!1);let r=Bu(e),i=Wu(e),a=Hu(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ed(o)),[o,ed(o)]}function Ku(e){let t=ed(e);return[qu(e),t,qu(t)]}function qu(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ju=[`left`,`right`],Yu=[`right`,`left`],Xu=[`top`,`bottom`],Zu=[`bottom`,`top`];function Qu(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Yu:Ju:t?Ju:Yu;case`left`:case`right`:return t?Xu:Zu;default:return[]}}function $u(e,t,n,r){let i=Bu(e),a=Qu(zu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qu)))),a}function ed(e){let t=zu(e);return Iu[t]+e.slice(t.length)}function td(e){return{top:0,right:0,bottom:0,left:0,...e}}function nd(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:td(e)}function rd(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function id(e,t,n){let{reference:r,floating:i}=e,a=Uu(t),o=Wu(t),s=Hu(o),c=zu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Bu(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ad(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ru(t,e),p=nd(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rd(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var od=50,sd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ad},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=id(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<od&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=id(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},cd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ru(e,t)||{};if(l==null)return{};let d=nd(u),f={x:n,y:r},p=Wu(i),m=Hu(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=ju(d[_],T),te=ju(d[v],T),E=ee,D=C-h[m]-te,O=C/2-h[m]/2+w,ne=Lu(E,O,D),k=!c.arrow&&Bu(i)!=null&&O!==ne&&a.reference[m]/2-(O<E?ee:te)-h[m]/2<0,A=k?O<E?O-E:O-D:0;return{[p]:f[p]+A,data:{[p]:ne,centerOffset:O-ne-A,...k&&{alignmentOffset:A}},reset:k}}}),ld=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ru(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=zu(r),_=Uu(o),v=zu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ed(o)]:Ku(o)),x=p!==`none`;!d&&x&&b.push(...$u(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Gu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Uu(t))||T.every(e=>Uu(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Uu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ud(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dd(e){return Au.some(t=>e[t]>=0)}var fd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ru(e,t);switch(i){case`referenceHidden`:{let e=ud(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:dd(e)}}}case`escaped`:{let e=ud(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:dd(e)}}}default:return{}}}}},pd=new Set([`left`,`top`]);async function md(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zu(n),s=Bu(n),c=Uu(n)===`y`,l=pd.has(o)?-1:1,u=a&&c?-1:1,d=Ru(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var hd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await md(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},gd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ru(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Uu(zu(i)),p=Vu(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Lu(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Lu(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},_d=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ru(e,t),u={x:n,y:r},d=Uu(i),f=Vu(d),p=u[f],m=u[d],h=Ru(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=pd.has(zu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ru(e,t),u=await o.detectOverflow(t,l),d=zu(i),f=Bu(i),p=Uu(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=ju(h-u[g],v),x=ju(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Mu(u.left,0),t=Mu(u.right,0),n=Mu(u.top,0),r=Mu(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Mu(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Mu(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function yd(){return typeof window<`u`}function bd(e){return Cd(e)?(e.nodeName||``).toLowerCase():`#document`}function xd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sd(e){return((Cd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Cd(e){return yd()?e instanceof Node||e instanceof xd(e).Node:!1}function wd(e){return yd()?e instanceof Element||e instanceof xd(e).Element:!1}function Td(e){return yd()?e instanceof HTMLElement||e instanceof xd(e).HTMLElement:!1}function Ed(e){return!yd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xd(e).ShadowRoot}function Dd(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Rd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Od(e){return/^(table|td|th)$/.test(bd(e))}function kd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ad=/transform|translate|scale|rotate|perspective|filter/,jd=/paint|layout|strict|content/,Md=e=>!!e&&e!==`none`,Nd;function Pd(e){let t=wd(e)?Rd(e):e;return Md(t.transform)||Md(t.translate)||Md(t.scale)||Md(t.rotate)||Md(t.perspective)||!Id()&&(Md(t.backdropFilter)||Md(t.filter))||Ad.test(t.willChange||``)||jd.test(t.contain||``)}function Fd(e){let t=Bd(e);for(;Td(t)&&!Ld(t);){if(Pd(t))return t;if(kd(t))return null;t=Bd(t)}return null}function Id(){return Nd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Nd}function Ld(e){return/^(html|body|#document)$/.test(bd(e))}function Rd(e){return xd(e).getComputedStyle(e)}function zd(e){return wd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bd(e){if(bd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ed(e)&&e.host||Sd(e);return Ed(t)?t.host:t}function Vd(e){let t=Bd(e);return Ld(t)?e.ownerDocument?e.ownerDocument.body:e.body:Td(t)&&Dd(t)?t:Vd(t)}function Hd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Vd(e),i=r===e.ownerDocument?.body,a=xd(r);if(i){let e=Ud(a);return t.concat(a,a.visualViewport||[],Dd(r)?r:[],e&&n?Hd(e):[])}else return t.concat(r,Hd(r,[],n))}function Ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wd(e){let t=Rd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Td(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Nu(n)!==a||Nu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Gd(e){return wd(e)?e:e.contextElement}function Kd(e){let t=Gd(e);if(!Td(t))return Fu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Wd(t),o=(a?Nu(n.width):n.width)/r,s=(a?Nu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var qd=Fu(0);function Jd(e){let t=xd(e);return!Id()||!t.visualViewport?qd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xd(e)?!1:t}function Xd(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Gd(e),o=Fu(1);t&&(r?wd(r)&&(o=Kd(r)):o=Kd(e));let s=Yd(a,n,r)?Jd(a):Fu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=xd(a),t=r&&wd(r)?xd(r):r,n=e,i=Ud(n);for(;i&&r&&t!==n;){let e=Kd(i),t=i.getBoundingClientRect(),r=Rd(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xd(i),i=Ud(n)}}return rd({width:u,height:d,x:c,y:l})}function Zd(e,t){let n=zd(e).scrollLeft;return t?t.left+n:Xd(Sd(e)).left+n}function Qd(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zd(e,n),y:n.top+t.scrollTop}}function $d(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Sd(r),s=t?kd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fu(1),u=Fu(0),d=Td(r);if((d||!d&&!a)&&((bd(r)!==`body`||Dd(o))&&(c=zd(r)),d)){let e=Xd(r);l=Kd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Qd(o,c):Fu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ef(e){return Array.from(e.getClientRects())}function tf(e){let t=Sd(e),n=zd(e),r=e.ownerDocument.body,i=Mu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Mu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Zd(e),s=-n.scrollTop;return Rd(r).direction===`rtl`&&(o+=Mu(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var nf=25;function rf(e,t){let n=xd(e),r=Sd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Id();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Zd(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=nf&&(a-=o)}else l<=nf&&(a+=l);return{width:a,height:o,x:s,y:c}}function af(e,t){let n=Xd(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Td(e)?Kd(e):Fu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function of(e,t,n){let r;if(t===`viewport`)r=rf(e,n);else if(t===`document`)r=tf(Sd(e));else if(wd(t))r=af(t,n);else{let n=Jd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rd(r)}function sf(e,t){let n=Bd(e);return n===t||!wd(n)||Ld(n)?!1:Rd(n).position===`fixed`||sf(n,t)}function cf(e,t){let n=t.get(e);if(n)return n;let r=Hd(e,[],!1).filter(e=>wd(e)&&bd(e)!==`body`),i=null,a=Rd(e).position===`fixed`,o=a?Bd(e):e;for(;wd(o)&&!Ld(o);){let t=Rd(o),n=Pd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Dd(o)&&!n&&sf(e,o))?r=r.filter(e=>e!==o):i=t,o=Bd(o)}return t.set(e,r),r}function lf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?kd(t)?[]:cf(t,this._c):[].concat(n),r],o=of(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=of(t,a[e],i);s=Mu(n.top,s),c=ju(n.right,c),l=ju(n.bottom,l),u=Mu(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function uf(e){let{width:t,height:n}=Wd(e);return{width:t,height:n}}function df(e,t,n){let r=Td(t),i=Sd(t),a=n===`fixed`,o=Xd(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fu(0);function l(){c.x=Zd(i)}if(r||!r&&!a)if((bd(t)!==`body`||Dd(i))&&(s=zd(t)),r){let e=Xd(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Qd(i,s):Fu(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function ff(e){return Rd(e).position===`static`}function pf(e,t){if(!Td(e)||Rd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Sd(e)===n&&(n=n.ownerDocument.body),n}function mf(e,t){let n=xd(e);if(kd(e))return n;if(!Td(e)){let t=Bd(e);for(;t&&!Ld(t);){if(wd(t)&&!ff(t))return t;t=Bd(t)}return n}let r=pf(e,t);for(;r&&Od(r)&&ff(r);)r=pf(r,t);return r&&Ld(r)&&ff(r)&&!Pd(r)?n:r||Fd(e)||n}var hf=async function(e){let t=this.getOffsetParent||mf,n=this.getDimensions,r=await n(e.floating);return{reference:df(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gf(e){return Rd(e).direction===`rtl`}var _f={convertOffsetParentRelativeRectToViewportRelativeRect:$d,getDocumentElement:Sd,getClippingRect:lf,getOffsetParent:mf,getElementRects:hf,getClientRects:ef,getDimensions:uf,getScale:Kd,isElement:wd,isRTL:gf};function vf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yf(e,t){let n=null,r,i=Sd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Pu(d),h=Pu(i.clientWidth-(u+f)),g=Pu(i.clientHeight-(d+p)),_=Pu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mu(0,ju(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!vf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function bf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Gd(e),u=i||a?[...l?Hd(l):[],...t?Hd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?yf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Xd(e):null;c&&g();function g(){let t=Xd(e);h&&!vf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xf=hd,Sf=gd,Cf=ld,wf=vd,Tf=fd,Ef=cd,Df=_d,Of=(e,t,n)=>{let r=new Map,i={platform:_f,...n},a={...i.platform,_c:r};return sd(e,t,{...i,platform:a})};function kf(e){return typeof e==`function`?e():e}function Af(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jf(e,t){let n=Af(e);return Math.round(t*n)/n}function Mf(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function Nf(e){let t=e.whileElementsMounted,n=R(()=>kf(e.open)??!0),r=R(()=>kf(e.middleware)),i=R(()=>kf(e.transform)??!0),a=R(()=>kf(e.placement)??`bottom`),o=R(()=>kf(e.strategy)??`absolute`),s=R(()=>kf(e.sideOffset)??0),c=R(()=>kf(e.alignOffset)??0),u=e.reference,d=T(0),f=T(0),p=Oo(null),m=T(F(l(o))),g=T(F(l(a))),_=T(F({})),v=T(!1),y=!1,b=0,x=R(()=>{let e=p.current?jf(p.current,l(d)):l(d),t=p.current?jf(p.current,l(f)):l(f);return l(i)?{position:l(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&Af(p.current)>=1.5&&{willChange:`transform`}}:{position:l(m),left:`${e}px`,top:`${t}px`}}),S;function C(){if(u.current===null||p.current===null)return;let e=u.current,t=p.current,i=++b;Of(e,t,{middleware:l(r),placement:l(a),strategy:l(o)}).then(r=>{if(i===b&&!(u.current!==e||p.current!==t)){if(Pf(e)){N(_,{...l(_),hide:{...l(_).hide,referenceHidden:!0}},!0);return}if(!l(n)&&l(d)!==0&&l(f)!==0){let e=Math.max(Math.abs(l(s)),Math.abs(l(c)),15);if(r.x<=e&&r.y<=e)return}N(d,r.x,!0),N(f,r.y,!0),N(m,r.strategy,!0),N(g,r.placement,!0),N(_,r.middlewareData,!0),N(v,!0)}})}function w(){typeof S==`function`&&(S(),S=void 0),b++}function ee(){if(w(),t===void 0){C();return}l(n)&&(u.current===null||p.current===null||(S=t(u.current,p.current,C)))}function te(){!l(n)&&p.current===null&&N(v,!1)}function E(){return[l(r),l(a),l(o),l(s),l(c),l(n)]}return h(()=>{t===void 0&&l(n)&&C()}),h(ee),h(()=>{if(t!==void 0){if(E(),!l(n)){y=!1;return}if(!l(v)){y=!1;return}if(!y){y=!0;return}C()}}),h(te),h(()=>w),{floating:p,reference:u,get strategy(){return l(m)},get placement(){return l(g)},get middlewareData(){return l(_)},get isPositioned(){return l(v)},get floatingStyles(){return l(x)},get update(){return C}}}function Pf(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Ff={top:`bottom`,right:`left`,bottom:`top`,left:`right`},If=new Y(`Floating.Root`),Lf=new Y(`Floating.Content`),Rf=new Y(`Floating.Root`),zf=class e{static create(t=!1){return t?Rf.set(new e):If.set(new e)}anchorNode=Oo(null);customAnchorNode=Oo(null);triggerNode=Oo(null);constructor(){h(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},Bf=class e{static create(t,n=!1){return n?Lf.set(new e(t,Rf.get())):Lf.set(new e(t,If.get()))}opts;root;contentRef=Oo(null);wrapperRef=Oo(null);arrowRef=Oo(null);contentAttachment=Z(this.contentRef);wrapperAttachment=Z(this.wrapperRef);arrowAttachment=Z(this.arrowRef);arrowId=Oo(mu());#e=R(()=>{if(typeof this.opts.style==`string`)return zo(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new os(()=>this.arrowRef.current??void 0);#r=R(()=>this.#n?.width??0);#i=R(()=>this.#n?.height??0);#a=R(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=R(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=R(()=>l(this.#o).length>0);get hasExplicitBoundaries(){return l(this.#s)}set hasExplicitBoundaries(e){N(this.#s,e)}#c=R(()=>({padding:this.opts.collisionPadding.current,boundary:l(this.#o).filter(cc),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return l(this.#c)}set detectOverflowOptions(e){N(this.#c,e)}#l=T(void 0);#u=T(void 0);#d=T(void 0);#f=T(void 0);#p=R(()=>[xf({mainAxis:this.opts.sideOffset.current+l(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Sf({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Df():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Cf({...this.detectOverflowOptions}),wf({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;N(this.#l,t,!0),N(this.#u,n,!0),N(this.#d,r,!0),N(this.#f,i,!0)}}),this.arrowRef.current&&Ef({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Uf({arrowWidth:l(this.#r),arrowHeight:l(this.#i)}),this.opts.hideWhenDetached.current&&Tf({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return l(this.#p)}set middleware(e){N(this.#p,e)}floating;#m=R(()=>Gf(this.floating.placement));get placedSide(){return l(this.#m)}set placedSide(e){N(this.#m,e)}#h=R(()=>Kf(this.floating.placement));get placedAlign(){return l(this.#h)}set placedAlign(e){N(this.#h,e)}#g=R(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return l(this.#g)}set arrowX(e){N(this.#g,e)}#_=R(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return l(this.#_)}set arrowY(e){N(this.#_,e)}#v=R(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return l(this.#v)}set cannotCenterArrow(e){N(this.#v,e)}#y=T();get contentZIndex(){return l(this.#y)}set contentZIndex(e){N(this.#y,e,!0)}#b=R(()=>Ff[this.placedSide]);get arrowBaseSide(){return l(this.#b)}set arrowBaseSide(e){N(this.#b,e)}#x=R(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${l(this.#l)}px`,"--bits-floating-available-height":`${l(this.#u)}px`,"--bits-floating-anchor-width":`${l(this.#d)}px`,"--bits-floating-anchor-height":`${l(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...l(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return l(this.#x)}set wrapperProps(e){N(this.#x,e)}#S=R(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Wo({...l(this.#e)}),...this.contentAttachment}));get props(){return l(this.#S)}set props(e){N(this.#S,e)}#C=R(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return l(this.#C)}set arrowStyle(e){N(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),X(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Nf({strategy:()=>this.opts.strategy.current,placement:()=>l(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>bf(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),h(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),X(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=Os(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),h(()=>{this.floating.floating.current=this.wrapperRef.current})}},Vf=class e{static create(t){return new e(t,Lf.get())}opts;content;constructor(e,t){this.opts=e,this.content=t}#e=R(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return l(this.#e)}set props(e){N(this.#e,e)}},Hf=class e{static create(t,n=!1){return n?new e(t,Rf.get()):new e(t,If.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=To(e.virtualEl.current):t.triggerNode=e.ref}};function Uf(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Wf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function Wf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function Gf(e){return Wf(e)[0]}function Kf(e){return Wf(e)[1]}function qf(e,t){_(t,!0);let n=S(t,`tooltip`,3,!1);zf.create(n());var i=d();r(L(i),()=>t.children??k),O(e,i),B()}var Jf=class{#e;#t=R(()=>this.#e.candidateValues());#n;constructor(e){this.#e=e,this.#n=wl(``,{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!l(this.#t).length)return;this.#n.current=this.#n.current+e;let t=this.#e.getCurrentItem(),n=l(this.#t).find(e=>e===t)??``,r=xl(l(this.#t).map(e=>e??``),this.#n.current,n),i=l(this.#t).find(e=>e===r);return i&&this.#e.onMatch(i),i}resetTypeahead(){this.#n.current=``}},Yf=[Vs,Js,Ks],Xf=[Ws,qs,`End`],Zf=[...Yf,...Xf],Qf=Bs({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),$f=new Y(`Select.Root | Combobox.Root`);new Y(`Select.Group | Combobox.Group`);var ep=new Y(`Select.Content | Combobox.Content`),tp=class{opts;#e=T(!1);get touchedInput(){return l(this.#e)}set touchedInput(e){N(this.#e,e,!0)}#t=T(null);get inputNode(){return l(this.#t)}set inputNode(e){N(this.#t,e,!0)}#n=T(null);get contentNode(){return l(this.#n)}set contentNode(e){N(this.#n,e,!0)}contentPresence;#r=T(null);get viewportNode(){return l(this.#r)}set viewportNode(e){N(this.#r,e,!0)}#i=T(null);get triggerNode(){return l(this.#i)}set triggerNode(e){N(this.#i,e,!0)}#a=T(null);get valueNode(){return l(this.#a)}set valueNode(e){N(this.#a,e,!0)}#o=T(``);get valueId(){return l(this.#o)}set valueId(e){N(this.#o,e,!0)}#s=T(null);get highlightedNode(){return l(this.#s)}set highlightedNode(e){N(this.#s,e,!0)}#c=R(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return l(this.#c)}set highlightedValue(e){N(this.#c,e)}#l=R(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return l(this.#l)}set highlightedId(e){N(this.#l,e)}#u=R(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return l(this.#u)}set highlightedLabel(e){N(this.#u,e)}#d=T(!1);get contentIsPositioned(){return l(this.#d)}set contentIsPositioned(e){N(this.#d,e,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new As(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new fc({ref:q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),e(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){!this.viewportNode||!this.contentIsPositioned||e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}getLabelForValue(e){if(e===``)return``;let t=this.opts.items.current.find(t=>t.value===e)?.label;if(t!==void 0)return t;let n=this.getNodeByValue(e);if(n){let t=n.getAttribute(`data-label`);return t!==null&&t!==``?t:n.textContent?.trim()??e}return e}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>Qf.getAttr(e,this.isCombobox?`combobox`:void 0)},np=class extends tp{opts;isMulti=!1;#e=R(()=>this.opts.value.current!==``);get hasValue(){return l(this.#e)}set hasValue(e){N(this.#e,e)}#t=R(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return l(this.#t)}set currentLabel(e){N(this.#t,e)}#n=R(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return l(this.#n)}set candidateLabels(e){N(this.#n,e)}#r=R(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return l(this.#r)}set dataTypeaheadEnabled(e){N(this.#r,e)}constructor(e){super(e),this.opts=e,h(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),X(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.opts.inputValue.current=t)}setInitialHighlightedNode(){_s(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==``){let e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},rp=class extends tp{opts;isMulti=!0;#e=R(()=>this.opts.value.current.length>0);get hasValue(){return l(this.#e)}set hasValue(e){N(this.#e,e)}constructor(e){super(e),this.opts=e,h(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),X(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=t}setInitialHighlightedNode(){_s(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==``){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},ip=class{static create(e){let{type:t,...n}=e,r=t===`single`?new np(n):new rp(n);return $f.set(r)}},ap=class e{static create(t){return new e(t,$f.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=Z(e.ref,e=>this.root.triggerNode=e),this.root.domContext=new As(e.ref),this.#e=new Tl({getCurrentItem:()=>this.root.highlightedNode,onMatch:e=>{this.root.setHighlightedNode(e)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new Jf({getCurrentItem:()=>this.root.isMulti?``:this.root.currentLabel,onMatch:e=>{if(this.root.isMulti||!this.root.opts.items.current)return;let t=this.root.opts.items.current.find(t=>t.label===e);t&&(this.root.opts.value.current=t.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#n(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#r(e){this.#n()}#i(){let e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti||(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e)?(this.root.handleClose(),!0):!1}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if((e.key===`Enter`||e.key===` `&&this.#e.search===``)&&!e.isComposing&&(e.preventDefault(),this.#i()))return;if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),Zf.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=_l(t,r,i):e.key===`ArrowUp`?a=vl(t,r,i):e.key===`PageDown`?a=yl(t,r,10,i):e.key===`PageUp`?a=bl(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}let t=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,r=e.key===` `,i=this.root.getCandidateNodes();if(e.key!==`Tab`){if(!t&&(n||r)){!this.#e.handleTypeaheadSearch(e.key,i)&&r&&(e.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType===`touch`&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose()))}#a=R(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"aria-expanded":js(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Fs(this.root.opts.open.current),"data-disabled":Ns(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:``,[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#a)}set props(e){N(this.#a,e)}},op=class e{static create(t){return ep.set(new e(t,$f.get()))}opts;root;attachment;#e=T(!1);get isPositioned(){return l(this.#e)}set isPositioned(e){N(this.#e,e,!0)}domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Z(e.ref,e=>this.root.contentNode=e),this.domContext=new As(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),ms(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),X(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),X([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=R(()=>Mf(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=R(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#n)}set snippetProps(e){N(this.#n,e)}#r=R(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":Fs(this.root.opts.open.current),...Ls(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...l(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return l(this.#r)}set props(e){N(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}},sp=class e{static create(t){return new e(t,$f.get())}opts;root;attachment;#e=R(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return l(this.#e)}set isSelected(e){N(this.#e,e)}#t=R(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return l(this.#t)}set isHighlighted(e){N(this.#t,e)}prevHighlighted=new cs(()=>this.isHighlighted);#n=T(!1);get mounted(){return l(this.#n)}set mounted(e){N(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Z(e.ref),X([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),X(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;let e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#r=R(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return l(this.#r)}set snippetProps(e){N(this.#r,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType===`touch`&&!nc){n(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=R(()=>({id:this.opts.id.current,role:`option`,"aria-selected":this.root.includesItem(this.opts.value.current)?`true`:void 0,"data-value":this.opts.value.current,"data-disabled":Ns(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?``:void 0,"data-selected":this.root.includesItem(this.opts.value.current)?``:void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#i)}set props(e){N(this.#i,e)}},cp=class e{static create(t){return new e(t,$f.get())}opts;root;#e=R(()=>this.root.opts.name.current!==``);get shouldRender(){return l(this.#e)}set shouldRender(e){N(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=R(()=>({disabled:Ps(this.root.opts.disabled.current),required:Ps(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},lp=class e{static create(t){return new e(t,ep.get())}opts;content;root;attachment;#e=T(0);get prevScrollTop(){return l(this.#e)}set prevScrollTop(e){N(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Z(e.ref,e=>{this.root.viewportNode=e})}#t=R(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},up=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=Q;#e=T(!1);get mounted(){return l(this.#e)}set mounted(e){N(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Z(e.ref),X([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),h(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=R(()=>({id:this.opts.id.current,"aria-hidden":Ms(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},dp=class e{static create(t){return new e(new up(t,ep.get()))}scrollButtonState;content;root;#e=T(!1);get canScrollDown(){return l(this.#e)}set canScrollDown(e){N(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,X([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),n(this.root.viewportNode,`scroll`,()=>this.handleScroll())}),X([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),X(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=gs(5,()=>{let e=this.root.highlightedNode;e&&this.root.scrollHighlightedNodeIntoView(e)}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;!e||!t||(e.scrollTop+=t.offsetHeight)};#t=R(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},fp=class e{static create(t){return new e(new up(t,ep.get()))}scrollButtonState;content;root;#e=T(!1);get canScrollUp(){return l(this.#e)}set canScrollUp(e){N(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,X([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),n(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=R(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}};function pp(e,t){_(t,!0);let n=S(t,`value`,15),r=cp.create({value:q(()=>n())});var i=d(),o=L(i),s=e=>{ku(e,I(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return n()},set value(e){n(e)}}))};a(o,e=>{r.shouldRender&&e(s)}),O(e,i),B()}function mp(e,t){_(t,!0);let n=S(t,`tooltip`,3,!1);Hf.create({id:q(()=>t.id),virtualEl:q(()=>t.virtualEl),ref:t.ref},n());var i=d();r(L(i),()=>t.children??k),O(e,i),B()}function hp(e,t){_(t,!0);let n=S(t,`side`,3,`bottom`),i=S(t,`sideOffset`,3,0),a=S(t,`align`,3,`center`),o=S(t,`alignOffset`,3,0),s=S(t,`arrowPadding`,3,0),c=S(t,`avoidCollisions`,3,!0),u=S(t,`collisionBoundary`,19,()=>[]),f=S(t,`collisionPadding`,3,0),p=S(t,`hideWhenDetached`,3,!1),m=S(t,`onPlaced`,3,()=>{}),h=S(t,`sticky`,3,`partial`),g=S(t,`updatePositionStrategy`,3,`optimized`),v=S(t,`strategy`,3,`fixed`),y=S(t,`dir`,3,`ltr`),b=S(t,`style`,19,()=>({})),x=S(t,`wrapperId`,19,mu),C=S(t,`customAnchor`,3,null),w=S(t,`tooltip`,3,!1),T=Bf.create({side:q(()=>n()),sideOffset:q(()=>i()),align:q(()=>a()),alignOffset:q(()=>o()),id:q(()=>t.id),arrowPadding:q(()=>s()),avoidCollisions:q(()=>c()),collisionBoundary:q(()=>u()),collisionPadding:q(()=>f()),hideWhenDetached:q(()=>p()),onPlaced:q(()=>m()),sticky:q(()=>h()),updatePositionStrategy:q(()=>g()),strategy:q(()=>v()),dir:q(()=>y()),style:q(()=>b()),enabled:q(()=>t.enabled),wrapperId:q(()=>x()),customAnchor:q(()=>C())},w()),ee=R(()=>J(T.wrapperProps,{style:{pointerEvents:`auto`}}));var te=d();r(L(te),()=>t.content??k,()=>({props:T.props,wrapperProps:l(ee)})),O(e,te),B()}function gp(e,t){_(t,!0),ie(()=>{t.onPlaced?.()});var n=d();r(L(n),()=>t.content??k,()=>({props:{},wrapperProps:{}})),O(e,n),B()}var _p=Bs({component:`separator`,parts:[`root`]}),vp=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Z(e.ref)}#e=R(()=>({id:this.opts.id.current,role:this.opts.decorative.current?`none`:`separator`,"aria-orientation":this.opts.orientation.current,"aria-hidden":Ms(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[_p.root]:``,...this.attachment}));get props(){return l(this.#e)}set props(e){N(this.#e,e)}},yp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`decorative`,`orientation`]),bp=f(`<div><!></div>`);function xp(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`decorative`,3,!1),u=S(t,`orientation`,3,`horizontal`),f=M(t,yp),p=vp.create({ref:q(()=>o(),e=>o(e)),id:q(()=>i()),decorative:q(()=>c()),orientation:q(()=>u())}),h=R(()=>J(f,p.props));var g=d(),v=L(g),y=e=>{var n=d();r(L(n),()=>t.child,()=>({props:l(h)})),O(e,n)},b=e=>{var n=bp();P(n,()=>({...l(h)})),r(E(n),()=>t.children??k),m(n),O(e,n)};a(v,e=>{t.child?e(y):e(b,-1)}),O(e,g),B()}var Sp=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function Cp(e,t){let n=S(t,`isStatic`,3,!1),r=M(t,Sp);var i=d(),o=L(i),s=e=>{gp(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=e=>{hp(e,I({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};a(o,e=>{n()?e(s):e(c,-1)}),O(e,i)}var wp=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),Tp=f(`<!> <!>`,1);function Ep(e,t){_(t,!0);let n=S(t,`interactOutsideBehavior`,3,`close`),i=S(t,`trapFocus`,3,!0),o=S(t,`isValidEvent`,3,()=>!1),s=S(t,`customAnchor`,3,null),c=S(t,`isStatic`,3,!1),u=S(t,`tooltip`,3,!1),f=S(t,`contentPointerEvents`,3,`auto`),p=M(t,wp),m=R(()=>t.preventScroll??!0),h=R(()=>t.strategy??(l(m)?`fixed`:`absolute`));Cp(e,{get isStatic(){return c()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return l(h)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return u()},content:(e,s)=>{let c=()=>s?.().props,u=()=>s?.().wrapperProps;var h=Tp(),g=L(h),_=e=>{Eu(e,{get preventScroll(){return l(m)}})},v=e=>{Eu(e,{get preventScroll(){return l(m)}})};a(g,e=>{t.forceMount&&t.enabled?e(_):t.forceMount||e(v,1)}),ou(j(g,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,i)=>{let a=()=>i?.().props;ru(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,i)=>{eu(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return o()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let i=()=>n?.().props;pu(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var o=d(),s=L(o);{let e=R(()=>({props:J(p,c(),i(),a(),{style:{pointerEvents:f()}}),wrapperProps:u()}));r(s,()=>t.popper??k,()=>l(e))}O(e,o)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),O(e,h)},$$slots:{content:!0}}),B()}var Dp=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function Op(e,t){let n=S(t,`interactOutsideBehavior`,3,`close`),r=S(t,`trapFocus`,3,!0),i=S(t,`isValidEvent`,3,()=>!1),o=S(t,`customAnchor`,3,null),s=S(t,`isStatic`,3,!1),c=M(t,Dp);var l=d(),u=L(l),f=e=>{Ep(e,I({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return s()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>c))};a(u,e=>{t.shouldRender&&e(f)}),O(e,l)}var kp=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function Ap(e,t){let n=S(t,`interactOutsideBehavior`,3,`close`),r=S(t,`trapFocus`,3,!0),i=S(t,`isValidEvent`,3,()=>!1),a=S(t,`customAnchor`,3,null),o=S(t,`isStatic`,3,!1),s=M(t,kp);Ep(e,I({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}var jp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),Mp=f(`<div><div><!></div></div>`);function Np(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`forceMount`,3,!1),u=S(t,`side`,3,`bottom`),f=S(t,`onInteractOutside`,3,Q),p=S(t,`onEscapeKeydown`,3,Q),h=S(t,`preventScroll`,3,!1),g=M(t,jp),v=op.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e)),onInteractOutside:q(()=>f()),onEscapeKeydown:q(()=>p())}),y=R(()=>J(g,v.props));var b=d(),x=L(b),C=e=>{Ap(e,I(()=>l(y),()=>v.popperProps,{get ref(){return v.opts.ref},get side(){return u()},get enabled(){return v.root.opts.open.current},get id(){return i()},get preventScroll(){return h()},forceMount:!0,get shouldRender(){return v.shouldRender},popper:(e,n)=>{let i=()=>n?.().props,o=()=>n?.().wrapperProps,s=R(()=>J(i(),{style:v.props.style},{style:t.style}));var c=d(),u=L(c),f=e=>{var n=d(),i=L(n);{let e=R(()=>({props:l(s),wrapperProps:o(),...v.snippetProps}));r(i,()=>t.child,()=>l(e))}O(e,n)},p=e=>{var n=Mp();P(n,()=>({...o()}));var i=E(n);P(i,()=>({...l(s)})),r(E(i),()=>t.children??k),m(i),m(n),O(e,n)};a(u,e=>{t.child?e(f):e(p,-1)}),O(e,c)},$$slots:{popper:!0}}))},w=e=>{Op(e,I(()=>l(y),()=>v.popperProps,{get ref(){return v.opts.ref},get side(){return u()},get open(){return v.root.opts.open.current},get id(){return i()},get preventScroll(){return h()},forceMount:!1,get shouldRender(){return v.shouldRender},popper:(e,n)=>{let i=()=>n?.().props,o=()=>n?.().wrapperProps,s=R(()=>J(i(),{style:v.props.style},{style:t.style}));var c=d(),u=L(c),f=e=>{var n=d(),i=L(n);{let e=R(()=>({props:l(s),wrapperProps:o(),...v.snippetProps}));r(i,()=>t.child,()=>l(e))}O(e,n)},p=e=>{var n=Mp();P(n,()=>({...o()}));var i=E(n);P(i,()=>({...l(s)})),r(E(i),()=>t.children??k),m(i),m(n),O(e,n)};a(u,e=>{t.child?e(f):e(p,-1)}),O(e,c)},$$slots:{popper:!0}}))};a(x,e=>{c()?e(C):c()||e(w,1)}),O(e,b),B()}function Pp(e,t){_(t,!0);let n=S(t,`mounted`,15,!1),r=S(t,`onMountedChange`,3,Q);hs(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),B()}var Fp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),Ip=f(`<div><!></div>`),Lp=f(`<!> <!>`,1);function Rp(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`label`,19,()=>t.value),u=S(t,`disabled`,3,!1),f=S(t,`onHighlight`,3,Q),p=S(t,`onUnhighlight`,3,Q),h=M(t,Fp),g=sp.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e)),value:q(()=>t.value),disabled:q(()=>u()),label:q(()=>c()),onHighlight:q(()=>f()),onUnhighlight:q(()=>p())}),v=R(()=>J(h,g.props));var y=Lp(),b=L(y),x=e=>{var n=d(),i=L(n);{let e=R(()=>({props:l(v),...g.snippetProps}));r(i,()=>t.child,()=>l(e))}O(e,n)},C=e=>{var n=Ip();P(n,()=>({...l(v)})),r(E(n),()=>t.children??k,()=>g.snippetProps),m(n),O(e,n)};a(b,e=>{t.child?e(x):e(C,-1)}),Pp(j(b,2),{get mounted(){return g.mounted},set mounted(e){g.mounted=e}}),O(e,y),B()}var zp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Bp=f(`<div><!></div>`);function Vp(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=M(t,zp),u=lp.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e))}),f=R(()=>J(c,u.props));var p=d(),h=L(p),g=e=>{var n=d();r(L(n),()=>t.child,()=>({props:l(f)})),O(e,n)},v=e=>{var n=Bp();P(n,()=>({...l(f)})),r(E(n),()=>t.children??k),m(n),O(e,n)};a(h,e=>{t.child?e(g):e(v,-1)}),O(e,p),B()}var Hp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),Up=f(`<div><!></div>`),Wp=f(`<!> <!>`,1);function Gp(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`delay`,3,()=>50),u=M(t,Hp),f=dp.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e)),delay:q(()=>c())}),p=R(()=>J(u,f.props));var h=d(),g=L(h),v=e=>{var n=Wp(),i=L(n);Pp(i,{get mounted(){return f.scrollButtonState.mounted},set mounted(e){f.scrollButtonState.mounted=e}});var o=j(i,2),s=e=>{var n=d();r(L(n),()=>t.child,()=>({props:u})),O(e,n)},c=e=>{var n=Up();P(n,()=>({...l(p)})),r(E(n),()=>t.children??k),m(n),O(e,n)};a(o,e=>{t.child?e(s):e(c,-1)}),O(e,n)};a(g,e=>{f.canScrollDown&&e(v)}),O(e,h),B()}var Kp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),qp=f(`<div><!></div>`),Jp=f(`<!> <!>`,1);function Yp(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`delay`,3,()=>50),u=M(t,Kp),f=fp.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e)),delay:q(()=>c())}),p=R(()=>J(u,f.props));var h=d(),g=L(h),v=e=>{var n=Jp(),i=L(n);Pp(i,{get mounted(){return f.scrollButtonState.mounted},set mounted(e){f.scrollButtonState.mounted=e}});var o=j(i,2),s=e=>{var n=d();r(L(n),()=>t.child,()=>({props:u})),O(e,n)},c=e=>{var n=qp();P(n,()=>({...l(p)})),r(E(n),()=>t.children??k),m(n),O(e,n)};a(o,e=>{t.child?e(s):e(c,-1)}),O(e,n)};a(g,e=>{f.canScrollUp&&e(v)}),O(e,h),B()}var Xp=f(`<!> <!>`,1);function Zp(e,t){_(t,!0);let n=S(t,`value`,15),i=S(t,`onValueChange`,3,Q),o=S(t,`name`,3,``),s=S(t,`disabled`,3,!1),c=S(t,`open`,15,!1),u=S(t,`onOpenChange`,3,Q),f=S(t,`onOpenChangeComplete`,3,Q),p=S(t,`loop`,3,!1),m=S(t,`scrollAlignment`,3,`nearest`),h=S(t,`required`,3,!1),g=S(t,`items`,19,()=>[]),v=S(t,`allowDeselect`,3,!1);function y(){n()===void 0&&n(t.type===`single`?``:[])}y(),X.pre(()=>n(),()=>{y()});let b=T(``),x=ip.create({type:t.type,value:q(()=>n(),e=>{n(e),i()(e)}),disabled:q(()=>s()),required:q(()=>h()),open:q(()=>c(),e=>{c(e),u()(e)}),loop:q(()=>p()),scrollAlignment:q(()=>m()),name:q(()=>o()),isCombobox:!1,items:q(()=>g()),allowDeselect:q(()=>v()),inputValue:q(()=>l(b),e=>N(b,e,!0)),onOpenChangeComplete:q(()=>f())});var C=Xp(),w=L(C);qf(w,{children:(e,n)=>{var i=d();r(L(i),()=>t.children??k),O(e,i)},$$slots:{default:!0}});var ee=j(w,2),te=e=>{var n=d(),r=L(n),i=e=>{pp(e,{get autocomplete(){return t.autocomplete}})},o=e=>{var n=d();z(L(n),16,()=>x.opts.value.current,e=>e,(e,n)=>{pp(e,{get value(){return n},get autocomplete(){return t.autocomplete}})}),O(e,n)};a(r,e=>{x.opts.value.current.length===0?e(i):e(o,-1)}),O(e,n)},E=R(()=>Array.isArray(x.opts.value.current)),D=e=>{pp(e,{get autocomplete(){return t.autocomplete},get value(){return x.opts.value.current},set value(e){x.opts.value.current=e}})};a(ee,e=>{l(E)?e(te):e(D,-1)}),O(e,C),B()}var Qp=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`type`]),$p=f(`<button><!></button>`);function em(e,t){let n=s();_(t,!0);let i=S(t,`id`,19,()=>pc(n)),o=S(t,`ref`,15,null),c=S(t,`type`,3,`button`),u=M(t,Qp),f=ap.create({id:q(()=>i()),ref:q(()=>o(),e=>o(e))}),p=R(()=>J(u,f.props,{type:c()}));var h=d();g(L(h),()=>mp,(e,n)=>{n(e,{get id(){return i()},get ref(){return f.opts.ref},children:(e,n)=>{var i=d(),o=L(i),s=e=>{var n=d();r(L(n),()=>t.child,()=>({props:l(p)})),O(e,n)},c=e=>{var n=$p();P(n,()=>({...l(p)})),r(E(n),()=>t.children??k),m(n),O(e,n)};a(o,e=>{t.child?e(s):e(c,-1)}),O(e,i)},$$slots:{default:!0}})}),O(e,h),B()}var tm=Bs({component:`switch`,parts:[`root`,`thumb`]}),nm=new Y(`Switch.Root`),rm=class e{static create(t){return nm.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=Z(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){!(e.key===`Enter`||e.key===` `)||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=R(()=>({"data-disabled":Ns(this.opts.disabled.current),"data-state":Is(this.opts.checked.current),"data-required":Ns(this.opts.required.current)}));get sharedProps(){return l(this.#t)}set sharedProps(e){N(this.#t,e)}#n=R(()=>({checked:this.opts.checked.current}));get snippetProps(){return l(this.#n)}set snippetProps(e){N(this.#n,e)}#r=R(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:Ps(this.opts.disabled.current),"aria-checked":Rs(this.opts.checked.current,!1),"aria-required":js(this.opts.required.current),[tm.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#r)}set props(e){N(this.#r,e)}},im=class e{static create(){return new e(nm.get())}root;#e=R(()=>this.root.opts.name.current!==void 0);get shouldRender(){return l(this.#e)}set shouldRender(e){N(this.#e,e)}constructor(e){this.root=e}#t=R(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}},am=class e{static create(t){return new e(t,nm.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Z(e.ref)}#e=R(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return l(this.#e)}set snippetProps(e){N(this.#e,e)}#t=R(()=>({...this.root.sharedProps,id:this.opts.id.current,[tm.thumb]:``,...this.attachment}));get props(){return l(this.#t)}set props(e){N(this.#t,e)}};function om(e,t){_(t,!1);let n=im.create();w();var r=d(),i=L(r),o=e=>{ku(e,I(()=>n.props))};a(i,e=>{n.shouldRender&&e(o)}),O(e,r),B()}var sm=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),cm=f(`<button><!></button>`),lm=f(`<!> <!>`,1);function um(e,t){let n=s();_(t,!0);let i=S(t,`ref`,15,null),o=S(t,`id`,19,()=>pc(n)),c=S(t,`disabled`,3,!1),u=S(t,`required`,3,!1),f=S(t,`checked`,15,!1),p=S(t,`value`,3,`on`),h=S(t,`name`,3,void 0),g=S(t,`type`,3,`button`),v=S(t,`onCheckedChange`,3,Q),y=M(t,sm),b=rm.create({checked:q(()=>f(),e=>{f(e),v()?.(e)}),disabled:q(()=>c()??!1),required:q(()=>u()),value:q(()=>p()),name:q(()=>h()),id:q(()=>o()),ref:q(()=>i(),e=>i(e))}),x=R(()=>J(y,b.props,{type:g()}));var C=lm(),w=L(C),T=e=>{var n=d(),i=L(n);{let e=R(()=>({props:l(x),...b.snippetProps}));r(i,()=>t.child,()=>l(e))}O(e,n)},ee=e=>{var n=cm();P(n,()=>({...l(x)})),r(E(n),()=>t.children??k,()=>b.snippetProps),m(n),O(e,n)};a(w,e=>{t.child?e(T):e(ee,-1)}),om(j(w,2),{}),O(e,C),B()}var dm=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),fm=f(`<span><!></span>`);function pm(e,t){let n=s();_(t,!0);let i=S(t,`ref`,15,null),o=S(t,`id`,19,()=>pc(n)),c=M(t,dm),u=am.create({id:q(()=>o()),ref:q(()=>i(),e=>i(e))}),f=R(()=>J(c,u.props));var p=d(),h=L(p),g=e=>{var n=d(),i=L(n);{let e=R(()=>({props:l(f),...u.snippetProps}));r(i,()=>t.child,()=>l(e))}O(e,n)},v=e=>{var n=fm();P(n,()=>({...l(f)})),r(E(n),()=>t.children??k,()=>u.snippetProps),m(n),O(e,n)};a(h,e=>{t.child?e(g):e(v,-1)}),O(e,p),B()}var mm=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);function hm(e,t){_(t,!0);let n=S(t,`ref`,15,null),r=S(t,`data-slot`,3,`separator`),i=M(t,mm);var a=d(),o=L(a);{let e=R(()=>G(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px`,`data-[orientation=vertical]:h-full`,t.class));g(o,()=>xp,(t,a)=>{a(t,I({get"data-slot"(){return r()},get class(){return l(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}O(e,a),B()}var gm=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`name`,`color`,`stroke`,`aria-label`]);function _m(e,t){_(t,!0);let n=S(t,`role`,3,`status`),r=S(t,`aria-label`,3,`Loading`),i=M(t,gm);{let a=R(()=>t.name===null?void 0:t.name),o=R(()=>t.color===null?void 0:t.color),s=R(()=>t.stroke===null?void 0:t.stroke),c=R(()=>G(`size-4 animate-spin`,t.class));Me(e,I({get role(){return n()},get name(){return l(a)},get color(){return l(o)},get stroke(){return l(s)},get"aria-label"(){return r()},get class(){return l(c)}},()=>i))}B()}var vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function ym(e,t){let n=M(t,vm);var r=d();g(L(r),()=>xc,(e,t)=>{t(e,I(()=>n))}),O(e,r)}var bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function xm(e,t){let n=M(t,bm),r=[[`path`,{d:`m18 15-6-6-6 6`}]];je(e,I({name:`chevron-up`},()=>n,{get iconNode(){return r}}))}var Sm=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Cm(e,t){_(t,!0);let n=S(t,`ref`,15,null),r=M(t,Sm);var i=d(),a=L(i);{let e=R(()=>G(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,t.class));g(a,()=>Yp,(t,i)=>{i(t,I({"data-slot":`select-scroll-up-button`,get class(){return l(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{xm(e,{})},$$slots:{default:!0}}))})}O(e,i),B()}var wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tm(e,t){let n=M(t,wm),r=[[`path`,{d:`m6 9 6 6 6-6`}]];je(e,I({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var Em=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Dm(e,t){_(t,!0);let n=S(t,`ref`,15,null),r=M(t,Em);var i=d(),a=L(i);{let e=R(()=>G(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,t.class));g(a,()=>Gp,(t,i)=>{i(t,I({"data-slot":`select-scroll-down-button`,get class(){return l(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{Tm(e,{})},$$slots:{default:!0}}))})}O(e,i),B()}var Om=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`portalProps`,`children`,`preventScroll`]),km=f(`<!> <!> <!>`,1);function Am(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`sideOffset`,3,4),a=S(t,`preventScroll`,3,!0),o=M(t,Om);ym(e,I(()=>t.portalProps,{children:(e,s)=>{var c=d(),u=L(c);{let e=R(()=>G(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-36 rounded-lg shadow-md ring-1 ring-foreground/10 duration-100 relative isolate z-50 overflow-x-hidden overflow-y-auto`,t.class));g(u,()=>Np,(s,c)=>{c(s,I({get sideOffset(){return i()},get preventScroll(){return a()},"data-slot":`select-content`,get class(){return l(e)}},()=>o,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=km(),a=L(i);Cm(a,{});var o=j(a,2);{let e=R(()=>G(`h-auto max-h-80 w-full min-w---bits-select-anchor-width`));g(o,()=>Vp,(n,i)=>{i(n,{get class(){return l(e)},children:(e,n)=>{var i=d();r(L(i),()=>t.children??k),O(e,i)},$$slots:{default:!0}})})}Dm(j(o,2),{}),O(e,i)},$$slots:{default:!0}}))})}O(e,c)},$$slots:{default:!0}})),B()}var jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mm(e,t){let n=M(t,jm),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];je(e,I({name:`check`},()=>n,{get iconNode(){return r}}))}var Nm=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`label`,`children`]),Pm=f(`<span class="absolute end-2 flex size-3.5 items-center justify-center"><!></span> <!>`,1);function Fm(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=M(t,Nm);var o=d(),s=L(o);{let e=(e,n)=>{let i=()=>n?.().selected,o=()=>n?.().highlighted;var s=Pm(),c=L(s),l=E(c),f=e=>{Mm(e,{class:`cn-select-item-indicator-icon`})};a(l,e=>{i()&&e(f)}),m(c);var p=j(c,2),h=e=>{var n=d();r(L(n),()=>t.children,()=>({selected:i(),highlighted:o()})),O(e,n)},g=e=>{var n=u();b(()=>ne(n,t.label||t.value)),O(e,n)};a(p,e=>{t.children?e(h):e(g,-1)}),O(e,s)},o=R(()=>G(`focus:bg-accent focus:text-accent-foreground gap-1.5 rounded-md py-2 pr-8 pl-4 text-sm [&_svg:not([class*='size-'])]:size-4 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default items-center outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,t.class));g(s,()=>Rp,(r,a)=>{a(r,I({get value(){return t.value},"data-slot":`select-item`,get class(){return l(o)}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:e,$$slots:{default:!0}}))})}O(e,o),B()}f(`<div><!></div>`);var Im=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),Lm=f(`<!> <!>`,1);function Rm(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),a=M(t,Im);var o=d(),s=L(o);{let e=R(()=>G(`border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,t.class));g(s,()=>em,(o,s)=>{s(o,I({"data-slot":`select-trigger`,get"data-size"(){return i()},get class(){return l(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=Lm(),a=L(i);r(a,()=>t.children??k),Tm(j(a,2),{class:`text-muted-foreground size-4 pointer-events-none`}),O(e,i)},$$slots:{default:!0}}))})}O(e,o),B()}var zm=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`]);function Bm(e,t){_(t,!0);let n=S(t,`open`,15,!1),r=S(t,`value`,15),i=M(t,zm);var a=d();g(L(a),()=>Zp,(e,t)=>{t(e,I(()=>i,{get open(){return n()},set open(e){n(e)},get value(){return r()},set value(e){r(e)}}))}),O(e,a),B()}var Vm=new Set([`$$slots`,`$$events`,`$$legacy`,`loading`,`disabled`,`children`]),Hm=f(`<!> <!>`,1);function Um(e,t){let n=S(t,`loading`,3,!1),i=M(t,Vm);{let o=R(()=>t.disabled||n());eo(e,I({get disabled(){return l(o)}},()=>i,{children:(e,i)=>{var o=Hm(),s=L(o),c=e=>{_m(e,{})};a(s,e=>{n()&&e(c)}),r(j(s,2),()=>t.children??k),O(e,o)},$$slots:{default:!0}}))}}var Wm=(e,t)=>{let n=`Failed to ${t??`execute`}`;if(e instanceof $t){console.error(`${n} (${e.error} - ${e.status}): ${e.message}`),Gr(n,e.message);return}console.error(`${n}: ${e}`),Gr(n,`${e}`)},Gm=async(e,t,n)=>{try{return await t()}catch(t){if(t instanceof Xr)return t.fb(),null;Wm(t,e)}return n?.(),null};export{X as $,Kl as A,Et as At,Ns as B,El as C,Xt as Ct,Gl as D,Kt as Dt,Ul as E,Wt as Et,dc as F,Ve as Ft,Ls as G,Ps as H,uc as I,ze as It,Ds as J,Z as K,ac as L,qe as Lt,pc as M,Re as Mt,Q as N,Ge as Nt,Hl as O,Gt as Ot,fc as P,He as Pt,ss as Q,sc as R,We as Rt,eu as S,vn as St,ql as T,qt as Tt,Bs as U,js as V,Fs as W,hs as X,Os as Y,ms as Z,Eu as _,qr as _t,Fm as a,Oo as at,ou as b,Wr as bt,hm as c,lo as ct,Ap as d,eo as dt,Qo as et,Op as f,Ya as ft,Mf as g,ei as gt,Vf as h,ti as ht,Rm as i,q as it,xc as j,ot as jt,Vl as k,Ut as kt,pm as l,oo as lt,qf as m,$r as mt,Um as n,J as nt,Am as o,go as ot,mp as p,G as pt,As as q,Bm as r,Bo as rt,_m as s,po as st,Gm as t,Y as tt,um as u,ro as ut,mu as v,Xr as vt,Jl as w,Qt as wt,ru as x,yn as xt,pu as y,Gr as yt,Gs as z,Ze as zt};
|