cognova 0.2.8 → 0.2.9

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 (166) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{mfAEx0Kz.js → -JdScH3W.js} +1 -1
  3. package/.output/public/_nuxt/{CYQP4zpi.js → 0EY9Msdx.js} +1 -1
  4. package/.output/public/_nuxt/{BwyXWqBY.js → 1lOC4Si0.js} +1 -1
  5. package/.output/public/_nuxt/{DaBSQDif.js → 1zIQX9mh.js} +1 -1
  6. package/.output/public/_nuxt/{B9zgEO8N.js → 4Qy4OdWt.js} +1 -1
  7. package/.output/public/_nuxt/{DmDPSvxi.js → 4nN41Tyd.js} +1 -1
  8. package/.output/public/_nuxt/{cPPThz84.js → 5MZBbx-H.js} +1 -1
  9. package/.output/public/_nuxt/{DtJnWtpL.js → 6lIxuL6n.js} +1 -1
  10. package/.output/public/_nuxt/AUdD1uDD.js +1 -0
  11. package/.output/public/_nuxt/{D2kQkOaG.js → B-513wJW.js} +1 -1
  12. package/.output/public/_nuxt/{BBDxhFYY.js → B1vDCixB.js} +1 -1
  13. package/.output/public/_nuxt/{BjnQ1pI1.js → B2MVZlI-.js} +1 -1
  14. package/.output/public/_nuxt/{DmOS3vFH.js → B5JDxHxC.js} +1 -1
  15. package/.output/public/_nuxt/{njnzCNrH.js → B63LIwsW.js} +3 -3
  16. package/.output/public/_nuxt/{BqTdsCnW.js → B6bnHNWY.js} +1 -1
  17. package/.output/public/_nuxt/{SfaNtyKS.js → B6wYZD_K.js} +1 -1
  18. package/.output/public/_nuxt/{D4_89MZm.js → B8Ou5yh2.js} +1 -1
  19. package/.output/public/_nuxt/{zXvvpsZj.js → BE4Ndhrq.js} +1 -1
  20. package/.output/public/_nuxt/{DwIYtFfA.js → BES6FzF5.js} +1 -1
  21. package/.output/public/_nuxt/{BdxP21ep.js → BE_OHTBv.js} +1 -1
  22. package/.output/public/_nuxt/{BmdlymIW.js → BJ8jbKuq.js} +1 -1
  23. package/.output/public/_nuxt/{U3f6dy8i.js → BNBGEa-U.js} +1 -1
  24. package/.output/public/_nuxt/{C6FFW_cO.js → BOGXUgGg.js} +1 -1
  25. package/.output/public/_nuxt/{Cr0NfhPB.js → BQ1T6zWA.js} +1 -1
  26. package/.output/public/_nuxt/{B5SnZL2l.js → BVc_fOF1.js} +1 -1
  27. package/.output/public/_nuxt/{D4X6ONPF.js → BX6vcvkp.js} +1 -1
  28. package/.output/public/_nuxt/{GGcn5KPW.js → BYIq3eP8.js} +1 -1
  29. package/.output/public/_nuxt/{C24so3m7.js → BZqdzrSw.js} +2 -2
  30. package/.output/public/_nuxt/{BUC36BHp.js → BaYtugUf.js} +1 -1
  31. package/.output/public/_nuxt/{eE8TtXgC.js → Be5L93GM.js} +3 -3
  32. package/.output/public/_nuxt/{C1tCdK-M.js → BfECQayu.js} +1 -1
  33. package/.output/public/_nuxt/{CDkyQ1eQ.js → BgG2k-zy.js} +1 -1
  34. package/.output/public/_nuxt/{CewcVxDS.js → BhnONkIm.js} +1 -1
  35. package/.output/public/_nuxt/{-2AbaFNH.js → BjI5wb_q.js} +1 -1
  36. package/.output/public/_nuxt/{BnJ-6YDw.js → Bk9-HxOg.js} +1 -1
  37. package/.output/public/_nuxt/{nHSiDk8N.js → BltasKce.js} +1 -1
  38. package/.output/public/_nuxt/{CF33v_m5.js → Bp9kHdw6.js} +1 -1
  39. package/.output/public/_nuxt/{C7qhmmZh.js → Bsdcw5gr.js} +1 -1
  40. package/.output/public/_nuxt/{yJ9vRvHj.js → BsnhHCOa.js} +1 -1
  41. package/.output/public/_nuxt/{CSHcfejh.js → BwJVN9k0.js} +1 -1
  42. package/.output/public/_nuxt/{KEeoKtq_.js → BwVt3BzR.js} +1 -1
  43. package/.output/public/_nuxt/{BefOhWHD.js → BwdxQyyo.js} +1 -1
  44. package/.output/public/_nuxt/{BE1CVWts.js → BzTjmQCD.js} +1 -1
  45. package/.output/public/_nuxt/{B-AlyT2D.js → C1FhgWcI.js} +1 -1
  46. package/.output/public/_nuxt/{D_obX2Hj.js → C2DZeD9G.js} +1 -1
  47. package/.output/public/_nuxt/{BXtZVbmx.js → C3JOLqW1.js} +1 -1
  48. package/.output/public/_nuxt/{pHCJ6lhw.js → C4ScCUjy.js} +1 -1
  49. package/.output/public/_nuxt/{ImPsUDiH.js → C6HEirAm.js} +1 -1
  50. package/.output/public/_nuxt/{ijmD2cEW.js → C6UTTaCP.js} +1 -1
  51. package/.output/public/_nuxt/{CVYcsqmL.js → C8gtQaKB.js} +1 -1
  52. package/.output/public/_nuxt/{MWUW1sIF.js → C8tXHRIo.js} +1 -1
  53. package/.output/public/_nuxt/{36ZHqDPo.js → C8wa4Wh4.js} +1 -1
  54. package/.output/public/_nuxt/{D887s9k9.js → CDradKPE.js} +1 -1
  55. package/.output/public/_nuxt/{Dbfwn2zk.js → CEJh-OAl.js} +1 -1
  56. package/.output/public/_nuxt/{mT7Mt2d7.js → CGfVTQUF.js} +1 -1
  57. package/.output/public/_nuxt/{C075hYlX.js → CGgZuPnb.js} +1 -1
  58. package/.output/public/_nuxt/{CqFcWBkW.js → CH8kNq6W.js} +1 -1
  59. package/.output/public/_nuxt/{CO3hceDE.js → CIJ2MJdc.js} +1 -1
  60. package/.output/public/_nuxt/{DX_9SfFb.js → CIUZAp6g.js} +1 -1
  61. package/.output/public/_nuxt/{DtyyytRx.js → CXBOHJ2W.js} +1 -1
  62. package/.output/public/_nuxt/{BYtVdUIW.js → CY3x8iy3.js} +1 -1
  63. package/.output/public/_nuxt/{CQ3tAemj.js → CaLO8sre.js} +1 -1
  64. package/.output/public/_nuxt/{D4Cizi4y.js → CbTu13wM.js} +1 -1
  65. package/.output/public/_nuxt/{Dt5mOzXj.js → CfO_d5gC.js} +1 -1
  66. package/.output/public/_nuxt/{it8syoZI.js → Clr3MHUr.js} +1 -1
  67. package/.output/public/_nuxt/{B0xuHXvN.js → Cmdr5BNz.js} +1 -1
  68. package/.output/public/_nuxt/{2QHXgMyi.js → Cmj-BR0q.js} +1 -1
  69. package/.output/public/_nuxt/{CAfyXyeo.js → Cn83lLUb.js} +1 -1
  70. package/.output/public/_nuxt/{C21BjagS.js → CqMgz85Z.js} +1 -1
  71. package/.output/public/_nuxt/{BCCYopTB.js → CrW6y2-s.js} +1 -1
  72. package/.output/public/_nuxt/{CSjOaBKu.js → CrjNndEO.js} +1 -1
  73. package/.output/public/_nuxt/{DqzomZoo.js → Cs_udj6A.js} +1 -1
  74. package/.output/public/_nuxt/{BkO884Ds.js → CsbHYpNi.js} +3 -3
  75. package/.output/public/_nuxt/{BhYoxmLV.js → CwKe2KkK.js} +1 -1
  76. package/.output/public/_nuxt/{D79lbuWG.js → CwOUYOe5.js} +1 -1
  77. package/.output/public/_nuxt/{Drxf7nJz.js → CybU4a95.js} +1 -1
  78. package/.output/public/_nuxt/{Bwn-CRYH.js → CziltI1u.js} +1 -1
  79. package/.output/public/_nuxt/{BlsIfvSf.js → CzurfTnt.js} +1 -1
  80. package/.output/public/_nuxt/{D7pKT3IW.js → D-O8wAju.js} +1 -1
  81. package/.output/public/_nuxt/{BZBNJD7U.js → D1t0272g.js} +1 -1
  82. package/.output/public/_nuxt/{BLwctszt.js → D3RROe4s.js} +1 -1
  83. package/.output/public/_nuxt/{C6sX7TYf.js → D5G5UL_g.js} +1 -1
  84. package/.output/public/_nuxt/{CfY_bsV0.js → D76Dw8rw.js} +1 -1
  85. package/.output/public/_nuxt/{Pn7VD6uQ.js → D7DTZ0iS.js} +1 -1
  86. package/.output/public/_nuxt/{BxShcW0K.js → D7WbsJsa.js} +1 -1
  87. package/.output/public/_nuxt/{4XnyUc7C.js → D7iYVmH6.js} +1 -1
  88. package/.output/public/_nuxt/{CrmE-JGu.js → D8gh62A0.js} +1 -1
  89. package/.output/public/_nuxt/{Cve4psva.js → DA2RowFe.js} +1 -1
  90. package/.output/public/_nuxt/{ClGn48iq.js → DBKxzQ3U.js} +1 -1
  91. package/.output/public/_nuxt/{CbvNJVrk.js → DBuW01Fx.js} +1 -1
  92. package/.output/public/_nuxt/{Buf1PAiO.js → DCL9gWFw.js} +1 -1
  93. package/.output/public/_nuxt/{C-HCArYP.js → DGJKfutb.js} +1 -1
  94. package/.output/public/_nuxt/{0dqQoCHY.js → DHScQdvh.js} +1 -1
  95. package/.output/public/_nuxt/{BF3tVKtX.js → DI1FIvaM.js} +1 -1
  96. package/.output/public/_nuxt/{CY7f553E.js → DJ4pqxg-.js} +1 -1
  97. package/.output/public/_nuxt/{D9aYkNhQ.js → DJoRBCVm.js} +1 -1
  98. package/.output/public/_nuxt/{CXTrUfQ5.js → DLuRYg2p.js} +1 -1
  99. package/.output/public/_nuxt/DMy2sxuC.js +1 -0
  100. package/.output/public/_nuxt/{DLUvsixu.js → DQd-GXKJ.js} +1 -1
  101. package/.output/public/_nuxt/{DZEuR9ms.js → DSgubznn.js} +1 -1
  102. package/.output/public/_nuxt/{DKKY8zWm.js → DSynhNOO.js} +1 -1
  103. package/.output/public/_nuxt/{CzAZpALW.js → DTrFhdRO.js} +1 -1
  104. package/.output/public/_nuxt/{Bkc1Hpcf.js → DTu0K_pX.js} +1 -1
  105. package/.output/public/_nuxt/{BSA-U0so.js → DUDbJONU.js} +1 -1
  106. package/.output/public/_nuxt/{C13FKhqK.js → DYu_NYj3.js} +1 -1
  107. package/.output/public/_nuxt/{LQNRVThr.js → D_tCgCFX.js} +1 -1
  108. package/.output/public/_nuxt/{GYf-vnR6.js → DdXVAzIg.js} +1 -1
  109. package/.output/public/_nuxt/{DmlZSBjF.js → DfIqFkyp.js} +1 -1
  110. package/.output/public/_nuxt/{DJt7Rogf.js → Dj2opPDu.js} +1 -1
  111. package/.output/public/_nuxt/{C3tximD1.js → DjmFlCHK.js} +1 -1
  112. package/.output/public/_nuxt/{6QDVg5TO.js → DkhxRAb3.js} +1 -1
  113. package/.output/public/_nuxt/DlSJ4TF_.js +1 -0
  114. package/.output/public/_nuxt/{D-5A6cMB.js → DmmQUhEb.js} +1 -1
  115. package/.output/public/_nuxt/{BJUff9Ku.js → DvATBMPl.js} +1 -1
  116. package/.output/public/_nuxt/{dB7G4iIC.js → DwAJIRGg.js} +1 -1
  117. package/.output/public/_nuxt/{BrOKokPO.js → FYOLNuMV.js} +1 -1
  118. package/.output/public/_nuxt/{B8TQvzYX.js → Gy6_ehml.js} +1 -1
  119. package/.output/public/_nuxt/{DMb_1D81.js → HPOXd4gt.js} +1 -1
  120. package/.output/public/_nuxt/{BHn8tRjg.js → HlbU_z9a.js} +1 -1
  121. package/.output/public/_nuxt/{BwC62XRN.js → JQV21WEV.js} +1 -1
  122. package/.output/public/_nuxt/{CEDw8osP.js → NusIKwmA.js} +1 -1
  123. package/.output/public/_nuxt/{D-Ge96eV.js → OrcbFmB1.js} +1 -1
  124. package/.output/public/_nuxt/{D04CyXmf.js → Oy4_RPEZ.js} +1 -1
  125. package/.output/public/_nuxt/{BahXyh-A.js → Pa936BQP.js} +1 -1
  126. package/.output/public/_nuxt/PzQHm02e.js +1 -0
  127. package/.output/public/_nuxt/{BmaHzvZM.js → REP2-rzf.js} +1 -1
  128. package/.output/public/_nuxt/{DcbbfwCe.js → RRbnMIVe.js} +1 -1
  129. package/.output/public/_nuxt/{BVEFmI4I.js → TGVM5w2K.js} +1 -1
  130. package/.output/public/_nuxt/UbZP7wjm.js +1 -0
  131. package/.output/public/_nuxt/{B2Xfh7am.js → XJYoLoTi.js} +1 -1
  132. package/.output/public/_nuxt/{BLm0UviR.js → a9_LvIZ4.js} +1 -1
  133. package/.output/public/_nuxt/builds/latest.json +1 -1
  134. package/.output/public/_nuxt/builds/meta/613faa5d-8ace-45e0-8274-b611cc4fd1ad.json +1 -0
  135. package/.output/public/_nuxt/entry.DkvuF_CR.css +1 -0
  136. package/.output/public/_nuxt/{CEz288t8.js → fVkHtgGF.js} +1 -1
  137. package/.output/public/_nuxt/{C-Ygk9x5.js → hm3ShyaF.js} +1 -1
  138. package/.output/public/_nuxt/{BvstjGHC.js → k16puyWi.js} +1 -1
  139. package/.output/public/_nuxt/{zO9MgHj2.js → myNwwtfj.js} +1 -1
  140. package/.output/public/_nuxt/{CClsKJ9A.js → nTCVPCKg.js} +1 -1
  141. package/.output/public/_nuxt/{CH_jROT9.js → pHQcHl8n.js} +1 -1
  142. package/.output/public/_nuxt/{B6G3NLfW.js → pNqWPbXW.js} +1 -1
  143. package/.output/public/_nuxt/{vES4kgx7.js → qWWnsfRV.js} +1 -1
  144. package/.output/public/_nuxt/{D_O7SlHm.js → rRYEvKFu.js} +1 -1
  145. package/.output/public/_nuxt/{JReYPlwF.js → svWfwR0T.js} +1 -1
  146. package/.output/public/_nuxt/{Bhhg7oSf.js → wgX1ldgZ.js} +1 -1
  147. package/.output/public/_nuxt/{B6-U3KqJ.js → xrh9hzzH.js} +2 -2
  148. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  149. package/.output/server/chunks/build/server.mjs +1 -1
  150. package/.output/server/chunks/build/{settings-ByUXa46k.mjs → settings-B2KXoGcz.mjs} +213 -26
  151. package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +1 -0
  152. package/.output/server/chunks/build/styles.mjs +2 -2
  153. package/.output/server/chunks/nitro/nitro.mjs +926 -870
  154. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  155. package/.output/server/package.json +1 -1
  156. package/app/pages/settings.vue +148 -9
  157. package/package.json +1 -1
  158. package/server/bridge/adapters/telegram.ts +83 -8
  159. package/.output/public/_nuxt/BIo-9u_O.js +0 -1
  160. package/.output/public/_nuxt/BMs0mHEp.js +0 -1
  161. package/.output/public/_nuxt/CE9_ECxx.js +0 -1
  162. package/.output/public/_nuxt/DmcMCO8x.js +0 -1
  163. package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +0 -1
  164. package/.output/public/_nuxt/entry._7ZkP07A.css +0 -1
  165. package/.output/public/_nuxt/iBaivqi8.js +0 -1
  166. package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Hi,e as Fi,q as Vi,b5 as hs,F as ji,k as Pa,N as La,aA as Jd,c as he,O as za,P as $a,aT as We,am as xr,b7 as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a3 as ii,U as kn,G as dr,ai as hr,aj as Jo,ab as Gd,a9 as Ba,a4 as _a,V as nt,W as Jn,bR as Qd,b9 as Xd,s as Yd,y as Zd,c7 as eh,b4 as th,h as nh,c8 as rh,f as sh,K as ih}from"./njnzCNrH.js";import{S as oh}from"./Pn7VD6uQ.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./D9aYkNhQ.js";import{_ as lh}from"./DMb_1D81.js";import{_ as Go}from"./Cve4psva.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{a as Hi,e as Fi,q as Vi,b5 as hs,F as ji,k as Pa,N as La,aA as Jd,c as he,O as za,P as $a,aT as We,am as xr,b7 as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a3 as ii,U as kn,G as dr,aj as hr,ak as Jo,ab as Gd,a9 as Ba,a4 as _a,V as nt,W as Jn,bR as Qd,b9 as Xd,s as Yd,y as Zd,c7 as eh,b4 as th,h as nh,c8 as rh,f as sh,K as ih}from"./B63LIwsW.js";import{S as oh}from"./D7DTZ0iS.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./DJoRBCVm.js";import{_ as lh}from"./HPOXd4gt.js";import{_ as Go}from"./DA2RowFe.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}Nt.empty=new Nt(!0);class mh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rc(n){let e=[];do e.push(gh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function gh(n){let e=[];do e.push(yh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function yh(n){let e=xh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=kh(n,e);else break;return e}function Xo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function kh(n,e){let t=Xo(n),r=t;return n.eat(",")&&(n.next!="}"?r=Xo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bh(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function xh(n){if(n.eat("(")){let e=rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bh(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function wh(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function sc(n,e){return e-n}function Yo(n,e){let t=[];return r(e),t.sort(sc);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function vh(n){let e=Object.create(null);return t(Yo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Yo(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Nt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(sc);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Sh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ic(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function oc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function lc(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function ac(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Th(n,r,e[r]);return t}let Zo=class cc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ac(e,r.attrs),this.defaultAttrs=ic(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Me(this,this.computeAttrs(e),w.from(t),_.setFrom(r))}createChecked(e=null,t,r){return t=w.from(t),this.checkContent(t),new Me(this,this.computeAttrs(e),t,_.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=w.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(w.empty,!0);return i?new Me(this,e,t.append(i),_.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){lc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new cc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ch(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Th{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ch(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=ac(e,s.attrs),this.excluded=null;let i=ic(this.attrs);this.instance=i?new _(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _(this,oc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){lc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class uc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ie.from(e.nodes),t.marks=ie.from(e.marks||{}),this.nodes=Zo.compile(this.spec.nodes,this),this.marks=fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Nt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?el(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:el(this,o.split(" "))}this.nodeFromJSON=s=>Me.fromJSON(this,s),this.markFromJSON=s=>_.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Zo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Tr(r,r.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function el(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Mh(n){return n.tag!=null}function Eh(n){return n.style!=null}class Ye{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Mh(s))this.tags.push(s);else if(Eh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new nl(this,t,!1);return r.addAll(e,_.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new nl(this,t,!0);return r.addAll(e,_.none,t.from,t.to),M.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Nh(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ye(e,Ye.schemaRules(e)))}}const dc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ah={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},Rn=1,ai=2,xn=4;function tl(n,e,t){return e!=null?(e?Rn:0)|(e==="full"?ai:0):n&&n.whitespace=="pre"?Rn|ai:t&~xn}class Qn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=_.none,this.match=i||(o&xn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(w.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=w.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!dc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class nl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=tl(null,t.preserveWhitespace,0)|(r?xn:0);s?i=new Qn(s.type,s.attrs,_.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Qn(null,null,_.none,!0,null,o):i=new Qn(e.schema.topNodeType,null,_.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&ai?"full":this.localPreserveWS||(s.options&Rn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Oh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Ah.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(dc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sl(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=tl(e,i,o.options);o.options&xn&&o.content.length==0&&(l|=xn);let a=_.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):sl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Qn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Rn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Oh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Nh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function rl(n){let e={};for(let t in n)e[t]=n[t];return e}function sl(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class zt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ds(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=fr(Ds(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&fr(Ds(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return fr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=il(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return il(e.marks)}}function il(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ds(n){return n.document||window.document}const ol=new WeakMap;function Rh(n){let e=ol.get(n);return e===void 0&&ol.set(n,e=Ih(n)),e}function Ih(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function fr(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Rh(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?a.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=fr(n,h,t,r);if(a.appendChild(f),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const fc=65535,pc=Math.pow(2,16);function Dh(n,e){return n+e*pc}function ll(n){return n&fc}function Ph(n){return(n-(n&fc))/pc}const mc=1,gc=2,pr=4,yc=8;class ci{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&yc)>0}get deletedBefore(){return(this.delInfo&(mc|pr))>0}get deletedAfter(){return(this.delInfo&(gc|pr))>0}get deletedAcross(){return(this.delInfo&pr)>0}}class be{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&be.empty)return be.empty}recover(e){let t=0,r=ll(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ph(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let h=c?e==a?-1:e==d?1:t:t,f=a+s+(h<0?0:u);if(r)return f;let p=e==(t<0?a:d)?null:Dh(l/3,e-a),g=e==a?gc:e==d?mc:pr;return(t<0?e!=a:e!=d)&&(g|=yc),new ci(f,g,p)}s+=u-c}return r?e+s:new ci(e+s,0,null)}touches(e,t){let r=0,s=ll(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new be(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?be.empty:new be(e<0?[0,-e,0]:[0,0,e])}}be.empty=new be([]);class In{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new In(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new In;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ci(e,s,null)}}const Ps=Object.create(null);class ue{getMap(){return be.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ps[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Ps)throw new RangeError("Duplicate use of step JSON ID "+e);return Ps[e]=t,t.prototype.jsonID=e,t}}class Q{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Q(e,null)}static fail(e){return new Q(null,e)}static fromReplace(e,t,r,s){try{return Q.ok(e.replace(t,r,s))}catch(i){if(i instanceof vr)return Q.fail(i.message);throw i}}}function qi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(qi(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return w.fromArray(r)}class dt extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new M(qi(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,i)}invert(){return new Re(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dt(t.pos,r.pos,this.mark)}merge(e){return e instanceof dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dt(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("addMark",dt);class Re extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new M(qi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,r)}invert(){return new dt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Re(t.pos,r.pos,this.mark)}merge(e){return e instanceof Re&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Re(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Re(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("removeMark",Re);class ht extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new ht(this.pos,t.marks[s]);return new ht(this.pos,this.mark)}}return new Rt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ht(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ht(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("addNodeMark",ht);class Rt extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ht(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Rt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Rt(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("removeNodeMark",Rt);class te extends ue{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ui(e,this.from,this.to)?Q.fail("Structure replace would overwrite content"):Q.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new be([this.from,this.to-this.from,this.slice.size])}invert(e){return new te(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new te(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof te)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new te(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new te(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new te(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}}ue.jsonID("replace",te);class re extends ue{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ui(e,this.from,this.gapFrom)||ui(e,this.gapTo,this.to)))return Q.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Q.fromReplace(e,this.from,this.to,r):Q.fail("Content does not fit in gap")}getMap(){return new be([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new re(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new re(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new re(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}}ue.jsonID("replaceAround",re);function ui(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Lh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==h&&o.mark.eq(d[g])?o.to=f:s.push(o=new Re(h,f,d[g])));l&&l.to==h?l.to=f:i.push(l=new dt(h,f,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function zh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof fs){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==i-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Re(o.from,o.to,o.style)))}function Ui(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new te(l,u,M.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new Re(l,u,c.marks[h]));if(s&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new M(w.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new te(l+h.index,l+h.index+h[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(w.empty,!0);n.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function $h(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function sn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!$h(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Bh(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=w.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=w.from(r.node(p).copy(u)),d++):a--;let h=w.empty,f=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,h=w.from(s.node(p).copy(h)),f++):c++;n.step(new re(a,c,o,l,new M(u.append(h),d,f),u.size-d,!0))}function Wi(n,e,t=null,r=n){let s=_h(n,e),i=s&&Hh(r,e);return i?s.map(al).concat({type:e,attrs:t}).concat(i.map(al)):null}function al(n){return{type:n,attrs:null}}function _h(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Hh(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Fh(n,e,t){let r=w.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new re(s,i,s,i,new M(r,0,0),t.length,!0))}function Vh(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&jh(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&bc(n,o,l,i),Ui(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),h=u.map(l+o.nodeSize,1);return n.step(new re(d,h,d+1,h-1,new M(w.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&kc(n,o,l,i),!1}})}function kc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function bc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{a as fe,ao as Q,bA as me,a1 as pe,$ as be,c as w,E as ye,a0 as X,k as ve,G as h,R as s,ai as D,aj as R,Q as d,au as le,aV as oe,C as n,N as ie,aJ as ne,aI as ue,aT as re,aC as se,am as J,aG as xe,T as b,S as m,ab as H,U as u,a4 as x,a9 as O,V as L,_ as E,aa as Z,ae as _,Y as W,L as he,aK as ke,P as Ie,b7 as Te,ax as Le,b8 as de,b9 as ce,ap as ze,ba as qe,bb as Se,aN as ee,aO as te}from"./njnzCNrH.js";import{i as Ce,a as Ke,T as $e}from"./CAfyXyeo.js";import{g as we}from"./BCCYopTB.js";import{M as Oe}from"./Bwn-CRYH.js";import{u as Ae}from"./D2kQkOaG.js";import{c as ae}from"./BHn8tRjg.js";import{g as Be}from"./MWUW1sIF.js";import{C as $,d as Pe,e as Ve}from"./CXTrUfQ5.js";import{_ as Ne}from"./BjnQ1pI1.js";var We=fe({__name:"TreeVirtualizer",props:{overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(e){const A=e,o=Q(),i=Ce(),K=me(),{getItems:V}=pe(),k=be("",1e3),N=w(()=>{const r=c=>A.textContent?A.textContent(c):c.toString().toLowerCase();return i.expandedItems.value.map((c,y)=>({index:y,textContent:r(c.value)}))});i.isVirtual.value=!0;const B=w(()=>{const r=K.value;if(r){const c=window.getComputedStyle(r);return{start:Number.parseFloat(c.paddingBlockStart||c.paddingTop),end:Number.parseFloat(c.paddingBlockEnd||c.paddingBottom)}}else return{start:0,end:0}}),I=Ae({get scrollPaddingStart(){return B.value.start},get scrollPaddingEnd(){return B.value.end},get count(){return i.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(r){return r+i.getKey(i.expandedItems.value[r].value)},estimateSize(){return A.estimateSize??28},getScrollElement(){return K.value},overscan:A.overscan??12}),M=w(()=>I.value.getVirtualItems().map(r=>({item:r,is:ye(o.default({item:i.expandedItems.value[r.index],virtualizer:I.value,virtualItem:r})[0],{"data-index":r.index,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})})));function P(r){I.value.scrollToIndex(r,{align:"start"}),requestAnimationFrame(()=>{const c=K.value.querySelector(`[data-index="${r}"]`);c instanceof HTMLElement&&c.focus()})}return i.virtualKeydownHook.on(r=>{const c=r.altKey||r.ctrlKey||r.metaKey;if(r.key==="Tab"&&!c)return;const z=Oe[r.key];if(["first","last"].includes(z)){r.preventDefault();const t=z==="first"?0:i.expandedItems.value.length-1;I.value.scrollToIndex(t),requestAnimationFrame(()=>{const g=V();(z==="first"?g[0]:g[g.length-1]).ref.focus()})}else if(z==="prev"&&r.key!=="ArrowUp"){const t=X(),g=Number(t.getAttribute("data-index")),l=Number(t.getAttribute("data-indent")),q=i.expandedItems.value.slice(0,g).map((S,f)=>({...S,index:f})).reverse().find(S=>S.level===l-1);q&&P(q.index)}else if(!z&&!c){k.value+=r.key;const t=Number(X()?.getAttribute("data-index")),g=N.value[t].textContent,l=N.value.map(S=>S.textContent),T=we(l,k.value,g),q=N.value.find(S=>S.textContent===T);q&&P(q.index)}ve(()=>{r.shiftKey&&z&&i.handleMultipleReplace(z,X(),V,i.expandedItems.value.map(t=>t.value))})}),(r,c)=>(s(),h("div",{"data-reka-virtualizer":"",style:oe({position:"relative",width:"100%",height:`${n(I).getTotalSize()}px`})},[(s(!0),h(D,null,R(M.value,({is:y,item:z})=>(s(),d(le(y),{key:z.key}))),128))],4))}}),De=We;const Ee={slots:{root:"relative isolate",item:"w-full",listWithChildren:"border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 relative",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"},variants:{virtualize:{true:{root:"overflow-y-auto"}},color:{primary:{link:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted"}},size:{xs:{listWithChildren:"ms-4",link:"px-2 py-1 text-xs gap-1",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},sm:{listWithChildren:"ms-4.5",link:"px-2.5 py-1.5 text-xs gap-1.5",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},md:{listWithChildren:"ms-5",link:"px-2.5 py-1.5 text-sm gap-1.5",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},lg:{listWithChildren:"ms-5.5",link:"px-3 py-2 text-sm gap-2",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},xl:{listWithChildren:"ms-6",link:"px-3 py-2 text-base gap-2",linkLeadingIcon:"size-6",linkTrailingIcon:"size-6"}},selected:{true:{link:"before:bg-elevated"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}}},compoundVariants:[{color:"primary",selected:!0,class:{link:"text-primary"}},{color:"secondary",selected:!0,class:{link:"text-secondary"}},{color:"success",selected:!0,class:{link:"text-success"}},{color:"info",selected:!0,class:{link:"text-info"}},{color:"warning",selected:!0,class:{link:"text-warning"}},{color:"error",selected:!0,class:{link:"text-error"}},{color:"neutral",selected:!0,class:{link:"text-highlighted"}},{selected:!1,disabled:!1,class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}],defaultVariants:{color:"primary",size:"md"}},Xe=Object.assign({inheritAttrs:!1},{__name:"UTree",props:{as:{type:null,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},getKey:{type:Function,required:!1},labelKey:{type:null,required:!1,default:"label"},trailingIcon:{type:null,required:!1},expandedIcon:{type:null,required:!1},collapsedIcon:{type:null,required:!1},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},nested:{type:Boolean,required:!1,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},onSelect:{type:Function,required:!1},onToggle:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},expanded:{type:Array,required:!1},defaultExpanded:{type:Array,required:!1},selectionBehavior:{type:String,required:!1},propagateSelect:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},bubbleSelect:{type:Boolean,required:!1}},emits:["update:modelValue","update:expanded"],setup(e,{expose:A,emit:o}){const i=e,K=o,V=Q(),k=ie(),N=ne(ue(i,"items","multiple","expanded","disabled","propagateSelect","bubbleSelect"),K),B=w(()=>typeof i.as=="string"||typeof i.as?.render=="function"?{root:i.as,link:"button"}:re(i.as,{root:"ul",link:"button"})),I=w(()=>i.virtualize?!1:i.nested),M=w(()=>{const U={xs:{base:2,perLevel:5.5},sm:{base:2.5,perLevel:6},md:{base:2.5,perLevel:6.5},lg:{base:3,perLevel:7},xl:{base:3,perLevel:7.5}}[i.size||"md"];return a=>`calc(var(--spacing) * ${(a-1)*U.perLevel+U.base})`}),P=se(()=>i.virtualize?re(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:Be(i.items||[],i.size||"md")}):!1),[r,c]=ae(),[y,z]=ae({props:{item:{type:Object,required:!0},index:{type:Number,required:!0},level:{type:Number,required:!0}}}),t=w(()=>J({extend:J(Ee),...k.ui?.tree||{}})({color:i.color,size:i.size,virtualize:!!i.virtualize})),g=xe("rootRef");function l(f){return W(f,i.labelKey)}function T(f){return i.getKey&&i.getKey(f)||l(f)}function q(f){const U=f.defaultExpanded?T(f):null,a=f.children?.flatMap(p=>q(p))??[];return[U,...a].filter(Boolean)}const S=w(()=>i.defaultExpanded??i.items?.flatMap(f=>q(f)));return A({get $el(){return g.value?.$el}}),(f,U)=>(s(),h(D,null,[b(n(y),null,{default:m(({item:a,index:p,level:v})=>[H("li",{role:"presentation",class:u(I.value&&v>1?t.value.itemWithChildren({class:[i.ui?.itemWithChildren,a.ui?.itemWithChildren]}):t.value.item({class:[i.ui?.item,a.ui?.item]}))},[b(n(Ke),{level:v,value:a,"as-child":"",onToggle:C=>(a.onToggle??i.onToggle)?.(C,a),onSelect:C=>(a.onSelect??i.onSelect)?.(C,a)},{default:m(({isExpanded:C,isSelected:F,isIndeterminate:j,handleSelect:G,handleToggle:Y})=>[x(f.$slots,a.slot?`${a.slot}-wrapper`:"item-wrapper",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[(s(),d(le(B.value.link),{type:B.value.link==="button"?"button":void 0,disabled:a.disabled||e.disabled,"data-slot":"link",class:u(t.value.link({class:[i.ui?.link,a.ui?.link,a.class],selected:F,disabled:a.disabled||e.disabled})),style:oe(!I.value&&v>1?{paddingLeft:M.value(v)}:void 0)},{default:m(()=>[x(f.$slots,a.slot||"item",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[x(f.$slots,a.slot?`${a.slot}-leading`:"item-leading",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.icon?(s(),d(E,{key:0,name:a.icon,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:C?e.expandedIcon??n(k).ui.icons.folderOpen:e.collapsedIcon??n(k).ui.icons.folder,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):O("",!0)]),l(a)||V[a.slot?`${a.slot}-label`:"item-label"]?(s(),h("span",{key:0,"data-slot":"linkLabel",class:u(t.value.linkLabel({class:[i.ui?.linkLabel,a.ui?.linkLabel]}))},[x(f.$slots,a.slot?`${a.slot}-label`:"item-label",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[Z(_(l(a)),1)])],2)):O("",!0),a.trailingIcon||a.children?.length||V[a.slot?`${a.slot}-trailing`:"item-trailing"]?(s(),h("span",{key:1,"data-slot":"linkTrailing",class:u(t.value.linkTrailing({class:[i.ui?.linkTrailing,a.ui?.linkTrailing]}))},[x(f.$slots,a.slot?`${a.slot}-trailing`:"item-trailing",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.trailingIcon?(s(),d(E,{key:0,name:a.trailingIcon,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:e.trailingIcon??n(k).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):O("",!0)])],2)):O("",!0)])]),_:2},1032,["type","disabled","class","style"]))]),I.value&&a.children?.length&&C?(s(),h("ul",{key:0,role:"group","data-slot":"listWithChildren",class:u(t.value.listWithChildren({class:[i.ui?.listWithChildren,a.ui?.listWithChildren]}))},[b(n(c),{items:a.children,level:v+1},null,8,["items","level"])],2)):O("",!0)]),_:2},1032,["level","value","onToggle","onSelect"])],2)]),_:3}),b(n(r),null,{default:m(({items:a,level:p})=>[(s(!0),h(D,null,R(a,(v,C)=>(s(),d(n(z),{key:`${p}-${C}`,item:v,index:C,level:p},null,8,["item","index","level"]))),128))]),_:1}),b(n($e),L({ref_key:"rootRef",ref:g},{...n(N),...f.$attrs},{as:B.value.root,"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:t.value.root({class:[i.ui?.root,i.class]}),"get-key":T,"default-expanded":S.value,"selection-behavior":e.selectionBehavior}),{default:m(({flattenItems:a})=>[e.virtualize?(s(),d(n(De),L({key:0,"text-content":p=>l(p.value)},P.value),{default:m(({item:p,virtualItem:v})=>[b(n(z),{item:p.value,index:v.index,level:p.level},null,8,["item","index","level"])]),_:1},16,["text-content"])):I.value?(s(),d(n(c),{key:2,items:e.items,level:1},null,8,["items"])):(s(!0),h(D,{key:1},R(a,(p,v)=>(s(),d(n(z),{key:p._id,item:p.value,index:v,level:p.level},null,8,["item","index","level"]))),128))]),_:1},16,["as","model-value","default-value","class","default-expanded","selection-behavior"])],64))}}),ge={__name:"UContextMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:A}){const o=e,i=A,K=Q(),{dir:V}=he(),k=ie(),N=ke(se(()=>o.portal)),B=ne(Ie(o,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),I=()=>ce(K,["default"]),[M,P]=ae(),r=w(()=>V.value==="rtl"?k.ui.icons.chevronLeft:k.ui.icons.chevronRight),c=w(()=>o.items?.length?Te(o.items)?o.items:[o.items]:[]);return(y,z)=>(s(),h(D,null,[b(n(M),null,{default:m(({item:t,active:g,index:l})=>[x(y.$slots,t.slot||"item",{item:t,index:l,ui:e.ui},()=>[x(y.$slots,t.slot?`${t.slot}-leading`:"item-leading",{item:t,active:g,index:l,ui:e.ui},()=>[t.loading?(s(),d(E,{key:0,name:e.loadingIcon||n(k).ui.icons.loading,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,loading:!0}))},null,8,["name","class"])):t.icon?(s(),d(E,{key:1,name:t.icon,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.avatar?(s(),d(Le,L({key:2,size:t.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},t.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,t.ui?.itemLeadingAvatar],active:g})}),null,16,["size","class"])):O("",!0)]),n(W)(t,o.labelKey)||K[t.slot?`${t.slot}-label`:"item-label"]||n(W)(t,o.descriptionKey)||K[t.slot?`${t.slot}-description`:"item-description"]?(s(),h("span",{key:0,"data-slot":"itemWrapper",class:u(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,t.ui?.itemWrapper]}))},[H("span",{"data-slot":"itemLabel",class:u(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,t.ui?.itemLabel],active:g}))},[x(y.$slots,t.slot?`${t.slot}-label`:"item-label",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.labelKey)),1)]),t.target==="_blank"&&e.externalIcon!==!1?(s(),d(E,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:n(k).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:u(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,t.ui?.itemLabelExternalIcon],color:t?.color,active:g}))},null,8,["name","class"])):O("",!0)],2),n(W)(t,o.descriptionKey)?(s(),h("span",{key:0,"data-slot":"itemDescription",class:u(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,t.ui?.itemDescription]}))},[x(y.$slots,t.slot?`${t.slot}-description`:"item-description",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.descriptionKey)),1)])],2)):O("",!0)],2)):O("",!0),H("span",{"data-slot":"itemTrailing",class:u(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,t.ui?.itemTrailing]}))},[x(y.$slots,t.slot?`${t.slot}-trailing`:"item-trailing",{item:t,active:g,index:l,ui:e.ui},()=>[t.children?.length?(s(),d(E,{key:0,name:r.value,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.kbds?.length?(s(),h("span",{key:1,"data-slot":"itemTrailingKbds",class:u(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,t.ui?.itemTrailingKbds]}))},[(s(!0),h(D,null,R(t.kbds,(T,q)=>(s(),d(Ne,L({key:q,size:t.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof T=="string"?{value:T}:T),null,16,["size"]))),128))],2)):O("",!0)]),b(n($).ItemIndicator,{"as-child":""},{default:m(()=>[b(E,{name:e.checkedIcon||n(k).ui.icons.check,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),b(n($).Portal,ee(te(n(N))),{default:m(()=>[(s(),d(le(e.sub?n($).SubContent:n($).Content),L({"data-slot":"content",class:e.ui.content({class:[e.uiOverride?.content,o.class]})},n(B)),{default:m(()=>[x(y.$slots,"content-top",{sub:e.sub??!1}),H("div",{role:"presentation","data-slot":"viewport",class:u(e.ui.viewport({class:e.uiOverride?.viewport}))},[(s(!0),h(D,null,R(c.value,(t,g)=>(s(),d(n($).Group,{key:`group-${g}`,"data-slot":"group",class:u(e.ui.group({class:e.uiOverride?.group}))},{default:m(()=>[(s(!0),h(D,null,R(t,(l,T)=>(s(),h(D,{key:`group-${g}-${T}`},[l.type==="label"?(s(),d(n($).Label,{key:0,"data-slot":"label",class:u(e.ui.label({class:[e.uiOverride?.label,l.ui?.label,l.class]}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["class"])):l.type==="separator"?(s(),d(n($).Separator,{key:1,"data-slot":"separator",class:u(e.ui.separator({class:[e.uiOverride?.separator,l.ui?.separator,l.class]}))},null,8,["class"])):l?.children?.length?(s(),d(n($).Sub,{key:2,open:l.open,"default-open":l.defaultOpen},{default:m(()=>[b(n($).SubTrigger,{as:"button",type:"button",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),b(ge,L({sub:"",class:l.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:l.children,"align-offset":-4,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},l.content),de({_:2},[R(I(),(q,S)=>({name:S,fn:m(f=>[x(y.$slots,S,L({ref_for:!0},f))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):l.type==="checkbox"?(s(),d(n($).CheckboxItem,{key:3,"model-value":l.checked,disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color})),"onUpdate:modelValue":l.onUpdateChecked,onSelect:l.onSelect},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(s(),d(n($).Item,{key:4,"as-child":"",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),onSelect:l.onSelect},{default:m(()=>[b(ze,L({ref_for:!0},n(qe)(l),{custom:""}),{default:m(({active:q,...S})=>[b(Se,L({ref_for:!0},S,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],active:q,color:l?.color})}),{default:m(()=>[b(n(P),{item:l,active:q,index:T},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["disabled","text-value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),x(y.$slots,"default"),x(y.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Me={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Ze={__name:"UContextMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},pressOpenDelay:{type:Number,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:A}){const o=e,i=A,K=Q(),V=ie(),k=ne(ue(o,"modal"),i),N=se(()=>o.content),B=()=>ce(K,["default"]),I=w(()=>J({extend:J(Me),...V.ui?.contextMenu||{}})({size:o.size}));return(M,P)=>(s(),d(n(Ve),ee(te(n(k))),{default:m(()=>[K.default?(s(),d(n(Pe),{key:0,"as-child":"",disabled:e.disabled,class:u(o.class)},{default:m(()=>[x(M.$slots,"default")]),_:3},8,["disabled","class"])):O("",!0),b(ge,L({class:I.value.content({class:[!K.default&&o.class,o.ui?.content]}),ui:I.value,"ui-override":o.ui},N.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),de({_:2},[R(B(),(r,c)=>({name:c,fn:m(y=>[x(M.$slots,c,ee(te(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}};export{Xe as _,Ze as a};
1
+ import{a as fe,ao as Q,bA as me,a1 as pe,$ as be,c as w,E as ye,a0 as X,k as ve,G as h,R as s,aj as D,ak as R,Q as d,au as le,aV as oe,C as n,N as ie,aJ as ne,aI as ue,aT as re,aC as se,am as J,aG as xe,T as b,S as m,ab as H,U as u,a4 as x,a9 as O,V as L,_ as E,aa as Z,ae as _,Y as W,L as he,aK as ke,P as Ie,b7 as Te,ax as Le,b8 as de,b9 as ce,ap as ze,ba as qe,bb as Se,aN as ee,aO as te}from"./B63LIwsW.js";import{i as Ce,a as Ke,T as $e}from"./Cn83lLUb.js";import{g as we}from"./CrW6y2-s.js";import{M as Oe}from"./CziltI1u.js";import{u as Ae}from"./B-513wJW.js";import{c as ae}from"./HlbU_z9a.js";import{g as Be}from"./C8tXHRIo.js";import{C as $,d as Pe,e as Ve}from"./DLuRYg2p.js";import{_ as Ne}from"./B2MVZlI-.js";var We=fe({__name:"TreeVirtualizer",props:{overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(e){const A=e,o=Q(),i=Ce(),K=me(),{getItems:V}=pe(),k=be("",1e3),N=w(()=>{const r=c=>A.textContent?A.textContent(c):c.toString().toLowerCase();return i.expandedItems.value.map((c,y)=>({index:y,textContent:r(c.value)}))});i.isVirtual.value=!0;const B=w(()=>{const r=K.value;if(r){const c=window.getComputedStyle(r);return{start:Number.parseFloat(c.paddingBlockStart||c.paddingTop),end:Number.parseFloat(c.paddingBlockEnd||c.paddingBottom)}}else return{start:0,end:0}}),I=Ae({get scrollPaddingStart(){return B.value.start},get scrollPaddingEnd(){return B.value.end},get count(){return i.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(r){return r+i.getKey(i.expandedItems.value[r].value)},estimateSize(){return A.estimateSize??28},getScrollElement(){return K.value},overscan:A.overscan??12}),M=w(()=>I.value.getVirtualItems().map(r=>({item:r,is:ye(o.default({item:i.expandedItems.value[r.index],virtualizer:I.value,virtualItem:r})[0],{"data-index":r.index,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})})));function P(r){I.value.scrollToIndex(r,{align:"start"}),requestAnimationFrame(()=>{const c=K.value.querySelector(`[data-index="${r}"]`);c instanceof HTMLElement&&c.focus()})}return i.virtualKeydownHook.on(r=>{const c=r.altKey||r.ctrlKey||r.metaKey;if(r.key==="Tab"&&!c)return;const z=Oe[r.key];if(["first","last"].includes(z)){r.preventDefault();const t=z==="first"?0:i.expandedItems.value.length-1;I.value.scrollToIndex(t),requestAnimationFrame(()=>{const g=V();(z==="first"?g[0]:g[g.length-1]).ref.focus()})}else if(z==="prev"&&r.key!=="ArrowUp"){const t=X(),g=Number(t.getAttribute("data-index")),l=Number(t.getAttribute("data-indent")),q=i.expandedItems.value.slice(0,g).map((S,f)=>({...S,index:f})).reverse().find(S=>S.level===l-1);q&&P(q.index)}else if(!z&&!c){k.value+=r.key;const t=Number(X()?.getAttribute("data-index")),g=N.value[t].textContent,l=N.value.map(S=>S.textContent),T=we(l,k.value,g),q=N.value.find(S=>S.textContent===T);q&&P(q.index)}ve(()=>{r.shiftKey&&z&&i.handleMultipleReplace(z,X(),V,i.expandedItems.value.map(t=>t.value))})}),(r,c)=>(s(),h("div",{"data-reka-virtualizer":"",style:oe({position:"relative",width:"100%",height:`${n(I).getTotalSize()}px`})},[(s(!0),h(D,null,R(M.value,({is:y,item:z})=>(s(),d(le(y),{key:z.key}))),128))],4))}}),De=We;const Ee={slots:{root:"relative isolate",item:"w-full",listWithChildren:"border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 relative",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"},variants:{virtualize:{true:{root:"overflow-y-auto"}},color:{primary:{link:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted"}},size:{xs:{listWithChildren:"ms-4",link:"px-2 py-1 text-xs gap-1",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},sm:{listWithChildren:"ms-4.5",link:"px-2.5 py-1.5 text-xs gap-1.5",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},md:{listWithChildren:"ms-5",link:"px-2.5 py-1.5 text-sm gap-1.5",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},lg:{listWithChildren:"ms-5.5",link:"px-3 py-2 text-sm gap-2",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},xl:{listWithChildren:"ms-6",link:"px-3 py-2 text-base gap-2",linkLeadingIcon:"size-6",linkTrailingIcon:"size-6"}},selected:{true:{link:"before:bg-elevated"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}}},compoundVariants:[{color:"primary",selected:!0,class:{link:"text-primary"}},{color:"secondary",selected:!0,class:{link:"text-secondary"}},{color:"success",selected:!0,class:{link:"text-success"}},{color:"info",selected:!0,class:{link:"text-info"}},{color:"warning",selected:!0,class:{link:"text-warning"}},{color:"error",selected:!0,class:{link:"text-error"}},{color:"neutral",selected:!0,class:{link:"text-highlighted"}},{selected:!1,disabled:!1,class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}],defaultVariants:{color:"primary",size:"md"}},Xe=Object.assign({inheritAttrs:!1},{__name:"UTree",props:{as:{type:null,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},getKey:{type:Function,required:!1},labelKey:{type:null,required:!1,default:"label"},trailingIcon:{type:null,required:!1},expandedIcon:{type:null,required:!1},collapsedIcon:{type:null,required:!1},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},nested:{type:Boolean,required:!1,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},onSelect:{type:Function,required:!1},onToggle:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},expanded:{type:Array,required:!1},defaultExpanded:{type:Array,required:!1},selectionBehavior:{type:String,required:!1},propagateSelect:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},bubbleSelect:{type:Boolean,required:!1}},emits:["update:modelValue","update:expanded"],setup(e,{expose:A,emit:o}){const i=e,K=o,V=Q(),k=ie(),N=ne(ue(i,"items","multiple","expanded","disabled","propagateSelect","bubbleSelect"),K),B=w(()=>typeof i.as=="string"||typeof i.as?.render=="function"?{root:i.as,link:"button"}:re(i.as,{root:"ul",link:"button"})),I=w(()=>i.virtualize?!1:i.nested),M=w(()=>{const U={xs:{base:2,perLevel:5.5},sm:{base:2.5,perLevel:6},md:{base:2.5,perLevel:6.5},lg:{base:3,perLevel:7},xl:{base:3,perLevel:7.5}}[i.size||"md"];return a=>`calc(var(--spacing) * ${(a-1)*U.perLevel+U.base})`}),P=se(()=>i.virtualize?re(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:Be(i.items||[],i.size||"md")}):!1),[r,c]=ae(),[y,z]=ae({props:{item:{type:Object,required:!0},index:{type:Number,required:!0},level:{type:Number,required:!0}}}),t=w(()=>J({extend:J(Ee),...k.ui?.tree||{}})({color:i.color,size:i.size,virtualize:!!i.virtualize})),g=xe("rootRef");function l(f){return W(f,i.labelKey)}function T(f){return i.getKey&&i.getKey(f)||l(f)}function q(f){const U=f.defaultExpanded?T(f):null,a=f.children?.flatMap(p=>q(p))??[];return[U,...a].filter(Boolean)}const S=w(()=>i.defaultExpanded??i.items?.flatMap(f=>q(f)));return A({get $el(){return g.value?.$el}}),(f,U)=>(s(),h(D,null,[b(n(y),null,{default:m(({item:a,index:p,level:v})=>[H("li",{role:"presentation",class:u(I.value&&v>1?t.value.itemWithChildren({class:[i.ui?.itemWithChildren,a.ui?.itemWithChildren]}):t.value.item({class:[i.ui?.item,a.ui?.item]}))},[b(n(Ke),{level:v,value:a,"as-child":"",onToggle:C=>(a.onToggle??i.onToggle)?.(C,a),onSelect:C=>(a.onSelect??i.onSelect)?.(C,a)},{default:m(({isExpanded:C,isSelected:F,isIndeterminate:j,handleSelect:G,handleToggle:Y})=>[x(f.$slots,a.slot?`${a.slot}-wrapper`:"item-wrapper",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[(s(),d(le(B.value.link),{type:B.value.link==="button"?"button":void 0,disabled:a.disabled||e.disabled,"data-slot":"link",class:u(t.value.link({class:[i.ui?.link,a.ui?.link,a.class],selected:F,disabled:a.disabled||e.disabled})),style:oe(!I.value&&v>1?{paddingLeft:M.value(v)}:void 0)},{default:m(()=>[x(f.$slots,a.slot||"item",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[x(f.$slots,a.slot?`${a.slot}-leading`:"item-leading",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.icon?(s(),d(E,{key:0,name:a.icon,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:C?e.expandedIcon??n(k).ui.icons.folderOpen:e.collapsedIcon??n(k).ui.icons.folder,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):O("",!0)]),l(a)||V[a.slot?`${a.slot}-label`:"item-label"]?(s(),h("span",{key:0,"data-slot":"linkLabel",class:u(t.value.linkLabel({class:[i.ui?.linkLabel,a.ui?.linkLabel]}))},[x(f.$slots,a.slot?`${a.slot}-label`:"item-label",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[Z(_(l(a)),1)])],2)):O("",!0),a.trailingIcon||a.children?.length||V[a.slot?`${a.slot}-trailing`:"item-trailing"]?(s(),h("span",{key:1,"data-slot":"linkTrailing",class:u(t.value.linkTrailing({class:[i.ui?.linkTrailing,a.ui?.linkTrailing]}))},[x(f.$slots,a.slot?`${a.slot}-trailing`:"item-trailing",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.trailingIcon?(s(),d(E,{key:0,name:a.trailingIcon,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:e.trailingIcon??n(k).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):O("",!0)])],2)):O("",!0)])]),_:2},1032,["type","disabled","class","style"]))]),I.value&&a.children?.length&&C?(s(),h("ul",{key:0,role:"group","data-slot":"listWithChildren",class:u(t.value.listWithChildren({class:[i.ui?.listWithChildren,a.ui?.listWithChildren]}))},[b(n(c),{items:a.children,level:v+1},null,8,["items","level"])],2)):O("",!0)]),_:2},1032,["level","value","onToggle","onSelect"])],2)]),_:3}),b(n(r),null,{default:m(({items:a,level:p})=>[(s(!0),h(D,null,R(a,(v,C)=>(s(),d(n(z),{key:`${p}-${C}`,item:v,index:C,level:p},null,8,["item","index","level"]))),128))]),_:1}),b(n($e),L({ref_key:"rootRef",ref:g},{...n(N),...f.$attrs},{as:B.value.root,"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:t.value.root({class:[i.ui?.root,i.class]}),"get-key":T,"default-expanded":S.value,"selection-behavior":e.selectionBehavior}),{default:m(({flattenItems:a})=>[e.virtualize?(s(),d(n(De),L({key:0,"text-content":p=>l(p.value)},P.value),{default:m(({item:p,virtualItem:v})=>[b(n(z),{item:p.value,index:v.index,level:p.level},null,8,["item","index","level"])]),_:1},16,["text-content"])):I.value?(s(),d(n(c),{key:2,items:e.items,level:1},null,8,["items"])):(s(!0),h(D,{key:1},R(a,(p,v)=>(s(),d(n(z),{key:p._id,item:p.value,index:v,level:p.level},null,8,["item","index","level"]))),128))]),_:1},16,["as","model-value","default-value","class","default-expanded","selection-behavior"])],64))}}),ge={__name:"UContextMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:A}){const o=e,i=A,K=Q(),{dir:V}=he(),k=ie(),N=ke(se(()=>o.portal)),B=ne(Ie(o,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),I=()=>ce(K,["default"]),[M,P]=ae(),r=w(()=>V.value==="rtl"?k.ui.icons.chevronLeft:k.ui.icons.chevronRight),c=w(()=>o.items?.length?Te(o.items)?o.items:[o.items]:[]);return(y,z)=>(s(),h(D,null,[b(n(M),null,{default:m(({item:t,active:g,index:l})=>[x(y.$slots,t.slot||"item",{item:t,index:l,ui:e.ui},()=>[x(y.$slots,t.slot?`${t.slot}-leading`:"item-leading",{item:t,active:g,index:l,ui:e.ui},()=>[t.loading?(s(),d(E,{key:0,name:e.loadingIcon||n(k).ui.icons.loading,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,loading:!0}))},null,8,["name","class"])):t.icon?(s(),d(E,{key:1,name:t.icon,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.avatar?(s(),d(Le,L({key:2,size:t.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},t.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,t.ui?.itemLeadingAvatar],active:g})}),null,16,["size","class"])):O("",!0)]),n(W)(t,o.labelKey)||K[t.slot?`${t.slot}-label`:"item-label"]||n(W)(t,o.descriptionKey)||K[t.slot?`${t.slot}-description`:"item-description"]?(s(),h("span",{key:0,"data-slot":"itemWrapper",class:u(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,t.ui?.itemWrapper]}))},[H("span",{"data-slot":"itemLabel",class:u(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,t.ui?.itemLabel],active:g}))},[x(y.$slots,t.slot?`${t.slot}-label`:"item-label",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.labelKey)),1)]),t.target==="_blank"&&e.externalIcon!==!1?(s(),d(E,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:n(k).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:u(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,t.ui?.itemLabelExternalIcon],color:t?.color,active:g}))},null,8,["name","class"])):O("",!0)],2),n(W)(t,o.descriptionKey)?(s(),h("span",{key:0,"data-slot":"itemDescription",class:u(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,t.ui?.itemDescription]}))},[x(y.$slots,t.slot?`${t.slot}-description`:"item-description",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.descriptionKey)),1)])],2)):O("",!0)],2)):O("",!0),H("span",{"data-slot":"itemTrailing",class:u(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,t.ui?.itemTrailing]}))},[x(y.$slots,t.slot?`${t.slot}-trailing`:"item-trailing",{item:t,active:g,index:l,ui:e.ui},()=>[t.children?.length?(s(),d(E,{key:0,name:r.value,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.kbds?.length?(s(),h("span",{key:1,"data-slot":"itemTrailingKbds",class:u(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,t.ui?.itemTrailingKbds]}))},[(s(!0),h(D,null,R(t.kbds,(T,q)=>(s(),d(Ne,L({key:q,size:t.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof T=="string"?{value:T}:T),null,16,["size"]))),128))],2)):O("",!0)]),b(n($).ItemIndicator,{"as-child":""},{default:m(()=>[b(E,{name:e.checkedIcon||n(k).ui.icons.check,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),b(n($).Portal,ee(te(n(N))),{default:m(()=>[(s(),d(le(e.sub?n($).SubContent:n($).Content),L({"data-slot":"content",class:e.ui.content({class:[e.uiOverride?.content,o.class]})},n(B)),{default:m(()=>[x(y.$slots,"content-top",{sub:e.sub??!1}),H("div",{role:"presentation","data-slot":"viewport",class:u(e.ui.viewport({class:e.uiOverride?.viewport}))},[(s(!0),h(D,null,R(c.value,(t,g)=>(s(),d(n($).Group,{key:`group-${g}`,"data-slot":"group",class:u(e.ui.group({class:e.uiOverride?.group}))},{default:m(()=>[(s(!0),h(D,null,R(t,(l,T)=>(s(),h(D,{key:`group-${g}-${T}`},[l.type==="label"?(s(),d(n($).Label,{key:0,"data-slot":"label",class:u(e.ui.label({class:[e.uiOverride?.label,l.ui?.label,l.class]}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["class"])):l.type==="separator"?(s(),d(n($).Separator,{key:1,"data-slot":"separator",class:u(e.ui.separator({class:[e.uiOverride?.separator,l.ui?.separator,l.class]}))},null,8,["class"])):l?.children?.length?(s(),d(n($).Sub,{key:2,open:l.open,"default-open":l.defaultOpen},{default:m(()=>[b(n($).SubTrigger,{as:"button",type:"button",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),b(ge,L({sub:"",class:l.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:l.children,"align-offset":-4,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},l.content),de({_:2},[R(I(),(q,S)=>({name:S,fn:m(f=>[x(y.$slots,S,L({ref_for:!0},f))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):l.type==="checkbox"?(s(),d(n($).CheckboxItem,{key:3,"model-value":l.checked,disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color})),"onUpdate:modelValue":l.onUpdateChecked,onSelect:l.onSelect},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(s(),d(n($).Item,{key:4,"as-child":"",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),onSelect:l.onSelect},{default:m(()=>[b(ze,L({ref_for:!0},n(qe)(l),{custom:""}),{default:m(({active:q,...S})=>[b(Se,L({ref_for:!0},S,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],active:q,color:l?.color})}),{default:m(()=>[b(n(P),{item:l,active:q,index:T},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["disabled","text-value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),x(y.$slots,"default"),x(y.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Me={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Ze={__name:"UContextMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},pressOpenDelay:{type:Number,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:A}){const o=e,i=A,K=Q(),V=ie(),k=ne(ue(o,"modal"),i),N=se(()=>o.content),B=()=>ce(K,["default"]),I=w(()=>J({extend:J(Me),...V.ui?.contextMenu||{}})({size:o.size}));return(M,P)=>(s(),d(n(Ve),ee(te(n(k))),{default:m(()=>[K.default?(s(),d(n(Pe),{key:0,"as-child":"",disabled:e.disabled,class:u(o.class)},{default:m(()=>[x(M.$slots,"default")]),_:3},8,["disabled","class"])):O("",!0),b(ge,L({class:I.value.content({class:[!K.default&&o.class,o.ui?.content]}),ui:I.value,"ui-override":o.ui},N.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),de({_:2},[R(B(),(r,c)=>({name:c,fn:m(y=>[x(M.$slots,c,ee(te(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}};export{Xe as _,Ze as a};
@@ -1 +1 @@
1
- import{a0 as S,a as O,aP as P,aQ as q,e as v,a1 as x,aR as B,Q as U,R as D,S as w,T as G,C as d,a3 as M,a4 as N}from"./njnzCNrH.js";import{u as L}from"./ImPsUDiH.js";const V="rovingFocusGroup.onEntryFocus",k={bubbles:!1,cancelable:!0},K={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function J(e,o,a){const t=Y(e.key,a);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return K[t]}function $(e,o=!1){const a=S();for(const t of e)if(t===a||(t.focus({preventScroll:o}),S()!==a))return}function W(e,o){return e.map((a,t)=>e[(o+t)%e.length])}const[X,Q]=B("RovingFocusGroup");var j=O({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:o,emit:a}){const t=e,g=a,{loop:I,orientation:m,dir:T}=P(t),F=L(T),f=q(t,"currentTabStopId",g,{defaultValue:t.defaultCurrentTabStopId,passive:t.currentTabStopId===void 0}),i=v(!1),l=v(!1),p=v(0),{getItems:b,CollectionSlot:A}=x({isProvider:!0});function h(r){const s=!l.value;if(r.currentTarget&&r.target===r.currentTarget&&s&&!i.value){const u=new CustomEvent(V,k);if(r.currentTarget.dispatchEvent(u),g("entryFocus",u),!u.defaultPrevented){const c=b().map(n=>n.ref).filter(n=>n.dataset.disabled!==""),E=c.find(n=>n.getAttribute("data-active")===""),R=c.find(n=>n.getAttribute("data-highlighted")===""),_=c.find(n=>n.id===f.value),y=[E,R,_,...c].filter(Boolean);$(y,t.preventScrollOnEntryFocus)}}l.value=!1}function C(){setTimeout(()=>{l.value=!1},1)}return o({getItems:b}),Q({loop:I,dir:F,orientation:m,currentTabStopId:f,onItemFocus:r=>{f.value=r},onItemShiftTab:()=>{i.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(r,s)=>(D(),U(d(A),null,{default:w(()=>[G(d(M),{tabindex:i.value||p.value===0?-1:0,"data-orientation":d(m),as:r.as,"as-child":r.asChild,dir:d(F),style:{outline:"none"},onMousedown:s[0]||(s[0]=u=>l.value=!0),onMouseup:C,onFocus:h,onBlur:s[1]||(s[1]=u=>i.value=!1)},{default:w(()=>[N(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Z=j;export{K as M,Z as R,$ as f,J as g,X as i,W as w};
1
+ import{a0 as S,a as O,aP as P,aQ as q,e as v,a1 as x,aR as B,Q as U,R as D,S as w,T as G,C as d,a3 as M,a4 as N}from"./B63LIwsW.js";import{u as L}from"./C6HEirAm.js";const V="rovingFocusGroup.onEntryFocus",k={bubbles:!1,cancelable:!0},K={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function J(e,o,a){const t=Y(e.key,a);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return K[t]}function $(e,o=!1){const a=S();for(const t of e)if(t===a||(t.focus({preventScroll:o}),S()!==a))return}function W(e,o){return e.map((a,t)=>e[(o+t)%e.length])}const[X,Q]=B("RovingFocusGroup");var j=O({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:o,emit:a}){const t=e,g=a,{loop:I,orientation:m,dir:T}=P(t),F=L(T),f=q(t,"currentTabStopId",g,{defaultValue:t.defaultCurrentTabStopId,passive:t.currentTabStopId===void 0}),i=v(!1),l=v(!1),p=v(0),{getItems:b,CollectionSlot:A}=x({isProvider:!0});function h(r){const s=!l.value;if(r.currentTarget&&r.target===r.currentTarget&&s&&!i.value){const u=new CustomEvent(V,k);if(r.currentTarget.dispatchEvent(u),g("entryFocus",u),!u.defaultPrevented){const c=b().map(n=>n.ref).filter(n=>n.dataset.disabled!==""),E=c.find(n=>n.getAttribute("data-active")===""),R=c.find(n=>n.getAttribute("data-highlighted")===""),_=c.find(n=>n.id===f.value),y=[E,R,_,...c].filter(Boolean);$(y,t.preventScrollOnEntryFocus)}}l.value=!1}function C(){setTimeout(()=>{l.value=!1},1)}return o({getItems:b}),Q({loop:I,dir:F,orientation:m,currentTabStopId:f,onItemFocus:r=>{f.value=r},onItemShiftTab:()=>{i.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(r,s)=>(D(),U(d(A),null,{default:w(()=>[G(d(M),{tabindex:i.value||p.value===0?-1:0,"data-orientation":d(m),as:r.as,"as-child":r.asChild,dir:d(F),style:{outline:"none"},onMousedown:s[0]||(s[0]=u=>l.value=!0),onMouseup:C,onFocus:h,onBlur:s[1]||(s[1]=u=>i.value=!1)},{default:w(()=>[N(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Z=j;export{K as M,Z as R,$ as f,J as g,X as i,W as w};
@@ -1 +1 @@
1
- import{a as le,aR as ua,Q as F,R as C,C as w,e as S,c as U,y as ge,S as W,a4 as H,ak as da,aV as ca,G as me,ab as He,aJ as Le,V as ze,ao as We,aP as va,h as fa,f as ee,q as Ue,b5 as pa,a2 as ma,k as je,N as ha,aI as ya,aK as ga,aC as Pe,am as ke,a9 as M,T as Re,U as Y,aN as Ee,aO as Ne,aL as wa,aM as ba,aa as ce,ae as ve,au as $a}from"./njnzCNrH.js";import{d as Sa,D as xa,a as Ce,b as Ae}from"./BYtVdUIW.js";import{b as Ta,D as Da,a as Ba}from"./BZBNJD7U.js";(function(){var e;try{if(typeof document<"u"){var t=document.createElement("style");t.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,t.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const Oa=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pa=e=>typeof e<"u";function ka(e){return JSON.parse(JSON.stringify(e))}function qe(e,t,n,s={}){var a,h,d;const{clone:c=!1,passive:$=!1,eventName:D,deep:y=!1,defaultValue:o,shouldEmit:l}=s,g=fa(),m=n||g?.emit||((a=g?.$emit)==null?void 0:a.bind(g))||((d=(h=g?.proxy)==null?void 0:h.$emit)==null?void 0:d.bind(g?.proxy));let v=D;t||(t="modelValue"),v=v||`update:${t.toString()}`;const L=r=>c?typeof c=="function"?c(r):ka(r):r,q=()=>Pa(e[t])?L(e[t]):o,p=r=>{l?l(r)&&m(v,r):m(v,r)};if($){const r=q(),u=S(r);let f=!1;return ee(()=>e[t],x=>{f||(f=!0,u.value=L(x),je(()=>f=!1))}),ee(u,x=>{!f&&(x!==e[t]||y)&&p(x)},{deep:y}),u}else return U({get(){return q()},set(r){p(r)}})}const[oe,Ra]=ua("DrawerRoot"),Me=new WeakMap;function E(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const s={};Object.entries(t).forEach(([a,h])=>{if(a.startsWith("--")){e.style.setProperty(a,h);return}s[a]=e.style[a],e.style[a]=h}),!n&&Me.set(e,s)}function Ea(e,t){if(!e||!(e instanceof HTMLElement))return;const n=Me.get(e);n&&Object.entries(n).forEach(([s,a])=>{e.style[s]=a})}function fe(e,t){const n=window.getComputedStyle(e),s=n.transform||n.webkitTransform||n.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?Number.parseFloat(a[1].split(", ")[k(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?Number.parseFloat(a[1].split(", ")[k(t)?5:4]):null)}function Na(e){return 8*(Math.log(e+1)-2)}function k(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}function ye(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Ca(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},Ve=.4,Aa=.25,qa=100,Ye=8,pe=16,Xe=26,Ie="vaul-dragging";function Ia({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:s,fadeFromIndex:a,onSnapPointChange:h,direction:d}){const c=S(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function $(){c.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Ue(()=>{typeof window<"u"&&window.addEventListener("resize",$)}),pa(()=>{typeof window<"u"&&window.removeEventListener("resize",$)});const D=U(()=>(t.value&&e.value===t.value[t.value.length-1])??null),y=U(()=>t.value&&t.value.length>0&&(a?.value||a?.value===0)&&!Number.isNaN(a?.value)&&t.value[a?.value??-1]===e.value||!t.value),o=U(()=>{var p;return((p=t.value)==null?void 0:p.findIndex(r=>r===e.value))??null}),l=U(()=>{var p;return((p=t.value)==null?void 0:p.map(r=>{const u=typeof r=="string";let f=0;if(u&&(f=Number.parseInt(r,10)),k(d.value)){const T=u?f:c.value?r*c.value.innerHeight:0;return c.value?d.value==="bottom"?c.value.innerHeight-T:-c.value.innerHeight+T:T}const x=u?f:c.value?r*c.value.innerWidth:0;return c.value?d.value==="right"?c.value.innerWidth-x:-c.value.innerWidth+x:x}))??[]}),g=U(()=>{var p;return o.value!==null?(p=l.value)==null?void 0:p[o.value]:null}),m=p=>{var r,u,f,x;const T=((r=l.value)==null?void 0:r.findIndex(z=>z===p))??null;je(()=>{var z;h(T,l.value),E((z=n.value)==null?void 0:z.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(d.value)?`translate3d(0, ${p}px, 0)`:`translate3d(${p}px, 0, 0)`})}),l.value&&T!==l.value.length-1&&T!==a?.value?E((u=s.value)==null?void 0:u.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"0"}):E((f=s.value)==null?void 0:f.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),e.value=T!==null?((x=t.value)==null?void 0:x[T])??null:null};ee([e,l,t],()=>{var p;if(e.value){const r=((p=t.value)==null?void 0:p.findIndex(u=>u===e.value))??-1;l.value&&r!==-1&&typeof l.value[r]=="number"&&m(l.value[r])}},{immediate:!0});function v({draggedDistance:p,closeDrawer:r,velocity:u,dismissible:f}){var x,T,z;if(a.value===void 0)return;const G=d.value==="bottom"||d.value==="right"?(g.value??0)-p:(g.value??0)+p,re=o.value===a.value-1,_=o.value===0,X=p>0;if(re&&E((x=s.value)==null?void 0:x.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),u>2&&!X){f?r():m(l.value[0]);return}if(u>2&&X&&l&&t.value){m(l.value[t.value.length-1]);return}const ae=(T=l.value)==null?void 0:T.reduce((V,b)=>typeof V!="number"||typeof b!="number"?V:Math.abs(b-G)<Math.abs(V-G)?b:V),J=k(d.value)?window.innerHeight:window.innerWidth;if(u>Ve&&Math.abs(p)<J*.4){const V=X?1:-1;if(V>0&&D){m(l.value[(((z=t.value)==null?void 0:z.length)??0)-1]);return}if(_&&V<0&&f&&r(),o.value===null)return;m(l.value[o.value+V]);return}m(ae)}function L({draggedDistance:p}){var r;if(g.value===null)return;const u=d.value==="bottom"||d.value==="right"?g.value-p:g.value+p;(d.value==="bottom"||d.value==="right")&&u<l.value[l.value.length-1]||(d.value==="top"||d.value==="left")&&u>l.value[l.value.length-1]||E((r=n.value)==null?void 0:r.$el,{transform:k(d.value)?`translate3d(0, ${u}px, 0)`:`translate3d(${u}px, 0, 0)`})}function q(p,r){if(!t.value||typeof o.value!="number"||!l.value||a.value===void 0)return null;const u=o.value===a.value-1;if(o.value>=a.value&&r)return 0;if(u&&!r)return 1;if(!y.value&&!u)return null;const f=u?o.value+1:o.value-1,x=u?l.value[f]-l.value[f-1]:l.value[f+1]-l.value[f],T=p/Math.abs(x);return u?1-T:T}return{isLastSnapPoint:D,shouldFade:y,getPercentageDragged:q,activeSnapPointIndex:o,onRelease:v,onDrag:L,snapPointsOffset:l}}function Fe(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let ne=null;function Fa(e){const{isOpen:t,modal:n,nested:s,hasBeenOpened:a,preventScrollRestoration:h,noBodyStyles:d}=e,c=S(typeof window<"u"?window.location.href:""),$=S(0);function D(){if(Fe()&&ne===null&&t.value&&!d.value){ne={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:o,innerHeight:l}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-$.value}px`,left:`${-o}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const g=l-window.innerHeight;g&&$.value>=l&&(document.body.style.top=`-${$.value+g}px`)})},300)}}function y(){if(Fe()&&ne!==null&&!d.value){const o=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,ne),window.requestAnimationFrame(()=>{if(h.value&&c.value!==window.location.href){c.value=window.location.href;return}window.scrollTo(l,o)}),ne=null}}return Ue(()=>{function o(){$.value=window.scrollY}o(),window.addEventListener("scroll",o),ma(()=>{window.removeEventListener("scroll",o)})}),ee([t,a,c],()=>{s.value||!a.value||(t.value?(window.matchMedia("(display-mode: standalone)").matches||D(),n.value||setTimeout(()=>{y()},500)):y())}),{restorePositionSetting:y}}function Ha(e,t){return e&&e.value?e:t}function La(e){const{emitDrag:t,emitRelease:n,emitClose:s,emitOpenChange:a,open:h,dismissible:d,nested:c,modal:$,shouldScaleBackground:D,setBackgroundColorOnScale:y,scrollLockTimeout:o,closeThreshold:l,activeSnapPoint:g,fadeFromIndex:m,direction:v,noBodyStyles:L,handleOnly:q,preventScrollRestoration:p}=e,r=S(h.value??!1),u=S(!1),f=S(!1),x=S(!1),T=S(null),z=S(null),G=S(null),re=S(null),_=S(null),X=S(!1),ae=S(null),J=S(0),V=S(!1);S(0);const b=S(null);S(0);const we=U(()=>{var i;return((i=b.value)==null?void 0:i.$el.getBoundingClientRect().height)||0}),I=Ha(e.snapPoints,S(void 0)),Ke=U(()=>{var i;return I&&(((i=I.value)==null?void 0:i.length)??0)>0}),Ze=S(null),{activeSnapPointIndex:be,onRelease:_e,snapPointsOffset:Je,onDrag:Qe,shouldFade:$e,getPercentageDragged:ea}=Ia({snapPoints:I,activeSnapPoint:g,drawerRef:b,fadeFromIndex:m,overlayRef:T,onSnapPointChange:aa,direction:v});function aa(i,P){I.value&&i===P.length-1&&(z.value=new Date)}Fa({isOpen:r,modal:$,nested:c,hasBeenOpened:u,noBodyStyles:L,preventScrollRestoration:p});function ie(){return(window.innerWidth-Xe)/window.innerWidth}function Se(i,P){var R;if(!i)return!1;let B=i;const N=(R=window.getSelection())==null?void 0:R.toString(),A=b.value?fe(b.value.$el,v.value):null,j=new Date;if(B.hasAttribute("data-vaul-no-drag")||B.closest("[data-vaul-no-drag]"))return!1;if(v.value==="right"||v.value==="left")return!0;if(z.value&&j.getTime()-z.value.getTime()<500)return!1;if(A!==null&&(v.value==="bottom"?A>0:A<0))return!0;if(N&&N.length>0)return!1;if(_.value&&j.getTime()-_.value.getTime()<o.value&&A===0||P)return _.value=j,!1;for(;B;){if(B.scrollHeight>B.clientHeight){if(B.scrollTop!==0)return _.value=new Date,!1;if(B.getAttribute("role")==="dialog")return!0}B=B.parentNode}return!0}function ta(i){!d.value&&!I.value||b.value&&!b.value.$el.contains(i.target)||(f.value=!0,G.value=new Date,i.target.setPointerCapture(i.pointerId),J.value=k(v.value)?i.clientY:i.clientX)}function na(i){var P,R,B,N,A,j;if(b.value&&f.value){const Q=v.value==="bottom"||v.value==="right"?1:-1,se=(J.value-(k(v.value)?i.clientY:i.clientX))*Q,ue=se>0,Te=I.value&&!d.value&&!ue;if(Te&&be.value===0)return;const he=Math.abs(se),De=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let K=he/we.value;const Be=ea(he,ue);if(Be!==null&&(K=Be),Te&&K>=1||!X.value&&!Se(i.target,ue))return;if((P=b?.value)==null||P.$el.classList.add(Ie),X.value=!0,E((R=b.value)==null?void 0:R.$el,{transition:"none"}),E((B=T.value)==null?void 0:B.$el,{transition:"none"}),I.value&&Qe({draggedDistance:se}),ue&&!I.value){const Z=Na(se),de=Math.min(Z*-1,0)*Q;E((N=b.value)==null?void 0:N.$el,{transform:k(v.value)?`translate3d(0, ${de}px, 0)`:`translate3d(${de}px, 0, 0)`});return}const sa=1-K;if(($e.value||m.value&&be.value===m.value-1)&&(t(K),E((A=T.value)==null?void 0:A.$el,{opacity:`${sa}`,transition:"none"},!0)),De&&T.value&&D.value){const Z=Math.min(ie()+K*(1-ie()),1),de=8-K*8,Oe=Math.max(0,14-K*14);E(De,{borderRadius:`${de}px`,transform:k(v.value)?`scale(${Z}) translate3d(0, ${Oe}px, 0)`:`scale(${Z}) translate3d(${Oe}px, 0, 0)`,transition:"none"},!0)}if(!I.value){const Z=he*Q;E((j=b.value)==null?void 0:j.$el,{transform:k(v.value)?`translate3d(0, ${Z}px, 0)`:`translate3d(${Z}px, 0, 0)`})}}}function xe(){var i;if(!b.value)return;const P=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),R=fe(b.value.$el,v.value);E(b.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),E((i=T.value)==null?void 0:i.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),D.value&&R&&R>0&&r.value&&E(P,{borderRadius:`${Ye}px`,overflow:"hidden",...k(v.value)?{transform:`scale(${ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`},!0)}function te(i){b.value&&(s(),i||(r.value=!1),window.setTimeout(()=>{I.value&&(g.value=I.value[0])},O.DURATION*1e3))}ge(()=>{if(!r.value&&D.value&&Oa){const i=setTimeout(()=>{Ea(document.body)},200);return()=>clearTimeout(i)}}),ee(h,()=>{r.value=h.value,h.value||te()});function la(i){if(!f.value||!b.value)return;b.value.$el.classList.remove(Ie),X.value=!1,f.value=!1,re.value=new Date;const P=fe(b.value.$el,v.value);if(!Se(i.target,!1)||!P||Number.isNaN(P)||G.value===null)return;const R=re.value.getTime()-G.value.getTime(),B=J.value-(k(v.value)?i.clientY:i.clientX),N=Math.abs(B)/R;if(N>.05&&(x.value=!0,window.setTimeout(()=>{x.value=!1},200)),I.value){const j=v.value==="bottom"||v.value==="right"?1:-1;_e({draggedDistance:B*j,closeDrawer:te,velocity:N,dismissible:d.value}),n(!0);return}if(v.value==="bottom"||v.value==="right"?B>0:B<0){xe(),n(!0);return}if(N>Ve){te(),n(!1);return}const A=Math.min(b.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(P>=A*l.value){te(),n(!1);return}n(!0),xe()}ee(r,i=>{i&&(z.value=new Date),a(i)},{immediate:!0});function oa(i){var P,R;const B=i?(window.innerWidth-pe)/window.innerWidth:1,N=i?-16:0;ae.value&&window.clearTimeout(ae.value),E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:`scale(${B}) translate3d(0, ${N}px, 0)`}),!i&&(R=b.value)!=null&&R.$el&&(ae.value=window.setTimeout(()=>{var A,j;const Q=fe((A=b.value)==null?void 0:A.$el,v.value);E((j=b.value)==null?void 0:j.$el,{transition:"none",transform:k(v.value)?`translate3d(0, ${Q}px, 0)`:`translate3d(${Q}px, 0, 0)`})},500))}function ra(i){var P;if(i<0)return;const R=k(v.value)?window.innerHeight:window.innerWidth,B=(R-pe)/R,N=B+i*(1-B),A=-16+i*pe;E((P=b.value)==null?void 0:P.$el,{transform:k(v.value)?`scale(${N}) translate3d(0, ${A}px, 0)`:`scale(${N}) translate3d(${A}px, 0, 0)`,transition:"none"})}function ia(i){var P;const R=k(v.value)?window.innerHeight:window.innerWidth,B=i?(R-pe)/R:1,N=i?-16:0;i&&E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(v.value)?`scale(${B}) translate3d(0, ${N}px, 0)`:`scale(${B}) translate3d(${N}px, 0, 0)`})}return{open:h,isOpen:r,modal:$,keyboardIsOpen:V,hasBeenOpened:u,drawerRef:b,drawerHeightRef:we,overlayRef:T,handleRef:Ze,isDragging:f,dragStartTime:G,isAllowedToDrag:X,snapPoints:I,activeSnapPoint:g,hasSnapPoints:Ke,pointerStart:J,dismissible:d,snapPointsOffset:Je,direction:v,shouldFade:$e,fadeFromIndex:m,shouldScaleBackground:D,setBackgroundColorOnScale:y,onPress:ta,onDrag:na,onRelease:la,closeDrawer:te,onNestedDrag:ra,onNestedRelease:ia,onNestedOpenChange:oa,emitClose:s,emitDrag:t,emitRelease:n,emitOpenChange:a,nested:c,handleOnly:q,noBodyStyles:L}}const Ge=le({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Aa},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:qa},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const s=e,a=n;We();const h=U(()=>s.fadeFromIndex??(s.snapPoints&&s.snapPoints.length-1)),d=qe(s,"open",a,{defaultValue:s.defaultOpen,passive:s.open===void 0}),c=qe(s,"activeSnapPoint",a,{passive:s.activeSnapPoint===void 0}),$={emitDrag:m=>a("drag",m),emitRelease:m=>a("release",m),emitClose:()=>a("close"),emitOpenChange:m=>{a("update:open",m),setTimeout(()=>{a("animationEnd",m)},O.DURATION*1e3)}},{closeDrawer:D,hasBeenOpened:y,modal:o,isOpen:l}=Ra(La({...$,...va(s),activeSnapPoint:c,fadeFromIndex:h,open:d}));function g(m){if(d.value!==void 0){$.emitOpenChange(m);return}l.value=m,m?y.value=!0:D()}return t({open:l}),(m,v)=>(C(),F(w(Ta),{open:w(l),modal:w(o),"onUpdate:open":g},{default:W(()=>[H(m.$slots,"default",{open:w(l)})]),_:3},8,["open","modal"]))}}),za=le({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,{onNestedDrag:a,onNestedOpenChange:h,onNestedRelease:d}=oe();function c(){h(!1)}function $(o){a(o)}function D(o){o&&h(o),s("update:open",o)}const y=Le(n,s);return(o,l)=>(C(),F(Ge,ze(w(y),{nested:"",onClose:c,onDrag:$,onRelease:w(d),"onUpdate:open":D}),{default:W(()=>[H(o.$slots,"default")]),_:3},16,["onRelease"]))}}),Wa=le({__name:"DrawerOverlay",setup(e){const{overlayRef:t,hasSnapPoints:n,isOpen:s,shouldFade:a}=oe();return(h,d)=>(C(),F(w(Sa),{ref_key:"overlayRef",ref:t,"data-vaul-overlay":"","data-vaul-snap-points":w(s)&&w(n)?"true":"false","data-vaul-snap-points-overlay":w(s)&&w(a)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),Ua=()=>()=>{};function ja(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:s,noBodyStyles:a}=oe(),h=S(null),d=S(document.body.style.backgroundColor);function c(){return(window.innerWidth-Xe)/window.innerWidth}ge($=>{if(t.value&&n.value){h.value&&clearTimeout(h.value);const D=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!D)return;Ca(s.value&&!a.value?ye(document.body,{background:"black"}):Ua,ye(D,{transformOrigin:k(e.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`}));const y=ye(D,{borderRadius:`${Ye}px`,overflow:"hidden",...k(e.value)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});$(()=>{y(),h.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty("background")},O.DURATION*1e3)})}},{flush:"pre"})}const Ma=le({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,snapPointsOffset:s,hasSnapPoints:a,drawerRef:h,onPress:d,onDrag:c,onRelease:$,modal:D,emitOpenChange:y,dismissible:o,keyboardIsOpen:l,closeDrawer:g,direction:m,handleOnly:v}=oe();ja();const L=S(!1),q=U(()=>s.value&&s.value.length>0?`${s.value[0]}px`:"0");function p(f){if(!D.value||f.defaultPrevented){f.preventDefault();return}l.value&&(l.value=!1),o.value?y(!1):f.preventDefault()}function r(f){v.value||d(f)}function u(f){v.value||c(f)}return ge(()=>{a.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f,x)=>(C(),F(w(xa),{ref_key:"drawerRef",ref:h,"data-vaul-drawer":"","data-vaul-drawer-direction":w(m),"data-vaul-delayed-snap-points":L.value?"true":"false","data-vaul-snap-points":w(n)&&w(a)?"true":"false",style:ca({"--snap-point-height":q.value}),onPointerdown:r,onPointermove:u,onPointerup:w($),onPointerDownOutside:p,onOpenAutoFocus:x[0]||(x[0]=da(()=>{},["prevent"])),onEscapeKeyDown:x[1]||(x[1]=T=>{w(o)||T.preventDefault()})},{default:W(()=>[H(f.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Va=["data-vaul-drawer-visible"],Ya={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Xa=250,Ga=120,Ka=le({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(e){const t=e,{onPress:n,onDrag:s,handleRef:a,handleOnly:h,isOpen:d,snapPoints:c,activeSnapPoint:$,isDragging:D,dismissible:y,closeDrawer:o}=oe(),l=S(null),g=S(!1);function m(){if(g.value){q();return}window.setTimeout(()=>{v()},Ga)}function v(){if(D.value||t.preventCycle||g.value){q();return}if(q(),!c.value||c.value.length===0){y.value||o();return}const u=$.value===c.value[c.value.length-1];if(u&&y.value){o();return}const f=c.value.findIndex(T=>T===$.value);if(f===-1)return;const x=u?0:f+1;$.value=c.value[x]}function L(){l.value=window.setTimeout(()=>{g.value=!0},Xa)}function q(){l.value&&window.clearTimeout(l.value),g.value=!1}function p(u){h.value&&n(u),L()}function r(u){h.value&&s(u)}return(u,f)=>(C(),me("div",{ref_key:"handleRef",ref:a,"data-vaul-drawer-visible":w(d)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:q,onPointerdown:p,onPointermove:r},[He("span",Ya,[H(u.$slots,"default")])],40,Va))}}),Za={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},et={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,a=We(),h=ha(),d=Le(ya(n,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),s),c=ga(Pe(()=>n.portal)),$=Pe(()=>n.content),D=U(()=>n.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((l,g)=>(l[g]=m=>{m.preventDefault(),s("close:prevent")},l),{})),y=U(()=>ke({extend:ke(Za),...h.ui?.drawer||{}})({direction:n.direction,inset:n.inset,snapPoints:n.snapPoints&&n.snapPoints.length>0}));return(o,l)=>(C(),F($a(e.nested?w(za):w(Ge)),Ee(Ne(w(d))),{default:W(()=>[a.default?(C(),F(w(Da),{key:0,"as-child":"",class:Y(n.class)},{default:W(()=>[H(o.$slots,"default")]),_:3},8,["class"])):M("",!0),Re(w(Ba),Ee(Ne(w(c))),{default:W(()=>[e.overlay?(C(),F(w(Wa),{key:0,"data-slot":"overlay",class:Y(y.value.overlay({class:n.ui?.overlay}))},null,8,["class"])):M("",!0),Re(w(Ma),ze({"data-slot":"content",class:y.value.content({class:[!a.default&&n.class,n.ui?.content]})},$.value,wa(D.value)),{default:W(()=>[e.handle?(C(),F(w(Ka),{key:0,"data-slot":"handle",class:Y(y.value.handle({class:n.ui?.handle}))},null,8,["class"])):M("",!0),a.content&&(e.title||a.title||e.description||a.description)?(C(),F(w(ba),{key:1},{default:W(()=>[e.title||a.title?(C(),F(w(Ce),{key:0},{default:W(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3})):M("",!0),e.description||a.description?(C(),F(w(Ae),{key:1},{default:W(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3})):M("",!0)]),_:3})):M("",!0),H(o.$slots,"content",{},()=>[He("div",{"data-slot":"container",class:Y(y.value.container({class:n.ui?.container}))},[a.header||e.title||a.title||e.description||a.description?(C(),me("div",{key:0,"data-slot":"header",class:Y(y.value.header({class:n.ui?.header}))},[H(o.$slots,"header",{},()=>[e.title||a.title?(C(),F(w(Ce),{key:0,"data-slot":"title",class:Y(y.value.title({class:n.ui?.title}))},{default:W(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3},8,["class"])):M("",!0),e.description||a.description?(C(),F(w(Ae),{key:1,"data-slot":"description",class:Y(y.value.description({class:n.ui?.description}))},{default:W(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3},8,["class"])):M("",!0)])],2)):M("",!0),a.body?(C(),me("div",{key:1,"data-slot":"body",class:Y(y.value.body({class:n.ui?.body}))},[H(o.$slots,"body")],2)):M("",!0),a.footer?(C(),me("div",{key:2,"data-slot":"footer",class:Y(y.value.footer({class:n.ui?.footer}))},[H(o.$slots,"footer")],2)):M("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};export{et as _};
1
+ import{a as le,aR as ua,Q as F,R as C,C as w,e as S,c as U,y as ge,S as W,a4 as H,al as da,aV as ca,G as me,ab as He,aJ as Le,V as ze,ao as We,aP as va,h as fa,f as ee,q as Ue,b5 as pa,a2 as ma,k as je,N as ha,aI as ya,aK as ga,aC as Pe,am as ke,a9 as M,T as Re,U as Y,aN as Ee,aO as Ne,aL as wa,aM as ba,aa as ce,ae as ve,au as $a}from"./B63LIwsW.js";import{d as Sa,D as xa,a as Ce,b as Ae}from"./CY3x8iy3.js";import{b as Ta,D as Da,a as Ba}from"./D1t0272g.js";(function(){var e;try{if(typeof document<"u"){var t=document.createElement("style");t.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,t.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();const Oa=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pa=e=>typeof e<"u";function ka(e){return JSON.parse(JSON.stringify(e))}function qe(e,t,n,s={}){var a,h,d;const{clone:c=!1,passive:$=!1,eventName:D,deep:y=!1,defaultValue:o,shouldEmit:l}=s,g=fa(),m=n||g?.emit||((a=g?.$emit)==null?void 0:a.bind(g))||((d=(h=g?.proxy)==null?void 0:h.$emit)==null?void 0:d.bind(g?.proxy));let v=D;t||(t="modelValue"),v=v||`update:${t.toString()}`;const L=r=>c?typeof c=="function"?c(r):ka(r):r,q=()=>Pa(e[t])?L(e[t]):o,p=r=>{l?l(r)&&m(v,r):m(v,r)};if($){const r=q(),u=S(r);let f=!1;return ee(()=>e[t],x=>{f||(f=!0,u.value=L(x),je(()=>f=!1))}),ee(u,x=>{!f&&(x!==e[t]||y)&&p(x)},{deep:y}),u}else return U({get(){return q()},set(r){p(r)}})}const[oe,Ra]=ua("DrawerRoot"),Me=new WeakMap;function E(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;const s={};Object.entries(t).forEach(([a,h])=>{if(a.startsWith("--")){e.style.setProperty(a,h);return}s[a]=e.style[a],e.style[a]=h}),!n&&Me.set(e,s)}function Ea(e,t){if(!e||!(e instanceof HTMLElement))return;const n=Me.get(e);n&&Object.entries(n).forEach(([s,a])=>{e.style[s]=a})}function fe(e,t){const n=window.getComputedStyle(e),s=n.transform||n.webkitTransform||n.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?Number.parseFloat(a[1].split(", ")[k(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?Number.parseFloat(a[1].split(", ")[k(t)?5:4]):null)}function Na(e){return 8*(Math.log(e+1)-2)}function k(e){switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}}function ye(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Ca(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},Ve=.4,Aa=.25,qa=100,Ye=8,pe=16,Xe=26,Ie="vaul-dragging";function Ia({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:s,fadeFromIndex:a,onSnapPointChange:h,direction:d}){const c=S(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function $(){c.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Ue(()=>{typeof window<"u"&&window.addEventListener("resize",$)}),pa(()=>{typeof window<"u"&&window.removeEventListener("resize",$)});const D=U(()=>(t.value&&e.value===t.value[t.value.length-1])??null),y=U(()=>t.value&&t.value.length>0&&(a?.value||a?.value===0)&&!Number.isNaN(a?.value)&&t.value[a?.value??-1]===e.value||!t.value),o=U(()=>{var p;return((p=t.value)==null?void 0:p.findIndex(r=>r===e.value))??null}),l=U(()=>{var p;return((p=t.value)==null?void 0:p.map(r=>{const u=typeof r=="string";let f=0;if(u&&(f=Number.parseInt(r,10)),k(d.value)){const T=u?f:c.value?r*c.value.innerHeight:0;return c.value?d.value==="bottom"?c.value.innerHeight-T:-c.value.innerHeight+T:T}const x=u?f:c.value?r*c.value.innerWidth:0;return c.value?d.value==="right"?c.value.innerWidth-x:-c.value.innerWidth+x:x}))??[]}),g=U(()=>{var p;return o.value!==null?(p=l.value)==null?void 0:p[o.value]:null}),m=p=>{var r,u,f,x;const T=((r=l.value)==null?void 0:r.findIndex(z=>z===p))??null;je(()=>{var z;h(T,l.value),E((z=n.value)==null?void 0:z.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(d.value)?`translate3d(0, ${p}px, 0)`:`translate3d(${p}px, 0, 0)`})}),l.value&&T!==l.value.length-1&&T!==a?.value?E((u=s.value)==null?void 0:u.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"0"}):E((f=s.value)==null?void 0:f.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),e.value=T!==null?((x=t.value)==null?void 0:x[T])??null:null};ee([e,l,t],()=>{var p;if(e.value){const r=((p=t.value)==null?void 0:p.findIndex(u=>u===e.value))??-1;l.value&&r!==-1&&typeof l.value[r]=="number"&&m(l.value[r])}},{immediate:!0});function v({draggedDistance:p,closeDrawer:r,velocity:u,dismissible:f}){var x,T,z;if(a.value===void 0)return;const G=d.value==="bottom"||d.value==="right"?(g.value??0)-p:(g.value??0)+p,re=o.value===a.value-1,_=o.value===0,X=p>0;if(re&&E((x=s.value)==null?void 0:x.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),u>2&&!X){f?r():m(l.value[0]);return}if(u>2&&X&&l&&t.value){m(l.value[t.value.length-1]);return}const ae=(T=l.value)==null?void 0:T.reduce((V,b)=>typeof V!="number"||typeof b!="number"?V:Math.abs(b-G)<Math.abs(V-G)?b:V),J=k(d.value)?window.innerHeight:window.innerWidth;if(u>Ve&&Math.abs(p)<J*.4){const V=X?1:-1;if(V>0&&D){m(l.value[(((z=t.value)==null?void 0:z.length)??0)-1]);return}if(_&&V<0&&f&&r(),o.value===null)return;m(l.value[o.value+V]);return}m(ae)}function L({draggedDistance:p}){var r;if(g.value===null)return;const u=d.value==="bottom"||d.value==="right"?g.value-p:g.value+p;(d.value==="bottom"||d.value==="right")&&u<l.value[l.value.length-1]||(d.value==="top"||d.value==="left")&&u>l.value[l.value.length-1]||E((r=n.value)==null?void 0:r.$el,{transform:k(d.value)?`translate3d(0, ${u}px, 0)`:`translate3d(${u}px, 0, 0)`})}function q(p,r){if(!t.value||typeof o.value!="number"||!l.value||a.value===void 0)return null;const u=o.value===a.value-1;if(o.value>=a.value&&r)return 0;if(u&&!r)return 1;if(!y.value&&!u)return null;const f=u?o.value+1:o.value-1,x=u?l.value[f]-l.value[f-1]:l.value[f+1]-l.value[f],T=p/Math.abs(x);return u?1-T:T}return{isLastSnapPoint:D,shouldFade:y,getPercentageDragged:q,activeSnapPointIndex:o,onRelease:v,onDrag:L,snapPointsOffset:l}}function Fe(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let ne=null;function Fa(e){const{isOpen:t,modal:n,nested:s,hasBeenOpened:a,preventScrollRestoration:h,noBodyStyles:d}=e,c=S(typeof window<"u"?window.location.href:""),$=S(0);function D(){if(Fe()&&ne===null&&t.value&&!d.value){ne={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:o,innerHeight:l}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-$.value}px`,left:`${-o}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const g=l-window.innerHeight;g&&$.value>=l&&(document.body.style.top=`-${$.value+g}px`)})},300)}}function y(){if(Fe()&&ne!==null&&!d.value){const o=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,ne),window.requestAnimationFrame(()=>{if(h.value&&c.value!==window.location.href){c.value=window.location.href;return}window.scrollTo(l,o)}),ne=null}}return Ue(()=>{function o(){$.value=window.scrollY}o(),window.addEventListener("scroll",o),ma(()=>{window.removeEventListener("scroll",o)})}),ee([t,a,c],()=>{s.value||!a.value||(t.value?(window.matchMedia("(display-mode: standalone)").matches||D(),n.value||setTimeout(()=>{y()},500)):y())}),{restorePositionSetting:y}}function Ha(e,t){return e&&e.value?e:t}function La(e){const{emitDrag:t,emitRelease:n,emitClose:s,emitOpenChange:a,open:h,dismissible:d,nested:c,modal:$,shouldScaleBackground:D,setBackgroundColorOnScale:y,scrollLockTimeout:o,closeThreshold:l,activeSnapPoint:g,fadeFromIndex:m,direction:v,noBodyStyles:L,handleOnly:q,preventScrollRestoration:p}=e,r=S(h.value??!1),u=S(!1),f=S(!1),x=S(!1),T=S(null),z=S(null),G=S(null),re=S(null),_=S(null),X=S(!1),ae=S(null),J=S(0),V=S(!1);S(0);const b=S(null);S(0);const we=U(()=>{var i;return((i=b.value)==null?void 0:i.$el.getBoundingClientRect().height)||0}),I=Ha(e.snapPoints,S(void 0)),Ke=U(()=>{var i;return I&&(((i=I.value)==null?void 0:i.length)??0)>0}),Ze=S(null),{activeSnapPointIndex:be,onRelease:_e,snapPointsOffset:Je,onDrag:Qe,shouldFade:$e,getPercentageDragged:ea}=Ia({snapPoints:I,activeSnapPoint:g,drawerRef:b,fadeFromIndex:m,overlayRef:T,onSnapPointChange:aa,direction:v});function aa(i,P){I.value&&i===P.length-1&&(z.value=new Date)}Fa({isOpen:r,modal:$,nested:c,hasBeenOpened:u,noBodyStyles:L,preventScrollRestoration:p});function ie(){return(window.innerWidth-Xe)/window.innerWidth}function Se(i,P){var R;if(!i)return!1;let B=i;const N=(R=window.getSelection())==null?void 0:R.toString(),A=b.value?fe(b.value.$el,v.value):null,j=new Date;if(B.hasAttribute("data-vaul-no-drag")||B.closest("[data-vaul-no-drag]"))return!1;if(v.value==="right"||v.value==="left")return!0;if(z.value&&j.getTime()-z.value.getTime()<500)return!1;if(A!==null&&(v.value==="bottom"?A>0:A<0))return!0;if(N&&N.length>0)return!1;if(_.value&&j.getTime()-_.value.getTime()<o.value&&A===0||P)return _.value=j,!1;for(;B;){if(B.scrollHeight>B.clientHeight){if(B.scrollTop!==0)return _.value=new Date,!1;if(B.getAttribute("role")==="dialog")return!0}B=B.parentNode}return!0}function ta(i){!d.value&&!I.value||b.value&&!b.value.$el.contains(i.target)||(f.value=!0,G.value=new Date,i.target.setPointerCapture(i.pointerId),J.value=k(v.value)?i.clientY:i.clientX)}function na(i){var P,R,B,N,A,j;if(b.value&&f.value){const Q=v.value==="bottom"||v.value==="right"?1:-1,se=(J.value-(k(v.value)?i.clientY:i.clientX))*Q,ue=se>0,Te=I.value&&!d.value&&!ue;if(Te&&be.value===0)return;const he=Math.abs(se),De=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let K=he/we.value;const Be=ea(he,ue);if(Be!==null&&(K=Be),Te&&K>=1||!X.value&&!Se(i.target,ue))return;if((P=b?.value)==null||P.$el.classList.add(Ie),X.value=!0,E((R=b.value)==null?void 0:R.$el,{transition:"none"}),E((B=T.value)==null?void 0:B.$el,{transition:"none"}),I.value&&Qe({draggedDistance:se}),ue&&!I.value){const Z=Na(se),de=Math.min(Z*-1,0)*Q;E((N=b.value)==null?void 0:N.$el,{transform:k(v.value)?`translate3d(0, ${de}px, 0)`:`translate3d(${de}px, 0, 0)`});return}const sa=1-K;if(($e.value||m.value&&be.value===m.value-1)&&(t(K),E((A=T.value)==null?void 0:A.$el,{opacity:`${sa}`,transition:"none"},!0)),De&&T.value&&D.value){const Z=Math.min(ie()+K*(1-ie()),1),de=8-K*8,Oe=Math.max(0,14-K*14);E(De,{borderRadius:`${de}px`,transform:k(v.value)?`scale(${Z}) translate3d(0, ${Oe}px, 0)`:`scale(${Z}) translate3d(${Oe}px, 0, 0)`,transition:"none"},!0)}if(!I.value){const Z=he*Q;E((j=b.value)==null?void 0:j.$el,{transform:k(v.value)?`translate3d(0, ${Z}px, 0)`:`translate3d(${Z}px, 0, 0)`})}}}function xe(){var i;if(!b.value)return;const P=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),R=fe(b.value.$el,v.value);E(b.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`}),E((i=T.value)==null?void 0:i.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,opacity:"1"}),D.value&&R&&R>0&&r.value&&E(P,{borderRadius:`${Ye}px`,overflow:"hidden",...k(v.value)?{transform:`scale(${ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`},!0)}function te(i){b.value&&(s(),i||(r.value=!1),window.setTimeout(()=>{I.value&&(g.value=I.value[0])},O.DURATION*1e3))}ge(()=>{if(!r.value&&D.value&&Oa){const i=setTimeout(()=>{Ea(document.body)},200);return()=>clearTimeout(i)}}),ee(h,()=>{r.value=h.value,h.value||te()});function la(i){if(!f.value||!b.value)return;b.value.$el.classList.remove(Ie),X.value=!1,f.value=!1,re.value=new Date;const P=fe(b.value.$el,v.value);if(!Se(i.target,!1)||!P||Number.isNaN(P)||G.value===null)return;const R=re.value.getTime()-G.value.getTime(),B=J.value-(k(v.value)?i.clientY:i.clientX),N=Math.abs(B)/R;if(N>.05&&(x.value=!0,window.setTimeout(()=>{x.value=!1},200)),I.value){const j=v.value==="bottom"||v.value==="right"?1:-1;_e({draggedDistance:B*j,closeDrawer:te,velocity:N,dismissible:d.value}),n(!0);return}if(v.value==="bottom"||v.value==="right"?B>0:B<0){xe(),n(!0);return}if(N>Ve){te(),n(!1);return}const A=Math.min(b.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(P>=A*l.value){te(),n(!1);return}n(!0),xe()}ee(r,i=>{i&&(z.value=new Date),a(i)},{immediate:!0});function oa(i){var P,R;const B=i?(window.innerWidth-pe)/window.innerWidth:1,N=i?-16:0;ae.value&&window.clearTimeout(ae.value),E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:`scale(${B}) translate3d(0, ${N}px, 0)`}),!i&&(R=b.value)!=null&&R.$el&&(ae.value=window.setTimeout(()=>{var A,j;const Q=fe((A=b.value)==null?void 0:A.$el,v.value);E((j=b.value)==null?void 0:j.$el,{transition:"none",transform:k(v.value)?`translate3d(0, ${Q}px, 0)`:`translate3d(${Q}px, 0, 0)`})},500))}function ra(i){var P;if(i<0)return;const R=k(v.value)?window.innerHeight:window.innerWidth,B=(R-pe)/R,N=B+i*(1-B),A=-16+i*pe;E((P=b.value)==null?void 0:P.$el,{transform:k(v.value)?`scale(${N}) translate3d(0, ${A}px, 0)`:`scale(${N}) translate3d(${A}px, 0, 0)`,transition:"none"})}function ia(i){var P;const R=k(v.value)?window.innerHeight:window.innerWidth,B=i?(R-pe)/R:1,N=i?-16:0;i&&E((P=b.value)==null?void 0:P.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(",")})`,transform:k(v.value)?`scale(${B}) translate3d(0, ${N}px, 0)`:`scale(${B}) translate3d(${N}px, 0, 0)`})}return{open:h,isOpen:r,modal:$,keyboardIsOpen:V,hasBeenOpened:u,drawerRef:b,drawerHeightRef:we,overlayRef:T,handleRef:Ze,isDragging:f,dragStartTime:G,isAllowedToDrag:X,snapPoints:I,activeSnapPoint:g,hasSnapPoints:Ke,pointerStart:J,dismissible:d,snapPointsOffset:Je,direction:v,shouldFade:$e,fadeFromIndex:m,shouldScaleBackground:D,setBackgroundColorOnScale:y,onPress:ta,onDrag:na,onRelease:la,closeDrawer:te,onNestedDrag:ra,onNestedRelease:ia,onNestedOpenChange:oa,emitClose:s,emitDrag:t,emitRelease:n,emitOpenChange:a,nested:c,handleOnly:q,noBodyStyles:L}}const Ge=le({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:Aa},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:qa},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{expose:t,emit:n}){const s=e,a=n;We();const h=U(()=>s.fadeFromIndex??(s.snapPoints&&s.snapPoints.length-1)),d=qe(s,"open",a,{defaultValue:s.defaultOpen,passive:s.open===void 0}),c=qe(s,"activeSnapPoint",a,{passive:s.activeSnapPoint===void 0}),$={emitDrag:m=>a("drag",m),emitRelease:m=>a("release",m),emitClose:()=>a("close"),emitOpenChange:m=>{a("update:open",m),setTimeout(()=>{a("animationEnd",m)},O.DURATION*1e3)}},{closeDrawer:D,hasBeenOpened:y,modal:o,isOpen:l}=Ra(La({...$,...va(s),activeSnapPoint:c,fadeFromIndex:h,open:d}));function g(m){if(d.value!==void 0){$.emitOpenChange(m);return}l.value=m,m?y.value=!0:D()}return t({open:l}),(m,v)=>(C(),F(w(Ta),{open:w(l),modal:w(o),"onUpdate:open":g},{default:W(()=>[H(m.$slots,"default",{open:w(l)})]),_:3},8,["open","modal"]))}}),za=le({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,{onNestedDrag:a,onNestedOpenChange:h,onNestedRelease:d}=oe();function c(){h(!1)}function $(o){a(o)}function D(o){o&&h(o),s("update:open",o)}const y=Le(n,s);return(o,l)=>(C(),F(Ge,ze(w(y),{nested:"",onClose:c,onDrag:$,onRelease:w(d),"onUpdate:open":D}),{default:W(()=>[H(o.$slots,"default")]),_:3},16,["onRelease"]))}}),Wa=le({__name:"DrawerOverlay",setup(e){const{overlayRef:t,hasSnapPoints:n,isOpen:s,shouldFade:a}=oe();return(h,d)=>(C(),F(w(Sa),{ref_key:"overlayRef",ref:t,"data-vaul-overlay":"","data-vaul-snap-points":w(s)&&w(n)?"true":"false","data-vaul-snap-points-overlay":w(s)&&w(a)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),Ua=()=>()=>{};function ja(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:s,noBodyStyles:a}=oe(),h=S(null),d=S(document.body.style.backgroundColor);function c(){return(window.innerWidth-Xe)/window.innerWidth}ge($=>{if(t.value&&n.value){h.value&&clearTimeout(h.value);const D=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!D)return;Ca(s.value&&!a.value?ye(document.body,{background:"black"}):Ua,ye(D,{transformOrigin:k(e.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(",")})`}));const y=ye(D,{borderRadius:`${Ye}px`,overflow:"hidden",...k(e.value)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});$(()=>{y(),h.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty("background")},O.DURATION*1e3)})}},{flush:"pre"})}const Ma=le({__name:"DrawerContent",setup(e){const{open:t,isOpen:n,snapPointsOffset:s,hasSnapPoints:a,drawerRef:h,onPress:d,onDrag:c,onRelease:$,modal:D,emitOpenChange:y,dismissible:o,keyboardIsOpen:l,closeDrawer:g,direction:m,handleOnly:v}=oe();ja();const L=S(!1),q=U(()=>s.value&&s.value.length>0?`${s.value[0]}px`:"0");function p(f){if(!D.value||f.defaultPrevented){f.preventDefault();return}l.value&&(l.value=!1),o.value?y(!1):f.preventDefault()}function r(f){v.value||d(f)}function u(f){v.value||c(f)}return ge(()=>{a.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f,x)=>(C(),F(w(xa),{ref_key:"drawerRef",ref:h,"data-vaul-drawer":"","data-vaul-drawer-direction":w(m),"data-vaul-delayed-snap-points":L.value?"true":"false","data-vaul-snap-points":w(n)&&w(a)?"true":"false",style:ca({"--snap-point-height":q.value}),onPointerdown:r,onPointermove:u,onPointerup:w($),onPointerDownOutside:p,onOpenAutoFocus:x[0]||(x[0]=da(()=>{},["prevent"])),onEscapeKeyDown:x[1]||(x[1]=T=>{w(o)||T.preventDefault()})},{default:W(()=>[H(f.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Va=["data-vaul-drawer-visible"],Ya={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Xa=250,Ga=120,Ka=le({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(e){const t=e,{onPress:n,onDrag:s,handleRef:a,handleOnly:h,isOpen:d,snapPoints:c,activeSnapPoint:$,isDragging:D,dismissible:y,closeDrawer:o}=oe(),l=S(null),g=S(!1);function m(){if(g.value){q();return}window.setTimeout(()=>{v()},Ga)}function v(){if(D.value||t.preventCycle||g.value){q();return}if(q(),!c.value||c.value.length===0){y.value||o();return}const u=$.value===c.value[c.value.length-1];if(u&&y.value){o();return}const f=c.value.findIndex(T=>T===$.value);if(f===-1)return;const x=u?0:f+1;$.value=c.value[x]}function L(){l.value=window.setTimeout(()=>{g.value=!0},Xa)}function q(){l.value&&window.clearTimeout(l.value),g.value=!1}function p(u){h.value&&n(u),L()}function r(u){h.value&&s(u)}return(u,f)=>(C(),me("div",{ref_key:"handleRef",ref:a,"data-vaul-drawer-visible":w(d)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:m,onPointercancel:q,onPointerdown:p,onPointermove:r},[He("span",Ya,[H(u.$slots,"default")])],40,Va))}}),Za={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},et={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(e,{emit:t}){const n=e,s=t,a=We(),h=ha(),d=Le(ya(n,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),s),c=ga(Pe(()=>n.portal)),$=Pe(()=>n.content),D=U(()=>n.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((l,g)=>(l[g]=m=>{m.preventDefault(),s("close:prevent")},l),{})),y=U(()=>ke({extend:ke(Za),...h.ui?.drawer||{}})({direction:n.direction,inset:n.inset,snapPoints:n.snapPoints&&n.snapPoints.length>0}));return(o,l)=>(C(),F($a(e.nested?w(za):w(Ge)),Ee(Ne(w(d))),{default:W(()=>[a.default?(C(),F(w(Da),{key:0,"as-child":"",class:Y(n.class)},{default:W(()=>[H(o.$slots,"default")]),_:3},8,["class"])):M("",!0),Re(w(Ba),Ee(Ne(w(c))),{default:W(()=>[e.overlay?(C(),F(w(Wa),{key:0,"data-slot":"overlay",class:Y(y.value.overlay({class:n.ui?.overlay}))},null,8,["class"])):M("",!0),Re(w(Ma),ze({"data-slot":"content",class:y.value.content({class:[!a.default&&n.class,n.ui?.content]})},$.value,wa(D.value)),{default:W(()=>[e.handle?(C(),F(w(Ka),{key:0,"data-slot":"handle",class:Y(y.value.handle({class:n.ui?.handle}))},null,8,["class"])):M("",!0),a.content&&(e.title||a.title||e.description||a.description)?(C(),F(w(ba),{key:1},{default:W(()=>[e.title||a.title?(C(),F(w(Ce),{key:0},{default:W(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3})):M("",!0),e.description||a.description?(C(),F(w(Ae),{key:1},{default:W(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3})):M("",!0)]),_:3})):M("",!0),H(o.$slots,"content",{},()=>[He("div",{"data-slot":"container",class:Y(y.value.container({class:n.ui?.container}))},[a.header||e.title||a.title||e.description||a.description?(C(),me("div",{key:0,"data-slot":"header",class:Y(y.value.header({class:n.ui?.header}))},[H(o.$slots,"header",{},()=>[e.title||a.title?(C(),F(w(Ce),{key:0,"data-slot":"title",class:Y(y.value.title({class:n.ui?.title}))},{default:W(()=>[H(o.$slots,"title",{},()=>[ce(ve(e.title),1)])]),_:3},8,["class"])):M("",!0),e.description||a.description?(C(),F(w(Ae),{key:1,"data-slot":"description",class:Y(y.value.description({class:n.ui?.description}))},{default:W(()=>[H(o.$slots,"description",{},()=>[ce(ve(e.description),1)])]),_:3},8,["class"])):M("",!0)])],2)):M("",!0),a.body?(C(),me("div",{key:1,"data-slot":"body",class:Y(y.value.body({class:n.ui?.body}))},[H(o.$slots,"body")],2)):M("",!0),a.footer?(C(),me("div",{key:2,"data-slot":"footer",class:Y(y.value.footer({class:n.ui?.footer}))},[H(o.$slots,"footer")],2)):M("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}};export{et as _};
@@ -1 +1 @@
1
- import{a as c,aR as M,aP as C,a_ as b,aQ as S,e as h,Q as m,R as _,S as p,a4 as y,C as a,a3 as g,c as v,q as k,T as q,aV as B,a9 as V,bf as $,f as w,bB as z,V as L,k as F,bm as P,ak as A}from"./njnzCNrH.js";import{R as D}from"./Bwn-CRYH.js";import{R as H}from"./CClsKJ9A.js";import{u as N}from"./ImPsUDiH.js";import{u as O}from"./BIo-9u_O.js";const[T,K]=M("TabsRoot");var E=c({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(u,{emit:o}){const s=u,e=o,{orientation:r,unmountOnHide:n,dir:l}=C(s),t=N(l);b();const i=S(s,"modelValue",e,{defaultValue:s.defaultValue,passive:s.modelValue===void 0}),d=h();return K({modelValue:i,changeModelValue:f=>{i.value=f},orientation:r,dir:t,unmountOnHide:n,activationMode:s.activationMode,baseId:O(void 0,"reka-tabs"),tabsList:d}),(f,J)=>(_(),m(a(g),{dir:a(t),"data-orientation":a(r),"as-child":f.asChild,as:f.as},{default:p(()=>[y(f.$slots,"default",{modelValue:a(i)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),ee=E;function R(u,o){return`${u}-trigger-${o}`}function I(u,o){return`${u}-content-${o}`}var Q=c({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value),t=h(l.value);return k(()=>{requestAnimationFrame(()=>{t.value=!1})}),(i,d)=>(_(),m(a($),{present:i.forceMount||l.value,"force-mount":""},{default:p(({present:f})=>[q(a(g),{id:n.value,ref:a(s),"as-child":i.asChild,as:i.as,role:"tabpanel","data-state":l.value?"active":"inactive","data-orientation":a(e).orientation.value,"aria-labelledby":r.value,hidden:!f,tabindex:"0",style:B({animationDuration:t.value?"0s":void 0})},{default:p(()=>[!a(e).unmountOnHide.value||f?y(i.$slots,"default",{key:0}):V("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),ae=Q,j=c({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,s=T();b();const e=h(),r=h({size:null,position:null});w(()=>[s.modelValue.value,s?.dir.value],async()=>{await F(),n()},{immediate:!0}),z([s.tabsList,e],n);function n(){e.value=s.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),e.value&&(s.orientation.value==="horizontal"?r.value={size:e.value.offsetWidth,position:e.value.offsetLeft}:r.value={size:e.value.offsetHeight,position:e.value.offsetTop})}return(l,t)=>typeof r.value.size=="number"?(_(),m(a(g),L({key:0},o,{style:{"--reka-tabs-indicator-size":`${r.value.size}px`,"--reka-tabs-indicator-position":`${r.value.position}px`}}),{default:p(()=>[y(l.$slots,"default")]),_:3},16,["style"])):V("v-if",!0)}}),te=j,G=c({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{loop:s}=C(o),{forwardRef:e,currentElement:r}=b(),n=T();return n.tabsList=r,(l,t)=>(_(),m(a(D),{"as-child":"",orientation:a(n).orientation.value,dir:a(n).dir.value,loop:a(s)},{default:p(()=>[q(a(g),{ref:a(e),role:"tablist","as-child":l.asChild,as:l.as,"aria-orientation":a(n).orientation.value},{default:p(()=>[y(l.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),oe=G,W=c({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value);return(t,i)=>(_(),m(a(H),{"as-child":"",focusable:!t.disabled,active:l.value},{default:p(()=>[q(a(g),{id:r.value,ref:a(s),role:"tab",type:t.as==="button"?"button":void 0,as:t.as,"as-child":t.asChild,"aria-selected":l.value?"true":"false","aria-controls":n.value,"data-state":l.value?"active":"inactive",disabled:t.disabled,"data-disabled":t.disabled?"":void 0,"data-orientation":a(e).orientation.value,onMousedown:i[0]||(i[0]=A(d=>{!t.disabled&&d.ctrlKey===!1?a(e).changeModelValue(t.value):d.preventDefault()},["left"])),onKeydown:i[1]||(i[1]=P(d=>a(e).changeModelValue(t.value),["enter","space"])),onFocus:i[2]||(i[2]=()=>{const d=a(e).activationMode!=="manual";!l.value&&!t.disabled&&d&&a(e).changeModelValue(t.value)})},{default:p(()=>[y(t.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),se=W;export{te as T,oe as a,ee as b,se as c,ae as d};
1
+ import{a as c,aR as M,aP as C,a_ as b,aQ as S,e as h,Q as m,R as _,S as p,a4 as y,C as a,a3 as g,c as v,q as B,T as q,aV as $,a9 as V,bf as k,f as w,bB as z,V as L,k as F,bm as P,al as A}from"./B63LIwsW.js";import{R as D}from"./CziltI1u.js";import{R as H}from"./nTCVPCKg.js";import{u as N}from"./C6HEirAm.js";import{u as O}from"./DlSJ4TF_.js";const[T,K]=M("TabsRoot");var E=c({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(u,{emit:o}){const s=u,e=o,{orientation:r,unmountOnHide:n,dir:l}=C(s),t=N(l);b();const i=S(s,"modelValue",e,{defaultValue:s.defaultValue,passive:s.modelValue===void 0}),d=h();return K({modelValue:i,changeModelValue:f=>{i.value=f},orientation:r,dir:t,unmountOnHide:n,activationMode:s.activationMode,baseId:O(void 0,"reka-tabs"),tabsList:d}),(f,J)=>(_(),m(a(g),{dir:a(t),"data-orientation":a(r),"as-child":f.asChild,as:f.as},{default:p(()=>[y(f.$slots,"default",{modelValue:a(i)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),ee=E;function R(u,o){return`${u}-trigger-${o}`}function I(u,o){return`${u}-content-${o}`}var Q=c({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value),t=h(l.value);return B(()=>{requestAnimationFrame(()=>{t.value=!1})}),(i,d)=>(_(),m(a(k),{present:i.forceMount||l.value,"force-mount":""},{default:p(({present:f})=>[q(a(g),{id:n.value,ref:a(s),"as-child":i.asChild,as:i.as,role:"tabpanel","data-state":l.value?"active":"inactive","data-orientation":a(e).orientation.value,"aria-labelledby":r.value,hidden:!f,tabindex:"0",style:$({animationDuration:t.value?"0s":void 0})},{default:p(()=>[!a(e).unmountOnHide.value||f?y(i.$slots,"default",{key:0}):V("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),ae=Q,j=c({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,s=T();b();const e=h(),r=h({size:null,position:null});w(()=>[s.modelValue.value,s?.dir.value],async()=>{await F(),n()},{immediate:!0}),z([s.tabsList,e],n);function n(){e.value=s.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),e.value&&(s.orientation.value==="horizontal"?r.value={size:e.value.offsetWidth,position:e.value.offsetLeft}:r.value={size:e.value.offsetHeight,position:e.value.offsetTop})}return(l,t)=>typeof r.value.size=="number"?(_(),m(a(g),L({key:0},o,{style:{"--reka-tabs-indicator-size":`${r.value.size}px`,"--reka-tabs-indicator-position":`${r.value.position}px`}}),{default:p(()=>[y(l.$slots,"default")]),_:3},16,["style"])):V("v-if",!0)}}),te=j,G=c({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{loop:s}=C(o),{forwardRef:e,currentElement:r}=b(),n=T();return n.tabsList=r,(l,t)=>(_(),m(a(D),{"as-child":"",orientation:a(n).orientation.value,dir:a(n).dir.value,loop:a(s)},{default:p(()=>[q(a(g),{ref:a(e),role:"tablist","as-child":l.asChild,as:l.as,"aria-orientation":a(n).orientation.value},{default:p(()=>[y(l.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),oe=G,W=c({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value);return(t,i)=>(_(),m(a(H),{"as-child":"",focusable:!t.disabled,active:l.value},{default:p(()=>[q(a(g),{id:r.value,ref:a(s),role:"tab",type:t.as==="button"?"button":void 0,as:t.as,"as-child":t.asChild,"aria-selected":l.value?"true":"false","aria-controls":n.value,"data-state":l.value?"active":"inactive",disabled:t.disabled,"data-disabled":t.disabled?"":void 0,"data-orientation":a(e).orientation.value,onMousedown:i[0]||(i[0]=A(d=>{!t.disabled&&d.ctrlKey===!1?a(e).changeModelValue(t.value):d.preventDefault()},["left"])),onKeydown:i[1]||(i[1]=P(d=>a(e).changeModelValue(t.value),["enter","space"])),onFocus:i[2]||(i[2]=()=>{const d=a(e).activationMode!=="manual";!l.value&&!t.disabled&&d&&a(e).changeModelValue(t.value)})},{default:p(()=>[y(t.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),se=W;export{te as T,oe as a,ee as b,se as c,ae as d};