studiograph 1.3.48-next.80 → 1.3.48-next.82

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.
Files changed (222) hide show
  1. package/dist/web/_app/immutable/chunks/{EjrK1fX_2.js → -AHMljcY2.js} +1 -1
  2. package/dist/web/_app/immutable/chunks/0H-ON1DY2.js +1 -0
  3. package/dist/web/_app/immutable/chunks/4wBDiYVw2.js +1 -0
  4. package/dist/web/_app/immutable/chunks/{BI7emqpn.js → B1DDWQ9T.js} +1 -1
  5. package/dist/web/_app/immutable/chunks/{CuVyPU7i2.js → B4J5Pbmb2.js} +1 -1
  6. package/dist/web/_app/immutable/chunks/{DXnKZTol2.js → B6EQXYpO2.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/{BJc4yCpr.js → B7RyZq-R.js} +2 -2
  8. package/dist/web/_app/immutable/chunks/{D9JB6yk7.js → B7rYJdis.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/B86tqRTj.js +1 -0
  10. package/dist/web/_app/immutable/chunks/BFlZ29_8.js +2 -0
  11. package/dist/web/_app/immutable/chunks/BILUcEY8.js +5 -0
  12. package/dist/web/_app/immutable/chunks/BIn88OKz.js +1 -0
  13. package/dist/web/_app/immutable/chunks/BNMZQzoS2.js +1 -0
  14. package/dist/web/_app/immutable/chunks/{DKlXVwiv2.js → BPHM6hFB.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/BPaxq9nX2.js +1 -0
  16. package/dist/web/_app/immutable/chunks/BPuwfxE_.js +1 -0
  17. package/dist/web/_app/immutable/chunks/BQe5yAWz.js +1 -0
  18. package/dist/web/_app/immutable/chunks/BYyiaJbm2.js +1 -0
  19. package/dist/web/_app/immutable/chunks/BcGZEhZd.js +1 -0
  20. package/dist/web/_app/immutable/chunks/{EOYVcps5.js → BdKEyKyt.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/{vQo3QcDw2.js → BfaFBcBK2.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/Bfr5D7Fp.js +1 -0
  23. package/dist/web/_app/immutable/chunks/BgwOS3sQ.js +1 -0
  24. package/dist/web/_app/immutable/chunks/{CWySm6mN.js → BkTxE0oI.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/BnXLPdPJ.js +1 -0
  26. package/dist/web/_app/immutable/chunks/Bn_dYPdE.js +1 -0
  27. package/dist/web/_app/immutable/chunks/BrgdWP5X.js +1 -0
  28. package/dist/web/_app/immutable/chunks/BsB4O-zz.js +1 -0
  29. package/dist/web/_app/immutable/chunks/{DOastlFY.js → BtNEkT5_.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/BuGep5GU.js +8 -0
  31. package/dist/web/_app/immutable/chunks/BvA0nVA0.js +1 -0
  32. package/dist/web/_app/immutable/chunks/{Dc8Rqbob2.js → BwYnX5r22.js} +1 -1
  33. package/dist/web/_app/immutable/chunks/{0ws3eNVW2.js → C-PN13Eq2.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/{BwZpI48G2.js → C7jbDG892.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/{Db5__hjA.js → C8RZQBJ3.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/C9aMbTXg.js +1 -0
  37. package/dist/web/_app/immutable/chunks/{WTC1eGPD.js → CAMrzEb0.js} +1 -1
  38. package/dist/web/_app/immutable/chunks/{NbYIqRLH2.js → CGVXnFiR2.js} +1 -1
  39. package/dist/web/_app/immutable/chunks/CHGJVSB_.js +1 -0
  40. package/dist/web/_app/immutable/chunks/CJJgm_Hh.js +1 -0
  41. package/dist/web/_app/immutable/chunks/CKqfG6Aj.js +1 -0
  42. package/dist/web/_app/immutable/chunks/{cmsdMtNL2.js → CPK9_hjX2.js} +1 -1
  43. package/dist/web/_app/immutable/chunks/{CyfnsKhc2.js → C_R3LR3_2.js} +1 -1
  44. package/dist/web/_app/immutable/chunks/{Dn6yJ9ZG.js → C_aV-x0w2.js} +1 -1
  45. package/dist/web/_app/immutable/chunks/{DA0-eNJI.js → CbOxfDgq.js} +1 -1
  46. package/dist/web/_app/immutable/chunks/CbXI6RSM.js +2 -0
  47. package/dist/web/_app/immutable/chunks/CbzaVMVe.js +7 -0
  48. package/dist/web/_app/immutable/chunks/Ce7fDi3W2.js +1 -0
  49. package/dist/web/_app/immutable/chunks/{D78--rGD.js → Cezg9ta-.js} +2 -2
  50. package/dist/web/_app/immutable/chunks/CfJPWLbF.js +1 -0
  51. package/dist/web/_app/immutable/chunks/CfX8FmkM2.js +1 -0
  52. package/dist/web/_app/immutable/chunks/Cic-5FH1.js +1 -0
  53. package/dist/web/_app/immutable/chunks/Ckcgz9jN.js +1 -0
  54. package/dist/web/_app/immutable/chunks/ClD4hZei.js +1 -0
  55. package/dist/web/_app/immutable/chunks/ClrEnVUZ2.js +1 -0
  56. package/dist/web/_app/immutable/chunks/{CgjODN_A2.js → CnjKPdu2.js} +1 -1
  57. package/dist/web/_app/immutable/chunks/{DlVGRjoC2.js → CoMJ5KUv.js} +1 -1
  58. package/dist/web/_app/immutable/chunks/Cq7c11AH2.js +1 -0
  59. package/dist/web/_app/immutable/chunks/CxBfYS7I.js +1 -0
  60. package/dist/web/_app/immutable/chunks/{C5ZbrWzl2.js → CxO2V-4W2.js} +1 -1
  61. package/dist/web/_app/immutable/chunks/{DBUVU6tV.js → CxhGMuGC.js} +1 -1
  62. package/dist/web/_app/immutable/chunks/CzE3Mcph.js +1 -0
  63. package/dist/web/_app/immutable/chunks/D18yTYKG2.js +2 -0
  64. package/dist/web/_app/immutable/chunks/{ZhCPwTv_.js → D1K6WjYv.js} +1 -1
  65. package/dist/web/_app/immutable/chunks/{C5NbIXZD.js → D1YPhErJ.js} +3 -3
  66. package/dist/web/_app/immutable/chunks/D3Vu13m5.js +1 -0
  67. package/dist/web/_app/immutable/chunks/D84m7R5b.js +1 -0
  68. package/dist/web/_app/immutable/chunks/{UqWZFiDw.js → D8F93-jO.js} +1 -1
  69. package/dist/web/_app/immutable/chunks/{BV59XdNc2.js → D8rK5Sc12.js} +1 -1
  70. package/dist/web/_app/immutable/chunks/D9O3NbAy2.js +1 -0
  71. package/dist/web/_app/immutable/chunks/DDuIo3-X.js +1 -0
  72. package/dist/web/_app/immutable/chunks/DEJGUNkC.js +1 -0
  73. package/dist/web/_app/immutable/chunks/{BZ2FImqw2.js → DI8np54k.js} +1 -1
  74. package/dist/web/_app/immutable/chunks/DIvdfAlE.js +1 -0
  75. package/dist/web/_app/immutable/chunks/{SJL_oyD4.js → DJUVHWge.js} +1 -1
  76. package/dist/web/_app/immutable/chunks/{7dR_169J.js → DNhEsG-E.js} +1 -1
  77. package/dist/web/_app/immutable/chunks/DOTTCnoH2.js +1 -0
  78. package/dist/web/_app/immutable/chunks/DQSHfqQ5.js +1 -0
  79. package/dist/web/_app/immutable/chunks/DZnCTi53.js +1 -0
  80. package/dist/web/_app/immutable/chunks/D_ZHx38l2.js +1 -0
  81. package/dist/web/_app/immutable/chunks/DaiuuPFg.js +1 -0
  82. package/dist/web/_app/immutable/chunks/{BsUsP_Dh.js → DeXF0uaM.js} +1 -1
  83. package/dist/web/_app/immutable/chunks/{NtFLFxn02.js → DfVMx0wK2.js} +1 -1
  84. package/dist/web/_app/immutable/chunks/{8n25pLvn2.js → Dhqp8Fpm2.js} +1 -1
  85. package/dist/web/_app/immutable/chunks/Dj7axmV6.js +1 -0
  86. package/dist/web/_app/immutable/chunks/DjjeDbQC.js +2 -0
  87. package/dist/web/_app/immutable/chunks/{anxNIaXZ.js → DnHAjb-T.js} +1 -1
  88. package/dist/web/_app/immutable/chunks/DqAc9SBl2.js +1 -0
  89. package/dist/web/_app/immutable/chunks/DsExMj4H.js +1 -0
  90. package/dist/web/_app/immutable/chunks/{4Er3Gy7C.js → Dw78_ELC.js} +1 -1
  91. package/dist/web/_app/immutable/chunks/{Dfu55H0O.js → DwEFz8x5.js} +1 -1
  92. package/dist/web/_app/immutable/chunks/DxdUt3wT2.js +1 -0
  93. package/dist/web/_app/immutable/chunks/{BE1UnzXP.js → E1ZFdk0B2.js} +2 -2
  94. package/dist/web/_app/immutable/chunks/FBeWjvDi2.js +1 -0
  95. package/dist/web/_app/immutable/chunks/I2Q_Txo62.js +1 -0
  96. package/dist/web/_app/immutable/chunks/IXyYgPey2.js +1 -0
  97. package/dist/web/_app/immutable/chunks/QAJZRjxX.js +1 -0
  98. package/dist/web/_app/immutable/chunks/{D20qR8NI2.js → UoeS9fhF2.js} +1 -1
  99. package/dist/web/_app/immutable/chunks/{D4lmk7Te.js → UuI7Esum.js} +1 -1
  100. package/dist/web/_app/immutable/chunks/Y2LdbZDT2.js +1 -0
  101. package/dist/web/_app/immutable/chunks/{DV-Vb89U.js → bMEJ8OJG.js} +1 -1
  102. package/dist/web/_app/immutable/chunks/{DE-tnXJY2.js → bYkM1yzM2.js} +1 -1
  103. package/dist/web/_app/immutable/chunks/{C7WQh0QH2.js → fqOB-bQ62.js} +1 -1
  104. package/dist/web/_app/immutable/chunks/{BrJI4cUp2.js → hBHlxnBN2.js} +1 -1
  105. package/dist/web/_app/immutable/chunks/hTY_E9am2.js +1 -0
  106. package/dist/web/_app/immutable/chunks/iJ93-4bQ.js +1 -0
  107. package/dist/web/_app/immutable/chunks/izDCb5xP2.js +1 -0
  108. package/dist/web/_app/immutable/chunks/phu02Kod2.js +1 -0
  109. package/dist/web/_app/immutable/chunks/tBIZIlKL.js +1 -0
  110. package/dist/web/_app/immutable/chunks/tMfworax2.js +1 -0
  111. package/dist/web/_app/immutable/chunks/ukAVhSCj.js +1 -0
  112. package/dist/web/_app/immutable/chunks/wG1VAB3n.js +1 -0
  113. package/dist/web/_app/immutable/chunks/{CjeZEZyg.js → wg-8qei5.js} +1 -1
  114. package/dist/web/_app/immutable/entry/app.-27sMzTz.js +2 -0
  115. package/dist/web/_app/immutable/entry/start.CWLq8EqP.js +1 -0
  116. package/dist/web/_app/immutable/nodes/0.Bp0QEjmY.js +3 -0
  117. package/dist/web/_app/immutable/nodes/{1.y31PW5yX.js → 1.Bvyklru0.js} +1 -1
  118. package/dist/web/_app/immutable/nodes/10.B-sAmv9I.js +1 -0
  119. package/dist/web/_app/immutable/nodes/11.xmBPfaBm.js +1 -0
  120. package/dist/web/_app/immutable/nodes/12.Cyh7Rkly.js +1 -0
  121. package/dist/web/_app/immutable/nodes/13.DJFuiglm.js +1 -0
  122. package/dist/web/_app/immutable/nodes/2.BgUpSty_.js +130 -0
  123. package/dist/web/_app/immutable/nodes/3.DU5zY_3A.js +2 -0
  124. package/dist/web/_app/immutable/nodes/4.Cv3aasGq.js +11 -0
  125. package/dist/web/_app/immutable/nodes/5.Bd8YnfCo.js +1 -0
  126. package/dist/web/_app/immutable/nodes/6.DtTllzq_.js +1 -0
  127. package/dist/web/_app/immutable/nodes/{7.C8fNSE7n.js → 7.DzVtAlO3.js} +1 -1
  128. package/dist/web/_app/immutable/nodes/8.Sop6D5Ra.js +1 -0
  129. package/dist/web/_app/immutable/nodes/9.DzjSavte.js +1 -0
  130. package/dist/web/_app/version.json +1 -1
  131. package/dist/web/index.html +30 -22
  132. package/package.json +1 -1
  133. package/dist/web/_app/immutable/chunks/AyulNOSp2.js +0 -1
  134. package/dist/web/_app/immutable/chunks/B4w8c_UD2.js +0 -1
  135. package/dist/web/_app/immutable/chunks/BAH0sc_p.js +0 -1
  136. package/dist/web/_app/immutable/chunks/BHZnNKnO.js +0 -1
  137. package/dist/web/_app/immutable/chunks/BMP3eBt2.js +0 -1
  138. package/dist/web/_app/immutable/chunks/BNOSnUPo.js +0 -1
  139. package/dist/web/_app/immutable/chunks/BVG-59G_.js +0 -1
  140. package/dist/web/_app/immutable/chunks/BYMboxS1.js +0 -1
  141. package/dist/web/_app/immutable/chunks/BcnRmtrP2.js +0 -1
  142. package/dist/web/_app/immutable/chunks/Bi49oCkW.js +0 -1
  143. package/dist/web/_app/immutable/chunks/BljXMCRN2.js +0 -1
  144. package/dist/web/_app/immutable/chunks/BwyJ6uqQ.js +0 -2
  145. package/dist/web/_app/immutable/chunks/Bzy8UbM32.js +0 -1
  146. package/dist/web/_app/immutable/chunks/C1eadUOT.js +0 -1
  147. package/dist/web/_app/immutable/chunks/C2XwVz-k2.js +0 -1
  148. package/dist/web/_app/immutable/chunks/C7ZXf1Ei.js +0 -1
  149. package/dist/web/_app/immutable/chunks/CFFhRHgg.js +0 -1
  150. package/dist/web/_app/immutable/chunks/CIgq6kOW.js +0 -1
  151. package/dist/web/_app/immutable/chunks/CKPqZArH2.js +0 -1
  152. package/dist/web/_app/immutable/chunks/CN1mT6wT.js +0 -1
  153. package/dist/web/_app/immutable/chunks/CPzlB_o22.js +0 -1
  154. package/dist/web/_app/immutable/chunks/CQwUl_3l.js +0 -1
  155. package/dist/web/_app/immutable/chunks/CcJsmzdm.js +0 -1
  156. package/dist/web/_app/immutable/chunks/CfeOn61L.js +0 -1
  157. package/dist/web/_app/immutable/chunks/Cnec3S_f.js +0 -1
  158. package/dist/web/_app/immutable/chunks/Co7pw0iy.js +0 -1
  159. package/dist/web/_app/immutable/chunks/Cuj0sQZy2.js +0 -1
  160. package/dist/web/_app/immutable/chunks/Cv2AZ2ZD.js +0 -2
  161. package/dist/web/_app/immutable/chunks/CvZmtMIf.js +0 -1
  162. package/dist/web/_app/immutable/chunks/Cy1yuSCN.js +0 -1
  163. package/dist/web/_app/immutable/chunks/CzT0T6FJ.js +0 -1
  164. package/dist/web/_app/immutable/chunks/D0Hmei3J2.js +0 -1
  165. package/dist/web/_app/immutable/chunks/D276ir6O2.js +0 -1
  166. package/dist/web/_app/immutable/chunks/DDt3m-ac2.js +0 -2
  167. package/dist/web/_app/immutable/chunks/DFE7ldAP.js +0 -2
  168. package/dist/web/_app/immutable/chunks/DG78Ru5c2.js +0 -1
  169. package/dist/web/_app/immutable/chunks/DGdxbQG5.js +0 -1
  170. package/dist/web/_app/immutable/chunks/DJnMBCXJ2.js +0 -1
  171. package/dist/web/_app/immutable/chunks/DK3T6wCP.js +0 -1
  172. package/dist/web/_app/immutable/chunks/DNneJjJN.js +0 -1
  173. package/dist/web/_app/immutable/chunks/DP1SrNb_2.js +0 -1
  174. package/dist/web/_app/immutable/chunks/DQKT4stP.js +0 -1
  175. package/dist/web/_app/immutable/chunks/DQpUZZbo.js +0 -1
  176. package/dist/web/_app/immutable/chunks/DaHlYzta.js +0 -1
  177. package/dist/web/_app/immutable/chunks/De2dHdFN.js +0 -1
  178. package/dist/web/_app/immutable/chunks/DgUMuJWf2.js +0 -1
  179. package/dist/web/_app/immutable/chunks/DggGoXzJ.js +0 -1
  180. package/dist/web/_app/immutable/chunks/DkgLEYoO2.js +0 -1
  181. package/dist/web/_app/immutable/chunks/DnnlU7By.js +0 -1
  182. package/dist/web/_app/immutable/chunks/Dr2zzqCq.js +0 -1
  183. package/dist/web/_app/immutable/chunks/Dt_-Caf8.js +0 -1
  184. package/dist/web/_app/immutable/chunks/DxS997Bi.js +0 -1
  185. package/dist/web/_app/immutable/chunks/FOMUrrno.js +0 -1
  186. package/dist/web/_app/immutable/chunks/LniXHAqc.js +0 -1
  187. package/dist/web/_app/immutable/chunks/Map9Pi83.js +0 -1
  188. package/dist/web/_app/immutable/chunks/MfvSo3wu.js +0 -1
  189. package/dist/web/_app/immutable/chunks/N9XCUUQ3.js +0 -1
  190. package/dist/web/_app/immutable/chunks/P-vv4BQi2.js +0 -1
  191. package/dist/web/_app/immutable/chunks/U26E8cxc.js +0 -8
  192. package/dist/web/_app/immutable/chunks/iqOW8ttz.js +0 -1
  193. package/dist/web/_app/immutable/chunks/ke1fcMVb.js +0 -7
  194. package/dist/web/_app/immutable/chunks/rmFsC7j32.js +0 -1
  195. package/dist/web/_app/immutable/chunks/rsjIo1y12.js +0 -5
  196. package/dist/web/_app/immutable/chunks/sdhQg9Jq.js +0 -1
  197. package/dist/web/_app/immutable/entry/app.CWCUh-Tg.js +0 -2
  198. package/dist/web/_app/immutable/entry/start.BZ4dlZsB.js +0 -1
  199. package/dist/web/_app/immutable/nodes/0.BP9fnKzX.js +0 -2
  200. package/dist/web/_app/immutable/nodes/10.Di9mWQSW.js +0 -1
  201. package/dist/web/_app/immutable/nodes/11.D8MmO827.js +0 -1
  202. package/dist/web/_app/immutable/nodes/12.iOrecd0M.js +0 -1
  203. package/dist/web/_app/immutable/nodes/13.D38TZ7o5.js +0 -1
  204. package/dist/web/_app/immutable/nodes/2.COQiJuqq.js +0 -130
  205. package/dist/web/_app/immutable/nodes/3.CIgQKKoO.js +0 -2
  206. package/dist/web/_app/immutable/nodes/4.wTG_3q3I.js +0 -11
  207. package/dist/web/_app/immutable/nodes/5.BwQHcdU0.js +0 -1
  208. package/dist/web/_app/immutable/nodes/6.C3bIzjgk.js +0 -1
  209. package/dist/web/_app/immutable/nodes/8.Bzr1fRoM.js +0 -1
  210. package/dist/web/_app/immutable/nodes/9.DBsh-S_P.js +0 -1
  211. /package/dist/web/_app/immutable/chunks/{DR05iaVQ.js → BQIQcx1e.js} +0 -0
  212. /package/dist/web/_app/immutable/chunks/{B-bHt83e.js → Bc4ymoHY.js} +0 -0
  213. /package/dist/web/_app/immutable/chunks/{C-48vCcy.js → BreAJCzD.js} +0 -0
  214. /package/dist/web/_app/immutable/chunks/{B8x2G5Je2.js → BzeVNab0.js} +0 -0
  215. /package/dist/web/_app/immutable/chunks/{B-eErEF72.js → CbVWlLYp2.js} +0 -0
  216. /package/dist/web/_app/immutable/chunks/{BZHVPKHl.js → DNu4c-6_.js} +0 -0
  217. /package/dist/web/_app/immutable/chunks/{Dx0Uwf5m.js → Du2-B3c8.js} +0 -0
  218. /package/dist/web/_app/immutable/chunks/{I4OwCavd.js → Dxai_8_L.js} +0 -0
  219. /package/dist/web/_app/immutable/chunks/{DWPGp-Ow2.js → YEPEvlbU2.js} +0 -0
  220. /package/dist/web/_app/immutable/chunks/{DHSa2BQk.js → jTSPYxA6.js} +0 -0
  221. /package/dist/web/_app/immutable/chunks/{D-fOfpFk.js → l4FIBKss.js} +0 -0
  222. /package/dist/web/_app/immutable/chunks/{B0HUvliX2.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"./B-eErEF72.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"./CuVyPU7i2.js";import{F as x,n as he}from"./C7WQh0QH2.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;
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,Mt as i,N as a,Nt as o,X as s,Y as c,_t as l,a as u,at as d,dt as f,gt as p,h as m,it as h,o as g,rt as _,u as v,zt as y}from"./bMEJ8OJG.js";import"./t62M88qj.js";import"./DQSHfqQ5.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>`);function S(e,S){let C=u(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=u(C,[`size`,`title`]);o(S,!1);let T=p(),E=p(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);_(()=>(c(C),c(O())),()=>{l(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),_(()=>(s(T),c(C)),()=>{l(E,{"aria-hidden":s(T)?void 0:!0,role:s(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),h(),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(),...s(E),...w}));var A=f(k),j=e=>{var i=b(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),y(),t(k),r(e,k),i()}export{S as t};
@@ -0,0 +1 @@
1
+ import{B as e,Bt as t,F as n,L as r,Mt as i,N as a,Nt as o,X as s,Y as c,_t as l,a as u,at as d,dt as f,gt as p,h as m,it as h,o as g,rt as _,u as v,yt as y,zt as b}from"./bMEJ8OJG.js";import"./t62M88qj.js";import"./DQSHfqQ5.js";var x=y(null),S={register(e){l(x,e,!0)},unregister(){l(x,null)},get available(){return s(x)!==null},open(e,t){s(x)?.(e,t)}},C=e(`<title> </title>`),w=e(`<svg><!><path d="M12,4H6A2,2,0,0,0,4,6v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,12,4Zm0,8H6V6h6Z"></path><path d="M26,4H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,8H20V6h6Z"></path><path d="M12,18H6a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,12,18Zm0,8H6V20h6Z"></path><path d="M26,18H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V20A2,2,0,0,0,26,18Zm0,8H20V20h6Z"></path></svg>`);function T(e,y){let x=u(y,[`children`,`$$slots`,`$$events`,`$$legacy`]),S=u(x,[`size`,`title`]);o(y,!1);let T=p(),E=p(),D=g(y,`size`,8,16),O=g(y,`title`,8,void 0);_(()=>(c(x),c(O())),()=>{l(T,x[`aria-label`]||x[`aria-labelledby`]||O())}),_(()=>(s(T),c(x)),()=>{l(E,{"aria-hidden":s(T)?void 0:!0,role:s(T)?`img`:void 0,focusable:Number(x.tabindex)===0?!0:void 0})}),h(),v();var k=w();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:D(),height:D(),...s(E),...S}));var A=f(k),j=e=>{var i=C(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),b(4),t(k),r(e,k),i()}export{S as n,T as t};
@@ -1 +1 @@
1
- import{X as e,_t as t,bt as n,yt as r}from"./DV-Vb89U.js";import{r as i}from"./CjeZEZyg.js";import"./FOMUrrno.js";import{t as a}from"./Ttel-lK0.js";import{i as o}from"./DPHJu-Bj.js";import{i as s}from"./anxNIaXZ.js";import{t as c}from"./uqxmB78b.js";import{r as l}from"./BAH0sc_p.js";var u=r(`idle`),d=r(!1),f=r(null),p=r(null),m=r(null),h=r(``),g=r(null),_=r(0),v=null,y=r(19877),b={get state(){return e(u)},get isElectron(){return e(d)},get activeEntityId(){return e(f)},get activeRepo(){return e(p)},get meetingTitle(){return e(h)},get platform(){return e(g)},get elapsedSeconds(){return e(_)},get recordingStartTime(){return e(m)},handleElectronReady(e){t(d,!0),e?.port&&t(y,e.port,!0)},async handleRecordingStarted(r){if(t(d,!0),e(u)!==`idle`)return;let a=r.repo||await O()||s.repos[0]?.name||null;if(!a){l.error(`No folder configured. Set one in Connectors → Meeting Capture.`);return}t(h,r.meetingTitle||``,!0),t(g,r.platform||null,!0),t(p,a,!0),t(m,new Date,!0),t(u,`recording`),t(_,0),v=setInterval(()=>{n(_)},1e3);let y=T(e(h)||`Meeting`,e(m));try{let n=e(m).toISOString();await o(a,`meeting`,y,{entity_type:`meeting`,entity_id:y,name:e(h)||`Meeting ${E(e(m))}`,date:c(e(m)),created_at:n,updated_at:n,created_by:`desktop`,updated_by:`desktop`,attendees:(r.attendees||[]).filter(e=>!e.isSelf).map(e=>`[[${w(e.name)}]]`),tags:[`auto-transcribed`,r.platform].filter(Boolean)},``),t(f,y,!0),i(`/${a}/meeting/${y}`),S({type:`sg:entity-created`,repo:a,entityType:`meeting`,entityId:y},`*`)}catch(e){console.error(`[Meeting] Failed to create entity:`,e),t(u,`idle`),C()}},handleRecordingStopped(t){e(u)!==`recording`&&e(u)!==`stopping`||x()},startRecording(){e(d)&&S({type:`sg:start-recording`},`*`)},stopRecording(){e(u)===`recording`&&x()},reset(){t(u,`idle`),t(f,null),t(p,null),t(m,null),t(h,``),t(g,null),t(_,0),C()}};function x(){t(u,`stopping`),C();let n=D();fetch(`http://127.0.0.1:${e(y)}/stop`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({entityId:e(f),memo:n})}).catch(()=>{}),t(u,`idle`),l(`Processing meeting notes…`,{description:`Your notes will be ready in a moment.`,duration:5e3})}function S(e,t){let{type:n,...r}=e;window.sgBridge?.send(n,r)}function C(){v&&=(clearInterval(v),null)}function w(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}function T(e,t){let n=c(t),r=t.toTimeString().slice(0,5).replace(`:`,``);return`${n}-${w(e||`meeting`)}-${r}`}function E(e){return e.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function D(){let e=document.querySelector(`.cm-content`);if(e)return e.textContent||``;let t=document.querySelector(`.entity-editor textarea`);return t?t.value:``}async function O(){try{let e=await a(`/api/preferences/settings`);if(e.default_meeting_folder)return e.default_meeting_folder}catch{}return null}export{b as t};
1
+ import{X as e,_t as t,bt as n,yt as r}from"./bMEJ8OJG.js";import{r as i}from"./wg-8qei5.js";import"./Cic-5FH1.js";import{t as a}from"./Ttel-lK0.js";import{i as o}from"./DPHJu-Bj.js";import{i as s}from"./DnHAjb-T.js";import{t as c}from"./uqxmB78b.js";import{r as l}from"./DsExMj4H.js";var u=r(`idle`),d=r(!1),f=r(null),p=r(null),m=r(null),h=r(``),g=r(null),_=r(0),v=null,y=r(19877),b={get state(){return e(u)},get isElectron(){return e(d)},get activeEntityId(){return e(f)},get activeRepo(){return e(p)},get meetingTitle(){return e(h)},get platform(){return e(g)},get elapsedSeconds(){return e(_)},get recordingStartTime(){return e(m)},handleElectronReady(e){t(d,!0),e?.port&&t(y,e.port,!0)},async handleRecordingStarted(r){if(t(d,!0),e(u)!==`idle`)return;let a=r.repo||await O()||s.repos[0]?.name||null;if(!a){l.error(`No folder configured. Set one in Connectors → Meeting Capture.`);return}t(h,r.meetingTitle||``,!0),t(g,r.platform||null,!0),t(p,a,!0),t(m,new Date,!0),t(u,`recording`),t(_,0),v=setInterval(()=>{n(_)},1e3);let y=T(e(h)||`Meeting`,e(m));try{let n=e(m).toISOString();await o(a,`meeting`,y,{entity_type:`meeting`,entity_id:y,name:e(h)||`Meeting ${E(e(m))}`,date:c(e(m)),created_at:n,updated_at:n,created_by:`desktop`,updated_by:`desktop`,attendees:(r.attendees||[]).filter(e=>!e.isSelf).map(e=>`[[${w(e.name)}]]`),tags:[`auto-transcribed`,r.platform].filter(Boolean)},``),t(f,y,!0),i(`/${a}/meeting/${y}`),S({type:`sg:entity-created`,repo:a,entityType:`meeting`,entityId:y},`*`)}catch(e){console.error(`[Meeting] Failed to create entity:`,e),t(u,`idle`),C()}},handleRecordingStopped(t){e(u)!==`recording`&&e(u)!==`stopping`||x()},startRecording(){e(d)&&S({type:`sg:start-recording`},`*`)},stopRecording(){e(u)===`recording`&&x()},reset(){t(u,`idle`),t(f,null),t(p,null),t(m,null),t(h,``),t(g,null),t(_,0),C()}};function x(){t(u,`stopping`),C();let n=D();fetch(`http://127.0.0.1:${e(y)}/stop`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({entityId:e(f),memo:n})}).catch(()=>{}),t(u,`idle`),l(`Processing meeting notes…`,{description:`Your notes will be ready in a moment.`,duration:5e3})}function S(e,t){let{type:n,...r}=e;window.sgBridge?.send(n,r)}function C(){v&&=(clearInterval(v),null)}function w(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}function T(e,t){let n=c(t),r=t.toTimeString().slice(0,5).replace(`:`,``);return`${n}-${w(e||`meeting`)}-${r}`}function E(e){return e.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function D(){let e=document.querySelector(`.cm-content`);if(e)return e.textContent||``;let t=document.querySelector(`.entity-editor textarea`);return t?t.value:``}async function O(){try{let e=await a(`/api/preferences/settings`);if(e.default_meeting_folder)return e.default_meeting_folder}catch{}return null}export{b 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"./B-eErEF72.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};
@@ -1 +1 @@
1
- import{M as e,f as t}from"./B-eErEF72.js";var n={};function r(e,t,r){let a=2166136261;for(let n=0;n<t;n++)a^=e[n].uid,a=Math.imul(a,16777619),a>>>=0;return n[a]||i(e,t,a,r)}function i(r,i,a,o){let s={},c=0;for(let t=0;t<o;t++){let n=t<i?r[t]:e.EMPTY.source;s[c++]=n.source,s[c++]=n.style}let l=new t(s);return n[a]=l,l}export{r as t};
1
+ import{M as e,f as t}from"./CbVWlLYp2.js";var n={};function r(e,t,r){let a=2166136261;for(let n=0;n<t;n++)a^=e[n].uid,a=Math.imul(a,16777619),a>>>=0;return n[a]||i(e,t,a,r)}function i(r,i,a,o){let s={},c=0;for(let t=0;t<o;t++){let n=t<i?r[t]:e.EMPTY.source;s[c++]=n.source,s[c++]=n.style}let l=new t(s);return n[a]=l,l}export{r as t};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./BNTlsKDJ.js";import{X as t,_t as n,bt as r,mt as i,xt as a,yt as o}from"./DV-Vb89U.js";import{i as s}from"./CjeZEZyg.js";import"./FOMUrrno.js";import{i as c}from"./anxNIaXZ.js";import{t as l}from"./WTC1eGPD.js";import{t as u}from"./SJL_oyD4.js";import{t as d}from"./uqxmB78b.js";function f(e,t,n){fetch(`/api/chat/stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:n}).then(async e=>{if(!e.ok){t({type:`error`,message:`HTTP ${e.status}`});return}let n=e.body?.getReader();if(!n){t({type:`error`,message:`No response body`});return}let r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await n.read();if(e)break;i+=r.decode(a,{stream:!0});let o=i.split(`
2
- `);i=o.pop()??``;for(let e of o)if(e.startsWith(`data: `))try{t(JSON.parse(e.slice(6)))}catch{}}}).catch(e=>{e.name!==`AbortError`&&t({type:`error`,message:e.message})})}var p=e({chatStore:()=>w});function m(){let e=c.name;return e&&e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function h(){let e=u.user?.id;return e?`sg-chat-sessions-${m()}-${e}`:`sg-chat-sessions`}function g(){let e=u.user?.id;return e?`sg-chat-version-${m()}-${e}`:`sg-chat-version`}var _=14;function v(){try{if(u.user?.id){localStorage.getItem(`sg-chat-sessions`)&&(localStorage.removeItem(`sg-chat-sessions`),localStorage.removeItem(`sg-chat-version`));let e=`sg-chat-sessions-${u.user.id}`;localStorage.getItem(e)&&(localStorage.removeItem(e),localStorage.removeItem(`sg-chat-version-${u.user.id}`))}}catch{}}function y(){v();try{let e=localStorage.getItem(h());if(!e)return[];if(localStorage.getItem(g())===`2`)return JSON.parse(e);let t=JSON.parse(e).map(e=>({id:crypto.randomUUID(),createdAt:e.date+`T00:00:00.000Z`,updatedAt:e.date+`T00:00:00.000Z`,title:e.messages.find(e=>e.role===`user`)?.content.slice(0,50)||`New chat`,messages:e.messages}));return localStorage.setItem(h(),JSON.stringify(t)),localStorage.setItem(g(),`2`),t}catch{return[]}}function b(e){let t=[...e].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).slice(0,_);try{localStorage.setItem(h(),JSON.stringify(t)),localStorage.setItem(g(),`2`)}catch{}}function x(e,t){let n=y(),r=t.map(({streaming:e,...t})=>t),i=n.findIndex(t=>t.id===e);i>=0&&(n[i].messages=r,n[i].updatedAt=new Date().toISOString()),b(n)}function S(e){return d(new Date(e.updatedAt))===d()}function C(){let e=y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).find(S)??null,u=o(i(e?e.messages.map(e=>({...e,streaming:!1})):[])),d=o(i(e?.id??null)),p=o(!1),m=o(0),h=o(0),g=o(0),_=o(null),v=null,C=o(``),w=o(i(!!e)),T=o(!1),E=o(0),D=o(0),O=a(()=>t(T)&&t(E)>t(D)),k=new Set([`create_entity`,`update_entity`,`delete_entity`,`move_entity`,`transfer_entity`,`create_folder`,`create_subfolder`,`rename_folder`,`delete_folder`]);function A(){N(),n(d,crypto.randomUUID(),!0),n(u,[],!0),n(w,!1)}function j(){if(t(d)&&t(w))return t(d);let e=t(d)||crypto.randomUUID();n(d,e,!0);let r=new Date().toISOString(),i=y();return i.push({id:e,createdAt:r,updatedAt:r,title:`New chat`,messages:[]}),b(i),n(w,!0),e}function M(e,i){if(!e.trim()||t(p))return;n(_,null);let a=j(),o=!!i?.silent;o||t(u).push({role:`user`,content:e}),t(u).push({role:`agent`,content:``,segments:[],streaming:!0}),r(E),n(p,!0);let g=y(),S=g.find(e=>e.id===a);S&&S.title===`New chat`&&(S.title=e.slice(0,50),b(g)),x(a,t(u));let C=!1,T=null;v=new AbortController;let D=l.selectedSubPath?`${l.selectedRepo}/${l.selectedType}/${l.selectedId}/${l.selectedSubPath}`:l.selectedId?`${l.selectedRepo}/${l.selectedType}/${l.selectedId}`:l.selectedRepo?`folder:${l.selectedRepo}`:null,O=t(u).slice(0,-2).map(e=>({role:e.role===`agent`?`assistant`:e.role,content:e.content}));f({message:e,context:D??void 0,sessionId:a,history:O.length>0?O:void 0},e=>{if(!t(p))return;let i=t(u)[t(u).length-1];if(!i||i.role!==`agent`)return;let l=i.segments;switch(e.type){case`token`:{i.content+=e.text??``;let t=l[l.length-1];t&&t.type===`text`?t.content+=e.text??``:l.push({type:`text`,content:e.text??``}),i.segments=l,r(h);break}case`tool_start`:if(e.name){k.has(e.name)&&(C=!0);let t=l[l.length-1];t&&t.type===`tools`?t.names=[...t.names,e.name]:l.push({type:`tools`,names:[e.name]}),i.segments=l,r(h)}break;case`mutation`:C=!0,e.action===`created`&&e.repo&&e.entityType&&e.entityId&&(T={repo:e.repo,entityType:e.entityType,entityId:e.entityId}),e.repo===`_conversation`&&setTimeout(()=>{n(u,[],!0),t(d)&&t(w)&&x(t(d),t(u))},100),e.repo===`_workspace`&&c.load(),window.StudioChrome?.emitMutation?.({action:e.action,repo:e.repo,entityType:e.entityType,entityId:e.entityId});break;case`highlight`:n(_,e.entityIds&&e.entityIds.length>0?new Set(e.entityIds):null,!0);break;case`done`:{let l=/<!--\s*followups:\s*\[.*?\]\s*-->\s*$/s;i.content&&=i.content.replace(l,``).trimEnd();let f=i.segments??[],h=f[f.length-1];if(h?.type===`text`&&(h.content=h.content.replace(l,``).trimEnd()),o&&e.fallback&&!i.content){n(u,t(u).slice(0,-1),!0),n(p,!1),t(d)&&t(w)&&x(a,t(u));break}if(e.message&&!i.content&&(i.content=e.message,i.segments=[{type:`text`,content:e.message}]),e.suggestions?.length&&(i.suggestions=e.suggestions),i.streaming=!1,n(p,!1),x(a,t(u)),C){s().then(()=>{r(m)});let e=new Set(c.repos.map(e=>e.name));T&&!e.has(T.repo)?c.load():c.refreshAll()}break}case`error`:i.content+=`\n\nError: ${e.message}`,i.streaming=!1,n(p,!1),x(a,t(u));break}},v.signal)}function N(){if(!t(p))return;fetch(`/api/chat/abort`,{method:`POST`,credentials:`include`}).catch(()=>{}),v?.abort(),v=null,n(p,!1);let e=t(u)[t(u).length-1];e?.streaming&&(e.streaming=!1,t(d)&&x(t(d),t(u)))}function P(e){let t=y().find(t=>t.id===e);t&&(N(),n(d,t.id,!0),n(u,t.messages.map(e=>({...e,streaming:!1})),!0),n(w,!0))}function F(){return y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(e=>e.role===`user`)?.content.slice(0,80)||``,count:e.messages.length,active:e.id===t(d)}))}return{get messages(){return t(u)},get streaming(){return t(p)},get mutationCount(){return t(m)},get scrollTick(){return t(h)},get forceScroll(){return t(g)},triggerScroll(){r(g)},get highlightedIds(){return t(_)},get activeSessionId(){return t(d)},get draftInput(){return t(C)},set draftInput(e){n(C,e,!0)},send:M,stop:N,newSession:A,loadSession:P,getSessions:F,reinitialize(){N();let e=y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).find(S)??null;n(d,e?.id??null,!0),n(u,e?.messages.map(e=>({...e,streaming:!1}))??[],!0),n(w,!!e),n(D,t(E),!0),n(T,!0)},get hydrated(){return t(T)},get hasUnread(){return t(O)},markSeen(){n(D,t(E),!0)}}}var w=C();export{p as n,w as t};
1
+ import{n as e}from"./BNTlsKDJ.js";import{St as t,X as n,_t as r,bt as i,mt as a,yt as o}from"./bMEJ8OJG.js";import{i as s}from"./wg-8qei5.js";import"./Cic-5FH1.js";import{i as c}from"./DnHAjb-T.js";import{t as l}from"./CAMrzEb0.js";import{t as u}from"./DJUVHWge.js";import{t as d}from"./uqxmB78b.js";function f(e,t,n){fetch(`/api/chat/stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:n}).then(async e=>{if(!e.ok){t({type:`error`,message:`HTTP ${e.status}`});return}let n=e.body?.getReader();if(!n){t({type:`error`,message:`No response body`});return}let r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await n.read();if(e)break;i+=r.decode(a,{stream:!0});let o=i.split(`
2
+ `);i=o.pop()??``;for(let e of o)if(e.startsWith(`data: `))try{t(JSON.parse(e.slice(6)))}catch{}}}).catch(e=>{e.name!==`AbortError`&&t({type:`error`,message:e.message})})}var p=e({chatStore:()=>w});function m(){let e=c.name;return e&&e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function h(){let e=u.user?.id;return e?`sg-chat-sessions-${m()}-${e}`:`sg-chat-sessions`}function g(){let e=u.user?.id;return e?`sg-chat-version-${m()}-${e}`:`sg-chat-version`}var _=14;function v(){try{if(u.user?.id){localStorage.getItem(`sg-chat-sessions`)&&(localStorage.removeItem(`sg-chat-sessions`),localStorage.removeItem(`sg-chat-version`));let e=`sg-chat-sessions-${u.user.id}`;localStorage.getItem(e)&&(localStorage.removeItem(e),localStorage.removeItem(`sg-chat-version-${u.user.id}`))}}catch{}}function y(){v();try{let e=localStorage.getItem(h());if(!e)return[];if(localStorage.getItem(g())===`2`)return JSON.parse(e);let t=JSON.parse(e).map(e=>({id:crypto.randomUUID(),createdAt:e.date+`T00:00:00.000Z`,updatedAt:e.date+`T00:00:00.000Z`,title:e.messages.find(e=>e.role===`user`)?.content.slice(0,50)||`New chat`,messages:e.messages}));return localStorage.setItem(h(),JSON.stringify(t)),localStorage.setItem(g(),`2`),t}catch{return[]}}function b(e){let t=[...e].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).slice(0,_);try{localStorage.setItem(h(),JSON.stringify(t)),localStorage.setItem(g(),`2`)}catch{}}function x(e,t){let n=y(),r=t.map(({streaming:e,...t})=>t),i=n.findIndex(t=>t.id===e);i>=0&&(n[i].messages=r,n[i].updatedAt=new Date().toISOString()),b(n)}function S(e){return d(new Date(e.updatedAt))===d()}function C(){let e=y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).find(S)??null,u=o(a(e?e.messages.map(e=>({...e,streaming:!1})):[])),d=o(a(e?.id??null)),p=o(!1),m=o(0),h=o(0),g=o(0),_=o(null),v=null,C=o(``),w=o(a(!!e)),T=o(!1),E=o(0),D=o(0),O=t(()=>n(T)&&n(E)>n(D)),k=new Set([`create_entity`,`update_entity`,`delete_entity`,`move_entity`,`transfer_entity`,`create_folder`,`create_subfolder`,`rename_folder`,`delete_folder`]);function A(){N(),r(d,crypto.randomUUID(),!0),r(u,[],!0),r(w,!1)}function j(){if(n(d)&&n(w))return n(d);let e=n(d)||crypto.randomUUID();r(d,e,!0);let t=new Date().toISOString(),i=y();return i.push({id:e,createdAt:t,updatedAt:t,title:`New chat`,messages:[]}),b(i),r(w,!0),e}function M(e,t){if(!e.trim()||n(p))return;r(_,null);let a=j(),o=!!t?.silent;o||n(u).push({role:`user`,content:e}),n(u).push({role:`agent`,content:``,segments:[],streaming:!0}),i(E),r(p,!0);let g=y(),S=g.find(e=>e.id===a);S&&S.title===`New chat`&&(S.title=e.slice(0,50),b(g)),x(a,n(u));let C=!1,T=null;v=new AbortController;let D=l.selectedSubPath?`${l.selectedRepo}/${l.selectedType}/${l.selectedId}/${l.selectedSubPath}`:l.selectedId?`${l.selectedRepo}/${l.selectedType}/${l.selectedId}`:l.selectedRepo?`folder:${l.selectedRepo}`:null,O=n(u).slice(0,-2).map(e=>({role:e.role===`agent`?`assistant`:e.role,content:e.content}));f({message:e,context:D??void 0,sessionId:a,history:O.length>0?O:void 0},e=>{if(!n(p))return;let t=n(u)[n(u).length-1];if(!t||t.role!==`agent`)return;let l=t.segments;switch(e.type){case`token`:{t.content+=e.text??``;let n=l[l.length-1];n&&n.type===`text`?n.content+=e.text??``:l.push({type:`text`,content:e.text??``}),t.segments=l,i(h);break}case`tool_start`:if(e.name){k.has(e.name)&&(C=!0);let n=l[l.length-1];n&&n.type===`tools`?n.names=[...n.names,e.name]:l.push({type:`tools`,names:[e.name]}),t.segments=l,i(h)}break;case`mutation`:C=!0,e.action===`created`&&e.repo&&e.entityType&&e.entityId&&(T={repo:e.repo,entityType:e.entityType,entityId:e.entityId}),e.repo===`_conversation`&&setTimeout(()=>{r(u,[],!0),n(d)&&n(w)&&x(n(d),n(u))},100),e.repo===`_workspace`&&c.load(),window.StudioChrome?.emitMutation?.({action:e.action,repo:e.repo,entityType:e.entityType,entityId:e.entityId});break;case`highlight`:r(_,e.entityIds&&e.entityIds.length>0?new Set(e.entityIds):null,!0);break;case`done`:{let l=/<!--\s*followups:\s*\[.*?\]\s*-->\s*$/s;t.content&&=t.content.replace(l,``).trimEnd();let f=t.segments??[],h=f[f.length-1];if(h?.type===`text`&&(h.content=h.content.replace(l,``).trimEnd()),o&&e.fallback&&!t.content){r(u,n(u).slice(0,-1),!0),r(p,!1),n(d)&&n(w)&&x(a,n(u));break}if(e.message&&!t.content&&(t.content=e.message,t.segments=[{type:`text`,content:e.message}]),e.suggestions?.length&&(t.suggestions=e.suggestions),t.streaming=!1,r(p,!1),x(a,n(u)),C){s().then(()=>{i(m)});let e=new Set(c.repos.map(e=>e.name));T&&!e.has(T.repo)?c.load():c.refreshAll()}break}case`error`:t.content+=`\n\nError: ${e.message}`,t.streaming=!1,r(p,!1),x(a,n(u));break}},v.signal)}function N(){if(!n(p))return;fetch(`/api/chat/abort`,{method:`POST`,credentials:`include`}).catch(()=>{}),v?.abort(),v=null,r(p,!1);let e=n(u)[n(u).length-1];e?.streaming&&(e.streaming=!1,n(d)&&x(n(d),n(u)))}function P(e){let t=y().find(t=>t.id===e);t&&(N(),r(d,t.id,!0),r(u,t.messages.map(e=>({...e,streaming:!1})),!0),r(w,!0))}function F(){return y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(e=>e.role===`user`)?.content.slice(0,80)||``,count:e.messages.length,active:e.id===n(d)}))}return{get messages(){return n(u)},get streaming(){return n(p)},get mutationCount(){return n(m)},get scrollTick(){return n(h)},get forceScroll(){return n(g)},triggerScroll(){i(g)},get highlightedIds(){return n(_)},get activeSessionId(){return n(d)},get draftInput(){return n(C)},set draftInput(e){r(C,e,!0)},send:M,stop:N,newSession:A,loadSession:P,getSessions:F,reinitialize(){N();let e=y().sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).find(S)??null;r(d,e?.id??null,!0),r(u,e?.messages.map(e=>({...e,streaming:!1}))??[],!0),r(w,!!e),r(D,n(E),!0),r(T,!0)},get hydrated(){return n(T)},get hasUnread(){return n(O)},markSeen(){r(D,n(E),!0)}}}var w=C();export{p as n,w as t};
@@ -1 +1 @@
1
- import{X as e,_t as t,yt as n}from"./DV-Vb89U.js";function r(){let r=n(!1);return{get open(){return e(r)},toggle(){t(r,!e(r))},show(){t(r,!0)},hide(){t(r,!1)}}}var i=r();export{i as agentOverlay};
1
+ import{X as e,_t as t,yt as n}from"./bMEJ8OJG.js";function r(){let r=n(!1);return{get open(){return e(r)},toggle(){t(r,!e(r))},show(){t(r,!0)},hide(){t(r,!1)}}}var i=r();export{i as agentOverlay};
@@ -0,0 +1 @@
1
+ import{L as e,Mt as t,Nt as n,d as r,f as i,h as a,o,s,z as c}from"./bMEJ8OJG.js";import"./t62M88qj.js";import{n as l}from"./C_aV-x0w2.js";var u=c(`<input/>`);function d(c,d){n(d,!0);let f=o(d,`ref`,15,null),p=o(d,`value`,15),m=s(d,[`$$slots`,`$$events`,`$$legacy`,`class`,`ref`,`value`]);var h=u();a(h,e=>({class:e,...m}),[()=>l(`h-[var(--input-height,2rem)] w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-2.5 text-base text-[var(--color-text-primary)] font-[inherit] outline-none transition-colors placeholder:text-[var(--color-text-tertiary)] hover:border-[var(--color-text-tertiary)] focus:border-[var(--color-accent,#f04e4e)] disabled:cursor-not-allowed disabled:opacity-50`,d.class)],void 0,void 0,void 0,!0),r(h,e=>f(e),()=>f()),i(h,p),e(c,h),t()}export{d as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DsExMj4H.js","./BNTlsKDJ.js","./bMEJ8OJG.js","./UuI7Esum.js","./t62M88qj.js","./DQSHfqQ5.js","../assets/dist.DDCWxn3B.css"])))=>i.map(i=>d[i]);
2
+ import{A as e,Bt as t,D as n,F as r,H as i,L as a,Mt as o,N as s,Nt as c,R as l,St as u,U as d,W as ee,X as f,_ as p,_t as m,at as h,dt as g,ft as _,j as v,mt as y,ot as b,pt as x,yt as S,z as C,zt as w}from"./bMEJ8OJG.js";import{t as T}from"./C-OaypFN.js";import"./t62M88qj.js";import{t as E}from"./Y2LdbZDT2.js";import"./D9O3NbAy2.js";import{t as te}from"./Bn_dYPdE.js";import{t as ne}from"./BQe5yAWz.js";import{a as D,c as O,n as k,o as A,r as j,s as M,t as N}from"./C9aMbTXg.js";import{n as re,t as ie}from"./Du2-B3c8.js";var ae=C(`<!> <!>`,1),oe=C(`<p class="asset-status svelte-3ci416">Loading assets...</p>`),se=C(`<p class="asset-status asset-error svelte-3ci416"> </p>`),ce=C(`<p class="asset-status svelte-3ci416">No assets in this folder.</p>`),P=C(`<img loading="lazy" class="svelte-3ci416"/>`),F=C(`<div class="asset-icon svelte-3ci416"><!></div>`),I=C(`<div class="asset-card svelte-3ci416"><div class="asset-preview svelte-3ci416"><!></div> <div class="asset-info svelte-3ci416"><span class="asset-filename svelte-3ci416"> </span> <span class="asset-meta svelte-3ci416"> </span></div> <button class="asset-delete svelte-3ci416" title="Delete asset"><!></button></div>`),L=C(`<div class="asset-grid svelte-3ci416"></div>`),R=C(`<div class="asset-manager svelte-3ci416"><!></div>`),z=C(`<!> <!>`,1),B=C(`<!> <!>`,1),V=C(`<p>This will permanently delete <strong> </strong> from <strong> </strong>. Any references to this image in the entry body will break.</p>`),H=C(`<!> <!>`,1),U=C(`<!> <!> <!>`,1),W=C(`<!> <!>`,1);function G(d,C){c(C,!0);let G=u(()=>!!C.repo),K=S(y([])),q=S(!1),J=S(``),Y=S(null),X=S(!1),Z=new Map;b(()=>{f(G)&&C.repo&&le(C.repo)});async function le(e){let t=Z.get(e);t?(m(K,t,!0),m(q,!1)):(m(q,!0),m(K,[],!0)),m(J,``);try{let t=await re(e);Z.set(e,t),C.repo===e&&m(K,t,!0)}catch(t){C.repo===e&&m(J,t.message??`Failed to load assets`,!0)}finally{C.repo===e&&m(q,!1)}}async function ue(){if(!f(Y)||!C.repo)return;m(X,!0);let e=f(Y),t=C.repo;try{await ie(t,e.entityType,e.entityId,e.filename),m(K,f(K).filter(t=>t!==e),!0);let n=Z.get(t);n&&Z.set(t,n.filter(t=>t!==e)),m(Y,null);let{toast:r}=await T(async()=>{let{toast:e}=await import(`./DsExMj4H.js`).then(e=>e.t);return{toast:e}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);r.success(`Asset deleted`)}catch(e){let{toast:t}=await T(async()=>{let{toast:e}=await import(`./DsExMj4H.js`).then(e=>e.t);return{toast:e}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);t.error(e.message??`Delete failed`)}finally{m(X,!1)}}function de(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function fe(e){return e.mediaType===`image`}var Q=W(),$=_(Q);n($,()=>O,(o,c)=>{c(o,{get open(){return f(G)},onOpenChange:e=>{e||C.onClose()},children:(o,c)=>{var d=l();n(_(d),()=>M,(o,c)=>{c(o,{size:`lg`,children:(o,c)=>{var l=z(),d=_(l);n(d,()=>A,(e,t)=>{t(e,{children:(e,t)=>{var r=ae(),o=_(r);n(o,()=>D,(e,t)=>{t(e,{children:(e,t)=>{w(),a(e,i(`Assets`))},$$slots:{default:!0}})}),n(x(o,2),()=>N,(e,t)=>{t(e,{})}),a(e,r)},$$slots:{default:!0}})}),n(x(d,2),()=>j,(n,i)=>{i(n,{children:(n,i)=>{var o=R(),c=g(o),l=e=>{a(e,oe())},d=e=>{var n=se(),i=g(n,!0);t(n),h(()=>r(i,f(J))),a(e,n)},_=e=>{a(e,ce())},y=n=>{var i=L();e(i,21,()=>f(K),v,(e,n)=>{var i=I(),o=g(i),c=g(o),l=e=>{var t=P();h(()=>{p(t,`src`,f(n).url),p(t,`alt`,f(n).filename)}),a(e,t)},d=u(()=>fe(f(n))),_=e=>{var n=F();te(g(n),{size:24}),t(n),a(e,n)};s(c,e=>{f(d)?e(l):e(_,-1)}),t(o);var v=x(o,2),y=g(v),b=g(y,!0);t(y);var S=x(y,2),C=g(S);t(S),t(v);var w=x(v,2);ne(g(w),{size:14}),t(w),t(i),h((e,t)=>{p(y,`title`,f(n).filename),r(b,e),r(C,`${t??``} · ${f(n).entityName??``}`)},[()=>f(n).filename.replace(/^\d+-/,``),()=>de(f(n).size)]),ee(`click`,w,()=>{m(Y,f(n),!0)}),a(e,i)}),t(i),a(n,i)};s(c,e=>{f(q)?e(l):f(J)?e(d,1):f(K).length===0?e(_,2):e(y,-1)}),t(o),a(n,o)},$$slots:{default:!0}})}),a(o,l)},$$slots:{default:!0}})}),a(o,d)},$$slots:{default:!0}})});var pe=x($,2);{let e=u(()=>!!f(Y));n(pe,()=>O,(o,c)=>{c(o,{get open(){return f(e)},onOpenChange:e=>{e||m(Y,null)},children:(e,o)=>{var c=l();n(_(c),()=>M,(e,o)=>{o(e,{size:`sm`,children:(e,o)=>{var c=U(),u=_(c);n(u,()=>A,(e,t)=>{t(e,{children:(e,t)=>{var r=B(),o=_(r);n(o,()=>D,(e,t)=>{t(e,{children:(e,t)=>{w(),a(e,i(`Delete asset?`))},$$slots:{default:!0}})}),n(x(o,2),()=>N,(e,t)=>{t(e,{})}),a(e,r)},$$slots:{default:!0}})});var d=x(u,2);n(d,()=>j,(e,n)=>{n(e,{children:(e,n)=>{var i=l(),o=_(i),c=e=>{var n=V(),i=x(g(n)),o=g(i,!0);t(i);var s=x(i,2),c=g(s,!0);t(s),w(),t(n),h(e=>{r(o,e),r(c,f(Y).entityName)},[()=>f(Y).filename.replace(/^\d+-/,``)]),a(e,n)};s(o,e=>{f(Y)&&e(c)}),a(e,i)},$$slots:{default:!0}})}),n(x(d,2),()=>k,(e,t)=>{t(e,{children:(e,t)=>{var n=H(),o=_(n);E(o,{variant:`ghost`,onclick:()=>{m(Y,null)},children:(e,t)=>{w(),a(e,i(`Cancel`))},$$slots:{default:!0}}),E(x(o,2),{variant:`destructive`,get disabled(){return f(X)},onclick:ue,children:(e,t)=>{w();var n=i();h(()=>r(n,f(X)?`Deleting...`:`Delete`)),a(e,n)},$$slots:{default:!0}}),a(e,n)},$$slots:{default:!0}})}),a(e,c)},$$slots:{default:!0}})}),a(e,c)},$$slots:{default:!0}})})}a(d,Q),o()}d([`click`]);export{G as default};
@@ -0,0 +1,5 @@
1
+ import{$ as e,At as t,C as n,Ct as r,Ht 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,St as _,X as v,_t as y,ft as b,jt as te,kt as ne,mt as x,nt as re,o as S,ot as C,st as ie,yt as w}from"./bMEJ8OJG.js";import"./t62M88qj.js";import{t as ae}from"./UuI7Esum.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=_(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=w(x(e));return{[E]:!0,[le]:!0,get current(){return v(t)},set current(e){y(t,e,!0)}}}function k(e){let t=w(x(e));return{[E]:!0,[le]:!0,get current(){return v(t)},set current(e){y(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=r(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 te(this.#t)}get(){let e=t(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let n=t(this.#t);return n===void 0?e:n}set(e){return m(this.#t,e)}};function Xe(e,t){switch(e){case`post`:C(t);break;case`pre`:ie(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=_(()=>(v(this.#s)?.(),this.getSize().width));#o=_(()=>(v(this.#s)?.(),this.getSize().height));#s=_(()=>{let e=nt(this.#r);if(e)return r(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=_(()=>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=w(x(o)),u=w(!1),d=w(void 0),f=w(x([])),p=()=>{v(f).forEach(e=>e()),y(f,[],!0)},ee=e=>{y(f,[...v(f),e],!0)},m=async(e,n,r=!1)=>{try{y(u,!0),y(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 y(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||y(d,e,!0);return}finally{y(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=>{y(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 St=class{element;#e=_(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return v(this.#e)}set root(e){y(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 R(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 z(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=w(!1);#i=w(void 0);#a=!1;#o=null;constructor(e){this.#e=e,y(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?.()){y(this.#r,!1),y(this.#i,void 0),this.#e.onComplete?.();return}if(e&&y(this.#r,!0),y(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&y(this.#i,void 0)})),!this.#t){e||y(this.#r,!1),y(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||y(this.#r,!1),y(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(b(n),()=>t.children,e=>{var n=g();p(b(n),()=>t.children??i),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,t){f(t,!0);let n=pn(()=>t.to),r=ne(),o=_(s);function s(){if(!Jt||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let l;function m(){l&&=(a(l),null)}P([()=>v(o),()=>t.disabled],([e,n])=>{if(!e||n){m();return}return l=ee(on,{target:e,props:{children:t.children},context:r}),()=>{m()}});var h=g(),y=b(h),te=e=>{var n=g();p(b(n),()=>t.children??i),c(e,n)};d(y,e=>{t.disabled&&e(te)}),c(e,h),u()}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=w(!1),On=class e{static _refs=0;static _cleanup;constructor(){C(()=>(e._refs===0&&(e._cleanup=re(()=>{let e=[],t=e=>{y(J,!1)};return e.push(s(document,`pointerdown`,t,{capture:!0}),s(document,`pointermove`,t,{capture:!0}),s(document,`keydown`,e=>{y(J,!0)},{capture:!0})),M(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(y(J,!1),e._cleanup?.())}))}get current(){return v(J)}set current(e){y(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=w(x(e));function s(){return i().setTimeout(()=>{y(o,e,!0),r?.(e)},n)}return C(()=>()=>{a&&i().clearTimeout(a)}),D(()=>v(o),e=>{y(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var yr=class{#e;#t;#n=_(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#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=w(!1);get ignoreCloseAutoFocus(){return v(this.#e)}set ignoreCloseAutoFocus(e){y(this.#e,e,!0)}#t=w(!1);get isPointerInTransit(){return v(this.#t)}set isPointerInTransit(e){y(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=w(null);get contentNode(){return v(this.#e)}set contentNode(e){y(this.#e,e,!0)}contentPresence;#t=w(null);get triggerNode(){return v(this.#t)}set triggerNode(e){y(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=w(``);get search(){return v(this.#e)}set search(e){y(this.#e,e,!0)}#t=0;#n;#r=w(!1);get mounted(){return v(this.#r)}set mounted(e){y(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new St(e.ref),this.attachment=R(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=_(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return v(this.#c)}set snippetProps(e){y(this.#c,e)}#l=_(()=>({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){y(this.#l,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},Lr=class{opts;content;attachment;#e=w(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=R(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||y(this.#e,!0)})}onblur(e){I(()=>{e.defaultPrevented||y(this.#e,!1)})}#t=_(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":z(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){y(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=_(()=>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){y(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=R(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=_(()=>Ke({"aria-haspopup":`menu`,"aria-expanded":z(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){y(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=R(this.opts.ref)}#e=_(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return v(this.#e)}set props(e){y(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=R(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=_(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=_(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":z(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){y(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){f(t,!0);let n=S(t,`interactOutsideBehavior`,3,`close`),r=S(t,`onInteractOutside`,3,K),a=S(t,`onFocusOutside`,3,K),o=S(t,`isValidEvent`,3,()=>!1),s=Ur.create({id:D(()=>t.id),interactOutsideBehavior:D(()=>n()),onInteractOutside:D(()=>r()),enabled:D(()=>t.enabled),onFocusOutside:D(()=>a()),isValidEvent:D(()=>o()),ref:t.ref});var l=g();p(b(l),()=>t.children??i,()=>({props:s.props})),c(e,l),u()}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 St(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){f(t,!0);let n=S(t,`escapeKeydownBehavior`,3,`close`),r=S(t,`onEscapeKeydown`,3,K);Yr.create({escapeKeydownBehavior:D(()=>n()),onEscapeKeydown:D(()=>r()),enabled:D(()=>t.enabled),ref:t.ref});var a=g();p(b(a),()=>t.children??i),c(e,a),u()}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){f(t,!0);let n=S(t,`enabled`,3,!1),r=S(t,`trapFocus`,3,!1),a=S(t,`loop`,3,!1),o=S(t,`onCloseAutoFocus`,3,K),s=S(t,`onOpenAutoFocus`,3,K),l=$r.use({enabled:D(()=>n()),trap:D(()=>r()),loop:a(),onCloseAutoFocus:D(()=>o()),onOpenAutoFocus:D(()=>s()),ref:t.ref});var d=g();p(b(d),()=>t.focusScope??i,()=>({props:l.props})),c(e,d),u()}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 St(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){f(t,!0);let n=S(t,`preventOverflowTextSelection`,3,!0),r=S(t,`onPointerDown`,3,K),a=S(t,`onPointerUp`,3,K);ti.create({id:D(()=>t.id),onPointerDown:D(()=>r()),onPointerUp:D(()=>a()),enabled:D(()=>t.enabled&&n()),ref:t.ref});var o=g();p(b(o),()=>t.children??i),c(e,o),u()}globalThis.bitsIdCounter??={current:0};function si(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var ci=class{#e;#t=0;#n=w();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),y(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,v(this.#n)===void 0&&(this.#r=re(()=>{y(this.#n,this.#e(...e),!0)})),C(()=>()=>{this.#i()}),v(this.#n)}},li=new ae,ui=w(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?.(),y(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&&!$&&y(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){f(t,!0);let n=S(t,`preventScroll`,3,!0),r=S(t,`restoreScrollDelay`,3,null);n()&&new hi(n(),()=>r()),u()}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,R as ct,wr as d,bt as dt,z 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,St 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{L as e,Mt as t,N as n,Nt as r,R as i,St as a,X as o,f as s,ft as c,h as l,o as u,s as d,z as f}from"./bMEJ8OJG.js";import"./t62M88qj.js";import{bt as p,yt as m}from"./BILUcEY8.js";var h={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`},g=p(h),_=f(`<input/>`),v=f(`<input/>`);function y(f,p){r(p,!0);let g=u(p,`value`,15),y=d(p,[`$$slots`,`$$events`,`$$legacy`,`value`]),b=a(()=>m(y,{"aria-hidden":`true`,tabindex:-1,style:{...h,position:`absolute`,top:`0`,left:`0`}}));var x=i(),S=c(x),C=t=>{var n=_();l(n,()=>({...o(b),value:g()}),void 0,void 0,void 0,void 0,!0),e(t,n)},w=t=>{var n=v();l(n,()=>({...o(b)}),void 0,void 0,void 0,void 0,!0),s(n,g),e(t,n)};n(S,e=>{o(b).type===`checkbox`?e(C):e(w,-1)}),e(f,x),t()}export{g as n,y as t};
@@ -0,0 +1 @@
1
+ import{B as e,Bt as t,D as n,F as r,Ht as i,L as a,Lt as o,Mt as s,N as c,Nt as l,O as u,R as d,St as f,V as p,X as m,Y as h,_t as g,a as _,at as v,c as y,dt as b,ft as x,gt as S,h as C,it as w,mt as T,o as E,pt as D,rt as O,s as k,u as A,yt as j,z as M,zt as N}from"./bMEJ8OJG.js";import"./t62M88qj.js";import{m as P}from"./DPHJu-Bj.js";import"./DQSHfqQ5.js";import{$ as F,Ct as I,F as L,_t as R,ct as z,et as B,it as V,k as H,rt as U,vt as W,yt as G}from"./BILUcEY8.js";import{t as K}from"./BIn88OKz.js";import{n as q}from"./C_aV-x0w2.js";import{t as J}from"./CJJgm_Hh.js";var Y=U({component:`checkbox`,parts:[`root`,`group`,`group-label`,`input`]}),X=new W(`Checkbox.Group`),Z=new W(`Checkbox.Root`),Q=class e{static create(t,n=null){return Z.set(new e(t,n))}opts;group;#e=f(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return m(this.#e)}set trueName(e){g(this.#e,e)}#t=f(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return m(this.#t)}set trueRequired(e){g(this.#t,e)}#n=f(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return m(this.#n)}set trueDisabled(e){g(this.#n,e)}#r=f(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return m(this.#r)}set trueReadonly(e){g(this.#r,e)}attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=z(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),R.pre([()=>o(this.group?.opts.value.current),()=>this.opts.value.current],([e,t])=>{!e||!t||(this.opts.checked.current=e.includes(t))}),R.pre(()=>this.opts.checked.current,e=>{this.group&&(e?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===`Enter`){e.preventDefault(),this.opts.type.current===`submit`&&e.currentTarget.closest(`form`)?.requestSubmit();return}e.key===` `&&(e.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current===`submit`){this.#i();return}e.preventDefault(),this.#i()}}#a=f(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return m(this.#a)}set snippetProps(e){g(this.#a,e)}#o=f(()=>({id:this.opts.id.current,role:`checkbox`,type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":V(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":B(this.trueRequired),"aria-readonly":B(this.trueReadonly),"data-disabled":F(this.trueDisabled),"data-readonly":F(this.trueReadonly),"data-state":te(this.opts.checked.current,this.opts.indeterminate.current),[Y.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return m(this.#o)}set props(e){g(this.#o,e)}},ee=class e{static create(){return new e(Z.get())}root;#e=f(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return m(this.#e)}set trueChecked(e){g(this.#e,e)}#t=f(()=>!!this.root.trueName);get shouldRender(){return m(this.#t)}set shouldRender(e){g(this.#t,e)}constructor(e){this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(e){L(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#n=f(()=>({type:`checkbox`,checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return m(this.#n)}set props(e){g(this.#n,e)}};function te(e,t){return t?`indeterminate`:e?`checked`:`unchecked`}function ne(e,t){l(t,!1);let n=ee.create();A();var r=d(),i=x(r),o=e=>{K(e,y(()=>n.props))};c(i,e=>{n.shouldRender&&e(o)}),a(e,r),s()}var re=M(`<button><!></button>`),ie=M(`<!> <!>`,1);function ae(e,n){let r=p();l(n,!0);let o=E(n,`checked`,15,!1),h=E(n,`ref`,15,null),g=E(n,`disabled`,3,!1),_=E(n,`required`,3,!1),v=E(n,`name`,3,void 0),y=E(n,`value`,3,`on`),S=E(n,`id`,19,()=>H(r)),w=E(n,`indeterminate`,15,!1),T=E(n,`type`,3,`button`),O=k(n,[`$$slots`,`$$events`,`$$legacy`,`checked`,`ref`,`onCheckedChange`,`children`,`disabled`,`required`,`name`,`value`,`id`,`indeterminate`,`onIndeterminateChange`,`child`,`type`,`readonly`]),A=X.getOr(null);A&&y()&&(A.opts.value.current.includes(y())?o(!0):o(!1)),R.pre(()=>y(),()=>{A&&y()&&(A.opts.value.current.includes(y())?o(!0):o(!1))});let j=Q.create({checked:I(()=>o(),e=>{o(e),n.onCheckedChange?.(e)}),disabled:I(()=>g()??!1),required:I(()=>_()),name:I(()=>v()),value:I(()=>y()),id:I(()=>S()),ref:I(()=>h(),e=>h(e)),indeterminate:I(()=>w(),e=>{w(e),n.onIndeterminateChange?.(e)}),type:I(()=>T()),readonly:I(()=>!!n.readonly)},A),M=f(()=>G({...O},j.props));var N=ie(),P=x(N),F=e=>{var t=d(),r=x(t);{let e=f(()=>({props:m(M),...j.snippetProps}));u(r,()=>n.child,()=>m(e))}a(e,t)},L=e=>{var r=re();C(r,()=>({...m(M)})),u(b(r),()=>n.children??i,()=>j.snippetProps),t(r),a(e,r)};c(P,e=>{n.child?e(F):e(L,-1)}),ne(D(P,2),{}),a(e,N),s()}function oe(){let e=j(T([])),t=j(T([])),n=j(!1),r=j(!1),i=j(!1);async function a(){g(n,!0),g(i,!1);try{let n=await P();g(e,n.openTasks,!0),g(t,n.todaysMeetings,!0),g(r,!0)}catch(e){console.error(`Failed to load home data:`,e),g(r,!0)}finally{g(n,!1)}}function o(t,n){g(e,m(e).filter(e=>!(e.repo===t&&e.id===n)),!0)}function s(){g(i,!0)}return{get openTasks(){return m(e)},get todaysMeetings(){return m(t)},get loading(){return m(n)},get loaded(){return m(r)},get stale(){return m(i)},load:a,removeTask:o,markStale:s}}var se=oe(),ce=e(`<title> </title>`),le=e(`<svg><!><path d="M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"></path></svg>`);function ue(e,n){let i=_(n,[`children`,`$$slots`,`$$events`,`$$legacy`]),o=_(i,[`size`,`title`]);l(n,!1);let u=S(),d=S(),f=E(n,`size`,8,16),p=E(n,`title`,8,void 0);O(()=>(h(i),h(p())),()=>{g(u,i[`aria-label`]||i[`aria-labelledby`]||p())}),O(()=>(m(u),h(i)),()=>{g(d,{"aria-hidden":m(u)?void 0:!0,role:m(u)?`img`:void 0,focusable:Number(i.tabindex)===0?!0:void 0})}),w(),A();var y=le();C(y,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:f(),height:f(),...m(d),...o}));var x=b(y),T=e=>{var n=ce(),i=b(n,!0);t(n),v(()=>r(i,p())),a(e,n)};c(x,e=>{p()&&e(T)}),N(),t(y),a(e,y),s()}var de=e(`<title> </title>`),fe=e(`<svg><!><path d="M8 15H24V17H8z"></path></svg>`);function $(e,n){let i=_(n,[`children`,`$$slots`,`$$events`,`$$legacy`]),o=_(i,[`size`,`title`]);l(n,!1);let u=S(),d=S(),f=E(n,`size`,8,16),p=E(n,`title`,8,void 0);O(()=>(h(i),h(p())),()=>{g(u,i[`aria-label`]||i[`aria-labelledby`]||p())}),O(()=>(m(u),h(i)),()=>{g(d,{"aria-hidden":m(u)?void 0:!0,role:m(u)?`img`:void 0,focusable:Number(i.tabindex)===0?!0:void 0})}),w(),A();var y=fe();C(y,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:f(),height:f(),...m(d),...o}));var x=b(y),T=e=>{var n=de(),i=b(n,!0);t(n),v(()=>r(i,p())),a(e,n)};c(x,e=>{p()&&e(T)}),N(),t(y),a(e,y),s()}var pe=M(`<span class="flex items-center justify-center text-current [&amp;_svg]:w-[var(--icon-md)] [&amp;_svg]:h-[var(--icon-md)] lg:[&amp;_svg]:w-[var(--icon-xs)] lg:[&amp;_svg]:h-[var(--icon-xs)]"><!></span>`);function me(e,r){l(r,!0);let i=E(r,`checked`,15,!1),o=E(r,`indeterminate`,15,!1),u=E(r,`ref`,15,null),p=k(r,[`$$slots`,`$$events`,`$$legacy`,`class`,`checked`,`indeterminate`,`ref`]);var h=d(),g=x(h);{let e=(e,n)=>{let r=()=>n?.().checked,i=()=>n?.().indeterminate;var o=pe(),s=b(o),l=e=>{$(e,{})},u=e=>{J(e,{})};c(s,e=>{i()?e(l):r()&&e(u,1)}),t(o),a(e,o)},s=f(()=>q(`peer inline-flex w-[var(--icon-2xl)] h-[var(--icon-2xl)] lg:w-[var(--icon-md)] lg:h-[var(--icon-md)] shrink-0 items-center justify-center rounded-[var(--radius-xs)] border border-[var(--color-text-tertiary)] bg-transparent transition-colors cursor-pointer`,`hover:border-[var(--color-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-primary)]`,`disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:border-[var(--color-accent)] data-[state=checked]:bg-[var(--color-accent)] data-[state=checked]:text-[var(--color-accent-text)]`,r.class));n(g,()=>ae,(t,n)=>{n(t,y({get class(){return m(s)}},()=>p,{get checked(){return i()},set checked(e){i(e)},get indeterminate(){return o()},set indeterminate(e){o(e)},get ref(){return u()},set ref(e){u(e)},children:e,$$slots:{default:!0}}))})}a(e,h),s()}export{se as i,$ as n,ue as r,me as t};
@@ -1 +1 @@
1
- import{X as e,_t as t,yt as n}from"./DV-Vb89U.js";function r(){let r=n(null);return{get state(){return e(r)},openNewFolder(e=``,n=``){t(r,{kind:`newFolder`,repo:e,path:n},!0)},openRename(e,n){t(r,{kind:`rename`,repo:e,path:n},!0)},openMove(e,n){t(r,{kind:`move`,repo:e,path:n},!0)},openDelete(e,n){t(r,{kind:`delete`,repo:e,path:n},!0)},close(){t(r,null)}}}var i=r();export{i as t};
1
+ import{X as e,_t as t,yt as n}from"./bMEJ8OJG.js";function r(){let r=n(null);return{get state(){return e(r)},openNewFolder(e=``,n=``){t(r,{kind:`newFolder`,repo:e,path:n},!0)},openRename(e,n){t(r,{kind:`rename`,repo:e,path:n},!0)},openMove(e,n){t(r,{kind:`move`,repo:e,path:n},!0)},openDelete(e,n){t(r,{kind:`delete`,repo:e,path:n},!0)},close(){t(r,null)}}}var i=r();export{i as t};
@@ -0,0 +1 @@
1
+ import{Bt as e,Ht as t,K as n,L as r,Mt as i,N as a,Nt as o,O as s,R as c,St as l,V as u,X as d,_t as f,c as p,dt as m,ft as h,h as g,o as _,s as v,yt as y,z as b}from"./bMEJ8OJG.js";import"./t62M88qj.js";import"./UuI7Esum.js";import{A as x,Ct as S,D as C,P as w,R as T,T as E,_t as D,ct as O,et as k,j as A,k as j,lt as M,ot as N,rt as P,st as F,ut as I,vt as L,yt as R}from"./BILUcEY8.js";import{a as z,i as B,n as V,r as H,t as U}from"./CfX8FmkM2.js";function W(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function G(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function K(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`}var q=class{#e;#t;#n;#r=null;#i=null;#a=[];#o=null;#s=null;#c=null;#l(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#u(){this.#l(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){this.#n!==null&&(this.#d(),this.#c=window.setTimeout(()=>{this.#c=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())},this.#n))}constructor(e){this.#e=e,this.#t=e.buffer??1;let t=e.transitIntentTimeout;this.#n=typeof t==`number`&&t>0?t:null,D([e.triggerNode,e.contentNode,e.enabled],([e,t,r])=>{if(!e||!t||!r){this.#o=null,this.#m();return}return this.#o&&this.#o!==e&&this.#m(),this.#o=e,[n(I(e),`pointermove`,n=>{this.#p([n.clientX,n.clientY],e,t)}),n(e,`pointerleave`,e=>{let n=e.relatedTarget;if(w(n)&&t.contains(n))return;let r=this.#e.ignoredTargets?.()??[];w(n)&&r.some(e=>e===n||e.contains(n))||(this.#a=w(n)&&r.length>0?r.filter(e=>n.contains(e)):[],this.#r=[e.clientX,e.clientY],this.#i=`content`,this.#u())}),n(e,`pointerenter`,()=>{this.#m()}),n(t,`pointerenter`,()=>{this.#m()}),n(t,`pointerleave`,t=>{let n=t.relatedTarget;w(n)&&e.contains(n)||(this.#r=[t.clientX,t.clientY],this.#i=`trigger`,this.#u())})].reduce((e,t)=>()=>{e(),t()},()=>{})})}#p(e,t,n){if(!this.#r||!this.#i)return;this.#l(),this.#f();let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(this.#i===`content`&&G(e,i)){this.#m();return}if(this.#i===`trigger`&&G(e,r)){this.#m();return}if(this.#i===`content`&&this.#a.length>0)for(let t of this.#a){let n=t.getBoundingClientRect();if(G(e,n))return;let i=K(r,n),a=this.#h(r,n,i);if(a&&W(e,a))return}let a=K(r,i),o=this.#h(r,i,a);if(o&&W(e,o))return;let s=this.#i===`content`?i:r;W(e,this.#g(this.#r,s,a,this.#i))||(this.#m(),this.#e.onPointerExit())}#m(){this.#r=null,this.#i=null,this.#a=[],this.#l(),this.#d()}#h(e,t,n){let r=this.#t;switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}#g(e,t,n,r){let i=this.#t*4,[a,o]=e;switch(r===`trigger`?this.#_(n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#_(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}},J=P({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Y=new L(`Popover.Root`),X=class e{static create(t){return Y.set(new e(t))}opts;#e=y(null);get contentNode(){return d(this.#e)}set contentNode(e){f(this.#e,e,!0)}contentPresence;#t=y(null);get triggerNode(){return d(this.#t)}set triggerNode(e){f(this.#t,e,!0)}#n=y(null);get overlayNode(){return d(this.#n)}set overlayNode(e){f(this.#n,e,!0)}overlayPresence;#r=y(!1);get openedViaHover(){return d(this.#r)}set openedViaHover(e){f(this.#r,e,!0)}#i=y(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(e){f(this.#i,e,!0)}#a=y(!1);get hoverCooldown(){return d(this.#a)}set hoverCooldown(e){f(this.#a,e,!0)}#o=y(0);get closeDelay(){return d(this.#o)}set closeDelay(e){f(this.#o,e,!0)}#s=null;#c=null;constructor(e){this.opts=e,this.contentPresence=new A({ref:S(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new A({ref:S(()=>this.overlayNode),open:this.opts.open}),D(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(e){this.#c=e}#l(){this.#s!==null&&this.#c&&(this.#c.clearTimeout(this.#s),this.#s=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#c&&(this.#s=this.#c.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#s=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}},Z=class e{static create(t){return new e(t,Y.get())}opts;root;attachment;domContext;#e=null;#t=null;#n=y(!1);constructor(e,t){this.opts=e,this.root=t,this.attachment=O(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new M(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),D(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}#r(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#r(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||T(e)||(f(this.#n,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},t)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(T(e)||(f(this.#n,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),d(this.#n)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}d(this.#n)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#s=l(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":k(this.root.opts.open.current),"data-state":N(this.root.opts.open.current),"aria-controls":this.#o(),[J.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#s)}set props(e){f(this.#s,e)}},Q=class e{static create(t){return new e(t,Y.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=O(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new q({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;w(t)&&E(t)&&this.root.markInteraction()}onpointerenter(e){T(e)||this.root.cancelDelayedClose()}onpointerleave(e){T(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!w(e.target))return;let t=e.target.closest(J.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(w(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=l(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(e){f(this.#e,e)}#t=l(()=>({id:this.opts.id.current,tabindex:-1,"data-state":N(this.root.opts.open.current),...F(this.root.contentPresence.transitionStatus),[J.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#t)}set props(e){f(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}},$=b(`<div><div><!></div></div>`),ee=b(`<div><div><!></div></div>`);function te(n,f){let y=u();o(f,!0);let b=_(f,`ref`,15,null),C=_(f,`id`,19,()=>j(y)),w=_(f,`forceMount`,3,!1),T=_(f,`onOpenAutoFocus`,3,x),E=_(f,`onCloseAutoFocus`,3,x),D=_(f,`onEscapeKeydown`,3,x),O=_(f,`onInteractOutside`,3,x),k=_(f,`trapFocus`,3,!0),A=_(f,`preventScroll`,3,!1),M=_(f,`customAnchor`,3,null),N=v(f,[`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),P=Q.create({id:S(()=>C()),ref:S(()=>b(),e=>b(e)),onInteractOutside:S(()=>O()),onEscapeKeydown:S(()=>D()),customAnchor:S(()=>M())}),F=l(()=>R(N,P.props)),I=l(()=>k()&&P.shouldTrapFocus);function L(e){P.shouldTrapFocus||e.preventDefault(),T()(e)}var B=c(),H=h(B),W=n=>{U(n,p(()=>d(F),()=>P.popperProps,{get ref(){return P.opts.ref},get enabled(){return P.root.opts.open.current},get id(){return C()},get trapFocus(){return d(I)},get preventScroll(){return A()},loop:!0,forceMount:!0,get customAnchor(){return M()},onOpenAutoFocus:L,get onCloseAutoFocus(){return E()},get shouldRender(){return P.shouldRender},popper:(n,i)=>{let o=()=>i?.().props,u=()=>i?.().wrapperProps,p=l(()=>R(o(),{style:z(`popover`)},{style:f.style}));var _=c(),v=h(_),y=e=>{var t=c(),n=h(t);{let e=l(()=>({props:d(p),wrapperProps:u(),...P.snippetProps}));s(n,()=>f.child,()=>d(e))}r(e,t)},b=n=>{var i=$();g(i,()=>({...u()}));var a=m(i);g(a,()=>({...d(p)})),s(m(a),()=>f.children??t),e(a),e(i),r(n,i)};a(v,e=>{f.child?e(y):e(b,-1)}),r(n,_)},$$slots:{popper:!0}}))},G=n=>{V(n,p(()=>d(F),()=>P.popperProps,{get ref(){return P.opts.ref},get open(){return P.root.opts.open.current},get id(){return C()},get trapFocus(){return d(I)},get preventScroll(){return A()},loop:!0,forceMount:!1,get customAnchor(){return M()},onOpenAutoFocus:L,get onCloseAutoFocus(){return E()},get shouldRender(){return P.shouldRender},popper:(n,i)=>{let o=()=>i?.().props,u=()=>i?.().wrapperProps,p=l(()=>R(o(),{style:z(`popover`)},{style:f.style}));var _=c(),v=h(_),y=e=>{var t=c(),n=h(t);{let e=l(()=>({props:d(p),wrapperProps:u(),...P.snippetProps}));s(n,()=>f.child,()=>d(e))}r(e,t)},b=n=>{var i=ee();g(i,()=>({...u()}));var a=m(i);g(a,()=>({...d(p)})),s(m(a),()=>f.children??t),e(a),e(i),r(n,i)};a(v,e=>{f.child?e(y):e(b,-1)}),r(n,_)},$$slots:{popper:!0}}))};a(H,e=>{w()?e(W):w()||e(G,1)}),r(n,B),i()}var ne=b(`<button><!></button>`);function re(n,f){let p=u();o(f,!0);let y=_(f,`id`,19,()=>j(p)),b=_(f,`ref`,15,null),x=_(f,`type`,3,`button`),C=_(f,`disabled`,3,!1),w=_(f,`openOnHover`,3,!1),T=_(f,`openDelay`,3,700),E=_(f,`closeDelay`,3,300),D=v(f,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),O=Z.create({id:S(()=>y()),ref:S(()=>b(),e=>b(e)),disabled:S(()=>!!C()),openOnHover:S(()=>w()),openDelay:S(()=>T()),closeDelay:S(()=>E())}),k=l(()=>R(D,O.props,{type:x()}));H(n,{get id(){return y()},get ref(){return O.opts.ref},children:(n,i)=>{var o=c(),l=h(o),u=e=>{var t=c();s(h(t),()=>f.child,()=>({props:d(k)})),r(e,t)},p=n=>{var i=ne();g(i,()=>({...d(k)})),s(m(i),()=>f.children??t),e(i),r(n,i)};a(l,e=>{f.child?e(u):e(p,-1)}),r(n,o)},$$slots:{default:!0}}),i()}function ie(e,n){o(n,!0);let a=_(n,`open`,15,!1),l=_(n,`onOpenChange`,3,x),u=_(n,`onOpenChangeComplete`,3,x);X.create({open:S(()=>a(),e=>{a(e),l()(e)}),onOpenChangeComplete:S(()=>u())}),B(e,{children:(e,i)=>{var a=c();s(h(a),()=>n.children??t),r(e,a)},$$slots:{default:!0}}),i()}var ae=ie,oe=re,se=te,ce=C;export{oe as i,ce as n,ae as r,se as t};
@@ -0,0 +1 @@
1
+ import{B as e,Bt as t,F as n,L as r,Mt as i,N as a,Nt as o,X as s,Y as c,_t as l,a as u,at as d,dt as f,gt as p,h as m,it as h,o as g,rt as _,u as v,zt as y}from"./bMEJ8OJG.js";import"./t62M88qj.js";import"./DQSHfqQ5.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M30,30H28V25a5.0057,5.0057,0,0,0-5-5V18a7.0078,7.0078,0,0,1,7,7Z"></path><path d="M22,30H20V25a5.0059,5.0059,0,0,0-5-5H9a5.0059,5.0059,0,0,0-5,5v5H2V25a7.0082,7.0082,0,0,1,7-7h6a7.0082,7.0082,0,0,1,7,7Z"></path><path d="M20,2V4a5,5,0,0,1,0,10v2A7,7,0,0,0,20,2Z"></path><path d="M12,4A5,5,0,1,1,7,9a5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,12,2Z"></path></svg>`);function S(e,S){let C=u(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=u(C,[`size`,`title`]);o(S,!1);let T=p(),E=p(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);_(()=>(c(C),c(O())),()=>{l(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),_(()=>(s(T),c(C)),()=>{l(E,{"aria-hidden":s(T)?void 0:!0,role:s(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),h(),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(),...s(E),...w}));var A=f(k),j=e=>{var i=b(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),y(4),t(k),r(e,k),i()}var C=e(`<title> </title>`),w=e(`<svg><!><path d="M16,4a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-2a7,7,0,1,0,7,7A7,7,0,0,0,16,2Z"></path><path d="M26,30H24V25a5,5,0,0,0-5-5H13a5,5,0,0,0-5,5v5H6V25a7,7,0,0,1,7-7h6a7,7,0,0,1,7,7Z"></path></svg>`);function T(e,b){let x=u(b,[`children`,`$$slots`,`$$events`,`$$legacy`]),S=u(x,[`size`,`title`]);o(b,!1);let T=p(),E=p(),D=g(b,`size`,8,16),O=g(b,`title`,8,void 0);_(()=>(c(x),c(O())),()=>{l(T,x[`aria-label`]||x[`aria-labelledby`]||O())}),_(()=>(s(T),c(x)),()=>{l(E,{"aria-hidden":s(T)?void 0:!0,role:s(T)?`img`:void 0,focusable:Number(x.tabindex)===0?!0:void 0})}),h(),v();var k=w();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:D(),height:D(),...s(E),...S}));var A=f(k),j=e=>{var i=C(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),y(2),t(k),r(e,k),i()}var E=e(`<title> </title>`),D=e(`<svg><!><path d="M22,8H21V2H19V8H13V2H11V8H10a2,2,0,0,0-2,2v6a8.0073,8.0073,0,0,0,7,7.9307V30h2V23.9307A8.0073,8.0073,0,0,0,24,16V10A2,2,0,0,0,22,8Zm0,8a6,6,0,0,1-12,0V10H22Z"></path></svg>`);function O(e,b){let x=u(b,[`children`,`$$slots`,`$$events`,`$$legacy`]),S=u(x,[`size`,`title`]);o(b,!1);let C=p(),w=p(),T=g(b,`size`,8,16),O=g(b,`title`,8,void 0);_(()=>(c(x),c(O())),()=>{l(C,x[`aria-label`]||x[`aria-labelledby`]||O())}),_(()=>(s(C),c(x)),()=>{l(w,{"aria-hidden":s(C)?void 0:!0,role:s(C)?`img`:void 0,focusable:Number(x.tabindex)===0?!0:void 0})}),h(),v();var k=D();m(k,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:T(),height:T(),...s(w),...S}));var A=f(k),j=e=>{var i=E(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),y(),t(k),r(e,k),i()}var k=e(`<title> </title>`),A=e(`<svg><!><path d="M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"></path><path d="M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"></path><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"></path></svg>`);function j(e,b){let x=u(b,[`children`,`$$slots`,`$$events`,`$$legacy`]),S=u(x,[`size`,`title`]);o(b,!1);let C=p(),w=p(),T=g(b,`size`,8,16),E=g(b,`title`,8,void 0);_(()=>(c(x),c(E())),()=>{l(C,x[`aria-label`]||x[`aria-labelledby`]||E())}),_(()=>(s(C),c(x)),()=>{l(w,{"aria-hidden":s(C)?void 0:!0,role:s(C)?`img`:void 0,focusable:Number(x.tabindex)===0?!0:void 0})}),h(),v();var D=A();m(D,()=>({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`,width:T(),height:T(),...s(w),...S}));var O=f(D),j=e=>{var i=k(),a=f(i,!0);t(i),d(()=>n(a,E())),r(e,i)};a(O,e=>{E()&&e(j)}),y(3),t(D),r(e,D),i()}export{S as i,O as n,T as r,j as t};
@@ -0,0 +1 @@
1
+ import{B as e,Bt as t,F as n,L as r,Mt as i,N as a,Nt as o,X as s,Y as c,_t as l,a as u,at as d,dt as f,gt as p,h as m,it as h,o as g,rt as _,u as v,zt as y}from"./bMEJ8OJG.js";import"./t62M88qj.js";import"./DQSHfqQ5.js";var b=e(`<title> </title>`),x=e(`<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>`);function S(e,S){let C=u(S,[`children`,`$$slots`,`$$events`,`$$legacy`]),w=u(C,[`size`,`title`]);o(S,!1);let T=p(),E=p(),D=g(S,`size`,8,16),O=g(S,`title`,8,void 0);_(()=>(c(C),c(O())),()=>{l(T,C[`aria-label`]||C[`aria-labelledby`]||O())}),_(()=>(s(T),c(C)),()=>{l(E,{"aria-hidden":s(T)?void 0:!0,role:s(T)?`img`:void 0,focusable:Number(C.tabindex)===0?!0:void 0})}),h(),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(),...s(E),...w}));var A=f(k),j=e=>{var i=b(),a=f(i,!0);t(i),d(()=>n(a,O())),r(e,i)};a(A,e=>{O()&&e(j)}),y(4),t(k),r(e,k),i()}export{S as t};