studiograph 1.3.48-next.100 → 1.3.48-next.101
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/web/_app/immutable/chunks/{CcnCwh2d2.js → -AHMljcY2.js} +1 -1
- package/dist/web/_app/immutable/chunks/0GaB4dQ5.js +1 -0
- package/dist/web/_app/immutable/chunks/0IgpLZ012.js +1 -0
- package/dist/web/_app/immutable/chunks/27dv1q5w.js +1 -0
- package/dist/web/_app/immutable/chunks/3PDoQper.js +5 -0
- package/dist/web/_app/immutable/chunks/3YEoPYQO.js +1 -0
- package/dist/web/_app/immutable/chunks/7Fzenhi02.js +1 -0
- package/dist/web/_app/immutable/chunks/7dSQwuD-.js +1 -0
- package/dist/web/_app/immutable/chunks/B-pB8JXX.js +1 -0
- package/dist/web/_app/immutable/chunks/B009GzmA.js +1 -0
- package/dist/web/_app/immutable/chunks/B1m0SwJH.js +1 -0
- package/dist/web/_app/immutable/chunks/{CzYIrvPF2.js → B4J5Pbmb2.js} +1 -1
- package/dist/web/_app/immutable/chunks/B4ksN__W.js +1 -0
- package/dist/web/_app/immutable/chunks/B4oAQIux.js +1 -0
- package/dist/web/_app/immutable/chunks/{BYac2IM72.js → B5Pq_8E62.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DyGzkSSJ2.js → B6EQXYpO2.js} +1 -1
- package/dist/web/_app/immutable/chunks/BD7uRawH.js +1 -0
- package/dist/web/_app/immutable/chunks/BDOxjpyn2.js +1 -0
- package/dist/web/_app/immutable/chunks/{DJyAFsFW.js → BG563Nwp.js} +1 -1
- package/dist/web/_app/immutable/chunks/BHN9gNId.js +1 -0
- package/dist/web/_app/immutable/chunks/{CLwoEBak.js → BLEltGYG.js} +1 -1
- package/dist/web/_app/immutable/chunks/{IgGpTJTG.js → BPbc2pr0.js} +1 -1
- package/dist/web/_app/immutable/chunks/BTeZ6jMK.js +1 -0
- package/dist/web/_app/immutable/chunks/{CglnXwFw2.js → BXcNJYac2.js} +1 -1
- package/dist/web/_app/immutable/chunks/BXmXHIkF.js +2 -0
- package/dist/web/_app/immutable/chunks/BYXe3xeI2.js +1 -0
- package/dist/web/_app/immutable/chunks/BZsFFPDE.js +1 -0
- package/dist/web/_app/immutable/chunks/B_HVQ2_W.js +1 -0
- package/dist/web/_app/immutable/chunks/BaZY72p3.js +8 -0
- package/dist/web/_app/immutable/chunks/{DmKg12YX2.js → BeXfGjTp2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{D0lk1atG2.js → BfaFBcBK2.js} +1 -1
- package/dist/web/_app/immutable/chunks/BilUNxiC.js +1 -0
- package/dist/web/_app/immutable/chunks/BjL4_nWR2.js +1 -0
- package/dist/web/_app/immutable/chunks/{DlTrN5Ec.js → BjzIJ3sP.js} +1 -1
- package/dist/web/_app/immutable/chunks/{1swuWs29.js → BopViJM2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{D-S790ZE.js → BrxevT0N.js} +1 -1
- package/dist/web/_app/immutable/chunks/Bu3SkkH1.js +1 -0
- package/dist/web/_app/immutable/chunks/BxDor5Zk2.js +1 -0
- package/dist/web/_app/immutable/chunks/BzymzYUa.js +1 -0
- package/dist/web/_app/immutable/chunks/{BFlicbeo2.js → C-PN13Eq2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{D4PsTUl1.js → C6zCOgM9.js} +1 -1
- package/dist/web/_app/immutable/chunks/C7ff_F_d.js +1 -0
- package/dist/web/_app/immutable/chunks/{DKiPBGVc2.js → C7jbDG892.js} +1 -1
- package/dist/web/_app/immutable/chunks/CCWNO1vs.js +1 -0
- package/dist/web/_app/immutable/chunks/{DY7tny6G2.js → CGVXnFiR2.js} +1 -1
- package/dist/web/_app/immutable/chunks/CHgFOdId.js +1 -0
- package/dist/web/_app/immutable/chunks/CIH9i9lK.js +1 -0
- package/dist/web/_app/immutable/chunks/CJqvwwoA.js +1 -0
- package/dist/web/_app/immutable/chunks/{DB9Ne64o2.js → CLGQZQoI2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{_kexQufO2.js → CPK9_hjX2.js} +1 -1
- package/dist/web/_app/immutable/chunks/CSj2qXzO2.js +1 -0
- package/dist/web/_app/immutable/chunks/CT0K77z4.js +6 -0
- package/dist/web/_app/immutable/chunks/{CNk9Yet7.js → CTehPOZa.js} +1 -1
- package/dist/web/_app/immutable/chunks/CZkXwWOp.js +1 -0
- package/dist/web/_app/immutable/chunks/C_7fzjum.js +1 -0
- package/dist/web/_app/immutable/chunks/{AwI-F2v72.js → C_R3LR3_2.js} +1 -1
- package/dist/web/_app/immutable/chunks/CcSUYNz5.js +1 -0
- package/dist/web/_app/immutable/chunks/CdBsxNW12.js +1 -0
- package/dist/web/_app/immutable/chunks/Ce7fDi3W2.js +1 -0
- package/dist/web/_app/immutable/chunks/CfzuHaio2.js +1 -0
- package/dist/web/_app/immutable/chunks/Ci6qx8O9.js +1 -0
- package/dist/web/_app/immutable/chunks/Co0Lvz15.js +2 -0
- package/dist/web/_app/immutable/chunks/{Yz4-RatT2.js → CoMJ5KUv.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CU0XKUqM2.js → CxO2V-4W2.js} +1 -1
- package/dist/web/_app/immutable/chunks/Cxem3pYc2.js +2 -0
- package/dist/web/_app/immutable/chunks/CxrX2Zf5.js +1 -0
- package/dist/web/_app/immutable/chunks/Cy1eWxGK2.js +1 -0
- package/dist/web/_app/immutable/chunks/{Ct8_vF46.js → CyIOloVT.js} +1 -1
- package/dist/web/_app/immutable/chunks/{4x3B4RM0.js → D0QHvg2m.js} +1 -1
- package/dist/web/_app/immutable/chunks/D0U9laQN.js +1 -0
- package/dist/web/_app/immutable/chunks/{yZ7HP41L.js → D1YPhErJ.js} +3 -3
- package/dist/web/_app/immutable/chunks/D4TC4TqB2.js +1 -0
- package/dist/web/_app/immutable/chunks/{DD9LkrkR2.js → D5PXaoT_2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BfBuflBh2.js → D8rK5Sc12.js} +1 -1
- package/dist/web/_app/immutable/chunks/{1k-LJ8Y8.js → D9pKj-1m.js} +1 -1
- package/dist/web/_app/immutable/chunks/DCWB9wkm.js +1 -0
- package/dist/web/_app/immutable/chunks/{BIPPKvNe.js → DDxJRL-b.js} +2 -2
- package/dist/web/_app/immutable/chunks/DHx1qHT_2.js +1 -0
- package/dist/web/_app/immutable/chunks/{CmerH-o-.js → DI8np54k.js} +1 -1
- package/dist/web/_app/immutable/chunks/DIc4IwPp2.js +1 -0
- package/dist/web/_app/immutable/chunks/DNltR0k1.js +1 -0
- package/dist/web/_app/immutable/chunks/DQ6t9ocy2.js +1 -0
- package/dist/web/_app/immutable/chunks/DRBx1FvJ2.js +1 -0
- package/dist/web/_app/immutable/chunks/DSq-fbqU.js +1 -0
- package/dist/web/_app/immutable/chunks/DURv4vgi.js +1 -0
- package/dist/web/_app/immutable/chunks/{DSxR0rSG.js → DY78_PZt.js} +3 -3
- package/dist/web/_app/immutable/chunks/D_JXFgBL2.js +1 -0
- package/dist/web/_app/immutable/chunks/D_ZHx38l2.js +1 -0
- package/dist/web/_app/immutable/chunks/{Vj61qC7U2.js → DfVMx0wK2.js} +1 -1
- package/dist/web/_app/immutable/chunks/DgwOYNhC.js +1 -0
- package/dist/web/_app/immutable/chunks/DiJ6dQSD.js +1 -0
- package/dist/web/_app/immutable/chunks/DipYRs1v.js +1 -0
- package/dist/web/_app/immutable/chunks/{Bn_rVH68.js → DlWMmcBp.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BGQdV0tc2.js → DmeSjDJC2.js} +1 -1
- package/dist/web/_app/immutable/chunks/Ds3Fcg3G.js +1 -0
- package/dist/web/_app/immutable/chunks/DsxEKAuW.js +1 -0
- package/dist/web/_app/immutable/chunks/DtSypVA9.js +2 -0
- package/dist/web/_app/immutable/chunks/DueZYSGq.js +1 -0
- package/dist/web/_app/immutable/chunks/{Cblzyo1K2.js → DyWrTPG_2.js} +1 -1
- package/dist/web/_app/immutable/chunks/OZVMvTVb.js +1 -0
- package/dist/web/_app/immutable/chunks/{D0J5EMib2.js → bYkM1yzM2.js} +1 -1
- package/dist/web/_app/immutable/chunks/dtUePz8k.js +1 -0
- package/dist/web/_app/immutable/chunks/{CQVGSk02.js → fJ2coDVn.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Deci1exx2.js → fqOB-bQ62.js} +1 -1
- package/dist/web/_app/immutable/chunks/{C1jMJx1E2.js → hBHlxnBN2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DVYL1nPo.js → hjhrluH6.js} +1 -1
- package/dist/web/_app/immutable/chunks/phu02Kod2.js +1 -0
- package/dist/web/_app/immutable/chunks/wlws_0AK.js +1 -0
- package/dist/web/_app/immutable/chunks/{C89AZ7wA.js → wtUbaKvx2.js} +1 -1
- package/dist/web/_app/immutable/chunks/xScoKDLi.js +1 -0
- package/dist/web/_app/immutable/entry/app.Dt6aNkWS.js +2 -0
- package/dist/web/_app/immutable/entry/start.Bs_T5AO8.js +1 -0
- package/dist/web/_app/immutable/nodes/0.C4BHG9hY.js +2 -0
- package/dist/web/_app/immutable/nodes/{1.CjP4dMBL.js → 1.kLErT1bp.js} +1 -1
- package/dist/web/_app/immutable/nodes/10.YJhOnjs5.js +1 -0
- package/dist/web/_app/immutable/nodes/11.DK9FFpGx.js +1 -0
- package/dist/web/_app/immutable/nodes/12.CYzdtN5z.js +1 -0
- package/dist/web/_app/immutable/nodes/13.Tj09hEb5.js +1 -0
- package/dist/web/_app/immutable/nodes/2.Ui2sVSYN.js +130 -0
- package/dist/web/_app/immutable/nodes/3.DDtuxckl.js +2 -0
- package/dist/web/_app/immutable/nodes/4.BZ4pGQ4O.js +11 -0
- package/dist/web/_app/immutable/nodes/{5.BC_J7pnE.js → 5.XV-mtpOk.js} +1 -1
- package/dist/web/_app/immutable/nodes/6.CIITU-Uo.js +1 -0
- package/dist/web/_app/immutable/nodes/{7.oruPLmEv.js → 7.By872XZr.js} +1 -1
- package/dist/web/_app/immutable/nodes/8.78i5wQI6.js +1 -0
- package/dist/web/_app/immutable/nodes/9.x_ib9qKA.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +27 -27
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/0YfY4WC7.js +0 -1
- package/dist/web/_app/immutable/chunks/6Ie1X7Vc2.js +0 -1
- package/dist/web/_app/immutable/chunks/8xxHULzF2.js +0 -1
- package/dist/web/_app/immutable/chunks/B6DITMtP.js +0 -1
- package/dist/web/_app/immutable/chunks/B6ueGc4A.js +0 -1
- package/dist/web/_app/immutable/chunks/BBn1oSfc.js +0 -1
- package/dist/web/_app/immutable/chunks/BTVpmOVM.js +0 -1
- package/dist/web/_app/immutable/chunks/BYILrLJK.js +0 -1
- package/dist/web/_app/immutable/chunks/BajUCO-P.js +0 -1
- package/dist/web/_app/immutable/chunks/BcByWrxh2.js +0 -1
- package/dist/web/_app/immutable/chunks/BfnyuOzG.js +0 -1
- package/dist/web/_app/immutable/chunks/BfwYWmwF.js +0 -1
- package/dist/web/_app/immutable/chunks/Bni85HMi.js +0 -8
- package/dist/web/_app/immutable/chunks/BroZXeM3.js +0 -1
- package/dist/web/_app/immutable/chunks/BsPcMDGH.js +0 -1
- package/dist/web/_app/immutable/chunks/BzwhhnBr2.js +0 -1
- package/dist/web/_app/immutable/chunks/C0j6A-ZP.js +0 -5
- package/dist/web/_app/immutable/chunks/C1t8sggk.js +0 -1
- package/dist/web/_app/immutable/chunks/C8LGXx0D.js +0 -1
- package/dist/web/_app/immutable/chunks/CLDROiPL2.js +0 -2
- package/dist/web/_app/immutable/chunks/CO8NsS3p2.js +0 -1
- package/dist/web/_app/immutable/chunks/CSI5Ok2P.js +0 -2
- package/dist/web/_app/immutable/chunks/CWky2bMb.js +0 -1
- package/dist/web/_app/immutable/chunks/Ca06pNL42.js +0 -1
- package/dist/web/_app/immutable/chunks/Cb59VtQS.js +0 -1
- package/dist/web/_app/immutable/chunks/CeHfQfUS2.js +0 -1
- package/dist/web/_app/immutable/chunks/CfL16jWX.js +0 -1
- package/dist/web/_app/immutable/chunks/Ciqeu-2O.js +0 -1
- package/dist/web/_app/immutable/chunks/CkMSCDZN.js +0 -1
- package/dist/web/_app/immutable/chunks/CnhEjUAT.js +0 -2
- package/dist/web/_app/immutable/chunks/Cqanu9ev.js +0 -1
- package/dist/web/_app/immutable/chunks/Cxg5RqVG.js +0 -1
- package/dist/web/_app/immutable/chunks/Cz9lz73i2.js +0 -1
- package/dist/web/_app/immutable/chunks/D8UWA8pA2.js +0 -1
- package/dist/web/_app/immutable/chunks/D9lVSeIS.js +0 -1
- package/dist/web/_app/immutable/chunks/DCxGAACD2.js +0 -1
- package/dist/web/_app/immutable/chunks/DFJtJ__Y.js +0 -1
- package/dist/web/_app/immutable/chunks/DM4HrWEg2.js +0 -1
- package/dist/web/_app/immutable/chunks/DO9NC64s2.js +0 -1
- package/dist/web/_app/immutable/chunks/DOky7B5T.js +0 -6
- package/dist/web/_app/immutable/chunks/DREqAq0K.js +0 -1
- package/dist/web/_app/immutable/chunks/DTopBtmz.js +0 -1
- package/dist/web/_app/immutable/chunks/DUfV89y8.js +0 -1
- package/dist/web/_app/immutable/chunks/DVm0Er6V.js +0 -1
- package/dist/web/_app/immutable/chunks/DZ9mA0KH.js +0 -1
- package/dist/web/_app/immutable/chunks/DetC8BhN2.js +0 -1
- package/dist/web/_app/immutable/chunks/DpPXoxTU.js +0 -1
- package/dist/web/_app/immutable/chunks/DqyI8W4e2.js +0 -1
- package/dist/web/_app/immutable/chunks/DxV48Rhs.js +0 -1
- package/dist/web/_app/immutable/chunks/GMUo36Tv.js +0 -1
- package/dist/web/_app/immutable/chunks/IygN8LXl2.js +0 -1
- package/dist/web/_app/immutable/chunks/Lu0f3trE2.js +0 -1
- package/dist/web/_app/immutable/chunks/M28-PWNQ.js +0 -1
- package/dist/web/_app/immutable/chunks/OJLJj9J22.js +0 -1
- package/dist/web/_app/immutable/chunks/PjBdNa5U.js +0 -1
- package/dist/web/_app/immutable/chunks/QT4tG1tY.js +0 -1
- package/dist/web/_app/immutable/chunks/ZNTdtOVo.js +0 -1
- package/dist/web/_app/immutable/chunks/_x8hB8Co.js +0 -1
- package/dist/web/_app/immutable/chunks/aTJoToLX.js +0 -1
- package/dist/web/_app/immutable/chunks/dk79wQ7p.js +0 -1
- package/dist/web/_app/immutable/chunks/fPcnaq1h.js +0 -1
- package/dist/web/_app/immutable/chunks/j3VMRteR.js +0 -2
- package/dist/web/_app/immutable/chunks/k8Pka4vk.js +0 -1
- package/dist/web/_app/immutable/chunks/kp7D74fM2.js +0 -1
- package/dist/web/_app/immutable/chunks/oAeTZdnE.js +0 -1
- package/dist/web/_app/immutable/chunks/oTtTtXgi.js +0 -1
- package/dist/web/_app/immutable/chunks/uMXHPqgW2.js +0 -1
- package/dist/web/_app/immutable/entry/app.Dn9XyTGH.js +0 -2
- package/dist/web/_app/immutable/entry/start.CCkikkiR.js +0 -1
- package/dist/web/_app/immutable/nodes/0.CINT8old.js +0 -2
- package/dist/web/_app/immutable/nodes/10.DXFKYija.js +0 -1
- package/dist/web/_app/immutable/nodes/11.DcUkHEqc.js +0 -1
- package/dist/web/_app/immutable/nodes/12.DkECNIxo.js +0 -1
- package/dist/web/_app/immutable/nodes/13.BDxAM4lD.js +0 -1
- package/dist/web/_app/immutable/nodes/2.B8LmljrK.js +0 -130
- package/dist/web/_app/immutable/nodes/3.Vbl4t1C-.js +0 -2
- package/dist/web/_app/immutable/nodes/4.hnHG6JoS.js +0 -11
- package/dist/web/_app/immutable/nodes/6.y25hE-n2.js +0 -1
- package/dist/web/_app/immutable/nodes/8.D-qE5tLz.js +0 -1
- package/dist/web/_app/immutable/nodes/9.CZWvjcUM.js +0 -1
- /package/dist/web/_app/immutable/chunks/{DUoaAlBS.js → BreAJCzD.js} +0 -0
- /package/dist/web/_app/immutable/chunks/{B-bHt83e.js → BsXOylgK.js} +0 -0
- /package/dist/web/_app/immutable/chunks/{Bq4V4cTS2.js → CbVWlLYp2.js} +0 -0
- /package/dist/web/_app/immutable/chunks/{BMa9zwUU.js → DNu4c-6_.js} +0 -0
- /package/dist/web/_app/immutable/chunks/{DnK9s4gC.js → jTSPYxA6.js} +0 -0
- /package/dist/web/_app/immutable/chunks/{BFEF4lmd2.js → zso4BhDH2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,G as n,K as r,L as i,M as a,N as o,Q as s,R as c,X as l,Z as u,ct as d,d as f,dt as p,f as m,it as h,lt as ee,nt as te,p as ne,q as g,rt as _,s as re,ut as v,x as ie}from"./
|
|
1
|
+
import{$ as e,A as t,G as n,K as r,L as i,M as a,N as o,Q as s,R as c,X as l,Z as u,ct as d,d as f,dt as p,f as m,it as h,lt as ee,nt as te,p as ne,q as g,rt as _,s as re,ut as v,x as ie}from"./CbVWlLYp2.js";import{D as ae,L as oe,O as se,_ as y,g as ce,i as le,n as ue,r as de,s as fe,t as pe,u as b,w as me}from"./B4J5Pbmb2.js";import{F as x,n as he}from"./fqOB-bQ62.js";var S=[];p.handleByNamedList(v.Environment,S);async function C(e){if(!e)for(let e=0;e<S.length;e++){let t=S[e];if(t.value.test()){await t.value.load();return}}}async function ge(e){return C(!e)}var w;function _e(){if(typeof w==`boolean`)return w;try{w=Function(`param1`,`param2`,`param3`,`return param1[param2] === param3;`)({a:`b`},`a`,`b`)===!0}catch{w=!1}return w}var T=(e=>(e[e.NONE=0]=`NONE`,e[e.COLOR=16384]=`COLOR`,e[e.STENCIL=1024]=`STENCIL`,e[e.DEPTH=256]=`DEPTH`,e[e.COLOR_DEPTH=16640]=`COLOR_DEPTH`,e[e.COLOR_STENCIL=17408]=`COLOR_STENCIL`,e[e.DEPTH_STENCIL=1280]=`DEPTH_STENCIL`,e[e.ALL=17664]=`ALL`,e))(T||{}),E=class{constructor(e){this.items=[],this._name=e}emit(e,t,n,r,i,a,o,s){let{name:c,items:l}=this;for(let u=0,d=l.length;u<d;u++)l[u][c](e,t,n,r,i,a,o,s);return this}add(e){return e[this._name]&&(this.remove(e),this.items.push(e)),this}remove(e){let t=this.items.indexOf(e);return t!==-1&&this.items.splice(t,1),this}contains(e){return this.items.indexOf(e)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}},ve=[`init`,`destroy`,`contextChange`,`resolutionChange`,`resetState`,`renderEnd`,`renderStart`,`render`,`update`,`postrender`,`prerender`],ye=class t extends ee{constructor(e){super(),this.tick=0,this.uid=te(`renderer`),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=e.type,this.name=e.name,this.config=e;let t=[...ve,...this.config.runners??[]];this._addRunners(...t),this._unsafeEvalCheck()}async init(e={}){await C(e.skipExtensionImports===!0?!0:e.manageImports===!1),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(let t in this._systemsHash)e={...this._systemsHash[t].constructor.defaultOptions,...e};e={...t.defaultOptions,...e},this._roundPixels=+!!e.roundPixels;for(let t=0;t<this.runners.init.items.length;t++)await this.runners.init.items[t].init(e);this._initOptions=e}render(t,n){this.tick++;let r=t;if(r instanceof b&&(r={container:r},n&&(s(e,`passing a second argument is deprecated, please use render options instead`),r.target=n.renderTexture)),r.target||=this.view.renderTarget,r.target===this.view.renderTarget&&(this._lastObjectRendered=r.container,r.clearColor??=this.background.colorRgba,r.clear??=this.background.clearBeforeRender),r.clearColor){let e=Array.isArray(r.clearColor)&&r.clearColor.length===4;r.clearColor=e?r.clearColor:d.shared.setValue(r.clearColor).toArray()}r.transform||(r.container.updateLocalTransform(),r.transform=r.container.localTransform),r.container.visible&&(r.container.enableRenderGroup(),this.runners.prerender.emit(r),this.runners.renderStart.emit(r),this.runners.render.emit(r),this.runners.renderEnd.emit(r),this.runners.postrender.emit(r))}resize(e,t,n){let r=this.view.resolution;this.view.resize(e,t,n),this.emit(`resize`,this.view.screen.width,this.view.screen.height,this.view.resolution),n!==void 0&&n!==r&&this.runners.resolutionChange.emit(n)}clear(e={}){let t=this;e.target||=t.renderTarget.renderTarget,e.clearColor||=this.background.colorRgba,e.clear??=T.ALL;let{clear:n,clearColor:r,target:i,mipLevel:a,layer:o}=e;d.shared.setValue(r??this.background.colorRgba),t.renderTarget.clear(i,n,d.shared.toArray(),a??0,o??0)}get resolution(){return this.view.resolution}set resolution(e){this.view.resolution=e,this.runners.resolutionChange.emit(e)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...e){e.forEach(e=>{this.runners[e]=new E(e)})}_addSystems(e){let t;for(t in e){let n=e[t];this._addSystem(n.value,n.name)}}_addSystem(e,t){let n=new e(this);if(this[t])throw Error(`Whoops! The name "${t}" is already in use`);this[t]=n,this._systemsHash[t]=n;for(let e in this.runners)this.runners[e].add(n);return this}_addPipes(e,t){let n=t.reduce((e,t)=>(e[t.name]=t.value,e),{});e.forEach(e=>{let t=e.value,r=e.name,i=n[r];this.renderPipes[r]=new t(this,i?new i:null),this.runners.destroy.add(this.renderPipes[r])})}destroy(e=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(e),(e===!0||typeof e==`object`&&e.releaseGlobalResources)&&l.release(),Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(e){return this.textureGenerator.generateTexture(e)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!_e())throw Error(`Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.`)}resetState(){this.runners.resetState.emit()}};ye.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};var be=ye,xe=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,D=`8.18.1`,Se=class{static init(){globalThis.__PIXI_APP_INIT__?.(this,D)}static destroy(){}};Se.extension=v.Application;var O=class{constructor(e){this._renderer=e}init(){globalThis.__PIXI_RENDERER_INIT__?.(this._renderer,D)}destroy(){this._renderer=null}};O.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:`initHook`,priority:-10};var Ce=`in vec2 vMaskCoord;
|
|
2
2
|
in vec2 vTextureCoord;
|
|
3
3
|
|
|
4
4
|
uniform sampler2D uTexture;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,Bt as t,F as n,L as r,N as i,Nt as a,Pt as o,Vt as s,X as c,Y as l,_t as u,a as d,at as f,ft as p,g as m,it as h,o as g,ot as _,u as v,vt as y}from"./BopViJM2.js";import"./t62M88qj.js";import"./27dv1q5w.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"></path></svg>`);function S(e,S){let C=d(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=d(C,[`size`,`title`]);o(S,!1);let T=u(),E=u(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);h(()=>(l(C),l(O())),()=>{y(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),h(()=>(c(T),l(C)),()=>{y(E,{"aria-hidden":c(T)?void 0:!0,role:c(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),f(),v();var k=x();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:D(),height:D(),...c(E),...w}));var A=p(k),j=e=>{var t=b(),i=p(t,!0);s(t),_(()=>n(i,O())),r(e,t)};i(A,e=>{O()&&e(j)}),t(),s(k),r(e,k),a()}export{S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,L as t,Nt as n,Pt as r,U as i,W as a,X as o,bt as s,ht as c,o as l,ot as u,v as d,vt as f,x as p,xt as m,z as h}from"./BopViJM2.js";import"./t62M88qj.js";import{t as g}from"./Ttel-lK0.js";import{t as _}from"./C6zCOgM9.js";import{t as v}from"./DY78_PZt.js";function y(){let e=s(null);return{get folder(){return o(e)},open(t){f(e,t,!0)},close(){f(e,null)}}}var b=y(),x=h(`<div></div>`);function S(e,i){r(i,!0);let c=s(!1),l=0;function d(e){e.preventDefault(),f(c,!0),l=e.clientX,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,window.addEventListener(`mousemove`,m),window.addEventListener(`mouseup`,h)}function m(e){let t=i.side===`right`?e.clientX-l:l-e.clientX;l=e.clientX,i.onresize(t)}function h(){f(c,!1),document.body.style.cursor=``,document.body.style.userSelect=``,window.removeEventListener(`mousemove`,m),window.removeEventListener(`mouseup`,h)}var g=x();let _;u(()=>_=p(g,1,`resize-handle svelte-tfh9g9`,null,_,{left:i.side===`left`,right:i.side===`right`,active:o(c)})),a(`mousedown`,g,d),a(`dblclick`,g,function(...e){i.ondblclick?.apply(this,e)}),t(e,g),n()}i([`mousedown`,`dblclick`]);async function C(e,t){let n=new URLSearchParams;t?.before&&n.set(`before`,String(t.before)),t?.limit&&n.set(`limit`,String(t.limit));let r=n.toString(),{messages:i}=await g(`/api/messages/${encodeURIComponent(e)}${r?`?${r}`:``}`);return i}async function w(e,t,n){let r={content:t};n!=null&&(r.replyToMessageId=n);let{message:i}=await g(`/api/messages/${encodeURIComponent(e)}`,{method:`POST`,body:JSON.stringify(r)});return i}async function T(e,t){await g(`/api/messages/${encodeURIComponent(e)}/read`,{method:`POST`,body:JSON.stringify({messageId:t})})}async function E(){return g(`/api/messages/unread`)}async function D(e){let t=new URLSearchParams;e?.before&&t.set(`before`,String(e.before)),e?.limit&&t.set(`limit`,String(e.limit));let n=t.toString(),{messages:r}=await g(`/api/messages/workspace${n?`?${n}`:``}`);return r}async function O(e,t){let n={content:e};t!=null&&(n.replyToMessageId=t);let{message:r}=await g(`/api/messages/workspace`,{method:`POST`,body:JSON.stringify(n)});return r}async function k(e){await g(`/api/messages/workspace/read`,{method:`POST`,body:JSON.stringify({messageId:e})})}async function A(e,t,n,r){return g(`/api/messages/${encodeURIComponent(e)}/capture`,{method:`POST`,body:JSON.stringify({entityType:t,entityId:n,messageId:r})})}async function ee(e){let{scope:t,folder:n,repo:r,entityType:i,entityId:a,messageId:o}=e;return g(t===`workspace`?`/api/messages/workspace/undo-capture`:`/api/messages/${encodeURIComponent(n)}/undo-capture`,{method:`POST`,body:JSON.stringify(t===`workspace`?{repo:r,entityType:i,entityId:a,messageId:o}:{entityType:i,entityId:a,messageId:o})})}var j=new Map,M=s(0),N=[],P=!1,F=s(0),I=s(0),L=s(!1),R=null,z=new Map,B=s(c({})),V=s(c(new Set)),H=new Map,U=12e4;function W(e){o(M);let t=j.get(e);return t?[...t].reverse():[]}async function G(e){let t=await C(e,{limit:50});j.set(e,t),z.set(e,t.length===50),m(M)}async function K(e){let t=j.get(e);if(!t||t.length===0)return!1;let n=t[t.length-1],r=await C(e,{before:n.id,limit:50});return r.length>0?(t.push(...r),z.set(e,r.length===50),m(M)):z.set(e,!1),r.length>0}async function q(e,t,n){let r=await w(e,t,n),i=j.get(e);return i?i.some(e=>e.id===r.id)||i.unshift(r):j.set(e,[r]),m(M),r}function J(e,t){let n=j.get(e);n&&(n.some(e=>e.id===t.id)||(n.unshift(t),m(M))),t.role===`agent`&&Q(e,!1);let r=_.user?.id??-1;t.userId!==r&&f(B,{...o(B),[e]:(o(B)[e]??0)+1},!0)}async function Y(e){let t=j.get(e);if(!t||t.length===0)return;let n=t[0].id;if(await T(e,n),o(B)[e]){let{[e]:t,...n}=o(B);f(B,n,!0)}}async function X(){let{unread:e,workspace:t}=await E();f(B,e,!0),f(I,t,!0)}function Z(e){return z.get(e)??!1}function Q(e,t){let n=H.get(e);n&&(clearTimeout(n),H.delete(e));let r=new Set(o(V));if(t){r.add(e);let t=setTimeout(()=>{H.delete(e);let t=new Set(o(V));t.delete(e),f(V,t,!0)},U);H.set(e,t)}else r.delete(e);f(V,r,!0)}function te(e){return o(V),o(V).has(e)}function ne(){return o(F),[...N].reverse()}async function re(){let e=await D({limit:50});N=e,P=e.length===50,m(F)}async function ie(){if(N.length===0)return!1;let e=N[N.length-1],t=await D({before:e.id,limit:50});return t.length>0?(N.push(...t),P=t.length===50,m(F)):P=!1,t.length>0}async function ae(e,t){let n=await O(e,t);return N.some(e=>e.id===n.id)||(N.unshift(n),m(F)),n}function oe(e){N.some(t=>t.id===e.id)||(N.unshift(e),m(F)),e.role===`agent`&&$(!1);let t=_.user?.id??-1;e.userId!==t&&f(I,o(I)+1)}async function se(){if(N.length===0)return;let e=N[0].id;await k(e),f(I,0)}function ce(){return P}function $(e){R&&=(clearTimeout(R),null),f(L,e,!0),e&&(R=setTimeout(()=>{f(L,!1),R=null},U))}v.setMessagesHandler(e=>{J(e.repo,e.message)}),v.setMessageUpdateHandler(e=>{let t=j.get(e.repo);if(!t)return;let n=t.findIndex(t=>t.id===e.messageId);n!==-1&&(t[n]={...t[n],content:e.content},m(M))}),v.setAgentThinkingHandler(e=>{Q(e.repo,e.thinking)}),v.setWorkspaceMessagesHandler(e=>{oe(e.message)}),v.setWorkspaceMessageUpdateHandler(e=>{let t=N.findIndex(t=>t.id===e.messageId);t!==-1&&(N[t]={...N[t],content:e.content},m(F))}),v.setWorkspaceAgentThinkingHandler(e=>{$(e.thinking)}),v.addConnectHandler(()=>{X()});var le={getMessages:W,loadMessages:G,loadMore:K,send:q,receiveMessage:J,markAsRead:Y,refreshUnread:X,canLoadMore:Z,isThinking:te,get unreadCounts(){return o(B)},getWorkspaceMessages:ne,loadWorkspaceMessages:re,loadMoreWorkspace:ie,sendWorkspace:ae,markWorkspaceAsRead:se,canLoadMoreWorkspace:ce,get workspaceUnread(){return o(I)},get workspaceThinking(){return o(L)}},ue=e(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0 C12 7.5 7.5 12 0 12 C7.5 12 12 16.5 12 24 C12 16.5 16.5 12 24 12 C16.5 12 12 7.5 12 0 Z"></path></svg>`);function de(e,n){let r=l(n,`size`,3,16);var i=ue();u(()=>{d(i,`width`,r()),d(i,`height`,r()),d(i,`aria-hidden`,n.title?void 0:!0),d(i,`role`,n.title?`img`:void 0),d(i,`aria-label`,n.title)}),t(e,i)}async function fe(e){return g(`/api/notifications${e?.unreadOnly?`?unreadOnly=true`:``}`)}async function pe(e){await g(`/api/notifications/${e}/read`,{method:`POST`})}async function me(){await g(`/api/notifications/read-all`,{method:`POST`})}async function he(){let{users:e}=await g(`/api/users`);return e}export{de as a,ee as c,pe as i,S as l,fe as n,le as o,me as r,A as s,he as t,b as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{zt as e}from"./BopViJM2.js";e();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{$ as e,At as t,C as n,Ct as r,Ft as i,I as a,J as o,K as s,L as c,M as l,Mt as u,N as d,Nt as f,O as p,P as ee,Pt as m,Q as h,R as g,Ut as _,X as v,bt as y,ct as te,ht as b,jt as ne,o as x,pt as S,rt as re,st as C,vt as w,wt as ie}from"./BopViJM2.js";import"./t62M88qj.js";import{t as ae}from"./Ds3Fcg3G.js";function oe(e){return typeof e==`function`}function T(e){return typeof e==`object`&&!!e}var se=[`string`,`number`,`bigint`,`boolean`];function ce(e){return e==null||se.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>ce(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var E=Symbol(`box`),le=Symbol(`is-writable`);function D(e,t){let n=r(e);return t?{[E]:!0,[le]:!0,get current(){return v(n)},set current(e){t(e)}}:{[E]:!0,get current(){return e()}}}function O(e){return T(e)&&E in e}function ue(e){return O(e)&&le in e}function de(e){return O(e)?e:oe(e)?D(e):me(e)}function fe(e){return Object.entries(e).reduce((e,[t,n])=>O(n)?(ue(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 pe(e){return ue(e)?{[E]:!0,get current(){return e.current}}:e}function me(e){let t=y(b(e));return{[E]:!0,[le]:!0,get current(){return v(t)},set current(e){w(t,e,!0)}}}function k(e){let t=y(b(e));return{[E]:!0,[le]:!0,get current(){return v(t)},set current(e){w(t,e,!0)}}}k.from=de,k.with=D,k.flatten=fe,k.readonly=pe,k.isBox=O,k.isWritableBox=ue;function he(...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 ge=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_e=/\n/g,ve=/^\s*/,ye=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,be=/^:\s*/,xe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Se=/^[;\s]*/,Ce=/^\s+|\s+$/g,we=`
|
|
2
|
+
`,Te=`/`,Ee=`*`,A=``,De=`comment`,Oe=`declaration`;function ke(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(_e);t&&(n+=t.length);var i=e.lastIndexOf(we);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(ve)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(Te!=e.charAt(0)||Ee!=e.charAt(1))){for(var n=2;A!=e.charAt(n)&&(Ee!=e.charAt(n)||Te!=e.charAt(n+1));)++n;if(n+=2,A===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:De,comment:o})}}function f(){var e=a(),t=c(ye);if(t){if(d(),!c(be))return s(`property missing ':'`);var n=c(xe),r=e({type:Oe,property:Ae(t[0].replace(ge,A)),value:n?Ae(n[0].replace(ge,A)):A});return c(Se),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 Ae(e){return e?e.replace(Ce,A):A}function je(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=ke(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 Me=/\d/,Ne=[`-`,`_`,`/`,`.`];function Pe(e=``){if(!Me.test(e))return e!==e.toLowerCase()}function Fe(e){let t=[],n=``,r,i;for(let a of e){let e=Ne.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Pe(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 Ie(e){return e?Fe(e).map(e=>Re(e)).join(``):``}function Le(e){return ze(Ie(e||``))}function Re(e){return e?e[0].toUpperCase()+e.slice(1):``}function ze(e){return e?e[0].toLowerCase()+e.slice(1):``}function j(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Ie(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Le(e)]=n}return je(e,n),t}function M(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Be(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 Ve=Be(/[A-Z]/,e=>`-${e.toLowerCase()}`);function He(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=>`${Ve(t)}: ${e[t]};`).join(`
|
|
3
|
+
`)}function Ue(e={}){return He(e).replace(`
|
|
4
|
+
`,` `)}var We=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 Ge(e){return We.has(e)}function Ke(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let i=e[r];if(i){for(let e of Object.keys(i)){let r=t[e],a=i[e],o=typeof r==`function`,s=typeof a==`function`;if(o&&typeof s&&Ge(e))t[e]=he(r,a);else if(o&&s)t[e]=M(r,a);else if(e===`class`){let i=ce(r),o=ce(a);i&&o?t[e]=n(r,a):i?t[e]=n(r):o&&(t[e]=n(a))}else if(e===`style`){let n=typeof r==`object`,i=typeof a==`object`,o=typeof r==`string`,s=typeof a==`string`;if(n&&i)t[e]={...r,...a};else if(n&&s){let n=j(a);t[e]={...r,...n}}else if(o&&i)t[e]={...j(r),...a};else if(o&&s){let n=j(r),i=j(a);t[e]={...n,...i}}else n?t[e]=r:i?t[e]=a:o?t[e]=r:s&&(t[e]=a)}else t[e]=a===void 0?r:a}for(let e of Object.getOwnPropertySymbols(i)){let n=t[e],r=i[e];t[e]=r===void 0?n:r}}}return typeof t.style==`object`&&(t.style=Ue(t.style).replaceAll(`
|
|
5
|
+
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var qe=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Je(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=qe,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=ie(e=>{let n=s(t,`focusin`,e),r=s(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Je(this.#e):null}};function Ye(e){return typeof e==`function`}var N=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return u(this.#t)}get(){let e=ne(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=ne(this.#t);return t===void 0?e:t}set(e){return i(this.#t,e)}};function Xe(e,t){switch(e){case`post`:C(t);break;case`pre`:te(t);break}}function Ze(t,n,r,i={}){let{lazy:a=!1}=i,o=!a,s=Array.isArray(t)?[]:void 0;Xe(n,()=>{let n=Array.isArray(t)?t.map(e=>e()):t();if(!o){o=!0,s=n;return}let i=e(()=>r(n,s));return s=n,i})}function Qe(e,t,n){let r=re(()=>{let i=!1;Ze(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});C(()=>r)}function P(e,t,n){Ze(e,`post`,t,n)}function $e(e,t,n){Ze(e,`pre`,t,n)}P.pre=$e;function et(e,t){Qe(e,`post`,t)}function tt(e,t){Qe(e,`pre`,t)}et.pre=tt;function nt(e){return Ye(e)?e():e}var rt=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=r(()=>(v(this.#s)?.(),this.getSize().width));#o=r(()=>(v(this.#s)?.(),this.getSize().height));#s=r(()=>{let e=nt(this.#r);if(e)return ie(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??qe,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=nt(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 v(this.#s)?.(),this.getSize()}get width(){return v(this.#a)}get height(){return v(this.#o)}},it=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 v(this.#t)}};function at(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 ot(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 st(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=y(b(o)),u=y(!1),d=y(void 0),f=y(b([])),p=()=>{v(f).forEach(e=>e()),w(f,[],!0)},ee=e=>{w(f,[...v(f),e],!0)},m=async(e,n,r=!1)=>{try{w(u,!0),w(d,void 0),p();let i=new AbortController;ee(()=>i.abort());let a=await t(e,n,{data:v(l),refetching:r,onCleanup:ee,signal:i.signal});return w(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||w(d,e,!0);return}finally{w(u,!1)}},h=s?at(m,s):c?ot(m,c):m,g=Array.isArray(e)?e:[e],_;return r((t,n)=>{a&&_||(_=t,h(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return v(l)},get loading(){return v(u)},get error(){return v(d)},mutate:e=>{w(l,e,!0)},refetch:t=>{let n=g.map(e=>e());return h(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function ct(e,t,n){return st(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];P(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function lt(e,t,n){return st(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];P.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}ct.pre=lt;function F(e){C(()=>()=>{e()})}function ut(e,t){return setTimeout(t,e)}function I(e){h().then(e)}var dt=1,ft=9,pt=11;function mt(e){return T(e)&&e.nodeType===dt&&typeof e.nodeName==`string`}function ht(e){return T(e)&&e.nodeType===ft}function gt(e){return T(e)&&e.constructor?.name===`VisualViewport`}function _t(e){return T(e)&&e.nodeType!==void 0}function vt(e){return _t(e)&&e.nodeType===pt&&`host`in e}function yt(e,t){if(!e||!t||!mt(e)||!mt(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&vt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function L(e){return ht(e)?e:gt(e)?e.document:e?.ownerDocument??document}function bt(e){return vt(e)?bt(e.host):ht(e)?e.defaultView??window:mt(e)?e.ownerDocument?.defaultView??window:window}function xt(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var R=class{element;#e=r(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return v(this.#e)}set root(e){w(this.#e,e)}constructor(e){typeof e==`function`?this.element=D(e):this.element=e}getDocument=()=>L(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>xt(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(t,n){return{[o()]:r=>O(t)?(t.current=r,e(()=>n?.(r)),()=>{`isConnected`in r&&r.isConnected||(t.current=null,n?.(null))}):(t(r),e(()=>n?.(r)),()=>{`isConnected`in r&&r.isConnected||(t(null),n?.(null))})}}function St(e){return e?`true`:`false`}function Ct(e){return e?`true`:void 0}function wt(e){return e?``:void 0}function Tt(e){return e?!0:void 0}function Et(e){return e?`open`:`closed`}function Dt(e){return e?`checked`:`unchecked`}function Ot(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function kt(e,t){return t?`mixed`:e?`true`:`false`}var At=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 jt(e){let t=new At(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var B=`ArrowDown`,V=`ArrowLeft`,H=`ArrowRight`,U=`ArrowUp`,Mt=`Backspace`,Nt=`CapsLock`,Pt=`Control`,Ft=`Enter`,It=`Escape`,Lt=`Home`,Rt=`Meta`,zt=`PageDown`,Bt=`PageUp`,Vt=`Shift`;function Ht(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Ut=[B,Bt,Lt],Wt=[U,zt,`End`];[...Ut,...Wt];function Gt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?V:H,vertical:B}[t]}function Kt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?H:V,vertical:U}[t]}function qt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Gt(e,t),prevKey:Kt(e,t)}}var Jt=typeof document<`u`,Yt=Xt();function Xt(){return Jt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function W(e){return e instanceof HTMLElement}function G(e){return e instanceof Element}function Zt(e){return e instanceof Element||e instanceof SVGElement}function Qt(e){return e.pointerType===`touch`}function $t(e){return e!==null}function en(e){return e instanceof HTMLInputElement&&`select`in e}var tn=class{#e;#t=k(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}=qt(Ht(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Lt]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?H:B,t=s===`ArrowUp`?V:U;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||!W(t)||t.focus()}},nn=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,F(()=>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?I(t):t()}},rn=class{#e;#t;#n;#r=y(!1);#i=y(void 0);#a=!1;#o=null;constructor(e){this.#e=e,w(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new nn({ref:this.#e.ref,afterTick:this.#e.open}),F(()=>this.#s()),P(()=>this.#e.open.current,e=>{if(!this.#a){this.#a=!0;return}if(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()){w(this.#r,!1),w(this.#i,void 0),this.#e.onComplete?.();return}if(e&&w(this.#r,!0),w(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&w(this.#i,void 0)})),!this.#t){e||w(this.#r,!1),w(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||w(this.#r,!1),w(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return v(this.#r)}get transitionStatus(){return v(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function K(){}function an(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function on(e,t){var n=g();l(S(n),()=>t.children,e=>{var n=g();p(S(n),()=>t.children??_),c(e,n)}),c(e,n)}var sn=new N(`BitsConfig`);function cn(){let e=new ln(null,{});return sn.getOr(e).opts}var ln=class{opts;constructor(e,t){let n=un(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function un(e,t){return n=>D(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function dn(e,t){return n=>{let r=cn();return D(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var fn=dn(e=>e.defaultLocale,`en`),pn=dn(e=>e.defaultPortalTo,`body`);function mn(e,n){m(n,!0);let i=pn(()=>n.to),o=t(),s=r(l);function l(){if(!Jt||n.disabled)return null;let e=null;return e=typeof i.current==`string`?document.querySelector(i.current):i.current,e}let u;function h(){u&&=(a(u),null)}P([()=>v(s),()=>n.disabled],([e,t])=>{if(!e||t){h();return}return u=ee(on,{target:e,props:{children:n.children},context:o}),()=>{h()}});var y=g(),te=S(y),b=e=>{var t=g();p(S(t),()=>n.children??_),c(e,t)};d(te,e=>{n.disabled&&e(b)}),c(e,y),f()}var hn=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,n){return s(e,this.eventName,e=>{t(e)},n)}};function gn(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 _n(e,t){return e===t||e.contains(t)}function vn(e){return e?.ownerDocument??document}function yn(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 bn=[Ft,` `],xn=[B,Bt,Lt],Sn=[U,zt,`End`],Cn=[...xn,...Sn],wn={ltr:[...bn,H],rtl:[...bn,V]},Tn={ltr:[V],rtl:[H]};function q(e){return e.pointerType===`mouse`}function En(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=L(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&en(e)&&t&&e.select()}function Dn(e,{select:t=!1}={},n){let r=n();for(let i of e)if(En(i,{select:t}),n()!==r)return!0}var J=y(!1),On=class e{static _refs=0;static _cleanup;constructor(){C(()=>(e._refs===0&&(e._cleanup=re(()=>{let e=[],t=e=>{w(J,!1)};return e.push(s(document,`pointerdown`,t,{capture:!0}),s(document,`pointermove`,t,{capture:!0}),s(document,`keydown`,e=>{w(J,!0)},{capture:!0})),M(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(w(J,!1),e._cleanup?.())}))}get current(){return v(J)}set current(e){w(J,e,!0)}},kn=[`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] *)`],An=kn.join(`,`),jn=typeof Element>`u`,Y=jn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mn=!jn&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Nn=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]`):Nn(e.parentNode))},Pn=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Fn=function(e,t,n){if(Nn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(An));return t&&Y.call(e,An)&&r.unshift(e),r=r.filter(n),r},In=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Nn(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=In(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Y.call(a,An)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Nn(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=In(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},Ln=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Rn=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Pn(e))&&!Ln(e)?0:e.tabIndex},zn=function(e,t){var n=Rn(e);return n<0&&t&&!Ln(e)?0:n},Bn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Vn=function(e){return e.tagName===`INPUT`},Hn=function(e){return Vn(e)&&e.type===`hidden`},Un=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Wn=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Gn=function(e){if(!e.name)return!0;var t=e.form||Mn(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=Wn(r,e.form);return!i||i===e},Kn=function(e){return Vn(e)&&e.type===`radio`},qn=function(e){return Kn(e)&&!Gn(e)},Jn=function(e){var t=e&&Mn(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=Mn(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},Yn=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Xn=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=Y.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Y.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=Mn(e);if(o&&!o.shadowRoot&&r(o)===!0)return Yn(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Jn(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Yn(e);return!1},Zn=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 Y.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Qn=function(e,t){return!(t.disabled||Hn(t)||Xn(t,e)||Un(t)||Zn(t))},$n=function(e,t){return!(qn(t)||Rn(t)<0||!Qn(e,t))},er=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},tr=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=zn(a,i),s=i?tr(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(Bn).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},nr=function(e,t){return t||={},tr(t.getShadowRoot?In([e],t.includeContainer,{filter:$n.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:er}):Fn(e,t.includeContainer,$n.bind(null,t)))},rr=function(e,t){return t||={},t.getShadowRoot?In([e],t.includeContainer,{filter:Qn.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Fn(e,t.includeContainer,Qn.bind(null,t))},ir=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Y.call(e,An)===!1?!1:$n(t,e)},ar=kn.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),or=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Y.call(e,ar)===!1?!1:Qn(t,e)};function X(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function sr(e,t){if(!ir(e,X()))return cr(e,t);let n=L(e),r=nr(n.body,X());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function cr(e,t){let n=L(e);if(!or(e,X()))return n.body;let r=rr(n.body,X());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>ir(e,X()))??n.body}function lr(e,t){if(t<=0)return[];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function ur(e,t){return e>=0&&e<t.length}function dr(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 fr(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 pr(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 mr(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 hr(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 hr(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 gr(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=gr(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 gr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _r={afterMs:1e4,onChange:K};function vr(e,t){let{afterMs:n,onChange:r,getWindow:i}={..._r,...t},a=null,o=y(b(e));function s(){return i().setTimeout(()=>{w(o,e,!0),r?.(e)},n)}return C(()=>()=>{a&&i().clearTimeout(a)}),D(()=>v(o),e=>{w(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var yr=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=vr(``,{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=v(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=hr(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&v(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},br=`data-context-menu-trigger`,xr=`data-context-menu-content`,Sr=new N(`Menu.Root`),Z=new N(`Menu.Root | Menu.Sub`),Cr=new N(`Menu.Content`);new N(`Menu.Group | Menu.RadioGroup`),new N(`Menu.RadioGroup`),new N(`Menu.CheckboxGroup`);var wr=new hn(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),Tr=jt({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),Er=class{#e;#t=null;#n=null;#r=!1;#i=null;#a=null;#o=null;#s=null;constructor(e){this.#e=e,P([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(this.#_(),!e||!t||!n)return;let r=e=>{q(e)&&(this.#s={x:e.clientX,y:e.clientY},this.#r||this.#d(e,`content`))},i=e=>{q(e)&&this.#f(e,`content`)},a=e=>{q(e)&&(this.#r||this.#d(e,`trigger`))},o=e=>{if(q(e)){if(G(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=>{q(e)&&this.#m()},c=e=>{q(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.#_()}}),F(()=>{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=Ar(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:jr(i,a,o),intent:Mr(s,c,o,t,l),targetRect:c,side:o}}#u(e,t,n){return Dr(e,t)||Dr(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(G(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(!Or(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||!q(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`&&Or(r,a)){this.#m();return}if(this.#i===`trigger`&&kr(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=L(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 Dr(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 Or(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}function kr(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 Ar(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 jr(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 Mr(e,t,n,r,i){let a=r===`trigger`?Nr(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 Nr(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Pr=class e{static create(t){let n=new e(t);return Sr.set(n)}opts;isUsingKeyboard=new On;#e=y(!1);get ignoreCloseAutoFocus(){return v(this.#e)}set ignoreCloseAutoFocus(e){w(this.#e,e,!0)}#t=y(!1);get isPointerInTransit(){return v(this.#t)}set isPointerInTransit(e){w(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>Tr.getAttr(e,this.opts.variant.current)},Fr=class e{static create(t,n){return Z.set(new e(t,n,null))}opts;root;parentMenu;contentId=D(()=>``);#e=y(null);get contentNode(){return v(this.#e)}set contentNode(e){w(this.#e,e,!0)}contentPresence;#t=y(null);get triggerNode(){return v(this.#t)}set triggerNode(e){w(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new rn({ref:D(()=>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&&P(()=>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}},Ir=class e{static create(t){return Cr.set(new e(t,Z.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=y(``);get search(){return v(this.#e)}set search(e){w(this.#e,e,!0)}#t=0;#n;#r=y(!1);get mounted(){return v(this.#r)}set mounted(e){w(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new R(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 Er({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 yr({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new tn({rootNode:D(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:D(()=>`vertical`)}),P(()=>this.parentMenu.contentNode,e=>e?wr.listen(e,()=>{I(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),C(()=>{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(!G(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&&ir(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=sr(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),I(()=>{n.focus(),I(()=>{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(!W(t)||!W(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&&Cn.includes(e.key)&&(e.preventDefault(),Sn.includes(e.key)&&o.reverse(),Dn(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){G(e.currentTarget)&&G(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&I(()=>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(),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!Zt(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,I(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#c=r(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return v(this.#c)}set snippetProps(e){w(this.#c,e)}#l=r(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":Et(this.parentMenu.opts.open.current),...Ot(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 v(this.#l)}set props(e){w(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},Lr=class{opts;content;attachment;#e=y(!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&&q(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!W(t))return;t.focus()}}onpointerleave(e){e.defaultPrevented||q(e)&&this.content.onItemLeave(e)}onfocus(e){I(()=>{e.defaultPrevented||this.opts.disabled.current||w(this.#e,!0)})}onblur(e){I(()=>{e.defaultPrevented||w(this.#e,!1)})}#t=r(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":St(this.opts.disabled.current),"data-disabled":wt(this.opts.disabled.current),"data-highlighted":v(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 v(this.#t)}set props(e){w(this.#t,e)}},Rr=class e{static create(t){return new e(t,new Lr(t,Cr.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===` `)&&bn.includes(e.key)){if(!W(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(!W(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=r(()=>Ke(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return v(this.#n)}set props(e){w(this.#n,e)}},zr=class e{static create(t){let n=Cr.get();return new e(t,new Lr(t,n),n,Z.get())}opts;item;content;submenu;attachment;#e=null;constructor(e,t,n,r){this.opts=e,this.item=t,this.content=n,this.submenu=r,this.attachment=z(this.opts.ref,e=>this.submenu.triggerNode=e),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),F(()=>{this.#t()})}#t(){this.#e!==null&&(this.content.domContext.getWindow().clearTimeout(this.#e),this.#e=null)}onpointermove(e){if(q(e)){if(this.submenu.root.isPointerInTransit){this.#e!==null&&this.#t();return}if(!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#e){let e=this.opts.openDelay.current;if(e<=0){this.submenu.onOpen();return}this.#e=this.content.domContext.setTimeout(()=>{if(this.submenu.root.isPointerInTransit){this.#t();return}this.submenu.onOpen(),this.#t()},e)}}}onpointerleave(e){q(e)&&this.#t()}onkeydown(e){let t=this.content.search!==``;this.item.opts.disabled.current||t&&e.key===` `||wn[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!W(e.currentTarget))return;e.currentTarget.focus();let t=new CustomEvent(`menusubtriggerselect`,{bubbles:!0,cancelable:!0});this.opts.onSelect.current(t),this.submenu.opts.open.current||(this.submenu.onOpen(),I(()=>{let e=this.submenu.contentNode;e&&wr.dispatch(e)}))}#n=r(()=>Ke({"aria-haspopup":`menu`,"aria-expanded":St(this.submenu.opts.open.current),"data-state":Et(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr(`sub-trigger`)]:``,onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return v(this.#n)}set props(e){w(this.#n,e)}},Br=class e{static create(t){return new e(t,Sr.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 v(this.#e)}set props(e){w(this.#e,e)}},Vr=class e{static create(t){return new e(t,Z.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":St(this.parentMenu.opts.open.current),"aria-controls":v(this.#e),"data-disabled":wt(this.opts.disabled.current),"data-state":Et(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 v(this.#t)}set props(e){w(this.#t,e)}},Hr=class{static create(e){let t=Z.get();return Z.set(new Fr(e,t.root,t))}};globalThis.bitsDismissableLayers??=new Map;var Ur=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=K;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,C(()=>{this.#a=vn(this.opts.ref.current)});let t=K,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};P([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ut(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),F(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&I(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return M(s(this.#a,`pointerdown`,M(this.#f,this.#m),{capture:!0}),s(this.#a,`pointerdown`,M(this.#p,this.#d)),s(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=qr(e)),this.#e.current(e)};#d=gn(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Kr(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=qr(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=s(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=Gr(this.opts.ref.current))};#h=e=>this.opts.ref.current?_n(this.opts.ref.current,e):!1;#g=gn(()=>{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 Wr(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Gr(e){let t=[...globalThis.bitsDismissableLayers],n=Wr(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Kr(e,t){let n=e.target;if(!Zt(n))return!1;let r=!!n.closest(`[${br}]`),i=!!t.closest(`[${xr}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:vn(n).documentElement.contains(n)&&!_n(t,n)&&yn(e,t)}function qr(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 Jr(e,t){m(t,!0);let n=x(t,`interactOutsideBehavior`,3,`close`),r=x(t,`onInteractOutside`,3,K),i=x(t,`onFocusOutside`,3,K),a=x(t,`isValidEvent`,3,()=>!1),o=Ur.create({id:D(()=>t.id),interactOutsideBehavior:D(()=>n()),onInteractOutside:D(()=>r()),enabled:D(()=>t.enabled),onFocusOutside:D(()=>i()),isValidEvent:D(()=>a()),ref:t.ref});var s=g();p(S(s),()=>t.children??_,()=>({props:o.props})),c(e,s),f()}globalThis.bitsEscapeLayers??=new Map;var Yr=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new R(this.opts.ref);let t=K;P(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>s(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Xr(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 Xr(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 Zr(e,t){m(t,!0);let n=x(t,`escapeKeydownBehavior`,3,`close`),r=x(t,`onEscapeKeydown`,3,K);Yr.create({escapeKeydownBehavior:D(()=>n()),onEscapeKeydown:D(()=>r()),enabled:D(()=>t.enabled),ref:t.ref});var i=g();p(S(i),()=>t.children??_),c(e,i),f()}var Qr=class e{static instance;#e=me([]);#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)}},$r=class e{#e=!1;#t=null;#n=Qr.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(s(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)&&or(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),s(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 n=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()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?nr(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?rr(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return P([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),F(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function ei(e,t){m(t,!0);let n=x(t,`enabled`,3,!1),r=x(t,`trapFocus`,3,!1),i=x(t,`loop`,3,!1),a=x(t,`onCloseAutoFocus`,3,K),o=x(t,`onOpenAutoFocus`,3,K),s=$r.use({enabled:D(()=>n()),trap:D(()=>r()),loop:i(),onCloseAutoFocus:D(()=>a()),onOpenAutoFocus:D(()=>o()),ref:t.ref});var l=g();p(S(l),()=>t.focusScope??_,()=>({props:s.props})),c(e,l),f()}globalThis.bitsTextSelectionLayers??=new Map;var ti=class e{static create(t){return new e(t)}opts;domContext;#e=K;constructor(e){this.opts=e,this.domContext=new R(e.ref);let t=K;P(()=>this.opts.enabled.current,e=>(e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return M(s(this.domContext.getDocument(),`pointerdown`,this.#n),s(this.domContext.getDocument(),`pointerup`,he(this.#r,this.opts.onPointerUp.current)))}#n=e=>{let t=this.opts.ref.current,n=e.target;!W(t)||!W(n)||!this.opts.enabled.current||!ai(this)||!yt(t,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=ri(t,this.domContext.getDocument().body)))};#r=()=>{this.#e(),this.#e=K}},ni=e=>e.style.userSelect||e.style.webkitUserSelect;function ri(e,t){let n=ni(t),r=ni(e);return ii(t,`none`),ii(e,`text`),()=>{ii(t,n),ii(e,r)}}function ii(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function ai(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function oi(e,t){m(t,!0);let n=x(t,`preventOverflowTextSelection`,3,!0),r=x(t,`onPointerDown`,3,K),i=x(t,`onPointerUp`,3,K);ti.create({id:D(()=>t.id),onPointerDown:D(()=>r()),onPointerUp:D(()=>i()),enabled:D(()=>t.enabled&&n()),ref:t.ref});var a=g();p(S(a),()=>t.children??_),c(e,a),f()}globalThis.bitsIdCounter??={current:0};function si(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var ci=class{#e;#t=0;#n=y();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),w(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,v(this.#n)===void 0&&(this.#r=re(()=>{w(this.#n,this.#e(...e),!0)})),C(()=>()=>{this.#i()}),v(this.#n)}},li=new ae,ui=y(null),di=null,Q=null,$=!1,fi=D(()=>{for(let e of li.values())if(e)return!0;return!1}),pi=null,mi=new ci(()=>{function e(){document.body.setAttribute(`style`,v(ui)??``),document.body.style.removeProperty(`--scrollbar-width`),Yt&&di?.(),w(ui,null)}function t(){Q!==null&&(window.clearTimeout(Q),Q=null)}function n(e,n){t(),$=!0,pi=Date.now();let r=pi,i=()=>{Q=null,pi===r&&(gi(li)?$=!1:($=!1,n()))},a=e===null?24:e;Q=window.setTimeout(i,a)}function r(){v(ui)===null&&li.size===0&&!$&&w(ui,document.body.getAttribute(`style`),!0)}return P(()=>fi.current,()=>{if(!fi.current)return;r(),$=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,Yt&&(di=s(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),I(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),F(()=>()=>{di?.()}),{get lockMap(){return li},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),hi=class{#e=si();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=mi.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=D(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),F(()=>{if(this.#r.lockMap.delete(this.#e),gi(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function gi(e){for(let[t,n]of e)if(n)return!0;return!1}function _i(e,t){m(t,!0);let n=x(t,`preventScroll`,3,!0),r=x(t,`restoreScrollDelay`,3,null);n()&&new hi(n(),()=>r()),f()}export{wt as $,K as A,V as B,dr as C,D as Ct,mn as D,Tn as E,W as F,Pt as G,U as H,Yt as I,Lt as J,Ft as K,$t as L,tn as M,Jt as N,fn as O,G as P,Vt as Q,Qt as R,ur as S,de as St,ir as T,Mt as U,H as V,Nt as W,zt as X,Rt as Y,Bt as Z,vr as _,P as _t,Zr as a,Dt as at,pr as b,Ue as bt,Ir as c,z as ct,wr as d,bt as dt,St as et,Pr as f,I as ft,yr as g,rt as gt,Hr as h,it as ht,ei as i,kt as it,rn as j,an as k,Rr as l,R as lt,zr as m,F as mt,si as n,Tt as nt,Jr as o,Et as ot,Br as p,ut as pt,It as q,oi as r,jt as rt,Vr as s,Ot as st,_i as t,Ct as tt,Fr as u,L as ut,mr as v,N as vt,fr as w,me as wt,hr as x,j as xt,lr as y,Ke as yt,B as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,Bt as r,Ct as i,F as a,G as o,H as s,L as c,N as l,Nt as u,Pt as d,Q as f,R as p,U as m,Vt as h,W as g,X as _,Y as v,_t as y,a as b,at as x,bt as S,d as ee,dt as C,ft as w,g as T,it as E,j as D,k as te,lt as ne,mt as O,o as k,ot as A,pt as j,st as M,u as N,v as P,vt as F,w as re,x as ie,y as ae,z as I}from"./BopViJM2.js";import"./t62M88qj.js";import{i as oe}from"./BrxevT0N.js";import{t as se}from"./BHN9gNId.js";import{t as L}from"./DDxJRL-b.js";import"./27dv1q5w.js";import{t as R}from"./D0U9laQN.js";import{t as z}from"./B5Pq_8E62.js";import"./D_JXFgBL2.js";import{t as ce}from"./DIc4IwPp2.js";import{t as le}from"./BjL4_nWR2.js";import{t as ue}from"./DURv4vgi.js";import{t as de}from"./CcSUYNz5.js";import{n as fe,r as B,t as pe}from"./BPbc2pr0.js";import{t as me}from"./DiJ6dQSD.js";import{t as V}from"./DsxEKAuW.js";import{t as he}from"./CCWNO1vs.js";import{t as ge}from"./BD7uRawH.js";import{t as _e}from"./DNltR0k1.js";import{t as ve}from"./CSj2qXzO2.js";import{t as ye}from"./BZsFFPDE.js";import{t as be}from"./DNu4c-6_.js";var H=n(`<title> </title>`),U=n(`<svg><!><path d="M13 21 26.17 21 23.59 23.59 25 25 30 20 25 15 23.59 16.41 26.17 19 13 19 13 21z"></path><path d="M22,14V10a1,1,0,0,0-.29-.71l-7-7A1,1,0,0,0,14,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H20a2,2,0,0,0,2-2V26H20v2H4V4h8v6a2,2,0,0,0,2,2h6v2Zm-8-4V4.41L19.59,10Z"></path></svg>`);function xe(e,t){let n=b(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),i=b(n,[`size`,`title`]);d(t,!1);let o=y(),s=y(),f=k(t,`size`,8,16),p=k(t,`title`,8,void 0);E(()=>(v(n),v(p())),()=>{F(o,n[`aria-label`]||n[`aria-labelledby`]||p())}),E(()=>(_(o),v(n)),()=>{F(s,{"aria-hidden":_(o)?void 0:!0,role:_(o)?`img`:void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),x(),N();var m=U();T(m,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:f(),height:f(),..._(s),...i}));var g=w(m),S=e=>{var t=H(),n=w(t,!0);h(t),A(()=>a(n,p())),c(e,t)};l(g,e=>{p()&&e(S)}),r(2),h(m),c(e,m),u()}var W=n(`<title> </title>`),G=n(`<svg><!><path d="M18 10H20V12H18z"></path><path d="M12 10H14V12H12z"></path><path d="M26,20H21V18h1a2.0023,2.0023,0,0,0,2-2V12h2V10H24V8a2.0023,2.0023,0,0,0-2-2H20V2H18V6H14V2H12V6H10A2.0023,2.0023,0,0,0,8,8v2H6v2H8v4a2.0023,2.0023,0,0,0,2,2h1v2H6a2.0023,2.0023,0,0,0-2,2v8H6V22H26v8h2V22A2.0023,2.0023,0,0,0,26,20ZM10,8H22v8H10Zm3,10h6v2H13Z"></path></svg>`);function K(e,t){let n=b(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),i=b(n,[`size`,`title`]);d(t,!1);let o=y(),s=y(),f=k(t,`size`,8,16),p=k(t,`title`,8,void 0);E(()=>(v(n),v(p())),()=>{F(o,n[`aria-label`]||n[`aria-labelledby`]||p())}),E(()=>(_(o),v(n)),()=>{F(s,{"aria-hidden":_(o)?void 0:!0,role:_(o)?`img`:void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),x(),N();var m=G();T(m,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:f(),height:f(),..._(s),...i}));var g=w(m),S=e=>{var t=W(),n=w(t,!0);h(t),A(()=>a(n,p())),c(e,t)};l(g,e=>{p()&&e(S)}),r(3),h(m),c(e,m),u()}var Se=I(`<div class="empty-state svelte-2kfnqv"><div class="seed-prompts svelte-2kfnqv"></div></div>`),Ce=I(`<div class="user-bubble svelte-2kfnqv"> </div>`),we=I(`<span class="tool-call svelte-2kfnqv"> </span>`),Te=I(`<div class="tool-calls svelte-2kfnqv"></div>`),Ee=I(`<div class="agent-text prose svelte-2kfnqv"></div>`),De=I(`<div class="agent-text prose svelte-2kfnqv"></div>`),Oe=I(`<span class="streaming-dot svelte-2kfnqv"></span>`),ke=I(`<div class="msg-actions svelte-2kfnqv"><button class="copy-btn svelte-2kfnqv" title="Copy"><!></button> <button class="copy-btn svelte-2kfnqv" title="Export as Markdown"><!></button></div>`),Ae=I(`<div class="agent-content svelte-2kfnqv"><!> <!></div>`),je=I(`<div class="message-group svelte-2kfnqv"><!></div>`),Me=I(`<div class="follow-up-prompts svelte-2kfnqv"></div>`),Ne=I(`<!> <!>`,1),Pe=I(`<div class="context-chip svelte-2kfnqv">Onboarding Interview</div>`),Fe=I(`<div class="agent-panel svelte-2kfnqv"><div class="agent-header svelte-2kfnqv"><button class="agent-header-btn svelte-2kfnqv" aria-label="New session" title="New session"><!></button> <div class="agent-session-nav svelte-2kfnqv"><button class="agent-header-btn svelte-2kfnqv" aria-label="Previous session" title="Previous session"><!></button> <span class="agent-session-label svelte-2kfnqv"> </span> <button class="agent-header-btn svelte-2kfnqv" aria-label="Next session" title="Next session"><!></button></div> <button class="agent-header-btn svelte-2kfnqv" aria-label="Close" title="Close"><!></button></div> <div class="agent-messages svelte-2kfnqv"><!></div> <div class="scroll-to-bottom-wrapper svelte-2kfnqv"><button aria-label="Scroll to latest"><!></button></div> <div class="agent-input-area svelte-2kfnqv"><!> <div class="text-input svelte-2kfnqv"><textarea class="input-field svelte-2kfnqv" placeholder="Ask anything" rows="1"></textarea> <!></div></div></div>`),q=I(`<div class="agent-overlay-root svelte-2kfnqv"><button><!></button> <!></div>`);function Ie(n,m){d(m,!0);let v=i(()=>V.open),y=S(null),b=S(!0),x=S(void 0),T=S(void 0),E=S(void 0),k=new WeakSet,N=i(()=>L.draftInput);function I(e){L.draftInput=e}let H=i(()=>(L.messages.length,L.activeSessionId,L.getSessions())),U=i(()=>_(H).findIndex(e=>e.active)),W=i(()=>_(U)>=0&&_(U)<_(H).length-1),G=i(()=>_(U)>0),Ie=i(()=>L.messages.length>0);function Le(e){if(!e)return`New chat`;let t=new Date(e),n=new Date,r=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=Math.round((r(n)-r(t))/(1440*60*1e3)),a=t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`});return i===0?`Today, ${a}`:i===1?`Yesterday, ${a}`:i<7?t.toLocaleDateString(void 0,{weekday:`long`})+`, ${a}`:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})+`, ${a}`}let Re=i(()=>_(U)<0||_(H).length===0?`New chat`:Le(_(H)[_(U)].updatedAt));function ze(){if(!_(W))return;let e=_(H)[_(U)+1];e&&L.loadSession(e.id)}function Be(){if(!_(G))return;let e=_(H)[_(U)-1];e&&L.loadSession(e.id)}function Ve(){L.newSession(),f().then(()=>_(E)?.focus())}let He={connector_list:[`Listing connectors`,`Listing connectors`],connector_call:[`Calling connector`,`Calling connectors`],create_entity:[`Creating entry`,`Creating entries`],get_entity:[`Reading entry`,`Reading entries`],update_entity:[`Updating entry`,`Updating entries`],delete_entity:[`Deleting entry`,`Deleting entries`],rename_entity:[`Renaming entry`,`Renaming entries`],move_entity:[`Moving entry`,`Moving entries`],transfer_entity:[`Transferring entry`,`Transferring entries`],import_file:[`Importing file`,`Importing files`],search_entities:[`Searching entries`,`Searching entries`],list_entities:[`Listing entries`,`Listing entries`],get_related:[`Finding related entries`,`Finding related entries`],get_backlinks:[`Finding backlinks`,`Finding backlinks`],validate_wikilinks:[`Validating links`,`Validating links`],get_workspace_summary:[`Reading workspace`,`Reading workspace`],list_repos:[`Listing folders`,`Listing folders`],create_folder:[`Creating folder`,`Creating folders`],create_subfolder:[`Creating subfolder`,`Creating subfolders`],rename_folder:[`Renaming folder`,`Renaming folders`],delete_folder:[`Deleting folder`,`Deleting folders`],list_folders:[`Listing folders`,`Listing folders`],query_dataset:[`Querying dataset`,`Querying datasets`],append_rows:[`Appending rows`,`Appending rows`],get_entity_schema:[`Reading schema`,`Reading schemas`],lint_entities:[`Checking entries`,`Checking entries`],find_orphans:[`Finding orphans`,`Finding orphans`],highlight_entities:[`Highlighting entries`,`Highlighting entries`],sync_folder:[`Syncing folder`,`Syncing folders`],sync_workspace:[`Syncing workspace`,`Syncing workspace`],sync_refresh:[`Refreshing from source`,`Refreshing from source`],sync_status:[`Checking sync status`,`Checking sync status`],sync_list_sources:[`Listing sources`,`Listing sources`],sync_setup_source:[`Setting up source`,`Setting up sources`],sync_remove_source:[`Removing source`,`Removing sources`],sync_inspect_connector:[`Inspecting connector`,`Inspecting connectors`],sync_sample_data:[`Sampling data`,`Sampling data`],workspace_commit:[`Committing changes`,`Committing changes`],workspace_reset:[`Resetting workspace`,`Resetting workspace`],workspace_reindex:[`Reindexing`,`Reindexing`],workspace_status:[`Checking status`,`Checking status`],workspace_review:[`Reviewing changes`,`Reviewing changes`],workspace_push:[`Pushing changes`,`Pushing changes`],workspace_pull:[`Pulling changes`,`Pulling changes`],permission_list_users:[`Listing users`,`Listing users`],permission_create_user:[`Creating user`,`Creating users`],permission_delete_user:[`Deleting user`,`Deleting users`],permission_grant_access:[`Granting access`,`Granting access`],permission_revoke_access:[`Revoking access`,`Revoking access`],permission_list_folder_access:[`Listing access`,`Listing access`],read_file:[`Reading file`,`Reading files`],list_directory:[`Listing directory`,`Listing directories`],write_file:[`Writing file`,`Writing files`],load_skill:[`Loading skill`,`Loading skills`],app_install:[`Installing app`,`Installing apps`],app_list:[`Listing apps`,`Listing apps`],deploy_railway:[`Deploying`,`Deploying`],redeploy_railway:[`Redeploying`,`Redeploying`],mark_onboarded:[`Completing onboarding`,`Completing onboarding`],update_workspace_about:[`Updating workspace description`,`Updating workspace description`],reset_conversation:[`Resetting conversation`,`Resetting conversation`]};function Ue(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t.entries()].map(([e,t])=>{let n=He[e];if(n)return{label:t>1?n[1]:n[0],count:t};let r=e.replace(/_/g,` `);return{label:r.charAt(0).toUpperCase()+r.slice(1),count:t}})}function We(e,t){navigator.clipboard.writeText(t),F(y,e,!0),setTimeout(()=>{_(y)===e&&F(y,null)},2e3)}function Ge(e){let t=new Blob([e],{type:`text/markdown`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`response.md`,r.click(),URL.revokeObjectURL(n)}let Ke=i(()=>oe.totalEntities<5?[`Continue interviewing me`,`What can I do with Studiograph?`,`How can I give you more information?`]:[`What's new?`,`What should I focus on today?`,`I want to share something`,`Help me think through something`]),qe=i(()=>{let e=L.messages;if(e.length===0||L.streaming)return[];let t=e[e.length-1];return t.role===`agent`?t.suggestions?.length?t.suggestions:R.loaded&&!R.onboarded?[`Skip this question`]:se.selectedId?[`Tell me more about this ${se.selectedType??`entry`}`,`What's related?`,`I have updates`]:[`Tell me more about that`,`What should I focus on?`]:[]});M(()=>{_(v)&&L.markSeen()});function J(){_(T)&&F(b,_(T).scrollHeight-_(T).scrollTop-_(T).clientHeight<40)}function Y(e=!1){_(T)&&(e?_(T).scrollTo({top:_(T).scrollHeight,behavior:`smooth`}):_(T).scrollTop=_(T).scrollHeight)}async function Je(){let e=_(N).trim();!e||L.streaming||(I(``),F(b,!0),L.send(e),await f(),Y())}function Ye(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),Je())}function Xe(e){F(b,!0),L.send(e),f().then(()=>Y())}function X(){V.toggle()}function Ze(){V.hide()}M(()=>{_(v)&&f().then(()=>{_(E)?.focus(),Y()})});function Z(e){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`j`){e.preventDefault(),X();return}e.key===`Escape`&&_(v)&&_(x)?.contains(document.activeElement)&&(e.preventDefault(),Ze())}M(()=>{_(v);let e=_(T);!e||!_(v)||k.has(e)||(k.add(e),f().then(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight,J()})})}))}),M(()=>{L.messages.length,_(T),f().then(()=>J())}),M(()=>{let e=_(T);if(!e)return;let t=new ResizeObserver(()=>J());return t.observe(e),()=>t.disconnect()}),M(()=>{L.scrollTick,e(()=>_(b))&&Y()}),M(()=>{L.forceScroll,F(b,!0),Y()}),M(()=>{if(!_(v)||typeof window>`u`||!window.visualViewport)return;let e=window.visualViewport,t=()=>{if(!_(x))return;let t=Math.max(0,window.innerHeight-e.height-e.offsetTop);_(x).style.setProperty(`--keyboard-offset`,`${t}px`)};return e.addEventListener(`resize`,t),e.addEventListener(`scroll`,t),t(),()=>{e.removeEventListener(`resize`,t),e.removeEventListener(`scroll`,t),_(x)?.style.removeProperty(`--keyboard-offset`)}});var Q=q();o(`keydown`,C,Z);var $=w(Q);K(w($),{size:24}),h($);var Qe=O($,2),$e=e=>{var n=Fe(),u=w(n),d=w(u);ue(w(d),{size:14}),h(d);var f=O(d,2),m=w(f);_e(w(m),{size:16}),h(m);var v=O(m,2),S=w(v,!0);h(v);var C=O(v,2);le(w(C),{size:16}),h(C),h(f);var k=O(f,2);ce(w(k),{size:16}),h(k),h(u);var M=O(u,2),oe=w(M),se=e=>{var n=Se(),i=w(n);t(i,21,()=>_(Ke),D,(e,t)=>{z(e,{variant:`outline`,class:`seed-prompt`,onclick:()=>Xe(_(t)),children:(e,n)=>{r();var i=s();A(e=>a(i,e),[()=>B(_(t))]),c(e,i)},$$slots:{default:!0}})}),h(i),h(n),c(e,n)},V=e=>{var n=Ne(),i=j(n);t(i,17,()=>L.messages,D,(e,n,r)=>{var i=je(),o=w(i),s=e=>{var t=Ce(),r=w(t,!0);h(t),A(()=>a(r,_(n).content)),c(e,t)},u=e=>{var i=Ae(),o=w(i),s=e=>{var r=p();t(j(r),17,()=>_(n).segments,D,(e,n)=>{var r=p(),i=j(r),o=e=>{var r=Te();t(r,21,()=>Ue(_(n).names),D,(e,t)=>{let n=()=>_(t).label;var r=we(),i=w(r,!0);h(r),A(()=>a(i,n())),c(e,r)}),h(r),c(e,r)},s=e=>{var t=Ee();te(t,()=>B(be.parse(fe(pe(_(n).content)))),!0),h(t),c(e,t)};l(i,e=>{_(n).type===`tools`?e(o):_(n).type===`text`&&_(n).content&&e(s,1)}),c(e,r)}),c(e,r)},u=e=>{var t=De();te(t,()=>B(be.parse(fe(pe(_(n).content)))),!0),h(t),c(e,t)};l(o,e=>{_(n).segments&&_(n).segments.length>0?e(s):_(n).content&&e(u,1)});var d=O(o,2),f=e=>{c(e,Oe())},m=e=>{var t=ke(),i=w(t),a=w(i),o=e=>{de(e,{size:12})},s=e=>{ye(e,{size:12})};l(a,e=>{_(y)===r?e(o):e(s,-1)}),h(i);var u=O(i,2);xe(w(u),{size:12}),h(u),h(t),g(`click`,i,()=>We(r,_(n).content)),g(`click`,u,()=>Ge(_(n).content)),c(e,t)};l(d,e=>{_(n).streaming?e(f):_(n).content&&e(m,1)}),h(i),c(e,i)};l(o,e=>{_(n).role===`user`?e(s):e(u,-1)}),h(i),c(e,i)});var o=O(i,2),u=e=>{var n=Me();t(n,21,()=>_(qe),D,(e,t)=>{z(e,{variant:`outline`,class:`seed-prompt`,onclick:()=>Xe(_(t)),children:(e,n)=>{r();var i=s();A(e=>a(i,e),[()=>B(_(t))]),c(e,i)},$$slots:{default:!0}})}),h(n),c(e,n)};l(o,e=>{_(qe).length>0&&e(u)}),c(e,n)};l(oe,e=>{L.messages.length===0?e(se):e(V,-1)}),h(M),ee(M,e=>F(T,e),()=>_(T));var H=O(M,2),U=w(H);let K;ve(w(U),{size:16}),h(U),h(H);var q=O(H,2),Le=w(q),He=e=>{c(e,Pe())};l(Le,e=>{R.loaded&&!R.onboarded&&e(He)});var X=O(Le,2),Z=w(X);ne(Z),ee(Z,e=>F(E,e),()=>_(E)),re(Z,(e,t)=>ge?.(e,t),()=>_(N));var Q=O(Z,2),$=e=>{z(e,{variant:`ghost`,size:`icon`,class:`stop-btn send-btn`,onclick:()=>L.stop(),"aria-label":`Stop`,children:(e,t)=>{me(e,{size:16})},$$slots:{default:!0}})},Qe=e=>{{let t=i(()=>_(N).trim()?`send-active`:``);z(e,{variant:`ghost`,size:`icon`,get class(){return`send-btn ${_(t)??``}`},onclick:Je,"aria-label":`Send`,children:(e,t)=>{he(e,{size:14})},$$slots:{default:!0}})}};l(Q,e=>{L.streaming?e($):e(Qe,-1)}),h(X),h(q),h(n),ee(n,e=>F(x,e),()=>_(x)),A(()=>{d.disabled=!_(Ie),m.disabled=!_(W),a(S,_(Re)),C.disabled=!_(G),P(H,`aria-hidden`,_(b)),K=ie(U,1,`scroll-to-bottom svelte-2kfnqv`,null,K,{"is-hidden":_(b)}),P(U,`tabindex`,_(b)?-1:0),ae(Z,_(N))}),g(`click`,d,Ve),g(`click`,m,ze),g(`click`,C,Be),g(`click`,k,Ze),o(`scroll`,M,J),g(`click`,U,()=>Y(!0)),g(`input`,Z,e=>I(e.target.value)),g(`keydown`,Z,Ye),c(e,n)};l(Qe,e=>{_(v)&&e($e)}),h(Q),A(()=>{ie($,1,`agent-fab ${_(v)?`is-open`:``} ${(L.hasUnread||L.streaming)&&!_(v)?`has-unread`:``} ${L.streaming?`is-streaming`:``}`,`svelte-2kfnqv`),P($,`aria-label`,_(v)?`Close agent (⌘J)`:`Open agent (⌘J)`),P($,`aria-pressed`,_(v)),P($,`title`,_(v)?`Close agent (⌘J)`:`Open agent (⌘J)`)}),g(`click`,$,X),c(n,Q),u()}m([`click`,`input`,`keydown`]);export{Ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{X as e,bt as t,vt as n}from"./BopViJM2.js";function r(){let r=t(null);return{get state(){return e(r)},openNewFolder(e=``,t=``){n(r,{kind:`newFolder`,repo:e,path:t},!0)},openRename(e,t){n(r,{kind:`rename`,repo:e,path:t},!0)},openMove(e,t){n(r,{kind:`move`,repo:e,path:t},!0)},openDelete(e,t){n(r,{kind:`delete`,repo:e,path:t},!0)},close(){n(r,null)}}}var i=r();export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,Bt as t,Ct as n,D as r,Et as i,F as a,G as o,L as s,N as c,Nt as l,O as u,Ot as d,Pt as f,R as p,Tt as m,U as ee,Vt as h,W as te,X as g,b as ne,bt as _,d as re,ft as v,ht as y,j as ie,mt as b,n as ae,o as x,ot as S,pt as C,q as oe,st as w,v as se,vt as T,w as ce,z as E}from"./BopViJM2.js";import{n as le,r as ue}from"./xScoKDLi.js";import"./t62M88qj.js";import"./C_7fzjum.js";import{i as de,r as fe}from"./BrxevT0N.js";import{n as pe,o as me,r as he,s as ge,t as _e}from"./Cy1eWxGK2.js";import{n as ve}from"./COtNXLuY2.js";import{t as ye}from"./CcSUYNz5.js";import{n as be,t as xe}from"./CZkXwWOp.js";import{t as Se}from"./DgwOYNhC.js";import{i as Ce}from"./BPbc2pr0.js";import{t as we}from"./BilUNxiC.js";import{r as Te}from"./Dx0Uwf5m.js";import{t as Ee}from"./CCWNO1vs.js";import{t as De}from"./wlws_0AK.js";import{n as Oe,t as ke}from"./wtUbaKvx2.js";import{t as Ae}from"./CSj2qXzO2.js";var je=new Map,Me=new Set,D=null;function O(e){D=e}var Ne=E(`<span class="sort-menu-spacer svelte-1v0e2we"></span>`),Pe=E(`<span class="sort-menu-dir svelte-1v0e2we"><!></span>`),Fe=E(`<!> <span class="sort-menu-label svelte-1v0e2we"> </span> <!>`,1),Ie=E(`<!> <!>`,1),Le=E(`<div class="gallery-spacer svelte-1v0e2we" aria-hidden="true"></div>`),Re=E(`<button class="gallery-cell gallery-cell-folder svelte-1v0e2we"><div class="cell-headline svelte-1v0e2we"><span class="svelte-1v0e2we"> </span></div> <div></div> <div class="cell-tags svelte-1v0e2we"></div> <span class="folder-icon svelte-1v0e2we" aria-hidden="true"><!></span></button>`),ze=E(`<div class="cell-image svelte-1v0e2we"><img loading="lazy" class="svelte-1v0e2we"/></div> <span class="cell-title svelte-1v0e2we"> </span>`,1),Be=E(`<div class="cell-headline svelte-1v0e2we"><span class="svelte-1v0e2we"> </span></div> <div></div>`,1),Ve=E(`<span class="cell-tag svelte-1v0e2we"> </span>`),He=E(`<button class="gallery-cell svelte-1v0e2we"><!> <div class="cell-tags svelte-1v0e2we"></div></button>`),Ue=E(`<div class="gallery-spacer svelte-1v0e2we" aria-hidden="true"></div>`),We=E(`<div class="gallery-view svelte-1v0e2we"><div class="gallery-toolbar svelte-1v0e2we"><div class="toolbar-left svelte-1v0e2we"><!> <!> <!></div> <div class="toolbar-right svelte-1v0e2we"><!></div></div> <div class="gallery-grid svelte-1v0e2we"><!> <!> <!></div></div>`);function Ge(ee,E){f(E,!0);let Ge=()=>i(pt,`$virtualizer`,Ke),[Ke,qe]=m(),k=x(E,`lockedType`,3,null),A=x(E,`lockedFolder`,3,null),Je=x(E,`lockedFolderPath`,3,null),j=x(E,`storageId`,3,null),M=x(E,`defaultSortKey`,3,`name`),N=x(E,`defaultSortAsc`,3,!0),Ye=x(E,`entities`,3,null),Xe=x(E,`folders`,19,()=>[]),Ze=[{key:`name`,label:`Name`},{key:`created_at`,label:`Date created`},{key:`updated_at`,label:`Date updated`}],P=n(()=>j()?`sg-galleryview-${j()}`:null);function Qe(){if(!g(P))return null;try{let e=localStorage.getItem(g(P));if(e)return JSON.parse(e)}catch{}return null}function $e(){if(!g(P))return;let e={selectedType:k()?null:g(I),sortKey:g(L),sortAsc:g(R)};localStorage.setItem(g(P),JSON.stringify(e))}let et=j()?`sg-galleryview-${j()}`:null,F=(()=>{if(!et||typeof localStorage>`u`)return null;try{let e=localStorage.getItem(et);return e?JSON.parse(e):null}catch{return null}})(),I=_(y(k()??F?.selectedType??null)),L=_(y(F?.sortKey??M())),R=_(y(F?.sortAsc??N())),z=_(null);w(()=>{if(E.view&&E.view.id!==g(z)){T(z,E.view.id,!0);let e=Qe();e?(T(I,k()??e.selectedType??null,!0),T(L,e.sortKey??M(),!0),T(R,e.sortAsc??N(),!0)):(T(I,k()??E.view.config.selectedType??null,!0),T(L,M()),T(R,N()))}}),w(()=>{k()&&T(I,k())}),w(()=>{g(I),g(L),g(R),g(z)!==null&&$e()});function tt(e){g(L)===e?T(R,!g(R)):(T(L,e,!0),T(R,e===`name`))}function B(e,t){return t===`name`?(e.title??e.id??``).toLowerCase():t===`created_at`?e.createdAt??``:t===`updated_at`?e.updatedAt??``:``}let nt=n(()=>{let e=[];if(Ye())for(let t of Ye())(!g(I)||t.entityType===g(I))&&e.push(t);else for(let t of de.repos)if(!(A()&&t.name!==A()))for(let n of t.entities)g(I)&&n.entityType!==g(I)||e.push(n);let t=g(R)?1:-1;return e.sort((e,n)=>{let r=B(e,g(L)),i=B(n,g(L));return r===i?0:r?i?r<i?-t:t:-1:1}),e}),V=_(y(new Map)),rt=_(!1),H=new AbortController;le(()=>{D&&(H.abort(),H=new AbortController,O(null))});let it=n(()=>{let e=new Set;for(let t of g(nt))e.add(t.repo);return e});function at(e){let t=new Map;for(let n of e){let e=je.get(n);if(e)for(let[n,r]of e)t.set(n,r)}return t}w(()=>{let e=g(it);if(T(V,at(e),!0),![...e].some(e=>!Me.has(e))||D)return;T(rt,!0);let t=H.signal;O(Te(t).then(n=>{if(!t.aborted){for(let[e,t]of Object.entries(n)){let n=new Map;for(let e of t)e.mediaType===`image`&&(n.has(e.entityId)||n.set(e.entityId,e.url));je.set(e,n),Me.add(e)}T(V,at(e),!0)}}).catch(e=>{e?.name!==`AbortError`&&console.error(`Failed to load workspace assets:`,e)}).finally(()=>{O(null),T(rt,!1)}))});let ot=n(()=>Xe().map(e=>({kind:`folder`,folder:e}))),U=n(()=>g(nt).map(e=>{let t=e.fields.thumbnail,n=g(V).get(e.id);return{kind:`entity`,entity:e,thumbnailUrl:t||n||null}})),W=n(()=>[...g(ot),...g(U)]);w(()=>{we.count=g(U).length}),ae(()=>{we.count=null});function st(e){ue(`/${e.repo}/${e.entityType}/${e.id}`)}function ct(){if(typeof window>`u`)return{cols:2,rowH:200};let e=window.innerWidth;return e>=1600?{cols:6,rowH:e*.2}:e>=1200?{cols:5,rowH:e*.24}:e>=900?{cols:4,rowH:e*.3}:e>=600?{cols:3,rowH:e*.4}:{cols:2,rowH:e*.55}}let lt=ct(),G=_(null),K=_(y(lt.cols)),ut=n(()=>`gallery:${j()??`default`}`),q=_(y(lt.rowH));function dt(){if(!g(G))return;let e=getComputedStyle(g(G)),t=e.gridTemplateColumns.split(` `).filter(Boolean).length,n=parseFloat(e.gridAutoRows);t>0&&t!==g(K)&&T(K,t,!0),n>0&&Math.abs(n-g(q))>=.5&&T(q,n,!0)}w(()=>{if(!g(G))return;dt();let e=new ResizeObserver(()=>dt());return e.observe(g(G)),()=>e.disconnect()});let ft=n(()=>Math.ceil(g(W).length/g(K))),pt=ke({count:0,getScrollElement:()=>null,estimateSize:()=>g(q),overscan:2});w(()=>{let e=g(ft),t=g(q);d(pt).setOptions({count:e,getScrollElement:()=>g(G),estimateSize:()=>t,overscan:2})});let J=n(()=>Ge().getVirtualItems()),mt=n(()=>g(J).length>0?g(J)[0].index:0),ht=n(()=>g(J).length>0?Math.max(0,g(ft)-g(J)[g(J).length-1].index-1):0),gt=n(()=>{if(g(J).length===0)return[];let e=g(J)[0].index*g(K),t=Math.min(g(W).length,(g(J)[g(J).length-1].index+1)*g(K));return g(W).slice(e,t)});var Y=We(),X=v(Y),Z=v(X),Q=v(Z),_t=e=>{De(e,{get repoName(){return A()},get currentPath(){return Je()}})};c(Q,e=>{A()&&Je()&&e(_t)});var vt=b(Q,2),yt=t=>{var i=p();r(C(i),()=>pe,(t,i)=>{i(t,{children:(t,i)=>{var o=Ie(),l=C(o);{let e=n(()=>Ze.find(e=>e.key===g(L))?.label),t=n(()=>g(R)?` (ascending)`:` (descending)`);r(l,()=>he,(n,r)=>{r(n,{class:`toolbar-icon-btn`,get title(){return`Sort by ${g(e)??``}${g(t)??``}`},"aria-label":`Sort entries`,children:(e,t)=>{var n=p(),r=C(n),i=e=>{be(e,{size:16})},a=e=>{xe(e,{size:16})};c(r,e=>{g(R)?e(i):e(a,-1)}),s(e,n)},$$slots:{default:!0}})})}r(b(l,2),()=>_e,(t,n)=>{n(t,{children:(t,n)=>{var i=p();r(C(i),()=>ge,(t,n)=>{n(t,{align:`start`,children:(t,n)=>{var i=p();e(C(i),17,()=>Ze,e=>e.key,(e,t)=>{var n=p();r(C(n),()=>me,(e,n)=>{n(e,{onSelect:()=>tt(g(t).key),children:(e,n)=>{var r=Fe(),i=C(r),o=e=>{ye(e,{size:14})},l=e=>{s(e,Ne())};c(i,e=>{g(L)===g(t).key?e(o):e(l,-1)});var u=b(i,2),d=v(u,!0);h(u);var f=b(u,2),p=e=>{var t=Pe(),n=v(t),r=e=>{Ee(e,{size:12})},i=e=>{Ae(e,{size:12})};c(n,e=>{g(R)?e(r):e(i,-1)}),h(t),s(e,t)};c(f,e=>{g(L)===g(t).key&&e(p)}),S(()=>a(d,g(t).label)),s(e,r)},$$slots:{default:!0}})}),s(e,n)}),s(t,i)},$$slots:{default:!0}})}),s(t,i)},$$slots:{default:!0}})}),s(t,o)},$$slots:{default:!0}})}),s(t,i)};c(vt,e=>{g(U).length>1&&e(yt)});var bt=b(vt,2),xt=e=>{var t=p();u(C(t),()=>E.toolbarLeft),s(e,t)};c(bt,e=>{E.toolbarLeft&&e(xt)}),h(Z);var St=b(Z,2),Ct=v(St),wt=e=>{var t=p();u(C(t),()=>E.toolbarRight),s(e,t)};c(Ct,e=>{E.toolbarRight&&e(wt)}),h(St),h(X);var $=b(X,2),Tt=v($),Et=e=>{var t=Le();let n;S(()=>n=ne(t,``,n,{"grid-column":`1 / -1`,"grid-row":`span ${g(mt)??``}`})),s(e,t)};c(Tt,e=>{g(mt)>0&&e(Et)});var Dt=b(Tt,2);e(Dt,17,()=>g(gt),e=>e.kind===`folder`?`f:${e.folder.path}`:e.entity.repo+`/`+e.entity.entityType+`/`+e.entity.id,(r,i)=>{var l=p(),u=C(l),d=e=>{let t=n(()=>A()??``);var r=Re(),o=v(r),c=v(o),l=v(c,!0);h(c),h(o);var u=b(o,6);Se(v(u),{}),h(u),h(r),S(e=>a(l,e),[()=>fe(g(i).folder.name,g(i).folder.displayName)]),te(`click`,r,()=>g(t)&&ue(ve(g(t),g(i).folder.path))),s(e,r)},f=r=>{let l=n(()=>Array.isArray(g(i).entity.fields.tags)?g(i).entity.fields.tags:[]);var u=He(),d=v(u),f=e=>{var t=ze(),n=C(t),r=v(n);h(n);var c=b(n,2),l=v(c,!0);h(c),S(e=>{se(r,`src`,g(i).thumbnailUrl),se(r,`alt`,g(i).entity.title),a(l,e)},[()=>Ce(g(i).entity.title)]),o(`error`,r,e=>{e.currentTarget.style.display=`none`}),oe(r),s(e,t)},p=e=>{var n=Be(),r=C(n),o=v(r),c=v(o,!0);h(o),h(r),t(2),S(e=>a(c,e),[()=>Ce(g(i).entity.title)]),s(e,n)};c(d,e=>{g(i).thumbnailUrl?e(f):e(p,-1)});var m=b(d,2);e(m,21,()=>g(l).slice(0,3),ie,(e,t)=>{var n=Ve(),r=v(n,!0);h(n),S(e=>a(r,e),[()=>g(t).replace(/[-_]/g,` `)]),s(e,n)}),h(m),h(u),te(`click`,u,()=>st(g(i).entity)),s(r,u)};c(u,e=>{g(i).kind===`folder`?e(d):e(f,-1)}),s(r,l)});var Ot=b(Dt,2),kt=e=>{var t=Ue();let n;S(()=>n=ne(t,``,n,{"grid-column":`1 / -1`,"grid-row":`span ${g(ht)??``}`})),s(e,t)};c(Ot,e=>{g(ht)>0&&e(kt)}),h($),re($,e=>T(G,e),()=>g(G)),ce($,(e,t)=>Oe?.(e,t),()=>g(ut)),h(Y),s(ee,Y),l(),qe()}ee([`click`]);export{Ge as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,Bt as n,Ct as r,D as i,F as a,G as o,H as s,L as c,N as l,Nt as u,O as d,Pt as f,R as p,U as m,Vt as h,W as g,X as _,Y as v,_t as y,a as b,at as x,b as S,bt as C,ft as w,g as T,ht as E,it as ee,j as D,mt as O,n as te,o as k,ot as A,pt as j,st as M,u as N,v as ne,vt as P,w as re,x as F,xt as I,z as L}from"./BopViJM2.js";import{r as ie}from"./xScoKDLi.js";import"./t62M88qj.js";import"./C_7fzjum.js";import{k as ae}from"./DPHJu-Bj.js";import{i as oe}from"./BrxevT0N.js";import"./27dv1q5w.js";import{i as se,n as ce,r as le,t as ue}from"./CHgFOdId.js";import{a as de,i as fe,n as pe,o as me,r as he,s as ge,t as _e}from"./CdBsxNW12.js";import{t as ve}from"./DIc4IwPp2.js";import{t as ye}from"./BjL4_nWR2.js";import{a as be,r as xe}from"./MarJFAAy.js";import{t as Se}from"./BTeZ6jMK.js";import{t as Ce}from"./CcSUYNz5.js";import{i as we}from"./BPbc2pr0.js";import{t as Te}from"./D-fOfpFk.js";import{t as Ee}from"./BilUNxiC.js";import{a as De,t as R}from"./BreAJCzD.js";import{t as Oe}from"./DNltR0k1.js";import{t as ke}from"./0GaB4dQ5.js";import{t as Ae}from"./wlws_0AK.js";function je(e,t){let n=[],r=new Set;if(e&&R[e])for(let t of R[e])t.format===`date`&&!r.has(t.key)&&(n.push({key:t.key,label:t.label}),r.add(t.key));if(t){for(let e of t)if(!r.has(e)&&(e.endsWith(`_date`)||e===`date`||e===`expected_close`)){let t=e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase());n.push({key:e,label:t}),r.add(e)}}return r.has(`created_at`)||n.push({key:`created_at`,label:`Created`}),n}function Me(e,t){let n;if(n=t===`created_at`?e.createdAt:t===`updated_at`?e.updatedAt:e.fields[t],!n)return null;let r=String(n);return/^\d{4}-\d{2}-\d{2}/.test(r)?r.slice(0,10):null}function Ne(e,t,n,r){let i=new Date,a=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,`0`)}-${String(i.getDate()).padStart(2,`0`)}`,o=new Date(e,t-1,1).getDay(),s=new Date(e,t-1,1-o),c=new Map;for(let e of n){let t=Me(e,r);t&&(c.has(t)||c.set(t,[]),c.get(t).push(e))}let l=[];for(let n=0;n<42;n++){let r=new Date(s);r.setDate(r.getDate()+n);let i=r.getFullYear(),o=r.getMonth()+1,u=r.getDate(),d=`${i}-${String(o).padStart(2,`0`)}-${String(u).padStart(2,`0`)}`;l.push({dateStr:d,day:u,isCurrentMonth:o===t&&i===e,isToday:d===a,entities:c.get(d)??[]})}return l}function Pe(e,t,n,r,i){let a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,`0`)}-${String(a.getDate()).padStart(2,`0`)}`,s=new Date(e,t-1,n),c=s.getDay(),l=new Date(s);l.setDate(s.getDate()-c);let u=new Map;for(let e of r){let t=Me(e,i);t&&(u.has(t)||u.set(t,[]),u.get(t).push(e))}let d=[];for(let n=0;n<7;n++){let r=new Date(l);r.setDate(r.getDate()+n);let i=r.getFullYear(),a=r.getMonth()+1,s=r.getDate(),c=`${i}-${String(a).padStart(2,`0`)}-${String(s).padStart(2,`0`)}`;d.push({dateStr:c,day:s,isCurrentMonth:a===t&&i===e,isToday:c===o,entities:u.get(c)??[]})}return d}function Fe(e){if(e.length===0)return``;let t=new Date(e[0].dateStr+`T00:00:00`),n=new Date(e[e.length-1].dateStr+`T00:00:00`),r=t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear(),i=t.getFullYear()===n.getFullYear(),a=e=>e.toLocaleDateString(`en-US`,{month:`short`});return r?`${a(t)} ${t.getDate()} – ${n.getDate()}, ${n.getFullYear()}`:i?`${a(t)} ${t.getDate()} – ${a(n)} ${n.getDate()}, ${n.getFullYear()}`:`${a(t)} ${t.getDate()}, ${t.getFullYear()} – ${a(n)} ${n.getDate()}, ${n.getFullYear()}`}var Ie=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Le=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],z=t(`<title> </title>`),Re=t(`<svg><!><path d="M30,23V21H27.91a5.9592,5.9592,0,0,0-1.0244-2.4707L28.364,17.05,26.95,15.6362l-1.4788,1.4785A5.9584,5.9584,0,0,0,23,16.09V14H21v2.09a5.9584,5.9584,0,0,0-2.4709,1.0244L17.05,15.6362,15.636,17.05l1.4787,1.479A5.9618,5.9618,0,0,0,16.09,21H14v2h2.09a5.9618,5.9618,0,0,0,1.0244,2.4707L15.636,26.95,17.05,28.3638l1.4788-1.4785A5.9584,5.9584,0,0,0,21,27.91V30h2V27.91a5.9584,5.9584,0,0,0,2.4709-1.0244L26.95,28.3638,28.364,26.95l-1.4787-1.479A5.9592,5.9592,0,0,0,27.91,23Zm-8,3a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,22,26Z"></path><path d="M28,6a2,2,0,0,0-2-2H22V2H20V4H12V2H10V4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2h4V26H6V6h4V8h2V6h8V8h2V6h4v6h2Z"></path></svg>`);function ze(e,t){let r=b(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),i=b(r,[`size`,`title`]);f(t,!1);let o=y(),s=y(),d=k(t,`size`,8,16),p=k(t,`title`,8,void 0);ee(()=>(v(r),v(p())),()=>{P(o,r[`aria-label`]||r[`aria-labelledby`]||p())}),ee(()=>(_(o),v(r)),()=>{P(s,{"aria-hidden":_(o)?void 0:!0,role:_(o)?`img`:void 0,focusable:Number(r.tabindex)===0?!0:void 0})}),x(),N();var m=Re();T(m,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:d(),height:d(),..._(s),...i}));var g=w(m),S=e=>{var t=z(),n=w(t,!0);h(t),A(()=>a(n,p())),c(e,t)};l(g,e=>{p()&&e(S)}),n(2),h(m),c(e,m),u()}var Be=L(`<button class="toolbar-icon-btn" aria-label="Back"><!></button>`),Ve=L(`<!> <!> <!>`,1),He=L(`<button class="sg-sheet-row"><span class="sg-sheet-row-label"> </span> <span class="sg-sheet-row-trail"><!></span></button>`),Ue=L(`<button class="sg-sheet-row"><span class="sg-sheet-row-label"> </span> <span class="sg-sheet-row-trail"><!></span></button>`),We=L(`<button class="sg-sheet-row"><span class="sg-sheet-row-label"> </span> <span class="sg-sheet-row-trail"><!></span></button> <!> <!>`,1),Ge=L(`<button><span class="sg-sheet-row-lead"><!></span> <span class="sg-sheet-row-label">Month</span></button> <button><span class="sg-sheet-row-lead"><!></span> <span class="sg-sheet-row-label">Week</span></button>`,1),Ke=L(`<button><span class="sg-sheet-row-lead"><!></span> <span class="sg-sheet-row-label"> </span></button>`),qe=L(`<div class="sg-sheet-body"><!></div>`),Je=L(`<!> <!>`,1),Ye=L(`<!> <!>`,1),Xe=L(`<!> <!>`,1),Ze=L(`<div class="empty svelte-dnwsps"><p>No date fields available for the selected type.</p> <p class="empty-hint svelte-dnwsps">Try selecting a type with date fields like Task, Project, or Meeting.</p></div>`),Qe=L(`<div class="dow-header svelte-dnwsps"> </div>`),$e=L(`<button class="entity-chip svelte-dnwsps" draggable="true"><span class="chip-label svelte-dnwsps"> </span></button>`),et=L(`<button class="day-view-all svelte-dnwsps">View all</button>`),tt=L(`<div><span> </span> <div class="day-entities svelte-dnwsps"></div> <!></div>`),nt=L(`<div class="calendar-grid svelte-dnwsps"><!> <!></div>`),rt=L(`<div class="tooltip-row svelte-dnwsps"><span class="tooltip-meta svelte-dnwsps"> </span></div>`),it=L(`<span class="tooltip-dot svelte-dnwsps"></span>`),at=L(`<div class="tooltip-row svelte-dnwsps"><!> <span class="tooltip-meta svelte-dnwsps"> </span></div>`),ot=L(`<div class="floating-tooltip svelte-dnwsps"><strong class="tooltip-title svelte-dnwsps"> </strong> <div class="tooltip-row svelte-dnwsps"><span class="tooltip-dot svelte-dnwsps"></span> <span class="tooltip-meta svelte-dnwsps"> </span></div> <!> <!></div>`),st=L(`<button class="overflow-item svelte-dnwsps"><span class="chip-dot"></span> <span class="overflow-item-title svelte-dnwsps"> </span> <span class="overflow-item-type svelte-dnwsps"> </span></button>`),ct=L(`<div class="overflow-backdrop svelte-dnwsps"></div> <div class="overflow-popover svelte-dnwsps"><div class="overflow-list svelte-dnwsps"></div></div>`,1),lt=L(`<div class="calendar-view svelte-dnwsps"><div class="calendar-toolbar svelte-dnwsps"><!> <button><!></button> <!> <div class="toolbar-left svelte-dnwsps"><!> <!></div> <div class="month-nav svelte-dnwsps"><button class="nav-btn svelte-dnwsps"><!></button> <button class="month-label svelte-dnwsps"><span class="month-label-full svelte-dnwsps"> </span> <span class="month-label-short svelte-dnwsps"> </span></button> <button class="nav-btn svelte-dnwsps"><!></button></div> <div class="toolbar-right svelte-dnwsps"><!></div></div> <!></div> <!> <!>`,1);function ut(t,m){f(m,!0);let v=k(m,`lockedType`,3,null),y=k(m,`lockedFolder`,3,null),b=k(m,`lockedFolderPath`,3,null),x=k(m,`storageId`,3,null),T=k(m,`entities`,3,null),ee=k(m,`tagSource`,3,null),N=k(m,`selectedTags`,19,()=>[]),L=r(()=>{let e=ee()??T()??[],t=new Map;for(let n of e){let e=n.fields.tags;if(Array.isArray(e))for(let n of e){let e=String(n);t.set(e,(t.get(e)??0)+1)}}return[...t.entries()].sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({tag:e,count:t}))}),R=C(!1),z=C(`root`),Re=r(()=>_(z)===`mode`?`View`:_(z)===`sort`?`Sort by`:_(z)===`filter`?`Filter by tag`:`Options`);M(()=>{_(R)||P(z,`root`)});function ut(){P(z,`root`)}function dt(e){m.onTagsChange&&m.onTagsChange(e),P(R,!1)}let ft=r(()=>x()?`sg-calendarview-${x()}`:null);function pt(){if(!_(ft))return null;try{let e=localStorage.getItem(_(ft));if(e)return JSON.parse(e)}catch{}return null}function mt(){if(!_(ft))return;let e={selectedType:v()?null:_(V),dateField:_(H),year:_(U),month:_(W),day:_(G),mode:_(K)};localStorage.setItem(_(ft),JSON.stringify(e))}let ht=x()?`sg-calendarview-${x()}`:null,B=(()=>{if(!ht||typeof localStorage>`u`)return null;try{let e=localStorage.getItem(ht);return e?JSON.parse(e):null}catch{return null}})(),gt=new Date,V=C(E(v()??B?.selectedType??null)),H=C(E(B?.dateField??`due_date`)),U=C(E(B?.year??gt.getFullYear())),W=C(E(B?.month??gt.getMonth()+1)),G=C(E(B?.day??gt.getDate())),K=C(E(B?.mode??`month`)),_t=C(null);M(()=>{if(m.view&&m.view.id!==_(_t)){P(_t,m.view.id,!0);let e=pt();if(e)P(V,v()??e.selectedType??null,!0),P(H,e.dateField??`due_date`,!0),P(U,e.year??new Date().getFullYear(),!0),P(W,e.month??new Date().getMonth()+1,!0),P(G,e.day??new Date().getDate(),!0),P(K,e.mode??`month`,!0);else{let e=m.view.config;P(V,v()??e.selectedType??null,!0),P(H,e.calendar?.dateField??`due_date`,!0),P(U,e.calendar?.year??new Date().getFullYear(),!0),P(W,e.calendar?.month??new Date().getMonth()+1,!0),P(G,new Date().getDate(),!0),P(K,`month`)}}}),M(()=>{v()&&P(V,v())}),M(()=>{_(V),_(H),_(U),_(W),_(G),_(K),_(_t)!==null&&mt()});let q=r(()=>{if(T())return T().filter(e=>!_(V)||e.entityType===_(V));let e=[];for(let t of oe.repos)if(!(y()&&t.name!==y()))for(let n of t.entities)(!_(V)||n.entityType===_(V))&&e.push(n);return e}),vt=r(()=>{let e=new Set;for(let t of _(q))for(let n of Object.keys(t.fields))e.add(n);return e}),J=r(()=>je(_(V),_(vt))),yt=r(()=>_(J).find(e=>e.key===_(H))?.label??_(H));function bt(e){At(e),P(R,!1)}function xt(e){P(K,e,!0),P(R,!1)}M(()=>{_(J).length>0&&!_(J).some(e=>e.key===_(H))&&P(H,_(J)[0].key,!0)});let St=r(()=>_(K)===`week`?Pe(_(U),_(W),_(G),_(q),_(H)):Ne(_(U),_(W),_(q),_(H))),Ct=r(()=>_(K)===`week`?Fe(_(St)):`${Ie[_(W)-1]} ${_(U)}`),wt=r(()=>_(K)===`week`?Fe(_(St)):`${Ie[_(W)-1].slice(0,3)} ${_(U)}`);M(()=>{Ee.count=_(q).length}),te(()=>{Ee.count=null});function Tt(e){let t=new Date(_(U),_(W)-1,_(G));t.setDate(t.getDate()+e),P(U,t.getFullYear(),!0),P(W,t.getMonth()+1),P(G,t.getDate(),!0)}function Et(){_(K)===`week`?Tt(-7):_(W)===1?(P(W,12),I(U,-1)):I(W,-1)}function Dt(){_(K)===`week`?Tt(7):_(W)===12?(P(W,1),I(U)):I(W)}function Ot(){let e=new Date;P(U,e.getFullYear(),!0),P(W,e.getMonth()+1),P(G,e.getDate(),!0)}function kt(){P(K,_(K)===`month`?`week`:`month`,!0)}function At(e){e&&P(H,e,!0)}function jt(e){ie(`/${e.repo}/${e.entityType}/${e.id}`)}let Y=C(null),Mt=C(E({x:0,y:0})),Nt=C(!1),Pt=C(!1);function Ft(e,t){P(Nt,e+10+200>window.innerWidth),P(Pt,t+10+80>window.innerHeight),P(Mt,{x:_(Nt)?e-10:e+10,y:_(Pt)?t-10:t+10},!0)}function It(e,t){P(Y,t,!0),Ft(e.clientX,e.clientY)}function Lt(e){Ft(e.clientX,e.clientY)}function Rt(){P(Y,null)}let zt=C(E([])),Bt=C(E({x:0,y:0})),Vt=C(``);function Ht(e,t,n){e.stopPropagation(),P(zt,t,!0),P(Vt,new Date(n+`T00:00:00`).toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`}),!0);let r=e.currentTarget.getBoundingClientRect(),i=Math.min(320,t.length*36+40),a=r.left,o=r.bottom+4;a+260>window.innerWidth&&(a=window.innerWidth-260-8),a<8&&(a=8),o+i>window.innerHeight&&(o=r.top-i-4),o<8&&(o=8),P(Bt,{x:a,y:o},!0)}function Ut(){P(zt,[],!0)}let Wt=new Set([`created_at`,`updated_at`]),Gt=r(()=>!Wt.has(_(H))),X=C(null),Z=C(null);function Kt(e,t){P(X,t,!0),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t.id),Rt()}function qt(e,t){!_(X)||!_(Gt)||(e.preventDefault(),e.dataTransfer.dropEffect=`move`,P(Z,t,!0))}function Jt(){P(Z,null)}function Yt(){P(X,null),P(Z,null)}async function Xt(e,t){if(e.preventDefault(),!_(X))return;let n=_(X);P(X,null),P(Z,null);try{await ae(n.repo,n.entityType,n.id,{data:{[_(H)]:t}}),await oe.refreshEntities(n.repo)}catch(e){console.error(`Failed to update entity date:`,e)}}var Zt=lt(),Qt=j(Zt),$t=w(Qt),en=w($t),tn=e=>{Ae(e,{get repoName(){return y()},get currentPath(){return b()}})};l(en,e=>{y()&&b()&&e(tn)});var Q=O(en,2);let nn;ze(w(Q),{size:16}),h(Q);var rn=O(Q,2);i(rn,()=>ge,(t,o)=>{o(t,{get open(){return _(R)},set open(e){P(R,e,!0)},children:(t,o)=>{var u=Ye(),d=j(u);i(d,()=>me,(e,t)=>{t(e,{class:`toolbar-icon-btn mobile-overflow`,title:`More options`,"aria-label":`More options`,children:(e,t)=>{Se(e,{})},$$slots:{default:!0}})}),i(O(d,2),()=>fe,(t,o)=>{o(t,{side:`bottom`,class:`sg-mobile-sheet`,children:(t,o)=>{var u=Je(),d=j(u);i(d,()=>he,(e,t)=>{t(e,{class:`sg-sheet-header`,children:(e,t)=>{var r=Ve(),o=j(r),u=e=>{var t=Be();ke(w(t),{size:16}),h(t),g(`click`,t,ut),c(e,t)};l(o,e=>{_(z)!==`root`&&e(u)});var d=O(o,2);i(d,()=>pe,(e,t)=>{t(e,{class:`sg-sheet-title`,children:(e,t)=>{n();var r=s();A(()=>a(r,_(Re))),c(e,r)},$$slots:{default:!0}})}),i(O(d,2),()=>de,(e,t)=>{t(e,{class:`dialog-close-btn`,"aria-label":`Close`,children:(e,t)=>{ve(e,{size:16})},$$slots:{default:!0}})}),c(e,r)},$$slots:{default:!0}})});var f=O(d,2),v=e=>{{let t=r(()=>_(R)&&_(z)===`filter`);_e(e,{get visible(){return _(t)},get availableTags(){return _(L)},get selectedTags(){return N()},onApply:dt})}},y=t=>{var r=qe(),i=w(r),o=e=>{var t=We(),n=j(t),r=w(n),i=w(r);h(r);var o=O(r,2);ye(w(o),{size:16}),h(o),h(n);var s=O(n,2),u=e=>{var t=He(),n=w(t),r=w(n);h(n);var i=O(n,2);ye(w(i),{size:16}),h(i),h(t),A(()=>a(r,`Sort by ${_(yt)??``}`)),g(`click`,t,()=>P(z,`sort`)),c(e,t)};l(s,e=>{_(J).length>1&&e(u)});var d=O(s,2),f=e=>{var t=Ue(),n=w(t),r=w(n);h(n);var i=O(n,2);ye(w(i),{size:16}),h(i),h(t),A(()=>a(r,`Filter by ${(N().length===0?`None`:N().length===1?N()[0]:`${N().length} tags`)??``}`)),g(`click`,t,()=>P(z,`filter`)),c(e,t)};l(d,e=>{m.onTagsChange&&_(L).length>0&&e(f)}),A(()=>a(i,`View ${_(K)===`week`?`Week`:`Month`}`)),g(`click`,n,()=>P(z,`mode`)),c(e,t)},s=e=>{var t=Ge(),r=j(t);let i;var a=w(r),o=w(a),s=e=>{Ce(e,{size:16})};l(o,e=>{_(K)===`month`&&e(s)}),h(a),n(2),h(r);var u=O(r,2);let d;var f=w(u),p=w(f),m=e=>{Ce(e,{size:16})};l(p,e=>{_(K)===`week`&&e(m)}),h(f),n(2),h(u),A(()=>{i=F(r,1,`sg-sheet-row`,null,i,{selected:_(K)===`month`}),d=F(u,1,`sg-sheet-row`,null,d,{selected:_(K)===`week`})}),g(`click`,r,()=>xt(`month`)),g(`click`,u,()=>xt(`week`)),c(e,t)},u=t=>{var n=p();e(j(n),17,()=>_(J),D,(e,t)=>{var n=Ke();let r;var i=w(n),o=w(i),s=e=>{Ce(e,{size:16})};l(o,e=>{_(H)===_(t).key&&e(s)}),h(i);var u=O(i,2),d=w(u,!0);h(u),h(n),A(()=>{r=F(n,1,`sg-sheet-row`,null,r,{selected:_(H)===_(t).key}),a(d,_(t).label)}),g(`click`,n,()=>bt(_(t).key)),c(e,n)}),c(t,n)};l(i,e=>{_(z)===`root`?e(o):_(z)===`mode`?e(s,1):_(z)===`sort`&&e(u,2)}),h(r),c(t,r)};l(f,e=>{_(z)===`filter`?e(v):e(y,-1)}),c(t,u)},$$slots:{default:!0}})}),c(t,u)},$$slots:{default:!0}})});var an=O(rn,2),on=w(an),sn=t=>{var n=p();i(j(n),()=>ue,(t,n)=>{n(t,{type:`single`,get value(){return _(H)},onValueChange:At,children:(t,n)=>{var a=Xe(),o=j(a);{let e=r(()=>_(J).find(e=>e.key===_(H))?.label??_(H));i(o,()=>se,(t,n)=>{n(t,{size:`sm`,get value(){return _(e)}})})}i(O(o,2),()=>le,(t,n)=>{n(t,{align:`start`,children:(t,n)=>{var r=p();e(j(r),17,()=>_(J),D,(e,t)=>{var n=p();i(j(n),()=>ce,(e,n)=>{n(e,{get value(){return _(t).key},get label(){return _(t).label}})}),c(e,n)}),c(t,r)},$$slots:{default:!0}})}),c(t,a)},$$slots:{default:!0}})}),c(t,n)};l(on,e=>{_(J).length>1&&e(sn)});var cn=O(on,2),ln=e=>{var t=p();d(j(t),()=>m.toolbarLeft),c(e,t)};l(cn,e=>{m.toolbarLeft&&e(ln)}),h(an);var un=O(an,2),$=w(un);Oe(w($),{size:16}),h($);var dn=O($,2),fn=w(dn),pn=w(fn,!0);h(fn);var mn=O(fn,2),hn=w(mn,!0);h(mn),h(dn);var gn=O(dn,2);ye(w(gn),{size:16}),h(gn),h(un);var _n=O(un,2),vn=w(_n),yn=e=>{var t=p();d(j(t),()=>m.toolbarRight),c(e,t)};l(vn,e=>{m.toolbarRight&&e(yn)}),h(_n),h($t);var bn=O($t,2),xn=e=>{c(e,Ze())},Sn=t=>{var n=nt(),i=w(n);e(i,17,()=>Le,D,(e,t)=>{var n=Qe(),r=w(n,!0);h(n),A(()=>a(r,_(t))),c(e,n)}),e(O(i,2),17,()=>_(St),D,(t,n,i,s)=>{let u=r(()=>_(n).entities.length>2);var d=tt();let f;var p=w(d);let m;var v=w(p,!0);h(p);var y=O(p,2);e(y,21,()=>_(n).entities,D,(e,t)=>{let n=r(()=>xe(_(t).entityType));var i=$e();let s;var l=w(i),u=w(l,!0);h(l),h(i),A(e=>{s=S(i,``,s,{"border-left-color":_(n)}),a(u,e)},[()=>we(_(t).title)]),o(`dragstart`,i,e=>Kt(e,_(t))),o(`dragend`,i,Yt),g(`click`,i,()=>jt(_(t))),o(`mouseenter`,i,e=>It(e,_(t))),g(`mousemove`,i,Lt),o(`mouseleave`,i,Rt),c(e,i)}),h(y);var b=O(y,2),x=e=>{var t=et();A(()=>ne(t,`title`,`View all ${_(n).entities.length??``}`)),g(`click`,t,e=>Ht(e,_(n).entities,_(n).dateStr)),c(e,t)};l(b,e=>{_(u)&&e(x)}),h(d),A(()=>{f=F(d,1,`calendar-day svelte-dnwsps`,null,f,{"outside-month":!_(n).isCurrentMonth,today:_(n).isToday,"week-mode":_(K)===`week`,"has-overflow":_(u),"drop-target":_(Gt)&&_(Z)===_(n).dateStr}),m=F(p,1,`day-number svelte-dnwsps`,null,m,{"today-number":_(n).isToday}),a(v,_(n).day)}),o(`dragover`,d,e=>qt(e,_(n).dateStr)),o(`dragleave`,d,Jt),o(`drop`,d,e=>Xt(e,_(n).dateStr)),c(t,d)}),h(n),c(t,n)};l(bn,e=>{_(J).length===0?e(xn):e(Sn,-1)}),h(Qt);var Cn=O(Qt,2),wn=e=>{let t=r(()=>xe(_(Y).entityType)),n=r(()=>Me(_(Y),_(H)));var i=ot();let o;var s=w(i),u=w(s,!0);h(s);var d=O(s,2),f=w(d);let p;var m=O(f,2),g=w(m,!0);h(m),h(d);var v=O(d,2),y=e=>{var t=rt(),r=w(t),i=w(r,!0);h(r),h(t),A(e=>a(i,e),[()=>new Date(_(n)+`T00:00:00`).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})]),c(e,t)};l(v,e=>{_(n)&&e(y)});var b=O(v,2),x=e=>{let t=r(()=>De(_(Y).entityType,`status`,String(_(Y).fields.status)));var n=at(),i=w(n),o=e=>{var n=it();let r;A(()=>r=S(n,``,r,{background:_(t)})),c(e,n)};l(i,e=>{_(t)&&e(o)});var s=O(i,2),u=w(s,!0);h(s),h(n),A(e=>a(u,e),[()=>be(String(_(Y).fields.status))]),c(e,n)};l(b,e=>{_(Y).fields.status&&e(x)}),h(i),A((e,n)=>{o=S(i,``,o,{left:`${_(Mt).x??``}px`,top:`${_(Mt).y??``}px`,transform:`translate(${_(Nt)?`-100%`:`0`}, ${_(Pt)?`-100%`:`0`})`}),a(u,e),p=S(f,``,p,{background:_(t)}),a(g,n)},[()=>we(_(Y).title),()=>be(_(Y).entityType)]),c(e,i)};l(Cn,e=>{_(Y)&&e(wn)});var Tn=O(Cn,2),En=t=>{var n=ct(),i=j(n),o=O(i,2);let s;var l=w(o);e(l,21,()=>_(zt),D,(e,t)=>{let n=r(()=>xe(_(t).entityType));var i=st(),o=w(i);let s;var l=O(o,2),u=w(l,!0);h(l),re(l,e=>Te?.(e));var d=O(l,2),f=w(d,!0);h(d),h(i),A((e,t)=>{s=S(o,``,s,{background:_(n)}),a(u,e),a(f,t)},[()=>we(_(t).title),()=>be(_(t).entityType)]),g(`click`,i,()=>{Ut(),jt(_(t))}),c(e,i)}),h(l),h(o),A(()=>s=S(o,``,s,{left:`${_(Bt).x??``}px`,top:`${_(Bt).y??``}px`})),g(`click`,i,Ut),c(t,n)};l(Tn,e=>{_(zt).length>0&&e(En)}),A(()=>{nn=F(Q,1,`toolbar-icon-btn mode-toggle svelte-dnwsps`,null,nn,{active:_(K)===`week`}),ne(Q,`title`,_(K)===`week`?`Switch to month view`:`Switch to week view`),ne($,`title`,_(K)===`week`?`Previous week`:`Previous month`),a(pn,_(Ct)),a(hn,_(wt)),ne(gn,`title`,_(K)===`week`?`Next week`:`Next month`)}),g(`click`,Q,kt),g(`click`,$,Et),g(`click`,dn,Ot),g(`click`,gn,Dt),c(t,Zt),u()}m([`click`,`mousemove`]);export{ut as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{X as e,bt as t,ht as n,vt as r}from"./BopViJM2.js";import{t as i}from"./Ttel-lK0.js";function a(){let n=t(!1),a=t(!1);async function o(){try{r(n,!!(await i(`/api/preferences/settings`)).hide_home_starters)}catch{}finally{r(a,!0)}}async function s(t){let a=e(n);r(n,t,!0);try{await i(`/api/preferences/settings`,{method:`PATCH`,body:JSON.stringify({hide_home_starters:t})})}catch(e){throw r(n,a,!0),e}}return{get hideHomeStarters(){return e(n)},get loaded(){return e(a)},load:o,setHideHomeStarters:s}}var o=a(),s={meetingCapture:!0};function c(){let a=t(n({...s})),o=t(!1),c=t(!1),l=null;async function u(){if(!e(c))return l||(r(o,!0),l=(async()=>{try{let e=await i(`/api/features`);r(a,{...s,...e.flags},!0)}catch(e){console.error(`Failed to load feature flags:`,e),r(a,{...s},!0)}finally{r(o,!1),r(c,!0),l=null}})(),l)}function d(t){return e(a)[t]}return{get flags(){return e(a)},get loading(){return e(o)},get loaded(){return e(c)},get meetingCapture(){return e(a).meetingCapture},load:u,isEnabled:d}}var l=c();export{o as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,D as t,L as n,Nt as r,O as i,Pt as a,R as o,S as s,Vt as c,X as l,c as u,ft as d,mt as f,o as p,ot as m,pt as h,s as g,x as _,z as v}from"./BopViJM2.js";import"./t62M88qj.js";import{D as y}from"./3PDoQper.js";import{n as b,t as x}from"./CyIOloVT.js";import{t as S}from"./BxDor5Zk2.js";import{n as C,r as w,t as T}from"./BDOxjpyn2.js";import{n as E}from"./D5PXaoT_2.js";import{t as D}from"./DIc4IwPp2.js";function O(e,s){a(s,!0);let c=p(s,`open`,15,!1),l=g(s,[`$$slots`,`$$events`,`$$legacy`,`open`,`onOpenChange`,`children`]);var d=o();t(h(d),()=>w,(e,t)=>{t(e,u({get onOpenChange(){return s.onOpenChange}},()=>l,{get open(){return c()},set open(e){c(e)},children:(e,t)=>{var r=o();i(h(r),()=>s.children),n(e,r)},$$slots:{default:!0}}))}),n(e,d),r()}var k=v(`<!> <!>`,1);function A(s,c){a(c,!0);let d=p(c,`size`,3,`md`),m=g(c,[`$$slots`,`$$events`,`$$legacy`,`children`,`class`,`size`]);var _=o();t(h(_),()=>y,(r,a)=>{a(r,{children:(r,a)=>{var s=k(),p=h(s);t(p,()=>x,(e,t)=>{t(e,{class:`dialog-overlay`})});var g=f(p,2);{let r=e(()=>E(`dialog-content`,`dialog-${d()}`,c.class));t(g,()=>T,(e,t)=>{t(e,u({get class(){return l(r)}},()=>m,{children:(e,t)=>{var r=o();i(h(r),()=>c.children),n(e,r)},$$slots:{default:!0}}))})}n(r,s)},$$slots:{default:!0}})}),n(s,_),r()}var j=v(`<div><!></div>`);function M(e,t){a(t,!0);var o=j();i(d(o),()=>t.children),c(o),m(e=>_(o,1,e),[()=>s(E(`dialog-header`,t.class))]),n(e,o),r()}function N(s,c){a(c,!0);var u=o(),d=h(u);{let r=e(()=>E(`dialog-title`,c.class));t(d,()=>b,(e,t)=>{t(e,{get class(){return l(r)},children:(e,t)=>{var r=o();i(h(r),()=>c.children),n(e,r)},$$slots:{default:!0}})})}n(s,u),r()}function P(s,c){a(c,!0);var u=o(),d=h(u);{let r=e(()=>E(`dialog-description`,c.class));t(d,()=>S,(e,t)=>{t(e,{get class(){return l(r)},children:(e,t)=>{var r=o();i(h(r),()=>c.children),n(e,r)},$$slots:{default:!0}})})}n(s,u),r()}var F=v(`<div><!></div>`);function I(e,t){a(t,!0);var o=F();i(d(o),()=>t.children),c(o),m(e=>_(o,1,e),[()=>s(E(`dialog-body`,t.class))]),n(e,o),r()}var L=v(`<div><!></div>`);function R(e,t){a(t,!0);var o=L();i(d(o),()=>t.children),c(o),m(e=>_(o,1,e),[()=>s(E(`dialog-footer`,t.class))]),n(e,o),r()}function z(i,s){a(s,!0);var c=o(),u=h(c);{let n=e(()=>E(`dialog-close-btn`,s.class));t(u,()=>C,(e,t)=>{t(e,{get class(){return l(n)},children:(e,t)=>{D(e,{size:16})},$$slots:{default:!0}})})}n(i,c),r()}export{N as a,O as c,P as i,R as n,M as o,I as r,A as s,z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,G as n,H as r,L as i,M as a,Q as o,R as s,U as c,W as l,X as u,Z as d,at as ee,ct as te,dt as f,it as ne,lt as re,nt as ie,o as ae,p as oe,q as p,rt as m,st as se,ut as ce,x as le}from"./Bq4V4cTS2.js";var h={cullArea:null,cullable:!1,cullableChildren:!0},g=class e{constructor(e,t,n){this._x=t||0,this._y=n||0,this._observer=e}clone(t){return new e(t??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}},ue={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(e){typeof e==`boolean`&&e===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(e===!0?{}:e))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(e){o(`v8.6.0`,`cacheAsBitmap is deprecated, use cacheAsTexture instead.`),this.cacheAsTexture(e)}};function _(e,t,n){let r=e.length,i;if(t>=r||n===0)return;n=t+n>r?r-t:n;let a=r-n;for(i=t;i<a;++i)e[i]=e[i+n];e.length=a}var v={allowChildren:!0,removeChildren(e=0,t){let n=t??this.children.length,r=n-e,i=[];if(r>0&&r<=n){for(let t=n-1;t>=e;t--){let e=this.children[t];e&&(i.push(e),e.parent=null)}_(this.children,e,n);let t=this.renderGroup||this.parentRenderGroup;t&&t.removeChildren(i);for(let e=0;e<i.length;++e){let t=i[e];t.parentRenderLayer?.detach(t),this.emit(`childRemoved`,t,this,e),i[e].emit(`removed`,this)}return i.length>0&&this._didViewChangeTick++,i}else if(r===0&&this.children.length===0)return i;throw RangeError(`removeChildren: numeric values are outside the acceptable range.`)},removeChildAt(e){let t=this.getChildAt(e);return this.removeChild(t)},getChildAt(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]},setChildIndex(e,t){if(t<0||t>=this.children.length)throw Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(e),this.addChildAt(e,t)},getChildIndex(e){let t=this.children.indexOf(e);if(t===-1)throw Error(`The supplied Container must be a child of the caller`);return t},addChildAt(t,n){this.allowChildren||o(e,`addChildAt: Only Containers will be allowed to add children in v8.0.0`);let{children:r}=this;if(n<0||n>r.length)throw Error(`${t}addChildAt: The index ${n} supplied is out of bounds ${r.length}`);let i=t.parent===this;if(t.parent){let e=t.parent.children.indexOf(t);if(i){if(e===n)return t;t.parent.children.splice(e,1)}else t.removeFromParent()}n===r.length?r.push(t):r.splice(n,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;let a=this.renderGroup||this.parentRenderGroup;return a&&a.addChild(t),this.sortableChildren&&(this.sortDirty=!0),i?t:(this.emit(`childAdded`,t,this,n),t.emit(`added`,this),t)},swapChildren(e,t){if(e===t)return;let n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e;let i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...e){return e.length===1?this.reparentChildAt(e[0],this.children.length):(e.forEach(e=>this.reparentChildAt(e,this.children.length)),e[0])},reparentChildAt(e,t){if(e.parent===this)return this.setChildIndex(e,t),e;let n=e.worldTransform.clone();e.removeFromParent(),this.addChildAt(e,t);let r=this.worldTransform.clone();return r.invert(),n.prepend(r),e.setFromMatrix(n),e},replaceChild(e,t){e.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(e)),t.setFromMatrix(e.localTransform),t.updateLocalTransform(),this.removeChild(e)}},y={collectRenderables(e,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(e,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,e):this.collectRenderablesWithEffects(e,t,n))},collectRenderablesSimple(e,t,n){let r=this.children,i=r.length;for(let a=0;a<i;a++)r[a].collectRenderables(e,t,n)},collectRenderablesWithEffects(e,t,n){let{renderPipes:r}=t;for(let t=0;t<this.effects.length;t++){let n=this.effects[t];r[n.pipe].push(n,this,e)}this.collectRenderablesSimple(e,t,n);for(let t=this.effects.length-1;t>=0;t--){let n=this.effects[t];r[n.pipe].pop(n,this,e)}}},b=class{constructor(){this.pipe=`filter`,this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}},de=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let t=0;t<this._tests.length;t++){let n=this._tests[t];if(n.test(e))return p.get(n.maskClass,e)}return e}returnMaskEffect(e){p.return(e)}},x=new de;f.handleByList(ce.MaskEffect,x._effectClasses);var fe={_maskEffect:null,_maskOptions:{inverse:!1,channel:`red`},_filterEffect:null,effects:[],_markStructureAsChanged(){let e=this.renderGroup||this.parentRenderGroup;e&&(e.structureDidChange=!0)},addEffect(e){this.effects.indexOf(e)===-1&&(this.effects.push(e),this.effects.sort((e,t)=>e.priority-t.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(e){let t=this.effects.indexOf(e);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(e){let t=this._maskEffect;t?.mask!==e&&(t&&(this.removeEffect(t),x.returnMaskEffect(t),this._maskEffect=null),e!=null&&(this._maskEffect=x.getMaskEffect(e),this.addEffect(this._maskEffect)))},get mask(){return this._maskEffect?.mask},setMask(e){this._maskOptions={...this._maskOptions,...e},e.mask&&(this.mask=e.mask),this._markStructureAsChanged()},set filters(e){!Array.isArray(e)&&e&&(e=[e]);let t=this._filterEffect||=new b;e=e;let n=e?.length>0,r=n!==t.filters?.length>0;e=Array.isArray(e)?e.slice(0):e,t.filters=Object.freeze(e),r&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=e??null))},get filters(){return this._filterEffect?.filters},set filterArea(e){this._filterEffect||=new b,this._filterEffect.filterArea=e},get filterArea(){return this._filterEffect?.filterArea}},pe={label:null,get name(){return o(e,`Container.name property has been removed, use Container.label instead`),this.label},set name(t){o(e,`Container.name property has been removed, use Container.label instead`),this.label=t},getChildByName(e,t=!1){return this.getChildByLabel(e,t)},getChildByLabel(e,t=!1){let n=this.children;for(let t=0;t<n.length;t++){let r=n[t];if(r.label===e||e instanceof RegExp&&e.test(r.label))return r}if(t)for(let t=0;t<n.length;t++){let r=n[t].getChildByLabel(e,!0);if(r)return r}return null},getChildrenByLabel(e,t=!1,n=[]){let r=this.children;for(let t=0;t<r.length;t++){let i=r[t];(i.label===e||e instanceof RegExp&&e.test(i.label))&&n.push(i)}if(t)for(let t=0;t<r.length;t++)r[t].getChildrenByLabel(e,!0,n);return n}},S=p.getPool(m),C=p.getPool(n),me=new m,he={getFastGlobalBounds(e,t){t||=new n,t.clear(),this._getGlobalBoundsRecursive(!!e,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let r=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(r.worldTransform),t},_getGlobalBoundsRecursive(e,t,n){let r=t;if(e&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;let i=!!this.effects.length;if((this.renderGroup||i)&&(r=C.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){let e=this.bounds;r.addFrame(e.minX,e.minY,e.maxX,e.maxY,this.groupTransform)}let t=this.children;for(let i=0;i<t.length;i++)t[i]._getGlobalBoundsRecursive(e,r,n)}if(i){let e=!1,n=this.renderGroup||this.parentRenderGroup;for(let t=0;t<this.effects.length;t++)this.effects[t].addBounds&&(e||(e=!0,r.applyMatrix(n.worldTransform)),this.effects[t].addBounds(r,!0));e&&r.applyMatrix(n.worldTransform.copyTo(me).invert()),t.addBounds(r),C.return(r)}else this.renderGroup&&(t.addBounds(r,this.relativeGroupTransform),C.return(r))}};function ge(e,t,n){n.clear();let r,i;return e.parent?t?r=e.parent.worldTransform:(i=S.get().identity(),r=T(e,i)):r=m.IDENTITY,w(e,n,r,t),i&&S.return(i),n.isValid||n.set(0,0,0,0),n}function w(e,t,n,r){if(!e.visible||!e.measurable)return;let i;r?i=e.worldTransform:(e.updateLocalTransform(),i=S.get(),i.appendFrom(e.localTransform,n));let a=t,o=!!e.effects.length;if(o&&(t=C.get().clear()),e.boundsArea)t.addRect(e.boundsArea,i);else{let n=e.bounds;n&&!n.isEmpty()&&(t.matrix=i,t.addBounds(n));for(let n=0;n<e.children.length;n++)w(e.children[n],t,i,r)}if(o){for(let n=0;n<e.effects.length;n++)e.effects[n].addBounds?.(t);a.addBounds(t,m.IDENTITY),C.return(t)}r||S.return(i)}function T(e,t){let n=e.parent;return n&&(T(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}var E=16777215;function D(e,t){return e===E?t:t===E?e:l(e,t)}function O(e){return((e&255)<<16)+(e&65280)+(e>>16&255)}var k={getGlobalAlpha(e){if(e)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,n=this.parent;for(;n;)t*=n.alpha,n=n.parent;return t},getGlobalTransform(e=new m,t){if(t)return e.copyFrom(this.worldTransform);this.updateLocalTransform();let n=T(this,S.get().identity());return e.appendFrom(this.localTransform,n),S.return(n),e},getGlobalTint(e){if(e)return this.renderGroup?O(this.renderGroup.worldColor):this.parentRenderGroup?O(D(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=D(t,n.localColor),n=n.parent;return O(t)}};function A(e,t,n){return t.clear(),n||=m.IDENTITY,j(e,t,n,e,!0),t.isValid||t.set(0,0,0,0),t}function j(e,t,n,r,i){let a;if(i)a=S.get(),a=n.copyTo(a);else{if(!e.visible||!e.measurable)return;e.updateLocalTransform();let t=e.localTransform;a=S.get(),a.appendFrom(t,n)}let o=t,s=!!e.effects.length;if(s&&(t=C.get().clear()),e.boundsArea)t.addRect(e.boundsArea,a);else{e.renderPipeId&&(t.matrix=a,t.addBounds(e.bounds));let n=e.children;for(let e=0;e<n.length;e++)j(n[e],t,a,r,!1)}if(s){for(let n=0;n<e.effects.length;n++)e.effects[n].addLocalBounds?.(t,r);o.addBounds(t,m.IDENTITY),C.return(t)}S.return(a)}function M(e,t){let n=e.children;for(let e=0;e<n.length;e++){let r=n[e],i=r.uid,a=(r._didViewChangeTick&65535)<<16|r._didContainerChangeTick&65535,o=t.index;(t.data[o]!==i||t.data[o+1]!==a)&&(t.data[t.index]=i,t.data[t.index+1]=a,t.didChange=!0),t.index=o+2,r.children.length&&M(r,t)}return t.didChange}var _e=new m,N={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(e,t){let n=Math.sign(this.scale.x)||1;t===0?this.scale.x=n:this.scale.x=e/t*n},_setHeight(e,t){let n=Math.sign(this.scale.y)||1;t===0?this.scale.y=n:this.scale.y=e/t*n},getLocalBounds(){this._localBoundsCacheData||={data:[],index:1,didChange:!1,localBounds:new n};let e=this._localBoundsCacheData;return e.index=1,e.didChange=!1,e.data[0]!==this._didViewChangeTick&&(e.didChange=!0,e.data[0]=this._didViewChangeTick),M(this,e),e.didChange&&A(this,e.localBounds,_e),e.localBounds},getBounds(e,t){return ge(this,e,t||new n)}},P={_onRender:null,set onRender(e){let t=this.renderGroup||this.parentRenderGroup;if(!e){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=e},get onRender(){return this._onRender}},F={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(e){this._zIndex!==e&&(this._zIndex=e,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(ve))}};function ve(e,t){return e._zIndex-t._zIndex}var I={getGlobalPosition(e=new ne,t=!1){return this.parent?this.parent.toGlobal(this._position,e,t):(e.x=this._position.x,e.y=this._position.y),e},toGlobal(e,t,n=!1){let r=this.getGlobalTransform(S.get(),n);return t=r.apply(e,t),S.return(r),t},toLocal(e,t,n,r){t&&(e=t.toGlobal(e,n,r));let i=this.getGlobalTransform(S.get(),r);return n=i.applyInverse(e,n),S.return(i),n}},ye=0,L=class{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new s(this.textureOptions)}createTexture(e,t,n,r){return new a({source:new i({...this.textureOptions,width:e,height:t,resolution:1,antialias:n,autoGarbageCollect:!1,autoGenerateMipmaps:r}),label:`texturePool_${ye++}`})}getOptimalTexture(e,t,n=1,i,a=!1){let o=Math.ceil(e*n-1e-6),s=Math.ceil(t*n-1e-6);o=r(o),s=r(s);let c=+!!i,l=+!!a,u=(o<<17)+(s<<2)+(l<<1)+c;this._texturePool[u]||(this._texturePool[u]=[]);let d=this._texturePool[u].pop();return d||=this.createTexture(o,s,i,a),d.source._resolution=n,d.source.width=o/n,d.source.height=s/n,d.source.pixelWidth=o,d.source.pixelHeight=s,d.frame.x=0,d.frame.y=0,d.frame.width=e,d.frame.height=t,d.updateUvs(),this._poolKeyHash[d.uid]=u,d}getSameSizeTexture(e,t=!1){let n=e.source;return this.getOptimalTexture(e.width,e.height,n._resolution,t)}returnTexture(e,t=!1){let n=this._poolKeyHash[e.uid];t&&(e.source.style=this.textureStyle),this._texturePool[n].push(e)}clear(e){if(e=e!==!1,e)for(let e in this._texturePool){let t=this._texturePool[e];if(t)for(let e=0;e<t.length;e++)t[e].destroy(!0)}this._texturePool={}}},R=new L;u.register(R);var z=class{constructor(){this.renderPipeId=`renderGroup`,this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new m,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new c,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;let t=e.children;for(let e=0;e<t.length;e++){let n=t[e];n._updateFlags=15,this.addChild(n)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&=(R.returnTexture(this.texture,!0),null)}updateCacheTexture(){this.textureNeedsUpdate=!0;let e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(let e in this.childrenToUpdate){let t=this.childrenToUpdate[e];t.list.fill(null),t.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){let t=this.renderGroupChildren.indexOf(e);t>-1&&this.renderGroupChildren.splice(t,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);let t=e.children;for(let e=0;e<t.length;e++)this.addChild(t[e])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}let t=e.children;for(let e=0;e<t.length;e++)this.removeChild(t[e])}removeChildren(e){for(let t=0;t<e.length;t++)this.removeChild(e[t])}onChildUpdate(e){let t=this.childrenToUpdate[e.relativeRenderGroupDepth];t||=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]},t.list[t.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let t=0;t<this._onRenderContainers.length;t++)this._onRenderContainers[t]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){let t=this.root.children;for(let n=0;n<t.length;n++)this._getChildren(t[n],e);return e}_getChildren(e,t=[]){if(t.push(e),e.renderGroup)return t;let n=e.children;for(let e=0;e<n.length;e++)this._getChildren(n[e],t);return t}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return this._matrixDirty&1?(this._matrixDirty&=-2,this._inverseWorldTransform||=new m,this._inverseWorldTransform.copyFrom(this.worldTransform).invert()):this._inverseWorldTransform}get textureOffsetInverseTransform(){return this._matrixDirty&2?(this._matrixDirty&=-3,this._textureOffsetInverseTransform||=new m,this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y)):this._textureOffsetInverseTransform}get inverseParentTextureTransform(){if(!(this._matrixDirty&4))return this._inverseParentTextureTransform;this._matrixDirty&=-5;let e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||=new m,this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}};function be(e,t,n={}){for(let r in t)!n[r]&&t[r]!==void 0&&(e[r]=t[r])}var B=new g(null),V=new g(null),H=new g(null,1,1),U=new g(null),xe=1,Se=2,Ce=4,we=8,W=class t extends re{constructor(e={}){super(),this.uid=ie(`renderable`),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new m,this.relativeGroupTransform=new m,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new g(this,0,0),this._scale=H,this._pivot=V,this._origin=U,this._skew=B,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode=`inherit`,this.groupBlendMode=`normal`,this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],be(this,e,{children:!0,parent:!0,effects:!0}),e.children?.forEach(e=>this.addChild(e)),e.parent?.addChild(this)}static mixin(e){o(`8.8.0`,`Container.mixin is deprecated, please use extensions.mixin instead.`),f.mixin(t,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||o(e,`addChild: Only Containers will be allowed to add children in v8.0.0`),t.length>1){for(let e=0;e<t.length;e++)this.addChild(t[e]);return t[0]}let n=t[0],r=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),r&&(r.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,r&&r.addChild(n),this.emit(`childAdded`,n,this,this.children.length-1),n.emit(`added`,this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...e){if(e.length>1){for(let t=0;t<e.length;t++)this.removeChild(e[t]);return e[0]}let t=e[0],n=this.children.indexOf(t);return n>-1&&(this._didViewChangeTick++,this.children.splice(n,1),this.renderGroup?this.renderGroup.removeChild(t):this.parentRenderGroup&&this.parentRenderGroup.removeChild(t),t.parentRenderLayer&&t.parentRenderLayer.detach(t),t.parent=null,this.emit(`childRemoved`,t,this,n),t.emit(`removed`,this)),t}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let e=this.parentRenderGroup;e?.removeChild(this),this.renderGroup=p.get(z,this),this.groupTransform=m.IDENTITY,e?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let e=this.parentRenderGroup;e?.removeChild(this),p.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||=new m,this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*se}set angle(e){this.rotation=e*ee}get pivot(){return this._pivot===V&&(this._pivot=new g(this,0,0)),this._pivot}set pivot(e){this._pivot===V&&(this._pivot=new g(this,0,0),this._origin!==U&&d(`Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.`)),typeof e==`number`?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===B&&(this._skew=new g(this,0,0)),this._skew}set skew(e){this._skew===B&&(this._skew=new g(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===H&&(this._scale=new g(this,1,1)),this._scale}set scale(e){this._scale===H&&(this._scale=new g(this,0,0)),typeof e==`string`&&(e=parseFloat(e)),typeof e==`number`?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===U&&(this._origin=new g(this,0,0)),this._origin}set origin(e){this._origin===U&&(this._origin=new g(this,0,0),this._pivot!==V&&d(`Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.`)),typeof e==`number`?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){let t=this.getLocalBounds().width;this._setWidth(e,t)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){let t=this.getLocalBounds().height;this._setHeight(e,t)}getSize(e){e||={};let t=this.getLocalBounds();return e.width=Math.abs(this.scale.x*t.width),e.height=Math.abs(this.scale.y*t.height),e}setSize(e,t){let n=this.getLocalBounds();typeof e==`object`?(t=e.height??e.width,e=e.width):t??=e,e!==void 0&&this._setWidth(e,n.width),t!==void 0&&this._setHeight(t,n.height)}_updateSkew(){let e=this._rotation,t=this._skew;this._cx=Math.cos(e+t._y),this._sx=Math.sin(e+t._y),this._cy=-Math.sin(e-t._x),this._sy=Math.cos(e-t._x)}updateTransform(e){return this.position.set(typeof e.x==`number`?e.x:this.position.x,typeof e.y==`number`?e.y:this.position.y),this.scale.set(typeof e.scaleX==`number`?e.scaleX||1:this.scale.x,typeof e.scaleY==`number`?e.scaleY||1:this.scale.y),this.rotation=typeof e.rotation==`number`?e.rotation:this.rotation,this.skew.set(typeof e.skewX==`number`?e.skewX:this.skew.x,typeof e.skewY==`number`?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX==`number`?e.pivotX:this.pivot.x,typeof e.pivotY==`number`?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX==`number`?e.originX:this.origin.x,typeof e.originY==`number`?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){let e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;let t=this.localTransform,n=this._scale,r=this._pivot,i=this._origin,a=this._position,o=n._x,s=n._y,c=r._x,l=r._y,u=-i._x,d=-i._y;t.a=this._cx*o,t.b=this._sx*o,t.c=this._cy*s,t.d=this._sy*s,t.tx=a._x-(c*t.a+l*t.c)+(u*t.a+d*t.c)-u,t.ty=a._y-(c*t.b+l*t.d)+(u*t.b+d*t.d)-d}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=1,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){let t=te.shared.setValue(e??16777215).toBgrNumber();t!==this.localColor&&(this.localColor=t,this._updateFlags|=1,this._onUpdate())}get tint(){return O(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=2,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){let t=e?2:0;(this.localDisplayStatus&2)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=4,this.localDisplayStatus^=2,this._onUpdate(),this.emit(`visibleChanged`,e))}get culled(){return!(this.localDisplayStatus&4)}set culled(e){let t=e?0:4;(this.localDisplayStatus&4)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=4,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){let t=+!!e;(this.localDisplayStatus&1)!==t&&(this._updateFlags|=4,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){if(this.destroyed)return;this.destroyed=!0;let t;if(this.children.length&&(t=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit(`destroyed`,this),this.removeAllListeners(),(typeof e==`boolean`?e:e?.children)&&t)for(let n=0;n<t.length;++n)t[n].destroy(e);this.renderGroup?.destroy(),this.renderGroup=null}};f.mixin(W,v,he,I,P,N,fe,pe,F,h,ue,k,y);var G=(e=>(e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`,e))(G||{}),K=class{constructor(e,t=null,n=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=t,this.priority=n,this._once=r}match(e,t=null){return this._fn===e&&this._context===t}emit(e){this._fn&&(this._context?this._fn.call(this._context,e):this._fn(e));let t=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let t=this.next;return this.next=e?null:t,this.previous=null,t}},Te=class e{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new K(null,null,1/0),this.deltaMS=1/e.targetFPMS,this.elapsedMS=1/e.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=G.NORMAL){return this._addListener(new K(e,t,n))}addOnce(e,t,n=G.NORMAL){return this._addListener(new K(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){let e=t-this._lastFrame|0;if(e<this._minElapsedMS)return;this._lastFrame=t-e%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*e.targetFPMS;let r=this._head,i=r.next;for(;i;)i=i.emit(this);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){let n=Math.min(Math.max(0,t)/1e3,e.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){e===0?this._minElapsedMS=0:(e<this.minFPS&&(this.minFPS=e),this._minElapsedMS=1/(e/1e3))}static get shared(){if(!e._shared){let t=e._shared=new e;t.autoStart=!0,t._protected=!0}return e._shared}static get system(){if(!e._system){let t=e._system=new e;t.autoStart=!0,t._protected=!0}return e._system}};Te.targetFPMS=.06;var Ee=Te,De=class extends W{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new n(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=+!!e}containsPoint(e){let t=this.bounds,{x:n,y:r}=e;return n>=t.minX&&n<=t.maxX&&r>=t.minY&&r<=t.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(e){this.unload(),super.destroy(e),this._bounds=null}collectRenderablesSimple(e,t,n){let{renderPipes:r}=t;r.blendMode.pushBlendMode(this,this.groupBlendMode,e);let i=r[this.renderPipeId];i?.addRenderable&&i.addRenderable(this,e),this.didViewUpdate=!1;let a=this.children,o=a.length;for(let r=0;r<o;r++)a[r].collectRenderables(e,t,n);r.blendMode.popBlendMode(e)}};function Oe(e,t,n){let{width:r,height:i}=n.orig,a=n.trim;if(a){let n=a.width,o=a.height;e.minX=a.x-t._x*r,e.maxX=e.minX+n,e.minY=a.y-t._y*i,e.maxY=e.minY+o}else e.minX=-t._x*r,e.maxX=e.minX+r,e.minY=-t._y*i,e.maxY=e.minY+i}var ke=class e extends De{constructor(e=a.EMPTY){e instanceof a&&(e={texture:e});let{texture:t=a.EMPTY,anchor:n,roundPixels:r,width:i,height:o,...s}=e;super({label:`Sprite`,...s}),this.renderPipeId=`sprite`,this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new g({_onUpdate:()=>{this.onViewUpdate()}}),n?this.anchor=n:t.defaultAnchor&&(this.anchor=t.defaultAnchor),this.texture=t,this.allowChildren=!1,this.roundPixels=r??!1,i!==void 0&&(this.width=i),o!==void 0&&(this.height=o)}static from(t,n=!1){return t instanceof a?new e(t):new e(a.from(t,n))}set texture(e){e||=a.EMPTY;let t=this._texture;t!==e&&(t&&t.dynamic&&t.off(`update`,this.onViewUpdate,this),e.dynamic&&e.on(`update`,this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Oe(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return o(`8.6.1`,`Sprite.sourceBounds is deprecated, use visualBounds instead.`),this.visualBounds}updateBounds(){let e=this._anchor,t=this._texture,n=this._bounds,{width:r,height:i}=t.orig;n.minX=-e._x*r,n.maxX=n.minX+r,n.minY=-e._y*i,n.maxY=n.minY+i}destroy(e=!1){if(super.destroy(e),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._texture.destroy(t)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(e){typeof e==`number`?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||={},e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,t){typeof e==`object`?(t=e.height??e.width,e=e.width):t??=e,e!==void 0&&this._setWidth(e,this._texture.orig.width),t!==void 0&&this._setHeight(t,this._texture.orig.height)}},Ae=class extends i{constructor(e){e.resource||=t.get().createCanvas(),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId=`image`,this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&`style`in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,t=this.height,n=this._resolution){let r=super.resize(e,t,n);return r&&this.resizeCanvas(),r}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||=this.resource.getContext(`2d`)}};Ae.extension=ce.TextureSource;var je={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},q=0,J=1,Y=2,X=3,Z=4,Q=5,$=class e{constructor(){this.data=0,this.blendMode=`normal`,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<q)}set blend(e){!!(this.data&1<<q)!==e&&(this.data^=1<<q)}get offsets(){return!!(this.data&1<<J)}set offsets(e){!!(this.data&1<<J)!==e&&(this.data^=1<<J)}set cullMode(e){if(e===`none`){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=e===`front`}get cullMode(){return this.culling?this.clockwiseFrontFace?`front`:`back`:`none`}get culling(){return!!(this.data&1<<Y)}set culling(e){!!(this.data&1<<Y)!==e&&(this.data^=1<<Y)}get depthTest(){return!!(this.data&1<<X)}set depthTest(e){!!(this.data&1<<X)!==e&&(this.data^=1<<X)}get depthMask(){return!!(this.data&1<<Q)}set depthMask(e){!!(this.data&1<<Q)!==e&&(this.data^=1<<Q)}get clockwiseFrontFace(){return!!(this.data&1<<Z)}set clockwiseFrontFace(e){!!(this.data&1<<Z)!==e&&(this.data^=1<<Z)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==`none`,this._blendMode=e,this._blendModeId=je[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let t=new e;return t.depthTest=!1,t.blend=!0,t}};$.default2d=$.for2d();var Me=$,Ne=class e extends ae{constructor(t){t={...e.defaultOptions,...t},super(t),this.enabled=!0,this._state=Me.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias==`boolean`?this.antialias=t.antialias?`on`:`off`:this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource(`uTexture`,0,1),t.blendRequired&&this.addResource(`uBackTexture`,0,3)}apply(e,t,n,r){e.applyFilter(this,t,n,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(t){let{gpu:n,gl:r,...i}=t,a,o;return n&&(a=oe.from(n)),r&&(o=le.from(r)),new e({gpuProgram:a,glProgram:o,...i})}};Ne.defaultOptions={blendMode:`normal`,resolution:1,padding:0,antialias:`off`,blendRequired:!1,clipToViewport:!0};var Pe=Ne;export{he as A,_ as B,M as C,D,k as E,x as F,g as H,de as I,b as L,S as M,pe as N,ge as O,fe as P,y as R,N as S,O as T,h as U,ue as V,R as _,Oe as a,F as b,K as c,Se as d,xe as f,z as g,be as h,ke as i,C as j,T as k,G as l,Ce as m,Me as n,De as o,we as p,Ae as r,Ee as s,Pe as t,W as u,L as v,A as w,P as x,I as y,v as z};
|
|
1
|
+
import{$ as e,A as t,G as n,H as r,L as i,M as a,Q as o,R as s,U as c,W as l,X as u,Z as d,at as ee,ct as te,dt as f,it as ne,lt as re,nt as ie,o as ae,p as oe,q as p,rt as m,st as se,ut as ce,x as le}from"./CbVWlLYp2.js";var h={cullArea:null,cullable:!1,cullableChildren:!0},g=class e{constructor(e,t,n){this._x=t||0,this._y=n||0,this._observer=e}clone(t){return new e(t??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}},ue={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(e){typeof e==`boolean`&&e===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(e===!0?{}:e))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(e){o(`v8.6.0`,`cacheAsBitmap is deprecated, use cacheAsTexture instead.`),this.cacheAsTexture(e)}};function _(e,t,n){let r=e.length,i;if(t>=r||n===0)return;n=t+n>r?r-t:n;let a=r-n;for(i=t;i<a;++i)e[i]=e[i+n];e.length=a}var v={allowChildren:!0,removeChildren(e=0,t){let n=t??this.children.length,r=n-e,i=[];if(r>0&&r<=n){for(let t=n-1;t>=e;t--){let e=this.children[t];e&&(i.push(e),e.parent=null)}_(this.children,e,n);let t=this.renderGroup||this.parentRenderGroup;t&&t.removeChildren(i);for(let e=0;e<i.length;++e){let t=i[e];t.parentRenderLayer?.detach(t),this.emit(`childRemoved`,t,this,e),i[e].emit(`removed`,this)}return i.length>0&&this._didViewChangeTick++,i}else if(r===0&&this.children.length===0)return i;throw RangeError(`removeChildren: numeric values are outside the acceptable range.`)},removeChildAt(e){let t=this.getChildAt(e);return this.removeChild(t)},getChildAt(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]},setChildIndex(e,t){if(t<0||t>=this.children.length)throw Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(e),this.addChildAt(e,t)},getChildIndex(e){let t=this.children.indexOf(e);if(t===-1)throw Error(`The supplied Container must be a child of the caller`);return t},addChildAt(t,n){this.allowChildren||o(e,`addChildAt: Only Containers will be allowed to add children in v8.0.0`);let{children:r}=this;if(n<0||n>r.length)throw Error(`${t}addChildAt: The index ${n} supplied is out of bounds ${r.length}`);let i=t.parent===this;if(t.parent){let e=t.parent.children.indexOf(t);if(i){if(e===n)return t;t.parent.children.splice(e,1)}else t.removeFromParent()}n===r.length?r.push(t):r.splice(n,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;let a=this.renderGroup||this.parentRenderGroup;return a&&a.addChild(t),this.sortableChildren&&(this.sortDirty=!0),i?t:(this.emit(`childAdded`,t,this,n),t.emit(`added`,this),t)},swapChildren(e,t){if(e===t)return;let n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e;let i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...e){return e.length===1?this.reparentChildAt(e[0],this.children.length):(e.forEach(e=>this.reparentChildAt(e,this.children.length)),e[0])},reparentChildAt(e,t){if(e.parent===this)return this.setChildIndex(e,t),e;let n=e.worldTransform.clone();e.removeFromParent(),this.addChildAt(e,t);let r=this.worldTransform.clone();return r.invert(),n.prepend(r),e.setFromMatrix(n),e},replaceChild(e,t){e.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(e)),t.setFromMatrix(e.localTransform),t.updateLocalTransform(),this.removeChild(e)}},y={collectRenderables(e,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(e,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,e):this.collectRenderablesWithEffects(e,t,n))},collectRenderablesSimple(e,t,n){let r=this.children,i=r.length;for(let a=0;a<i;a++)r[a].collectRenderables(e,t,n)},collectRenderablesWithEffects(e,t,n){let{renderPipes:r}=t;for(let t=0;t<this.effects.length;t++){let n=this.effects[t];r[n.pipe].push(n,this,e)}this.collectRenderablesSimple(e,t,n);for(let t=this.effects.length-1;t>=0;t--){let n=this.effects[t];r[n.pipe].pop(n,this,e)}}},b=class{constructor(){this.pipe=`filter`,this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}},de=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let t=0;t<this._tests.length;t++){let n=this._tests[t];if(n.test(e))return p.get(n.maskClass,e)}return e}returnMaskEffect(e){p.return(e)}},x=new de;f.handleByList(ce.MaskEffect,x._effectClasses);var fe={_maskEffect:null,_maskOptions:{inverse:!1,channel:`red`},_filterEffect:null,effects:[],_markStructureAsChanged(){let e=this.renderGroup||this.parentRenderGroup;e&&(e.structureDidChange=!0)},addEffect(e){this.effects.indexOf(e)===-1&&(this.effects.push(e),this.effects.sort((e,t)=>e.priority-t.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(e){let t=this.effects.indexOf(e);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(e){let t=this._maskEffect;t?.mask!==e&&(t&&(this.removeEffect(t),x.returnMaskEffect(t),this._maskEffect=null),e!=null&&(this._maskEffect=x.getMaskEffect(e),this.addEffect(this._maskEffect)))},get mask(){return this._maskEffect?.mask},setMask(e){this._maskOptions={...this._maskOptions,...e},e.mask&&(this.mask=e.mask),this._markStructureAsChanged()},set filters(e){!Array.isArray(e)&&e&&(e=[e]);let t=this._filterEffect||=new b;e=e;let n=e?.length>0,r=n!==t.filters?.length>0;e=Array.isArray(e)?e.slice(0):e,t.filters=Object.freeze(e),r&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=e??null))},get filters(){return this._filterEffect?.filters},set filterArea(e){this._filterEffect||=new b,this._filterEffect.filterArea=e},get filterArea(){return this._filterEffect?.filterArea}},pe={label:null,get name(){return o(e,`Container.name property has been removed, use Container.label instead`),this.label},set name(t){o(e,`Container.name property has been removed, use Container.label instead`),this.label=t},getChildByName(e,t=!1){return this.getChildByLabel(e,t)},getChildByLabel(e,t=!1){let n=this.children;for(let t=0;t<n.length;t++){let r=n[t];if(r.label===e||e instanceof RegExp&&e.test(r.label))return r}if(t)for(let t=0;t<n.length;t++){let r=n[t].getChildByLabel(e,!0);if(r)return r}return null},getChildrenByLabel(e,t=!1,n=[]){let r=this.children;for(let t=0;t<r.length;t++){let i=r[t];(i.label===e||e instanceof RegExp&&e.test(i.label))&&n.push(i)}if(t)for(let t=0;t<r.length;t++)r[t].getChildrenByLabel(e,!0,n);return n}},S=p.getPool(m),C=p.getPool(n),me=new m,he={getFastGlobalBounds(e,t){t||=new n,t.clear(),this._getGlobalBoundsRecursive(!!e,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let r=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(r.worldTransform),t},_getGlobalBoundsRecursive(e,t,n){let r=t;if(e&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;let i=!!this.effects.length;if((this.renderGroup||i)&&(r=C.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){let e=this.bounds;r.addFrame(e.minX,e.minY,e.maxX,e.maxY,this.groupTransform)}let t=this.children;for(let i=0;i<t.length;i++)t[i]._getGlobalBoundsRecursive(e,r,n)}if(i){let e=!1,n=this.renderGroup||this.parentRenderGroup;for(let t=0;t<this.effects.length;t++)this.effects[t].addBounds&&(e||(e=!0,r.applyMatrix(n.worldTransform)),this.effects[t].addBounds(r,!0));e&&r.applyMatrix(n.worldTransform.copyTo(me).invert()),t.addBounds(r),C.return(r)}else this.renderGroup&&(t.addBounds(r,this.relativeGroupTransform),C.return(r))}};function ge(e,t,n){n.clear();let r,i;return e.parent?t?r=e.parent.worldTransform:(i=S.get().identity(),r=T(e,i)):r=m.IDENTITY,w(e,n,r,t),i&&S.return(i),n.isValid||n.set(0,0,0,0),n}function w(e,t,n,r){if(!e.visible||!e.measurable)return;let i;r?i=e.worldTransform:(e.updateLocalTransform(),i=S.get(),i.appendFrom(e.localTransform,n));let a=t,o=!!e.effects.length;if(o&&(t=C.get().clear()),e.boundsArea)t.addRect(e.boundsArea,i);else{let n=e.bounds;n&&!n.isEmpty()&&(t.matrix=i,t.addBounds(n));for(let n=0;n<e.children.length;n++)w(e.children[n],t,i,r)}if(o){for(let n=0;n<e.effects.length;n++)e.effects[n].addBounds?.(t);a.addBounds(t,m.IDENTITY),C.return(t)}r||S.return(i)}function T(e,t){let n=e.parent;return n&&(T(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}var E=16777215;function D(e,t){return e===E?t:t===E?e:l(e,t)}function O(e){return((e&255)<<16)+(e&65280)+(e>>16&255)}var k={getGlobalAlpha(e){if(e)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,n=this.parent;for(;n;)t*=n.alpha,n=n.parent;return t},getGlobalTransform(e=new m,t){if(t)return e.copyFrom(this.worldTransform);this.updateLocalTransform();let n=T(this,S.get().identity());return e.appendFrom(this.localTransform,n),S.return(n),e},getGlobalTint(e){if(e)return this.renderGroup?O(this.renderGroup.worldColor):this.parentRenderGroup?O(D(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=D(t,n.localColor),n=n.parent;return O(t)}};function A(e,t,n){return t.clear(),n||=m.IDENTITY,j(e,t,n,e,!0),t.isValid||t.set(0,0,0,0),t}function j(e,t,n,r,i){let a;if(i)a=S.get(),a=n.copyTo(a);else{if(!e.visible||!e.measurable)return;e.updateLocalTransform();let t=e.localTransform;a=S.get(),a.appendFrom(t,n)}let o=t,s=!!e.effects.length;if(s&&(t=C.get().clear()),e.boundsArea)t.addRect(e.boundsArea,a);else{e.renderPipeId&&(t.matrix=a,t.addBounds(e.bounds));let n=e.children;for(let e=0;e<n.length;e++)j(n[e],t,a,r,!1)}if(s){for(let n=0;n<e.effects.length;n++)e.effects[n].addLocalBounds?.(t,r);o.addBounds(t,m.IDENTITY),C.return(t)}S.return(a)}function M(e,t){let n=e.children;for(let e=0;e<n.length;e++){let r=n[e],i=r.uid,a=(r._didViewChangeTick&65535)<<16|r._didContainerChangeTick&65535,o=t.index;(t.data[o]!==i||t.data[o+1]!==a)&&(t.data[t.index]=i,t.data[t.index+1]=a,t.didChange=!0),t.index=o+2,r.children.length&&M(r,t)}return t.didChange}var _e=new m,N={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(e,t){let n=Math.sign(this.scale.x)||1;t===0?this.scale.x=n:this.scale.x=e/t*n},_setHeight(e,t){let n=Math.sign(this.scale.y)||1;t===0?this.scale.y=n:this.scale.y=e/t*n},getLocalBounds(){this._localBoundsCacheData||={data:[],index:1,didChange:!1,localBounds:new n};let e=this._localBoundsCacheData;return e.index=1,e.didChange=!1,e.data[0]!==this._didViewChangeTick&&(e.didChange=!0,e.data[0]=this._didViewChangeTick),M(this,e),e.didChange&&A(this,e.localBounds,_e),e.localBounds},getBounds(e,t){return ge(this,e,t||new n)}},P={_onRender:null,set onRender(e){let t=this.renderGroup||this.parentRenderGroup;if(!e){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=e},get onRender(){return this._onRender}},F={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(e){this._zIndex!==e&&(this._zIndex=e,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(ve))}};function ve(e,t){return e._zIndex-t._zIndex}var I={getGlobalPosition(e=new ne,t=!1){return this.parent?this.parent.toGlobal(this._position,e,t):(e.x=this._position.x,e.y=this._position.y),e},toGlobal(e,t,n=!1){let r=this.getGlobalTransform(S.get(),n);return t=r.apply(e,t),S.return(r),t},toLocal(e,t,n,r){t&&(e=t.toGlobal(e,n,r));let i=this.getGlobalTransform(S.get(),r);return n=i.applyInverse(e,n),S.return(i),n}},ye=0,L=class{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new s(this.textureOptions)}createTexture(e,t,n,r){return new a({source:new i({...this.textureOptions,width:e,height:t,resolution:1,antialias:n,autoGarbageCollect:!1,autoGenerateMipmaps:r}),label:`texturePool_${ye++}`})}getOptimalTexture(e,t,n=1,i,a=!1){let o=Math.ceil(e*n-1e-6),s=Math.ceil(t*n-1e-6);o=r(o),s=r(s);let c=+!!i,l=+!!a,u=(o<<17)+(s<<2)+(l<<1)+c;this._texturePool[u]||(this._texturePool[u]=[]);let d=this._texturePool[u].pop();return d||=this.createTexture(o,s,i,a),d.source._resolution=n,d.source.width=o/n,d.source.height=s/n,d.source.pixelWidth=o,d.source.pixelHeight=s,d.frame.x=0,d.frame.y=0,d.frame.width=e,d.frame.height=t,d.updateUvs(),this._poolKeyHash[d.uid]=u,d}getSameSizeTexture(e,t=!1){let n=e.source;return this.getOptimalTexture(e.width,e.height,n._resolution,t)}returnTexture(e,t=!1){let n=this._poolKeyHash[e.uid];t&&(e.source.style=this.textureStyle),this._texturePool[n].push(e)}clear(e){if(e=e!==!1,e)for(let e in this._texturePool){let t=this._texturePool[e];if(t)for(let e=0;e<t.length;e++)t[e].destroy(!0)}this._texturePool={}}},R=new L;u.register(R);var z=class{constructor(){this.renderPipeId=`renderGroup`,this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new m,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new c,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;let t=e.children;for(let e=0;e<t.length;e++){let n=t[e];n._updateFlags=15,this.addChild(n)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&=(R.returnTexture(this.texture,!0),null)}updateCacheTexture(){this.textureNeedsUpdate=!0;let e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(let e in this.childrenToUpdate){let t=this.childrenToUpdate[e];t.list.fill(null),t.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){let t=this.renderGroupChildren.indexOf(e);t>-1&&this.renderGroupChildren.splice(t,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);let t=e.children;for(let e=0;e<t.length;e++)this.addChild(t[e])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}let t=e.children;for(let e=0;e<t.length;e++)this.removeChild(t[e])}removeChildren(e){for(let t=0;t<e.length;t++)this.removeChild(e[t])}onChildUpdate(e){let t=this.childrenToUpdate[e.relativeRenderGroupDepth];t||=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]},t.list[t.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let t=0;t<this._onRenderContainers.length;t++)this._onRenderContainers[t]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){let t=this.root.children;for(let n=0;n<t.length;n++)this._getChildren(t[n],e);return e}_getChildren(e,t=[]){if(t.push(e),e.renderGroup)return t;let n=e.children;for(let e=0;e<n.length;e++)this._getChildren(n[e],t);return t}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return this._matrixDirty&1?(this._matrixDirty&=-2,this._inverseWorldTransform||=new m,this._inverseWorldTransform.copyFrom(this.worldTransform).invert()):this._inverseWorldTransform}get textureOffsetInverseTransform(){return this._matrixDirty&2?(this._matrixDirty&=-3,this._textureOffsetInverseTransform||=new m,this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y)):this._textureOffsetInverseTransform}get inverseParentTextureTransform(){if(!(this._matrixDirty&4))return this._inverseParentTextureTransform;this._matrixDirty&=-5;let e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||=new m,this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}};function be(e,t,n={}){for(let r in t)!n[r]&&t[r]!==void 0&&(e[r]=t[r])}var B=new g(null),V=new g(null),H=new g(null,1,1),U=new g(null),xe=1,Se=2,Ce=4,we=8,W=class t extends re{constructor(e={}){super(),this.uid=ie(`renderable`),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new m,this.relativeGroupTransform=new m,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new g(this,0,0),this._scale=H,this._pivot=V,this._origin=U,this._skew=B,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode=`inherit`,this.groupBlendMode=`normal`,this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],be(this,e,{children:!0,parent:!0,effects:!0}),e.children?.forEach(e=>this.addChild(e)),e.parent?.addChild(this)}static mixin(e){o(`8.8.0`,`Container.mixin is deprecated, please use extensions.mixin instead.`),f.mixin(t,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||o(e,`addChild: Only Containers will be allowed to add children in v8.0.0`),t.length>1){for(let e=0;e<t.length;e++)this.addChild(t[e]);return t[0]}let n=t[0],r=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),r&&(r.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,r&&r.addChild(n),this.emit(`childAdded`,n,this,this.children.length-1),n.emit(`added`,this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...e){if(e.length>1){for(let t=0;t<e.length;t++)this.removeChild(e[t]);return e[0]}let t=e[0],n=this.children.indexOf(t);return n>-1&&(this._didViewChangeTick++,this.children.splice(n,1),this.renderGroup?this.renderGroup.removeChild(t):this.parentRenderGroup&&this.parentRenderGroup.removeChild(t),t.parentRenderLayer&&t.parentRenderLayer.detach(t),t.parent=null,this.emit(`childRemoved`,t,this,n),t.emit(`removed`,this)),t}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let e=this.parentRenderGroup;e?.removeChild(this),this.renderGroup=p.get(z,this),this.groupTransform=m.IDENTITY,e?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let e=this.parentRenderGroup;e?.removeChild(this),p.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||=new m,this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*se}set angle(e){this.rotation=e*ee}get pivot(){return this._pivot===V&&(this._pivot=new g(this,0,0)),this._pivot}set pivot(e){this._pivot===V&&(this._pivot=new g(this,0,0),this._origin!==U&&d(`Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.`)),typeof e==`number`?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===B&&(this._skew=new g(this,0,0)),this._skew}set skew(e){this._skew===B&&(this._skew=new g(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===H&&(this._scale=new g(this,1,1)),this._scale}set scale(e){this._scale===H&&(this._scale=new g(this,0,0)),typeof e==`string`&&(e=parseFloat(e)),typeof e==`number`?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===U&&(this._origin=new g(this,0,0)),this._origin}set origin(e){this._origin===U&&(this._origin=new g(this,0,0),this._pivot!==V&&d(`Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.`)),typeof e==`number`?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){let t=this.getLocalBounds().width;this._setWidth(e,t)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){let t=this.getLocalBounds().height;this._setHeight(e,t)}getSize(e){e||={};let t=this.getLocalBounds();return e.width=Math.abs(this.scale.x*t.width),e.height=Math.abs(this.scale.y*t.height),e}setSize(e,t){let n=this.getLocalBounds();typeof e==`object`?(t=e.height??e.width,e=e.width):t??=e,e!==void 0&&this._setWidth(e,n.width),t!==void 0&&this._setHeight(t,n.height)}_updateSkew(){let e=this._rotation,t=this._skew;this._cx=Math.cos(e+t._y),this._sx=Math.sin(e+t._y),this._cy=-Math.sin(e-t._x),this._sy=Math.cos(e-t._x)}updateTransform(e){return this.position.set(typeof e.x==`number`?e.x:this.position.x,typeof e.y==`number`?e.y:this.position.y),this.scale.set(typeof e.scaleX==`number`?e.scaleX||1:this.scale.x,typeof e.scaleY==`number`?e.scaleY||1:this.scale.y),this.rotation=typeof e.rotation==`number`?e.rotation:this.rotation,this.skew.set(typeof e.skewX==`number`?e.skewX:this.skew.x,typeof e.skewY==`number`?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX==`number`?e.pivotX:this.pivot.x,typeof e.pivotY==`number`?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX==`number`?e.originX:this.origin.x,typeof e.originY==`number`?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){let e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;let t=this.localTransform,n=this._scale,r=this._pivot,i=this._origin,a=this._position,o=n._x,s=n._y,c=r._x,l=r._y,u=-i._x,d=-i._y;t.a=this._cx*o,t.b=this._sx*o,t.c=this._cy*s,t.d=this._sy*s,t.tx=a._x-(c*t.a+l*t.c)+(u*t.a+d*t.c)-u,t.ty=a._y-(c*t.b+l*t.d)+(u*t.b+d*t.d)-d}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=1,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){let t=te.shared.setValue(e??16777215).toBgrNumber();t!==this.localColor&&(this.localColor=t,this._updateFlags|=1,this._onUpdate())}get tint(){return O(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=2,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){let t=e?2:0;(this.localDisplayStatus&2)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=4,this.localDisplayStatus^=2,this._onUpdate(),this.emit(`visibleChanged`,e))}get culled(){return!(this.localDisplayStatus&4)}set culled(e){let t=e?0:4;(this.localDisplayStatus&4)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=4,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){let t=+!!e;(this.localDisplayStatus&1)!==t&&(this._updateFlags|=4,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){if(this.destroyed)return;this.destroyed=!0;let t;if(this.children.length&&(t=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit(`destroyed`,this),this.removeAllListeners(),(typeof e==`boolean`?e:e?.children)&&t)for(let n=0;n<t.length;++n)t[n].destroy(e);this.renderGroup?.destroy(),this.renderGroup=null}};f.mixin(W,v,he,I,P,N,fe,pe,F,h,ue,k,y);var G=(e=>(e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`,e))(G||{}),K=class{constructor(e,t=null,n=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=t,this.priority=n,this._once=r}match(e,t=null){return this._fn===e&&this._context===t}emit(e){this._fn&&(this._context?this._fn.call(this._context,e):this._fn(e));let t=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let t=this.next;return this.next=e?null:t,this.previous=null,t}},Te=class e{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new K(null,null,1/0),this.deltaMS=1/e.targetFPMS,this.elapsedMS=1/e.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=G.NORMAL){return this._addListener(new K(e,t,n))}addOnce(e,t,n=G.NORMAL){return this._addListener(new K(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){let e=t-this._lastFrame|0;if(e<this._minElapsedMS)return;this._lastFrame=t-e%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*e.targetFPMS;let r=this._head,i=r.next;for(;i;)i=i.emit(this);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){let n=Math.min(Math.max(0,t)/1e3,e.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){e===0?this._minElapsedMS=0:(e<this.minFPS&&(this.minFPS=e),this._minElapsedMS=1/(e/1e3))}static get shared(){if(!e._shared){let t=e._shared=new e;t.autoStart=!0,t._protected=!0}return e._shared}static get system(){if(!e._system){let t=e._system=new e;t.autoStart=!0,t._protected=!0}return e._system}};Te.targetFPMS=.06;var Ee=Te,De=class extends W{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new n(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=+!!e}containsPoint(e){let t=this.bounds,{x:n,y:r}=e;return n>=t.minX&&n<=t.maxX&&r>=t.minY&&r<=t.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(e){this.unload(),super.destroy(e),this._bounds=null}collectRenderablesSimple(e,t,n){let{renderPipes:r}=t;r.blendMode.pushBlendMode(this,this.groupBlendMode,e);let i=r[this.renderPipeId];i?.addRenderable&&i.addRenderable(this,e),this.didViewUpdate=!1;let a=this.children,o=a.length;for(let r=0;r<o;r++)a[r].collectRenderables(e,t,n);r.blendMode.popBlendMode(e)}};function Oe(e,t,n){let{width:r,height:i}=n.orig,a=n.trim;if(a){let n=a.width,o=a.height;e.minX=a.x-t._x*r,e.maxX=e.minX+n,e.minY=a.y-t._y*i,e.maxY=e.minY+o}else e.minX=-t._x*r,e.maxX=e.minX+r,e.minY=-t._y*i,e.maxY=e.minY+i}var ke=class e extends De{constructor(e=a.EMPTY){e instanceof a&&(e={texture:e});let{texture:t=a.EMPTY,anchor:n,roundPixels:r,width:i,height:o,...s}=e;super({label:`Sprite`,...s}),this.renderPipeId=`sprite`,this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new g({_onUpdate:()=>{this.onViewUpdate()}}),n?this.anchor=n:t.defaultAnchor&&(this.anchor=t.defaultAnchor),this.texture=t,this.allowChildren=!1,this.roundPixels=r??!1,i!==void 0&&(this.width=i),o!==void 0&&(this.height=o)}static from(t,n=!1){return t instanceof a?new e(t):new e(a.from(t,n))}set texture(e){e||=a.EMPTY;let t=this._texture;t!==e&&(t&&t.dynamic&&t.off(`update`,this.onViewUpdate,this),e.dynamic&&e.on(`update`,this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Oe(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return o(`8.6.1`,`Sprite.sourceBounds is deprecated, use visualBounds instead.`),this.visualBounds}updateBounds(){let e=this._anchor,t=this._texture,n=this._bounds,{width:r,height:i}=t.orig;n.minX=-e._x*r,n.maxX=n.minX+r,n.minY=-e._y*i,n.maxY=n.minY+i}destroy(e=!1){if(super.destroy(e),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._texture.destroy(t)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(e){typeof e==`number`?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||={},e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,t){typeof e==`object`?(t=e.height??e.width,e=e.width):t??=e,e!==void 0&&this._setWidth(e,this._texture.orig.width),t!==void 0&&this._setHeight(t,this._texture.orig.height)}},Ae=class extends i{constructor(e){e.resource||=t.get().createCanvas(),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId=`image`,this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&`style`in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,t=this.height,n=this._resolution){let r=super.resize(e,t,n);return r&&this.resizeCanvas(),r}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||=this.resource.getContext(`2d`)}};Ae.extension=ce.TextureSource;var je={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},q=0,J=1,Y=2,X=3,Z=4,Q=5,$=class e{constructor(){this.data=0,this.blendMode=`normal`,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<q)}set blend(e){!!(this.data&1<<q)!==e&&(this.data^=1<<q)}get offsets(){return!!(this.data&1<<J)}set offsets(e){!!(this.data&1<<J)!==e&&(this.data^=1<<J)}set cullMode(e){if(e===`none`){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=e===`front`}get cullMode(){return this.culling?this.clockwiseFrontFace?`front`:`back`:`none`}get culling(){return!!(this.data&1<<Y)}set culling(e){!!(this.data&1<<Y)!==e&&(this.data^=1<<Y)}get depthTest(){return!!(this.data&1<<X)}set depthTest(e){!!(this.data&1<<X)!==e&&(this.data^=1<<X)}get depthMask(){return!!(this.data&1<<Q)}set depthMask(e){!!(this.data&1<<Q)!==e&&(this.data^=1<<Q)}get clockwiseFrontFace(){return!!(this.data&1<<Z)}set clockwiseFrontFace(e){!!(this.data&1<<Z)!==e&&(this.data^=1<<Z)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==`none`,this._blendMode=e,this._blendModeId=je[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let t=new e;return t.depthTest=!1,t.blend=!0,t}};$.default2d=$.for2d();var Me=$,Ne=class e extends ae{constructor(t){t={...e.defaultOptions,...t},super(t),this.enabled=!0,this._state=Me.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias==`boolean`?this.antialias=t.antialias?`on`:`off`:this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource(`uTexture`,0,1),t.blendRequired&&this.addResource(`uBackTexture`,0,3)}apply(e,t,n,r){e.applyFilter(this,t,n,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(t){let{gpu:n,gl:r,...i}=t,a,o;return n&&(a=oe.from(n)),r&&(o=le.from(r)),new e({gpuProgram:a,glProgram:o,...i})}};Ne.defaultOptions={blendMode:`normal`,resolution:1,padding:0,antialias:`off`,blendRequired:!1,clipToViewport:!0};var Pe=Ne;export{he as A,_ as B,M as C,D,k as E,x as F,g as H,de as I,b as L,S as M,pe as N,ge as O,fe as P,y as R,N as S,O as T,h as U,ue as V,R as _,Oe as a,F as b,K as c,Se as d,xe as f,z as g,be as h,ke as i,C as j,T as k,G as l,Ce as m,Me as n,De as o,we as p,Ae as r,Ee as s,Pe as t,W as u,L as v,A as w,P as x,I as y,v as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,Bt as t,F as n,L as r,N as i,Nt as a,Pt as o,Vt as s,X as c,Y as l,_t as u,a as d,at as f,ft as p,g as m,it as h,o as g,ot as _,u as v,vt as y}from"./BopViJM2.js";import"./t62M88qj.js";import"./27dv1q5w.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>`);function S(e,S){let C=d(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=d(C,[`size`,`title`]);o(S,!1);let T=u(),E=u(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);h(()=>(l(C),l(O())),()=>{y(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),h(()=>(c(T),l(C)),()=>{y(E,{"aria-hidden":c(T)?void 0:!0,role:c(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),f(),v();var k=x();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:D(),height:D(),...c(E),...w}));var A=p(k),j=e=>{var t=b(),i=p(t,!0);s(t),_(()=>n(i,O())),r(e,t)};i(A,e=>{O()&&e(j)}),t(),s(k),r(e,k),a()}export{S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,Bt as t,F as n,L as r,N as i,Nt as a,Pt as o,Vt as s,X as c,Y as l,_t as u,a as d,at as f,ft as p,g as m,it as h,o as g,ot as _,u as v,vt as y}from"./BopViJM2.js";import"./t62M88qj.js";import"./27dv1q5w.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M6 18 7.41 19.41 15 11.83 15 30 17 30 17 11.83 24.59 19.41 26 18 16 8 6 18z"></path><path d="M6,8V4H26V8h2V4a2,2,0,0,0-2-2H6A2,2,0,0,0,4,4V8Z"></path></svg>`);function S(e,S){let C=d(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=d(C,[`size`,`title`]);o(S,!1);let T=u(),E=u(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);h(()=>(l(C),l(O())),()=>{y(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),h(()=>(c(T),l(C)),()=>{y(E,{"aria-hidden":c(T)?void 0:!0,role:c(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),f(),v();var k=x();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:D(),height:D(),...c(E),...w}));var A=p(k),j=e=>{var t=b(),i=p(t,!0);s(t),_(()=>n(i,O())),r(e,t)};i(A,e=>{O()&&e(j)}),t(2),s(k),r(e,k),a()}function C(e){let t=new Date().getHours(),n=e?.split(` `)[0]??``,r=n?`, ${n}`:``;return t<12?`Good morning${r}`:t<17?`Good afternoon${r}`:`Good evening${r}`}export{S as n,C as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ct as e,L as t,N as n,Nt as r,O as i,Pt as a,R as o,Ut as s,Vt as c,X as l,d as u,ft as d,g as f,mt as p,o as m,pt as h,s as g,z as _}from"./BopViJM2.js";import"./t62M88qj.js";import{n as v,t as y}from"./D5PXaoT_2.js";var b=y({base:`inline-flex shrink-0 items-center justify-center gap-1.5 rounded-[var(--radius-sm)] font-normal whitespace-nowrap transition-[color,background] duration-150 cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:w-[var(--icon-md)] [&_svg:not([class*='size-'])]:h-[var(--icon-md)]`,variants:{variant:{default:`bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]`,ghost:`bg-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-hover)]`,outline:`bg-transparent text-[var(--color-text-secondary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]`,accent:`bg-[var(--color-accent)] text-[var(--color-accent-text,#ededef)] hover:bg-[var(--color-accent-hover)] border border-transparent disabled:opacity-100 disabled:bg-[var(--color-bg-hover)] disabled:text-[var(--color-accent-text-disabled)]`,destructive:`bg-[var(--color-accent)] text-[var(--color-accent-text,#ededef)] hover:bg-[var(--color-accent-hover)] border border-transparent disabled:opacity-100 disabled:bg-[var(--color-bg-hover)] disabled:text-[var(--color-accent-text-disabled)]`,link:`text-[var(--color-accent-fg)] underline-offset-4 hover:underline`},size:{default:`h-[var(--btn-height,2rem)] px-2.5 text-sm [&_svg:not([class*='size-'])]:w-[var(--icon-md)] [&_svg:not([class*='size-'])]:h-[var(--icon-md)]`,sm:`h-[var(--btn-height-sm,1.5rem)] px-2 text-xs [&_svg:not([class*='size-'])]:w-[var(--icon-sm)] [&_svg:not([class*='size-'])]:h-[var(--icon-sm)]`,lg:`h-[var(--btn-height-lg,2.25rem)] px-3 text-sm [&_svg:not([class*='size-'])]:w-[var(--icon-lg)] [&_svg:not([class*='size-'])]:h-[var(--icon-lg)]`,icon:`size-[var(--icon-btn-height,2rem)] p-0 max-md:rounded-[var(--radius-xl)] [&_svg:not([class*='size-'])]:w-[var(--icon-btn-icon-size)] [&_svg:not([class*='size-'])]:h-[var(--icon-btn-icon-size)]`}},defaultVariants:{variant:`default`,size:`default`}}),x=_(`<span class="btn-spinner svelte-1q39rn8" aria-hidden="true"></span> <span class="btn-label-hidden svelte-1q39rn8"><!></span>`,1),S=_(`<a><!></a>`),C=_(`<span class="btn-spinner svelte-1q39rn8" aria-hidden="true"></span> <span class="btn-label-hidden svelte-1q39rn8"><!></span>`,1),w=_(`<button><!></button>`);function T(_,y){a(y,!0);let T=m(y,`variant`,3,`default`),E=m(y,`size`,3,`default`),D=m(y,`ref`,15,null),O=m(y,`href`,3,void 0),k=m(y,`type`,3,`button`),A=m(y,`loading`,3,!1),j=g(y,[`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`loading`,`children`]),M=e(()=>y.disabled||A());var N=o(),P=h(N),F=e=>{var r=S();f(r,e=>({class:e,href:l(M)?void 0:O(),"aria-disabled":l(M),"aria-busy":A(),role:l(M)?`link`:void 0,tabindex:l(M)?-1:void 0,...j}),[()=>v(b({variant:T(),size:E()}),A()&&`relative`,y.class)],void 0,void 0,`svelte-1q39rn8`);var a=d(r),m=e=>{var n=x(),r=p(h(n),2);i(d(r),()=>y.children??s),c(r),t(e,n)},g=e=>{var n=o();i(h(n),()=>y.children??s),t(e,n)};n(a,e=>{A()?e(m):e(g,-1)}),c(r),u(r,e=>D(e),()=>D()),t(e,r)},I=e=>{var r=w();f(r,e=>({class:e,type:k(),disabled:l(M),"aria-busy":A(),...j}),[()=>v(b({variant:T(),size:E()}),A()&&`relative`,y.class)],void 0,void 0,`svelte-1q39rn8`);var a=d(r),m=e=>{var n=C(),r=p(h(n),2);i(d(r),()=>y.children??s),c(r),t(e,n)},g=e=>{var n=o();i(h(n),()=>y.children??s),t(e,n)};n(a,e=>{A()?e(m):e(g,-1)}),c(r),u(r,e=>D(e),()=>D()),t(e,r)};n(P,e=>{O()?e(F):e(I,-1)}),t(_,N),r()}export{b as n,T as t};
|