signetai 0.109.21 → 0.110.0

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 (108) hide show
  1. package/dashboard/_app/immutable/assets/0.DyI51DwC.css +1 -0
  2. package/dashboard/_app/immutable/assets/2.BZxc-RrJ.css +1 -0
  3. package/dashboard/_app/immutable/assets/{AuditTab.DfUZSCcu.css → AuditTab.Hc64_Jqx.css} +1 -1
  4. package/dashboard/_app/immutable/assets/{ChangelogTab.8iCG0PUY.css → ChangelogTab.DPMB6GBV.css} +1 -1
  5. package/dashboard/_app/immutable/assets/{CortexTab.DLYwEPvJ.css → CortexTab.3C3a8KlW.css} +1 -1
  6. package/dashboard/_app/immutable/assets/{CortexTasksPanel.C4153GOT.css → CortexTasksPanel.BfHb49Cs.css} +1 -1
  7. package/dashboard/_app/immutable/assets/HomeTab.DnDpEIrk.css +1 -0
  8. package/dashboard/_app/immutable/assets/{MarketplaceTab.D-PeLdJA.css → MarketplaceTab.BfahzuSs.css} +1 -1
  9. package/dashboard/_app/immutable/assets/{OsTab.BABNhat-.css → OsTab.D_wVYC7y.css} +1 -1
  10. package/dashboard/_app/immutable/assets/{PageBanner.BodUOjhn.css → PageBanner.BY6Ub6Kn.css} +1 -1
  11. package/dashboard/_app/immutable/assets/{SecretsTab.DEoZs2Z_.css → SecretsTab.ZE-D0CIi.css} +1 -1
  12. package/dashboard/_app/immutable/assets/{SettingsTab.B1PZQtAW.css → SettingsTab.Lj9vR6l3.css} +1 -1
  13. package/dashboard/_app/immutable/assets/SourcesTab.BR4pyfYb.css +1 -0
  14. package/dashboard/_app/immutable/assets/{TroubleshooterPanel.Bj27xjMc.css → TroubleshooterPanel.CS4J0zfS.css} +1 -1
  15. package/dashboard/_app/immutable/chunks/{BiAb5cst.js → 6hALFWxe.js} +1 -1
  16. package/dashboard/_app/immutable/chunks/{BfoUO9DF.js → 8jfrEnwZ.js} +1 -1
  17. package/dashboard/_app/immutable/chunks/9UFGYsgU.js +1 -0
  18. package/dashboard/_app/immutable/chunks/{DCGZzQhv.js → B4MV25Cw.js} +1 -1
  19. package/dashboard/_app/immutable/chunks/{CzPN5M7F.js → B75W1jKu.js} +1 -1
  20. package/dashboard/_app/immutable/chunks/{DtHU_KyL.js → B8FOX1OE.js} +11 -11
  21. package/dashboard/_app/immutable/chunks/{CyB1_UBK.js → B9q9Ge2R.js} +1 -1
  22. package/dashboard/_app/immutable/chunks/{By_N1VYQ.js → BUrbURB6.js} +1 -1
  23. package/dashboard/_app/immutable/chunks/{sPXpc0N5.js → BX3ohALu.js} +1 -1
  24. package/dashboard/_app/immutable/chunks/{B8H0-1W-.js → BZDosIrh.js} +1 -1
  25. package/dashboard/_app/immutable/chunks/{DPZ6SyF-.js → B_FilWeQ.js} +1 -1
  26. package/dashboard/_app/immutable/chunks/BcWwjGf6.js +262 -0
  27. package/dashboard/_app/immutable/chunks/{DNGDC21S.js → BiBX3uai.js} +1 -1
  28. package/dashboard/_app/immutable/chunks/{EOE2EklU.js → BjckOom6.js} +1 -1
  29. package/dashboard/_app/immutable/chunks/{T-ShU8zN.js → Bmj_guSY.js} +1 -1
  30. package/dashboard/_app/immutable/chunks/{BSy63mmK.js → Bqh2yyHq.js} +1 -1
  31. package/dashboard/_app/immutable/chunks/{Dj7lwzP_.js → Bt_5fpG6.js} +1 -1
  32. package/dashboard/_app/immutable/chunks/{CuhH2hEa.js → Bw9cJchw.js} +1 -1
  33. package/dashboard/_app/immutable/chunks/ByGbV-Ik.js +32 -0
  34. package/dashboard/_app/immutable/chunks/C57S4WwD.js +16 -0
  35. package/dashboard/_app/immutable/chunks/CAqbdsRf.js +1 -0
  36. package/dashboard/_app/immutable/chunks/CBEN-ChP.js +4 -0
  37. package/dashboard/_app/immutable/chunks/{DztUtVIN.js → CEcPoaRJ.js} +1 -1
  38. package/dashboard/_app/immutable/chunks/CKVqiaWK.js +2 -0
  39. package/dashboard/_app/immutable/chunks/{DtdJ80sh.js → CTru9r3k.js} +1 -1
  40. package/dashboard/_app/immutable/chunks/CUNvCZVi.js +1 -0
  41. package/dashboard/_app/immutable/chunks/{KKQFryJf.js → C__P7n-d.js} +1 -1
  42. package/dashboard/_app/immutable/chunks/{D8So1UBc.js → CdpckCxA.js} +1 -1
  43. package/dashboard/_app/immutable/chunks/CmNyRv9_.js +3 -0
  44. package/dashboard/_app/immutable/chunks/{CwfMbyo9.js → Cnu2Gy6H.js} +1 -1
  45. package/dashboard/_app/immutable/chunks/CoBEMRYx.js +27 -0
  46. package/dashboard/_app/immutable/chunks/{aSrCnYtQ.js → CtP16pip.js} +1 -1
  47. package/dashboard/_app/immutable/chunks/{B0LCqdOS.js → CtffxXur.js} +1 -1
  48. package/dashboard/_app/immutable/chunks/{CoewuoXd.js → D2hKtolS.js} +1 -1
  49. package/dashboard/_app/immutable/chunks/{ql8Es_E1.js → DDBGvgR1.js} +1 -1
  50. package/dashboard/_app/immutable/chunks/DE4e4GZP.js +3 -0
  51. package/dashboard/_app/immutable/chunks/DQidaz0T.js +4 -0
  52. package/dashboard/_app/immutable/chunks/DQycX93q.js +31 -0
  53. package/dashboard/_app/immutable/chunks/{CD494UvJ.js → DWOk1mMF.js} +1 -1
  54. package/dashboard/_app/immutable/chunks/{OaTG8fit.js → DXr5J1T5.js} +2 -2
  55. package/dashboard/_app/immutable/chunks/{Bc-tUO5p.js → DcHgi7Cc.js} +1 -1
  56. package/dashboard/_app/immutable/chunks/{AqBnhsD5.js → DdMf_Qgk.js} +1 -1
  57. package/dashboard/_app/immutable/chunks/{SA9_q96K.js → DjQJhaws.js} +1 -1
  58. package/dashboard/_app/immutable/chunks/{BfkEASdS.js → DlEHdTiv.js} +1 -1
  59. package/dashboard/_app/immutable/chunks/DlaWiL1c.js +1 -0
  60. package/dashboard/_app/immutable/chunks/{C73w3ldq.js → DqvbULwl.js} +2 -2
  61. package/dashboard/_app/immutable/chunks/{BiDzZsdZ.js → DrHj0jJA.js} +1 -1
  62. package/dashboard/_app/immutable/chunks/E8aDzCah.js +64 -0
  63. package/dashboard/_app/immutable/chunks/{rdAZcnWE.js → Gx2iNUl2.js} +1 -1
  64. package/dashboard/_app/immutable/chunks/{BWFOfv6z.js → WOdSatfk.js} +1 -1
  65. package/dashboard/_app/immutable/chunks/{DvMqwpw_.js → e2kluLpm.js} +1 -1
  66. package/dashboard/_app/immutable/chunks/{BS1btvRn.js → fNoP8D6S.js} +3 -3
  67. package/dashboard/_app/immutable/chunks/{BykyFGyF.js → gdh5sBCP.js} +1 -1
  68. package/dashboard/_app/immutable/chunks/{DK3bAoxY.js → nI8gUPgM.js} +1 -1
  69. package/dashboard/_app/immutable/chunks/ptf-RpEv.js +15 -0
  70. package/dashboard/_app/immutable/entry/{app.D5uuC30L.js → app.BLkOA8b7.js} +2 -2
  71. package/dashboard/_app/immutable/entry/start.DWeeSVup.js +1 -0
  72. package/dashboard/_app/immutable/nodes/{0.CZy1mb1E.js → 0.C3a2CrM0.js} +1 -1
  73. package/dashboard/_app/immutable/nodes/{1.CaBl0no1.js → 1.Bv-vjpsu.js} +1 -1
  74. package/dashboard/_app/immutable/nodes/2.DA545kOI.js +1 -0
  75. package/dashboard/_app/version.json +1 -1
  76. package/dashboard/fonts/NectoMono-Regular.otf +0 -0
  77. package/dashboard/fonts/PixelifySans-Regular.woff2 +0 -0
  78. package/dashboard/fonts/Silkscreen-Bold.woff2 +0 -0
  79. package/dashboard/fonts/Silkscreen-Regular.woff2 +0 -0
  80. package/dashboard/fonts/Tiny5-Regular.woff2 +0 -0
  81. package/dashboard/fonts/VT323-Regular.woff2 +0 -0
  82. package/dashboard/index.html +11 -10
  83. package/dashboard/source-logos/highlevel-favicon.ico +0 -0
  84. package/dashboard/source-logos/highlevel-official-help-logo.png +0 -0
  85. package/dist/cli.js +2864 -1520
  86. package/dist/daemon.js +2369 -1122
  87. package/dist/mcp-stdio.js +60 -2
  88. package/dist/synthesis-render-worker.js +60 -2
  89. package/package.json +1 -1
  90. package/dashboard/_app/immutable/assets/0.fVSjfxN5.css +0 -1
  91. package/dashboard/_app/immutable/assets/2.DA3KZL1j.css +0 -1
  92. package/dashboard/_app/immutable/assets/HomeTab.Dl5L71iA.css +0 -1
  93. package/dashboard/_app/immutable/chunks/B9jE78TQ.js +0 -27
  94. package/dashboard/_app/immutable/chunks/BPP5Agft.js +0 -64
  95. package/dashboard/_app/immutable/chunks/Bhn2wIIa.js +0 -264
  96. package/dashboard/_app/immutable/chunks/BmDss2Lk.js +0 -1
  97. package/dashboard/_app/immutable/chunks/BnXfOKea.js +0 -1
  98. package/dashboard/_app/immutable/chunks/C6OK3hJs.js +0 -1
  99. package/dashboard/_app/immutable/chunks/CVA40-SC.js +0 -15
  100. package/dashboard/_app/immutable/chunks/CfqYG94h.js +0 -16
  101. package/dashboard/_app/immutable/chunks/CidL-rbF.js +0 -4
  102. package/dashboard/_app/immutable/chunks/CsmFKXf6.js +0 -4
  103. package/dashboard/_app/immutable/chunks/CtKZ1_IS.js +0 -32
  104. package/dashboard/_app/immutable/chunks/DIaDWJbV.js +0 -31
  105. package/dashboard/_app/immutable/chunks/DU0PzCMp.js +0 -2
  106. package/dashboard/_app/immutable/chunks/DuNSmCyM.js +0 -3
  107. package/dashboard/_app/immutable/entry/start.6jrH-2n0.js +0 -1
  108. package/dashboard/_app/immutable/nodes/2.D4vLhsbS.js +0 -1
@@ -4,4 +4,4 @@ var yo=Array.isArray,$d=Array.prototype.indexOf,Pn=Array.prototype.includes,wo=A
4
4
  `,Dc="/",Oc="*",tn="",dp="comment",fp="declaration";function gp(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var b=g.match(ip);b&&(r+=b.length);var w=g.lastIndexOf(hp);n=~w?g.length-w:n+g.length}function o(){var g={line:r,column:n};return function(b){return b.position=new s(g),u(),b}}function s(g){this.start=g,this.end={line:r,column:n},this.source=t.source}s.prototype.content=e;function a(g){var b=new Error(t.source+":"+r+":"+n+": "+g);if(b.reason=g,b.filename=t.source,b.line=r,b.column=n,b.source=e,!t.silent)throw b}function c(g){var b=g.exec(e);if(b){var w=b[0];return i(w),e=e.slice(w.length),b}}function u(){c(op)}function d(g){var b;for(g=g||[];b=p();)b!==!1&&g.push(b);return g}function p(){var g=o();if(!(Dc!=e.charAt(0)||Oc!=e.charAt(1))){for(var b=2;tn!=e.charAt(b)&&(Oc!=e.charAt(b)||Dc!=e.charAt(b+1));)++b;if(b+=2,tn===e.charAt(b-1))return a("End of comment missing");var w=e.slice(2,b-2);return n+=2,i(w),e=e.slice(b),n+=2,g({type:dp,comment:w})}}function h(){var g=o(),b=c(sp);if(b){if(p(),!c(ap))return a("property missing ':'");var w=c(lp),S=g({type:fp,property:Ec(b[0].replace(Ac,tn)),value:w?Ec(w[0].replace(Ac,tn)):tn});return c(cp),S}}function f(){var g=[];d(g);for(var b;b=h();)b!==!1&&(g.push(b),d(g));return g}return u(),f()}function Ec(e){return e?e.replace(up,tn):tn}function pp(e,t){let r=null;if(!e||typeof e!="string")return r;const n=gp(e),i=typeof t=="function";return n.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:a}=o;i?t(s,a,o):a&&(r=r||{},r[s]=a)}),r}const vp=/\d/,mp=["-","_","/","."];function bp(e=""){if(!vp.test(e))return e!==e.toLowerCase()}function yp(e){const t=[];let r="",n,i;for(const o of e){const s=mp.includes(o);if(s===!0){t.push(r),r="",n=void 0;continue}const a=bp(o);if(i===!1){if(n===!1&&a===!0){t.push(r),r=o,n=a;continue}if(n===!0&&a===!1&&r.length>1){const c=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=c+o,n=a;continue}}r+=o,n=a,i=s}return t.push(r),t}function Ph(e){return e?yp(e).map(t=>_p(t)).join(""):""}function wp(e){return Sp(Ph(e||""))}function _p(e){return e?e[0].toUpperCase()+e.slice(1):""}function Sp(e){return e?e[0].toLowerCase()+e.slice(1):""}function Qn(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Ph(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[wp(n)]=i}return pp(e,r),t}function xn(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function xp(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}const Cp=xp(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Pp(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Cp(t)}: ${e[t]};`).join(`
5
5
  `)}function Oo(e={}){return Pp(e).replace(`
6
6
  `," ")}const Tp=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Ap=new Set(Tp);function Dp(e){return Ap.has(e)}function q(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const o=t[i],s=n[i],a=typeof o=="function",c=typeof s=="function";if(a&&Dp(i)){const u=o,d=s;t[i]=Ch(u,d)}else if(a&&c)t[i]=xn(o,s);else if(i==="class"){const u=Ls(o),d=Ls(s);u&&d?t[i]=Yi(o,s):u?t[i]=Yi(o):d&&(t[i]=Yi(s))}else if(i==="style"){const u=typeof o=="object",d=typeof s=="object",p=typeof o=="string",h=typeof s=="string";if(u&&d)t[i]={...o,...s};else if(u&&h){const f=Qn(s);t[i]={...o,...f}}else if(p&&d){const f=Qn(o);t[i]={...f,...s}}else if(p&&h){const f=Qn(o),g=Qn(s);t[i]={...f,...g}}else u?t[i]=o:d?t[i]=s:p?t[i]=o:h&&(t[i]=s)}else t[i]=s!==void 0?s:o}for(const i of Object.getOwnPropertySymbols(n)){const o=t[i],s=n[i];t[i]=s!==void 0?s:o}}}return typeof t.style=="object"&&(t.style=Oo(t.style).replaceAll(`
7
- `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Th={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Op=Oo(Th),Ah=typeof window<"u"?window:void 0;function Ep(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}let Ip=class{#t;#e;constructor(t={}){const{window:r=Ah,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=hi(i=>{const o=St(r,"focusin",i),s=St(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?Ep(this.#t):null}};new Ip;function Dh(e){return typeof e=="function"}function Mp(e,t){if(Dh(e)){const n=e();return n===void 0?t:n}return e===void 0?t:e}let Vt=class{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Pu(this.#e)}get(){const t=Xi(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const r=Xi(this.#e);return r===void 0?t:r}set(t){return Cu(this.#e,t)}};function Eo(e,t){let r=E(null);const n=y(()=>Mp(t,250));function i(...o){if(l(r))l(r).timeout&&clearTimeout(l(r).timeout);else{let s,a;const c=new Promise((u,d)=>{s=u,a=d});v(r,{timeout:null,runner:null,promise:c,resolve:s,reject:a},!0)}return l(r).runner=async()=>{if(!l(r))return;const s=l(r);v(r,null);try{s.resolve(await e.apply(this,o))}catch(a){s.reject(a)}},l(r).timeout=setTimeout(l(r).runner,l(n)),l(r).promise}return i.cancel=async()=>{(!l(r)||l(r).timeout===null)&&(await new Promise(o=>setTimeout(o,0)),!l(r)||l(r).timeout===null)||(clearTimeout(l(r).timeout),l(r).reject("Cancelled"),v(r,null))},i.runScheduledNow=async()=>{(!l(r)||!l(r).timeout)&&(await new Promise(o=>setTimeout(o,0)),!l(r)||!l(r).timeout)||(clearTimeout(l(r).timeout),l(r).timeout=null,await l(r).runner?.())},Object.defineProperty(i,"pending",{enumerable:!0,get(){return!!l(r)?.timeout}}),i}function kp(e,t){switch(e){case"post":nt(t);break;case"pre":Ln(t);break}}function Oh(e,t,r,n={}){const{lazy:i=!1}=n;let o=!i,s=Array.isArray(e)?[]:void 0;kp(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!o){o=!0,s=a;return}const c=Et(()=>r(a,s));return s=a,c})}function et(e,t,r){Oh(e,"post",t,r)}function Np(e,t,r){Oh(e,"pre",t,r)}et.pre=Np;function Ic(e){return Dh(e)?e():e}class Fp{#t={width:0,height:0};#e=!1;#r;#n;#i;#o=y(()=>(l(this.#a)?.(),this.getSize().width));#s=y(()=>(l(this.#a)?.(),this.getSize().height));#a=y(()=>{const t=Ic(this.#n);if(t)return hi(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const o of i){const s=this.#r.box==="content-box"?o.contentBoxSize:o.borderBoxSize,a=Array.isArray(s)?s:[s];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}r()});return n.observe(t),()=>{this.#e=!1,n.disconnect()}})});constructor(t,r={box:"border-box"}){this.#i=r.window??Ah,this.#r=r,this.#n=t,this.#t={width:0,height:0}}calculateSize(){const t=Ic(this.#n);if(!t||!this.#i)return;const r=t.offsetWidth,n=t.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(t),o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),s=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=r-o-a,d=n-s-c;return{width:u,height:d}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return l(this.#a)?.(),this.getSize()}get width(){return l(this.#o)}get height(){return l(this.#s)}}class ba{#t=E(!1);constructor(){nt(()=>(Et(()=>v(this.#t,!0)),()=>{v(this.#t,!1)}))}get current(){return l(this.#t)}}class Rp{#t=()=>{};#e=y(()=>this.#t());constructor(t,r){let n;r!==void 0&&(n=r),this.#t=()=>{try{return n}finally{n=t()}}}get current(){return l(this.#e)}}function ur(e){nt(()=>()=>{e()})}function Io(e){nt(()=>Et(()=>e()))}function Eh(e,t){return setTimeout(t,e)}function Br(e){ih().then(e)}const Lp=1,Bp=9,Vp=11;function Bs(e){return vi(e)&&e.nodeType===Lp&&typeof e.nodeName=="string"}function Ih(e){return vi(e)&&e.nodeType===Bp}function Hp(e){return vi(e)&&e.constructor?.name==="VisualViewport"}function Wp(e){return vi(e)&&e.nodeType!==void 0}function Mh(e){return Wp(e)&&e.nodeType===Vp&&"host"in e}function Up(e,t){if(!e||!t||!Bs(e)||!Bs(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Mh(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ya(e){return Ih(e)?e:Hp(e)?e.document:e?.ownerDocument??document}function wa(e){return Mh(e)?wa(e.host):Ih(e)?e.defaultView??window:Bs(e)?e.ownerDocument?.defaultView??window:window}function zp(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Dr{element;#t=y(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return l(this.#t)}set root(t){v(this.#t,t)}constructor(t){typeof t=="function"?this.element=_(t):this.element=t}getDocument=()=>ya(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>zp(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,r)=>this.getWindow().setTimeout(t,r);clearTimeout=t=>this.getWindow().clearTimeout(t)}function rt(e,t){return{[lg()]:r=>mi(e)?(e.current=r,Et(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Et(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function fe(e){return e?"true":"false"}function kh(e){return e?"true":void 0}function pt(e){return e?"":void 0}function Qi(e){return e?!0:void 0}function jr(e){return e?"open":"closed"}function Yp(e){return e?"checked":"unchecked"}function Wn(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}function Nh(e,t){return t?"mixed":e?"true":"false"}class Kp{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(r=>[r,this.getAttr(r)]))}getAttr(t,r){return r?`data-${r}-${t}`:`${this.#e}${t}`}selector(t,r){return`[${this.getAttr(t,r)}]`}}function _e(e){const t=new Kp(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const tr="ArrowDown",bi="ArrowLeft",yi="ArrowRight",Re="ArrowUp",_a="End",lr="Enter",jp="Escape",Sa="Home",Fh="PageDown",Rh="PageUp",Ue=" ",Mc="Tab";function qp(e){return window.getComputedStyle(e).getPropertyValue("direction")}function Xp(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?bi:yi,vertical:tr}[t]}function Gp(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?yi:bi,vertical:Re}[t]}function Zp(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:Xp(e,t),prevKey:Gp(e,t)}}const wi=typeof document<"u",Vs=Jp();function Jp(){return wi&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function wr(e){return e instanceof HTMLElement}function mr(e){return e instanceof Element}function Qp(e){return e instanceof Element||e instanceof SVGElement}function $i(e){return e.pointerType==="touch"}function $p(e){return e.matches(":focus-visible")}function tv(e){return e!==null}class ev{#t;#e=pn(null);constructor(t){this.#t=t}getCandidateNodes(){return this.#t.rootNode.current?this.#t.candidateSelector?Array.from(this.#t.rootNode.current.querySelectorAll(this.#t.candidateSelector)):this.#t.candidateAttr?Array.from(this.#t.rootNode.current.querySelectorAll(`[${this.#t.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,r,n=!1){const i=this.#t.rootNode.current;if(!i||!t)return;const o=this.getCandidateNodes();if(!o.length)return;const s=o.indexOf(t),a=qp(i),{nextKey:c,prevKey:u}=Zp(a,this.#t.orientation.current),d=this.#t.loop.current,p={[c]:s+1,[u]:s-1,[Sa]:0,[_a]:o.length-1};if(n){const g=c===tr?yi:tr,b=u===Re?bi:Re;p[g]=s+1,p[b]=s-1}let h=p[r.key];if(h===void 0)return;r.preventDefault(),h<0&&d?h=o.length-1:h===o.length&&d&&(h=0);const f=o[h];if(f)return f.focus(),this.#e.current=f.id,this.#t.onCandidateFocus?.(f),f}getTabIndex(t){const r=this.getCandidateNodes(),n=this.#e.current!==null;return t&&!n&&r[0]===t?(this.#e.current=t.id,0):t?.id===this.#e.current?0:-1}setCurrentTabStopId(t){this.#e.current=t}focusCurrentTabStop(){const t=this.#e.current;if(!t)return;const r=this.#t.rootNode.current?.querySelector(`#${t}`);!r||!wr(r)||r.focus()}}class Lh{#t;#e=null;#r=null;#n=0;constructor(t){this.#t=t,ur(()=>this.#i())}#i(){this.#e!==null&&(window.cancelAnimationFrame(this.#e),this.#e=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(t){this.#i();const r=this.#t.ref.current;if(!r)return;if(typeof r.getAnimations!="function"){this.#o(t);return}const n=this.#n,i=()=>{n===this.#n&&this.#o(t)},o=()=>{if(n!==this.#n)return;const a=r.getAnimations();if(a.length===0){i();return}Promise.all(a.map(c=>c.finished)).then(()=>{i()}).catch(()=>{if(n!==this.#n)return;if(r.getAnimations().some(d=>d.pending||d.playState!=="finished")){o();return}i()})},s=()=>{this.#e=window.requestAnimationFrame(()=>{this.#e=null,o()})};if(!this.#t.afterTick.current){s();return}this.#e=window.requestAnimationFrame(()=>{this.#e=null;const a="data-starting-style";if(!r.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{n===this.#n&&(r.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(r,{attributes:!0,attributeFilter:[a]})})}#o(t){const r=()=>{t()};this.#t.afterTick?Br(r):r()}}class cn{#t;#e;#r;#n=E(!1);#i=E(void 0);#o=!1;#s=null;constructor(t){this.#t=t,v(this.#n,t.open.current,!0),this.#e=t.enabled??!0,this.#r=new Lh({ref:this.#t.ref,afterTick:this.#t.open}),ur(()=>this.#a()),et(()=>this.#t.open.current,r=>{if(!this.#o){this.#o=!0;return}if(this.#a(),!r&&this.#t.shouldSkipExitAnimation?.()){v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.();return}if(r&&v(this.#n,!0),v(this.#i,r?"starting":"ending",!0),r&&(this.#s=window.requestAnimationFrame(()=>{this.#s=null,this.#t.open.current&&v(this.#i,void 0)})),!this.#e){r||v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.();return}this.#r.run(()=>{r===this.#t.open.current&&(this.#t.open.current||v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.())})})}get shouldRender(){return l(this.#n)}get transitionStatus(){return l(this.#i)}#a(){this.#s!==null&&(window.cancelAnimationFrame(this.#s),this.#s=null)}}function st(){}function lt(e,t){return`bits-${e}`}const rv=_e({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),un=new Vt("Dialog.Root | AlertDialog.Root");class xa{static create(t){const r=un.getOr(null);return un.set(new xa(t,r))}opts;#t=E(null);get triggerNode(){return l(this.#t)}set triggerNode(t){v(this.#t,t,!0)}#e=E(null);get contentNode(){return l(this.#e)}set contentNode(t){v(this.#e,t,!0)}#r=E(null);get overlayNode(){return l(this.#r)}set overlayNode(t){v(this.#r,t,!0)}#n=E(null);get descriptionNode(){return l(this.#n)}set descriptionNode(t){v(this.#n,t,!0)}#i=E(void 0);get contentId(){return l(this.#i)}set contentId(t){v(this.#i,t,!0)}#o=E(void 0);get titleId(){return l(this.#o)}set titleId(t){v(this.#o,t,!0)}#s=E(void 0);get triggerId(){return l(this.#s)}set triggerId(t){v(this.#s,t,!0)}#a=E(void 0);get descriptionId(){return l(this.#a)}set descriptionId(t){v(this.#a,t,!0)}#l=E(null);get cancelNode(){return l(this.#l)}set cancelNode(t){v(this.#l,t,!0)}#c=E(0);get nestedOpenCount(){return l(this.#c)}set nestedOpenCount(t){v(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,r){this.opts=t,this.parent=r,this.depth=r?r.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new cn({ref:_(()=>this.overlayNode),open:this.opts.open,enabled:!0}),et(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),ur(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>rv.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=y(()=>({"data-state":jr(this.opts.open.current)}));get sharedProps(){return l(this.#u)}set sharedProps(t){v(this.#u,t)}}class Ca{static create(t){return new Ca(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Ue||t.key===lr)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Pa{static create(t){return new Pa(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.root.titleId=this.opts.id.current,this.attachment=rt(this.opts.ref),et.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ta{static create(t){return new Ta(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.root.descriptionId=this.opts.id.current,this.attachment=rt(this.opts.ref,n=>{this.root.descriptionNode=n}),et.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Aa{static create(t){return new Aa(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":pt(this.root.nestedOpenCount>0),"data-nested":pt(this.root.parent!==null),...Wn(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class Da{static create(t){return new Da(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.overlayNode=n)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":pt(this.root.nestedOpenCount>0),"data-nested":pt(this.root.parent!==null),...Wn(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}var nv=W("<div><!></div>");function l1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"level",3,2),s=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=Pa.create({id:_(()=>n()),level:_(()=>o()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=nv();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}function iv(e,t){var r=A(),n=P(r);Cg(n,()=>t.children,i=>{var o=A(),s=P(o);M(s,()=>t.children??L),x(i,o)}),x(e,r)}const ov=new Vt("BitsConfig");function sv(){const e=new av(null,{});return ov.getOr(e).opts}class av{opts;constructor(t,r){const n=lv(t,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function lv(e,t){return r=>_(()=>{const i=r(t)?.current;if(i!==void 0)return i;if(e!==null)return r(e.opts)?.current})}function Bh(e,t){return r=>{const n=sv();return _(()=>{const i=r();if(i!==void 0)return i;const o=e(n).current;return o!==void 0?o:t})}}const cv=Bh(e=>e.defaultLocale,"en"),uv=Bh(e=>e.defaultPortalTo,"body");function c1(e,t){B(t,!0);const r=uv(()=>t.to),n=Rf();let i=y(o);function o(){if(!wi||t.disabled)return null;let p=null;return typeof r.current=="string"?p=document.querySelector(r.current):p=r.current,p}let s;function a(){s&&(dh(s),s=null)}et([()=>l(i),()=>t.disabled],([p,h])=>{if(!p||h){a();return}return s=ga(iv,{target:p,props:{children:t.children},context:n}),()=>{a()}});var c=A(),u=P(c);{var d=p=>{var h=A(),f=P(h);M(f,()=>t.children??L),x(p,h)};N(u,p=>{t.disabled&&p(d)})}x(e,c),V()}function kc(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function Vh(e,t){return e===t||e.contains(t)}function Hh(e){return e?.ownerDocument??document}function hv(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var Wh=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],to=Wh.join(","),Uh=typeof Element>"u",hn=Uh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,eo=!Uh&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ro=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",s=o||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ro(t.parentNode));return s},dv=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},zh=function(t,r,n){if(ro(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(to));return r&&hn.call(t,to)&&i.unshift(t),i=i.filter(n),i},no=function(t,r,n){for(var i=[],o=Array.from(t);o.length;){var s=o.shift();if(!ro(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),c=a.length?a:s.children,u=no(c,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:s,candidates:u})}else{var d=hn.call(s,to);d&&n.filter(s)&&(r||!t.includes(s))&&i.push(s);var p=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),h=!ro(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(p&&h){var f=no(p===!0?s.children:p.children,!0,n);n.flatten?i.push.apply(i,f):i.push({scopeParent:s,candidates:f})}else o.unshift.apply(o,s.children)}}return i},Yh=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Kh=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||dv(t))&&!Yh(t)?0:t.tabIndex},fv=function(t,r){var n=Kh(t);return n<0&&r&&!Yh(t)?0:n},gv=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},jh=function(t){return t.tagName==="INPUT"},pv=function(t){return jh(t)&&t.type==="hidden"},vv=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},mv=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},bv=function(t){if(!t.name)return!0;var r=t.form||eo(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=mv(i,t.form);return!o||o===t},yv=function(t){return jh(t)&&t.type==="radio"},wv=function(t){return yv(t)&&!bv(t)},_v=function(t){var r,n=t&&eo(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var s,a,c;for(o=!!((s=i)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var u,d,p;n=eo(i),i=(u=n)===null||u===void 0?void 0:u.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},Nc=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},Sv=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var s=hn.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(hn.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,d=eo(t);if(u&&!u.shadowRoot&&i(u)===!0)return Nc(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=c}if(_v(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Nc(t);return!1},xv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return hn.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},io=function(t,r){return!(r.disabled||pv(r)||Sv(r,t)||vv(r)||xv(r))},Hs=function(t,r){return!(wv(r)||Kh(r)<0||!io(t,r))},Cv=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},qh=function(t){var r=[],n=[];return t.forEach(function(i,o){var s=!!i.scopeParent,a=s?i.scopeParent:i,c=fv(a,s),u=s?qh(i.candidates):a;c===0?s?r.push.apply(r,u):r.push(a):n.push({documentOrder:o,tabIndex:c,item:i,isScope:s,content:u})}),n.sort(gv).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Pv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=no([t],r.includeContainer,{filter:Hs.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Cv}):n=zh(t,r.includeContainer,Hs.bind(null,r)),qh(n)},Tv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=no([t],r.includeContainer,{filter:io.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=zh(t,r.includeContainer,io.bind(null,r)),n},Av=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return hn.call(t,to)===!1?!1:Hs(r,t)},Dv=Wh.concat("iframe:not([inert]):not([inert] *)").join(","),Ov=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return hn.call(t,Dv)===!1?!1:io(r,t)};function Ev(e,t){const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function ns(e,t){return e>=0&&e<t.length}function Iv(e,t,r=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?r?e[0]:void 0:e[t+1]}function Mv(e,t,r=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?r?e[e.length-1]:void 0:e[t-1]}function kv(e,t,r,n=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+r;return n?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function Nv(e,t,r,n=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-r;return n?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function Oa(e,t,r){const n=t.toLowerCase();if(n.endsWith(" ")){const p=n.slice(0,-1);if(e.filter(b=>b.toLowerCase().startsWith(p)).length<=1)return Oa(e,p,r);const f=r?.toLowerCase();if(f&&f.startsWith(p)&&f.charAt(p.length)===" "&&t.trim()===p)return r;const g=e.filter(b=>b.toLowerCase().startsWith(n));if(g.length>0){const b=r?e.indexOf(r):-1;return Fc(g,Math.max(b,0)).find(C=>C!==r)||r}}const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=o.toLowerCase(),a=r?e.indexOf(r):-1;let c=Fc(e,Math.max(a,0));o.length===1&&(c=c.filter(p=>p!==r));const d=c.find(p=>p?.toLowerCase().startsWith(s));return d!==r?d:void 0}function Fc(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const Fv={afterMs:1e4,onChange:st};function Xh(e,t){const{afterMs:r,onChange:n,getWindow:i}={...Fv,...t};let o=null,s=E(Zt(e));function a(){return i().setTimeout(()=>{v(s,e,!0),n?.(e)},r)}return nt(()=>()=>{o&&i().clearTimeout(o)}),_(()=>l(s),c=>{v(s,c,!0),n?.(c),o&&i().clearTimeout(o),o=a()})}class Rv{#t;#e;#r=y(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#n=y(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=Xh("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,r){if(!r.length)return;this.#e.current=this.#e.current+t;const n=l(this.#n)(),i=r.find(c=>c===n)?.textContent?.trim()??"",o=r.map(c=>c.textContent?.trim()??""),s=Oa(o,this.#e.current,i),a=r.find(c=>c.textContent?.trim()===s);return a&&l(this.#r)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}const Lv="data-context-menu-trigger",Bv="data-context-menu-content";_e({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;class Ea{static create(t){return new Ea(t)}opts;#t;#e;#r={pointerdown:!1};#n=!1;#i=!1;#o=void 0;#s;#a=st;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#s=t.onFocusOutside,nt(()=>{this.#o=Hh(this.opts.ref.current)});let r=st;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#h.destroy(),r()};et([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Eh(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),r(),r=this.#c())}),n}),ur(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#h.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Br(()=>{!this.opts.ref.current||this.#p(t.target)||t.target&&!this.#i&&this.#s.current?.(t)})};#c(){return xn(St(this.#o,"pointerdown",xn(this.#f,this.#d),{capture:!0}),St(this.#o,"pointerdown",xn(this.#g,this.#h)),St(this.#o,"focusin",this.#l))}#u=t=>{let r=t;r.defaultPrevented&&(r=Rc(t)),this.#t.current(t)};#h=kc(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||Wv(t,this.opts.ref.current);if(!this.#n||this.#m()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=Rc(n)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=St(this.#o,"click",this.#u,{once:!0})):this.#t.current(n)},10);#f=t=>{this.#r[t.type]=!0};#g=t=>{this.#r[t.type]=!1};#d=()=>{this.opts.ref.current&&(this.#n=Hv(this.opts.ref.current))};#p=t=>this.opts.ref.current?Vh(this.opts.ref.current,t):!1;#v=kc(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#m(){return Object.values(this.#r).some(Boolean)}#b=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#b,onblurcapture:this.#y}}function Vv(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function Hv(e){const t=[...globalThis.bitsDismissableLayers],r=Vv(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function Wv(e,t){const r=e.target;if(!Qp(r))return!1;const n=!!r.closest(`[${Lv}]`),i=!!t.closest(`[${Bv}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Hh(r).documentElement.contains(r)&&!Vh(t,r)&&hv(e,t)}function Rc(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function Gh(e,t){B(t,!0);let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"onInteractOutside",3,st),i=m(t,"onFocusOutside",3,st),o=m(t,"isValidEvent",3,()=>!1);const s=Ea.create({id:_(()=>t.id),interactOutsideBehavior:_(()=>r()),onInteractOutside:_(()=>n()),enabled:_(()=>t.enabled),onFocusOutside:_(()=>i()),isValidEvent:_(()=>o()),ref:t.ref});var a=A(),c=P(a);M(c,()=>t.children??L,()=>({props:s.props})),x(e,a),V()}globalThis.bitsEscapeLayers??=new Map;class Ia{static create(t){return new Ia(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Dr(this.opts.ref);let r=st;et(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#t()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>St(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==jp||!Uv(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function Uv(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:o}])=>o==="close"||o==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function Zh(e,t){B(t,!0);let r=m(t,"escapeKeydownBehavior",3,"close"),n=m(t,"onEscapeKeydown",3,st);Ia.create({escapeKeydownBehavior:_(()=>r()),onEscapeKeydown:_(()=>n()),enabled:_(()=>t.enabled),ref:t.ref});var i=A(),o=P(i);M(o,()=>t.children??L),x(e,i),V()}class Ma{static instance;#t=le([]);#e=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Ma),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#t.current=this.#t.current.filter(i=>i!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,r){this.#e.set(t,r)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}}class ka{#t=!1;#e=null;#r=Ma.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#r.register(this),this.#l(),this.#s()}unmount(){this.#e&&(this.#o(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#e=null)}#s(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const r=this.#u();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#e.focus()})}#a(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#e||!this.#i.trap.current)return;const t=this.#e,r=t.ownerDocument,n=s=>{if(this.#t||!this.#r.isActiveScope(this))return;const a=s.target;if(!a)return;if(t.contains(a))this.#r.setFocusMemory(this,a);else{const u=this.#r.getFocusMemory(this);if(u&&t.contains(u)&&Ov(u))s.preventDefault(),u.focus();else{const d=this.#u(),p=this.#h()[0];(d||p||t).focus()}}},i=s=>{if(!this.#i.loop||this.#t||s.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#c();if(a.length===0)return;const c=a[0],u=a[a.length-1];!s.shiftKey&&r.activeElement===u?(s.preventDefault(),c.focus()):s.shiftKey&&r.activeElement===c&&(s.preventDefault(),u.focus())};this.#n.push(St(r,"focusin",n,{capture:!0}),St(t,"keydown",i));const o=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!t.contains(s)){const a=this.#u(),c=this.#h()[0],u=a||c;u?(u.focus(),this.#r.setFocusMemory(this,u)):t.focus()}});o.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>o.disconnect())}#c(){return this.#e?Pv(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#c()[0]||null}#h(){return this.#e?Tv(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return et([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new ka(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ur(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function Jh(e,t){B(t,!0);let r=m(t,"enabled",3,!1),n=m(t,"trapFocus",3,!1),i=m(t,"loop",3,!1),o=m(t,"onCloseAutoFocus",3,st),s=m(t,"onOpenAutoFocus",3,st);const a=ka.use({enabled:_(()=>r()),trap:_(()=>n()),loop:i(),onCloseAutoFocus:_(()=>o()),onOpenAutoFocus:_(()=>s()),ref:t.ref});var c=A(),u=P(c);M(u,()=>t.focusScope??L,()=>({props:a.props})),x(e,c),V()}globalThis.bitsTextSelectionLayers??=new Map;class Na{static create(t){return new Na(t)}opts;domContext;#t=st;constructor(t){this.opts=t,this.domContext=new Dr(t.ref);let r=st;et(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#e()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return xn(St(this.domContext.getDocument(),"pointerdown",this.#r),St(this.domContext.getDocument(),"pointerup",Ch(this.#n,this.opts.onPointerUp.current)))}#r=t=>{const r=this.opts.ref.current,n=t.target;!wr(r)||!wr(n)||!this.opts.enabled.current||!Yv(this)||!Up(r,n)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=zv(r,this.domContext.getDocument().body)))};#n=()=>{this.#t(),this.#t=st}}const Lc=e=>e.style.userSelect||e.style.webkitUserSelect;function zv(e,t){const r=Lc(t),n=Lc(e);return Ni(t,"none"),Ni(e,"text"),()=>{Ni(t,r),Ni(e,n)}}function Ni(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Yv(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Qh(e,t){B(t,!0);let r=m(t,"preventOverflowTextSelection",3,!0),n=m(t,"onPointerDown",3,st),i=m(t,"onPointerUp",3,st);Na.create({id:_(()=>t.id),onPointerDown:_(()=>n()),onPointerUp:_(()=>i()),enabled:_(()=>t.enabled&&r()),ref:t.ref});var o=A(),s=P(o);M(s,()=>t.children??L),x(e,o),V()}globalThis.bitsIdCounter??={current:0};function qr(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class Kv{#t;#e=0;#r=E();#n;constructor(t){this.#t=t}#i(){this.#e-=1,this.#n&&this.#e<=0&&(this.#n(),v(this.#r,void 0),this.#n=void 0)}get(...t){return this.#e+=1,l(this.#r)===void 0&&(this.#n=eg(()=>{v(this.#r,this.#t(...t),!0)})),nt(()=>()=>{this.#i()}),l(this.#r)}}const ji=new Rs;let Fi=E(null),is=null,qn=null,Xn=!1;const Bc=_(()=>{for(const e of ji.values())if(e)return!0;return!1});let os=null;const jv=new Kv(()=>{function e(){document.body.setAttribute("style",l(Fi)??""),document.body.style.removeProperty("--scrollbar-width"),Vs&&is?.(),v(Fi,null)}function t(){qn!==null&&(window.clearTimeout(qn),qn=null)}function r(i,o){t(),Xn=!0,os=Date.now();const s=os,a=()=>{qn=null,os===s&&($h(ji)?Xn=!1:(Xn=!1,o()))},c=i===null?24:i;qn=window.setTimeout(a,c)}function n(){l(Fi)===null&&ji.size===0&&!Xn&&v(Fi,document.body.getAttribute("style"),!0)}return et(()=>Bc.current,()=>{if(!Bc.current)return;n(),Xn=!1;const i=getComputedStyle(document.documentElement),o=getComputedStyle(document.body),s=i.scrollbarGutter?.includes("stable")||o.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(o.paddingRight??"0",10)+a,margin:Number.parseInt(o.marginRight??"0",10)};a>0&&!s&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",Vs&&(is=St(document,"touchmove",d=>{d.target===document.documentElement&&(d.touches.length>1||d.preventDefault())},{passive:!1})),Br(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ur(()=>()=>{is?.()}),{get lockMap(){return ji},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}});class qv{#t=qr();#e;#r=()=>null;#n;locked;constructor(t,r=()=>null){this.#e=t,this.#r=r,this.#n=jv.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#t,this.#e??!1),this.locked=_(()=>this.#n.lockMap.get(this.#t)??!1,n=>this.#n.lockMap.set(this.#t,n)),ur(()=>{if(this.#n.lockMap.delete(this.#t),$h(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function $h(e){for(const[t,r]of e)if(r)return!0;return!1}function oo(e,t){B(t,!0);let r=m(t,"preventScroll",3,!0),n=m(t,"restoreScrollDelay",3,null);r()&&new qv(r(),()=>n()),V()}var Xv=W("<div><!></div>");function u1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"forceMount",3,!1),o=m(t,"ref",15,null),s=G(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=Da.create({id:_(()=>n()),ref:_(()=>o(),h=>o(h))}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=A(),g=P(f);{var b=S=>{var C=A(),T=P(C);{let D=y(()=>({props:q(l(c)),...a.snippetProps}));M(T,()=>t.child,()=>l(D))}x(S,C)},w=S=>{var C=Xv();J(C,D=>({...D}),[()=>q(l(c))]);var T=Y(C);M(T,()=>t.children??L,()=>a.snippetProps),U(C),x(S,C)};N(g,S=>{t.child?S(b):S(w,-1)})}x(h,f)};N(d,h=>{(a.shouldRender||i())&&h(p)})}x(e,u),V()}var Gv=W("<div><!></div>");function h1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const s=Ta.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=Gv();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}function ss(e,t){return e-t*Math.floor(e/t)}const td=1721426;function Ri(e,t,r,n){t=Fa(e,t);let i=t-1,o=-2;return r<=2?o=0:qi(t)&&(o=-1),td-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+o+n)}function qi(e){return e%4===0&&(e%100!==0||e%400===0)}function Fa(e,t){return e==="BC"?1-t:t}function Zv(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const Jv={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Mn{fromJulianDay(t){let r=t,n=r-td,i=Math.floor(n/146097),o=ss(n,146097),s=Math.floor(o/36524),a=ss(o,36524),c=Math.floor(a/1461),u=ss(a,1461),d=Math.floor(u/365),p=i*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[h,f]=Zv(p),g=r-Ri(h,f,1,1),b=2;r<Ri(h,f,3,1)?b=0:qi(f)&&(b=1);let w=Math.floor(((g+b)*12+373)/367),S=r-Ri(h,f,w,1)+1;return new Wr(h,f,w,S)}toJulianDay(t){return Ri(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return Jv[qi(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return qi(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const Qv={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function kr(e,t){return t=me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Mo(e,t){return t=me(t,e.calendar),e=Ws(e),t=Ws(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function d1(e,t){return ed(e.calendar,t.calendar)&&Mo(e,t)}function ed(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function $v(e,t){return kr(e,em(t))}function rd(e,t,r){let n=e.calendar.toJulianDay(e),i=sm(t),o=Math.ceil(n+1-i)%7;return o<0&&(o+=7),o}function tm(e){return er(Date.now(),e)}function em(e){return cm(tm(e))}function nd(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function rm(e,t){return Vc(e)-Vc(t)}function Vc(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let as=null,nm=!1;function Fr(){return as==null&&(as=new Intl.DateTimeFormat().resolvedOptions().timeZone),as}function id(){return nm}function Ws(e){return e.subtract({days:e.day-1})}function im(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}const Hc=new Map,ls=new Map;function om(e){if(Intl.Locale){let r=Hc.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Hc.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function sm(e){let t=ls.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return ls.set(e,t),t.firstDay}let r=om(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&Qv[r]||0};ls.set(e,t)}return t.firstDay}function Vr(e){e=me(e,new Mn);let t=Fa(e.era,e.year);return od(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function od(e,t,r,n,i,o,s){let a=new Date;return a.setUTCHours(n,i,o,s),a.setUTCFullYear(e,t-1,r),a.getTime()}function ni(e,t){if(t==="UTC")return 0;if(e>0&&t===Fr()&&!id())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:o,minute:s,second:a}=sd(e,t);return od(r,n,i,o,s,a,0)-Math.floor(e/1e3)*1e3}const Wc=new Map;function sd(e,t){let r=Wc.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Wc.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let o of n)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const so=864e5;function am(e,t){let r=Vr(e),n=r-ni(r-so,t),i=r-ni(r+so,t);return ad(e,t,n,i)}function ad(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>lm(e,t,o))}function lm(e,t,r){let n=sd(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Qe(e,t,r="compatible"){let n=Hr(e);if(t==="UTC")return Vr(n);if(t===Fr()&&r==="compatible"&&!id()){n=me(n,new Mn);let c=new Date,u=Fa(n.era,n.year);return c.setFullYear(u,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let i=Vr(n),o=ni(i-so,t),s=ni(i+so,t),a=ad(n,t,i-o,i-s);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function ld(e,t,r="compatible"){return new Date(Qe(e,t,r))}function er(e,t){let r=ni(e,t),n=new Date(e+r),i=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),a=n.getUTCHours(),c=n.getUTCMinutes(),u=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new cr(i<1?"BC":"AD",i<1?-i+1:i,o,s,t,r,a,c,u,d)}function cm(e){return new Wr(e.calendar,e.era,e.year,e.month,e.day)}function Hr(e,t){let r=0,n=0,i=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:o}=t),new xr(e.calendar,e.era,e.year,e.month,e.day,r,n,i,o)}function me(e,t){if(ed(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,dn(n),n}function um(e,t,r){if(e instanceof cr)return e.timeZone===t?e:dm(e,t);let n=Qe(e,t,r);return er(n,t)}function hm(e){let t=Vr(e)-e.offset;return new Date(t)}function dm(e,t){let r=Vr(e)-e.offset;return me(er(r,t),e.calendar)}const Gn=36e5;function ko(e,t){let r=e.copy(),n="hour"in r?vm(r,t):0;Us(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,zs(r),cd(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,fm(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function Us(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function zs(e){for(;e.month<1;)Us(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Us(e,1)}function fm(e){for(;e.day<1;)e.month--,zs(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zs(e)}function cd(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function dn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),cd(e)}function ud(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function hd(e,t){return ko(e,ud(t))}function Ra(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),dn(r),r}function ao(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),pm(r),r}function gm(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Li(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Li(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Li(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Li(e.hour,24),t}function pm(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Li(e,t){let r=e%t;return r<0&&(r+=t),r}function vm(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,gm(e)}function La(e,t,r,n){let i=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),s=o.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=br(s,r,0,o.length-1,n?.round),i.era=o[s],dn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=br(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=br(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=br(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),dn(i),i}function dd(e,t,r,n){let i=e.copy();switch(t){case"hour":{let o=e.hour,s=0,a=23;if(n?.hourCycle===12){let c=o>=12;s=c?12:0,a=c?23:11}i.hour=br(o,r,s,a,n?.round);break}case"minute":i.minute=br(e.minute,r,0,59,n?.round);break;case"second":i.second=br(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=br(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function br(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function fd(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=ko(Hr(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=Qe(i,e.timeZone)}else r=Vr(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=er(r,e.timeZone);return me(n,e.calendar)}function mm(e,t){return fd(e,ud(t))}function bm(e,t,r,n){switch(t){case"hour":{let i=0,o=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,o=g?23:11}let s=Hr(e),a=me(ao(s,{hour:i}),new Mn),c=[Qe(a,e.timeZone,"earlier"),Qe(a,e.timeZone,"later")].filter(g=>er(g,e.timeZone).day===a.day)[0],u=me(ao(s,{hour:o}),new Mn),d=[Qe(u,e.timeZone,"earlier"),Qe(u,e.timeZone,"later")].filter(g=>er(g,e.timeZone).day===u.day).pop(),p=Vr(e)-e.offset,h=Math.floor(p/Gn),f=p%Gn;return p=br(h,r,Math.floor(c/Gn),Math.floor(d/Gn),n?.round)*Gn+f,me(er(p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return dd(e,t,r,n);case"era":case"year":case"month":case"day":{let i=La(Hr(e),t,r,n),o=Qe(i,e.timeZone);return me(er(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function ym(e,t,r){let n=Hr(e),i=ao(Ra(n,t),t);if(i.compare(n)===0)return e;let o=Qe(i,e.timeZone,r);return me(er(o,e.timeZone),e.calendar)}const wm=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,_m=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Sm=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,gd=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function pd(e){let t=e.match(wm);if(!t)throw gd.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Wr(jt(t[1],0,9999),jt(t[2],1,12),1);return r.day=jt(t[3],1,r.calendar.getDaysInMonth(r)),r}function vd(e){let t=e.match(_m);if(!t)throw gd.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=jt(t[1],-9999,9999),n=r<1?"BC":"AD",i=new xr(n,r<1?-r+1:r,jt(t[2],1,12),1,t[4]?jt(t[4],0,23):0,t[5]?jt(t[5],0,59):0,t[6]?jt(t[6],0,59):0,t[7]?jt(t[7],0,1/0)*1e3:0);return i.day=jt(t[3],0,i.calendar.getDaysInMonth(i)),i}function md(e,t){let r=e.match(Sm);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=jt(r[1],-9999,9999),i=n<1?"BC":"AD",o=new cr(i,n<1?-n+1:n,jt(r[2],1,12),1,r[11],0,r[4]?jt(r[4],0,23):0,r[5]?jt(r[5],0,59):0,r[6]?jt(r[6],0,59):0,r[7]?jt(r[7],0,1/0)*1e3:0);o.day=jt(r[3],0,o.calendar.getDaysInMonth(o));let s=Hr(o),a;if(r[8]){let c=jt(r[8],-23,23);if(o.offset=Math.sign(c)*(Math.abs(c)*36e5+jt(r[9]??"0",0,59)*6e4+jt(r[10]??"0",0,59)*1e3),a=Vr(o)-o.offset,!am(s,o.timeZone).includes(a))throw new Error(`Offset ${yd(o.offset)} is invalid for ${Ba(o)} in ${o.timeZone}`)}else a=Qe(Hr(s),o.timeZone,t);return er(a,o.timeZone)}function jt(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function xm(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bd(e){let t=me(e,new Mn),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Ba(e){return`${bd(e)}T${xm(e)}`}function yd(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(o+=`:${String(i).padStart(2,"0")}`),o}function Cm(e){return`${Ba(e)}${yd(e.offset)}[${e.timeZone}]`}function Va(e){let t=typeof e[0]=="object"?e.shift():new Mn,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),o=e.shift();return[t,r,n,i,o]}class Wr{#t;constructor(...t){let[r,n,i,o,s]=Va(t);this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,dn(this)}copy(){return this.era?new Wr(this.calendar,this.era,this.year,this.month,this.day):new Wr(this.calendar,this.year,this.month,this.day)}add(t){return ko(this,t)}subtract(t){return hd(this,t)}set(t){return Ra(this,t)}cycle(t,r,n){return La(this,t,r,n)}toDate(t){return ld(this,t)}toString(){return bd(this)}compare(t){return nd(this,t)}}class xr{#t;constructor(...t){let[r,n,i,o,s]=Va(t);this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,dn(this)}copy(){return this.era?new xr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new xr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ko(this,t)}subtract(t){return hd(this,t)}set(t){return Ra(ao(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return La(this,t,r,n);default:return dd(this,t,r,n)}}toDate(t,r){return ld(this,t,r)}toString(){return Ba(this)}compare(t){let r=nd(this,t);return r===0?rm(this,Hr(t)):r}}class cr{#t;constructor(...t){let[r,n,i,o,s]=Va(t),a=t.shift(),c=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,this.timeZone=a,this.offset=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,dn(this)}copy(){return this.era?new cr(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new cr(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return fd(this,t)}subtract(t){return mm(this,t)}set(t,r){return ym(this,t,r)}cycle(t,r,n){return bm(this,t,r,n)}toDate(){return hm(this)}toString(){return Cm(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-um(t,this.timeZone).toDate().getTime()}}let cs=new Map;class Ze{constructor(t,r={}){this.formatter=wd(t,r),this.options=r}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),i=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Am()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Dm(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const Pm={true:{ja:"h11"},false:{}};function wd(e,t={}){if(typeof t.hour12=="boolean"&&Tm()){t={...t};let i=Pm[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=i??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(cs.has(r))return cs.get(r);let n=new Intl.DateTimeFormat(e,t);return cs.set(r,n),n}let us=null;function Tm(){return us==null&&(us=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),us}let hs=null;function Am(){return hs==null&&(hs=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),hs}function Dm(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=wd(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function Om(e){if(!wi||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const o=e.createElement("div");return o.role="log",o.ariaLive=i,o.setAttribute("aria-relevant","additions"),o};if(!wr(t)){const i=e.createElement("div");i.style.cssText=Op,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!wr(t))return null;const o=t.querySelector(`[aria-live="${i}"]`);return wr(o)?o:null}}}function Uc(e){const t=Om(e);function r(n,i="assertive",o=7500){if(!t||!wi||!e)return;const s=t.getLog(i),a=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?s?.replaceChildren(a):s?.appendChild(a),setTimeout(()=>{a.remove()},o)}return{announce:r}}const Em={defaultValue:void 0,granularity:"day"};function Im(e){const t={...Em,...e},{defaultValue:r,granularity:n,minValue:i,maxValue:o}=t;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let s=new Date;i&&s<i.toDate(Fr())?s=i.toDate(Fr()):o&&s>o.toDate(Fr())&&(s=o.toDate(Fr()));const a=s.getFullYear(),c=s.getMonth()+1,u=s.getDate();return["hour","minute","second"].includes(n??"day")?new xr(a,c,u,0,0,0):new Wr(a,c,u)}}function _d(e,t){let r;return t instanceof cr?r=md(e):t instanceof xr?r=vd(e):r=pd(e),r.calendar!==t.calendar?me(r,t.calendar):r}function Ve(e,t=Fr()){return e instanceof cr?e.toDate():e.toDate(t)}function Mm(e){if(e instanceof Wr)return"date";if(e instanceof xr)return"datetime";if(e instanceof cr)return"zoneddatetime";throw new Error("Unknown date type")}function km(e,t){switch(t){case"date":return pd(e);case"datetime":return vd(e);case"zoneddatetime":return md(e);default:throw new Error(`Unknown date type: ${t}`)}}function Nm(e){return e instanceof xr}function Sd(e){return e instanceof cr}function Ys(e){return Nm(e)||Sd(e)}function Fm(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function ii(e,t){return e.compare(t)<0}function Rm(e,t){return e.compare(t)>0}function zc(e,t,r){const n=rd(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function Yc(e,t,r){const n=rd(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}const Lm={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Bm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new Ze(t,g).format(f)}function o(f,g=!0){return Ys(f)&&g?i(Ve(f),{dateStyle:"long",timeStyle:"long"}):i(Ve(f),{dateStyle:"long"})}function s(f){if(typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function")return new Ze(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f);const g=typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new Ze(t,{month:e.monthFormat.current}).format(f),b=typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new Ze(t,{year:e.yearFormat.current}).format(f);return`${g} ${b}`}function a(f){return new Ze(t,{month:"long"}).format(f)}function c(f){return new Ze(t,{year:"numeric"}).format(f)}function u(f,g){return Sd(f)?new Ze(t,{...g,timeZone:f.timeZone}).formatToParts(Ve(f)):new Ze(t,g).formatToParts(Ve(f))}function d(f,g="narrow"){return new Ze(t,{weekday:g}).format(f)}function p(f,g=void 0){return new Ze(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(S=>S.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,b={}){const w={...Lm,...b},C=u(f,w).find(T=>T.type===g);return C?C.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:c,fullMonthAndYear:s,toParts:u,custom:i,part:h,dayPeriod:p,selectedDate:o,dayOfWeek:d}}function Vm(e){return!(!wr(e)||!e.hasAttribute("data-bits-day"))}function Kc(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function ds(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,o=Fm(t),s=Array.from({length:o},(w,S)=>t.set({day:S+1})),a=Ws(t),c=im(t),u=r!==void 0?zc(a,r,"en-US"):zc(a,0,i),d=r!==void 0?Yc(c,r,"en-US"):Yc(c,0,i),p=Kc(u.subtract({days:1}),a),h=Kc(c,d.add({days:1})),f=p.length+s.length+h.length;if(n&&f<42){const w=42-f;let S=h[h.length-1];S||(S=t.add({months:1}).set({day:1}));let C=w;h.length===0&&(C=w-1,h.push(S));const T=Array.from({length:C},(D,k)=>{const O=k+1;return S.add({days:O})});h.push(...T)}const g=p.concat(s,h),b=Ev(g,7);return{value:t,dates:g,weeks:b}}function _i(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(ds({...n,dateObj:r})),i;i.push(ds({...n,dateObj:r}));for(let o=1;o<t;o++){const s=r.add({months:o});i.push(ds({...n,dateObj:s}))}return i}function fs(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>wr(r)):[]}function jc(e,t){const r=e.getAttribute("data-value");r&&(t.current=_d(r,t.current))}function Hm({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:o,months:s,numberOfMonths:a}){const c=fs(n);if(!c.length)return;const d=c.indexOf(e)+t;if(ns(d,c)){const p=c[d];return jc(p,r),p.focus()}if(d<0){if(i)return;const p=s[0]?.value;if(!p)return;r.current=p.subtract({months:a}),Br(()=>{const h=fs(n);if(!h.length)return;const f=h.length-Math.abs(d);if(ns(f,h)){const g=h[f];return jc(g,r),g.focus()}})}if(d>=c.length){if(o)return;const p=s[0]?.value;if(!p)return;r.current=p.add({months:a}),Br(()=>{const h=fs(n);if(!h.length)return;const f=d-c.length;if(ns(f,h))return h[f].focus()})}}const qc=[tr,Re,bi,yi],Xc=[lr,Ue];function Wm({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!Vm(i)||!qc.includes(e.key)&&!Xc.includes(e.key))return;e.preventDefault();const o={[tr]:7,[Re]:-7,[bi]:-1,[yi]:1};if(qc.includes(e.key)){const s=o[e.key];s!==void 0&&r(i,s)}if(Xc.includes(e.key)){const s=i.getAttribute("data-value");if(!s)return;t(e,_d(s,n))}}function Um({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:o,fixedWeeks:s,setPlaceholder:a}){const c=e[0]?.value;if(c)if(n)a(c.add({months:r}));else{const u=c.add({months:1}),d=_i({dateObj:u,weekStartsOn:i,locale:o,fixedWeeks:s,numberOfMonths:r});a(u),t(d)}}function zm({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:o,fixedWeeks:s,setPlaceholder:a}){const c=e[0]?.value;if(c)if(n)a(c.subtract({months:r}));else{const u=c.subtract({months:1}),d=_i({dateObj:u,weekStartsOn:i,locale:o,fixedWeeks:s,numberOfMonths:r});a(u),t(d)}}function Ym({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const i=e[0].weeks[0];return i?i.map(o=>t.dayOfWeek(Ve(o),r)):[]}function Km(e){nt(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Et(()=>{const o=e.placeholder.current;if(!o)return;const s={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(_i({...s,dateObj:o}))})})}function jm({calendarNode:e,label:t,accessibleHeadingId:r}){const n=ya(e),i=n.createElement("div");i.style.cssText=Oo({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const o=n.createElement("div");return o.textContent=t,o.id=r,o.role="heading",o.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(o),()=>{const s=n.getElementById(r);s&&(i.parentElement?.removeChild(i),s.remove())}}function qm({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:o,setMonths:s}){nt(()=>{e.current,Et(()=>{if(t().some(c=>Mo(c,e.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:o.current};s(_i({...a,dateObj:e.current}))})})}function Xm({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return Rm(i,e)}function Gm({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return ii(i,e)}function Zm({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const d=Ve(e[0].value);return`${r.fullMonthAndYear(d)}`}const n=Ve(e[0].value),i=Ve(e[e.length-1].value),o=r.fullMonth(n),s=r.fullMonth(i),a=r.fullYear(n),c=r.fullYear(i);return a===c?`${o} - ${s} ${c}`:`${o} ${a} - ${s} ${c}`}function Jm({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":pt(r),"data-disabled":pt(n),"data-readonly":pt(i)}}function Qm(e){if(!wi)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return km(n,i)}function $m({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:o}){function s(a){return!!(o.current(a)||n.current&&ii(a,n.current)||i.current&&ii(i.current,a))}et(()=>e.current,()=>{e.current&&t.current&&kr(t.current,r)&&s(r)&&(t.current=Qm(e.current)??r)})}function tb(e,t){return!e||!t?e:Ys(e)&&Ys(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}const eb=_e({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function rb(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const s=r-100;n=e.placeholderYear<s?e.placeholderYear-10:s}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const o=i-n+1;return Array.from({length:o},(s,a)=>n+a)}const Ee=new Vt("Calendar.Root | RangeCalender.Root");class Ha{static create(t){return Ee.set(new Ha(t))}opts;#t=y(()=>this.months.map(t=>t.value));get visibleMonths(){return l(this.#t)}set visibleMonths(t){v(this.#t,t)}formatter;accessibleHeadingId=qr();domContext;attachment;#e=E(Zt([]));get months(){return l(this.#e)}set months(t){v(this.#e,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=rt(this.opts.ref),this.domContext=new Dr(t.ref),this.announcer=Uc(null),this.formatter=Bm({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),pi(()=>{this.announcer=Uc(this.domContext.getDocument())}),this.months=_i({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#o(),this.#s(),this.#a(),qm({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),Km({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),et(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),et(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),$m({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=y(()=>Ym({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return l(this.#r)}set weekdays(t){v(this.#r,t)}#n=y(()=>Et(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return l(this.#n)}set initialPlaceholderYear(t){v(this.#n,t)}#i=y(()=>rb({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return l(this.#i)}set defaultYears(t){v(this.#i,t)}#o(){nt(()=>{if(Et(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#s(){nt(()=>this.opts.ref.current?jm({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#a(){Ln(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){Um({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){zm({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=y(()=>Xm({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return l(this.#l)}set isNextButtonDisabled(t){v(this.#l,t)}#c=y(()=>Gm({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return l(this.#c)}set isPrevButtonDisabled(t){v(this.#c,t)}#u=y(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return l(this.#u)}set isInvalid(t){v(this.#u,t)}#h=y(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,Zm({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return l(this.#h)}set headingValue(t){v(this.#h,t)}#f=y(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return l(this.#f)}set fullCalendarLabel(t){v(this.#f,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>Mo(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ii(t,r)||n&&ii(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>kr(n,t)):r?kr(r,t):!1}shiftFocus(t,r){return Hm({node:t,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#g(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const o=this.handleSingleUpdate(n,r);o?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(o,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=tb(o,n),o!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const o=[r];return this.#g(o)?o:[r]}if(!Array.isArray(t))return;const n=t.findIndex(o=>kr(o,r)),i=this.opts.preventDeselect.current;if(n===-1){const o=[...t,r];return this.#g(o)?o:[r]}else{if(i)return t;{const o=t.filter(s=>!kr(s,r));if(!o.length){this.opts.placeholder.current=r;return}return o}}}handleSingleUpdate(t,r){if(!t)return r;if(!this.opts.preventDeselect.current&&kr(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){Wm({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#d=y(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return l(this.#d)}set snippetProps(t){v(this.#d,t)}getBitsAttr=t=>eb.getAttr(t);#p=y(()=>({...Jm({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#p)}set props(t){v(this.#p,t)}}const xd=new Vt("Calendar.Cell | RangeCalendar.Cell");class Wa{static create(t){return xd.set(new Wa(t,Ee.get()))}opts;root;#t=y(()=>Ve(this.opts.date.current));get cellDate(){return l(this.#t)}set cellDate(t){v(this.#t,t)}#e=y(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return l(this.#e)}set isUnavailable(t){v(this.#e,t)}#r=y(()=>$v(this.opts.date.current,Fr()));get isDateToday(){return l(this.#r)}set isDateToday(t){v(this.#r,t)}#n=y(()=>!Mo(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return l(this.#n)}set isOutsideMonth(t){v(this.#n,t)}#i=y(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return l(this.#i)}set isOutsideVisibleMonths(t){v(this.#i,t)}#o=y(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return l(this.#o)}set isDisabled(t){v(this.#o,t)}#s=y(()=>kr(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return l(this.#s)}set isFocusedDate(t){v(this.#s,t)}#a=y(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return l(this.#a)}set isSelectedDate(t){v(this.#a,t)}#l=y(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return l(this.#l)}set labelText(t){v(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#c=y(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return l(this.#c)}set snippetProps(t){v(this.#c,t)}#u=y(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return l(this.#u)}set ariaDisabled(t){v(this.#u,t)}#h=y(()=>({"data-unavailable":pt(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":pt(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":Mm(this.opts.date.current),"data-disabled":pt(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return l(this.#h)}set sharedDataAttrs(t){v(this.#h,t)}#f=y(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":fe(this.isSelectedDate),"aria-disabled":fe(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return l(this.#f)}set props(t){v(this.#f,t)}}class Ua{static create(t){return new Ua(t,xd.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#e=y(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return l(this.#e)}set snippetProps(t){v(this.#e,t)}#r=y(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":fe(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:l(this.#t),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class za{static create(t){return new za(t,Ee.get())}opts;root;#t=y(()=>this.root.isNextButtonDisabled);get isDisabled(){return l(this.#t)}set isDisabled(t){v(this.#t,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#e=y(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":fe(this.isDisabled),"data-disabled":pt(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ya{static create(t){return new Ya(t,Ee.get())}opts;root;#t=y(()=>this.root.isPrevButtonDisabled);get isDisabled(){return l(this.#t)}set isDisabled(t){v(this.#t,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#e=y(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":fe(this.isDisabled),"data-disabled":pt(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ka{static create(t){return new Ka(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":fe(this.root.opts.readonly.current),"aria-disabled":fe(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),"data-disabled":pt(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class ja{static create(t){return new ja(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class qa{static create(t){return new qa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Xa{static create(t){return new Xa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ga{static create(t){return new Ga(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Za{static create(t){return new Za(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ja{static create(t){return new Ja(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onchange=this.onchange.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>{this.root.opts.locale.current;const t=this.opts.months.current,r=this.opts.monthFormat.current,n=[];for(const i of t){const o=this.root.opts.placeholder.current.set({month:i});let s;typeof r=="function"?s=r(i):s=this.root.formatter.custom(Ve(o),{month:r}),n.push({value:i,label:s})}return n});get monthItems(){return l(this.#t)}set monthItems(t){v(this.#t,t)}#e=y(()=>this.root.opts.placeholder.current.month);get currentMonth(){return l(this.#e)}set currentMonth(t){v(this.#e,t)}#r=y(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return l(this.#r)}set isDisabled(t){v(this.#r,t)}#n=y(()=>({monthItems:this.monthItems,selectedMonthItem:this.monthItems.find(t=>t.value===this.currentMonth)}));get snippetProps(){return l(this.#n)}set snippetProps(t){v(this.#n,t)}onchange(t){if(this.isDisabled)return;const r=t.target,n=parseInt(r.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({month:n}))}#i=y(()=>({id:this.opts.id.current,value:this.currentMonth,disabled:this.isDisabled,"data-disabled":pt(this.isDisabled),[this.root.getBitsAttr("month-select")]:"",onchange:this.onchange,...this.attachment}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class Qa{static create(t){return new Qa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onchange=this.onchange.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>this.opts.years.current&&this.opts.years.current.length?this.opts.years.current:this.root.defaultYears);get years(){return l(this.#t)}set years(t){v(this.#t,t)}#e=y(()=>{this.root.opts.locale.current;const t=this.opts.yearFormat.current,r=[];for(const n of this.years){const i=this.root.opts.placeholder.current.set({year:n});let o;typeof t=="function"?o=t(n):o=this.root.formatter.custom(Ve(i),{year:t}),r.push({value:n,label:o})}return r});get yearItems(){return l(this.#e)}set yearItems(t){v(this.#e,t)}#r=y(()=>this.root.opts.placeholder.current.year);get currentYear(){return l(this.#r)}set currentYear(t){v(this.#r,t)}#n=y(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return l(this.#n)}set isDisabled(t){v(this.#n,t)}#i=y(()=>({yearItems:this.yearItems,selectedYearItem:this.yearItems.find(t=>t.value===this.currentYear)}));get snippetProps(){return l(this.#i)}set snippetProps(t){v(this.#i,t)}onchange(t){if(this.isDisabled)return;const r=t.target,n=parseInt(r.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({year:n}))}#o=y(()=>({id:this.opts.id.current,value:this.currentYear,disabled:this.isDisabled,"data-disabled":pt(this.isDisabled),[this.root.getBitsAttr("year-select")]:"",onchange:this.onchange,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}var nb=W("<div><!></div>");function f1(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"ref",15,null),i=m(t,"value",15),o=m(t,"onValueChange",3,st),s=m(t,"placeholder",15),a=m(t,"onPlaceholderChange",3,st),c=m(t,"weekdayFormat",3,"narrow"),u=m(t,"pagedNavigation",3,!1),d=m(t,"isDateDisabled",3,()=>!1),p=m(t,"isDateUnavailable",3,()=>!1),h=m(t,"fixedWeeks",3,!1),f=m(t,"numberOfMonths",3,1),g=m(t,"calendarLabel",3,"Event"),b=m(t,"disabled",3,!1),w=m(t,"readonly",3,!1),S=m(t,"minValue",3,void 0),C=m(t,"maxValue",3,void 0),T=m(t,"preventDeselect",3,!1),D=m(t,"disableDaysOutsideMonth",3,!0),k=m(t,"initialFocus",3,!1),O=m(t,"monthFormat",3,"long"),I=m(t,"yearFormat",3,"numeric"),F=G(t,["$$slots","$$events","$$legacy","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const z=Im({defaultValue:i(),minValue:S(),maxValue:C()});function R(){s()===void 0&&s(z)}R(),et.pre(()=>s(),()=>{R()});function X(){i()===void 0&&i(t.type==="single"?void 0:[])}X(),et.pre(()=>i(),()=>{X()});const H=Ha.create({id:_(()=>r()),ref:_(()=>n(),Z=>n(Z)),weekdayFormat:_(()=>c()),weekStartsOn:_(()=>t.weekStartsOn),pagedNavigation:_(()=>u()),isDateDisabled:_(()=>d()),isDateUnavailable:_(()=>p()),fixedWeeks:_(()=>h()),numberOfMonths:_(()=>f()),locale:cv(()=>t.locale),calendarLabel:_(()=>g()),readonly:_(()=>w()),disabled:_(()=>b()),minValue:_(()=>S()),maxValue:_(()=>C()),disableDaysOutsideMonth:_(()=>D()),initialFocus:_(()=>k()),maxDays:_(()=>t.maxDays),placeholder:_(()=>s(),Z=>{s(Z),a()(Z)}),preventDeselect:_(()=>T()),value:_(()=>i(),Z=>{i(Z),o()(Z)}),type:_(()=>t.type),monthFormat:_(()=>O()),yearFormat:_(()=>I()),defaultPlaceholder:z}),K=y(()=>q(F,H.props));var Q=A(),ht=P(Q);{var xt=Z=>{var $=A(),gt=P($);{let It=y(()=>({props:l(K),...H.snippetProps}));M(gt,()=>t.child,()=>l(It))}x(Z,$)},vt=Z=>{var $=nb();J($,()=>({...l(K)}));var gt=Y($);M(gt,()=>t.children??L,()=>H.snippetProps),U($),x(Z,$)};N(ht,Z=>{t.child?Z(xt):Z(vt,-1)})}x(e,Q),V()}var ib=W("<div><!></div>");function g1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ua.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=ib();J(f,()=>({...l(a)}));var g=Y(f);{var b=S=>{var C=A(),T=P(C);M(T,()=>t.children??L,()=>s.snippetProps),x(S,C)},w=S=>{var C=Is();Jt(()=>nn(C,s.cell.opts.date.current.day)),x(S,C)};N(g,S=>{t.children?S(b):S(w,-1)})}U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ob=W("<table><!></table>");function p1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ka.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=ob();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var sb=W("<tbody><!></tbody>");function v1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=ja.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=sb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ab=W("<td><!></td>");function m1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","date","month"]);const s=Wa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h)),date:_(()=>t.date),month:_(()=>t.month)}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=ab();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L,()=>s.snippetProps),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var lb=W("<thead><!></thead>");function b1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=qa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=lb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var cb=W("<th><!></th>");function y1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ga.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=cb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ub=W("<tr><!></tr>");function w1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Xa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=ub();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var hb=W("<header><!></header>");function _1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Za.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=hb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var db=W("<option> </option>"),fb=W("<!>",1),gb=W("<select><!></select>");function S1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"months",19,()=>[1,2,3,4,5,6,7,8,9,10,11,12]),s=m(t,"monthFormat",3,"long"),a=m(t,"disabled",3,!1),c=m(t,"aria-label",3,"Select a month"),u=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","months","monthFormat","disabled","aria-label"]);const d=Ja.create({id:_(()=>i()),ref:_(()=>n(),w=>n(w)),months:_(()=>o()),monthFormat:_(()=>s()),disabled:_(()=>!!a())}),p=y(()=>q(u,d.props,{"aria-label":c()}));var h=A(),f=P(h);{var g=w=>{var S=A(),C=P(S);{let T=y(()=>({props:l(p),...d.snippetProps}));M(C,()=>t.child,()=>l(T))}x(w,S)},b=w=>{var S=gb();J(S,()=>({...l(p)})),wh(S,()=>{var C=Y(S),T=fb(),D=P(T);{var k=I=>{var F=A(),z=P(F);M(z,()=>t.children??L,()=>d.snippetProps),x(I,F)},O=I=>{var F=A(),z=P(F);En(z,17,()=>d.monthItems,R=>R.value,(R,X)=>{var H=db(),K=Y(H,!0);U(H);var Q={};Jt(()=>{pa(H,l(X).value===d.currentMonth),nn(K,l(X).label),Q!==(Q=l(X).value)&&(H.value=(H.__value=l(X).value)??"")}),x(R,H)}),x(I,F)};N(D,I=>{t.children?I(k):I(O,-1)})}x(C,T)}),x(w,S)};N(f,w=>{t.child?w(g):w(b,-1)})}x(e,h),V()}var pb=W("<button><!></button>");function x1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"tabindex",3,0),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]);const a=za.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props,{tabindex:o()}));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=pb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var vb=W("<button><!></button>");function C1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"tabindex",3,0),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]);const a=Ya.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props,{tabindex:o()}));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=vb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var mb=W("<option> </option>"),bb=W("<!>",1),yb=W("<select><!></select>");function P1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"yearFormat",3,"numeric"),s=m(t,"disabled",3,!1),a=m(t,"aria-label",3,"Select a year"),c=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","years","yearFormat","disabled","aria-label"]);const u=Qa.create({id:_(()=>i()),ref:_(()=>n(),b=>n(b)),years:_(()=>t.years),yearFormat:_(()=>o()),disabled:_(()=>!!s())}),d=y(()=>q(c,u.props,{"aria-label":a()}));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);{let C=y(()=>({props:l(d),...u.snippetProps}));M(S,()=>t.child,()=>l(C))}x(b,w)},g=b=>{var w=yb();J(w,()=>({...l(d)})),wh(w,()=>{var S=Y(w),C=bb(),T=P(C);{var D=O=>{var I=A(),F=P(I);M(F,()=>t.children??L,()=>u.snippetProps),x(O,I)},k=O=>{var I=A(),F=P(I);En(F,17,()=>u.yearItems,z=>z.value,(z,R)=>{var X=mb(),H=Y(X,!0);U(X);var K={};Jt(()=>{pa(X,l(R).value===u.currentYear),nn(H,l(R).label),K!==(K=l(R).value)&&(X.value=(X.__value=l(R).value)??"")}),x(z,X)}),x(O,I)};N(T,O=>{t.children?O(D):O(k,-1)})}x(S,C)}),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}const wb=_e({component:"checkbox",parts:["root","group","group-label","input"]}),_b=new Vt("Checkbox.Group"),Cd=new Vt("Checkbox.Root");class $a{static create(t,r=null){return Cd.set(new $a(t,r))}opts;group;#t=y(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return l(this.#t)}set trueName(t){v(this.#t,t)}#e=y(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return l(this.#e)}set trueRequired(t){v(this.#e,t)}#r=y(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return l(this.#r)}set trueDisabled(t){v(this.#r,t)}#n=y(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return l(this.#n)}set trueReadonly(t){v(this.#n,t)}attachment;constructor(t,r){this.opts=t,this.group=r,this.attachment=rt(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),et.pre([()=>Ff(this.group?.opts.value.current),()=>this.opts.value.current],([n,i])=>{!n||!i||(this.opts.checked.current=n.includes(i))}),et.pre(()=>this.opts.checked.current,n=>{this.group&&(n?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===lr){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===Ue&&(t.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}t.preventDefault(),this.#i()}}#o=y(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return l(this.#o)}set snippetProps(t){v(this.#o,t)}#s=y(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":Nh(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":fe(this.trueRequired),"aria-readonly":fe(this.trueReadonly),"data-disabled":pt(this.trueDisabled),"data-readonly":pt(this.trueReadonly),"data-state":Sb(this.opts.checked.current,this.opts.indeterminate.current),[wb.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#s)}set props(t){v(this.#s,t)}}class tl{static create(){return new tl(Cd.get())}root;#t=y(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return l(this.#t)}set trueChecked(t){v(this.#t,t)}#e=y(()=>!!this.root.trueName);get shouldRender(){return l(this.#e)}set shouldRender(t){v(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){wr(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=y(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}function Sb(e,t){return t?"indeterminate":e?"checked":"unchecked"}kf();var xb=W("<input/>"),Cb=W("<input/>");function el(e,t){B(t,!0);let r=m(t,"value",15),n=G(t,["$$slots","$$events","$$legacy","value"]);const i=y(()=>q(n,{"aria-hidden":"true",tabindex:-1,style:{...Th,position:"absolute",top:"0",left:"0"}}));var o=A(),s=P(o);{var a=u=>{var d=xb();J(d,()=>({...l(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(u,d)},c=u=>{var d=Cb();J(d,()=>({...l(i)}),void 0,void 0,void 0,void 0,!0),zg(d,r),x(u,d)};N(s,u=>{l(i).type==="checkbox"?u(a):u(c,-1)})}x(e,o),V()}function Pb(e,t){B(t,!1);const r=tl.create();Sh();var n=A(),i=P(n);{var o=s=>{el(s,bt(()=>r.props))};N(i,s=>{r.shouldRender&&s(o)})}x(e,n),V()}var Tb=W("<button><!></button>"),Ab=W("<!> <!>",1);function T1(e,t){const r=at();B(t,!0);let n=m(t,"checked",15,!1),i=m(t,"ref",15,null),o=m(t,"disabled",3,!1),s=m(t,"required",3,!1),a=m(t,"name",3,void 0),c=m(t,"value",3,"on"),u=m(t,"id",19,()=>lt(r)),d=m(t,"indeterminate",15,!1),p=m(t,"type",3,"button"),h=G(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const f=_b.getOr(null);f&&c()&&(f.opts.value.current.includes(c())?n(!0):n(!1)),et.pre(()=>c(),()=>{f&&c()&&(f.opts.value.current.includes(c())?n(!0):n(!1))});const g=$a.create({checked:_(()=>n(),k=>{n(k),t.onCheckedChange?.(k)}),disabled:_(()=>o()??!1),required:_(()=>s()),name:_(()=>a()),value:_(()=>c()),id:_(()=>u()),ref:_(()=>i(),k=>i(k)),indeterminate:_(()=>d(),k=>{d(k),t.onIndeterminateChange?.(k)}),type:_(()=>p()),readonly:_(()=>!!t.readonly)},f),b=y(()=>q({...h},g.props));var w=Ab(),S=P(w);{var C=k=>{var O=A(),I=P(O);{let F=y(()=>({props:l(b),...g.snippetProps}));M(I,()=>t.child,()=>l(F))}x(k,O)},T=k=>{var O=Tb();J(O,()=>({...l(b)}));var I=Y(O);M(I,()=>t.children??L,()=>g.snippetProps),U(O),x(k,O)};N(S,k=>{t.child?k(C):k(T,-1)})}var D=ae(S,2);Pb(D,{}),x(e,w),V()}const rl=_e({component:"collapsible",parts:["root","content","trigger"]}),nl=new Vt("Collapsible.Root");class il{static create(t){return nl.set(new il(t))}opts;attachment;#t=E(null);get contentNode(){return l(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#e=E(void 0);get contentId(){return l(this.#e)}set contentId(t){v(this.#e,t,!0)}constructor(t){this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=rt(this.opts.ref),this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#r=y(()=>({id:this.opts.id.current,"data-state":jr(this.opts.open.current),"data-disabled":pt(this.opts.disabled.current),[rl.root]:"",...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class ol{static create(t){return new ol(t,nl.get())}opts;root;attachment;#t=y(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return l(this.#t)}set present(t){v(this.#t,t)}#e;#r=E(!1);#n=E(0);#i=E(0);constructor(t,r){this.opts=t,this.root=r,v(this.#r,r.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),et.pre(()=>this.opts.id.current,n=>{this.root.contentId=n}),Ln(()=>{const n=requestAnimationFrame(()=>{v(this.#r,!1)});return()=>{cancelAnimationFrame(n)}}),et.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([n,i])=>!n||!i?void 0:St(n,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),et([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&Br(()=>{if(!this.opts.ref.current)return;this.#e=this.#e||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const i=n.getBoundingClientRect();if(v(this.#i,i.height,!0),v(this.#n,i.width,!0),!l(this.#r)){const{animationName:o,transitionDuration:s}=this.#e;n.style.transitionDuration=s,n.style.animationName=o}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#o=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#o)}set snippetProps(t){v(this.#o,t)}#s=y(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":l(this.#i)?`${l(this.#i)}px`:void 0,"--bits-collapsible-content-width":l(this.#n)?`${l(this.#n)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),"data-disabled":pt(this.root.opts.disabled.current),[rl.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return l(this.#s)}set props(t){v(this.#s,t)}}class sl{static create(t){return new sl(t,nl.get())}opts;root;attachment;#t=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){if(!l(this.#t)){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){l(this.#t)||(t.key===Ue||t.key===lr)&&(t.preventDefault(),this.root.toggleOpen())}#e=y(()=>({id:this.opts.id.current,type:"button",disabled:l(this.#t),"aria-controls":this.root.contentId,"aria-expanded":fe(this.root.opts.open.current),"data-state":jr(this.root.opts.open.current),"data-disabled":pt(l(this.#t)),[rl.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}var Db=W("<div><!></div>");function A1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"open",15,!1),s=m(t,"disabled",3,!1),a=m(t,"onOpenChange",3,st),c=m(t,"onOpenChangeComplete",3,st),u=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const d=il.create({open:_(()=>o(),w=>{o(w),a()(w)}),disabled:_(()=>s()),id:_(()=>n()),ref:_(()=>i(),w=>i(w)),onOpenChangeComplete:_(()=>c())}),p=y(()=>q(u,d.props));var h=A(),f=P(h);{var g=w=>{var S=A(),C=P(S);M(C,()=>t.child,()=>({props:l(p)})),x(w,S)},b=w=>{var S=Db();J(S,()=>({...l(p)}));var C=Y(S);M(C,()=>t.children??L),U(S),x(w,S)};N(f,w=>{t.child?w(g):w(b,-1)})}x(e,h),V()}var Ob=W("<div><!></div>");function D1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"forceMount",3,!1),o=m(t,"hiddenUntilFound",3,!1),s=m(t,"id",19,()=>lt(r)),a=G(t,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const c=ol.create({id:_(()=>s()),forceMount:_(()=>i()),hiddenUntilFound:_(()=>o()),ref:_(()=>n(),g=>n(g))}),u=y(()=>q(a,c.props));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);{let S=y(()=>({...c.snippetProps,props:l(u)}));M(w,()=>t.child,()=>l(S))}x(g,b)},f=g=>{var b=Ob();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}var Eb=W("<button><!></button>");function O1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"disabled",3,!1),s=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const a=sl.create({id:_(()=>i()),ref:_(()=>n(),f=>n(f)),disabled:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=Eb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}const Ib=["top","right","bottom","left"],Ur=Math.min,pe=Math.max,lo=Math.round,Bi=Math.floor,ir=e=>({x:e,y:e}),Mb={left:"right",right:"left",bottom:"top",top:"bottom"};function Ks(e,t,r){return pe(e,Ur(t,r))}function Cr(e,t){return typeof e=="function"?e(t):e}function Pr(e){return e.split("-")[0]}function Un(e){return e.split("-")[1]}function al(e){return e==="x"?"y":"x"}function ll(e){return e==="y"?"height":"width"}function rr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function cl(e){return al(rr(e))}function kb(e,t,r){r===void 0&&(r=!1);const n=Un(e),i=cl(e),o=ll(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=co(s)),[s,co(s)]}function Nb(e){const t=co(e);return[js(e),t,js(t)]}function js(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gc=["left","right"],Zc=["right","left"],Fb=["top","bottom"],Rb=["bottom","top"];function Lb(e,t,r){switch(e){case"top":case"bottom":return r?t?Zc:Gc:t?Gc:Zc;case"left":case"right":return t?Fb:Rb;default:return[]}}function Bb(e,t,r,n){const i=Un(e);let o=Lb(Pr(e),r==="start",n);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(js)))),o}function co(e){const t=Pr(e);return Mb[t]+e.slice(t.length)}function Vb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pd(e){return typeof e!="number"?Vb(e):{top:e,right:e,bottom:e,left:e}}function uo(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Jc(e,t,r){let{reference:n,floating:i}=e;const o=rr(t),s=cl(t),a=ll(s),c=Pr(t),u=o==="y",d=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let f;switch(c){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-i.width,y:p};break;default:f={x:n.x,y:n.y}}switch(Un(t)){case"start":f[s]-=h*(r&&u?-1:1);break;case"end":f[s]+=h*(r&&u?-1:1);break}return f}async function Hb(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=Cr(t,e),g=Pd(f),w=a[h?p==="floating"?"reference":"floating":p],S=uo(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),C=p==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},k=uo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:T,strategy:c}):C);return{top:(S.top-k.top+g.top)/D.y,bottom:(k.bottom-S.bottom+g.bottom)/D.y,left:(S.left-k.left+g.left)/D.x,right:(k.right-S.right+g.right)/D.x}}const Wb=50,Ub=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Hb},c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Jc(u,n,c),h=n,f=0;const g={};for(let b=0;b<o.length;b++){const w=o[b];if(!w)continue;const{name:S,fn:C}=w,{x:T,y:D,data:k,reset:O}=await C({x:d,y:p,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});d=T??d,p=D??p,g[S]={...g[S],...k},O&&f<Wb&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(u=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:p}=Jc(u,h,c)),b=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:g}},zb=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Cr(e,t)||{};if(u==null)return{};const p=Pd(d),h={x:r,y:n},f=cl(i),g=ll(f),b=await s.getDimensions(u),w=f==="y",S=w?"top":"left",C=w?"bottom":"right",T=w?"clientHeight":"clientWidth",D=o.reference[g]+o.reference[f]-h[f]-o.floating[g],k=h[f]-o.reference[f],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=O?O[T]:0;(!I||!await(s.isElement==null?void 0:s.isElement(O)))&&(I=a.floating[T]||o.floating[g]);const F=D/2-k/2,z=I/2-b[g]/2-1,R=Ur(p[S],z),X=Ur(p[C],z),H=R,K=I-b[g]-X,Q=I/2-b[g]/2+F,ht=Ks(H,Q,K),xt=!c.arrow&&Un(i)!=null&&Q!==ht&&o.reference[g]/2-(Q<H?R:X)-b[g]/2<0,vt=xt?Q<H?Q-H:Q-K:0;return{[f]:h[f]+vt,data:{[f]:ht,centerOffset:Q-ht-vt,...xt&&{alignmentOffset:vt}},reset:xt}}}),Yb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...w}=Cr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const S=Pr(i),C=rr(a),T=Pr(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(T||!b?[co(a)]:Nb(a)),O=g!=="none";!h&&O&&k.push(...Bb(a,b,g,D));const I=[a,...k],F=await c.detectOverflow(t,w),z=[];let R=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&z.push(F[S]),p){const Q=kb(i,s,D);z.push(F[Q[0]],F[Q[1]])}if(R=[...R,{placement:i,overflows:z}],!z.every(Q=>Q<=0)){var X,H;const Q=(((X=o.flip)==null?void 0:X.index)||0)+1,ht=I[Q];if(ht&&(!(p==="alignment"?C!==rr(ht):!1)||R.every(Z=>rr(Z.placement)===C?Z.overflows[0]>0:!0)))return{data:{index:Q,overflows:R},reset:{placement:ht}};let xt=(H=R.filter(vt=>vt.overflows[0]<=0).sort((vt,Z)=>vt.overflows[1]-Z.overflows[1])[0])==null?void 0:H.placement;if(!xt)switch(f){case"bestFit":{var K;const vt=(K=R.filter(Z=>{if(O){const $=rr(Z.placement);return $===C||$==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter($=>$>0).reduce(($,gt)=>$+gt,0)]).sort((Z,$)=>Z[1]-$[1])[0])==null?void 0:K[0];vt&&(xt=vt);break}case"initialPlacement":xt=a;break}if(i!==xt)return{reset:{placement:xt}}}return{}}}};function Qc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $c(e){return Ib.some(t=>e[t]>=0)}const Kb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=Cr(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...o,elementContext:"reference"}),a=Qc(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$c(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...o,altBoundary:!0}),a=Qc(s,r.floating);return{data:{escapedOffsets:a,escaped:$c(a)}}}default:return{}}}}},Td=new Set(["left","top"]);async function jb(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=Pr(r),a=Un(r),c=rr(r)==="y",u=Td.has(s)?-1:1,d=o&&c?-1:1,p=Cr(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),c?{x:f*d,y:h*u}:{x:h*u,y:f*d}}const qb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await jb(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},Xb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:S=>{let{x:C,y:T}=S;return{x:C,y:T}}},...u}=Cr(e,t),d={x:r,y:n},p=await o.detectOverflow(t,u),h=rr(Pr(i)),f=al(h);let g=d[f],b=d[h];if(s){const S=f==="y"?"top":"left",C=f==="y"?"bottom":"right",T=g+p[S],D=g-p[C];g=Ks(T,g,D)}if(a){const S=h==="y"?"top":"left",C=h==="y"?"bottom":"right",T=b+p[S],D=b-p[C];b=Ks(T,b,D)}const w=c.fn({...t,[f]:g,[h]:b});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[f]:s,[h]:a}}}}}},Gb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Cr(e,t),d={x:r,y:n},p=rr(i),h=al(p);let f=d[h],g=d[p];const b=Cr(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const T=h==="y"?"height":"width",D=o.reference[h]-o.floating[T]+w.mainAxis,k=o.reference[h]+o.reference[T]-w.mainAxis;f<D?f=D:f>k&&(f=k)}if(u){var S,C;const T=h==="y"?"width":"height",D=Td.has(Pr(i)),k=o.reference[p]-o.floating[T]+(D&&((S=s.offset)==null?void 0:S[p])||0)+(D?0:w.crossAxis),O=o.reference[p]+o.reference[T]+(D?0:((C=s.offset)==null?void 0:C[p])||0)-(D?w.crossAxis:0);g<k?g=k:g>O&&(g=O)}return{[h]:f,[p]:g}}}},Zb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...u}=Cr(e,t),d=await s.detectOverflow(t,u),p=Pr(i),h=Un(i),f=rr(i)==="y",{width:g,height:b}=o.floating;let w,S;p==="top"||p==="bottom"?(w=p,S=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=p,w=h==="end"?"top":"bottom");const C=b-d.top-d.bottom,T=g-d.left-d.right,D=Ur(b-d[w],C),k=Ur(g-d[S],T),O=!t.middlewareData.shift;let I=D,F=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(F=T),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=C),O&&!h){const R=pe(d.left,0),X=pe(d.right,0),H=pe(d.top,0),K=pe(d.bottom,0);f?F=g-2*(R!==0||X!==0?R+X:pe(d.left,d.right)):I=b-2*(H!==0||K!==0?H+K:pe(d.top,d.bottom))}await c({...t,availableWidth:F,availableHeight:I});const z=await s.getDimensions(a.floating);return g!==z.width||b!==z.height?{reset:{rects:!0}}:{}}}};function No(){return typeof window<"u"}function zn(e){return Ad(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(Ad(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ad(e){return No()?e instanceof Node||e instanceof ye(e).Node:!1}function Ke(e){return No()?e instanceof Element||e instanceof ye(e).Element:!1}function Or(e){return No()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function tu(e){return!No()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Si(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=je(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Jb(e){return/^(table|td|th)$/.test(zn(e))}function Fo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qb=/transform|translate|scale|rotate|perspective|filter/,$b=/paint|layout|strict|content/,Jr=e=>!!e&&e!=="none";let gs;function ul(e){const t=Ke(e)?je(e):e;return Jr(t.transform)||Jr(t.translate)||Jr(t.scale)||Jr(t.rotate)||Jr(t.perspective)||!hl()&&(Jr(t.backdropFilter)||Jr(t.filter))||Qb.test(t.willChange||"")||$b.test(t.contain||"")}function ty(e){let t=zr(e);for(;Or(t)&&!kn(t);){if(ul(t))return t;if(Fo(t))return null;t=zr(t)}return null}function hl(){return gs==null&&(gs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gs}function kn(e){return/^(html|body|#document)$/.test(zn(e))}function je(e){return ye(e).getComputedStyle(e)}function Ro(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zr(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tu(e)&&e.host||hr(e);return tu(t)?t.host:t}function Dd(e){const t=zr(e);return kn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Or(t)&&Si(t)?t:Dd(t)}function oi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Dd(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=ye(i);if(o){const a=qs(s);return t.concat(s,s.visualViewport||[],Si(i)?i:[],a&&r?oi(a):[])}else return t.concat(i,oi(i,[],r))}function qs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Od(e){const t=je(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Or(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=lo(r)!==o||lo(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function dl(e){return Ke(e)?e:e.contextElement}function Cn(e){const t=dl(e);if(!Or(t))return ir(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Od(t);let s=(o?lo(r.width):r.width)/n,a=(o?lo(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ey=ir(0);function Ed(e){const t=ye(e);return!hl()||!t.visualViewport?ey:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ry(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function fn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=dl(e);let s=ir(1);t&&(n?Ke(n)&&(s=Cn(n)):s=Cn(e));const a=ry(o,r,n)?Ed(o):ir(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,p=i.height/s.y;if(o){const h=ye(o),f=n&&Ke(n)?ye(n):n;let g=h,b=qs(g);for(;b&&n&&f!==g;){const w=Cn(b),S=b.getBoundingClientRect(),C=je(b),T=S.left+(b.clientLeft+parseFloat(C.paddingLeft))*w.x,D=S.top+(b.clientTop+parseFloat(C.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,p*=w.y,c+=T,u+=D,g=ye(b),b=qs(g)}}return uo({width:d,height:p,x:c,y:u})}function Lo(e,t){const r=Ro(e).scrollLeft;return t?t.left+r:fn(hr(e)).left+r}function Id(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lo(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function ny(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",s=hr(n),a=t?Fo(t.floating):!1;if(n===s||a&&o)return r;let c={scrollLeft:0,scrollTop:0},u=ir(1);const d=ir(0),p=Or(n);if((p||!p&&!o)&&((zn(n)!=="body"||Si(s))&&(c=Ro(n)),p)){const f=fn(n);u=Cn(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=s&&!p&&!o?Id(s,c):ir(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function iy(e){return Array.from(e.getClientRects())}function oy(e){const t=hr(e),r=Ro(e),n=e.ownerDocument.body,i=pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lo(e);const a=-r.scrollTop;return je(n).direction==="rtl"&&(s+=pe(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}const eu=25;function sy(e,t){const r=ye(e),n=hr(e),i=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const d=hl();(!d||d&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Lo(n);if(u<=0){const d=n.ownerDocument,p=d.body,h=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-p.clientWidth-f);g<=eu&&(o-=g)}else u<=eu&&(o+=u);return{width:o,height:s,x:a,y:c}}function ay(e,t){const r=fn(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Or(e)?Cn(e):ir(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=n*o.y;return{width:s,height:a,x:c,y:u}}function ru(e,t,r){let n;if(t==="viewport")n=sy(e,r);else if(t==="document")n=oy(hr(e));else if(Ke(t))n=ay(t,r);else{const i=Ed(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return uo(n)}function Md(e,t){const r=zr(e);return r===t||!Ke(r)||kn(r)?!1:je(r).position==="fixed"||Md(r,t)}function ly(e,t){const r=t.get(e);if(r)return r;let n=oi(e,[],!1).filter(a=>Ke(a)&&zn(a)!=="body"),i=null;const o=je(e).position==="fixed";let s=o?zr(e):e;for(;Ke(s)&&!kn(s);){const a=je(s),c=ul(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Si(s)&&!c&&Md(e,s))?n=n.filter(d=>d!==s):i=a,s=zr(s)}return t.set(e,n),n}function cy(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Fo(t)?[]:ly(t,this._c):[].concat(r),n],a=ru(t,s[0],i);let c=a.top,u=a.right,d=a.bottom,p=a.left;for(let h=1;h<s.length;h++){const f=ru(t,s[h],i);c=pe(f.top,c),u=Ur(f.right,u),d=Ur(f.bottom,d),p=pe(f.left,p)}return{width:u-p,height:d-c,x:p,y:c}}function uy(e){const{width:t,height:r}=Od(e);return{width:t,height:r}}function hy(e,t,r){const n=Or(t),i=hr(t),o=r==="fixed",s=fn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=ir(0);function u(){c.x=Lo(i)}if(n||!n&&!o)if((zn(t)!=="body"||Si(i))&&(a=Ro(t)),n){const f=fn(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else i&&u();o&&!n&&i&&u();const d=i&&!n&&!o?Id(i,a):ir(0),p=s.left+a.scrollLeft-c.x-d.x,h=s.top+a.scrollTop-c.y-d.y;return{x:p,y:h,width:s.width,height:s.height}}function ps(e){return je(e).position==="static"}function nu(e,t){if(!Or(e)||je(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return hr(e)===r&&(r=r.ownerDocument.body),r}function kd(e,t){const r=ye(e);if(Fo(e))return r;if(!Or(e)){let i=zr(e);for(;i&&!kn(i);){if(Ke(i)&&!ps(i))return i;i=zr(i)}return r}let n=nu(e,t);for(;n&&Jb(n)&&ps(n);)n=nu(n,t);return n&&kn(n)&&ps(n)&&!ul(n)?r:n||ty(e)||r}const dy=async function(e){const t=this.getOffsetParent||kd,r=this.getDimensions,n=await r(e.floating);return{reference:hy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fy(e){return je(e).direction==="rtl"}const gy={convertOffsetParentRelativeRectToViewportRelativeRect:ny,getDocumentElement:hr,getClippingRect:cy,getOffsetParent:kd,getElementRects:dy,getClientRects:iy,getDimensions:uy,getScale:Cn,isElement:Ke,isRTL:fy};function Nd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function py(e,t){let r=null,n;const i=hr(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:f}=u;if(a||t(),!h||!f)return;const g=Bi(p),b=Bi(i.clientWidth-(d+h)),w=Bi(i.clientHeight-(p+f)),S=Bi(d),T={rootMargin:-g+"px "+-b+"px "+-w+"px "+-S+"px",threshold:pe(0,Ur(1,c))||1};let D=!0;function k(O){const I=O[0].intersectionRatio;if(I!==c){if(!D)return s();I?s(!1,I):n=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!Nd(u,e.getBoundingClientRect())&&s(),D=!1}try{r=new IntersectionObserver(k,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,T)}r.observe(e)}return s(!0),o}function vy(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=dl(e),d=i||o?[...u?oi(u):[],...t?oi(t):[]]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),o&&S.addEventListener("resize",r)});const p=u&&a?py(u,r):null;let h=-1,f=null;s&&(f=new ResizeObserver(S=>{let[C]=S;C&&C.target===u&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var T;(T=f)==null||T.observe(t)})),r()}),u&&!c&&f.observe(u),t&&f.observe(t));let g,b=c?fn(e):null;c&&w();function w(){const S=fn(e);b&&!Nd(b,S)&&r(),b=S,g=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(C=>{i&&C.removeEventListener("scroll",r),o&&C.removeEventListener("resize",r)}),p?.(),(S=f)==null||S.disconnect(),f=null,c&&cancelAnimationFrame(g)}}const my=qb,by=Xb,yy=Yb,wy=Zb,_y=Kb,Sy=zb,xy=Gb,Cy=(e,t,r)=>{const n=new Map,i={platform:gy,...r},o={...i.platform,_c:n};return Ub(e,t,{...i,platform:o})};function Qr(e){return typeof e=="function"?e():e}function Fd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iu(e,t){const r=Fd(e);return Math.round(t*r)/r}function si(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Py(e){const t=e.whileElementsMounted,r=y(()=>Qr(e.open)??!0),n=y(()=>Qr(e.middleware)),i=y(()=>Qr(e.transform)??!0),o=y(()=>Qr(e.placement)??"bottom"),s=y(()=>Qr(e.strategy)??"absolute"),a=y(()=>Qr(e.sideOffset)??0),c=y(()=>Qr(e.alignOffset)??0),u=e.reference;let d=E(0),p=E(0);const h=le(null);let f=E(Zt(l(s))),g=E(Zt(l(o))),b=E(Zt({})),w=E(!1),S=!1,C=0;const T=y(()=>{const R=h.current?iu(h.current,l(d)):l(d),X=h.current?iu(h.current,l(p)):l(p);return l(i)?{position:l(f),left:"0",top:"0",transform:`translate(${R}px, ${X}px)`,...h.current&&Fd(h.current)>=1.5&&{willChange:"transform"}}:{position:l(f),left:`${R}px`,top:`${X}px`}});let D;function k(){if(u.current===null||h.current===null)return;const R=u.current,X=h.current,H=++C;Cy(R,X,{middleware:l(n),placement:l(o),strategy:l(s)}).then(K=>{if(H!==C||u.current!==R||h.current!==X)return;if(Ty(R)){v(b,{...l(b),hide:{...l(b).hide,referenceHidden:!0}},!0);return}if(!l(r)&&l(d)!==0&&l(p)!==0){const ht=Math.max(Math.abs(l(a)),Math.abs(l(c)),15);if(K.x<=ht&&K.y<=ht)return}v(d,K.x,!0),v(p,K.y,!0),v(f,K.strategy,!0),v(g,K.placement,!0),v(b,K.middlewareData,!0),v(w,!0)})}function O(){typeof D=="function"&&(D(),D=void 0),C++}function I(){if(O(),t===void 0){k();return}l(r)&&(u.current===null||h.current===null||(D=t(u.current,h.current,k)))}function F(){!l(r)&&h.current===null&&v(w,!1)}function z(){return[l(n),l(o),l(s),l(a),l(c),l(r)]}return nt(()=>{t===void 0&&l(r)&&k()}),nt(I),nt(()=>{if(t!==void 0){if(z(),!l(r)){S=!1;return}if(!l(w)){S=!1;return}if(!S){S=!0;return}k()}}),nt(F),nt(()=>O),{floating:h,reference:u,get strategy(){return l(f)},get placement(){return l(g)},get middlewareData(){return l(b)},get isPositioned(){return l(w)},get floatingStyles(){return l(T)},get update(){return k}}}function Ty(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Ay={top:"bottom",right:"left",bottom:"top",left:"right"},fl=new Vt("Floating.Root"),Xs=new Vt("Floating.Content"),gl=new Vt("Floating.Root");class ho{static create(t=!1){return t?gl.set(new ho):fl.set(new ho)}anchorNode=le(null);customAnchorNode=le(null);triggerNode=le(null);constructor(){nt(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class fo{static create(t,r=!1){return r?Xs.set(new fo(t,gl.get())):Xs.set(new fo(t,fl.get()))}opts;root;contentRef=le(null);wrapperRef=le(null);arrowRef=le(null);contentAttachment=rt(this.contentRef);wrapperAttachment=rt(this.wrapperRef);arrowAttachment=rt(this.arrowRef);arrowId=le(qr());#t=y(()=>{if(typeof this.opts.style=="string")return Qn(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#r=new Fp(()=>this.arrowRef.current??void 0);#n=y(()=>this.#r?.width??0);#i=y(()=>this.#r?.height??0);#o=y(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=y(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=y(()=>l(this.#s).length>0);get hasExplicitBoundaries(){return l(this.#a)}set hasExplicitBoundaries(t){v(this.#a,t)}#l=y(()=>({padding:this.opts.collisionPadding.current,boundary:l(this.#s).filter(tv),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return l(this.#l)}set detectOverflowOptions(t){v(this.#l,t)}#c=E(void 0);#u=E(void 0);#h=E(void 0);#f=E(void 0);#g=y(()=>[my({mainAxis:this.opts.sideOffset.current+l(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&by({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?xy():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&yy({...this.detectOverflowOptions}),wy({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:o}=t.reference;v(this.#c,r,!0),v(this.#u,n,!0),v(this.#h,i,!0),v(this.#f,o,!0)}}),this.arrowRef.current&&Sy({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Dy({arrowWidth:l(this.#n),arrowHeight:l(this.#i)}),this.opts.hideWhenDetached.current&&_y({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return l(this.#g)}set middleware(t){v(this.#g,t)}floating;#d=y(()=>Oy(this.floating.placement));get placedSide(){return l(this.#d)}set placedSide(t){v(this.#d,t)}#p=y(()=>Ey(this.floating.placement));get placedAlign(){return l(this.#p)}set placedAlign(t){v(this.#p,t)}#v=y(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return l(this.#v)}set arrowX(t){v(this.#v,t)}#m=y(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return l(this.#m)}set arrowY(t){v(this.#m,t)}#b=y(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return l(this.#b)}set cannotCenterArrow(t){v(this.#b,t)}#y=E();get contentZIndex(){return l(this.#y)}set contentZIndex(t){v(this.#y,t,!0)}#w=y(()=>Ay[this.placedSide]);get arrowBaseSide(){return l(this.#w)}set arrowBaseSide(t){v(this.#w,t)}#_=y(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${l(this.#c)}px`,"--bits-floating-available-height":`${l(this.#u)}px`,"--bits-floating-anchor-width":`${l(this.#h)}px`,"--bits-floating-anchor-height":`${l(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...l(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return l(this.#_)}set wrapperProps(t){v(this.#_,t)}#S=y(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Oo({...l(this.#t)}),...this.contentAttachment}));get props(){return l(this.#S)}set props(t){v(this.#S,t)}#x=y(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return l(this.#x)}set arrowStyle(t){v(this.#x,t)}constructor(t,r){this.opts=t,this.root=r,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),et(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=Py({strategy:()=>this.opts.strategy.current,placement:()=>l(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>vy(...n,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),nt(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),et(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=wa(n),o=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const s=i.getComputedStyle(n).zIndex;s!==this.contentZIndex&&(this.contentZIndex=s)});return()=>{i.cancelAnimationFrame(o)}}),nt(()=>{this.floating.floating.current=this.wrapperRef.current})}}class pl{static create(t){return new pl(t,Xs.get())}opts;content;constructor(t,r){this.opts=t,this.content=r}#t=y(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class go{static create(t,r=!1){return r?new go(t,gl.get()):new go(t,fl.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=xh(t.virtualEl.current):r.triggerNode=t.ref}}function Dy(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=vl(r),p={start:"0%",center:"50%",end:"100%"}[d],h=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+c/2;let g="",b="";return u==="bottom"?(g=s?p:`${h}px`,b=`${-c}px`):u==="top"?(g=s?p:`${h}px`,b=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=s?p:`${f}px`):u==="left"&&(g=`${n.floating.width+c}px`,b=s?p:`${f}px`),{data:{x:g,y:b}}}}}function vl(e){const[t,r="center"]=e.split("-");return[t,r]}function Oy(e){return vl(e)[0]}function Ey(e){return vl(e)[1]}function ml(e,t){B(t,!0);let r=m(t,"tooltip",3,!1);ho.create(r());var n=A(),i=P(n);M(i,()=>t.children??L),x(e,n),V()}class Iy{#t;#e=y(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=Xh("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!l(this.#e).length)return;this.#r.current=this.#r.current+t;const r=this.#t.getCurrentItem(),n=l(this.#e).find(a=>a===r)??"",i=l(this.#e).map(a=>a??""),o=Oa(i,this.#r.current,n),s=l(this.#e).find(a=>a===o);return s&&this.#t.onMatch(s),s}resetTypeahead(){this.#r.current=""}}const My=[tr,Rh,Sa],ky=[Re,Fh,_a],Ny=[...My,...ky],Fy=_e({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),xi=new Vt("Select.Root | Combobox.Root"),Bo=new Vt("Select.Content | Combobox.Content");class Rd{opts;#t=E(!1);get touchedInput(){return l(this.#t)}set touchedInput(t){v(this.#t,t,!0)}#e=E(null);get inputNode(){return l(this.#e)}set inputNode(t){v(this.#e,t,!0)}#r=E(null);get contentNode(){return l(this.#r)}set contentNode(t){v(this.#r,t,!0)}contentPresence;#n=E(null);get viewportNode(){return l(this.#n)}set viewportNode(t){v(this.#n,t,!0)}#i=E(null);get triggerNode(){return l(this.#i)}set triggerNode(t){v(this.#i,t,!0)}#o=E(null);get valueNode(){return l(this.#o)}set valueNode(t){v(this.#o,t,!0)}#s=E("");get valueId(){return l(this.#s)}set valueId(t){v(this.#s,t,!0)}#a=E(null);get highlightedNode(){return l(this.#a)}set highlightedNode(t){v(this.#a,t,!0)}#l=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return l(this.#l)}set highlightedValue(t){v(this.#l,t)}#c=y(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return l(this.#c)}set highlightedId(t){v(this.#c,t)}#u=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return l(this.#u)}set highlightedLabel(t){v(this.#u,t)}#h=E(!1);get contentIsPositioned(){return l(this.#h)}set contentIsPositioned(t){v(this.#h,t,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new Dr(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Ln(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,r=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||r)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let r=this.getCandidateNodes();if(r.length){if(this.viewportNode){const n=this.viewportNode.getBoundingClientRect();r=r.filter(i=>{if(!this.viewportNode)return!1;const o=i.getBoundingClientRect();return o.right<=n.right&&o.left>=n.left&&o.bottom<=n.bottom&&o.top>=n.top})}this.setHighlightedNode(r[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(n=>n.dataset.value===t)??null}getLabelForValue(t){if(t==="")return"";const r=this.opts.items.current.find(i=>i.value===t)?.label;if(r!==void 0)return r;const n=this.getNodeByValue(t);if(n){const i=n.getAttribute("data-label");return i!==null&&i!==""?i:n.textContent?.trim()??t}return t}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>Fy.getAttr(t,this.isCombobox?"combobox":void 0)}class Ry extends Rd{opts;isMulti=!1;#t=y(()=>this.opts.value.current!=="");get hasValue(){return l(this.#t)}set hasValue(t){v(this.#t,t)}#e=y(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return l(this.#e)}set currentLabel(t){v(this.#e,t)}#r=y(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]);get candidateLabels(){return l(this.#r)}set candidateLabels(t){v(this.#r,t)}#n=y(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return l(this.#n)}set dataTypeaheadEnabled(t){v(this.#n,t)}constructor(t){super(t),this.opts=t,nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),et(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,r=t){const n=this.includesItem(t)?"":t;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){Br(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class Ly extends Rd{opts;isMulti=!0;#t=y(()=>this.opts.value.current.length>0);get hasValue(){return l(this.#t)}set hasValue(t){v(this.#t,t)}constructor(t){super(t),this.opts=t,nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),et(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,r=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(n=>n!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=r}setInitialHighlightedNode(){Br(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class By{static create(t){const{type:r,...n}=t,i=r==="single"?new Ry(n):new Ly(n);return xi.set(i)}}class bl{static create(t){return new bl(t,xi.get())}opts;root;attachment;#t;#e;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.triggerNode=n),this.root.domContext=new Dr(t.ref),this.#t=new Rv({getCurrentItem:()=>this.root.highlightedNode,onMatch:n=>{this.root.setHighlightedNode(n)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new Iy({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:n=>{if(this.root.isMulti||!this.root.opts.items.current)return;const i=this.root.opts.items.current.find(o=>o.label===n);i&&(this.root.opts.value.current=i.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#n(t){this.#r()}#i(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===Re||t.key===tr)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===lr||t.key===Ue||t.key===tr||t.key===Re)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const s=this.root.getCandidateNodes();if(!s.length)return;if(t.key===tr){const a=s[0];this.root.setHighlightedNode(a)}else if(t.key===Re){const a=s[s.length-1];this.root.setHighlightedNode(a)}return}if(t.key===Mc){this.root.handleClose();return}if((t.key===lr||t.key===Ue&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#i()))return;if(t.key===Re&&t.altKey&&this.root.handleClose(),Ny.includes(t.key)){t.preventDefault();const s=this.root.getCandidateNodes(),a=this.root.highlightedNode,c=a?s.indexOf(a):-1,u=this.root.opts.loop.current;let d;if(t.key===tr?d=Iv(s,c,u):t.key===Re?d=Mv(s,c,u):t.key===Fh?d=kv(s,c,10,u):t.key===Rh?d=Nv(s,c,10,u):t.key===Sa?d=s[0]:t.key===_a&&(d=s[s.length-1]),!d)return;this.root.setHighlightedNode(d);return}const r=t.ctrlKey||t.altKey||t.metaKey,n=t.key.length===1,i=t.key===Ue,o=this.root.getCandidateNodes();if(t.key!==Mc){if(!r&&(n||i)){!this.#t.handleTypeaheadSearch(t.key,o)&&i&&(t.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const r=t.target;r?.hasPointerCapture(t.pointerId)&&r?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#n(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#n(t):this.root.handleClose()))}#o=y(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":fe(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":jr(this.root.opts.open.current),"data-disabled":pt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}class yl{static create(t){return Bo.set(new yl(t,xi.get()))}opts;root;attachment;#t=E(!1);get isPositioned(){return l(this.#t)}set isPositioned(t){v(this.#t,t,!0)}domContext;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.contentNode=n),this.domContext=new Dr(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),ur(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),et(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),et([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=y(()=>si(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#r)}set snippetProps(t){v(this.#r,t)}#n=y(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...l(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class wl{static create(t){return new wl(t,xi.get())}opts;root;attachment;#t=y(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return l(this.#t)}set isSelected(t){v(this.#t,t)}#e=y(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return l(this.#e)}set isHighlighted(t){v(this.#e,t)}prevHighlighted=new Rp(()=>this.isHighlighted);#r=E(!1);get mounted(){return l(this.#r)}set mounted(t){v(this.#r,t,!0)}constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref),et([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),et(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#n=y(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return l(this.#n)}set snippetProps(t){v(this.#n,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Vs){St(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=y(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":pt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class _l{static create(t){return new _l(t,xi.get())}opts;root;#t=y(()=>this.root.opts.name.current!=="");get shouldRender(){return l(this.#t)}set shouldRender(t){v(this.#t,t)}constructor(t,r){this.opts=t,this.root=r,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=y(()=>({disabled:Qi(this.root.opts.disabled.current),required:Qi(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Sl{static create(t){return new Sl(t,Bo.get())}opts;content;root;attachment;#t=E(0);get prevScrollTop(){return l(this.#t)}set prevScrollTop(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.content=r,this.root=r.root,this.attachment=rt(t.ref,n=>{this.root.viewportNode=n})}#e=y(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ld{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=st;#t=E(!1);get mounted(){return l(this.#t)}set mounted(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.content=r,this.root=r.root,this.attachment=rt(t.ref),et([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),nt(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const r=n=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(n+1),this.opts.delay.current(n))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}#e=y(()=>({id:this.opts.id.current,"aria-hidden":kh(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class xl{static create(t){return new xl(new Ld(t,Bo.get()))}scrollButtonState;content;root;#t=E(!1);get canScrollDown(){return l(this.#t)}set canScrollDown(t){v(this.#t,t,!0)}scrollIntoViewTimer=null;constructor(t){this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,et([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),St(this.root.viewportNode,"scroll",()=>this.handleScroll())}),et([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),et(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=Eh(5,()=>{const r=this.root.highlightedNode;r&&this.root.scrollHighlightedNodeIntoView(r)}))})}handleScroll=(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<r-n};handleAutoScroll=()=>{const t=this.root.viewportNode,r=this.root.highlightedNode;!t||!r||(t.scrollTop=t.scrollTop+r.offsetHeight)};#e=y(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Cl{static create(t){return new Cl(new Ld(t,Bo.get()))}scrollButtonState;content;root;#t=E(!1);get canScrollUp(){return l(this.#t)}set canScrollUp(t){v(this.#t,t,!0)}constructor(t){this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,et([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),St(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-r>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#e=y(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}function vs(e,t){B(t,!0);let r=m(t,"value",15);const n=_l.create({value:_(()=>r())});var i=A(),o=P(i);{var s=a=>{el(a,bt(()=>n.props,{get autocomplete(){return t.autocomplete},get value(){return r()},set value(c){r(c)}}))};N(o,a=>{n.shouldRender&&a(s)})}x(e,i),V()}function Bd(e,t){B(t,!0);let r=m(t,"tooltip",3,!1);go.create({id:_(()=>t.id),virtualEl:_(()=>t.virtualEl),ref:t.ref},r());var n=A(),i=P(n);M(i,()=>t.children??L),x(e,n),V()}var Vy=Vn('<svg viewBox="0 0 30 10" preserveAspectRatio="none" data-arrow=""><polygon points="0,0 30,0 15,10" fill="currentColor"></polygon></svg>'),Hy=W("<span><!></span>");function Wy(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"width",3,10),i=m(t,"height",3,5),o=G(t,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const s=y(()=>q(o,{id:r()}));var a=A(),c=P(a);{var u=p=>{var h=A(),f=P(h);M(f,()=>t.child,()=>({props:l(s)})),x(p,h)},d=p=>{var h=Hy();J(h,()=>({...l(s)}));var f=Y(h);{var g=w=>{var S=A(),C=P(S);M(C,()=>t.children??L),x(w,S)},b=w=>{var S=Vy();Jt(()=>{_t(S,"width",n()),_t(S,"height",i())}),x(w,S)};N(f,w=>{t.children?w(g):w(b,-1)})}U(h),x(p,h)};N(c,p=>{t.child?p(u):p(d,-1)})}x(e,a),V()}function Uy(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"ref",15,null),i=G(t,["$$slots","$$events","$$legacy","id","ref"]);const o=pl.create({id:_(()=>r()),ref:_(()=>n(),a=>n(a))}),s=y(()=>q(i,o.props));Wy(e,bt(()=>l(s))),V()}function zy(e,t){B(t,!0);let r=m(t,"side",3,"bottom"),n=m(t,"sideOffset",3,0),i=m(t,"align",3,"center"),o=m(t,"alignOffset",3,0),s=m(t,"arrowPadding",3,0),a=m(t,"avoidCollisions",3,!0),c=m(t,"collisionBoundary",19,()=>[]),u=m(t,"collisionPadding",3,0),d=m(t,"hideWhenDetached",3,!1),p=m(t,"onPlaced",3,()=>{}),h=m(t,"sticky",3,"partial"),f=m(t,"updatePositionStrategy",3,"optimized"),g=m(t,"strategy",3,"fixed"),b=m(t,"dir",3,"ltr"),w=m(t,"style",19,()=>({})),S=m(t,"wrapperId",19,qr),C=m(t,"customAnchor",3,null),T=m(t,"tooltip",3,!1);const D=fo.create({side:_(()=>r()),sideOffset:_(()=>n()),align:_(()=>i()),alignOffset:_(()=>o()),id:_(()=>t.id),arrowPadding:_(()=>s()),avoidCollisions:_(()=>a()),collisionBoundary:_(()=>c()),collisionPadding:_(()=>u()),hideWhenDetached:_(()=>d()),onPlaced:_(()=>p()),sticky:_(()=>h()),updatePositionStrategy:_(()=>f()),strategy:_(()=>g()),dir:_(()=>b()),style:_(()=>w()),enabled:_(()=>t.enabled),wrapperId:_(()=>S()),customAnchor:_(()=>C())},T()),k=y(()=>q(D.wrapperProps,{style:{pointerEvents:"auto"}}));var O=A(),I=P(O);M(I,()=>t.content??L,()=>({props:D.props,wrapperProps:l(k)})),x(e,O),V()}function Yy(e,t){B(t,!0),pi(()=>{t.onPlaced?.()});var r=A(),n=P(r);M(n,()=>t.content??L,()=>({props:{},wrapperProps:{}})),x(e,r),V()}const Ky=_e({component:"separator",parts:["root"]});class Pl{static create(t){return new Pl(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(t.ref)}#t=y(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":this.opts.orientation.current,"aria-hidden":kh(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[Ky.root]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var jy=W("<div><!></div>");function E1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"decorative",3,!1),s=m(t,"orientation",3,"horizontal"),a=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]);const c=Pl.create({ref:_(()=>i(),g=>i(g)),id:_(()=>n()),decorative:_(()=>o()),orientation:_(()=>s())}),u=y(()=>q(a,c.props));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);M(w,()=>t.child,()=>({props:l(u)})),x(g,b)},f=g=>{var b=jy();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}function qy(e,t){let r=m(t,"isStatic",3,!1),n=G(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=A(),o=P(i);{var s=c=>{Yy(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{zy(c,bt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>n))};N(o,c=>{r()?c(s):c(a,-1)})}x(e,i)}var Xy=W("<!> <!>",1);function Vd(e,t){B(t,!0);let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=m(t,"tooltip",3,!1),c=m(t,"contentPointerEvents",3,"auto"),u=G(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const d=y(()=>t.preventScroll??!0),p=y(()=>t.strategy??(l(d)?"fixed":"absolute"));qy(e,{get isStatic(){return s()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return l(p)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get enabled(){return t.enabled},get tooltip(){return a()},content:(f,g)=>{let b=()=>g?.().props,w=()=>g?.().wrapperProps;var S=Xy(),C=P(S);{var T=O=>{oo(O,{get preventScroll(){return l(d)}})},D=O=>{oo(O,{get preventScroll(){return l(d)}})};N(C,O=>{t.forceMount&&t.enabled?O(T):t.forceMount||O(D,1)})}var k=ae(C,2);Jh(k,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return n()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(I,F)=>{let z=()=>F?.().props;Zh(I,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(R,X)=>{Gh(R,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return r()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(K,Q)=>{let ht=()=>Q?.().props;Qh(K,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(xt,vt)=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:q(u,b(),ht(),z(),{style:{pointerEvents:c()}}),wrapperProps:w()}));M($,()=>t.popper??L,()=>l(gt))}x(xt,Z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(f,S)},$$slots:{content:!0}}),V()}function Tl(e,t){let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=G(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=A(),u=P(c);{var d=p=>{Vd(p,bt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return s()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return n()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};N(u,p=>{t.shouldRender&&p(d)})}x(e,c)}function Al(e,t){let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=G(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Vd(e,bt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return s()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return n()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Gy=W("<div><div><!></div></div>"),Zy=W("<div><div><!></div></div>");function I1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=m(t,"side",3,"bottom"),a=m(t,"onInteractOutside",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"preventScroll",3,!1),d=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const p=yl.create({id:_(()=>n()),ref:_(()=>i(),S=>i(S)),onInteractOutside:_(()=>a()),onEscapeKeydown:_(()=>c())}),h=y(()=>q(d,p.props));var f=A(),g=P(f);{var b=S=>{Al(S,bt(()=>l(h),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return s()},get enabled(){return p.root.opts.open.current},get id(){return n()},get preventScroll(){return u()},forceMount:!0,get shouldRender(){return p.shouldRender},popper:(T,D)=>{let k=()=>D?.().props,O=()=>D?.().wrapperProps;const I=y(()=>q(k(),{style:p.props.style},{style:t.style}));var F=A(),z=P(F);{var R=H=>{var K=A(),Q=P(K);{let ht=y(()=>({props:l(I),wrapperProps:O(),...p.snippetProps}));M(Q,()=>t.child,()=>l(ht))}x(H,K)},X=H=>{var K=Gy();J(K,()=>({...O()}));var Q=Y(K);J(Q,()=>({...l(I)}));var ht=Y(Q);M(ht,()=>t.children??L),U(Q),U(K),x(H,K)};N(z,H=>{t.child?H(R):H(X,-1)})}x(T,F)},$$slots:{popper:!0}}))},w=S=>{Tl(S,bt(()=>l(h),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return s()},get open(){return p.root.opts.open.current},get id(){return n()},get preventScroll(){return u()},forceMount:!1,get shouldRender(){return p.shouldRender},popper:(T,D)=>{let k=()=>D?.().props,O=()=>D?.().wrapperProps;const I=y(()=>q(k(),{style:p.props.style},{style:t.style}));var F=A(),z=P(F);{var R=H=>{var K=A(),Q=P(K);{let ht=y(()=>({props:l(I),wrapperProps:O(),...p.snippetProps}));M(Q,()=>t.child,()=>l(ht))}x(H,K)},X=H=>{var K=Zy();J(K,()=>({...O()}));var Q=Y(K);J(Q,()=>({...l(I)}));var ht=Y(Q);M(ht,()=>t.children??L),U(Q),U(K),x(H,K)};N(z,H=>{t.child?H(R):H(X,-1)})}x(T,F)},$$slots:{popper:!0}}))};N(g,S=>{o()?S(b):o()||S(w,1)})}x(e,f),V()}function Dl(e,t){B(t,!0);let r=m(t,"mounted",15,!1),n=m(t,"onMountedChange",3,st);Io(()=>(r(!0),n()(!0),()=>{r(!1),n()(!1)})),V()}var Jy=W("<div><!></div>"),Qy=W("<!> <!>",1);function M1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"label",19,()=>t.value),s=m(t,"disabled",3,!1),a=m(t,"onHighlight",3,st),c=m(t,"onUnhighlight",3,st),u=G(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const d=wl.create({id:_(()=>n()),ref:_(()=>i(),S=>i(S)),value:_(()=>t.value),disabled:_(()=>s()),label:_(()=>o()),onHighlight:_(()=>a()),onUnhighlight:_(()=>c())}),p=y(()=>q(u,d.props));var h=Qy(),f=P(h);{var g=S=>{var C=A(),T=P(C);{let D=y(()=>({props:l(p),...d.snippetProps}));M(T,()=>t.child,()=>l(D))}x(S,C)},b=S=>{var C=Jy();J(C,()=>({...l(p)}));var T=Y(C);M(T,()=>t.children??L,()=>d.snippetProps),U(C),x(S,C)};N(f,S=>{t.child?S(g):S(b,-1)})}var w=ae(f,2);Dl(w,{get mounted(){return d.mounted},set mounted(S){d.mounted=S}}),x(e,h),V()}var $y=W("<div><!></div>");function k1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const s=Sl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=$y();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var tw=W("<div><!></div>"),ew=W("<!> <!>",1);function N1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"delay",3,()=>50),s=G(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=xl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h)),delay:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=ew(),g=P(f);Dl(g,{get mounted(){return a.scrollButtonState.mounted},set mounted(C){a.scrollButtonState.mounted=C}});var b=ae(g,2);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:s})),x(C,T)},S=C=>{var T=tw();J(T,()=>({...l(c)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(h,f)};N(d,h=>{a.canScrollDown&&h(p)})}x(e,u),V()}var rw=W("<div><!></div>"),nw=W("<!> <!>",1);function F1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"delay",3,()=>50),s=G(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=Cl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h)),delay:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=nw(),g=P(f);Dl(g,{get mounted(){return a.scrollButtonState.mounted},set mounted(C){a.scrollButtonState.mounted=C}});var b=ae(g,2);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:s})),x(C,T)},S=C=>{var T=rw();J(T,()=>({...l(c)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(h,f)};N(d,h=>{a.canScrollUp&&h(p)})}x(e,u),V()}function ms(e,t){const[r,n]=e;let i=!1;const o=t.length;for(let s=0,a=o-1;s<o;a=s++){const[c,u]=t[s]??[0,0],[d,p]=t[a]??[0,0];u>=n!=p>=n&&r<=(d-c)*(n-u)/(p-u)+c&&(i=!i)}return i}function bs(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function ou(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,o=t.top+t.height/2,s=i-r,a=o-n;return Math.abs(s)>Math.abs(a)?s>0?"right":"left":a>0?"bottom":"top"}class Hd{#t;#e;#r;#n=null;#i=null;#o=[];#s=null;#a=null;#l=null;#c(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#u(){this.#c(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#d(),this.#t.onPointerExit())})}#h(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#f(){this.#r!==null&&(this.#h(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#d(),this.#t.onPointerExit())},this.#r))}constructor(t){this.#t=t,this.#e=t.buffer??1;const r=t.transitIntentTimeout;this.#r=typeof r=="number"&&r>0?r:null,et([t.triggerNode,t.contentNode,t.enabled],([n,i,o])=>{if(!n||!i||!o){this.#s=null,this.#d();return}this.#s&&this.#s!==n&&this.#d(),this.#s=n;const s=ya(n),a=h=>{this.#g([h.clientX,h.clientY],n,i)},c=h=>{const f=h.relatedTarget;if(mr(f)&&i.contains(f))return;const g=this.#t.ignoredTargets?.()??[];mr(f)&&g.some(b=>b===f||b.contains(f))||(this.#o=mr(f)&&g.length>0?g.filter(b=>f.contains(b)):[],this.#n=[h.clientX,h.clientY],this.#i="content",this.#u())},u=()=>{this.#d()},d=()=>{this.#d()},p=h=>{const f=h.relatedTarget;mr(f)&&n.contains(f)||(this.#n=[h.clientX,h.clientY],this.#i="trigger",this.#u())};return[St(s,"pointermove",a),St(n,"pointerleave",c),St(n,"pointerenter",u),St(i,"pointerenter",d),St(i,"pointerleave",p)].reduce((h,f)=>()=>{h(),f()},()=>{})})}#g(t,r,n){if(!this.#n||!this.#i)return;this.#c(),this.#f();const i=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#i==="content"&&bs(t,o)){this.#d();return}if(this.#i==="trigger"&&bs(t,i)){this.#d();return}if(this.#i==="content"&&this.#o.length>0)for(const d of this.#o){const p=d.getBoundingClientRect();if(bs(t,p))return;const h=ou(i,p),f=this.#p(i,p,h);if(f&&ms(t,f))return}const s=ou(i,o),a=this.#p(i,o,s);if(a&&ms(t,a))return;const c=this.#i==="content"?o:i,u=this.#v(this.#n,c,s,this.#i);ms(t,u)||(this.#d(),this.#t.onPointerExit())}#d(){this.#n=null,this.#i=null,this.#o=[],this.#c(),this.#h()}#p(t,r,n){const i=this.#e;switch(n){case"top":return[[Math.min(t.left,r.left)-i,t.top],[Math.min(t.left,r.left)-i,r.bottom],[Math.max(t.right,r.right)+i,r.bottom],[Math.max(t.right,r.right)+i,t.top]];case"bottom":return[[Math.min(t.left,r.left)-i,t.bottom],[Math.min(t.left,r.left)-i,r.top],[Math.max(t.right,r.right)+i,r.top],[Math.max(t.right,r.right)+i,t.bottom]];case"left":return[[t.left,Math.min(t.top,r.top)-i],[r.right,Math.min(t.top,r.top)-i],[r.right,Math.max(t.bottom,r.bottom)+i],[t.left,Math.max(t.bottom,r.bottom)+i]];case"right":return[[t.right,Math.min(t.top,r.top)-i],[r.left,Math.min(t.top,r.top)-i],[r.left,Math.max(t.bottom,r.bottom)+i],[t.right,Math.max(t.bottom,r.bottom)+i]]}}#v(t,r,n,i){const o=this.#e*4,[s,a]=t;switch(i==="trigger"?this.#m(n):n){case"top":return[[s-o,a+o],[s+o,a+o],[r.right+o,r.bottom],[r.right+o,r.top],[r.left-o,r.top],[r.left-o,r.bottom]];case"bottom":return[[s-o,a-o],[s+o,a-o],[r.right+o,r.top],[r.right+o,r.bottom],[r.left-o,r.bottom],[r.left-o,r.top]];case"left":return[[s+o,a-o],[s+o,a+o],[r.right,r.bottom+o],[r.left,r.bottom+o],[r.left,r.top-o],[r.right,r.top-o]];case"right":return[[s-o,a-o],[s-o,a+o],[r.left,r.bottom+o],[r.right,r.bottom+o],[r.right,r.top-o],[r.left,r.top-o]]}}#m(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const po=_e({component:"popover",parts:["root","trigger","content","close","overlay"]}),Vo=new Vt("Popover.Root");class Ol{static create(t){return Vo.set(new Ol(t))}opts;#t=E(null);get contentNode(){return l(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#e=E(null);get triggerNode(){return l(this.#e)}set triggerNode(t){v(this.#e,t,!0)}#r=E(null);get overlayNode(){return l(this.#r)}set overlayNode(t){v(this.#r,t,!0)}overlayPresence;#n=E(!1);get openedViaHover(){return l(this.#n)}set openedViaHover(t){v(this.#n,t,!0)}#i=E(!1);get hasInteractedWithContent(){return l(this.#i)}set hasInteractedWithContent(t){v(this.#i,t,!0)}#o=E(!1);get hoverCooldown(){return l(this.#o)}set hoverCooldown(t){v(this.#o,t,!0)}#s=E(0);get closeDelay(){return l(this.#s)}set closeDelay(t){v(this.#s,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new cn({ref:_(()=>this.overlayNode),open:this.opts.open}),et(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(t){this.#l=t}#c(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class El{static create(t){return new El(t,Vo.get())}opts;root;attachment;domContext;#t=null;#e=null;#r=E(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Dr(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),et(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#i(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#o(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||$i(t)||(v(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&($i(t)||(v(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#o(),l(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}l(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===lr||t.key===Ue)&&(t.preventDefault(),this.#o(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=y(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":fe(this.root.opts.open.current),"data-state":jr(this.root.opts.open.current),"aria-controls":this.#s(),[po.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#a)}set props(t){v(this.#a,t)}}class Il{static create(t){return new Il(t,Vo.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Hd({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const r=t.target;mr(r)&&Av(r)&&this.root.markInteraction()}onpointerenter(t){$i(t)||this.root.cancelDelayedClose()}onpointerleave(t){$i(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!mr(t.target))return;const r=t.target.closest(po.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(mr(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,tabindex:-1,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),[po.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}class Ml{static create(t){return new Ml(t,Vo.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.root.handleClose()}onkeydown(t){(t.key===lr||t.key===Ue)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,onclick:this.onclick,onkeydown:this.onkeydown,type:"button",[po.close]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var iw=W("<div><div><!></div></div>"),ow=W("<div><div><!></div></div>");function R1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"forceMount",3,!1),s=m(t,"onOpenAutoFocus",3,st),a=m(t,"onCloseAutoFocus",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"onInteractOutside",3,st),d=m(t,"trapFocus",3,!0),p=m(t,"preventScroll",3,!1),h=m(t,"customAnchor",3,null),f=G(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const g=Il.create({id:_(()=>i()),ref:_(()=>n(),O=>n(O)),onInteractOutside:_(()=>u()),onEscapeKeydown:_(()=>c()),customAnchor:_(()=>h())}),b=y(()=>q(f,g.props)),w=y(()=>d()&&g.shouldTrapFocus);function S(O){g.shouldTrapFocus||O.preventDefault(),s()(O)}var C=A(),T=P(C);{var D=O=>{Al(O,bt(()=>l(b),()=>g.popperProps,{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return l(w)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:S,get onCloseAutoFocus(){return a()},get shouldRender(){return g.shouldRender},popper:(F,z)=>{let R=()=>z?.().props,X=()=>z?.().wrapperProps;const H=y(()=>q(R(),{style:si("popover")},{style:t.style}));var K=A(),Q=P(K);{var ht=vt=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:l(H),wrapperProps:X(),...g.snippetProps}));M($,()=>t.child,()=>l(gt))}x(vt,Z)},xt=vt=>{var Z=iw();J(Z,()=>({...X()}));var $=Y(Z);J($,()=>({...l(H)}));var gt=Y($);M(gt,()=>t.children??L),U($),U(Z),x(vt,Z)};N(Q,vt=>{t.child?vt(ht):vt(xt,-1)})}x(F,K)},$$slots:{popper:!0}}))},k=O=>{Tl(O,bt(()=>l(b),()=>g.popperProps,{get ref(){return g.opts.ref},get open(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return l(w)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:S,get onCloseAutoFocus(){return a()},get shouldRender(){return g.shouldRender},popper:(F,z)=>{let R=()=>z?.().props,X=()=>z?.().wrapperProps;const H=y(()=>q(R(),{style:si("popover")},{style:t.style}));var K=A(),Q=P(K);{var ht=vt=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:l(H),wrapperProps:X(),...g.snippetProps}));M($,()=>t.child,()=>l(gt))}x(vt,Z)},xt=vt=>{var Z=ow();J(Z,()=>({...X()}));var $=Y(Z);J($,()=>({...l(H)}));var gt=Y($);M(gt,()=>t.children??L),U($),U(Z),x(vt,Z)};N(Q,vt=>{t.child?vt(ht):vt(xt,-1)})}x(F,K)},$$slots:{popper:!0}}))};N(T,O=>{o()?O(D):o()||O(k,1)})}x(e,C),V()}var sw=W("<button><!></button>");function L1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"type",3,"button"),s=m(t,"disabled",3,!1),a=m(t,"openOnHover",3,!1),c=m(t,"openDelay",3,700),u=m(t,"closeDelay",3,300),d=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=El.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f)),disabled:_(()=>!!s()),openOnHover:_(()=>a()),openDelay:_(()=>c()),closeDelay:_(()=>u())}),h=y(()=>q(d,p.props,{type:o()}));Bd(e,{get id(){return n()},get ref(){return p.opts.ref},children:(f,g)=>{var b=A(),w=P(b);{var S=T=>{var D=A(),k=P(D);M(k,()=>t.child,()=>({props:l(h)})),x(T,D)},C=T=>{var D=sw();J(D,()=>({...l(h)}));var k=Y(D);M(k,()=>t.children??L),U(D),x(T,D)};N(w,T=>{t.child?T(S):T(C,-1)})}x(f,b)},$$slots:{default:!0}}),V()}var aw=W("<button><!></button>");function B1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const s=Ml.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=aw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}function V1(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"onOpenChange",3,st),i=m(t,"onOpenChangeComplete",3,st);xa.create({variant:_(()=>"dialog"),open:_(()=>r(),a=>{r(a),n()(a)}),onOpenChangeComplete:_(()=>i())});var o=A(),s=P(o);M(s,()=>t.children??L),x(e,o),V()}var lw=W("<button><!></button>");function H1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"disabled",3,!1),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=Ca.create({variant:_(()=>"close"),id:_(()=>n()),ref:_(()=>i(),f=>i(f)),disabled:_(()=>!!o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=lw();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var cw=W("<!> <!>",1),uw=W("<!> <div><!></div>",1);function W1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=m(t,"onCloseAutoFocus",3,st),a=m(t,"onOpenAutoFocus",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"onInteractOutside",3,st),d=m(t,"trapFocus",3,!0),p=m(t,"preventScroll",3,!0),h=m(t,"restoreScrollDelay",3,null),f=G(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const g=Aa.create({id:_(()=>n()),ref:_(()=>i(),T=>i(T))}),b=y(()=>q(f,g.props));var w=A(),S=P(w);{var C=T=>{Jh(T,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return d()},get enabled(){return g.root.opts.open.current},get onOpenAutoFocus(){return a()},get onCloseAutoFocus(){return s()},focusScope:(k,O)=>{let I=()=>O?.().props;Zh(k,bt(()=>l(b),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:F=>{c()(F),!F.defaultPrevented&&g.root.handleClose()},children:(F,z)=>{Gh(F,bt(()=>l(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},onInteractOutside:R=>{u()(R),!R.defaultPrevented&&g.root.handleClose()},children:(R,X)=>{Qh(R,bt(()=>l(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(H,K)=>{var Q=A(),ht=P(Q);{var xt=Z=>{var $=cw(),gt=P($);{var It=Ut=>{oo(Ut,{get preventScroll(){return p()},get restoreScrollDelay(){return h()}})};N(gt,Ut=>{g.root.opts.open.current&&Ut(It)})}var kt=ae(gt,2);{let Ut=y(()=>({props:q(l(b),I()),...g.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(Z,$)},vt=Z=>{var $=uw(),gt=P($);oo(gt,{get preventScroll(){return p()}});var It=ae(gt,2);J(It,Ut=>({...Ut}),[()=>q(l(b),I())]);var kt=Y(It);M(kt,()=>t.children??L),U(It),x(Z,$)};N(ht,Z=>{t.child?Z(xt):Z(vt,-1)})}x(H,Q)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};N(S,T=>{(g.shouldRender||o())&&T(C)})}x(e,w),V()}const hw=_e({component:"label",parts:["root"]});class kl{static create(t){return new kl(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(t){t.detail>1&&t.preventDefault()}#t=y(()=>({id:this.opts.id.current,[hw.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var dw=W("<label><!></label>");function U1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const s=kl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props,{for:t.for}));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=dw();J(f,()=>({...l(a),for:t.for}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}class Nn{#t;#e;constructor(t,r){this.#t=t,this.#e=r,this.handler=this.handler.bind(this),nt(this.handler)}handler(){let t=0;const r=this.#t();if(!r)return;const n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(this.#e)});return n.observe(r),()=>{window.cancelAnimationFrame(t),n.unobserve(r)}}}class fw{opts;present;#t;#e=E(!1);#r=!1;#n=E(void 0);#i=null;constructor(t){this.opts=t,this.present=this.opts.open,v(this.#e,t.open.current,!0),this.#t=new Lh({ref:this.opts.ref,afterTick:this.opts.open}),ur(()=>this.#s()),et(()=>this.present.current,r=>{if(!this.#r){this.#r=!0;return}this.#s(),r&&v(this.#e,!0),v(this.#n,r?"starting":"ending",!0),r&&(this.#i=window.requestAnimationFrame(()=>{this.#i=null,this.present.current&&v(this.#n,void 0)})),this.#t.run(()=>{r===this.present.current&&(r||v(this.#e,!1),v(this.#n,void 0))})})}#o=y(()=>l(this.#e));get isPresent(){return l(this.#o)}set isPresent(t){v(this.#o,t)}get transitionStatus(){return l(this.#n)}#s(){this.#i!==null&&(window.cancelAnimationFrame(this.#i),this.#i=null)}}function Ho(e,t){B(t,!0);const r=new fw({open:_(()=>t.open),ref:t.ref});var n=A(),i=P(n);{var o=s=>{var a=A(),c=P(a);M(c,()=>t.presence??L,()=>({present:r.isPresent,transitionStatus:r.transitionStatus})),x(s,a)};N(i,s=>{(t.forceMount||t.open||r.isPresent)&&s(o)})}x(e,n),V()}function z1(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"onOpenChange",3,st),i=m(t,"onOpenChangeComplete",3,st);Ol.create({open:_(()=>r(),o=>{r(o),n()(o)}),onOpenChangeComplete:_(()=>i())}),ml(e,{children:(o,s)=>{var a=A(),c=P(a);M(c,()=>t.children??L),x(o,a)},$$slots:{default:!0}}),V()}function gw(e,t,r){return Math.min(r,Math.max(t,e))}class pw{state;#t;constructor(t,r){this.state=le(t),this.#t=r,this.dispatch=this.dispatch.bind(this)}#e(t){return this.#t[this.state.current][t]??this.state.current}dispatch(t){this.state.current=this.#e(t)}}const Ci=_e({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),Pi=new Vt("ScrollArea.Root"),Ti=new Vt("ScrollArea.Scrollbar"),Wo=new Vt("ScrollArea.ScrollbarVisible"),Nl=new Vt("ScrollArea.ScrollbarAxis"),Wd=new Vt("ScrollArea.ScrollbarShared");class Fl{static create(t){return Pi.set(new Fl(t))}opts;attachment;#t=E(null);get scrollAreaNode(){return l(this.#t)}set scrollAreaNode(t){v(this.#t,t,!0)}#e=E(null);get viewportNode(){return l(this.#e)}set viewportNode(t){v(this.#e,t,!0)}#r=E(null);get contentNode(){return l(this.#r)}set contentNode(t){v(this.#r,t,!0)}#n=E(null);get scrollbarXNode(){return l(this.#n)}set scrollbarXNode(t){v(this.#n,t,!0)}#i=E(null);get scrollbarYNode(){return l(this.#i)}set scrollbarYNode(t){v(this.#i,t,!0)}#o=E(0);get cornerWidth(){return l(this.#o)}set cornerWidth(t){v(this.#o,t,!0)}#s=E(0);get cornerHeight(){return l(this.#s)}set cornerHeight(t){v(this.#s,t,!0)}#a=E(!1);get scrollbarXEnabled(){return l(this.#a)}set scrollbarXEnabled(t){v(this.#a,t,!0)}#l=E(!1);get scrollbarYEnabled(){return l(this.#l)}set scrollbarYEnabled(t){v(this.#l,t,!0)}domContext;constructor(t){this.opts=t,this.attachment=rt(t.ref,r=>this.scrollAreaNode=r),this.domContext=new Dr(t.ref)}#c=y(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[Ci.root]:"",...this.attachment}));get props(){return l(this.#c)}set props(t){v(this.#c,t)}}class Rl{static create(t){return new Rl(t,Pi.get())}opts;root;attachment;#t=le(qr());#e=le(null);contentAttachment=rt(this.#e,t=>this.root.contentNode=t);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.viewportNode=n)}#r=y(()=>({id:this.opts.id.current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[Ci.viewport]:"",...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}#n=y(()=>({id:this.#t.current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return l(this.#n)}set contentProps(t){v(this.#n,t)}}class Ll{static create(t){return Ti.set(new Ll(t,Pi.get()))}opts;root;#t=y(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){return l(this.#t)}set isHorizontal(t){v(this.#t,t)}#e=E(!1);get hasThumb(){return l(this.#e)}set hasThumb(t){v(this.#e,t,!0)}constructor(t,r){this.opts=t,this.root=r,et(()=>this.isHorizontal,n=>n?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class Bl{static create(){return new Bl(Ti.get())}scrollbar;root;#t=E(!1);get isVisible(){return l(this.#t)}set isVisible(t){v(this.#t,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root,nt(()=>{const r=this.root.scrollAreaNode,n=this.root.opts.scrollHideDelay.current;let i=0;if(!r)return;const o=()=>{this.root.domContext.clearTimeout(i),Et(()=>this.isVisible=!0)},s=()=>{i&&this.root.domContext.clearTimeout(i),i=this.root.domContext.setTimeout(()=>{Et(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},n)},a=xn(St(r,"pointerenter",o),St(r,"pointerleave",s));return()=>{this.root.domContext.getWindow().clearTimeout(i),a()}})}#e=y(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Vl{static create(){return new Vl(Ti.get())}scrollbar;root;machine=new pw("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});#t=y(()=>this.machine.state.current==="hidden");get isHidden(){return l(this.#t)}set isHidden(t){v(this.#t,t)}constructor(t){this.scrollbar=t,this.root=t.root;const r=Eo(()=>this.machine.dispatch("SCROLL_END"),100);nt(()=>{const n=this.machine.state.current,i=this.root.opts.scrollHideDelay.current;if(n==="idle"){const o=this.root.domContext.setTimeout(()=>this.machine.dispatch("HIDE"),i);return()=>this.root.domContext.clearTimeout(o)}}),nt(()=>{const n=this.root.viewportNode;if(!n)return;const i=this.scrollbar.isHorizontal?"scrollLeft":"scrollTop";let o=n[i];return St(n,"scroll",()=>{const c=n[i];o!==c&&(this.machine.dispatch("SCROLL"),r()),o=c})}),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(t){this.machine.dispatch("POINTER_ENTER")}onpointerleave(t){this.machine.dispatch("POINTER_LEAVE")}#e=y(()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Uo{static create(){return new Uo(Ti.get())}scrollbar;root;#t=E(!1);get isVisible(){return l(this.#t)}set isVisible(t){v(this.#t,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root;const r=Eo(()=>{const n=this.root.viewportNode;if(!n)return;const i=n.offsetWidth<n.scrollWidth,o=n.offsetHeight<n.scrollHeight;this.isVisible=this.scrollbar.isHorizontal?i:o},10);new Nn(()=>this.root.viewportNode,r),new Nn(()=>this.root.contentNode,r)}#e=y(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Hl{static create(){return Wo.set(new Hl(Ti.get()))}scrollbar;root;#t=E(null);get thumbNode(){return l(this.#t)}set thumbNode(t){v(this.#t,t,!0)}#e=E(0);get pointerOffset(){return l(this.#e)}set pointerOffset(t){v(this.#e,t,!0)}#r=E({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return l(this.#r)}set sizes(t){v(this.#r,t)}#n=y(()=>Ud(this.sizes.viewport,this.sizes.content));get thumbRatio(){return l(this.#n)}set thumbRatio(t){v(this.#n,t)}#i=y(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){return l(this.#i)}set hasThumb(t){v(this.#i,t)}#o=E("");get prevTransformStyle(){return l(this.#o)}set prevTransformStyle(t){v(this.#o,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root,nt(()=>{this.scrollbar.hasThumb=this.hasThumb}),nt(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(t){this.sizes=t}getScrollPosition(t,r){return vw({pointerPos:t,pointerOffset:this.pointerOffset,sizes:this.sizes,dir:r})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(t){this.pointerOffset=t}xOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const t=this.root.viewportNode.scrollLeft,n=`translate3d(${su({scrollPos:t,sizes:this.sizes,dir:this.root.opts.dir.current})}px, 0, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}xOnWheelScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=t)}xOnDragScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this.getScrollPosition(t,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const t=this.root.viewportNode.scrollTop,n=`translate3d(0, ${su({scrollPos:t,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}yOnWheelScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollTop=t)}yOnDragScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollTop=this.getScrollPosition(t,this.root.opts.dir.current))}}class Wl{static create(t){return Nl.set(new Wl(t,Wo.get()))}opts;scrollbarVis;root;scrollbar;attachment;#t=E();get computedStyle(){return l(this.#t)}set computedStyle(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=rt(this.scrollbar.opts.ref,n=>this.root.scrollbarXNode=n),nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),nt(()=>{this.onResize()})}onThumbPointerDown=t=>{this.scrollbarVis.onThumbPointerDown(t.x)};onDragScroll=t=>{this.scrollbarVis.xOnDragScroll(t.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(t,r)=>{if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollLeft+t.deltaX;this.scrollbarVis.xOnWheelScroll(n),Yd(n,r)&&t.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:vo(this.computedStyle.paddingLeft),paddingEnd:vo(this.computedStyle.paddingRight)}})};#e=y(()=>zo(this.scrollbarVis.sizes));get thumbSize(){return l(this.#e)}set thumbSize(t){v(this.#e,t)}#r=y(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class Ul{static create(t){return Nl.set(new Ul(t,Wo.get()))}opts;scrollbarVis;root;scrollbar;attachment;#t=E();get computedStyle(){return l(this.#t)}set computedStyle(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=rt(this.scrollbar.opts.ref,n=>this.root.scrollbarYNode=n),nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),nt(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(t){this.scrollbarVis.onThumbPointerDown(t.y)}onDragScroll(t){this.scrollbarVis.yOnDragScroll(t.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(t,r){if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollTop+t.deltaY;this.scrollbarVis.yOnWheelScroll(n),Yd(n,r)&&t.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:vo(this.computedStyle.paddingTop),paddingEnd:vo(this.computedStyle.paddingBottom)}})}#e=y(()=>zo(this.scrollbarVis.sizes));get thumbSize(){return l(this.#e)}set thumbSize(t){v(this.#e,t)}#r=y(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class zl{static create(){return Wd.set(new zl(Nl.get()))}scrollbarState;root;scrollbarVis;scrollbar;#t=E(null);get rect(){return l(this.#t)}set rect(t){v(this.#t,t)}#e=E("");get prevWebkitUserSelect(){return l(this.#e)}set prevWebkitUserSelect(t){v(this.#e,t,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#r=y(()=>this.scrollbarVis.sizes.content-this.scrollbarVis.sizes.viewport);get maxScrollPos(){return l(this.#r)}set maxScrollPos(t){v(this.#r,t)}constructor(t){this.scrollbarState=t,this.root=t.root,this.scrollbarVis=t.scrollbarVis,this.scrollbar=t.scrollbarVis.scrollbar,this.handleResize=Eo(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState.onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,nt(()=>{const r=this.maxScrollPos,n=this.scrollbar.opts.ref.current;this.root.viewportNode;const i=s=>{const a=s.target;n?.contains(a)&&this.handleWheelScroll(s,r)};return St(this.root.domContext.getDocument(),"wheel",i,{passive:!1})}),Ln(()=>{this.scrollbarVis.sizes,Et(()=>this.handleThumbPositionChange())}),new Nn(()=>this.scrollbar.opts.ref.current,this.handleResize),new Nn(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(t){if(!this.rect)return;const r=t.clientX-this.rect.left,n=t.clientY-this.rect.top;this.scrollbarState.onDragScroll({x:r,y:n})}#n(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(t){if(t.button!==0)return;t.target.setPointerCapture(t.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect,this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(t)}onpointermove(t){this.handleDragScroll(t)}onpointerup(t){const r=t.target;r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId),this.#n()}onlostpointercapture(t){this.#n()}#i=y(()=>q({...this.scrollbarState.props,style:{position:"absolute",...this.scrollbarState.props.style},[Ci.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class Yl{static create(t){return new Yl(t,Wd.get())}opts;scrollbarState;attachment;#t;#e=E();#r=Eo(()=>{l(this.#e)&&(l(this.#e)(),v(this.#e,void 0))},100);constructor(t,r){this.opts=t,this.scrollbarState=r,this.#t=r.root,this.attachment=rt(this.opts.ref,n=>this.scrollbarState.scrollbarVis.thumbNode=n),nt(()=>{const n=this.#t.viewportNode;if(!n)return;const i=()=>{if(this.#r(),!l(this.#e)){const s=mw(n,this.scrollbarState.handleThumbPositionChange);v(this.#e,s,!0),this.scrollbarState.handleThumbPositionChange()}};return Et(()=>this.scrollbarState.handleThumbPositionChange()),St(n,"scroll",i)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(t){const r=t.target;if(!r)return;const n=r.getBoundingClientRect(),i=t.clientX-n.left,o=t.clientY-n.top;this.scrollbarState.handleThumbPointerDown({x:i,y:o})}onpointerup(t){this.scrollbarState.handleThumbPointerUp()}#n=y(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture,onpointerup:this.onpointerup,[Ci.thumb]:"",...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}class Kl{static create(t){return new Kl(t,Pi.get())}opts;root;attachment;#t=E(0);#e=E(0);#r=y(()=>!!(l(this.#t)&&l(this.#e)));get hasSize(){return l(this.#r)}set hasSize(t){v(this.#r,t)}constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),new Nn(()=>this.root.scrollbarXNode,()=>{const n=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=n,v(this.#e,n,!0)}),new Nn(()=>this.root.scrollbarYNode,()=>{const n=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=n,v(this.#t,n,!0)})}#n=y(()=>({id:this.opts.id.current,style:{width:l(this.#t),height:l(this.#e),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[Ci.corner]:"",...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}function vo(e){return e?Number.parseInt(e,10):0}function Ud(e,t){const r=e/t;return Number.isNaN(r)?0:r}function zo(e){const t=Ud(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function vw({pointerPos:e,pointerOffset:t,sizes:r,dir:n="ltr"}){const i=zo(r),o=i/2,s=t||o,a=i-s,c=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,p=n==="ltr"?[0,d]:[d*-1,0];return zd([c,u],p)(e)}function su({scrollPos:e,sizes:t,dir:r="ltr"}){const n=zo(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,a=o-n,c=r==="ltr"?[0,s]:[s*-1,0],u=gw(e,c[0],c[1]);return zd([0,s],[0,a])(u)}function zd(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Yd(e,t){return e>0&&e<t}function mw(e,t){let r={left:e.scrollLeft,top:e.scrollTop},n=0;const i=wa(e);return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,c=r.top!==s.top;(a||c)&&t(),r=s,n=i.requestAnimationFrame(o)})(),()=>i.cancelAnimationFrame(n)}var bw=W("<div><!></div>");function Y1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"type",3,"hover"),s=m(t,"dir",3,"ltr"),a=m(t,"scrollHideDelay",3,600),c=G(t,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const u=Fl.create({type:_(()=>o()),dir:_(()=>s()),scrollHideDelay:_(()=>a()),id:_(()=>i()),ref:_(()=>n(),b=>n(b))}),d=y(()=>q(c,u.props));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);M(S,()=>t.child,()=>({props:l(d)})),x(b,w)},g=b=>{var w=bw();J(w,()=>({...l(d)}));var S=Y(w);M(S,()=>t.children??L),U(w),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}var yw=W("<div><div><!></div></div>");function K1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id","children"]);const s=Rl.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props)),c=y(()=>q({},s.contentProps));var u=yw();J(u,()=>({...l(a)}));var d=Y(u);J(d,()=>({...l(c)}));var p=Y(d);M(p,()=>t.children??L),U(d),U(u),x(e,u),V()}var ww=W("<div><!></div>");function Kd(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy","child","children"]);const n=zl.create(),i=y(()=>q(r,n.props));var o=A(),s=P(o);{var a=u=>{var d=A(),p=P(d);M(p,()=>t.child,()=>({props:l(i)})),x(u,d)},c=u=>{var d=ww();J(d,()=>({...l(i)}));var p=Y(d);M(p,()=>t.children??L),U(d),x(u,d)};N(s,u=>{t.child?u(a):u(c,-1)})}x(e,o),V()}function _w(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=new ba,i=Wl.create({mounted:_(()=>n.current)}),o=y(()=>q(r,i.props));Kd(e,bt(()=>l(o))),V()}function Sw(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=new ba,i=Ul.create({mounted:_(()=>n.current)}),o=y(()=>q(r,i.props));Kd(e,bt(()=>l(o))),V()}function Yo(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=Hl.create();var i=A(),o=P(i);{var s=c=>{_w(c,bt(()=>r))},a=c=>{Sw(c,bt(()=>r))};N(o,c=>{n.scrollbar.opts.orientation.current==="horizontal"?c(s):c(a,-1)})}x(e,i),V()}function xw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Uo.create(),o=y(()=>q(n,i.props));{const s=c=>{Yo(c,bt(()=>l(o)))};let a=y(()=>r()||i.isVisible);Ho(e,{get open(){return l(a)},get ref(){return i.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}})}V()}function Cw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Vl.create(),o=y(()=>q(n,i.props));{const s=c=>{Yo(c,bt(()=>l(o)))};let a=y(()=>r()||!i.isHidden);Ho(e,bt(()=>l(o),{get open(){return l(a)},get ref(){return i.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}}))}V()}function Pw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Bl.create(),o=Uo.create(),s=y(()=>q(n,i.props,o.props,{"data-state":i.isVisible?"visible":"hidden"})),a=y(()=>r()||i.isVisible&&o.isVisible);Ho(e,{get open(){return l(a)},get ref(){return o.scrollbar.opts.ref},presence:u=>{Yo(u,bt(()=>l(s)))},$$slots:{presence:!0}}),V()}function j1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id","orientation"]);const s=Ll.create({orientation:_(()=>t.orientation),id:_(()=>i()),ref:_(()=>n(),g=>n(g))}),a=y(()=>s.root.opts.type.current);var c=A(),u=P(c);{var d=g=>{Pw(g,bt(()=>o,{get id(){return i()}}))},p=g=>{Cw(g,bt(()=>o,{get id(){return i()}}))},h=g=>{xw(g,bt(()=>o,{get id(){return i()}}))},f=g=>{Yo(g,bt(()=>o,{get id(){return i()}}))};N(u,g=>{l(a)==="hover"?g(d):l(a)==="scroll"?g(p,1):l(a)==="auto"?g(h,2):l(a)==="always"&&g(f,3)})}x(e,c),V()}var Tw=W("<div><!></div>");function Aw(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref","id","child","children","present"]);const i=new ba,o=Yl.create({id:_(()=>t.id),ref:_(()=>r(),p=>r(p)),mounted:_(()=>i.current)}),s=y(()=>q(n,o.props,{style:{hidden:!t.present}}));var a=A(),c=P(a);{var u=p=>{var h=A(),f=P(h);M(f,()=>t.child,()=>({props:l(s)})),x(p,h)},d=p=>{var h=Tw();J(h,()=>({...l(s)}));var f=Y(h);M(f,()=>t.children??L),U(h),x(p,h)};N(c,p=>{t.child?p(u):p(d,-1)})}x(e,a),V()}function q1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const a=Wo.get();{const c=(d,p)=>{let h=()=>p?.().present;Aw(d,bt(()=>s,{get id(){return n()},get present(){return h()},get ref(){return i()},set ref(f){i(f)}}))};let u=y(()=>o()||a.hasThumb);Ho(e,{get open(){return l(u)},get ref(){return a.scrollbar.opts.ref},presence:c,$$slots:{presence:!0}})}V()}var Dw=W("<div><!></div>");function Ow(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref","id","children","child"]);const i=Kl.create({id:_(()=>t.id),ref:_(()=>r(),d=>r(d))}),o=y(()=>q(n,i.props));var s=A(),a=P(s);{var c=d=>{var p=A(),h=P(p);M(h,()=>t.child,()=>({props:l(o)})),x(d,p)},u=d=>{var p=Dw();J(p,()=>({...l(o)}));var h=Y(p);M(h,()=>t.children??L),U(p),x(d,p)};N(a,d=>{t.child?d(c):d(u,-1)})}x(e,s),V()}function X1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id"]);const s=Pi.get(),a=y(()=>!!(s.scrollbarXNode&&s.scrollbarYNode)),c=y(()=>s.opts.type.current!=="scroll"&&l(a));var u=A(),d=P(u);{var p=h=>{Ow(h,bt(()=>o,{get id(){return i()},get ref(){return n()},set ref(f){n(f)}}))};N(d,h=>{l(c)&&h(p)})}x(e,u),V()}var Ew=W("<!> <!>",1);function G1(e,t){B(t,!0);let r=m(t,"value",15),n=m(t,"onValueChange",3,st),i=m(t,"name",3,""),o=m(t,"disabled",3,!1),s=m(t,"open",15,!1),a=m(t,"onOpenChange",3,st),c=m(t,"onOpenChangeComplete",3,st),u=m(t,"loop",3,!1),d=m(t,"scrollAlignment",3,"nearest"),p=m(t,"required",3,!1),h=m(t,"items",19,()=>[]),f=m(t,"allowDeselect",3,!1);function g(){r()===void 0&&r(t.type==="single"?"":[])}g(),et.pre(()=>r(),()=>{g()});let b=E("");const w=By.create({type:t.type,value:_(()=>r(),I=>{r(I),n()(I)}),disabled:_(()=>o()),required:_(()=>p()),open:_(()=>s(),I=>{s(I),a()(I)}),loop:_(()=>u()),scrollAlignment:_(()=>d()),name:_(()=>i()),isCombobox:!1,items:_(()=>h()),allowDeselect:_(()=>f()),inputValue:_(()=>l(b),I=>v(b,I,!0)),onOpenChangeComplete:_(()=>c())});var S=Ew(),C=P(S);ml(C,{children:(I,F)=>{var z=A(),R=P(z);M(R,()=>t.children??L),x(I,z)},$$slots:{default:!0}});var T=ae(C,2);{var D=I=>{var F=A(),z=P(F);{var R=H=>{vs(H,{get autocomplete(){return t.autocomplete}})},X=H=>{var K=A(),Q=P(K);En(Q,16,()=>w.opts.value.current,ht=>ht,(ht,xt)=>{vs(ht,{get value(){return xt},get autocomplete(){return t.autocomplete}})}),x(H,K)};N(z,H=>{w.opts.value.current.length===0?H(R):H(X,-1)})}x(I,F)},k=y(()=>Array.isArray(w.opts.value.current)),O=I=>{vs(I,{get autocomplete(){return t.autocomplete},get value(){return w.opts.value.current},set value(F){w.opts.value.current=F}})};N(T,I=>{l(k)?I(D):I(O,-1)})}x(e,S),V()}var Iw=W("<button><!></button>");function Z1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"type",3,"button"),s=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=bl.create({id:_(()=>n()),ref:_(()=>i(),p=>i(p))}),c=y(()=>q(s,a.props,{type:o()}));var u=A(),d=P(u);Mr(d,()=>Bd,(p,h)=>{h(p,{get id(){return n()},get ref(){return a.opts.ref},children:(f,g)=>{var b=A(),w=P(b);{var S=T=>{var D=A(),k=P(D);M(k,()=>t.child,()=>({props:l(c)})),x(T,D)},C=T=>{var D=Iw();J(D,()=>({...l(c)}));var k=Y(D);M(k,()=>t.children??L),U(D),x(T,D)};N(w,T=>{t.child?T(S):T(C,-1)})}x(f,b)},$$slots:{default:!0}})}),x(e,u),V()}const jd=_e({component:"switch",parts:["root","thumb"]}),jl=new Vt("Switch.Root");class ql{static create(t){return jl.set(new ql(t))}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(t.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#t(){this.opts.checked.current=!this.opts.checked.current}onkeydown(t){!(t.key===lr||t.key===Ue)||this.opts.disabled.current||(t.preventDefault(),this.#t())}onclick(t){this.opts.disabled.current||this.#t()}#e=y(()=>({"data-disabled":pt(this.opts.disabled.current),"data-state":Yp(this.opts.checked.current),"data-required":pt(this.opts.required.current)}));get sharedProps(){return l(this.#e)}set sharedProps(t){v(this.#e,t)}#r=y(()=>({checked:this.opts.checked.current}));get snippetProps(){return l(this.#r)}set snippetProps(t){v(this.#r,t)}#n=y(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:Qi(this.opts.disabled.current),"aria-checked":Nh(this.opts.checked.current,!1),"aria-required":fe(this.opts.required.current),[jd.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}class Xl{static create(){return new Xl(jl.get())}root;#t=y(()=>this.root.opts.name.current!==void 0);get shouldRender(){return l(this.#t)}set shouldRender(t){v(this.#t,t)}constructor(t){this.root=t}#e=y(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Gl{static create(t){return new Gl(t,jl.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref)}#t=y(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({...this.root.sharedProps,id:this.opts.id.current,[jd.thumb]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}function Mw(e,t){B(t,!1);const r=Xl.create();Sh();var n=A(),i=P(n);{var o=s=>{el(s,bt(()=>r.props))};N(i,s=>{r.shouldRender&&s(o)})}x(e,n),V()}var kw=W("<button><!></button>"),Nw=W("<!> <!>",1);function J1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"disabled",3,!1),s=m(t,"required",3,!1),a=m(t,"checked",15,!1),c=m(t,"value",3,"on"),u=m(t,"name",3,void 0),d=m(t,"type",3,"button"),p=m(t,"onCheckedChange",3,st),h=G(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const f=ql.create({checked:_(()=>a(),D=>{a(D),p()?.(D)}),disabled:_(()=>o()??!1),required:_(()=>s()),value:_(()=>c()),name:_(()=>u()),id:_(()=>i()),ref:_(()=>n(),D=>n(D))}),g=y(()=>q(h,f.props,{type:d()}));var b=Nw(),w=P(b);{var S=D=>{var k=A(),O=P(k);{let I=y(()=>({props:l(g),...f.snippetProps}));M(O,()=>t.child,()=>l(I))}x(D,k)},C=D=>{var k=kw();J(k,()=>({...l(g)}));var O=Y(k);M(O,()=>t.children??L,()=>f.snippetProps),U(k),x(D,k)};N(w,D=>{t.child?D(S):D(C,-1)})}var T=ae(w,2);Mw(T,{}),x(e,b),V()}var Fw=W("<span><!></span>");function Q1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const s=Gl.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=Fw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L,()=>s.snippetProps),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}const mo=_e({component:"tabs",parts:["root","list","trigger","content"]}),Zl=new Vt("Tabs.Root");class Jl{static create(t){return Zl.set(new Jl(t))}opts;attachment;rovingFocusGroup;#t=E(Zt([]));get triggerIds(){return l(this.#t)}set triggerIds(t){v(this.#t,t,!0)}valueToTriggerId=new Rs;valueToContentId=new Rs;constructor(t){this.opts=t,this.attachment=rt(t.ref),this.rovingFocusGroup=new ev({candidateAttr:mo.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(t,r){return this.triggerIds.push(t),this.valueToTriggerId.set(r,t),()=>{this.triggerIds=this.triggerIds.filter(n=>n!==t),this.valueToTriggerId.delete(r)}}registerContent(t,r){return this.valueToContentId.set(r,t),()=>{this.valueToContentId.delete(r)}}setValue(t){this.opts.value.current=t}#e=y(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[mo.root]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ql{static create(t){return new Ql(t,Zl.get())}opts;root;attachment;#t=y(()=>this.root.opts.disabled.current);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref)}#e=y(()=>({id:this.opts.id.current,role:"tablist","aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[mo.list]:"","data-disabled":pt(l(this.#t)),...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class $l{static create(t){return new $l(t,Zl.get())}opts;root;attachment;#t=E(0);#e=y(()=>this.root.opts.value.current===this.opts.value.current);#r=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);#n=y(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref),et([()=>this.opts.id.current,()=>this.opts.value.current],([n,i])=>this.root.registerTrigger(n,i)),nt(()=>{this.root.triggerIds.length,l(this.#e)||!this.root.opts.value.current?v(this.#t,0):v(this.#t,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(t){this.root.opts.activationMode.current!=="automatic"||l(this.#r)||this.#i()}onclick(t){l(this.#r)||this.#i()}onkeydown(t){if(!l(this.#r)){if(t.key===Ue||t.key===lr){t.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t)}}#o=y(()=>({id:this.opts.id.current,role:"tab","data-state":Rw(l(this.#e)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(l(this.#r)),"aria-selected":fe(l(this.#e)),"aria-controls":l(this.#n),[mo.trigger]:"",disabled:Qi(l(this.#r)),tabindex:l(this.#t),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}function Rw(e){return e?"active":"inactive"}var Lw=W("<div><!></div>");function $1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"value",15,""),s=m(t,"onValueChange",3,st),a=m(t,"orientation",3,"horizontal"),c=m(t,"loop",3,!0),u=m(t,"activationMode",3,"automatic"),d=m(t,"disabled",3,!1),p=G(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","orientation","loop","activationMode","disabled","children","child"]);const h=Jl.create({id:_(()=>n()),value:_(()=>o(),C=>{o(C),s()(C)}),orientation:_(()=>a()),loop:_(()=>c()),activationMode:_(()=>u()),disabled:_(()=>d()),ref:_(()=>i(),C=>i(C))}),f=y(()=>q(p,h.props));var g=A(),b=P(g);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:l(f)})),x(C,T)},S=C=>{var T=Lw();J(T,()=>({...l(f)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(e,g),V()}var Bw=W("<div><!></div>");function t_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const s=Ql.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=Bw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var Vw=W("<button><!></button>");function e_(e,t){const r=at();B(t,!0);let n=m(t,"disabled",3,!1),i=m(t,"id",19,()=>lt(r)),o=m(t,"type",3,"button"),s=m(t,"ref",15,null),a=G(t,["$$slots","$$events","$$legacy","child","children","disabled","id","type","value","ref"]);const c=$l.create({id:_(()=>i()),disabled:_(()=>n()??!1),value:_(()=>t.value),ref:_(()=>s(),g=>s(g))}),u=y(()=>q(a,c.props,{type:o()}));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);M(w,()=>t.child,()=>({props:l(u)})),x(g,b)},f=g=>{var b=Vw();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}class Gs{#t;#e;#r=null;constructor(t,r){this.#e=t,this.#t=r,this.stop=this.stop.bind(this),this.start=this.start.bind(this),ur(this.stop)}#n(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#n()}start(...t){this.#n(),this.#r=window.setTimeout(()=>{this.#r=null,this.#e(...t)},this.#t)}}const qd=_e({component:"tooltip",parts:["content","trigger"]}),Xd=new Vt("Tooltip.Provider"),tc=new Vt("Tooltip.Root");class Hw{#t=E(Zt(new Map));get triggers(){return l(this.#t)}set triggers(t){v(this.#t,t,!0)}#e=E(null);get activeTriggerId(){return l(this.#e)}set activeTriggerId(t){v(this.#e,t,!0)}#r=y(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.node??null});get activeTriggerNode(){return l(this.#r)}set activeTriggerNode(t){v(this.#r,t)}#n=y(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.payload??null});get activePayload(){return l(this.#n)}set activePayload(t){v(this.#n,t)}register=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#i()};update=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#i()};unregister=t=>{if(!this.triggers.has(t))return;const r=new Map(this.triggers);r.delete(t),this.triggers=r,this.activeTriggerId===t&&(this.activeTriggerId=null)};setActiveTrigger=t=>{if(t===null){this.activeTriggerId=null;return}if(!this.triggers.has(t)){this.activeTriggerId=null;return}this.activeTriggerId=t};get=t=>this.triggers.get(t);has=t=>this.triggers.has(t);getFirstTriggerId=()=>{const t=this.triggers.entries().next();return t.done?null:t.value[0]};#i=()=>{const t=this.activeTriggerId;t!==null&&(this.triggers.has(t)||(this.activeTriggerId=null))}}class ec{static create(t){return Xd.set(new ec(t))}opts;#t=E(!0);get isOpenDelayed(){return l(this.#t)}set isOpenDelayed(t){v(this.#t,t,!0)}isPointerInTransit=le(!1);#e;#r=E(null);constructor(t){this.opts=t,this.#e=new Gs(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),Io(()=>St(window,"scroll",r=>{const n=l(this.#r);if(!n)return;const i=n.triggerNode;if(!i)return;const o=r.target;(o instanceof Element||o instanceof Document)&&o.contains(i)&&n.handleClose()}))}#n=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}else this.#e.start()};#i=()=>{this.#e.stop()};onOpen=t=>{l(this.#r)&&l(this.#r)!==t&&l(this.#r).handleClose(),this.#i(),this.isOpenDelayed=!1,v(this.#r,t,!0)};onClose=t=>{l(this.#r)===t&&(v(this.#r,null),this.#n())};isTooltipOpen=t=>l(this.#r)===t}class rc{static create(t){return tc.set(new rc(t,Xd.get()))}opts;provider;#t=y(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return l(this.#t)}set delayDuration(t){v(this.#t,t)}#e=y(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return l(this.#e)}set disableHoverableContent(t){v(this.#e,t)}#r=y(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return l(this.#r)}set disableCloseOnTriggerClick(t){v(this.#r,t)}#n=y(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return l(this.#n)}set disabled(t){v(this.#n,t)}#i=y(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return l(this.#i)}set ignoreNonKeyboardFocus(t){v(this.#i,t)}registry;tether;#o=E(null);get contentNode(){return l(this.#o)}set contentNode(t){v(this.#o,t,!0)}contentPresence;#s=E(!1);#a;#l=y(()=>this.opts.open.current?l(this.#s)?"delayed-open":"instant-open":"closed");get stateAttr(){return l(this.#l)}set stateAttr(t){v(this.#l,t)}constructor(t,r){this.opts=t,this.provider=r,this.tether=t.tether.current?.state??null,this.registry=this.tether?.registry??new Hw,this.#a=new Gs(()=>{v(this.#s,!0),this.opts.open.current=!0},this.delayDuration??0),this.tether&&(this.tether.root=this,Io(()=>()=>{this.tether?.root===this&&(this.tether.root=null)})),this.contentPresence=new cn({open:this.opts.open,ref:_(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),et(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#a=new Gs(()=>{v(this.#s,!0),this.opts.open.current=!0},this.delayDuration))}),et(()=>this.opts.open.current,n=>{n?(this.ensureActiveTrigger(),this.provider.onOpen(this)):this.provider.onClose(this)},{lazy:!0}),et(()=>this.opts.triggerId.current,n=>{n!==this.registry.activeTriggerId&&this.registry.setActiveTrigger(n)}),et(()=>this.registry.activeTriggerId,n=>{this.opts.triggerId.current!==n&&(this.opts.triggerId.current=n)})}handleOpen=()=>{this.#a.stop(),v(this.#s,!1),this.ensureActiveTrigger(),this.opts.open.current=!0};handleClose=()=>{this.#a.stop(),this.opts.open.current=!1};#c=()=>{this.#a.stop();const t=!this.provider.isOpenDelayed,r=this.delayDuration??0;t||r===0?(v(this.#s,!1),this.opts.open.current=!0):this.#a.start()};onTriggerEnter=t=>{this.setActiveTrigger(t),this.#c()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#a.stop()};ensureActiveTrigger=()=>{if(this.registry.activeTriggerId!==null&&this.registry.has(this.registry.activeTriggerId))return;if(this.opts.triggerId.current!==null&&this.registry.has(this.opts.triggerId.current)){this.registry.setActiveTrigger(this.opts.triggerId.current);return}const t=this.registry.getFirstTriggerId();this.registry.setActiveTrigger(t)};setActiveTrigger=t=>{this.registry.setActiveTrigger(t)};registerTrigger=t=>{this.registry.register(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};updateTrigger=t=>{this.registry.update(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};unregisterTrigger=t=>{const r=this.registry.activeTriggerId===t;this.registry.unregister(t),r&&this.opts.open.current&&this.handleClose()};isActiveTrigger=t=>this.registry.activeTriggerId===t;get triggerNode(){return this.registry.activeTriggerNode}get activePayload(){return this.registry.activePayload}get activeTriggerId(){return this.registry.activeTriggerId}}class bo{static create(t){return t.tether.current?new bo(t,null,t.tether.current.state):new bo(t,tc.get(),null)}opts;root;tether;attachment;#t=le(!1);#e=E(!1);domContext;#r=null;#n=!1;#i=null;constructor(t,r,n){this.opts=t,this.root=r,this.tether=n,this.domContext=new Dr(t.ref),this.attachment=rt(this.opts.ref,i=>this.#a(i)),et(()=>this.opts.id.current,()=>{this.#a(this.opts.ref.current)}),et(()=>this.opts.payload.current,()=>{this.#a(this.opts.ref.current)}),et(()=>this.opts.disabled.current,()=>{this.#a(this.opts.ref.current)}),Io(()=>(this.#n=!0,this.#a(this.opts.ref.current),()=>{const i=this.#o(),o=this.#i;o&&(this.tether?this.tether.registry.unregister(o):i?.unregisterTrigger(o)),this.#i=null,this.#n=!1}))}#o=()=>this.tether?.root??this.root;#s=()=>{const t=this.#o();return this.opts.disabled.current||!!t?.disabled};#a=t=>{if(!this.#n)return;const r=this.opts.id.current,n=this.opts.payload.current,i=this.opts.disabled.current;if(this.#i&&this.#i!==r){const a=this.#o();this.tether?this.tether.registry.unregister(this.#i):a?.unregisterTrigger(this.#i)}const o={id:r,node:t,payload:n,disabled:i},s=this.#o();this.tether?(this.tether.registry.has(r)?this.tether.registry.update(o):this.tether.registry.register(o),i&&this.tether.registry.activeTriggerId===r&&s?.opts.open.current&&s.handleClose()):s?.registry.has(r)?s.updateTrigger(o):s?.registerTrigger(o),this.#i=r};#l=()=>{this.#r!==null&&(clearTimeout(this.#r),this.#r=null)};handlePointerUp=()=>{this.#t.current=!1};#c=()=>{this.#s()||(this.#t.current=!1)};#u=()=>{this.#s()||(this.#t.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#h=t=>{const r=this.#o();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}if(t.pointerType!=="touch"){if(r.provider.isPointerInTransit.current){this.#l(),this.#r=window.setTimeout(()=>{r.provider.isPointerInTransit.current&&(r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),v(this.#e,!0))},250);return}r.onTriggerEnter(this.opts.id.current),v(this.#e,!0)}}};#f=t=>{const r=this.#o();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}t.pointerType!=="touch"&&(l(this.#e)||(this.#l(),r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),v(this.#e,!0)))}};#g=t=>{const r=this.#o();if(!r||this.#s())return;if(this.#l(),!r.isActiveTrigger(this.opts.id.current)){v(this.#e,!1);return}const n=t.relatedTarget;if(mr(n)){for(const i of r.registry.triggers.values())if(i.node===n){if(r.provider.opts.skipDelayDuration.current>0){v(this.#e,!1);return}r.handleClose(),v(this.#e,!1);return}}r.onTriggerLeave(),v(this.#e,!1)};#d=t=>{const r=this.#o();if(r&&!this.#t.current){if(this.#s()){r.opts.open.current&&r.handleClose();return}r.ignoreNonKeyboardFocus&&!$p(t.currentTarget)||(r.setActiveTrigger(this.opts.id.current),r.handleOpen())}};#p=()=>{const t=this.#o();!t||this.#s()||t.handleClose()};#v=()=>{const t=this.#o();!t||t.disableCloseOnTriggerClick||this.#s()||t.handleClose()};#m=y(()=>{const t=this.#o(),r=!!(t?.opts.open.current&&t.isActiveTrigger(this.opts.id.current)),n=this.#s();return{id:this.opts.id.current,"aria-describedby":r?t?.contentNode?.id:void 0,"data-state":r?t?.stateAttr:"closed","data-disabled":pt(n),"data-delay-duration":`${t?.delayDuration??0}`,[qd.trigger]:"",tabindex:n?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#c,onpointerdown:this.#u,onpointerenter:this.#h,onpointermove:this.#f,onpointerleave:this.#g,onfocus:this.#d,onblur:this.#p,onclick:this.#v,...this.attachment}});get props(){return l(this.#m)}set props(t){v(this.#m,t)}}class nc{static create(t){return new nc(t,tc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),new Hd({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,transitIntentTimeout:180,ignoredTargets:()=>{if(this.root.provider.opts.skipDelayDuration.current===0)return[];const n=[],i=this.root.triggerNode;for(const o of this.root.registry.triggers.values())o.node&&o.node!==i&&n.push(o.node);return n},onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}})}onInteractOutside=t=>{if(mr(t.target)&&this.root.triggerNode?.contains(t.target)&&this.root.disableCloseOnTriggerClick){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current?.(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":pt(this.root.disabled),...Wn(this.root.contentPresence.transitionStatus),style:{outline:"none"},[qd.content]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function r_(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"triggerId",15,null),i=m(t,"onOpenChange",3,st),o=m(t,"onOpenChangeComplete",3,st);const s=rc.create({open:_(()=>r(),a=>{r(a),i()(a)}),triggerId:_(()=>n(),a=>{n(a)}),delayDuration:_(()=>t.delayDuration),disableCloseOnTriggerClick:_(()=>t.disableCloseOnTriggerClick),disableHoverableContent:_(()=>t.disableHoverableContent),ignoreNonKeyboardFocus:_(()=>t.ignoreNonKeyboardFocus),disabled:_(()=>t.disabled),onOpenChangeComplete:_(()=>o()),tether:_(()=>t.tether)});ml(e,{tooltip:!0,children:(a,c)=>{var u=A(),d=P(u);M(d,()=>t.children??L,()=>({open:s.opts.open.current,triggerId:s.activeTriggerId,payload:s.activePayload})),x(a,u)},$$slots:{default:!0}}),V()}var Ww=W("<div><div><!></div></div>"),Uw=W("<div><div><!></div></div>");function n_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"side",3,"top"),s=m(t,"sideOffset",3,0),a=m(t,"align",3,"center"),c=m(t,"avoidCollisions",3,!0),u=m(t,"arrowPadding",3,0),d=m(t,"sticky",3,"partial"),p=m(t,"hideWhenDetached",3,!1),h=m(t,"collisionPadding",3,0),f=m(t,"onInteractOutside",3,st),g=m(t,"onEscapeKeydown",3,st),b=m(t,"forceMount",3,!1),w=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const S=nc.create({id:_(()=>n()),ref:_(()=>i(),F=>i(F)),onInteractOutside:_(()=>f()),onEscapeKeydown:_(()=>g())}),C=y(()=>({side:o(),sideOffset:s(),align:a(),avoidCollisions:c(),arrowPadding:u(),sticky:d(),hideWhenDetached:p(),collisionPadding:h(),strategy:t.strategy,customAnchor:t.customAnchor??S.root.triggerNode})),T=y(()=>q(w,l(C),S.props));var D=A(),k=P(D);{var O=F=>{{const z=(X,H)=>{let K=()=>H?.().props,Q=()=>H?.().wrapperProps;const ht=y(()=>q(K(),{style:si("tooltip")},{style:t.style}));var xt=A(),vt=P(xt);{var Z=gt=>{var It=A(),kt=P(It);{let Ut=y(()=>({props:l(ht),wrapperProps:Q(),...S.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(gt,It)},$=gt=>{var It=Ww();J(It,()=>({...Q()}));var kt=Y(It);J(kt,()=>({...l(ht)}));var Ut=Y(kt);M(Ut,()=>t.children??L),U(kt),U(It),x(gt,It)};N(vt,gt=>{t.child?gt(Z):gt($,-1)})}x(X,xt)};let R=y(()=>S.root.disableHoverableContent?"none":"auto");Al(F,bt(()=>l(T),()=>S.popperProps,{get enabled(){return S.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return S.opts.ref},tooltip:!0,get shouldRender(){return S.shouldRender},get contentPointerEvents(){return l(R)},popper:z,$$slots:{popper:!0}}))}},I=F=>{{const z=(X,H)=>{let K=()=>H?.().props,Q=()=>H?.().wrapperProps;const ht=y(()=>q(K(),{style:si("tooltip")},{style:t.style}));var xt=A(),vt=P(xt);{var Z=gt=>{var It=A(),kt=P(It);{let Ut=y(()=>({props:l(ht),wrapperProps:Q(),...S.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(gt,It)},$=gt=>{var It=Uw();J(It,()=>({...Q()}));var kt=Y(It);J(kt,()=>({...l(ht)}));var Ut=Y(kt);M(Ut,()=>t.children??L),U(kt),U(It),x(gt,It)};N(vt,gt=>{t.child?gt(Z):gt($,-1)})}x(X,xt)};let R=y(()=>S.root.disableHoverableContent?"none":"auto");Tl(F,bt(()=>l(T),()=>S.popperProps,{get open(){return S.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return S.opts.ref},tooltip:!0,get shouldRender(){return S.shouldRender},get contentPointerEvents(){return l(R)},popper:z,$$slots:{popper:!0}}))}};N(k,F=>{b()?F(O):b()||F(I,1)})}x(e,D),V()}var zw=W("<button><!></button>");function i_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"disabled",3,!1),o=m(t,"type",3,"button"),s=m(t,"tabindex",3,0),a=m(t,"ref",15,null),c=G(t,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const u=bo.create({id:_(()=>n()),disabled:_(()=>i()??!1),tabindex:_(()=>s()??0),payload:_(()=>t.payload),tether:_(()=>t.tether),ref:_(()=>a(),b=>a(b))}),d=y(()=>q(c,u.props,{type:o()}));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);M(S,()=>t.child,()=>({props:l(d)})),x(b,w)},g=b=>{var w=zw();J(w,()=>({...l(d)}));var S=Y(w);M(S,()=>t.children??L),U(w),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}function o_(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref"]);Uy(e,bt(()=>n,{get ref(){return r()},set ref(i){r(i)}})),V()}function s_(e,t){B(t,!0);let r=m(t,"delayDuration",3,700),n=m(t,"disableCloseOnTriggerClick",3,!1),i=m(t,"disableHoverableContent",3,!1),o=m(t,"disabled",3,!1),s=m(t,"ignoreNonKeyboardFocus",3,!1),a=m(t,"skipDelayDuration",3,300);ec.create({delayDuration:_(()=>r()),disableCloseOnTriggerClick:_(()=>n()),disableHoverableContent:_(()=>i()),disabled:_(()=>o()),ignoreNonKeyboardFocus:_(()=>s()),skipDelayDuration:_(()=>a())});var c=A(),u=P(c);M(u,()=>t.children??L),x(e,c),V()}const Yw=Array(12).fill(0);var Kw=W('<div class="sonner-loading-bar"></div>'),jw=W('<div><div class="sonner-spinner"></div></div>');function qw(e,t){B(t,!0);var r=jw(),n=Y(r);En(n,23,()=>Yw,(i,o)=>`spinner-bar-${o}`,(i,o)=>{var s=Kw();x(i,s)}),U(n),U(r),Jt(i=>{Fe(r,1,i),_t(r,"data-visible",t.visible)},[()=>Ne(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),x(e,r),V()}function Je(...e){return e.filter(Boolean).join(" ")}const Xw=typeof document<"u",Gw=typeof window<"u"?window:void 0;function Zw(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Jw{#t;#e;constructor(t={}){const{window:r=Gw,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=hi(i=>{const o=St(r,"focusin",i),s=St(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?Zw(this.#t):null}}new Jw;class Qw{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Pu(this.#e)}get(){const t=Xi(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const r=Xi(this.#e);return r===void 0?t:r}set(t){return Cu(this.#e,t)}}const $w=new Qw("<Toaster/>");let au=0;class t0{#t=E(Zt([]));get toasts(){return l(this.#t)}set toasts(t){v(this.#t,t,!0)}#e=E(Zt([]));get heights(){return l(this.#e)}set heights(t){v(this.#e,t,!0)}#r=t=>{const r=this.toasts.findIndex(n=>n.id===t);return r===-1?null:r};addToast=t=>{Xw&&this.toasts.unshift(t)};updateToast=({id:t,data:r,type:n,message:i})=>{const o=this.toasts.findIndex(a=>a.id===t),s=this.toasts[o];this.toasts[o]={...s,...r,id:t,title:i,type:n,updated:!0}};create=t=>{const{message:r,...n}=t,i=typeof t?.id=="number"||t.id&&t.id?.length>0?t.id:au++,o=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,s=t.type===void 0?"default":t.type;return Et(()=>{this.toasts.find(c=>c.id===i)?this.updateToast({id:i,data:t,type:s,message:r,dismissible:o}):this.addToast({...n,id:i,title:r,dismissible:o,type:s})}),i};dismiss=t=>(Et(()=>{if(t===void 0){this.toasts=this.toasts.map(n=>({...n,dismiss:!0}));return}const r=this.toasts.findIndex(n=>n.id===t);this.toasts[r]&&(this.toasts[r]={...this.toasts[r],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const r=this.#r(t);if(r!==null)return this.toasts.splice(r,1),t};message=(t,r)=>this.create({...r,type:"default",message:t});error=(t,r)=>this.create({...r,type:"error",message:t});success=(t,r)=>this.create({...r,type:"success",message:t});info=(t,r)=>this.create({...r,type:"info",message:t});warning=(t,r)=>this.create({...r,type:"warning",message:t});loading=(t,r)=>this.create({...r,type:"loading",message:t});promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:typeof r.loading=="string"?r.loading:r.loading()}));const i=t instanceof Promise?t:t();let o=n!==void 0;return i.then(s=>{if(typeof s=="object"&&s&&"ok"in s&&typeof s.ok=="boolean"&&!s.ok){o=!1;const a=e0(s);this.create({id:n,type:"error",message:a})}else if(r.success!==void 0){o=!1;const a=typeof r.success=="function"?r.success(s):r.success;this.create({id:n,type:"success",message:a})}}).catch(s=>{if(r.error!==void 0){o=!1;const a=typeof r.error=="function"?r.error(s):r.error;this.create({id:n,type:"error",message:a})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),r.finally?.()}),n};custom=(t,r)=>{const n=r?.id||au++;return this.create({component:t,id:n,...r}),n};removeHeight=t=>{this.heights=this.heights.filter(r=>r.toastId!==t)};setHeight=t=>{const r=this.#r(t.toastId);if(r===null){this.heights.push(t);return}this.heights[r]=t};reset=()=>{this.toasts=[],this.heights=[]}}function e0(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const Ot=new t0;function r0(e,t){return Ot.create({message:e,...t})}class n0{#t=y(()=>Ot.toasts.filter(t=>!t.dismiss));get toasts(){return l(this.#t)}}const i0=r0,a_=Object.assign(i0,{success:Ot.success,info:Ot.info,warning:Ot.warning,error:Ot.error,custom:Ot.custom,message:Ot.message,promise:Ot.promise,dismiss:Ot.dismiss,loading:Ot.loading,getActiveToasts:()=>Ot.toasts.filter(e=>!e.dismiss)});function Vi(e){return e.label!==void 0}function o0(){let e=E(Zt(typeof document<"u"?document.hidden:!1));return nt(()=>St(document,"visibilitychange",()=>{v(e,document.hidden,!0)})),{get current(){return l(e)}}}const lu=4e3,s0=14,a0=45,l0=200,c0=.05,u0={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function h0(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}function cu(e){return 1/(1.5+Math.abs(e)/20)}var d0=W("<div><!></div>"),f0=W('<button data-close-button=""><!></button>'),g0=W('<div data-icon=""><!> <!></div>'),p0=W('<div data-description=""><!></div>'),v0=W('<button data-button="" data-cancel=""> </button>'),m0=W('<button data-button=""> </button>'),b0=W('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),y0=W('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function w0(e,t){B(t,!0);const r=ut=>{var mt=A(),Tt=P(mt);{var Ft=Dt=>{var $t=d0(),Gr=Y($t);M(Gr,()=>t.loadingIcon),U($t),Jt(Yn=>{Fe($t,1,Yn),_t($t,"data-visible",l(O)==="loading")},[()=>Ne(Je(l($)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),x(Dt,$t)},Rt=Dt=>{{let $t=y(()=>Je(l($)?.loader,t.toast.classes?.loader)),Gr=y(()=>l(O)==="loading");qw(Dt,{get class(){return l($t)},get visible(){return l(Gr)}})}};N(Tt,Dt=>{t.loadingIcon?Dt(Ft):Dt(Rt,-1)})}x(ut,mt)};let n=m(t,"cancelButtonStyle",3,""),i=m(t,"actionButtonStyle",3,""),o=m(t,"descriptionClass",3,""),s=m(t,"unstyled",3,!1),a=m(t,"defaultRichColors",3,!1);const c={...u0};let u=E(!1),d=E(!1),p=E(!1),h=E(!1),f=E(!1),g=E(0),b=E(0),w=t.toast.duration||t.duration||lu,S=E(void 0),C=E(null),T=E(null);const D=y(()=>t.index===0),k=y(()=>t.index+1<=t.visibleToasts),O=y(()=>t.toast.type),I=y(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),F=y(()=>t.toast.class||""),z=y(()=>t.toast.descriptionClass||""),R=y(()=>Ot.heights.findIndex(ut=>ut.toastId===t.toast.id)||0),X=y(()=>t.toast.closeButton??t.closeButton),H=y(()=>t.toast.duration??t.duration??lu);let K=null;const Q=y(()=>t.position.split("-")),ht=y(()=>Ot.heights.reduce((ut,mt,Tt)=>Tt>=l(R)?ut:ut+mt.height,0)),xt=o0(),vt=y(()=>t.toast.invert||t.invert),Z=y(()=>l(O)==="loading"),$=y(()=>({...c,...t.classes})),gt=y(()=>t.toast.title),It=y(()=>t.toast.description);let kt=E(0),Ut=E(0);const vn=y(()=>Math.round(l(R)*s0+l(ht)));nt(()=>{l(gt),l(It);let ut;t.expanded||t.expandByDefault?ut=1:ut=1-t.index*c0;const mt=Et(()=>l(S));if(mt===void 0)return;mt.style.setProperty("height","auto");const Tt=mt.offsetHeight,Ft=mt.getBoundingClientRect().height,Rt=Math.round(Ft/ut+Number.EPSILON&100)/100;mt.style.removeProperty("height");let Dt;Math.abs(Rt-Tt)<1?Dt=Rt:Dt=Tt,v(b,Dt,!0),Ot.setHeight({toastId:t.toast.id,height:Dt})});function tt(){v(d,!0),v(g,l(vn),!0),Ot.removeHeight(t.toast.id),setTimeout(()=>{Ot.remove(t.toast.id)},l0)}let zt;const qe=y(()=>t.toast.promise&&l(O)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function Xe(){v(kt,new Date().getTime(),!0),zt=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),tt()},w)}function Xr(){if(l(Ut)<l(kt)){const ut=new Date().getTime()-l(kt);w=w-ut}v(Ut,new Date().getTime(),!0)}nt(()=>{t.toast.updated&&(clearTimeout(zt),w=l(H),Xe())}),nt(()=>(l(qe)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&xt.current?Xr():Xe()),()=>clearTimeout(zt))),pi(()=>{v(u,!0);const ut=l(S)?.getBoundingClientRect().height;return v(b,ut,!0),Ot.setHeight({toastId:t.toast.id,height:ut}),()=>{Ot.removeHeight(t.toast.id)}}),nt(()=>{t.toast.delete&&Et(()=>{tt(),t.toast.onDismiss?.(t.toast)})});const Ko=ut=>{if(l(Z))return;v(g,l(vn),!0);const mt=ut.target;mt.setPointerCapture(ut.pointerId),mt.tagName!=="BUTTON"&&(v(p,!0),K={x:ut.clientX,y:ut.clientY})},ic=()=>{if(l(h)||!l(I))return;K=null;const ut=Number(l(S)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),mt=Number(l(S)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Tt=new Date().getTime()-0,Ft=l(C)==="x"?ut:mt,Rt=Math.abs(Ft)/Tt;if(Math.abs(Ft)>=a0||Rt>.11){v(g,l(vn),!0),t.toast.onDismiss?.(t.toast),l(C)==="x"?v(T,ut>0?"right":"left",!0):v(T,mt>0?"down":"up",!0),tt(),v(h,!0);return}else l(S)?.style.setProperty("--swipe-amount-x","0px"),l(S)?.style.setProperty("--swipe-amount-y","0px");v(f,!1),v(p,!1),v(C,null)},Ai=ut=>{if(!K||!l(I)||(window.getSelection()?.toString().length??-1)>0)return;const Tt=ut.clientY-K.y,Ft=ut.clientX-K.x,Rt=t.swipeDirections??h0(t.position);!l(C)&&(Math.abs(Ft)>1||Math.abs(Tt)>1)&&v(C,Math.abs(Ft)>Math.abs(Tt)?"x":"y",!0);let Dt={x:0,y:0};if(l(C)==="y"){if(Rt.includes("top")||Rt.includes("bottom"))if(Rt.includes("top")&&Tt<0||Rt.includes("bottom")&&Tt>0)Dt.y=Tt;else{const $t=Tt*cu(Tt);Dt.y=Math.abs($t)<Math.abs(Tt)?$t:Tt}}else if(l(C)==="x"&&(Rt.includes("left")||Rt.includes("right")))if(Rt.includes("left")&&Ft<0||Rt.includes("right")&&Ft>0)Dt.x=Ft;else{const $t=Ft*cu(Ft);Dt.x=Math.abs($t)<Math.abs(Ft)?$t:Ft}(Math.abs(Dt.x)>0||Math.abs(Dt.y)>0)&&v(f,!0),l(S)?.style.setProperty("--swipe-amount-x",`${Dt.x}px`),l(S)?.style.setProperty("--swipe-amount-y",`${Dt.y}px`)},Ge=()=>{v(p,!1),v(C,null),K=null},dr=y(()=>t.toast.icon?t.toast.icon:l(O)==="success"?t.successIcon:l(O)==="error"?t.errorIcon:l(O)==="warning"?t.warningIcon:l(O)==="info"?t.infoIcon:l(O)==="loading"?t.loadingIcon:null);var ct=y0();_t(ct,"tabindex",0);let mn;var Di=Y(ct);{var oc=ut=>{var mt=f0(),Tt=Y(mt);M(Tt,()=>t.closeIcon??L),U(mt),Jt(Ft=>{_t(mt,"aria-label",t.closeButtonAriaLabel),_t(mt,"data-disabled",l(Z)),Fe(mt,1,Ft)},[()=>Ne(Je(l($)?.closeButton,t.toast?.classes?.closeButton))]),$r("click",mt,()=>{l(Z)||!l(I)||(tt(),t.toast.onDismiss?.(t.toast))}),x(ut,mt)};N(Di,ut=>{l(X)&&!t.toast.component&&l(O)!=="loading"&&t.closeIcon!==null&&ut(oc)})}var jo=ae(Di,2);{var qo=ut=>{const mt=y(()=>t.toast.component);var Tt=A(),Ft=P(Tt);Mr(Ft,()=>l(mt),(Rt,Dt)=>{Dt(Rt,bt(()=>t.toast.componentProps,{closeToast:tt}))}),x(ut,Tt)},Xo=ut=>{var mt=b0(),Tt=P(mt);{var Ft=Ct=>{var At=g0(),ot=Y(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);{var Yt=Er=>{var Ei=A(),Zo=P(Ei);Mr(Zo,()=>t.toast.icon,(te,re)=>{re(te,{})}),x(Er,Ei)},ke=Er=>{r(Er)};N(se,Er=>{t.toast.icon?Er(Yt):Er(ke,-1)})}x(yt,Pt)};N(ot,yt=>{(t.toast.promise||l(O)==="loading")&&yt(Lt)})}var Xt=ae(ot,2);{var Ht=yt=>{var Pt=A(),se=P(Pt);{var Yt=te=>{var re=A(),fr=P(re);Mr(fr,()=>t.toast.icon,(Jd,Qd)=>{Qd(Jd,{})}),x(te,re)},ke=te=>{var re=A(),fr=P(re);M(fr,()=>t.successIcon??L),x(te,re)},Er=te=>{var re=A(),fr=P(re);M(fr,()=>t.errorIcon??L),x(te,re)},Ei=te=>{var re=A(),fr=P(re);M(fr,()=>t.warningIcon??L),x(te,re)},Zo=te=>{var re=A(),fr=P(re);M(fr,()=>t.infoIcon??L),x(te,re)};N(se,te=>{t.toast.icon?te(Yt):l(O)==="success"?te(ke,1):l(O)==="error"?te(Er,2):l(O)==="warning"?te(Ei,3):l(O)==="info"&&te(Zo,4)})}x(yt,Pt)};N(Xt,yt=>{t.toast.type!=="loading"&&yt(Ht)})}U(At),Jt(yt=>Fe(At,1,yt),[()=>Ne(Je(l($)?.icon,t.toast?.classes?.icon))]),x(Ct,At)};N(Tt,Ct=>{(l(O)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(l(dr)!==null||t.toast.icon)&&Ct(Ft)})}var Rt=ae(Tt,2),Dt=Y(Rt),$t=Y(Dt);{var Gr=Ct=>{var At=A(),ot=P(At);{var Lt=Ht=>{const yt=y(()=>t.toast.title);var Pt=A(),se=P(Pt);Mr(se,()=>l(yt),(Yt,ke)=>{ke(Yt,bt(()=>t.toast.componentProps))}),x(Ht,Pt)},Xt=Ht=>{var yt=Is();Jt(()=>nn(yt,t.toast.title)),x(Ht,yt)};N(ot,Ht=>{typeof t.toast.title!="string"?Ht(Lt):Ht(Xt,-1)})}x(Ct,At)};N($t,Ct=>{t.toast.title&&Ct(Gr)})}U(Dt);var Yn=ae(Dt,2);{var Go=Ct=>{var At=p0(),ot=Y(At);{var Lt=Ht=>{const yt=y(()=>t.toast.description);var Pt=A(),se=P(Pt);Mr(se,()=>l(yt),(Yt,ke)=>{ke(Yt,bt(()=>t.toast.componentProps))}),x(Ht,Pt)},Xt=Ht=>{var yt=Is();Jt(()=>nn(yt,t.toast.description)),x(Ht,yt)};N(ot,Ht=>{typeof t.toast.description!="string"?Ht(Lt):Ht(Xt,-1)})}U(At),Jt(Ht=>Fe(At,1,Ht),[()=>Ne(Je(o(),l(z),l($)?.description,t.toast.classes?.description))]),x(Ct,At)};N(Yn,Ct=>{t.toast.description&&Ct(Go)})}U(Rt);var Oi=ae(Rt,2);{var Ie=Ct=>{var At=A(),ot=P(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);Mr(se,()=>t.toast.cancel,(Yt,ke)=>{ke(Yt,{})}),x(yt,Pt)},Xt=yt=>{var Pt=v0(),se=Y(Pt,!0);U(Pt),Jt(Yt=>{Ki(Pt,t.toast.cancelButtonStyle??n()),Fe(Pt,1,Yt),nn(se,t.toast.cancel.label)},[()=>Ne(Je(l($)?.cancelButton,t.toast?.classes?.cancelButton))]),$r("click",Pt,Yt=>{Vi(t.toast.cancel)&&l(I)&&(t.toast.cancel?.onClick?.(Yt),tt())}),x(yt,Pt)},Ht=y(()=>Vi(t.toast.cancel));N(ot,yt=>{typeof t.toast.cancel=="function"?yt(Lt):l(Ht)&&yt(Xt,1)})}x(Ct,At)};N(Oi,Ct=>{t.toast.cancel&&Ct(Ie)})}var ee=ae(Oi,2);{var Me=Ct=>{var At=A(),ot=P(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);Mr(se,()=>t.toast.action,(Yt,ke)=>{ke(Yt,{})}),x(yt,Pt)},Xt=yt=>{var Pt=m0(),se=Y(Pt,!0);U(Pt),Jt(Yt=>{Ki(Pt,t.toast.actionButtonStyle??i()),Fe(Pt,1,Yt),nn(se,t.toast.action.label)},[()=>Ne(Je(l($)?.actionButton,t.toast?.classes?.actionButton))]),$r("click",Pt,Yt=>{Vi(t.toast.action)&&(t.toast.action?.onClick(Yt),!Yt.defaultPrevented&&tt())}),x(yt,Pt)},Ht=y(()=>Vi(t.toast.action));N(ot,yt=>{typeof t.toast.action=="function"?yt(Lt):l(Ht)&&yt(Xt,1)})}x(Ct,At)};N(ee,Ct=>{t.toast.action&&Ct(Me)})}Jt((Ct,At)=>{Fe(Rt,1,Ct),Fe(Dt,1,At)},[()=>Ne(Je(l($)?.content,t.toast?.classes?.content)),()=>Ne(Je(l($)?.title,t.toast?.classes?.title))]),x(ut,mt)};N(jo,ut=>{t.toast.component?ut(qo):ut(Xo,-1)})}U(ct),_h(ct,ut=>v(S,ut),()=>l(S)),Jt((ut,mt,Tt)=>{Fe(ct,1,ut),_t(ct,"aria-live",t.toast.important?"assertive":"polite"),_t(ct,"data-rich-colors",t.toast.richColors??a()),_t(ct,"data-styled",!(t.toast.component||t.toast.unstyled||s())),_t(ct,"data-mounted",l(u)),_t(ct,"data-promise",mt),_t(ct,"data-swiped",l(f)),_t(ct,"data-removed",l(d)),_t(ct,"data-visible",l(k)),_t(ct,"data-y-position",l(Q)[0]),_t(ct,"data-x-position",l(Q)[1]),_t(ct,"data-index",t.index),_t(ct,"data-front",l(D)),_t(ct,"data-swiping",l(p)),_t(ct,"data-dismissible",l(I)),_t(ct,"data-type",l(O)),_t(ct,"data-invert",l(vt)),_t(ct,"data-swipe-out",l(h)),_t(ct,"data-swipe-direction",l(T)),_t(ct,"data-expanded",Tt),mn=Ki(ct,`${t.style} ${t.toast.style}`,mn,{"--index":t.index,"--toasts-before":t.index,"--z-index":Ot.toasts.length-t.index,"--offset":`${l(d)?l(g):l(vn)}px`,"--initial-height":t.expandByDefault?"auto":`${l(b)}px`})},[()=>Ne(Je(t.class,l(F),l($)?.toast,t.toast?.classes?.toast,l($)?.[l(O)],t.toast?.classes?.[l(O)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&l(u))]),$r("pointermove",ct,Ai),$r("pointerup",ct,ic),$r("pointerdown",ct,Ko),bg("dragend",ct,Ge),x(e,ct),V()}lh(["pointermove","pointerup","pointerdown","click"]);var _0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function S0(e){var t=_0();x(e,t)}var x0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function C0(e){var t=x0();x(e,t)}var P0=Vn('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function T0(e){var t=P0();x(e,t)}var A0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function D0(e){var t=A0();x(e,t)}var O0=Vn('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function E0(e){var t=O0();x(e,t)}const I0=3,Gd="24px",Zd="16px",M0=4e3,k0=356,N0=14,ys="dark",Hi="light";function F0(e,t){const r={};return[e,t].forEach((n,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",a=o?Zd:Gd;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{const d=n[u];d===void 0?r[`${s}-${u}`]=a:r[`${s}-${u}`]=typeof d=="number"?`${d}px`:d}):c(a)}),r}var R0=W("<ol></ol>"),L0=W('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-6val4n"><!></section>');function l_(e,t){B(t,!0);function r(tt){return tt!=="system"?tt:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ys:Hi}let n=m(t,"invert",3,!1),i=m(t,"position",3,"bottom-right"),o=m(t,"hotkey",19,()=>["altKey","KeyT"]),s=m(t,"expand",3,!1),a=m(t,"closeButton",3,!1),c=m(t,"offset",3,Gd),u=m(t,"mobileOffset",3,Zd),d=m(t,"theme",3,"light"),p=m(t,"richColors",3,!1),h=m(t,"duration",3,M0),f=m(t,"visibleToasts",3,I0),g=m(t,"toastOptions",19,()=>({})),b=m(t,"dir",7,"auto"),w=m(t,"gap",3,N0),S=m(t,"pauseWhenPageIsHidden",3,!1),C=m(t,"containerAriaLabel",3,"Notifications"),T=m(t,"closeButtonAriaLabel",3,"Close toast"),D=G(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function k(){if(b()!=="auto")return b();if(typeof window>"u"||typeof document>"u")return"ltr";const tt=document.documentElement.getAttribute("dir");return tt==="auto"||!tt?(Et(()=>b(window.getComputedStyle(document.documentElement).direction??"ltr")),b()):(Et(()=>b(tt)),tt)}const O=y(()=>Array.from(new Set([i(),...Ot.toasts.filter(tt=>tt.position).map(tt=>tt.position)].filter(Boolean))));let I=E(!1),F=E(!1),z=E(Zt(r(d()))),R=E(void 0),X=E(null),H=E(!1);const K=y(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));nt(()=>{Ot.toasts.length<=1&&v(I,!1)}),nt(()=>{const tt=Ot.toasts.filter(zt=>zt.dismiss&&!zt.delete);if(tt.length>0){const zt=Ot.toasts.map(qe=>tt.find(Xr=>Xr.id===qe.id)?{...qe,delete:!0}:qe);Ot.toasts=zt}}),nt(()=>()=>{l(R)&&l(X)&&(l(X).focus({preventScroll:!0}),v(X,null),v(H,!1))}),pi(()=>(Ot.reset(),St(document,"keydown",zt=>{o().every(Xe=>zt[Xe]||zt.code===Xe)&&(v(I,!0),l(R)?.focus()),zt.code==="Escape"&&(document.activeElement===l(R)||l(R)?.contains(document.activeElement))&&v(I,!1)}))),nt(()=>{if(d()!=="system"&&v(z,d()),typeof window<"u"){d()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v(z,ys):v(z,Hi));const tt=window.matchMedia("(prefers-color-scheme: dark)"),zt=({matches:qe})=>{d()==="system"&&v(z,qe?ys:Hi,!0)};"addEventListener"in tt?tt.addEventListener("change",zt):tt.addListener(zt)}});const Q=tt=>{t.onblur?.(tt),l(H)&&!tt.currentTarget.contains(tt.relatedTarget)&&(v(H,!1),l(X)&&(l(X).focus({preventScroll:!0}),v(X,null)))},ht=tt=>{t.onfocus?.(tt),!(tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false")&&(l(H)||(v(H,!0),v(X,tt.relatedTarget,!0)))},xt=tt=>{t.onpointerdown?.(tt),!(tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false")&&v(F,!0)},vt=tt=>{t.onmouseenter?.(tt),v(I,!0)},Z=tt=>{t.onmouseleave?.(tt),l(F)||v(I,!1)},$=tt=>{t.onmousemove?.(tt),v(I,!0)},gt=tt=>{t.ondragend?.(tt),v(I,!1)},It=tt=>{t.onpointerup?.(tt),v(F,!1)};$w.set(new n0);var kt=L0();_t(kt,"tabindex",-1);var Ut=Y(kt);{var vn=tt=>{var zt=A(),qe=P(zt);En(qe,18,()=>l(O),Xe=>Xe,(Xe,Xr,Ko,ic)=>{const Ai=y(()=>{const[ct,mn]=Xr.split("-");return{y:ct,x:mn}}),Ge=y(()=>F0(c(),u()));var dr=R0();J(dr,ct=>({tabindex:-1,dir:ct,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":l(z),"data-y-position":l(Ai).y,"data-x-position":l(Ai).x,style:t.style,onblur:Q,onfocus:ht,onmouseenter:vt,onmousemove:$,onmouseleave:Z,ondragend:gt,onpointerdown:xt,onpointerup:It,...D,[wn]:{"--front-toast-height":`${Ot.heights[0]?.height}px`,"--width":`${k0}px`,"--gap":`${w()}px`,"--offset-top":l(Ge)["--offset-top"],"--offset-right":l(Ge)["--offset-right"],"--offset-bottom":l(Ge)["--offset-bottom"],"--offset-left":l(Ge)["--offset-left"],"--mobile-offset-top":l(Ge)["--mobile-offset-top"],"--mobile-offset-right":l(Ge)["--mobile-offset-right"],"--mobile-offset-bottom":l(Ge)["--mobile-offset-bottom"],"--mobile-offset-left":l(Ge)["--mobile-offset-left"]}}),[()=>k()],void 0,void 0,"svelte-6val4n"),En(dr,23,()=>Ot.toasts.filter(ct=>!ct.position&&l(Ko)===0||ct.position===Xr),ct=>ct.id,(ct,mn,Di,oc)=>{{const jo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.successIcon??L),x(ot,Lt)},At=ot=>{S0(ot)};N(Me,ot=>{t.successIcon?ot(Ct):t.successIcon!==null&&ot(At,1)})}x(Ie,ee)},qo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.errorIcon??L),x(ot,Lt)},At=ot=>{C0(ot)};N(Me,ot=>{t.errorIcon?ot(Ct):t.errorIcon!==null&&ot(At,1)})}x(Ie,ee)},Xo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.warningIcon??L),x(ot,Lt)},At=ot=>{T0(ot)};N(Me,ot=>{t.warningIcon?ot(Ct):t.warningIcon!==null&&ot(At,1)})}x(Ie,ee)},ut=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.infoIcon??L),x(ot,Lt)},At=ot=>{D0(ot)};N(Me,ot=>{t.infoIcon?ot(Ct):t.infoIcon!==null&&ot(At,1)})}x(Ie,ee)},mt=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.closeIcon??L),x(ot,Lt)},At=ot=>{E0(ot)};N(Me,ot=>{t.closeIcon?ot(Ct):t.closeIcon!==null&&ot(At,1)})}x(Ie,ee)};let Tt=y(()=>g()?.duration??h()),Ft=y(()=>g()?.class??""),Rt=y(()=>g()?.descriptionClass||""),Dt=y(()=>g()?.style??""),$t=y(()=>g().classes||{}),Gr=y(()=>g().unstyled??!1),Yn=y(()=>g()?.cancelButtonStyle??""),Go=y(()=>g()?.actionButtonStyle??""),Oi=y(()=>g()?.closeButtonAriaLabel??T());w0(ct,{get index(){return l(Di)},get toast(){return l(mn)},get defaultRichColors(){return p()},get duration(){return l(Tt)},get class(){return l(Ft)},get descriptionClass(){return l(Rt)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return a()},get interacting(){return l(F)},get position(){return Xr},get style(){return l(Dt)},get classes(){return l($t)},get unstyled(){return l(Gr)},get cancelButtonStyle(){return l(Yn)},get actionButtonStyle(){return l(Go)},get closeButtonAriaLabel(){return l(Oi)},get expandByDefault(){return s()},get expanded(){return l(I)},get pauseWhenPageIsHidden(){return S()},get loadingIcon(){return t.loadingIcon},successIcon:jo,errorIcon:qo,warningIcon:Xo,infoIcon:ut,closeIcon:mt,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),U(dr),_h(dr,ct=>v(R,ct),()=>l(R)),Jt(()=>dr.dir=dr.dir),x(Xe,dr)}),x(tt,zt)};N(Ut,tt=>{Ot.toasts.length>0&&tt(vn)})}U(kt),Jt(()=>_t(kt,"aria-label",`${C()??""} ${l(K)??""}`)),x(e,kt),V()}export{dc as $,En as A,Fe as B,T1 as C,_t as D,J as E,_h as F,Q1 as G,U0 as H,zg as I,e1 as J,j0 as K,U1 as L,G0 as M,bg as N,$r as O,lh as P,nt as Q,Ne as R,J1 as S,K0 as T,ih as U,j1 as V,q1 as W,K1 as X,X1 as Y,Y1 as Z,D1 as _,M as a,s_ as a$,O1 as a0,A1 as a1,q0 as a2,Ln as a3,n1 as a4,c1 as a5,R1 as a6,L1 as a7,z1 as a8,Ki as a9,m1 as aA,g1 as aB,v1 as aC,b1 as aD,w1 as aE,p1 as aF,y1 as aG,_1 as aH,x1 as aI,C1 as aJ,Sh as aK,r1 as aL,sa as aM,Et as aN,i1 as aO,vh as aP,Ji as aQ,t_ as aR,e_ as aS,$1 as aT,t1 as aU,o1 as aV,Xi as aW,Cu as aX,Yi as aY,n_ as aZ,o_ as a_,J0 as aa,Hg as ab,$0 as ac,Q0 as ad,B0 as ae,Vn as af,E1 as ag,Wr as ah,Fr as ai,W0 as aj,N1 as ak,F1 as al,I1 as am,k1 as an,M1 as ao,Z1 as ap,G1 as aq,Fs as ar,Y0 as as,B1 as at,S1 as au,pa as av,P1 as aw,f1 as ax,d1 as ay,Ze as az,x as b,i_ as b0,r_ as b1,q as b2,u1 as b3,W1 as b4,H1 as b5,h1 as b6,l1 as b7,V1 as b8,Cg as b9,X0 as ba,hi as bb,St as bc,eg as bd,l_ as be,a_ as bf,Z0 as bg,Bn as bh,Jf as bi,H0 as bj,z0 as bk,A as c,V as d,Zt as e,P as f,m as g,Mr as h,l as i,Y as j,N as k,U as l,W as m,L as n,E as o,B as p,pi as q,G as r,bt as s,ae as t,y as u,v,Mf as w,Is as x,Jt as y,nn as z};
7
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Th={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Op=Oo(Th),Ah=typeof window<"u"?window:void 0;function Ep(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}let Ip=class{#t;#e;constructor(t={}){const{window:r=Ah,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=hi(i=>{const o=St(r,"focusin",i),s=St(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?Ep(this.#t):null}};new Ip;function Dh(e){return typeof e=="function"}function Mp(e,t){if(Dh(e)){const n=e();return n===void 0?t:n}return e===void 0?t:e}let Vt=class{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Pu(this.#e)}get(){const t=Xi(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const r=Xi(this.#e);return r===void 0?t:r}set(t){return Cu(this.#e,t)}};function Eo(e,t){let r=E(null);const n=y(()=>Mp(t,250));function i(...o){if(l(r))l(r).timeout&&clearTimeout(l(r).timeout);else{let s,a;const c=new Promise((u,d)=>{s=u,a=d});v(r,{timeout:null,runner:null,promise:c,resolve:s,reject:a},!0)}return l(r).runner=async()=>{if(!l(r))return;const s=l(r);v(r,null);try{s.resolve(await e.apply(this,o))}catch(a){s.reject(a)}},l(r).timeout=setTimeout(l(r).runner,l(n)),l(r).promise}return i.cancel=async()=>{(!l(r)||l(r).timeout===null)&&(await new Promise(o=>setTimeout(o,0)),!l(r)||l(r).timeout===null)||(clearTimeout(l(r).timeout),l(r).reject("Cancelled"),v(r,null))},i.runScheduledNow=async()=>{(!l(r)||!l(r).timeout)&&(await new Promise(o=>setTimeout(o,0)),!l(r)||!l(r).timeout)||(clearTimeout(l(r).timeout),l(r).timeout=null,await l(r).runner?.())},Object.defineProperty(i,"pending",{enumerable:!0,get(){return!!l(r)?.timeout}}),i}function kp(e,t){switch(e){case"post":nt(t);break;case"pre":Ln(t);break}}function Oh(e,t,r,n={}){const{lazy:i=!1}=n;let o=!i,s=Array.isArray(e)?[]:void 0;kp(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!o){o=!0,s=a;return}const c=Et(()=>r(a,s));return s=a,c})}function et(e,t,r){Oh(e,"post",t,r)}function Np(e,t,r){Oh(e,"pre",t,r)}et.pre=Np;function Ic(e){return Dh(e)?e():e}class Fp{#t={width:0,height:0};#e=!1;#r;#n;#i;#o=y(()=>(l(this.#a)?.(),this.getSize().width));#s=y(()=>(l(this.#a)?.(),this.getSize().height));#a=y(()=>{const t=Ic(this.#n);if(t)return hi(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const o of i){const s=this.#r.box==="content-box"?o.contentBoxSize:o.borderBoxSize,a=Array.isArray(s)?s:[s];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}r()});return n.observe(t),()=>{this.#e=!1,n.disconnect()}})});constructor(t,r={box:"border-box"}){this.#i=r.window??Ah,this.#r=r,this.#n=t,this.#t={width:0,height:0}}calculateSize(){const t=Ic(this.#n);if(!t||!this.#i)return;const r=t.offsetWidth,n=t.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(t),o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),s=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=r-o-a,d=n-s-c;return{width:u,height:d}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return l(this.#a)?.(),this.getSize()}get width(){return l(this.#o)}get height(){return l(this.#s)}}class ba{#t=E(!1);constructor(){nt(()=>(Et(()=>v(this.#t,!0)),()=>{v(this.#t,!1)}))}get current(){return l(this.#t)}}class Rp{#t=()=>{};#e=y(()=>this.#t());constructor(t,r){let n;r!==void 0&&(n=r),this.#t=()=>{try{return n}finally{n=t()}}}get current(){return l(this.#e)}}function ur(e){nt(()=>()=>{e()})}function Io(e){nt(()=>Et(()=>e()))}function Eh(e,t){return setTimeout(t,e)}function Br(e){ih().then(e)}const Lp=1,Bp=9,Vp=11;function Bs(e){return vi(e)&&e.nodeType===Lp&&typeof e.nodeName=="string"}function Ih(e){return vi(e)&&e.nodeType===Bp}function Hp(e){return vi(e)&&e.constructor?.name==="VisualViewport"}function Wp(e){return vi(e)&&e.nodeType!==void 0}function Mh(e){return Wp(e)&&e.nodeType===Vp&&"host"in e}function Up(e,t){if(!e||!t||!Bs(e)||!Bs(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Mh(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ya(e){return Ih(e)?e:Hp(e)?e.document:e?.ownerDocument??document}function wa(e){return Mh(e)?wa(e.host):Ih(e)?e.defaultView??window:Bs(e)?e.ownerDocument?.defaultView??window:window}function zp(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Dr{element;#t=y(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return l(this.#t)}set root(t){v(this.#t,t)}constructor(t){typeof t=="function"?this.element=_(t):this.element=t}getDocument=()=>ya(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>zp(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,r)=>this.getWindow().setTimeout(t,r);clearTimeout=t=>this.getWindow().clearTimeout(t)}function rt(e,t){return{[lg()]:r=>mi(e)?(e.current=r,Et(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Et(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function fe(e){return e?"true":"false"}function kh(e){return e?"true":void 0}function pt(e){return e?"":void 0}function Qi(e){return e?!0:void 0}function jr(e){return e?"open":"closed"}function Yp(e){return e?"checked":"unchecked"}function Wn(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}function Nh(e,t){return t?"mixed":e?"true":"false"}class Kp{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(r=>[r,this.getAttr(r)]))}getAttr(t,r){return r?`data-${r}-${t}`:`${this.#e}${t}`}selector(t,r){return`[${this.getAttr(t,r)}]`}}function _e(e){const t=new Kp(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const tr="ArrowDown",bi="ArrowLeft",yi="ArrowRight",Re="ArrowUp",_a="End",lr="Enter",jp="Escape",Sa="Home",Fh="PageDown",Rh="PageUp",Ue=" ",Mc="Tab";function qp(e){return window.getComputedStyle(e).getPropertyValue("direction")}function Xp(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?bi:yi,vertical:tr}[t]}function Gp(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?yi:bi,vertical:Re}[t]}function Zp(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:Xp(e,t),prevKey:Gp(e,t)}}const wi=typeof document<"u",Vs=Jp();function Jp(){return wi&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function wr(e){return e instanceof HTMLElement}function mr(e){return e instanceof Element}function Qp(e){return e instanceof Element||e instanceof SVGElement}function $i(e){return e.pointerType==="touch"}function $p(e){return e.matches(":focus-visible")}function tv(e){return e!==null}class ev{#t;#e=pn(null);constructor(t){this.#t=t}getCandidateNodes(){return this.#t.rootNode.current?this.#t.candidateSelector?Array.from(this.#t.rootNode.current.querySelectorAll(this.#t.candidateSelector)):this.#t.candidateAttr?Array.from(this.#t.rootNode.current.querySelectorAll(`[${this.#t.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,r,n=!1){const i=this.#t.rootNode.current;if(!i||!t)return;const o=this.getCandidateNodes();if(!o.length)return;const s=o.indexOf(t),a=qp(i),{nextKey:c,prevKey:u}=Zp(a,this.#t.orientation.current),d=this.#t.loop.current,p={[c]:s+1,[u]:s-1,[Sa]:0,[_a]:o.length-1};if(n){const g=c===tr?yi:tr,b=u===Re?bi:Re;p[g]=s+1,p[b]=s-1}let h=p[r.key];if(h===void 0)return;r.preventDefault(),h<0&&d?h=o.length-1:h===o.length&&d&&(h=0);const f=o[h];if(f)return f.focus(),this.#e.current=f.id,this.#t.onCandidateFocus?.(f),f}getTabIndex(t){const r=this.getCandidateNodes(),n=this.#e.current!==null;return t&&!n&&r[0]===t?(this.#e.current=t.id,0):t?.id===this.#e.current?0:-1}setCurrentTabStopId(t){this.#e.current=t}focusCurrentTabStop(){const t=this.#e.current;if(!t)return;const r=this.#t.rootNode.current?.querySelector(`#${t}`);!r||!wr(r)||r.focus()}}class Lh{#t;#e=null;#r=null;#n=0;constructor(t){this.#t=t,ur(()=>this.#i())}#i(){this.#e!==null&&(window.cancelAnimationFrame(this.#e),this.#e=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(t){this.#i();const r=this.#t.ref.current;if(!r)return;if(typeof r.getAnimations!="function"){this.#o(t);return}const n=this.#n,i=()=>{n===this.#n&&this.#o(t)},o=()=>{if(n!==this.#n)return;const a=r.getAnimations();if(a.length===0){i();return}Promise.all(a.map(c=>c.finished)).then(()=>{i()}).catch(()=>{if(n!==this.#n)return;if(r.getAnimations().some(d=>d.pending||d.playState!=="finished")){o();return}i()})},s=()=>{this.#e=window.requestAnimationFrame(()=>{this.#e=null,o()})};if(!this.#t.afterTick.current){s();return}this.#e=window.requestAnimationFrame(()=>{this.#e=null;const a="data-starting-style";if(!r.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{n===this.#n&&(r.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(r,{attributes:!0,attributeFilter:[a]})})}#o(t){const r=()=>{t()};this.#t.afterTick?Br(r):r()}}class cn{#t;#e;#r;#n=E(!1);#i=E(void 0);#o=!1;#s=null;constructor(t){this.#t=t,v(this.#n,t.open.current,!0),this.#e=t.enabled??!0,this.#r=new Lh({ref:this.#t.ref,afterTick:this.#t.open}),ur(()=>this.#a()),et(()=>this.#t.open.current,r=>{if(!this.#o){this.#o=!0;return}if(this.#a(),!r&&this.#t.shouldSkipExitAnimation?.()){v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.();return}if(r&&v(this.#n,!0),v(this.#i,r?"starting":"ending",!0),r&&(this.#s=window.requestAnimationFrame(()=>{this.#s=null,this.#t.open.current&&v(this.#i,void 0)})),!this.#e){r||v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.();return}this.#r.run(()=>{r===this.#t.open.current&&(this.#t.open.current||v(this.#n,!1),v(this.#i,void 0),this.#t.onComplete?.())})})}get shouldRender(){return l(this.#n)}get transitionStatus(){return l(this.#i)}#a(){this.#s!==null&&(window.cancelAnimationFrame(this.#s),this.#s=null)}}function st(){}function lt(e,t){return`bits-${e}`}const rv=_e({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),un=new Vt("Dialog.Root | AlertDialog.Root");class xa{static create(t){const r=un.getOr(null);return un.set(new xa(t,r))}opts;#t=E(null);get triggerNode(){return l(this.#t)}set triggerNode(t){v(this.#t,t,!0)}#e=E(null);get contentNode(){return l(this.#e)}set contentNode(t){v(this.#e,t,!0)}#r=E(null);get overlayNode(){return l(this.#r)}set overlayNode(t){v(this.#r,t,!0)}#n=E(null);get descriptionNode(){return l(this.#n)}set descriptionNode(t){v(this.#n,t,!0)}#i=E(void 0);get contentId(){return l(this.#i)}set contentId(t){v(this.#i,t,!0)}#o=E(void 0);get titleId(){return l(this.#o)}set titleId(t){v(this.#o,t,!0)}#s=E(void 0);get triggerId(){return l(this.#s)}set triggerId(t){v(this.#s,t,!0)}#a=E(void 0);get descriptionId(){return l(this.#a)}set descriptionId(t){v(this.#a,t,!0)}#l=E(null);get cancelNode(){return l(this.#l)}set cancelNode(t){v(this.#l,t,!0)}#c=E(0);get nestedOpenCount(){return l(this.#c)}set nestedOpenCount(t){v(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,r){this.opts=t,this.parent=r,this.depth=r?r.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new cn({ref:_(()=>this.overlayNode),open:this.opts.open,enabled:!0}),et(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),ur(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>rv.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=y(()=>({"data-state":jr(this.opts.open.current)}));get sharedProps(){return l(this.#u)}set sharedProps(t){v(this.#u,t)}}class Ca{static create(t){return new Ca(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Ue||t.key===lr)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Pa{static create(t){return new Pa(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.root.titleId=this.opts.id.current,this.attachment=rt(this.opts.ref),et.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ta{static create(t){return new Ta(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.root.descriptionId=this.opts.id.current,this.attachment=rt(this.opts.ref,n=>{this.root.descriptionNode=n}),et.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Aa{static create(t){return new Aa(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":pt(this.root.nestedOpenCount>0),"data-nested":pt(this.root.parent!==null),...Wn(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class Da{static create(t){return new Da(t,un.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.overlayNode=n)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":pt(this.root.nestedOpenCount>0),"data-nested":pt(this.root.parent!==null),...Wn(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}var nv=W("<div><!></div>");function l1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"level",3,2),s=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=Pa.create({id:_(()=>n()),level:_(()=>o()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=nv();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}function iv(e,t){var r=A(),n=P(r);Cg(n,()=>t.children,i=>{var o=A(),s=P(o);M(s,()=>t.children??L),x(i,o)}),x(e,r)}const ov=new Vt("BitsConfig");function sv(){const e=new av(null,{});return ov.getOr(e).opts}class av{opts;constructor(t,r){const n=lv(t,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function lv(e,t){return r=>_(()=>{const i=r(t)?.current;if(i!==void 0)return i;if(e!==null)return r(e.opts)?.current})}function Bh(e,t){return r=>{const n=sv();return _(()=>{const i=r();if(i!==void 0)return i;const o=e(n).current;return o!==void 0?o:t})}}const cv=Bh(e=>e.defaultLocale,"en"),uv=Bh(e=>e.defaultPortalTo,"body");function c1(e,t){B(t,!0);const r=uv(()=>t.to),n=Rf();let i=y(o);function o(){if(!wi||t.disabled)return null;let p=null;return typeof r.current=="string"?p=document.querySelector(r.current):p=r.current,p}let s;function a(){s&&(dh(s),s=null)}et([()=>l(i),()=>t.disabled],([p,h])=>{if(!p||h){a();return}return s=ga(iv,{target:p,props:{children:t.children},context:n}),()=>{a()}});var c=A(),u=P(c);{var d=p=>{var h=A(),f=P(h);M(f,()=>t.children??L),x(p,h)};N(u,p=>{t.disabled&&p(d)})}x(e,c),V()}function kc(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function Vh(e,t){return e===t||e.contains(t)}function Hh(e){return e?.ownerDocument??document}function hv(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var Wh=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],to=Wh.join(","),Uh=typeof Element>"u",hn=Uh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,eo=!Uh&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ro=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",s=o||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ro(t.parentNode));return s},dv=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},zh=function(t,r,n){if(ro(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(to));return r&&hn.call(t,to)&&i.unshift(t),i=i.filter(n),i},no=function(t,r,n){for(var i=[],o=Array.from(t);o.length;){var s=o.shift();if(!ro(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),c=a.length?a:s.children,u=no(c,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:s,candidates:u})}else{var d=hn.call(s,to);d&&n.filter(s)&&(r||!t.includes(s))&&i.push(s);var p=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),h=!ro(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(p&&h){var f=no(p===!0?s.children:p.children,!0,n);n.flatten?i.push.apply(i,f):i.push({scopeParent:s,candidates:f})}else o.unshift.apply(o,s.children)}}return i},Yh=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Kh=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||dv(t))&&!Yh(t)?0:t.tabIndex},fv=function(t,r){var n=Kh(t);return n<0&&r&&!Yh(t)?0:n},gv=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},jh=function(t){return t.tagName==="INPUT"},pv=function(t){return jh(t)&&t.type==="hidden"},vv=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},mv=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},bv=function(t){if(!t.name)return!0;var r=t.form||eo(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=mv(i,t.form);return!o||o===t},yv=function(t){return jh(t)&&t.type==="radio"},wv=function(t){return yv(t)&&!bv(t)},_v=function(t){var r,n=t&&eo(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var s,a,c;for(o=!!((s=i)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var u,d,p;n=eo(i),i=(u=n)===null||u===void 0?void 0:u.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},Nc=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},Sv=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var s=hn.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(hn.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,d=eo(t);if(u&&!u.shadowRoot&&i(u)===!0)return Nc(t);t.assignedSlot?t=t.assignedSlot:!u&&d!==t.ownerDocument?t=d.host:t=u}t=c}if(_v(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Nc(t);return!1},xv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return hn.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},io=function(t,r){return!(r.disabled||pv(r)||Sv(r,t)||vv(r)||xv(r))},Hs=function(t,r){return!(wv(r)||Kh(r)<0||!io(t,r))},Cv=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},qh=function(t){var r=[],n=[];return t.forEach(function(i,o){var s=!!i.scopeParent,a=s?i.scopeParent:i,c=fv(a,s),u=s?qh(i.candidates):a;c===0?s?r.push.apply(r,u):r.push(a):n.push({documentOrder:o,tabIndex:c,item:i,isScope:s,content:u})}),n.sort(gv).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Pv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=no([t],r.includeContainer,{filter:Hs.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Cv}):n=zh(t,r.includeContainer,Hs.bind(null,r)),qh(n)},Tv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=no([t],r.includeContainer,{filter:io.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=zh(t,r.includeContainer,io.bind(null,r)),n},Av=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return hn.call(t,to)===!1?!1:Hs(r,t)},Dv=Wh.concat("iframe:not([inert]):not([inert] *)").join(","),Ov=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return hn.call(t,Dv)===!1?!1:io(r,t)};function Ev(e,t){const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function ns(e,t){return e>=0&&e<t.length}function Iv(e,t,r=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?r?e[0]:void 0:e[t+1]}function Mv(e,t,r=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?r?e[e.length-1]:void 0:e[t-1]}function kv(e,t,r,n=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+r;return n?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function Nv(e,t,r,n=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-r;return n?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function Oa(e,t,r){const n=t.toLowerCase();if(n.endsWith(" ")){const p=n.slice(0,-1);if(e.filter(b=>b.toLowerCase().startsWith(p)).length<=1)return Oa(e,p,r);const f=r?.toLowerCase();if(f&&f.startsWith(p)&&f.charAt(p.length)===" "&&t.trim()===p)return r;const g=e.filter(b=>b.toLowerCase().startsWith(n));if(g.length>0){const b=r?e.indexOf(r):-1;return Fc(g,Math.max(b,0)).find(C=>C!==r)||r}}const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=o.toLowerCase(),a=r?e.indexOf(r):-1;let c=Fc(e,Math.max(a,0));o.length===1&&(c=c.filter(p=>p!==r));const d=c.find(p=>p?.toLowerCase().startsWith(s));return d!==r?d:void 0}function Fc(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const Fv={afterMs:1e4,onChange:st};function Xh(e,t){const{afterMs:r,onChange:n,getWindow:i}={...Fv,...t};let o=null,s=E(Zt(e));function a(){return i().setTimeout(()=>{v(s,e,!0),n?.(e)},r)}return nt(()=>()=>{o&&i().clearTimeout(o)}),_(()=>l(s),c=>{v(s,c,!0),n?.(c),o&&i().clearTimeout(o),o=a()})}class Rv{#t;#e;#r=y(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#n=y(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=Xh("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,r){if(!r.length)return;this.#e.current=this.#e.current+t;const n=l(this.#n)(),i=r.find(c=>c===n)?.textContent?.trim()??"",o=r.map(c=>c.textContent?.trim()??""),s=Oa(o,this.#e.current,i),a=r.find(c=>c.textContent?.trim()===s);return a&&l(this.#r)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}const Lv="data-context-menu-trigger",Bv="data-context-menu-content";_e({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;class Ea{static create(t){return new Ea(t)}opts;#t;#e;#r={pointerdown:!1};#n=!1;#i=!1;#o=void 0;#s;#a=st;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#s=t.onFocusOutside,nt(()=>{this.#o=Hh(this.opts.ref.current)});let r=st;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#h.destroy(),r()};et([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Eh(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),r(),r=this.#c())}),n}),ur(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#h.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Br(()=>{!this.opts.ref.current||this.#p(t.target)||t.target&&!this.#i&&this.#s.current?.(t)})};#c(){return xn(St(this.#o,"pointerdown",xn(this.#f,this.#d),{capture:!0}),St(this.#o,"pointerdown",xn(this.#g,this.#h)),St(this.#o,"focusin",this.#l))}#u=t=>{let r=t;r.defaultPrevented&&(r=Rc(t)),this.#t.current(t)};#h=kc(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||Wv(t,this.opts.ref.current);if(!this.#n||this.#m()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=Rc(n)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=St(this.#o,"click",this.#u,{once:!0})):this.#t.current(n)},10);#f=t=>{this.#r[t.type]=!0};#g=t=>{this.#r[t.type]=!1};#d=()=>{this.opts.ref.current&&(this.#n=Hv(this.opts.ref.current))};#p=t=>this.opts.ref.current?Vh(this.opts.ref.current,t):!1;#v=kc(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#m(){return Object.values(this.#r).some(Boolean)}#b=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#b,onblurcapture:this.#y}}function Vv(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function Hv(e){const t=[...globalThis.bitsDismissableLayers],r=Vv(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function Wv(e,t){const r=e.target;if(!Qp(r))return!1;const n=!!r.closest(`[${Lv}]`),i=!!t.closest(`[${Bv}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Hh(r).documentElement.contains(r)&&!Vh(t,r)&&hv(e,t)}function Rc(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function Gh(e,t){B(t,!0);let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"onInteractOutside",3,st),i=m(t,"onFocusOutside",3,st),o=m(t,"isValidEvent",3,()=>!1);const s=Ea.create({id:_(()=>t.id),interactOutsideBehavior:_(()=>r()),onInteractOutside:_(()=>n()),enabled:_(()=>t.enabled),onFocusOutside:_(()=>i()),isValidEvent:_(()=>o()),ref:t.ref});var a=A(),c=P(a);M(c,()=>t.children??L,()=>({props:s.props})),x(e,a),V()}globalThis.bitsEscapeLayers??=new Map;class Ia{static create(t){return new Ia(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Dr(this.opts.ref);let r=st;et(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#t()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>St(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==jp||!Uv(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function Uv(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:o}])=>o==="close"||o==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function Zh(e,t){B(t,!0);let r=m(t,"escapeKeydownBehavior",3,"close"),n=m(t,"onEscapeKeydown",3,st);Ia.create({escapeKeydownBehavior:_(()=>r()),onEscapeKeydown:_(()=>n()),enabled:_(()=>t.enabled),ref:t.ref});var i=A(),o=P(i);M(o,()=>t.children??L),x(e,i),V()}class Ma{static instance;#t=le([]);#e=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Ma),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#t.current=this.#t.current.filter(i=>i!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,r){this.#e.set(t,r)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}}class ka{#t=!1;#e=null;#r=Ma.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#r.register(this),this.#l(),this.#s()}unmount(){this.#e&&(this.#o(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#e=null)}#s(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const r=this.#u();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#e.focus()})}#a(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#e||!this.#i.trap.current)return;const t=this.#e,r=t.ownerDocument,n=s=>{if(this.#t||!this.#r.isActiveScope(this))return;const a=s.target;if(!a)return;if(t.contains(a))this.#r.setFocusMemory(this,a);else{const u=this.#r.getFocusMemory(this);if(u&&t.contains(u)&&Ov(u))s.preventDefault(),u.focus();else{const d=this.#u(),p=this.#h()[0];(d||p||t).focus()}}},i=s=>{if(!this.#i.loop||this.#t||s.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#c();if(a.length===0)return;const c=a[0],u=a[a.length-1];!s.shiftKey&&r.activeElement===u?(s.preventDefault(),c.focus()):s.shiftKey&&r.activeElement===c&&(s.preventDefault(),u.focus())};this.#n.push(St(r,"focusin",n,{capture:!0}),St(t,"keydown",i));const o=new MutationObserver(()=>{const s=this.#r.getFocusMemory(this);if(s&&!t.contains(s)){const a=this.#u(),c=this.#h()[0],u=a||c;u?(u.focus(),this.#r.setFocusMemory(this,u)):t.focus()}});o.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>o.disconnect())}#c(){return this.#e?Pv(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#c()[0]||null}#h(){return this.#e?Tv(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return et([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new ka(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ur(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function Jh(e,t){B(t,!0);let r=m(t,"enabled",3,!1),n=m(t,"trapFocus",3,!1),i=m(t,"loop",3,!1),o=m(t,"onCloseAutoFocus",3,st),s=m(t,"onOpenAutoFocus",3,st);const a=ka.use({enabled:_(()=>r()),trap:_(()=>n()),loop:i(),onCloseAutoFocus:_(()=>o()),onOpenAutoFocus:_(()=>s()),ref:t.ref});var c=A(),u=P(c);M(u,()=>t.focusScope??L,()=>({props:a.props})),x(e,c),V()}globalThis.bitsTextSelectionLayers??=new Map;class Na{static create(t){return new Na(t)}opts;domContext;#t=st;constructor(t){this.opts=t,this.domContext=new Dr(t.ref);let r=st;et(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#e()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return xn(St(this.domContext.getDocument(),"pointerdown",this.#r),St(this.domContext.getDocument(),"pointerup",Ch(this.#n,this.opts.onPointerUp.current)))}#r=t=>{const r=this.opts.ref.current,n=t.target;!wr(r)||!wr(n)||!this.opts.enabled.current||!Yv(this)||!Up(r,n)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=zv(r,this.domContext.getDocument().body)))};#n=()=>{this.#t(),this.#t=st}}const Lc=e=>e.style.userSelect||e.style.webkitUserSelect;function zv(e,t){const r=Lc(t),n=Lc(e);return Ni(t,"none"),Ni(e,"text"),()=>{Ni(t,r),Ni(e,n)}}function Ni(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Yv(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Qh(e,t){B(t,!0);let r=m(t,"preventOverflowTextSelection",3,!0),n=m(t,"onPointerDown",3,st),i=m(t,"onPointerUp",3,st);Na.create({id:_(()=>t.id),onPointerDown:_(()=>n()),onPointerUp:_(()=>i()),enabled:_(()=>t.enabled&&r()),ref:t.ref});var o=A(),s=P(o);M(s,()=>t.children??L),x(e,o),V()}globalThis.bitsIdCounter??={current:0};function qr(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class Kv{#t;#e=0;#r=E();#n;constructor(t){this.#t=t}#i(){this.#e-=1,this.#n&&this.#e<=0&&(this.#n(),v(this.#r,void 0),this.#n=void 0)}get(...t){return this.#e+=1,l(this.#r)===void 0&&(this.#n=eg(()=>{v(this.#r,this.#t(...t),!0)})),nt(()=>()=>{this.#i()}),l(this.#r)}}const ji=new Rs;let Fi=E(null),is=null,qn=null,Xn=!1;const Bc=_(()=>{for(const e of ji.values())if(e)return!0;return!1});let os=null;const jv=new Kv(()=>{function e(){document.body.setAttribute("style",l(Fi)??""),document.body.style.removeProperty("--scrollbar-width"),Vs&&is?.(),v(Fi,null)}function t(){qn!==null&&(window.clearTimeout(qn),qn=null)}function r(i,o){t(),Xn=!0,os=Date.now();const s=os,a=()=>{qn=null,os===s&&($h(ji)?Xn=!1:(Xn=!1,o()))},c=i===null?24:i;qn=window.setTimeout(a,c)}function n(){l(Fi)===null&&ji.size===0&&!Xn&&v(Fi,document.body.getAttribute("style"),!0)}return et(()=>Bc.current,()=>{if(!Bc.current)return;n(),Xn=!1;const i=getComputedStyle(document.documentElement),o=getComputedStyle(document.body),s=i.scrollbarGutter?.includes("stable")||o.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(o.paddingRight??"0",10)+a,margin:Number.parseInt(o.marginRight??"0",10)};a>0&&!s&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",Vs&&(is=St(document,"touchmove",d=>{d.target===document.documentElement&&(d.touches.length>1||d.preventDefault())},{passive:!1})),Br(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ur(()=>()=>{is?.()}),{get lockMap(){return ji},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}});class qv{#t=qr();#e;#r=()=>null;#n;locked;constructor(t,r=()=>null){this.#e=t,this.#r=r,this.#n=jv.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#t,this.#e??!1),this.locked=_(()=>this.#n.lockMap.get(this.#t)??!1,n=>this.#n.lockMap.set(this.#t,n)),ur(()=>{if(this.#n.lockMap.delete(this.#t),$h(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function $h(e){for(const[t,r]of e)if(r)return!0;return!1}function oo(e,t){B(t,!0);let r=m(t,"preventScroll",3,!0),n=m(t,"restoreScrollDelay",3,null);r()&&new qv(r(),()=>n()),V()}var Xv=W("<div><!></div>");function u1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"forceMount",3,!1),o=m(t,"ref",15,null),s=G(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=Da.create({id:_(()=>n()),ref:_(()=>o(),h=>o(h))}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=A(),g=P(f);{var b=S=>{var C=A(),T=P(C);{let D=y(()=>({props:q(l(c)),...a.snippetProps}));M(T,()=>t.child,()=>l(D))}x(S,C)},w=S=>{var C=Xv();J(C,D=>({...D}),[()=>q(l(c))]);var T=Y(C);M(T,()=>t.children??L,()=>a.snippetProps),U(C),x(S,C)};N(g,S=>{t.child?S(b):S(w,-1)})}x(h,f)};N(d,h=>{(a.shouldRender||i())&&h(p)})}x(e,u),V()}var Gv=W("<div><!></div>");function h1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const s=Ta.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=Gv();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}function ss(e,t){return e-t*Math.floor(e/t)}const td=1721426;function Ri(e,t,r,n){t=Fa(e,t);let i=t-1,o=-2;return r<=2?o=0:qi(t)&&(o=-1),td-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+o+n)}function qi(e){return e%4===0&&(e%100!==0||e%400===0)}function Fa(e,t){return e==="BC"?1-t:t}function Zv(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const Jv={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Mn{fromJulianDay(t){let r=t,n=r-td,i=Math.floor(n/146097),o=ss(n,146097),s=Math.floor(o/36524),a=ss(o,36524),c=Math.floor(a/1461),u=ss(a,1461),d=Math.floor(u/365),p=i*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[h,f]=Zv(p),g=r-Ri(h,f,1,1),b=2;r<Ri(h,f,3,1)?b=0:qi(f)&&(b=1);let w=Math.floor(((g+b)*12+373)/367),S=r-Ri(h,f,w,1)+1;return new Wr(h,f,w,S)}toJulianDay(t){return Ri(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return Jv[qi(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return qi(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const Qv={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function kr(e,t){return t=me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Mo(e,t){return t=me(t,e.calendar),e=Ws(e),t=Ws(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function d1(e,t){return ed(e.calendar,t.calendar)&&Mo(e,t)}function ed(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function $v(e,t){return kr(e,em(t))}function rd(e,t,r){let n=e.calendar.toJulianDay(e),i=sm(t),o=Math.ceil(n+1-i)%7;return o<0&&(o+=7),o}function tm(e){return er(Date.now(),e)}function em(e){return cm(tm(e))}function nd(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function rm(e,t){return Vc(e)-Vc(t)}function Vc(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let as=null,nm=!1;function Fr(){return as==null&&(as=new Intl.DateTimeFormat().resolvedOptions().timeZone),as}function id(){return nm}function Ws(e){return e.subtract({days:e.day-1})}function im(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}const Hc=new Map,ls=new Map;function om(e){if(Intl.Locale){let r=Hc.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Hc.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function sm(e){let t=ls.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return ls.set(e,t),t.firstDay}let r=om(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&Qv[r]||0};ls.set(e,t)}return t.firstDay}function Vr(e){e=me(e,new Mn);let t=Fa(e.era,e.year);return od(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function od(e,t,r,n,i,o,s){let a=new Date;return a.setUTCHours(n,i,o,s),a.setUTCFullYear(e,t-1,r),a.getTime()}function ni(e,t){if(t==="UTC")return 0;if(e>0&&t===Fr()&&!id())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:o,minute:s,second:a}=sd(e,t);return od(r,n,i,o,s,a,0)-Math.floor(e/1e3)*1e3}const Wc=new Map;function sd(e,t){let r=Wc.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Wc.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let o of n)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const so=864e5;function am(e,t){let r=Vr(e),n=r-ni(r-so,t),i=r-ni(r+so,t);return ad(e,t,n,i)}function ad(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>lm(e,t,o))}function lm(e,t,r){let n=sd(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Qe(e,t,r="compatible"){let n=Hr(e);if(t==="UTC")return Vr(n);if(t===Fr()&&r==="compatible"&&!id()){n=me(n,new Mn);let c=new Date,u=Fa(n.era,n.year);return c.setFullYear(u,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let i=Vr(n),o=ni(i-so,t),s=ni(i+so,t),a=ad(n,t,i-o,i-s);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function ld(e,t,r="compatible"){return new Date(Qe(e,t,r))}function er(e,t){let r=ni(e,t),n=new Date(e+r),i=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),a=n.getUTCHours(),c=n.getUTCMinutes(),u=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new cr(i<1?"BC":"AD",i<1?-i+1:i,o,s,t,r,a,c,u,d)}function cm(e){return new Wr(e.calendar,e.era,e.year,e.month,e.day)}function Hr(e,t){let r=0,n=0,i=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:o}=t),new xr(e.calendar,e.era,e.year,e.month,e.day,r,n,i,o)}function me(e,t){if(ed(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,dn(n),n}function um(e,t,r){if(e instanceof cr)return e.timeZone===t?e:dm(e,t);let n=Qe(e,t,r);return er(n,t)}function hm(e){let t=Vr(e)-e.offset;return new Date(t)}function dm(e,t){let r=Vr(e)-e.offset;return me(er(r,t),e.calendar)}const Gn=36e5;function ko(e,t){let r=e.copy(),n="hour"in r?vm(r,t):0;Us(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,zs(r),cd(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,fm(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function Us(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function zs(e){for(;e.month<1;)Us(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Us(e,1)}function fm(e){for(;e.day<1;)e.month--,zs(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zs(e)}function cd(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function dn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),cd(e)}function ud(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function hd(e,t){return ko(e,ud(t))}function Ra(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),dn(r),r}function ao(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),pm(r),r}function gm(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Li(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Li(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Li(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Li(e.hour,24),t}function pm(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Li(e,t){let r=e%t;return r<0&&(r+=t),r}function vm(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,gm(e)}function La(e,t,r,n){let i=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),s=o.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=br(s,r,0,o.length-1,n?.round),i.era=o[s],dn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=br(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=br(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=br(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),dn(i),i}function dd(e,t,r,n){let i=e.copy();switch(t){case"hour":{let o=e.hour,s=0,a=23;if(n?.hourCycle===12){let c=o>=12;s=c?12:0,a=c?23:11}i.hour=br(o,r,s,a,n?.round);break}case"minute":i.minute=br(e.minute,r,0,59,n?.round);break;case"second":i.second=br(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=br(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function br(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function fd(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=ko(Hr(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=Qe(i,e.timeZone)}else r=Vr(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=er(r,e.timeZone);return me(n,e.calendar)}function mm(e,t){return fd(e,ud(t))}function bm(e,t,r,n){switch(t){case"hour":{let i=0,o=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,o=g?23:11}let s=Hr(e),a=me(ao(s,{hour:i}),new Mn),c=[Qe(a,e.timeZone,"earlier"),Qe(a,e.timeZone,"later")].filter(g=>er(g,e.timeZone).day===a.day)[0],u=me(ao(s,{hour:o}),new Mn),d=[Qe(u,e.timeZone,"earlier"),Qe(u,e.timeZone,"later")].filter(g=>er(g,e.timeZone).day===u.day).pop(),p=Vr(e)-e.offset,h=Math.floor(p/Gn),f=p%Gn;return p=br(h,r,Math.floor(c/Gn),Math.floor(d/Gn),n?.round)*Gn+f,me(er(p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return dd(e,t,r,n);case"era":case"year":case"month":case"day":{let i=La(Hr(e),t,r,n),o=Qe(i,e.timeZone);return me(er(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function ym(e,t,r){let n=Hr(e),i=ao(Ra(n,t),t);if(i.compare(n)===0)return e;let o=Qe(i,e.timeZone,r);return me(er(o,e.timeZone),e.calendar)}const wm=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,_m=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Sm=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,gd=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function pd(e){let t=e.match(wm);if(!t)throw gd.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Wr(jt(t[1],0,9999),jt(t[2],1,12),1);return r.day=jt(t[3],1,r.calendar.getDaysInMonth(r)),r}function vd(e){let t=e.match(_m);if(!t)throw gd.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=jt(t[1],-9999,9999),n=r<1?"BC":"AD",i=new xr(n,r<1?-r+1:r,jt(t[2],1,12),1,t[4]?jt(t[4],0,23):0,t[5]?jt(t[5],0,59):0,t[6]?jt(t[6],0,59):0,t[7]?jt(t[7],0,1/0)*1e3:0);return i.day=jt(t[3],0,i.calendar.getDaysInMonth(i)),i}function md(e,t){let r=e.match(Sm);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=jt(r[1],-9999,9999),i=n<1?"BC":"AD",o=new cr(i,n<1?-n+1:n,jt(r[2],1,12),1,r[11],0,r[4]?jt(r[4],0,23):0,r[5]?jt(r[5],0,59):0,r[6]?jt(r[6],0,59):0,r[7]?jt(r[7],0,1/0)*1e3:0);o.day=jt(r[3],0,o.calendar.getDaysInMonth(o));let s=Hr(o),a;if(r[8]){let c=jt(r[8],-23,23);if(o.offset=Math.sign(c)*(Math.abs(c)*36e5+jt(r[9]??"0",0,59)*6e4+jt(r[10]??"0",0,59)*1e3),a=Vr(o)-o.offset,!am(s,o.timeZone).includes(a))throw new Error(`Offset ${yd(o.offset)} is invalid for ${Ba(o)} in ${o.timeZone}`)}else a=Qe(Hr(s),o.timeZone,t);return er(a,o.timeZone)}function jt(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function xm(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bd(e){let t=me(e,new Mn),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Ba(e){return`${bd(e)}T${xm(e)}`}function yd(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(o+=`:${String(i).padStart(2,"0")}`),o}function Cm(e){return`${Ba(e)}${yd(e.offset)}[${e.timeZone}]`}function Va(e){let t=typeof e[0]=="object"?e.shift():new Mn,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),o=e.shift();return[t,r,n,i,o]}class Wr{#t;constructor(...t){let[r,n,i,o,s]=Va(t);this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,dn(this)}copy(){return this.era?new Wr(this.calendar,this.era,this.year,this.month,this.day):new Wr(this.calendar,this.year,this.month,this.day)}add(t){return ko(this,t)}subtract(t){return hd(this,t)}set(t){return Ra(this,t)}cycle(t,r,n){return La(this,t,r,n)}toDate(t){return ld(this,t)}toString(){return bd(this)}compare(t){return nd(this,t)}}class xr{#t;constructor(...t){let[r,n,i,o,s]=Va(t);this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,dn(this)}copy(){return this.era?new xr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new xr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ko(this,t)}subtract(t){return hd(this,t)}set(t){return Ra(ao(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return La(this,t,r,n);default:return dd(this,t,r,n)}}toDate(t,r){return ld(this,t,r)}toString(){return Ba(this)}compare(t){let r=nd(this,t);return r===0?rm(this,Hr(t)):r}}class cr{#t;constructor(...t){let[r,n,i,o,s]=Va(t),a=t.shift(),c=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=o,this.day=s,this.timeZone=a,this.offset=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,dn(this)}copy(){return this.era?new cr(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new cr(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return fd(this,t)}subtract(t){return mm(this,t)}set(t,r){return ym(this,t,r)}cycle(t,r,n){return bm(this,t,r,n)}toDate(){return hm(this)}toString(){return Cm(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-um(t,this.timeZone).toDate().getTime()}}let cs=new Map;class Ze{constructor(t,r={}){this.formatter=wd(t,r),this.options=r}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),i=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Am()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Dm(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const Pm={true:{ja:"h11"},false:{}};function wd(e,t={}){if(typeof t.hour12=="boolean"&&Tm()){t={...t};let i=Pm[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=i??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(cs.has(r))return cs.get(r);let n=new Intl.DateTimeFormat(e,t);return cs.set(r,n),n}let us=null;function Tm(){return us==null&&(us=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),us}let hs=null;function Am(){return hs==null&&(hs=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),hs}function Dm(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=wd(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function Om(e){if(!wi||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const o=e.createElement("div");return o.role="log",o.ariaLive=i,o.setAttribute("aria-relevant","additions"),o};if(!wr(t)){const i=e.createElement("div");i.style.cssText=Op,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!wr(t))return null;const o=t.querySelector(`[aria-live="${i}"]`);return wr(o)?o:null}}}function Uc(e){const t=Om(e);function r(n,i="assertive",o=7500){if(!t||!wi||!e)return;const s=t.getLog(i),a=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?s?.replaceChildren(a):s?.appendChild(a),setTimeout(()=>{a.remove()},o)}return{announce:r}}const Em={defaultValue:void 0,granularity:"day"};function Im(e){const t={...Em,...e},{defaultValue:r,granularity:n,minValue:i,maxValue:o}=t;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let s=new Date;i&&s<i.toDate(Fr())?s=i.toDate(Fr()):o&&s>o.toDate(Fr())&&(s=o.toDate(Fr()));const a=s.getFullYear(),c=s.getMonth()+1,u=s.getDate();return["hour","minute","second"].includes(n??"day")?new xr(a,c,u,0,0,0):new Wr(a,c,u)}}function _d(e,t){let r;return t instanceof cr?r=md(e):t instanceof xr?r=vd(e):r=pd(e),r.calendar!==t.calendar?me(r,t.calendar):r}function Ve(e,t=Fr()){return e instanceof cr?e.toDate():e.toDate(t)}function Mm(e){if(e instanceof Wr)return"date";if(e instanceof xr)return"datetime";if(e instanceof cr)return"zoneddatetime";throw new Error("Unknown date type")}function km(e,t){switch(t){case"date":return pd(e);case"datetime":return vd(e);case"zoneddatetime":return md(e);default:throw new Error(`Unknown date type: ${t}`)}}function Nm(e){return e instanceof xr}function Sd(e){return e instanceof cr}function Ys(e){return Nm(e)||Sd(e)}function Fm(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function ii(e,t){return e.compare(t)<0}function Rm(e,t){return e.compare(t)>0}function zc(e,t,r){const n=rd(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function Yc(e,t,r){const n=rd(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}const Lm={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Bm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new Ze(t,g).format(f)}function o(f,g=!0){return Ys(f)&&g?i(Ve(f),{dateStyle:"long",timeStyle:"long"}):i(Ve(f),{dateStyle:"long"})}function s(f){if(typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function")return new Ze(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f);const g=typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new Ze(t,{month:e.monthFormat.current}).format(f),b=typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new Ze(t,{year:e.yearFormat.current}).format(f);return`${g} ${b}`}function a(f){return new Ze(t,{month:"long"}).format(f)}function c(f){return new Ze(t,{year:"numeric"}).format(f)}function u(f,g){return Sd(f)?new Ze(t,{...g,timeZone:f.timeZone}).formatToParts(Ve(f)):new Ze(t,g).formatToParts(Ve(f))}function d(f,g="narrow"){return new Ze(t,{weekday:g}).format(f)}function p(f,g=void 0){return new Ze(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(S=>S.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,b={}){const w={...Lm,...b},C=u(f,w).find(T=>T.type===g);return C?C.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:c,fullMonthAndYear:s,toParts:u,custom:i,part:h,dayPeriod:p,selectedDate:o,dayOfWeek:d}}function Vm(e){return!(!wr(e)||!e.hasAttribute("data-bits-day"))}function Kc(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function ds(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,o=Fm(t),s=Array.from({length:o},(w,S)=>t.set({day:S+1})),a=Ws(t),c=im(t),u=r!==void 0?zc(a,r,"en-US"):zc(a,0,i),d=r!==void 0?Yc(c,r,"en-US"):Yc(c,0,i),p=Kc(u.subtract({days:1}),a),h=Kc(c,d.add({days:1})),f=p.length+s.length+h.length;if(n&&f<42){const w=42-f;let S=h[h.length-1];S||(S=t.add({months:1}).set({day:1}));let C=w;h.length===0&&(C=w-1,h.push(S));const T=Array.from({length:C},(D,k)=>{const O=k+1;return S.add({days:O})});h.push(...T)}const g=p.concat(s,h),b=Ev(g,7);return{value:t,dates:g,weeks:b}}function _i(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(ds({...n,dateObj:r})),i;i.push(ds({...n,dateObj:r}));for(let o=1;o<t;o++){const s=r.add({months:o});i.push(ds({...n,dateObj:s}))}return i}function fs(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>wr(r)):[]}function jc(e,t){const r=e.getAttribute("data-value");r&&(t.current=_d(r,t.current))}function Hm({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:o,months:s,numberOfMonths:a}){const c=fs(n);if(!c.length)return;const d=c.indexOf(e)+t;if(ns(d,c)){const p=c[d];return jc(p,r),p.focus()}if(d<0){if(i)return;const p=s[0]?.value;if(!p)return;r.current=p.subtract({months:a}),Br(()=>{const h=fs(n);if(!h.length)return;const f=h.length-Math.abs(d);if(ns(f,h)){const g=h[f];return jc(g,r),g.focus()}})}if(d>=c.length){if(o)return;const p=s[0]?.value;if(!p)return;r.current=p.add({months:a}),Br(()=>{const h=fs(n);if(!h.length)return;const f=d-c.length;if(ns(f,h))return h[f].focus()})}}const qc=[tr,Re,bi,yi],Xc=[lr,Ue];function Wm({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!Vm(i)||!qc.includes(e.key)&&!Xc.includes(e.key))return;e.preventDefault();const o={[tr]:7,[Re]:-7,[bi]:-1,[yi]:1};if(qc.includes(e.key)){const s=o[e.key];s!==void 0&&r(i,s)}if(Xc.includes(e.key)){const s=i.getAttribute("data-value");if(!s)return;t(e,_d(s,n))}}function Um({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:o,fixedWeeks:s,setPlaceholder:a}){const c=e[0]?.value;if(c)if(n)a(c.add({months:r}));else{const u=c.add({months:1}),d=_i({dateObj:u,weekStartsOn:i,locale:o,fixedWeeks:s,numberOfMonths:r});a(u),t(d)}}function zm({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:o,fixedWeeks:s,setPlaceholder:a}){const c=e[0]?.value;if(c)if(n)a(c.subtract({months:r}));else{const u=c.subtract({months:1}),d=_i({dateObj:u,weekStartsOn:i,locale:o,fixedWeeks:s,numberOfMonths:r});a(u),t(d)}}function Ym({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const i=e[0].weeks[0];return i?i.map(o=>t.dayOfWeek(Ve(o),r)):[]}function Km(e){nt(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Et(()=>{const o=e.placeholder.current;if(!o)return;const s={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(_i({...s,dateObj:o}))})})}function jm({calendarNode:e,label:t,accessibleHeadingId:r}){const n=ya(e),i=n.createElement("div");i.style.cssText=Oo({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const o=n.createElement("div");return o.textContent=t,o.id=r,o.role="heading",o.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(o),()=>{const s=n.getElementById(r);s&&(i.parentElement?.removeChild(i),s.remove())}}function qm({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:o,setMonths:s}){nt(()=>{e.current,Et(()=>{if(t().some(c=>Mo(c,e.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:o.current};s(_i({...a,dateObj:e.current}))})})}function Xm({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return Rm(i,e)}function Gm({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return ii(i,e)}function Zm({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const d=Ve(e[0].value);return`${r.fullMonthAndYear(d)}`}const n=Ve(e[0].value),i=Ve(e[e.length-1].value),o=r.fullMonth(n),s=r.fullMonth(i),a=r.fullYear(n),c=r.fullYear(i);return a===c?`${o} - ${s} ${c}`:`${o} ${a} - ${s} ${c}`}function Jm({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":pt(r),"data-disabled":pt(n),"data-readonly":pt(i)}}function Qm(e){if(!wi)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return km(n,i)}function $m({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:o}){function s(a){return!!(o.current(a)||n.current&&ii(a,n.current)||i.current&&ii(i.current,a))}et(()=>e.current,()=>{e.current&&t.current&&kr(t.current,r)&&s(r)&&(t.current=Qm(e.current)??r)})}function tb(e,t){return!e||!t?e:Ys(e)&&Ys(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}const eb=_e({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function rb(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const s=r-100;n=e.placeholderYear<s?e.placeholderYear-10:s}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const o=i-n+1;return Array.from({length:o},(s,a)=>n+a)}const Ee=new Vt("Calendar.Root | RangeCalender.Root");class Ha{static create(t){return Ee.set(new Ha(t))}opts;#t=y(()=>this.months.map(t=>t.value));get visibleMonths(){return l(this.#t)}set visibleMonths(t){v(this.#t,t)}formatter;accessibleHeadingId=qr();domContext;attachment;#e=E(Zt([]));get months(){return l(this.#e)}set months(t){v(this.#e,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=rt(this.opts.ref),this.domContext=new Dr(t.ref),this.announcer=Uc(null),this.formatter=Bm({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),pi(()=>{this.announcer=Uc(this.domContext.getDocument())}),this.months=_i({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#o(),this.#s(),this.#a(),qm({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),Km({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),et(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),et(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),$m({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=y(()=>Ym({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return l(this.#r)}set weekdays(t){v(this.#r,t)}#n=y(()=>Et(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return l(this.#n)}set initialPlaceholderYear(t){v(this.#n,t)}#i=y(()=>rb({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return l(this.#i)}set defaultYears(t){v(this.#i,t)}#o(){nt(()=>{if(Et(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#s(){nt(()=>this.opts.ref.current?jm({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#a(){Ln(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){Um({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){zm({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=y(()=>Xm({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return l(this.#l)}set isNextButtonDisabled(t){v(this.#l,t)}#c=y(()=>Gm({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return l(this.#c)}set isPrevButtonDisabled(t){v(this.#c,t)}#u=y(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return l(this.#u)}set isInvalid(t){v(this.#u,t)}#h=y(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,Zm({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return l(this.#h)}set headingValue(t){v(this.#h,t)}#f=y(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return l(this.#f)}set fullCalendarLabel(t){v(this.#f,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>Mo(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ii(t,r)||n&&ii(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>kr(n,t)):r?kr(r,t):!1}shiftFocus(t,r){return Hm({node:t,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#g(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const o=this.handleSingleUpdate(n,r);o?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(o,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=tb(o,n),o!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const o=[r];return this.#g(o)?o:[r]}if(!Array.isArray(t))return;const n=t.findIndex(o=>kr(o,r)),i=this.opts.preventDeselect.current;if(n===-1){const o=[...t,r];return this.#g(o)?o:[r]}else{if(i)return t;{const o=t.filter(s=>!kr(s,r));if(!o.length){this.opts.placeholder.current=r;return}return o}}}handleSingleUpdate(t,r){if(!t)return r;if(!this.opts.preventDeselect.current&&kr(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){Wm({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#d=y(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return l(this.#d)}set snippetProps(t){v(this.#d,t)}getBitsAttr=t=>eb.getAttr(t);#p=y(()=>({...Jm({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#p)}set props(t){v(this.#p,t)}}const xd=new Vt("Calendar.Cell | RangeCalendar.Cell");class Wa{static create(t){return xd.set(new Wa(t,Ee.get()))}opts;root;#t=y(()=>Ve(this.opts.date.current));get cellDate(){return l(this.#t)}set cellDate(t){v(this.#t,t)}#e=y(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return l(this.#e)}set isUnavailable(t){v(this.#e,t)}#r=y(()=>$v(this.opts.date.current,Fr()));get isDateToday(){return l(this.#r)}set isDateToday(t){v(this.#r,t)}#n=y(()=>!Mo(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return l(this.#n)}set isOutsideMonth(t){v(this.#n,t)}#i=y(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return l(this.#i)}set isOutsideVisibleMonths(t){v(this.#i,t)}#o=y(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return l(this.#o)}set isDisabled(t){v(this.#o,t)}#s=y(()=>kr(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return l(this.#s)}set isFocusedDate(t){v(this.#s,t)}#a=y(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return l(this.#a)}set isSelectedDate(t){v(this.#a,t)}#l=y(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return l(this.#l)}set labelText(t){v(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#c=y(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return l(this.#c)}set snippetProps(t){v(this.#c,t)}#u=y(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return l(this.#u)}set ariaDisabled(t){v(this.#u,t)}#h=y(()=>({"data-unavailable":pt(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":pt(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":Mm(this.opts.date.current),"data-disabled":pt(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return l(this.#h)}set sharedDataAttrs(t){v(this.#h,t)}#f=y(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":fe(this.isSelectedDate),"aria-disabled":fe(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return l(this.#f)}set props(t){v(this.#f,t)}}class Ua{static create(t){return new Ua(t,xd.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#e=y(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return l(this.#e)}set snippetProps(t){v(this.#e,t)}#r=y(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":fe(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:l(this.#t),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class za{static create(t){return new za(t,Ee.get())}opts;root;#t=y(()=>this.root.isNextButtonDisabled);get isDisabled(){return l(this.#t)}set isDisabled(t){v(this.#t,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#e=y(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":fe(this.isDisabled),"data-disabled":pt(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ya{static create(t){return new Ya(t,Ee.get())}opts;root;#t=y(()=>this.root.isPrevButtonDisabled);get isDisabled(){return l(this.#t)}set isDisabled(t){v(this.#t,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#e=y(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":fe(this.isDisabled),"data-disabled":pt(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ka{static create(t){return new Ka(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":fe(this.root.opts.readonly.current),"aria-disabled":fe(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),"data-disabled":pt(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class ja{static create(t){return new ja(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class qa{static create(t){return new qa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Xa{static create(t){return new Xa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ga{static create(t){return new Ga(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Za{static create(t){return new Za(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,"data-disabled":pt(this.root.opts.disabled.current),"data-readonly":pt(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class Ja{static create(t){return new Ja(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onchange=this.onchange.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>{this.root.opts.locale.current;const t=this.opts.months.current,r=this.opts.monthFormat.current,n=[];for(const i of t){const o=this.root.opts.placeholder.current.set({month:i});let s;typeof r=="function"?s=r(i):s=this.root.formatter.custom(Ve(o),{month:r}),n.push({value:i,label:s})}return n});get monthItems(){return l(this.#t)}set monthItems(t){v(this.#t,t)}#e=y(()=>this.root.opts.placeholder.current.month);get currentMonth(){return l(this.#e)}set currentMonth(t){v(this.#e,t)}#r=y(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return l(this.#r)}set isDisabled(t){v(this.#r,t)}#n=y(()=>({monthItems:this.monthItems,selectedMonthItem:this.monthItems.find(t=>t.value===this.currentMonth)}));get snippetProps(){return l(this.#n)}set snippetProps(t){v(this.#n,t)}onchange(t){if(this.isDisabled)return;const r=t.target,n=parseInt(r.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({month:n}))}#i=y(()=>({id:this.opts.id.current,value:this.currentMonth,disabled:this.isDisabled,"data-disabled":pt(this.isDisabled),[this.root.getBitsAttr("month-select")]:"",onchange:this.onchange,...this.attachment}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class Qa{static create(t){return new Qa(t,Ee.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onchange=this.onchange.bind(this),this.attachment=rt(this.opts.ref)}#t=y(()=>this.opts.years.current&&this.opts.years.current.length?this.opts.years.current:this.root.defaultYears);get years(){return l(this.#t)}set years(t){v(this.#t,t)}#e=y(()=>{this.root.opts.locale.current;const t=this.opts.yearFormat.current,r=[];for(const n of this.years){const i=this.root.opts.placeholder.current.set({year:n});let o;typeof t=="function"?o=t(n):o=this.root.formatter.custom(Ve(i),{year:t}),r.push({value:n,label:o})}return r});get yearItems(){return l(this.#e)}set yearItems(t){v(this.#e,t)}#r=y(()=>this.root.opts.placeholder.current.year);get currentYear(){return l(this.#r)}set currentYear(t){v(this.#r,t)}#n=y(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return l(this.#n)}set isDisabled(t){v(this.#n,t)}#i=y(()=>({yearItems:this.yearItems,selectedYearItem:this.yearItems.find(t=>t.value===this.currentYear)}));get snippetProps(){return l(this.#i)}set snippetProps(t){v(this.#i,t)}onchange(t){if(this.isDisabled)return;const r=t.target,n=parseInt(r.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({year:n}))}#o=y(()=>({id:this.opts.id.current,value:this.currentYear,disabled:this.isDisabled,"data-disabled":pt(this.isDisabled),[this.root.getBitsAttr("year-select")]:"",onchange:this.onchange,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}var nb=W("<div><!></div>");function f1(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"ref",15,null),i=m(t,"value",15),o=m(t,"onValueChange",3,st),s=m(t,"placeholder",15),a=m(t,"onPlaceholderChange",3,st),c=m(t,"weekdayFormat",3,"narrow"),u=m(t,"pagedNavigation",3,!1),d=m(t,"isDateDisabled",3,()=>!1),p=m(t,"isDateUnavailable",3,()=>!1),h=m(t,"fixedWeeks",3,!1),f=m(t,"numberOfMonths",3,1),g=m(t,"calendarLabel",3,"Event"),b=m(t,"disabled",3,!1),w=m(t,"readonly",3,!1),S=m(t,"minValue",3,void 0),C=m(t,"maxValue",3,void 0),T=m(t,"preventDeselect",3,!1),D=m(t,"disableDaysOutsideMonth",3,!0),k=m(t,"initialFocus",3,!1),O=m(t,"monthFormat",3,"long"),I=m(t,"yearFormat",3,"numeric"),F=G(t,["$$slots","$$events","$$legacy","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const z=Im({defaultValue:i(),minValue:S(),maxValue:C()});function R(){s()===void 0&&s(z)}R(),et.pre(()=>s(),()=>{R()});function X(){i()===void 0&&i(t.type==="single"?void 0:[])}X(),et.pre(()=>i(),()=>{X()});const H=Ha.create({id:_(()=>r()),ref:_(()=>n(),Z=>n(Z)),weekdayFormat:_(()=>c()),weekStartsOn:_(()=>t.weekStartsOn),pagedNavigation:_(()=>u()),isDateDisabled:_(()=>d()),isDateUnavailable:_(()=>p()),fixedWeeks:_(()=>h()),numberOfMonths:_(()=>f()),locale:cv(()=>t.locale),calendarLabel:_(()=>g()),readonly:_(()=>w()),disabled:_(()=>b()),minValue:_(()=>S()),maxValue:_(()=>C()),disableDaysOutsideMonth:_(()=>D()),initialFocus:_(()=>k()),maxDays:_(()=>t.maxDays),placeholder:_(()=>s(),Z=>{s(Z),a()(Z)}),preventDeselect:_(()=>T()),value:_(()=>i(),Z=>{i(Z),o()(Z)}),type:_(()=>t.type),monthFormat:_(()=>O()),yearFormat:_(()=>I()),defaultPlaceholder:z}),K=y(()=>q(F,H.props));var Q=A(),ht=P(Q);{var xt=Z=>{var $=A(),gt=P($);{let It=y(()=>({props:l(K),...H.snippetProps}));M(gt,()=>t.child,()=>l(It))}x(Z,$)},vt=Z=>{var $=nb();J($,()=>({...l(K)}));var gt=Y($);M(gt,()=>t.children??L,()=>H.snippetProps),U($),x(Z,$)};N(ht,Z=>{t.child?Z(xt):Z(vt,-1)})}x(e,Q),V()}var ib=W("<div><!></div>");function g1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ua.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=ib();J(f,()=>({...l(a)}));var g=Y(f);{var b=S=>{var C=A(),T=P(C);M(T,()=>t.children??L,()=>s.snippetProps),x(S,C)},w=S=>{var C=Is();Jt(()=>nn(C,s.cell.opts.date.current.day)),x(S,C)};N(g,S=>{t.children?S(b):S(w,-1)})}U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ob=W("<table><!></table>");function p1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ka.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=ob();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var sb=W("<tbody><!></tbody>");function v1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=ja.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=sb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ab=W("<td><!></td>");function m1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","date","month"]);const s=Wa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h)),date:_(()=>t.date),month:_(()=>t.month)}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=ab();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L,()=>s.snippetProps),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var lb=W("<thead><!></thead>");function b1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=qa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=lb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var cb=W("<th><!></th>");function y1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Ga.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=cb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var ub=W("<tr><!></tr>");function w1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Xa.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=ub();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var hb=W("<header><!></header>");function _1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const s=Za.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=hb();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var db=W("<option> </option>"),fb=W("<!>",1),gb=W("<select><!></select>");function S1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"months",19,()=>[1,2,3,4,5,6,7,8,9,10,11,12]),s=m(t,"monthFormat",3,"long"),a=m(t,"disabled",3,!1),c=m(t,"aria-label",3,"Select a month"),u=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","months","monthFormat","disabled","aria-label"]);const d=Ja.create({id:_(()=>i()),ref:_(()=>n(),w=>n(w)),months:_(()=>o()),monthFormat:_(()=>s()),disabled:_(()=>!!a())}),p=y(()=>q(u,d.props,{"aria-label":c()}));var h=A(),f=P(h);{var g=w=>{var S=A(),C=P(S);{let T=y(()=>({props:l(p),...d.snippetProps}));M(C,()=>t.child,()=>l(T))}x(w,S)},b=w=>{var S=gb();J(S,()=>({...l(p)})),wh(S,()=>{var C=Y(S),T=fb(),D=P(T);{var k=I=>{var F=A(),z=P(F);M(z,()=>t.children??L,()=>d.snippetProps),x(I,F)},O=I=>{var F=A(),z=P(F);En(z,17,()=>d.monthItems,R=>R.value,(R,X)=>{var H=db(),K=Y(H,!0);U(H);var Q={};Jt(()=>{pa(H,l(X).value===d.currentMonth),nn(K,l(X).label),Q!==(Q=l(X).value)&&(H.value=(H.__value=l(X).value)??"")}),x(R,H)}),x(I,F)};N(D,I=>{t.children?I(k):I(O,-1)})}x(C,T)}),x(w,S)};N(f,w=>{t.child?w(g):w(b,-1)})}x(e,h),V()}var pb=W("<button><!></button>");function x1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"tabindex",3,0),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]);const a=za.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props,{tabindex:o()}));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=pb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var vb=W("<button><!></button>");function C1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"tabindex",3,0),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]);const a=Ya.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f))}),c=y(()=>q(s,a.props,{tabindex:o()}));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=vb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var mb=W("<option> </option>"),bb=W("<!>",1),yb=W("<select><!></select>");function P1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"yearFormat",3,"numeric"),s=m(t,"disabled",3,!1),a=m(t,"aria-label",3,"Select a year"),c=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","years","yearFormat","disabled","aria-label"]);const u=Qa.create({id:_(()=>i()),ref:_(()=>n(),b=>n(b)),years:_(()=>t.years),yearFormat:_(()=>o()),disabled:_(()=>!!s())}),d=y(()=>q(c,u.props,{"aria-label":a()}));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);{let C=y(()=>({props:l(d),...u.snippetProps}));M(S,()=>t.child,()=>l(C))}x(b,w)},g=b=>{var w=yb();J(w,()=>({...l(d)})),wh(w,()=>{var S=Y(w),C=bb(),T=P(C);{var D=O=>{var I=A(),F=P(I);M(F,()=>t.children??L,()=>u.snippetProps),x(O,I)},k=O=>{var I=A(),F=P(I);En(F,17,()=>u.yearItems,z=>z.value,(z,R)=>{var X=mb(),H=Y(X,!0);U(X);var K={};Jt(()=>{pa(X,l(R).value===u.currentYear),nn(H,l(R).label),K!==(K=l(R).value)&&(X.value=(X.__value=l(R).value)??"")}),x(z,X)}),x(O,I)};N(T,O=>{t.children?O(D):O(k,-1)})}x(S,C)}),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}const wb=_e({component:"checkbox",parts:["root","group","group-label","input"]}),_b=new Vt("Checkbox.Group"),Cd=new Vt("Checkbox.Root");class $a{static create(t,r=null){return Cd.set(new $a(t,r))}opts;group;#t=y(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return l(this.#t)}set trueName(t){v(this.#t,t)}#e=y(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return l(this.#e)}set trueRequired(t){v(this.#e,t)}#r=y(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return l(this.#r)}set trueDisabled(t){v(this.#r,t)}#n=y(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return l(this.#n)}set trueReadonly(t){v(this.#n,t)}attachment;constructor(t,r){this.opts=t,this.group=r,this.attachment=rt(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),et.pre([()=>Ff(this.group?.opts.value.current),()=>this.opts.value.current],([n,i])=>{!n||!i||(this.opts.checked.current=n.includes(i))}),et.pre(()=>this.opts.checked.current,n=>{this.group&&(n?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===lr){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===Ue&&(t.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}t.preventDefault(),this.#i()}}#o=y(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return l(this.#o)}set snippetProps(t){v(this.#o,t)}#s=y(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":Nh(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":fe(this.trueRequired),"aria-readonly":fe(this.trueReadonly),"data-disabled":pt(this.trueDisabled),"data-readonly":pt(this.trueReadonly),"data-state":Sb(this.opts.checked.current,this.opts.indeterminate.current),[wb.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#s)}set props(t){v(this.#s,t)}}class tl{static create(){return new tl(Cd.get())}root;#t=y(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return l(this.#t)}set trueChecked(t){v(this.#t,t)}#e=y(()=>!!this.root.trueName);get shouldRender(){return l(this.#e)}set shouldRender(t){v(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){wr(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=y(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}function Sb(e,t){return t?"indeterminate":e?"checked":"unchecked"}kf();var xb=W("<input/>"),Cb=W("<input/>");function el(e,t){B(t,!0);let r=m(t,"value",15),n=G(t,["$$slots","$$events","$$legacy","value"]);const i=y(()=>q(n,{"aria-hidden":"true",tabindex:-1,style:{...Th,position:"absolute",top:"0",left:"0"}}));var o=A(),s=P(o);{var a=u=>{var d=xb();J(d,()=>({...l(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(u,d)},c=u=>{var d=Cb();J(d,()=>({...l(i)}),void 0,void 0,void 0,void 0,!0),zg(d,r),x(u,d)};N(s,u=>{l(i).type==="checkbox"?u(a):u(c,-1)})}x(e,o),V()}function Pb(e,t){B(t,!1);const r=tl.create();Sh();var n=A(),i=P(n);{var o=s=>{el(s,bt(()=>r.props))};N(i,s=>{r.shouldRender&&s(o)})}x(e,n),V()}var Tb=W("<button><!></button>"),Ab=W("<!> <!>",1);function T1(e,t){const r=at();B(t,!0);let n=m(t,"checked",15,!1),i=m(t,"ref",15,null),o=m(t,"disabled",3,!1),s=m(t,"required",3,!1),a=m(t,"name",3,void 0),c=m(t,"value",3,"on"),u=m(t,"id",19,()=>lt(r)),d=m(t,"indeterminate",15,!1),p=m(t,"type",3,"button"),h=G(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const f=_b.getOr(null);f&&c()&&(f.opts.value.current.includes(c())?n(!0):n(!1)),et.pre(()=>c(),()=>{f&&c()&&(f.opts.value.current.includes(c())?n(!0):n(!1))});const g=$a.create({checked:_(()=>n(),k=>{n(k),t.onCheckedChange?.(k)}),disabled:_(()=>o()??!1),required:_(()=>s()),name:_(()=>a()),value:_(()=>c()),id:_(()=>u()),ref:_(()=>i(),k=>i(k)),indeterminate:_(()=>d(),k=>{d(k),t.onIndeterminateChange?.(k)}),type:_(()=>p()),readonly:_(()=>!!t.readonly)},f),b=y(()=>q({...h},g.props));var w=Ab(),S=P(w);{var C=k=>{var O=A(),I=P(O);{let F=y(()=>({props:l(b),...g.snippetProps}));M(I,()=>t.child,()=>l(F))}x(k,O)},T=k=>{var O=Tb();J(O,()=>({...l(b)}));var I=Y(O);M(I,()=>t.children??L,()=>g.snippetProps),U(O),x(k,O)};N(S,k=>{t.child?k(C):k(T,-1)})}var D=ae(S,2);Pb(D,{}),x(e,w),V()}const rl=_e({component:"collapsible",parts:["root","content","trigger"]}),nl=new Vt("Collapsible.Root");class il{static create(t){return nl.set(new il(t))}opts;attachment;#t=E(null);get contentNode(){return l(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#e=E(void 0);get contentId(){return l(this.#e)}set contentId(t){v(this.#e,t,!0)}constructor(t){this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=rt(this.opts.ref),this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#r=y(()=>({id:this.opts.id.current,"data-state":jr(this.opts.open.current),"data-disabled":pt(this.opts.disabled.current),[rl.root]:"",...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class ol{static create(t){return new ol(t,nl.get())}opts;root;attachment;#t=y(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return l(this.#t)}set present(t){v(this.#t,t)}#e;#r=E(!1);#n=E(0);#i=E(0);constructor(t,r){this.opts=t,this.root=r,v(this.#r,r.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),et.pre(()=>this.opts.id.current,n=>{this.root.contentId=n}),Ln(()=>{const n=requestAnimationFrame(()=>{v(this.#r,!1)});return()=>{cancelAnimationFrame(n)}}),et.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([n,i])=>!n||!i?void 0:St(n,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),et([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&Br(()=>{if(!this.opts.ref.current)return;this.#e=this.#e||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const i=n.getBoundingClientRect();if(v(this.#i,i.height,!0),v(this.#n,i.width,!0),!l(this.#r)){const{animationName:o,transitionDuration:s}=this.#e;n.style.transitionDuration=s,n.style.animationName=o}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#o=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#o)}set snippetProps(t){v(this.#o,t)}#s=y(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":l(this.#i)?`${l(this.#i)}px`:void 0,"--bits-collapsible-content-width":l(this.#n)?`${l(this.#n)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),"data-disabled":pt(this.root.opts.disabled.current),[rl.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return l(this.#s)}set props(t){v(this.#s,t)}}class sl{static create(t){return new sl(t,nl.get())}opts;root;attachment;#t=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){if(!l(this.#t)){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){l(this.#t)||(t.key===Ue||t.key===lr)&&(t.preventDefault(),this.root.toggleOpen())}#e=y(()=>({id:this.opts.id.current,type:"button",disabled:l(this.#t),"aria-controls":this.root.contentId,"aria-expanded":fe(this.root.opts.open.current),"data-state":jr(this.root.opts.open.current),"data-disabled":pt(l(this.#t)),[rl.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}var Db=W("<div><!></div>");function A1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"open",15,!1),s=m(t,"disabled",3,!1),a=m(t,"onOpenChange",3,st),c=m(t,"onOpenChangeComplete",3,st),u=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const d=il.create({open:_(()=>o(),w=>{o(w),a()(w)}),disabled:_(()=>s()),id:_(()=>n()),ref:_(()=>i(),w=>i(w)),onOpenChangeComplete:_(()=>c())}),p=y(()=>q(u,d.props));var h=A(),f=P(h);{var g=w=>{var S=A(),C=P(S);M(C,()=>t.child,()=>({props:l(p)})),x(w,S)},b=w=>{var S=Db();J(S,()=>({...l(p)}));var C=Y(S);M(C,()=>t.children??L),U(S),x(w,S)};N(f,w=>{t.child?w(g):w(b,-1)})}x(e,h),V()}var Ob=W("<div><!></div>");function D1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"forceMount",3,!1),o=m(t,"hiddenUntilFound",3,!1),s=m(t,"id",19,()=>lt(r)),a=G(t,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const c=ol.create({id:_(()=>s()),forceMount:_(()=>i()),hiddenUntilFound:_(()=>o()),ref:_(()=>n(),g=>n(g))}),u=y(()=>q(a,c.props));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);{let S=y(()=>({...c.snippetProps,props:l(u)}));M(w,()=>t.child,()=>l(S))}x(g,b)},f=g=>{var b=Ob();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}var Eb=W("<button><!></button>");function O1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"disabled",3,!1),s=G(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const a=sl.create({id:_(()=>i()),ref:_(()=>n(),f=>n(f)),disabled:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=Eb();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}const Ib=["top","right","bottom","left"],Ur=Math.min,pe=Math.max,lo=Math.round,Bi=Math.floor,ir=e=>({x:e,y:e}),Mb={left:"right",right:"left",bottom:"top",top:"bottom"};function Ks(e,t,r){return pe(e,Ur(t,r))}function Cr(e,t){return typeof e=="function"?e(t):e}function Pr(e){return e.split("-")[0]}function Un(e){return e.split("-")[1]}function al(e){return e==="x"?"y":"x"}function ll(e){return e==="y"?"height":"width"}function rr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function cl(e){return al(rr(e))}function kb(e,t,r){r===void 0&&(r=!1);const n=Un(e),i=cl(e),o=ll(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=co(s)),[s,co(s)]}function Nb(e){const t=co(e);return[js(e),t,js(t)]}function js(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gc=["left","right"],Zc=["right","left"],Fb=["top","bottom"],Rb=["bottom","top"];function Lb(e,t,r){switch(e){case"top":case"bottom":return r?t?Zc:Gc:t?Gc:Zc;case"left":case"right":return t?Fb:Rb;default:return[]}}function Bb(e,t,r,n){const i=Un(e);let o=Lb(Pr(e),r==="start",n);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(js)))),o}function co(e){const t=Pr(e);return Mb[t]+e.slice(t.length)}function Vb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pd(e){return typeof e!="number"?Vb(e):{top:e,right:e,bottom:e,left:e}}function uo(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Jc(e,t,r){let{reference:n,floating:i}=e;const o=rr(t),s=cl(t),a=ll(s),c=Pr(t),u=o==="y",d=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let f;switch(c){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-i.width,y:p};break;default:f={x:n.x,y:n.y}}switch(Un(t)){case"start":f[s]-=h*(r&&u?-1:1);break;case"end":f[s]+=h*(r&&u?-1:1);break}return f}async function Hb(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=Cr(t,e),g=Pd(f),w=a[h?p==="floating"?"reference":"floating":p],S=uo(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),C=p==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},k=uo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:T,strategy:c}):C);return{top:(S.top-k.top+g.top)/D.y,bottom:(k.bottom-S.bottom+g.bottom)/D.y,left:(S.left-k.left+g.left)/D.x,right:(k.right-S.right+g.right)/D.x}}const Wb=50,Ub=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Hb},c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Jc(u,n,c),h=n,f=0;const g={};for(let b=0;b<o.length;b++){const w=o[b];if(!w)continue;const{name:S,fn:C}=w,{x:T,y:D,data:k,reset:O}=await C({x:d,y:p,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});d=T??d,p=D??p,g[S]={...g[S],...k},O&&f<Wb&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(u=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:p}=Jc(u,h,c)),b=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:g}},zb=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Cr(e,t)||{};if(u==null)return{};const p=Pd(d),h={x:r,y:n},f=cl(i),g=ll(f),b=await s.getDimensions(u),w=f==="y",S=w?"top":"left",C=w?"bottom":"right",T=w?"clientHeight":"clientWidth",D=o.reference[g]+o.reference[f]-h[f]-o.floating[g],k=h[f]-o.reference[f],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=O?O[T]:0;(!I||!await(s.isElement==null?void 0:s.isElement(O)))&&(I=a.floating[T]||o.floating[g]);const F=D/2-k/2,z=I/2-b[g]/2-1,R=Ur(p[S],z),X=Ur(p[C],z),H=R,K=I-b[g]-X,Q=I/2-b[g]/2+F,ht=Ks(H,Q,K),xt=!c.arrow&&Un(i)!=null&&Q!==ht&&o.reference[g]/2-(Q<H?R:X)-b[g]/2<0,vt=xt?Q<H?Q-H:Q-K:0;return{[f]:h[f]+vt,data:{[f]:ht,centerOffset:Q-ht-vt,...xt&&{alignmentOffset:vt}},reset:xt}}}),Yb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...w}=Cr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const S=Pr(i),C=rr(a),T=Pr(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(T||!b?[co(a)]:Nb(a)),O=g!=="none";!h&&O&&k.push(...Bb(a,b,g,D));const I=[a,...k],F=await c.detectOverflow(t,w),z=[];let R=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&z.push(F[S]),p){const Q=kb(i,s,D);z.push(F[Q[0]],F[Q[1]])}if(R=[...R,{placement:i,overflows:z}],!z.every(Q=>Q<=0)){var X,H;const Q=(((X=o.flip)==null?void 0:X.index)||0)+1,ht=I[Q];if(ht&&(!(p==="alignment"?C!==rr(ht):!1)||R.every(Z=>rr(Z.placement)===C?Z.overflows[0]>0:!0)))return{data:{index:Q,overflows:R},reset:{placement:ht}};let xt=(H=R.filter(vt=>vt.overflows[0]<=0).sort((vt,Z)=>vt.overflows[1]-Z.overflows[1])[0])==null?void 0:H.placement;if(!xt)switch(f){case"bestFit":{var K;const vt=(K=R.filter(Z=>{if(O){const $=rr(Z.placement);return $===C||$==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter($=>$>0).reduce(($,gt)=>$+gt,0)]).sort((Z,$)=>Z[1]-$[1])[0])==null?void 0:K[0];vt&&(xt=vt);break}case"initialPlacement":xt=a;break}if(i!==xt)return{reset:{placement:xt}}}return{}}}};function Qc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $c(e){return Ib.some(t=>e[t]>=0)}const Kb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=Cr(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...o,elementContext:"reference"}),a=Qc(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$c(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...o,altBoundary:!0}),a=Qc(s,r.floating);return{data:{escapedOffsets:a,escaped:$c(a)}}}default:return{}}}}},Td=new Set(["left","top"]);async function jb(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=Pr(r),a=Un(r),c=rr(r)==="y",u=Td.has(s)?-1:1,d=o&&c?-1:1,p=Cr(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),c?{x:f*d,y:h*u}:{x:h*u,y:f*d}}const qb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await jb(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},Xb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:S=>{let{x:C,y:T}=S;return{x:C,y:T}}},...u}=Cr(e,t),d={x:r,y:n},p=await o.detectOverflow(t,u),h=rr(Pr(i)),f=al(h);let g=d[f],b=d[h];if(s){const S=f==="y"?"top":"left",C=f==="y"?"bottom":"right",T=g+p[S],D=g-p[C];g=Ks(T,g,D)}if(a){const S=h==="y"?"top":"left",C=h==="y"?"bottom":"right",T=b+p[S],D=b-p[C];b=Ks(T,b,D)}const w=c.fn({...t,[f]:g,[h]:b});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[f]:s,[h]:a}}}}}},Gb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Cr(e,t),d={x:r,y:n},p=rr(i),h=al(p);let f=d[h],g=d[p];const b=Cr(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const T=h==="y"?"height":"width",D=o.reference[h]-o.floating[T]+w.mainAxis,k=o.reference[h]+o.reference[T]-w.mainAxis;f<D?f=D:f>k&&(f=k)}if(u){var S,C;const T=h==="y"?"width":"height",D=Td.has(Pr(i)),k=o.reference[p]-o.floating[T]+(D&&((S=s.offset)==null?void 0:S[p])||0)+(D?0:w.crossAxis),O=o.reference[p]+o.reference[T]+(D?0:((C=s.offset)==null?void 0:C[p])||0)-(D?w.crossAxis:0);g<k?g=k:g>O&&(g=O)}return{[h]:f,[p]:g}}}},Zb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...u}=Cr(e,t),d=await s.detectOverflow(t,u),p=Pr(i),h=Un(i),f=rr(i)==="y",{width:g,height:b}=o.floating;let w,S;p==="top"||p==="bottom"?(w=p,S=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=p,w=h==="end"?"top":"bottom");const C=b-d.top-d.bottom,T=g-d.left-d.right,D=Ur(b-d[w],C),k=Ur(g-d[S],T),O=!t.middlewareData.shift;let I=D,F=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(F=T),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=C),O&&!h){const R=pe(d.left,0),X=pe(d.right,0),H=pe(d.top,0),K=pe(d.bottom,0);f?F=g-2*(R!==0||X!==0?R+X:pe(d.left,d.right)):I=b-2*(H!==0||K!==0?H+K:pe(d.top,d.bottom))}await c({...t,availableWidth:F,availableHeight:I});const z=await s.getDimensions(a.floating);return g!==z.width||b!==z.height?{reset:{rects:!0}}:{}}}};function No(){return typeof window<"u"}function zn(e){return Ad(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(Ad(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ad(e){return No()?e instanceof Node||e instanceof ye(e).Node:!1}function Ke(e){return No()?e instanceof Element||e instanceof ye(e).Element:!1}function Or(e){return No()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function tu(e){return!No()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Si(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=je(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Jb(e){return/^(table|td|th)$/.test(zn(e))}function Fo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qb=/transform|translate|scale|rotate|perspective|filter/,$b=/paint|layout|strict|content/,Jr=e=>!!e&&e!=="none";let gs;function ul(e){const t=Ke(e)?je(e):e;return Jr(t.transform)||Jr(t.translate)||Jr(t.scale)||Jr(t.rotate)||Jr(t.perspective)||!hl()&&(Jr(t.backdropFilter)||Jr(t.filter))||Qb.test(t.willChange||"")||$b.test(t.contain||"")}function ty(e){let t=zr(e);for(;Or(t)&&!kn(t);){if(ul(t))return t;if(Fo(t))return null;t=zr(t)}return null}function hl(){return gs==null&&(gs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gs}function kn(e){return/^(html|body|#document)$/.test(zn(e))}function je(e){return ye(e).getComputedStyle(e)}function Ro(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zr(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tu(e)&&e.host||hr(e);return tu(t)?t.host:t}function Dd(e){const t=zr(e);return kn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Or(t)&&Si(t)?t:Dd(t)}function oi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Dd(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=ye(i);if(o){const a=qs(s);return t.concat(s,s.visualViewport||[],Si(i)?i:[],a&&r?oi(a):[])}else return t.concat(i,oi(i,[],r))}function qs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Od(e){const t=je(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Or(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=lo(r)!==o||lo(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function dl(e){return Ke(e)?e:e.contextElement}function Cn(e){const t=dl(e);if(!Or(t))return ir(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Od(t);let s=(o?lo(r.width):r.width)/n,a=(o?lo(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ey=ir(0);function Ed(e){const t=ye(e);return!hl()||!t.visualViewport?ey:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ry(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function fn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=dl(e);let s=ir(1);t&&(n?Ke(n)&&(s=Cn(n)):s=Cn(e));const a=ry(o,r,n)?Ed(o):ir(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,p=i.height/s.y;if(o){const h=ye(o),f=n&&Ke(n)?ye(n):n;let g=h,b=qs(g);for(;b&&n&&f!==g;){const w=Cn(b),S=b.getBoundingClientRect(),C=je(b),T=S.left+(b.clientLeft+parseFloat(C.paddingLeft))*w.x,D=S.top+(b.clientTop+parseFloat(C.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,p*=w.y,c+=T,u+=D,g=ye(b),b=qs(g)}}return uo({width:d,height:p,x:c,y:u})}function Lo(e,t){const r=Ro(e).scrollLeft;return t?t.left+r:fn(hr(e)).left+r}function Id(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lo(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function ny(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",s=hr(n),a=t?Fo(t.floating):!1;if(n===s||a&&o)return r;let c={scrollLeft:0,scrollTop:0},u=ir(1);const d=ir(0),p=Or(n);if((p||!p&&!o)&&((zn(n)!=="body"||Si(s))&&(c=Ro(n)),p)){const f=fn(n);u=Cn(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=s&&!p&&!o?Id(s,c):ir(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function iy(e){return Array.from(e.getClientRects())}function oy(e){const t=hr(e),r=Ro(e),n=e.ownerDocument.body,i=pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lo(e);const a=-r.scrollTop;return je(n).direction==="rtl"&&(s+=pe(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}const eu=25;function sy(e,t){const r=ye(e),n=hr(e),i=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const d=hl();(!d||d&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Lo(n);if(u<=0){const d=n.ownerDocument,p=d.body,h=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-p.clientWidth-f);g<=eu&&(o-=g)}else u<=eu&&(o+=u);return{width:o,height:s,x:a,y:c}}function ay(e,t){const r=fn(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Or(e)?Cn(e):ir(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=n*o.y;return{width:s,height:a,x:c,y:u}}function ru(e,t,r){let n;if(t==="viewport")n=sy(e,r);else if(t==="document")n=oy(hr(e));else if(Ke(t))n=ay(t,r);else{const i=Ed(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return uo(n)}function Md(e,t){const r=zr(e);return r===t||!Ke(r)||kn(r)?!1:je(r).position==="fixed"||Md(r,t)}function ly(e,t){const r=t.get(e);if(r)return r;let n=oi(e,[],!1).filter(a=>Ke(a)&&zn(a)!=="body"),i=null;const o=je(e).position==="fixed";let s=o?zr(e):e;for(;Ke(s)&&!kn(s);){const a=je(s),c=ul(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Si(s)&&!c&&Md(e,s))?n=n.filter(d=>d!==s):i=a,s=zr(s)}return t.set(e,n),n}function cy(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Fo(t)?[]:ly(t,this._c):[].concat(r),n],a=ru(t,s[0],i);let c=a.top,u=a.right,d=a.bottom,p=a.left;for(let h=1;h<s.length;h++){const f=ru(t,s[h],i);c=pe(f.top,c),u=Ur(f.right,u),d=Ur(f.bottom,d),p=pe(f.left,p)}return{width:u-p,height:d-c,x:p,y:c}}function uy(e){const{width:t,height:r}=Od(e);return{width:t,height:r}}function hy(e,t,r){const n=Or(t),i=hr(t),o=r==="fixed",s=fn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=ir(0);function u(){c.x=Lo(i)}if(n||!n&&!o)if((zn(t)!=="body"||Si(i))&&(a=Ro(t)),n){const f=fn(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else i&&u();o&&!n&&i&&u();const d=i&&!n&&!o?Id(i,a):ir(0),p=s.left+a.scrollLeft-c.x-d.x,h=s.top+a.scrollTop-c.y-d.y;return{x:p,y:h,width:s.width,height:s.height}}function ps(e){return je(e).position==="static"}function nu(e,t){if(!Or(e)||je(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return hr(e)===r&&(r=r.ownerDocument.body),r}function kd(e,t){const r=ye(e);if(Fo(e))return r;if(!Or(e)){let i=zr(e);for(;i&&!kn(i);){if(Ke(i)&&!ps(i))return i;i=zr(i)}return r}let n=nu(e,t);for(;n&&Jb(n)&&ps(n);)n=nu(n,t);return n&&kn(n)&&ps(n)&&!ul(n)?r:n||ty(e)||r}const dy=async function(e){const t=this.getOffsetParent||kd,r=this.getDimensions,n=await r(e.floating);return{reference:hy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fy(e){return je(e).direction==="rtl"}const gy={convertOffsetParentRelativeRectToViewportRelativeRect:ny,getDocumentElement:hr,getClippingRect:cy,getOffsetParent:kd,getElementRects:dy,getClientRects:iy,getDimensions:uy,getScale:Cn,isElement:Ke,isRTL:fy};function Nd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function py(e,t){let r=null,n;const i=hr(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:f}=u;if(a||t(),!h||!f)return;const g=Bi(p),b=Bi(i.clientWidth-(d+h)),w=Bi(i.clientHeight-(p+f)),S=Bi(d),T={rootMargin:-g+"px "+-b+"px "+-w+"px "+-S+"px",threshold:pe(0,Ur(1,c))||1};let D=!0;function k(O){const I=O[0].intersectionRatio;if(I!==c){if(!D)return s();I?s(!1,I):n=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!Nd(u,e.getBoundingClientRect())&&s(),D=!1}try{r=new IntersectionObserver(k,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,T)}r.observe(e)}return s(!0),o}function vy(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=dl(e),d=i||o?[...u?oi(u):[],...t?oi(t):[]]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),o&&S.addEventListener("resize",r)});const p=u&&a?py(u,r):null;let h=-1,f=null;s&&(f=new ResizeObserver(S=>{let[C]=S;C&&C.target===u&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var T;(T=f)==null||T.observe(t)})),r()}),u&&!c&&f.observe(u),t&&f.observe(t));let g,b=c?fn(e):null;c&&w();function w(){const S=fn(e);b&&!Nd(b,S)&&r(),b=S,g=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(C=>{i&&C.removeEventListener("scroll",r),o&&C.removeEventListener("resize",r)}),p?.(),(S=f)==null||S.disconnect(),f=null,c&&cancelAnimationFrame(g)}}const my=qb,by=Xb,yy=Yb,wy=Zb,_y=Kb,Sy=zb,xy=Gb,Cy=(e,t,r)=>{const n=new Map,i={platform:gy,...r},o={...i.platform,_c:n};return Ub(e,t,{...i,platform:o})};function Qr(e){return typeof e=="function"?e():e}function Fd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iu(e,t){const r=Fd(e);return Math.round(t*r)/r}function si(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Py(e){const t=e.whileElementsMounted,r=y(()=>Qr(e.open)??!0),n=y(()=>Qr(e.middleware)),i=y(()=>Qr(e.transform)??!0),o=y(()=>Qr(e.placement)??"bottom"),s=y(()=>Qr(e.strategy)??"absolute"),a=y(()=>Qr(e.sideOffset)??0),c=y(()=>Qr(e.alignOffset)??0),u=e.reference;let d=E(0),p=E(0);const h=le(null);let f=E(Zt(l(s))),g=E(Zt(l(o))),b=E(Zt({})),w=E(!1),S=!1,C=0;const T=y(()=>{const R=h.current?iu(h.current,l(d)):l(d),X=h.current?iu(h.current,l(p)):l(p);return l(i)?{position:l(f),left:"0",top:"0",transform:`translate(${R}px, ${X}px)`,...h.current&&Fd(h.current)>=1.5&&{willChange:"transform"}}:{position:l(f),left:`${R}px`,top:`${X}px`}});let D;function k(){if(u.current===null||h.current===null)return;const R=u.current,X=h.current,H=++C;Cy(R,X,{middleware:l(n),placement:l(o),strategy:l(s)}).then(K=>{if(H!==C||u.current!==R||h.current!==X)return;if(Ty(R)){v(b,{...l(b),hide:{...l(b).hide,referenceHidden:!0}},!0);return}if(!l(r)&&l(d)!==0&&l(p)!==0){const ht=Math.max(Math.abs(l(a)),Math.abs(l(c)),15);if(K.x<=ht&&K.y<=ht)return}v(d,K.x,!0),v(p,K.y,!0),v(f,K.strategy,!0),v(g,K.placement,!0),v(b,K.middlewareData,!0),v(w,!0)})}function O(){typeof D=="function"&&(D(),D=void 0),C++}function I(){if(O(),t===void 0){k();return}l(r)&&(u.current===null||h.current===null||(D=t(u.current,h.current,k)))}function F(){!l(r)&&h.current===null&&v(w,!1)}function z(){return[l(n),l(o),l(s),l(a),l(c),l(r)]}return nt(()=>{t===void 0&&l(r)&&k()}),nt(I),nt(()=>{if(t!==void 0){if(z(),!l(r)){S=!1;return}if(!l(w)){S=!1;return}if(!S){S=!0;return}k()}}),nt(F),nt(()=>O),{floating:h,reference:u,get strategy(){return l(f)},get placement(){return l(g)},get middlewareData(){return l(b)},get isPositioned(){return l(w)},get floatingStyles(){return l(T)},get update(){return k}}}function Ty(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Ay={top:"bottom",right:"left",bottom:"top",left:"right"},fl=new Vt("Floating.Root"),Xs=new Vt("Floating.Content"),gl=new Vt("Floating.Root");class ho{static create(t=!1){return t?gl.set(new ho):fl.set(new ho)}anchorNode=le(null);customAnchorNode=le(null);triggerNode=le(null);constructor(){nt(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class fo{static create(t,r=!1){return r?Xs.set(new fo(t,gl.get())):Xs.set(new fo(t,fl.get()))}opts;root;contentRef=le(null);wrapperRef=le(null);arrowRef=le(null);contentAttachment=rt(this.contentRef);wrapperAttachment=rt(this.wrapperRef);arrowAttachment=rt(this.arrowRef);arrowId=le(qr());#t=y(()=>{if(typeof this.opts.style=="string")return Qn(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#r=new Fp(()=>this.arrowRef.current??void 0);#n=y(()=>this.#r?.width??0);#i=y(()=>this.#r?.height??0);#o=y(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=y(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=y(()=>l(this.#s).length>0);get hasExplicitBoundaries(){return l(this.#a)}set hasExplicitBoundaries(t){v(this.#a,t)}#l=y(()=>({padding:this.opts.collisionPadding.current,boundary:l(this.#s).filter(tv),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return l(this.#l)}set detectOverflowOptions(t){v(this.#l,t)}#c=E(void 0);#u=E(void 0);#h=E(void 0);#f=E(void 0);#g=y(()=>[my({mainAxis:this.opts.sideOffset.current+l(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&by({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?xy():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&yy({...this.detectOverflowOptions}),wy({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:o}=t.reference;v(this.#c,r,!0),v(this.#u,n,!0),v(this.#h,i,!0),v(this.#f,o,!0)}}),this.arrowRef.current&&Sy({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Dy({arrowWidth:l(this.#n),arrowHeight:l(this.#i)}),this.opts.hideWhenDetached.current&&_y({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return l(this.#g)}set middleware(t){v(this.#g,t)}floating;#d=y(()=>Oy(this.floating.placement));get placedSide(){return l(this.#d)}set placedSide(t){v(this.#d,t)}#p=y(()=>Ey(this.floating.placement));get placedAlign(){return l(this.#p)}set placedAlign(t){v(this.#p,t)}#v=y(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return l(this.#v)}set arrowX(t){v(this.#v,t)}#m=y(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return l(this.#m)}set arrowY(t){v(this.#m,t)}#b=y(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return l(this.#b)}set cannotCenterArrow(t){v(this.#b,t)}#y=E();get contentZIndex(){return l(this.#y)}set contentZIndex(t){v(this.#y,t,!0)}#w=y(()=>Ay[this.placedSide]);get arrowBaseSide(){return l(this.#w)}set arrowBaseSide(t){v(this.#w,t)}#_=y(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${l(this.#c)}px`,"--bits-floating-available-height":`${l(this.#u)}px`,"--bits-floating-anchor-width":`${l(this.#h)}px`,"--bits-floating-anchor-height":`${l(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...l(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return l(this.#_)}set wrapperProps(t){v(this.#_,t)}#S=y(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Oo({...l(this.#t)}),...this.contentAttachment}));get props(){return l(this.#S)}set props(t){v(this.#S,t)}#x=y(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return l(this.#x)}set arrowStyle(t){v(this.#x,t)}constructor(t,r){this.opts=t,this.root=r,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),et(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=Py({strategy:()=>this.opts.strategy.current,placement:()=>l(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>vy(...n,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),nt(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),et(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=wa(n),o=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const s=i.getComputedStyle(n).zIndex;s!==this.contentZIndex&&(this.contentZIndex=s)});return()=>{i.cancelAnimationFrame(o)}}),nt(()=>{this.floating.floating.current=this.wrapperRef.current})}}class pl{static create(t){return new pl(t,Xs.get())}opts;content;constructor(t,r){this.opts=t,this.content=r}#t=y(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}class go{static create(t,r=!1){return r?new go(t,gl.get()):new go(t,fl.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=xh(t.virtualEl.current):r.triggerNode=t.ref}}function Dy(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=vl(r),p={start:"0%",center:"50%",end:"100%"}[d],h=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+c/2;let g="",b="";return u==="bottom"?(g=s?p:`${h}px`,b=`${-c}px`):u==="top"?(g=s?p:`${h}px`,b=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=s?p:`${f}px`):u==="left"&&(g=`${n.floating.width+c}px`,b=s?p:`${f}px`),{data:{x:g,y:b}}}}}function vl(e){const[t,r="center"]=e.split("-");return[t,r]}function Oy(e){return vl(e)[0]}function Ey(e){return vl(e)[1]}function ml(e,t){B(t,!0);let r=m(t,"tooltip",3,!1);ho.create(r());var n=A(),i=P(n);M(i,()=>t.children??L),x(e,n),V()}class Iy{#t;#e=y(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=Xh("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!l(this.#e).length)return;this.#r.current=this.#r.current+t;const r=this.#t.getCurrentItem(),n=l(this.#e).find(a=>a===r)??"",i=l(this.#e).map(a=>a??""),o=Oa(i,this.#r.current,n),s=l(this.#e).find(a=>a===o);return s&&this.#t.onMatch(s),s}resetTypeahead(){this.#r.current=""}}const My=[tr,Rh,Sa],ky=[Re,Fh,_a],Ny=[...My,...ky],Fy=_e({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),xi=new Vt("Select.Root | Combobox.Root"),Bo=new Vt("Select.Content | Combobox.Content");class Rd{opts;#t=E(!1);get touchedInput(){return l(this.#t)}set touchedInput(t){v(this.#t,t,!0)}#e=E(null);get inputNode(){return l(this.#e)}set inputNode(t){v(this.#e,t,!0)}#r=E(null);get contentNode(){return l(this.#r)}set contentNode(t){v(this.#r,t,!0)}contentPresence;#n=E(null);get viewportNode(){return l(this.#n)}set viewportNode(t){v(this.#n,t,!0)}#i=E(null);get triggerNode(){return l(this.#i)}set triggerNode(t){v(this.#i,t,!0)}#o=E(null);get valueNode(){return l(this.#o)}set valueNode(t){v(this.#o,t,!0)}#s=E("");get valueId(){return l(this.#s)}set valueId(t){v(this.#s,t,!0)}#a=E(null);get highlightedNode(){return l(this.#a)}set highlightedNode(t){v(this.#a,t,!0)}#l=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return l(this.#l)}set highlightedValue(t){v(this.#l,t)}#c=y(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return l(this.#c)}set highlightedId(t){v(this.#c,t)}#u=y(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return l(this.#u)}set highlightedLabel(t){v(this.#u,t)}#h=E(!1);get contentIsPositioned(){return l(this.#h)}set contentIsPositioned(t){v(this.#h,t,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new Dr(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Ln(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,r=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||r)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let r=this.getCandidateNodes();if(r.length){if(this.viewportNode){const n=this.viewportNode.getBoundingClientRect();r=r.filter(i=>{if(!this.viewportNode)return!1;const o=i.getBoundingClientRect();return o.right<=n.right&&o.left>=n.left&&o.bottom<=n.bottom&&o.top>=n.top})}this.setHighlightedNode(r[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(n=>n.dataset.value===t)??null}getLabelForValue(t){if(t==="")return"";const r=this.opts.items.current.find(i=>i.value===t)?.label;if(r!==void 0)return r;const n=this.getNodeByValue(t);if(n){const i=n.getAttribute("data-label");return i!==null&&i!==""?i:n.textContent?.trim()??t}return t}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>Fy.getAttr(t,this.isCombobox?"combobox":void 0)}class Ry extends Rd{opts;isMulti=!1;#t=y(()=>this.opts.value.current!=="");get hasValue(){return l(this.#t)}set hasValue(t){v(this.#t,t)}#e=y(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return l(this.#e)}set currentLabel(t){v(this.#e,t)}#r=y(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]);get candidateLabels(){return l(this.#r)}set candidateLabels(t){v(this.#r,t)}#n=y(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return l(this.#n)}set dataTypeaheadEnabled(t){v(this.#n,t)}constructor(t){super(t),this.opts=t,nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),et(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,r=t){const n=this.includesItem(t)?"":t;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){Br(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class Ly extends Rd{opts;isMulti=!0;#t=y(()=>this.opts.value.current.length>0);get hasValue(){return l(this.#t)}set hasValue(t){v(this.#t,t)}constructor(t){super(t),this.opts=t,nt(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),et(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,r=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(n=>n!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=r}setInitialHighlightedNode(){Br(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class By{static create(t){const{type:r,...n}=t,i=r==="single"?new Ry(n):new Ly(n);return xi.set(i)}}class bl{static create(t){return new bl(t,xi.get())}opts;root;attachment;#t;#e;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.triggerNode=n),this.root.domContext=new Dr(t.ref),this.#t=new Rv({getCurrentItem:()=>this.root.highlightedNode,onMatch:n=>{this.root.setHighlightedNode(n)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new Iy({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:n=>{if(this.root.isMulti||!this.root.opts.items.current)return;const i=this.root.opts.items.current.find(o=>o.label===n);i&&(this.root.opts.value.current=i.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#n(t){this.#r()}#i(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===Re||t.key===tr)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===lr||t.key===Ue||t.key===tr||t.key===Re)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const s=this.root.getCandidateNodes();if(!s.length)return;if(t.key===tr){const a=s[0];this.root.setHighlightedNode(a)}else if(t.key===Re){const a=s[s.length-1];this.root.setHighlightedNode(a)}return}if(t.key===Mc){this.root.handleClose();return}if((t.key===lr||t.key===Ue&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#i()))return;if(t.key===Re&&t.altKey&&this.root.handleClose(),Ny.includes(t.key)){t.preventDefault();const s=this.root.getCandidateNodes(),a=this.root.highlightedNode,c=a?s.indexOf(a):-1,u=this.root.opts.loop.current;let d;if(t.key===tr?d=Iv(s,c,u):t.key===Re?d=Mv(s,c,u):t.key===Fh?d=kv(s,c,10,u):t.key===Rh?d=Nv(s,c,10,u):t.key===Sa?d=s[0]:t.key===_a&&(d=s[s.length-1]),!d)return;this.root.setHighlightedNode(d);return}const r=t.ctrlKey||t.altKey||t.metaKey,n=t.key.length===1,i=t.key===Ue,o=this.root.getCandidateNodes();if(t.key!==Mc){if(!r&&(n||i)){!this.#t.handleTypeaheadSearch(t.key,o)&&i&&(t.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const r=t.target;r?.hasPointerCapture(t.pointerId)&&r?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#n(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#n(t):this.root.handleClose()))}#o=y(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":fe(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":jr(this.root.opts.open.current),"data-disabled":pt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}class yl{static create(t){return Bo.set(new yl(t,xi.get()))}opts;root;attachment;#t=E(!1);get isPositioned(){return l(this.#t)}set isPositioned(t){v(this.#t,t,!0)}domContext;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.contentNode=n),this.domContext=new Dr(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),ur(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),et(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),et([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=y(()=>si(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#r)}set snippetProps(t){v(this.#r,t)}#n=y(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...l(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class wl{static create(t){return new wl(t,xi.get())}opts;root;attachment;#t=y(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return l(this.#t)}set isSelected(t){v(this.#t,t)}#e=y(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return l(this.#e)}set isHighlighted(t){v(this.#e,t)}prevHighlighted=new Rp(()=>this.isHighlighted);#r=E(!1);get mounted(){return l(this.#r)}set mounted(t){v(this.#r,t,!0)}constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref),et([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),et(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#n=y(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return l(this.#n)}set snippetProps(t){v(this.#n,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Vs){St(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=y(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":pt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class _l{static create(t){return new _l(t,xi.get())}opts;root;#t=y(()=>this.root.opts.name.current!=="");get shouldRender(){return l(this.#t)}set shouldRender(t){v(this.#t,t)}constructor(t,r){this.opts=t,this.root=r,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=y(()=>({disabled:Qi(this.root.opts.disabled.current),required:Qi(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Sl{static create(t){return new Sl(t,Bo.get())}opts;content;root;attachment;#t=E(0);get prevScrollTop(){return l(this.#t)}set prevScrollTop(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.content=r,this.root=r.root,this.attachment=rt(t.ref,n=>{this.root.viewportNode=n})}#e=y(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ld{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=st;#t=E(!1);get mounted(){return l(this.#t)}set mounted(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.content=r,this.root=r.root,this.attachment=rt(t.ref),et([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),nt(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const r=n=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(n+1),this.opts.delay.current(n))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>r(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}#e=y(()=>({id:this.opts.id.current,"aria-hidden":kh(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class xl{static create(t){return new xl(new Ld(t,Bo.get()))}scrollButtonState;content;root;#t=E(!1);get canScrollDown(){return l(this.#t)}set canScrollDown(t){v(this.#t,t,!0)}scrollIntoViewTimer=null;constructor(t){this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,et([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),St(this.root.viewportNode,"scroll",()=>this.handleScroll())}),et([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),et(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=Eh(5,()=>{const r=this.root.highlightedNode;r&&this.root.scrollHighlightedNodeIntoView(r)}))})}handleScroll=(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<r-n};handleAutoScroll=()=>{const t=this.root.viewportNode,r=this.root.highlightedNode;!t||!r||(t.scrollTop=t.scrollTop+r.offsetHeight)};#e=y(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Cl{static create(t){return new Cl(new Ld(t,Bo.get()))}scrollButtonState;content;root;#t=E(!1);get canScrollUp(){return l(this.#t)}set canScrollUp(t){v(this.#t,t,!0)}constructor(t){this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,et([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),St(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const r=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-r>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#e=y(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}function vs(e,t){B(t,!0);let r=m(t,"value",15);const n=_l.create({value:_(()=>r())});var i=A(),o=P(i);{var s=a=>{el(a,bt(()=>n.props,{get autocomplete(){return t.autocomplete},get value(){return r()},set value(c){r(c)}}))};N(o,a=>{n.shouldRender&&a(s)})}x(e,i),V()}function Bd(e,t){B(t,!0);let r=m(t,"tooltip",3,!1);go.create({id:_(()=>t.id),virtualEl:_(()=>t.virtualEl),ref:t.ref},r());var n=A(),i=P(n);M(i,()=>t.children??L),x(e,n),V()}var Vy=Vn('<svg viewBox="0 0 30 10" preserveAspectRatio="none" data-arrow=""><polygon points="0,0 30,0 15,10" fill="currentColor"></polygon></svg>'),Hy=W("<span><!></span>");function Wy(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"width",3,10),i=m(t,"height",3,5),o=G(t,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const s=y(()=>q(o,{id:r()}));var a=A(),c=P(a);{var u=p=>{var h=A(),f=P(h);M(f,()=>t.child,()=>({props:l(s)})),x(p,h)},d=p=>{var h=Hy();J(h,()=>({...l(s)}));var f=Y(h);{var g=w=>{var S=A(),C=P(S);M(C,()=>t.children??L),x(w,S)},b=w=>{var S=Vy();Jt(()=>{_t(S,"width",n()),_t(S,"height",i())}),x(w,S)};N(f,w=>{t.children?w(g):w(b,-1)})}U(h),x(p,h)};N(c,p=>{t.child?p(u):p(d,-1)})}x(e,a),V()}function Uy(e,t){B(t,!0);let r=m(t,"id",19,qr),n=m(t,"ref",15,null),i=G(t,["$$slots","$$events","$$legacy","id","ref"]);const o=pl.create({id:_(()=>r()),ref:_(()=>n(),a=>n(a))}),s=y(()=>q(i,o.props));Wy(e,bt(()=>l(s))),V()}function zy(e,t){B(t,!0);let r=m(t,"side",3,"bottom"),n=m(t,"sideOffset",3,0),i=m(t,"align",3,"center"),o=m(t,"alignOffset",3,0),s=m(t,"arrowPadding",3,0),a=m(t,"avoidCollisions",3,!0),c=m(t,"collisionBoundary",19,()=>[]),u=m(t,"collisionPadding",3,0),d=m(t,"hideWhenDetached",3,!1),p=m(t,"onPlaced",3,()=>{}),h=m(t,"sticky",3,"partial"),f=m(t,"updatePositionStrategy",3,"optimized"),g=m(t,"strategy",3,"fixed"),b=m(t,"dir",3,"ltr"),w=m(t,"style",19,()=>({})),S=m(t,"wrapperId",19,qr),C=m(t,"customAnchor",3,null),T=m(t,"tooltip",3,!1);const D=fo.create({side:_(()=>r()),sideOffset:_(()=>n()),align:_(()=>i()),alignOffset:_(()=>o()),id:_(()=>t.id),arrowPadding:_(()=>s()),avoidCollisions:_(()=>a()),collisionBoundary:_(()=>c()),collisionPadding:_(()=>u()),hideWhenDetached:_(()=>d()),onPlaced:_(()=>p()),sticky:_(()=>h()),updatePositionStrategy:_(()=>f()),strategy:_(()=>g()),dir:_(()=>b()),style:_(()=>w()),enabled:_(()=>t.enabled),wrapperId:_(()=>S()),customAnchor:_(()=>C())},T()),k=y(()=>q(D.wrapperProps,{style:{pointerEvents:"auto"}}));var O=A(),I=P(O);M(I,()=>t.content??L,()=>({props:D.props,wrapperProps:l(k)})),x(e,O),V()}function Yy(e,t){B(t,!0),pi(()=>{t.onPlaced?.()});var r=A(),n=P(r);M(n,()=>t.content??L,()=>({props:{},wrapperProps:{}})),x(e,r),V()}const Ky=_e({component:"separator",parts:["root"]});class Pl{static create(t){return new Pl(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(t.ref)}#t=y(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":this.opts.orientation.current,"aria-hidden":kh(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[Ky.root]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var jy=W("<div><!></div>");function E1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"decorative",3,!1),s=m(t,"orientation",3,"horizontal"),a=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]);const c=Pl.create({ref:_(()=>i(),g=>i(g)),id:_(()=>n()),decorative:_(()=>o()),orientation:_(()=>s())}),u=y(()=>q(a,c.props));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);M(w,()=>t.child,()=>({props:l(u)})),x(g,b)},f=g=>{var b=jy();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}function qy(e,t){let r=m(t,"isStatic",3,!1),n=G(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=A(),o=P(i);{var s=c=>{Yy(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{zy(c,bt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>n))};N(o,c=>{r()?c(s):c(a,-1)})}x(e,i)}var Xy=W("<!> <!>",1);function Vd(e,t){B(t,!0);let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=m(t,"tooltip",3,!1),c=m(t,"contentPointerEvents",3,"auto"),u=G(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const d=y(()=>t.preventScroll??!0),p=y(()=>t.strategy??(l(d)?"fixed":"absolute"));qy(e,{get isStatic(){return s()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return l(p)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get enabled(){return t.enabled},get tooltip(){return a()},content:(f,g)=>{let b=()=>g?.().props,w=()=>g?.().wrapperProps;var S=Xy(),C=P(S);{var T=O=>{oo(O,{get preventScroll(){return l(d)}})},D=O=>{oo(O,{get preventScroll(){return l(d)}})};N(C,O=>{t.forceMount&&t.enabled?O(T):t.forceMount||O(D,1)})}var k=ae(C,2);Jh(k,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return n()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(I,F)=>{let z=()=>F?.().props;Zh(I,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(R,X)=>{Gh(R,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return r()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(K,Q)=>{let ht=()=>Q?.().props;Qh(K,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(xt,vt)=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:q(u,b(),ht(),z(),{style:{pointerEvents:c()}}),wrapperProps:w()}));M($,()=>t.popper??L,()=>l(gt))}x(xt,Z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(f,S)},$$slots:{content:!0}}),V()}function Tl(e,t){let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=G(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=A(),u=P(c);{var d=p=>{Vd(p,bt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return s()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return n()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};N(u,p=>{t.shouldRender&&p(d)})}x(e,c)}function Al(e,t){let r=m(t,"interactOutsideBehavior",3,"close"),n=m(t,"trapFocus",3,!0),i=m(t,"isValidEvent",3,()=>!1),o=m(t,"customAnchor",3,null),s=m(t,"isStatic",3,!1),a=G(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Vd(e,bt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return o()},get isStatic(){return s()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return n()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Gy=W("<div><div><!></div></div>"),Zy=W("<div><div><!></div></div>");function I1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=m(t,"side",3,"bottom"),a=m(t,"onInteractOutside",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"preventScroll",3,!1),d=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const p=yl.create({id:_(()=>n()),ref:_(()=>i(),S=>i(S)),onInteractOutside:_(()=>a()),onEscapeKeydown:_(()=>c())}),h=y(()=>q(d,p.props));var f=A(),g=P(f);{var b=S=>{Al(S,bt(()=>l(h),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return s()},get enabled(){return p.root.opts.open.current},get id(){return n()},get preventScroll(){return u()},forceMount:!0,get shouldRender(){return p.shouldRender},popper:(T,D)=>{let k=()=>D?.().props,O=()=>D?.().wrapperProps;const I=y(()=>q(k(),{style:p.props.style},{style:t.style}));var F=A(),z=P(F);{var R=H=>{var K=A(),Q=P(K);{let ht=y(()=>({props:l(I),wrapperProps:O(),...p.snippetProps}));M(Q,()=>t.child,()=>l(ht))}x(H,K)},X=H=>{var K=Gy();J(K,()=>({...O()}));var Q=Y(K);J(Q,()=>({...l(I)}));var ht=Y(Q);M(ht,()=>t.children??L),U(Q),U(K),x(H,K)};N(z,H=>{t.child?H(R):H(X,-1)})}x(T,F)},$$slots:{popper:!0}}))},w=S=>{Tl(S,bt(()=>l(h),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return s()},get open(){return p.root.opts.open.current},get id(){return n()},get preventScroll(){return u()},forceMount:!1,get shouldRender(){return p.shouldRender},popper:(T,D)=>{let k=()=>D?.().props,O=()=>D?.().wrapperProps;const I=y(()=>q(k(),{style:p.props.style},{style:t.style}));var F=A(),z=P(F);{var R=H=>{var K=A(),Q=P(K);{let ht=y(()=>({props:l(I),wrapperProps:O(),...p.snippetProps}));M(Q,()=>t.child,()=>l(ht))}x(H,K)},X=H=>{var K=Zy();J(K,()=>({...O()}));var Q=Y(K);J(Q,()=>({...l(I)}));var ht=Y(Q);M(ht,()=>t.children??L),U(Q),U(K),x(H,K)};N(z,H=>{t.child?H(R):H(X,-1)})}x(T,F)},$$slots:{popper:!0}}))};N(g,S=>{o()?S(b):o()||S(w,1)})}x(e,f),V()}function Dl(e,t){B(t,!0);let r=m(t,"mounted",15,!1),n=m(t,"onMountedChange",3,st);Io(()=>(r(!0),n()(!0),()=>{r(!1),n()(!1)})),V()}var Jy=W("<div><!></div>"),Qy=W("<!> <!>",1);function M1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"label",19,()=>t.value),s=m(t,"disabled",3,!1),a=m(t,"onHighlight",3,st),c=m(t,"onUnhighlight",3,st),u=G(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const d=wl.create({id:_(()=>n()),ref:_(()=>i(),S=>i(S)),value:_(()=>t.value),disabled:_(()=>s()),label:_(()=>o()),onHighlight:_(()=>a()),onUnhighlight:_(()=>c())}),p=y(()=>q(u,d.props));var h=Qy(),f=P(h);{var g=S=>{var C=A(),T=P(C);{let D=y(()=>({props:l(p),...d.snippetProps}));M(T,()=>t.child,()=>l(D))}x(S,C)},b=S=>{var C=Jy();J(C,()=>({...l(p)}));var T=Y(C);M(T,()=>t.children??L,()=>d.snippetProps),U(C),x(S,C)};N(f,S=>{t.child?S(g):S(b,-1)})}var w=ae(f,2);Dl(w,{get mounted(){return d.mounted},set mounted(S){d.mounted=S}}),x(e,h),V()}var $y=W("<div><!></div>");function k1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const s=Sl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=$y();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var tw=W("<div><!></div>"),ew=W("<!> <!>",1);function N1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"delay",3,()=>50),s=G(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=xl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h)),delay:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=ew(),g=P(f);Dl(g,{get mounted(){return a.scrollButtonState.mounted},set mounted(C){a.scrollButtonState.mounted=C}});var b=ae(g,2);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:s})),x(C,T)},S=C=>{var T=tw();J(T,()=>({...l(c)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(h,f)};N(d,h=>{a.canScrollDown&&h(p)})}x(e,u),V()}var rw=W("<div><!></div>"),nw=W("<!> <!>",1);function F1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"delay",3,()=>50),s=G(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=Cl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h)),delay:_(()=>o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=h=>{var f=nw(),g=P(f);Dl(g,{get mounted(){return a.scrollButtonState.mounted},set mounted(C){a.scrollButtonState.mounted=C}});var b=ae(g,2);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:s})),x(C,T)},S=C=>{var T=rw();J(T,()=>({...l(c)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(h,f)};N(d,h=>{a.canScrollUp&&h(p)})}x(e,u),V()}function ms(e,t){const[r,n]=e;let i=!1;const o=t.length;for(let s=0,a=o-1;s<o;a=s++){const[c,u]=t[s]??[0,0],[d,p]=t[a]??[0,0];u>=n!=p>=n&&r<=(d-c)*(n-u)/(p-u)+c&&(i=!i)}return i}function bs(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function ou(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,o=t.top+t.height/2,s=i-r,a=o-n;return Math.abs(s)>Math.abs(a)?s>0?"right":"left":a>0?"bottom":"top"}class Hd{#t;#e;#r;#n=null;#i=null;#o=[];#s=null;#a=null;#l=null;#c(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#u(){this.#c(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#d(),this.#t.onPointerExit())})}#h(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#f(){this.#r!==null&&(this.#h(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#d(),this.#t.onPointerExit())},this.#r))}constructor(t){this.#t=t,this.#e=t.buffer??1;const r=t.transitIntentTimeout;this.#r=typeof r=="number"&&r>0?r:null,et([t.triggerNode,t.contentNode,t.enabled],([n,i,o])=>{if(!n||!i||!o){this.#s=null,this.#d();return}this.#s&&this.#s!==n&&this.#d(),this.#s=n;const s=ya(n),a=h=>{this.#g([h.clientX,h.clientY],n,i)},c=h=>{const f=h.relatedTarget;if(mr(f)&&i.contains(f))return;const g=this.#t.ignoredTargets?.()??[];mr(f)&&g.some(b=>b===f||b.contains(f))||(this.#o=mr(f)&&g.length>0?g.filter(b=>f.contains(b)):[],this.#n=[h.clientX,h.clientY],this.#i="content",this.#u())},u=()=>{this.#d()},d=()=>{this.#d()},p=h=>{const f=h.relatedTarget;mr(f)&&n.contains(f)||(this.#n=[h.clientX,h.clientY],this.#i="trigger",this.#u())};return[St(s,"pointermove",a),St(n,"pointerleave",c),St(n,"pointerenter",u),St(i,"pointerenter",d),St(i,"pointerleave",p)].reduce((h,f)=>()=>{h(),f()},()=>{})})}#g(t,r,n){if(!this.#n||!this.#i)return;this.#c(),this.#f();const i=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#i==="content"&&bs(t,o)){this.#d();return}if(this.#i==="trigger"&&bs(t,i)){this.#d();return}if(this.#i==="content"&&this.#o.length>0)for(const d of this.#o){const p=d.getBoundingClientRect();if(bs(t,p))return;const h=ou(i,p),f=this.#p(i,p,h);if(f&&ms(t,f))return}const s=ou(i,o),a=this.#p(i,o,s);if(a&&ms(t,a))return;const c=this.#i==="content"?o:i,u=this.#v(this.#n,c,s,this.#i);ms(t,u)||(this.#d(),this.#t.onPointerExit())}#d(){this.#n=null,this.#i=null,this.#o=[],this.#c(),this.#h()}#p(t,r,n){const i=this.#e;switch(n){case"top":return[[Math.min(t.left,r.left)-i,t.top],[Math.min(t.left,r.left)-i,r.bottom],[Math.max(t.right,r.right)+i,r.bottom],[Math.max(t.right,r.right)+i,t.top]];case"bottom":return[[Math.min(t.left,r.left)-i,t.bottom],[Math.min(t.left,r.left)-i,r.top],[Math.max(t.right,r.right)+i,r.top],[Math.max(t.right,r.right)+i,t.bottom]];case"left":return[[t.left,Math.min(t.top,r.top)-i],[r.right,Math.min(t.top,r.top)-i],[r.right,Math.max(t.bottom,r.bottom)+i],[t.left,Math.max(t.bottom,r.bottom)+i]];case"right":return[[t.right,Math.min(t.top,r.top)-i],[r.left,Math.min(t.top,r.top)-i],[r.left,Math.max(t.bottom,r.bottom)+i],[t.right,Math.max(t.bottom,r.bottom)+i]]}}#v(t,r,n,i){const o=this.#e*4,[s,a]=t;switch(i==="trigger"?this.#m(n):n){case"top":return[[s-o,a+o],[s+o,a+o],[r.right+o,r.bottom],[r.right+o,r.top],[r.left-o,r.top],[r.left-o,r.bottom]];case"bottom":return[[s-o,a-o],[s+o,a-o],[r.right+o,r.top],[r.right+o,r.bottom],[r.left-o,r.bottom],[r.left-o,r.top]];case"left":return[[s+o,a-o],[s+o,a+o],[r.right,r.bottom+o],[r.left,r.bottom+o],[r.left,r.top-o],[r.right,r.top-o]];case"right":return[[s-o,a-o],[s-o,a+o],[r.left,r.bottom+o],[r.right,r.bottom+o],[r.right,r.top-o],[r.left,r.top-o]]}}#m(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const po=_e({component:"popover",parts:["root","trigger","content","close","overlay"]}),Vo=new Vt("Popover.Root");class Ol{static create(t){return Vo.set(new Ol(t))}opts;#t=E(null);get contentNode(){return l(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#e=E(null);get triggerNode(){return l(this.#e)}set triggerNode(t){v(this.#e,t,!0)}#r=E(null);get overlayNode(){return l(this.#r)}set overlayNode(t){v(this.#r,t,!0)}overlayPresence;#n=E(!1);get openedViaHover(){return l(this.#n)}set openedViaHover(t){v(this.#n,t,!0)}#i=E(!1);get hasInteractedWithContent(){return l(this.#i)}set hasInteractedWithContent(t){v(this.#i,t,!0)}#o=E(!1);get hoverCooldown(){return l(this.#o)}set hoverCooldown(t){v(this.#o,t,!0)}#s=E(0);get closeDelay(){return l(this.#s)}set closeDelay(t){v(this.#s,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new cn({ref:_(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new cn({ref:_(()=>this.overlayNode),open:this.opts.open}),et(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(t){this.#l=t}#c(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class El{static create(t){return new El(t,Vo.get())}opts;root;attachment;domContext;#t=null;#e=null;#r=E(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Dr(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),et(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#i(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#o(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||$i(t)||(v(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&($i(t)||(v(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#o(),l(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}l(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===lr||t.key===Ue)&&(t.preventDefault(),this.#o(),this.root.toggleOpen())}#s(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=y(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":fe(this.root.opts.open.current),"data-state":jr(this.root.opts.open.current),"aria-controls":this.#s(),[po.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#a)}set props(t){v(this.#a,t)}}class Il{static create(t){return new Il(t,Vo.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Hd({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const r=t.target;mr(r)&&Av(r)&&this.root.markInteraction()}onpointerenter(t){$i(t)||this.root.cancelDelayedClose()}onpointerleave(t){$i(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!mr(t.target))return;const r=t.target.closest(po.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(mr(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,tabindex:-1,"data-state":jr(this.root.opts.open.current),...Wn(this.root.contentPresence.transitionStatus),[po.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}class Ml{static create(t){return new Ml(t,Vo.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.root.handleClose()}onkeydown(t){(t.key===lr||t.key===Ue)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,onclick:this.onclick,onkeydown:this.onkeydown,type:"button",[po.close]:"",...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var iw=W("<div><div><!></div></div>"),ow=W("<div><div><!></div></div>");function R1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"forceMount",3,!1),s=m(t,"onOpenAutoFocus",3,st),a=m(t,"onCloseAutoFocus",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"onInteractOutside",3,st),d=m(t,"trapFocus",3,!0),p=m(t,"preventScroll",3,!1),h=m(t,"customAnchor",3,null),f=G(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const g=Il.create({id:_(()=>i()),ref:_(()=>n(),O=>n(O)),onInteractOutside:_(()=>u()),onEscapeKeydown:_(()=>c()),customAnchor:_(()=>h())}),b=y(()=>q(f,g.props)),w=y(()=>d()&&g.shouldTrapFocus);function S(O){g.shouldTrapFocus||O.preventDefault(),s()(O)}var C=A(),T=P(C);{var D=O=>{Al(O,bt(()=>l(b),()=>g.popperProps,{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return l(w)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:S,get onCloseAutoFocus(){return a()},get shouldRender(){return g.shouldRender},popper:(F,z)=>{let R=()=>z?.().props,X=()=>z?.().wrapperProps;const H=y(()=>q(R(),{style:si("popover")},{style:t.style}));var K=A(),Q=P(K);{var ht=vt=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:l(H),wrapperProps:X(),...g.snippetProps}));M($,()=>t.child,()=>l(gt))}x(vt,Z)},xt=vt=>{var Z=iw();J(Z,()=>({...X()}));var $=Y(Z);J($,()=>({...l(H)}));var gt=Y($);M(gt,()=>t.children??L),U($),U(Z),x(vt,Z)};N(Q,vt=>{t.child?vt(ht):vt(xt,-1)})}x(F,K)},$$slots:{popper:!0}}))},k=O=>{Tl(O,bt(()=>l(b),()=>g.popperProps,{get ref(){return g.opts.ref},get open(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return l(w)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:S,get onCloseAutoFocus(){return a()},get shouldRender(){return g.shouldRender},popper:(F,z)=>{let R=()=>z?.().props,X=()=>z?.().wrapperProps;const H=y(()=>q(R(),{style:si("popover")},{style:t.style}));var K=A(),Q=P(K);{var ht=vt=>{var Z=A(),$=P(Z);{let gt=y(()=>({props:l(H),wrapperProps:X(),...g.snippetProps}));M($,()=>t.child,()=>l(gt))}x(vt,Z)},xt=vt=>{var Z=ow();J(Z,()=>({...X()}));var $=Y(Z);J($,()=>({...l(H)}));var gt=Y($);M(gt,()=>t.children??L),U($),U(Z),x(vt,Z)};N(Q,vt=>{t.child?vt(ht):vt(xt,-1)})}x(F,K)},$$slots:{popper:!0}}))};N(T,O=>{o()?O(D):o()||O(k,1)})}x(e,C),V()}var sw=W("<button><!></button>");function L1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"type",3,"button"),s=m(t,"disabled",3,!1),a=m(t,"openOnHover",3,!1),c=m(t,"openDelay",3,700),u=m(t,"closeDelay",3,300),d=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=El.create({id:_(()=>n()),ref:_(()=>i(),f=>i(f)),disabled:_(()=>!!s()),openOnHover:_(()=>a()),openDelay:_(()=>c()),closeDelay:_(()=>u())}),h=y(()=>q(d,p.props,{type:o()}));Bd(e,{get id(){return n()},get ref(){return p.opts.ref},children:(f,g)=>{var b=A(),w=P(b);{var S=T=>{var D=A(),k=P(D);M(k,()=>t.child,()=>({props:l(h)})),x(T,D)},C=T=>{var D=sw();J(D,()=>({...l(h)}));var k=Y(D);M(k,()=>t.children??L),U(D),x(T,D)};N(w,T=>{t.child?T(S):T(C,-1)})}x(f,b)},$$slots:{default:!0}}),V()}var aw=W("<button><!></button>");function B1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const s=Ml.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=aw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}function V1(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"onOpenChange",3,st),i=m(t,"onOpenChangeComplete",3,st);xa.create({variant:_(()=>"dialog"),open:_(()=>r(),a=>{r(a),n()(a)}),onOpenChangeComplete:_(()=>i())});var o=A(),s=P(o);M(s,()=>t.children??L),x(e,o),V()}var lw=W("<button><!></button>");function H1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"disabled",3,!1),s=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=Ca.create({variant:_(()=>"close"),id:_(()=>n()),ref:_(()=>i(),f=>i(f)),disabled:_(()=>!!o())}),c=y(()=>q(s,a.props));var u=A(),d=P(u);{var p=f=>{var g=A(),b=P(g);M(b,()=>t.child,()=>({props:l(c)})),x(f,g)},h=f=>{var g=lw();J(g,()=>({...l(c)}));var b=Y(g);M(b,()=>t.children??L),U(g),x(f,g)};N(d,f=>{t.child?f(p):f(h,-1)})}x(e,u),V()}var cw=W("<!> <!>",1),uw=W("<!> <div><!></div>",1);function W1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=m(t,"onCloseAutoFocus",3,st),a=m(t,"onOpenAutoFocus",3,st),c=m(t,"onEscapeKeydown",3,st),u=m(t,"onInteractOutside",3,st),d=m(t,"trapFocus",3,!0),p=m(t,"preventScroll",3,!0),h=m(t,"restoreScrollDelay",3,null),f=G(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const g=Aa.create({id:_(()=>n()),ref:_(()=>i(),T=>i(T))}),b=y(()=>q(f,g.props));var w=A(),S=P(w);{var C=T=>{Jh(T,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return d()},get enabled(){return g.root.opts.open.current},get onOpenAutoFocus(){return a()},get onCloseAutoFocus(){return s()},focusScope:(k,O)=>{let I=()=>O?.().props;Zh(k,bt(()=>l(b),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:F=>{c()(F),!F.defaultPrevented&&g.root.handleClose()},children:(F,z)=>{Gh(F,bt(()=>l(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},onInteractOutside:R=>{u()(R),!R.defaultPrevented&&g.root.handleClose()},children:(R,X)=>{Qh(R,bt(()=>l(b),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(H,K)=>{var Q=A(),ht=P(Q);{var xt=Z=>{var $=cw(),gt=P($);{var It=Ut=>{oo(Ut,{get preventScroll(){return p()},get restoreScrollDelay(){return h()}})};N(gt,Ut=>{g.root.opts.open.current&&Ut(It)})}var kt=ae(gt,2);{let Ut=y(()=>({props:q(l(b),I()),...g.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(Z,$)},vt=Z=>{var $=uw(),gt=P($);oo(gt,{get preventScroll(){return p()}});var It=ae(gt,2);J(It,Ut=>({...Ut}),[()=>q(l(b),I())]);var kt=Y(It);M(kt,()=>t.children??L),U(It),x(Z,$)};N(ht,Z=>{t.child?Z(xt):Z(vt,-1)})}x(H,Q)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};N(S,T=>{(g.shouldRender||o())&&T(C)})}x(e,w),V()}const hw=_e({component:"label",parts:["root"]});class kl{static create(t){return new kl(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(t){t.detail>1&&t.preventDefault()}#t=y(()=>({id:this.opts.id.current,[hw.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return l(this.#t)}set props(t){v(this.#t,t)}}var dw=W("<label><!></label>");function U1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const s=kl.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props,{for:t.for}));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=dw();J(f,()=>({...l(a),for:t.for}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}class Nn{#t;#e;constructor(t,r){this.#t=t,this.#e=r,this.handler=this.handler.bind(this),nt(this.handler)}handler(){let t=0;const r=this.#t();if(!r)return;const n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(this.#e)});return n.observe(r),()=>{window.cancelAnimationFrame(t),n.unobserve(r)}}}class fw{opts;present;#t;#e=E(!1);#r=!1;#n=E(void 0);#i=null;constructor(t){this.opts=t,this.present=this.opts.open,v(this.#e,t.open.current,!0),this.#t=new Lh({ref:this.opts.ref,afterTick:this.opts.open}),ur(()=>this.#s()),et(()=>this.present.current,r=>{if(!this.#r){this.#r=!0;return}this.#s(),r&&v(this.#e,!0),v(this.#n,r?"starting":"ending",!0),r&&(this.#i=window.requestAnimationFrame(()=>{this.#i=null,this.present.current&&v(this.#n,void 0)})),this.#t.run(()=>{r===this.present.current&&(r||v(this.#e,!1),v(this.#n,void 0))})})}#o=y(()=>l(this.#e));get isPresent(){return l(this.#o)}set isPresent(t){v(this.#o,t)}get transitionStatus(){return l(this.#n)}#s(){this.#i!==null&&(window.cancelAnimationFrame(this.#i),this.#i=null)}}function Ho(e,t){B(t,!0);const r=new fw({open:_(()=>t.open),ref:t.ref});var n=A(),i=P(n);{var o=s=>{var a=A(),c=P(a);M(c,()=>t.presence??L,()=>({present:r.isPresent,transitionStatus:r.transitionStatus})),x(s,a)};N(i,s=>{(t.forceMount||t.open||r.isPresent)&&s(o)})}x(e,n),V()}function z1(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"onOpenChange",3,st),i=m(t,"onOpenChangeComplete",3,st);Ol.create({open:_(()=>r(),o=>{r(o),n()(o)}),onOpenChangeComplete:_(()=>i())}),ml(e,{children:(o,s)=>{var a=A(),c=P(a);M(c,()=>t.children??L),x(o,a)},$$slots:{default:!0}}),V()}function gw(e,t,r){return Math.min(r,Math.max(t,e))}class pw{state;#t;constructor(t,r){this.state=le(t),this.#t=r,this.dispatch=this.dispatch.bind(this)}#e(t){return this.#t[this.state.current][t]??this.state.current}dispatch(t){this.state.current=this.#e(t)}}const Ci=_e({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),Pi=new Vt("ScrollArea.Root"),Ti=new Vt("ScrollArea.Scrollbar"),Wo=new Vt("ScrollArea.ScrollbarVisible"),Nl=new Vt("ScrollArea.ScrollbarAxis"),Wd=new Vt("ScrollArea.ScrollbarShared");class Fl{static create(t){return Pi.set(new Fl(t))}opts;attachment;#t=E(null);get scrollAreaNode(){return l(this.#t)}set scrollAreaNode(t){v(this.#t,t,!0)}#e=E(null);get viewportNode(){return l(this.#e)}set viewportNode(t){v(this.#e,t,!0)}#r=E(null);get contentNode(){return l(this.#r)}set contentNode(t){v(this.#r,t,!0)}#n=E(null);get scrollbarXNode(){return l(this.#n)}set scrollbarXNode(t){v(this.#n,t,!0)}#i=E(null);get scrollbarYNode(){return l(this.#i)}set scrollbarYNode(t){v(this.#i,t,!0)}#o=E(0);get cornerWidth(){return l(this.#o)}set cornerWidth(t){v(this.#o,t,!0)}#s=E(0);get cornerHeight(){return l(this.#s)}set cornerHeight(t){v(this.#s,t,!0)}#a=E(!1);get scrollbarXEnabled(){return l(this.#a)}set scrollbarXEnabled(t){v(this.#a,t,!0)}#l=E(!1);get scrollbarYEnabled(){return l(this.#l)}set scrollbarYEnabled(t){v(this.#l,t,!0)}domContext;constructor(t){this.opts=t,this.attachment=rt(t.ref,r=>this.scrollAreaNode=r),this.domContext=new Dr(t.ref)}#c=y(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[Ci.root]:"",...this.attachment}));get props(){return l(this.#c)}set props(t){v(this.#c,t)}}class Rl{static create(t){return new Rl(t,Pi.get())}opts;root;attachment;#t=le(qr());#e=le(null);contentAttachment=rt(this.#e,t=>this.root.contentNode=t);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref,n=>this.root.viewportNode=n)}#r=y(()=>({id:this.opts.id.current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[Ci.viewport]:"",...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}#n=y(()=>({id:this.#t.current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return l(this.#n)}set contentProps(t){v(this.#n,t)}}class Ll{static create(t){return Ti.set(new Ll(t,Pi.get()))}opts;root;#t=y(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){return l(this.#t)}set isHorizontal(t){v(this.#t,t)}#e=E(!1);get hasThumb(){return l(this.#e)}set hasThumb(t){v(this.#e,t,!0)}constructor(t,r){this.opts=t,this.root=r,et(()=>this.isHorizontal,n=>n?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class Bl{static create(){return new Bl(Ti.get())}scrollbar;root;#t=E(!1);get isVisible(){return l(this.#t)}set isVisible(t){v(this.#t,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root,nt(()=>{const r=this.root.scrollAreaNode,n=this.root.opts.scrollHideDelay.current;let i=0;if(!r)return;const o=()=>{this.root.domContext.clearTimeout(i),Et(()=>this.isVisible=!0)},s=()=>{i&&this.root.domContext.clearTimeout(i),i=this.root.domContext.setTimeout(()=>{Et(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},n)},a=xn(St(r,"pointerenter",o),St(r,"pointerleave",s));return()=>{this.root.domContext.getWindow().clearTimeout(i),a()}})}#e=y(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Vl{static create(){return new Vl(Ti.get())}scrollbar;root;machine=new pw("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});#t=y(()=>this.machine.state.current==="hidden");get isHidden(){return l(this.#t)}set isHidden(t){v(this.#t,t)}constructor(t){this.scrollbar=t,this.root=t.root;const r=Eo(()=>this.machine.dispatch("SCROLL_END"),100);nt(()=>{const n=this.machine.state.current,i=this.root.opts.scrollHideDelay.current;if(n==="idle"){const o=this.root.domContext.setTimeout(()=>this.machine.dispatch("HIDE"),i);return()=>this.root.domContext.clearTimeout(o)}}),nt(()=>{const n=this.root.viewportNode;if(!n)return;const i=this.scrollbar.isHorizontal?"scrollLeft":"scrollTop";let o=n[i];return St(n,"scroll",()=>{const c=n[i];o!==c&&(this.machine.dispatch("SCROLL"),r()),o=c})}),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(t){this.machine.dispatch("POINTER_ENTER")}onpointerleave(t){this.machine.dispatch("POINTER_LEAVE")}#e=y(()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Uo{static create(){return new Uo(Ti.get())}scrollbar;root;#t=E(!1);get isVisible(){return l(this.#t)}set isVisible(t){v(this.#t,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root;const r=Eo(()=>{const n=this.root.viewportNode;if(!n)return;const i=n.offsetWidth<n.scrollWidth,o=n.offsetHeight<n.scrollHeight;this.isVisible=this.scrollbar.isHorizontal?i:o},10);new Nn(()=>this.root.viewportNode,r),new Nn(()=>this.root.contentNode,r)}#e=y(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Hl{static create(){return Wo.set(new Hl(Ti.get()))}scrollbar;root;#t=E(null);get thumbNode(){return l(this.#t)}set thumbNode(t){v(this.#t,t,!0)}#e=E(0);get pointerOffset(){return l(this.#e)}set pointerOffset(t){v(this.#e,t,!0)}#r=E({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return l(this.#r)}set sizes(t){v(this.#r,t)}#n=y(()=>Ud(this.sizes.viewport,this.sizes.content));get thumbRatio(){return l(this.#n)}set thumbRatio(t){v(this.#n,t)}#i=y(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){return l(this.#i)}set hasThumb(t){v(this.#i,t)}#o=E("");get prevTransformStyle(){return l(this.#o)}set prevTransformStyle(t){v(this.#o,t,!0)}constructor(t){this.scrollbar=t,this.root=t.root,nt(()=>{this.scrollbar.hasThumb=this.hasThumb}),nt(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(t){this.sizes=t}getScrollPosition(t,r){return vw({pointerPos:t,pointerOffset:this.pointerOffset,sizes:this.sizes,dir:r})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(t){this.pointerOffset=t}xOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const t=this.root.viewportNode.scrollLeft,n=`translate3d(${su({scrollPos:t,sizes:this.sizes,dir:this.root.opts.dir.current})}px, 0, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}xOnWheelScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=t)}xOnDragScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this.getScrollPosition(t,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const t=this.root.viewportNode.scrollTop,n=`translate3d(0, ${su({scrollPos:t,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=n,this.prevTransformStyle=n}yOnWheelScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollTop=t)}yOnDragScroll(t){this.root.viewportNode&&(this.root.viewportNode.scrollTop=this.getScrollPosition(t,this.root.opts.dir.current))}}class Wl{static create(t){return Nl.set(new Wl(t,Wo.get()))}opts;scrollbarVis;root;scrollbar;attachment;#t=E();get computedStyle(){return l(this.#t)}set computedStyle(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=rt(this.scrollbar.opts.ref,n=>this.root.scrollbarXNode=n),nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),nt(()=>{this.onResize()})}onThumbPointerDown=t=>{this.scrollbarVis.onThumbPointerDown(t.x)};onDragScroll=t=>{this.scrollbarVis.xOnDragScroll(t.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(t,r)=>{if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollLeft+t.deltaX;this.scrollbarVis.xOnWheelScroll(n),Yd(n,r)&&t.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:vo(this.computedStyle.paddingLeft),paddingEnd:vo(this.computedStyle.paddingRight)}})};#e=y(()=>zo(this.scrollbarVis.sizes));get thumbSize(){return l(this.#e)}set thumbSize(t){v(this.#e,t)}#r=y(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class Ul{static create(t){return Nl.set(new Ul(t,Wo.get()))}opts;scrollbarVis;root;scrollbar;attachment;#t=E();get computedStyle(){return l(this.#t)}set computedStyle(t){v(this.#t,t,!0)}constructor(t,r){this.opts=t,this.scrollbarVis=r,this.root=r.root,this.scrollbar=r.scrollbar,this.attachment=rt(this.scrollbar.opts.ref,n=>this.root.scrollbarYNode=n),nt(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),nt(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(t){this.scrollbarVis.onThumbPointerDown(t.y)}onDragScroll(t){this.scrollbarVis.yOnDragScroll(t.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(t,r){if(!this.root.viewportNode)return;const n=this.root.viewportNode.scrollTop+t.deltaY;this.scrollbarVis.yOnWheelScroll(n),Yd(n,r)&&t.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:vo(this.computedStyle.paddingTop),paddingEnd:vo(this.computedStyle.paddingBottom)}})}#e=y(()=>zo(this.scrollbarVis.sizes));get thumbSize(){return l(this.#e)}set thumbSize(t){v(this.#e,t)}#r=y(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return l(this.#r)}set props(t){v(this.#r,t)}}class zl{static create(){return Wd.set(new zl(Nl.get()))}scrollbarState;root;scrollbarVis;scrollbar;#t=E(null);get rect(){return l(this.#t)}set rect(t){v(this.#t,t)}#e=E("");get prevWebkitUserSelect(){return l(this.#e)}set prevWebkitUserSelect(t){v(this.#e,t,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#r=y(()=>this.scrollbarVis.sizes.content-this.scrollbarVis.sizes.viewport);get maxScrollPos(){return l(this.#r)}set maxScrollPos(t){v(this.#r,t)}constructor(t){this.scrollbarState=t,this.root=t.root,this.scrollbarVis=t.scrollbarVis,this.scrollbar=t.scrollbarVis.scrollbar,this.handleResize=Eo(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState.onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,nt(()=>{const r=this.maxScrollPos,n=this.scrollbar.opts.ref.current;this.root.viewportNode;const i=s=>{const a=s.target;n?.contains(a)&&this.handleWheelScroll(s,r)};return St(this.root.domContext.getDocument(),"wheel",i,{passive:!1})}),Ln(()=>{this.scrollbarVis.sizes,Et(()=>this.handleThumbPositionChange())}),new Nn(()=>this.scrollbar.opts.ref.current,this.handleResize),new Nn(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(t){if(!this.rect)return;const r=t.clientX-this.rect.left,n=t.clientY-this.rect.top;this.scrollbarState.onDragScroll({x:r,y:n})}#n(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(t){if(t.button!==0)return;t.target.setPointerCapture(t.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect,this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(t)}onpointermove(t){this.handleDragScroll(t)}onpointerup(t){const r=t.target;r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId),this.#n()}onlostpointercapture(t){this.#n()}#i=y(()=>q({...this.scrollbarState.props,style:{position:"absolute",...this.scrollbarState.props.style},[Ci.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return l(this.#i)}set props(t){v(this.#i,t)}}class Yl{static create(t){return new Yl(t,Wd.get())}opts;scrollbarState;attachment;#t;#e=E();#r=Eo(()=>{l(this.#e)&&(l(this.#e)(),v(this.#e,void 0))},100);constructor(t,r){this.opts=t,this.scrollbarState=r,this.#t=r.root,this.attachment=rt(this.opts.ref,n=>this.scrollbarState.scrollbarVis.thumbNode=n),nt(()=>{const n=this.#t.viewportNode;if(!n)return;const i=()=>{if(this.#r(),!l(this.#e)){const s=mw(n,this.scrollbarState.handleThumbPositionChange);v(this.#e,s,!0),this.scrollbarState.handleThumbPositionChange()}};return Et(()=>this.scrollbarState.handleThumbPositionChange()),St(n,"scroll",i)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(t){const r=t.target;if(!r)return;const n=r.getBoundingClientRect(),i=t.clientX-n.left,o=t.clientY-n.top;this.scrollbarState.handleThumbPointerDown({x:i,y:o})}onpointerup(t){this.scrollbarState.handleThumbPointerUp()}#n=y(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture,onpointerup:this.onpointerup,[Ci.thumb]:"",...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}class Kl{static create(t){return new Kl(t,Pi.get())}opts;root;attachment;#t=E(0);#e=E(0);#r=y(()=>!!(l(this.#t)&&l(this.#e)));get hasSize(){return l(this.#r)}set hasSize(t){v(this.#r,t)}constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref),new Nn(()=>this.root.scrollbarXNode,()=>{const n=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=n,v(this.#e,n,!0)}),new Nn(()=>this.root.scrollbarYNode,()=>{const n=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=n,v(this.#t,n,!0)})}#n=y(()=>({id:this.opts.id.current,style:{width:l(this.#t),height:l(this.#e),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[Ci.corner]:"",...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}function vo(e){return e?Number.parseInt(e,10):0}function Ud(e,t){const r=e/t;return Number.isNaN(r)?0:r}function zo(e){const t=Ud(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function vw({pointerPos:e,pointerOffset:t,sizes:r,dir:n="ltr"}){const i=zo(r),o=i/2,s=t||o,a=i-s,c=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,p=n==="ltr"?[0,d]:[d*-1,0];return zd([c,u],p)(e)}function su({scrollPos:e,sizes:t,dir:r="ltr"}){const n=zo(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,a=o-n,c=r==="ltr"?[0,s]:[s*-1,0],u=gw(e,c[0],c[1]);return zd([0,s],[0,a])(u)}function zd(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Yd(e,t){return e>0&&e<t}function mw(e,t){let r={left:e.scrollLeft,top:e.scrollTop},n=0;const i=wa(e);return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,c=r.top!==s.top;(a||c)&&t(),r=s,n=i.requestAnimationFrame(o)})(),()=>i.cancelAnimationFrame(n)}var bw=W("<div><!></div>");function Y1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"type",3,"hover"),s=m(t,"dir",3,"ltr"),a=m(t,"scrollHideDelay",3,600),c=G(t,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const u=Fl.create({type:_(()=>o()),dir:_(()=>s()),scrollHideDelay:_(()=>a()),id:_(()=>i()),ref:_(()=>n(),b=>n(b))}),d=y(()=>q(c,u.props));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);M(S,()=>t.child,()=>({props:l(d)})),x(b,w)},g=b=>{var w=bw();J(w,()=>({...l(d)}));var S=Y(w);M(S,()=>t.children??L),U(w),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}var yw=W("<div><div><!></div></div>");function K1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id","children"]);const s=Rl.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props)),c=y(()=>q({},s.contentProps));var u=yw();J(u,()=>({...l(a)}));var d=Y(u);J(d,()=>({...l(c)}));var p=Y(d);M(p,()=>t.children??L),U(d),U(u),x(e,u),V()}var ww=W("<div><!></div>");function Kd(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy","child","children"]);const n=zl.create(),i=y(()=>q(r,n.props));var o=A(),s=P(o);{var a=u=>{var d=A(),p=P(d);M(p,()=>t.child,()=>({props:l(i)})),x(u,d)},c=u=>{var d=ww();J(d,()=>({...l(i)}));var p=Y(d);M(p,()=>t.children??L),U(d),x(u,d)};N(s,u=>{t.child?u(a):u(c,-1)})}x(e,o),V()}function _w(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=new ba,i=Wl.create({mounted:_(()=>n.current)}),o=y(()=>q(r,i.props));Kd(e,bt(()=>l(o))),V()}function Sw(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=new ba,i=Ul.create({mounted:_(()=>n.current)}),o=y(()=>q(r,i.props));Kd(e,bt(()=>l(o))),V()}function Yo(e,t){B(t,!0);let r=G(t,["$$slots","$$events","$$legacy"]);const n=Hl.create();var i=A(),o=P(i);{var s=c=>{_w(c,bt(()=>r))},a=c=>{Sw(c,bt(()=>r))};N(o,c=>{n.scrollbar.opts.orientation.current==="horizontal"?c(s):c(a,-1)})}x(e,i),V()}function xw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Uo.create(),o=y(()=>q(n,i.props));{const s=c=>{Yo(c,bt(()=>l(o)))};let a=y(()=>r()||i.isVisible);Ho(e,{get open(){return l(a)},get ref(){return i.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}})}V()}function Cw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Vl.create(),o=y(()=>q(n,i.props));{const s=c=>{Yo(c,bt(()=>l(o)))};let a=y(()=>r()||!i.isHidden);Ho(e,bt(()=>l(o),{get open(){return l(a)},get ref(){return i.scrollbar.opts.ref},presence:s,$$slots:{presence:!0}}))}V()}function Pw(e,t){B(t,!0);let r=m(t,"forceMount",3,!1),n=G(t,["$$slots","$$events","$$legacy","forceMount"]);const i=Bl.create(),o=Uo.create(),s=y(()=>q(n,i.props,o.props,{"data-state":i.isVisible?"visible":"hidden"})),a=y(()=>r()||i.isVisible&&o.isVisible);Ho(e,{get open(){return l(a)},get ref(){return o.scrollbar.opts.ref},presence:u=>{Yo(u,bt(()=>l(s)))},$$slots:{presence:!0}}),V()}function j1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id","orientation"]);const s=Ll.create({orientation:_(()=>t.orientation),id:_(()=>i()),ref:_(()=>n(),g=>n(g))}),a=y(()=>s.root.opts.type.current);var c=A(),u=P(c);{var d=g=>{Pw(g,bt(()=>o,{get id(){return i()}}))},p=g=>{Cw(g,bt(()=>o,{get id(){return i()}}))},h=g=>{xw(g,bt(()=>o,{get id(){return i()}}))},f=g=>{Yo(g,bt(()=>o,{get id(){return i()}}))};N(u,g=>{l(a)==="hover"?g(d):l(a)==="scroll"?g(p,1):l(a)==="auto"?g(h,2):l(a)==="always"&&g(f,3)})}x(e,c),V()}var Tw=W("<div><!></div>");function Aw(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref","id","child","children","present"]);const i=new ba,o=Yl.create({id:_(()=>t.id),ref:_(()=>r(),p=>r(p)),mounted:_(()=>i.current)}),s=y(()=>q(n,o.props,{style:{hidden:!t.present}}));var a=A(),c=P(a);{var u=p=>{var h=A(),f=P(h);M(f,()=>t.child,()=>({props:l(s)})),x(p,h)},d=p=>{var h=Tw();J(h,()=>({...l(s)}));var f=Y(h);M(f,()=>t.children??L),U(h),x(p,h)};N(c,p=>{t.child?p(u):p(d,-1)})}x(e,a),V()}function q1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"forceMount",3,!1),s=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const a=Wo.get();{const c=(d,p)=>{let h=()=>p?.().present;Aw(d,bt(()=>s,{get id(){return n()},get present(){return h()},get ref(){return i()},set ref(f){i(f)}}))};let u=y(()=>o()||a.hasThumb);Ho(e,{get open(){return l(u)},get ref(){return a.scrollbar.opts.ref},presence:c,$$slots:{presence:!0}})}V()}var Dw=W("<div><!></div>");function Ow(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref","id","children","child"]);const i=Kl.create({id:_(()=>t.id),ref:_(()=>r(),d=>r(d))}),o=y(()=>q(n,i.props));var s=A(),a=P(s);{var c=d=>{var p=A(),h=P(p);M(h,()=>t.child,()=>({props:l(o)})),x(d,p)},u=d=>{var p=Dw();J(p,()=>({...l(o)}));var h=Y(p);M(h,()=>t.children??L),U(p),x(d,p)};N(a,d=>{t.child?d(c):d(u,-1)})}x(e,s),V()}function X1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","ref","id"]);const s=Pi.get(),a=y(()=>!!(s.scrollbarXNode&&s.scrollbarYNode)),c=y(()=>s.opts.type.current!=="scroll"&&l(a));var u=A(),d=P(u);{var p=h=>{Ow(h,bt(()=>o,{get id(){return i()},get ref(){return n()},set ref(f){n(f)}}))};N(d,h=>{l(c)&&h(p)})}x(e,u),V()}var Ew=W("<!> <!>",1);function G1(e,t){B(t,!0);let r=m(t,"value",15),n=m(t,"onValueChange",3,st),i=m(t,"name",3,""),o=m(t,"disabled",3,!1),s=m(t,"open",15,!1),a=m(t,"onOpenChange",3,st),c=m(t,"onOpenChangeComplete",3,st),u=m(t,"loop",3,!1),d=m(t,"scrollAlignment",3,"nearest"),p=m(t,"required",3,!1),h=m(t,"items",19,()=>[]),f=m(t,"allowDeselect",3,!1);function g(){r()===void 0&&r(t.type==="single"?"":[])}g(),et.pre(()=>r(),()=>{g()});let b=E("");const w=By.create({type:t.type,value:_(()=>r(),I=>{r(I),n()(I)}),disabled:_(()=>o()),required:_(()=>p()),open:_(()=>s(),I=>{s(I),a()(I)}),loop:_(()=>u()),scrollAlignment:_(()=>d()),name:_(()=>i()),isCombobox:!1,items:_(()=>h()),allowDeselect:_(()=>f()),inputValue:_(()=>l(b),I=>v(b,I,!0)),onOpenChangeComplete:_(()=>c())});var S=Ew(),C=P(S);ml(C,{children:(I,F)=>{var z=A(),R=P(z);M(R,()=>t.children??L),x(I,z)},$$slots:{default:!0}});var T=ae(C,2);{var D=I=>{var F=A(),z=P(F);{var R=H=>{vs(H,{get autocomplete(){return t.autocomplete}})},X=H=>{var K=A(),Q=P(K);En(Q,16,()=>w.opts.value.current,ht=>ht,(ht,xt)=>{vs(ht,{get value(){return xt},get autocomplete(){return t.autocomplete}})}),x(H,K)};N(z,H=>{w.opts.value.current.length===0?H(R):H(X,-1)})}x(I,F)},k=y(()=>Array.isArray(w.opts.value.current)),O=I=>{vs(I,{get autocomplete(){return t.autocomplete},get value(){return w.opts.value.current},set value(F){w.opts.value.current=F}})};N(T,I=>{l(k)?I(D):I(O,-1)})}x(e,S),V()}var Iw=W("<button><!></button>");function Z1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"type",3,"button"),s=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=bl.create({id:_(()=>n()),ref:_(()=>i(),p=>i(p))}),c=y(()=>q(s,a.props,{type:o()}));var u=A(),d=P(u);Mr(d,()=>Bd,(p,h)=>{h(p,{get id(){return n()},get ref(){return a.opts.ref},children:(f,g)=>{var b=A(),w=P(b);{var S=T=>{var D=A(),k=P(D);M(k,()=>t.child,()=>({props:l(c)})),x(T,D)},C=T=>{var D=Iw();J(D,()=>({...l(c)}));var k=Y(D);M(k,()=>t.children??L),U(D),x(T,D)};N(w,T=>{t.child?T(S):T(C,-1)})}x(f,b)},$$slots:{default:!0}})}),x(e,u),V()}const jd=_e({component:"switch",parts:["root","thumb"]}),jl=new Vt("Switch.Root");class ql{static create(t){return jl.set(new ql(t))}opts;attachment;constructor(t){this.opts=t,this.attachment=rt(t.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#t(){this.opts.checked.current=!this.opts.checked.current}onkeydown(t){!(t.key===lr||t.key===Ue)||this.opts.disabled.current||(t.preventDefault(),this.#t())}onclick(t){this.opts.disabled.current||this.#t()}#e=y(()=>({"data-disabled":pt(this.opts.disabled.current),"data-state":Yp(this.opts.checked.current),"data-required":pt(this.opts.required.current)}));get sharedProps(){return l(this.#e)}set sharedProps(t){v(this.#e,t)}#r=y(()=>({checked:this.opts.checked.current}));get snippetProps(){return l(this.#r)}set snippetProps(t){v(this.#r,t)}#n=y(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:Qi(this.opts.disabled.current),"aria-checked":Nh(this.opts.checked.current,!1),"aria-required":fe(this.opts.required.current),[jd.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#n)}set props(t){v(this.#n,t)}}class Xl{static create(){return new Xl(jl.get())}root;#t=y(()=>this.root.opts.name.current!==void 0);get shouldRender(){return l(this.#t)}set shouldRender(t){v(this.#t,t)}constructor(t){this.root=t}#e=y(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Gl{static create(t){return new Gl(t,jl.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref)}#t=y(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({...this.root.sharedProps,id:this.opts.id.current,[jd.thumb]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}function Mw(e,t){B(t,!1);const r=Xl.create();Sh();var n=A(),i=P(n);{var o=s=>{el(s,bt(()=>r.props))};N(i,s=>{r.shouldRender&&s(o)})}x(e,n),V()}var kw=W("<button><!></button>"),Nw=W("<!> <!>",1);function J1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=m(t,"disabled",3,!1),s=m(t,"required",3,!1),a=m(t,"checked",15,!1),c=m(t,"value",3,"on"),u=m(t,"name",3,void 0),d=m(t,"type",3,"button"),p=m(t,"onCheckedChange",3,st),h=G(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const f=ql.create({checked:_(()=>a(),D=>{a(D),p()?.(D)}),disabled:_(()=>o()??!1),required:_(()=>s()),value:_(()=>c()),name:_(()=>u()),id:_(()=>i()),ref:_(()=>n(),D=>n(D))}),g=y(()=>q(h,f.props,{type:d()}));var b=Nw(),w=P(b);{var S=D=>{var k=A(),O=P(k);{let I=y(()=>({props:l(g),...f.snippetProps}));M(O,()=>t.child,()=>l(I))}x(D,k)},C=D=>{var k=kw();J(k,()=>({...l(g)}));var O=Y(k);M(O,()=>t.children??L,()=>f.snippetProps),U(k),x(D,k)};N(w,D=>{t.child?D(S):D(C,-1)})}var T=ae(w,2);Mw(T,{}),x(e,b),V()}var Fw=W("<span><!></span>");function Q1(e,t){const r=at();B(t,!0);let n=m(t,"ref",15,null),i=m(t,"id",19,()=>lt(r)),o=G(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const s=Gl.create({id:_(()=>i()),ref:_(()=>n(),h=>n(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);{let b=y(()=>({props:l(a),...s.snippetProps}));M(g,()=>t.child,()=>l(b))}x(h,f)},p=h=>{var f=Fw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L,()=>s.snippetProps),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}const mo=_e({component:"tabs",parts:["root","list","trigger","content"]}),Zl=new Vt("Tabs.Root");class Jl{static create(t){return Zl.set(new Jl(t))}opts;attachment;rovingFocusGroup;#t=E(Zt([]));get triggerIds(){return l(this.#t)}set triggerIds(t){v(this.#t,t,!0)}valueToTriggerId=new Rs;valueToContentId=new Rs;constructor(t){this.opts=t,this.attachment=rt(t.ref),this.rovingFocusGroup=new ev({candidateAttr:mo.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(t,r){return this.triggerIds.push(t),this.valueToTriggerId.set(r,t),()=>{this.triggerIds=this.triggerIds.filter(n=>n!==t),this.valueToTriggerId.delete(r)}}registerContent(t,r){return this.valueToContentId.set(r,t),()=>{this.valueToContentId.delete(r)}}setValue(t){this.opts.value.current=t}#e=y(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[mo.root]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class Ql{static create(t){return new Ql(t,Zl.get())}opts;root;attachment;#t=y(()=>this.root.opts.disabled.current);constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref)}#e=y(()=>({id:this.opts.id.current,role:"tablist","aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[mo.list]:"","data-disabled":pt(l(this.#t)),...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}}class $l{static create(t){return new $l(t,Zl.get())}opts;root;attachment;#t=E(0);#e=y(()=>this.root.opts.value.current===this.opts.value.current);#r=y(()=>this.opts.disabled.current||this.root.opts.disabled.current);#n=y(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(t.ref),et([()=>this.opts.id.current,()=>this.opts.value.current],([n,i])=>this.root.registerTrigger(n,i)),nt(()=>{this.root.triggerIds.length,l(this.#e)||!this.root.opts.value.current?v(this.#t,0):v(this.#t,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(t){this.root.opts.activationMode.current!=="automatic"||l(this.#r)||this.#i()}onclick(t){l(this.#r)||this.#i()}onkeydown(t){if(!l(this.#r)){if(t.key===Ue||t.key===lr){t.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t)}}#o=y(()=>({id:this.opts.id.current,role:"tab","data-state":Rw(l(this.#e)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(l(this.#r)),"aria-selected":fe(l(this.#e)),"aria-controls":l(this.#n),[mo.trigger]:"",disabled:Qi(l(this.#r)),tabindex:l(this.#t),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return l(this.#o)}set props(t){v(this.#o,t)}}function Rw(e){return e?"active":"inactive"}var Lw=W("<div><!></div>");function $1(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"value",15,""),s=m(t,"onValueChange",3,st),a=m(t,"orientation",3,"horizontal"),c=m(t,"loop",3,!0),u=m(t,"activationMode",3,"automatic"),d=m(t,"disabled",3,!1),p=G(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","orientation","loop","activationMode","disabled","children","child"]);const h=Jl.create({id:_(()=>n()),value:_(()=>o(),C=>{o(C),s()(C)}),orientation:_(()=>a()),loop:_(()=>c()),activationMode:_(()=>u()),disabled:_(()=>d()),ref:_(()=>i(),C=>i(C))}),f=y(()=>q(p,h.props));var g=A(),b=P(g);{var w=C=>{var T=A(),D=P(T);M(D,()=>t.child,()=>({props:l(f)})),x(C,T)},S=C=>{var T=Lw();J(T,()=>({...l(f)}));var D=Y(T);M(D,()=>t.children??L),U(T),x(C,T)};N(b,C=>{t.child?C(w):C(S,-1)})}x(e,g),V()}var Bw=W("<div><!></div>");function t_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=G(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const s=Ql.create({id:_(()=>n()),ref:_(()=>i(),h=>i(h))}),a=y(()=>q(o,s.props));var c=A(),u=P(c);{var d=h=>{var f=A(),g=P(f);M(g,()=>t.child,()=>({props:l(a)})),x(h,f)},p=h=>{var f=Bw();J(f,()=>({...l(a)}));var g=Y(f);M(g,()=>t.children??L),U(f),x(h,f)};N(u,h=>{t.child?h(d):h(p,-1)})}x(e,c),V()}var Vw=W("<button><!></button>");function e_(e,t){const r=at();B(t,!0);let n=m(t,"disabled",3,!1),i=m(t,"id",19,()=>lt(r)),o=m(t,"type",3,"button"),s=m(t,"ref",15,null),a=G(t,["$$slots","$$events","$$legacy","child","children","disabled","id","type","value","ref"]);const c=$l.create({id:_(()=>i()),disabled:_(()=>n()??!1),value:_(()=>t.value),ref:_(()=>s(),g=>s(g))}),u=y(()=>q(a,c.props,{type:o()}));var d=A(),p=P(d);{var h=g=>{var b=A(),w=P(b);M(w,()=>t.child,()=>({props:l(u)})),x(g,b)},f=g=>{var b=Vw();J(b,()=>({...l(u)}));var w=Y(b);M(w,()=>t.children??L),U(b),x(g,b)};N(p,g=>{t.child?g(h):g(f,-1)})}x(e,d),V()}class Gs{#t;#e;#r=null;constructor(t,r){this.#e=t,this.#t=r,this.stop=this.stop.bind(this),this.start=this.start.bind(this),ur(this.stop)}#n(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#n()}start(...t){this.#n(),this.#r=window.setTimeout(()=>{this.#r=null,this.#e(...t)},this.#t)}}const qd=_e({component:"tooltip",parts:["content","trigger"]}),Xd=new Vt("Tooltip.Provider"),tc=new Vt("Tooltip.Root");class Hw{#t=E(Zt(new Map));get triggers(){return l(this.#t)}set triggers(t){v(this.#t,t,!0)}#e=E(null);get activeTriggerId(){return l(this.#e)}set activeTriggerId(t){v(this.#e,t,!0)}#r=y(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.node??null});get activeTriggerNode(){return l(this.#r)}set activeTriggerNode(t){v(this.#r,t)}#n=y(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.payload??null});get activePayload(){return l(this.#n)}set activePayload(t){v(this.#n,t)}register=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#i()};update=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#i()};unregister=t=>{if(!this.triggers.has(t))return;const r=new Map(this.triggers);r.delete(t),this.triggers=r,this.activeTriggerId===t&&(this.activeTriggerId=null)};setActiveTrigger=t=>{if(t===null){this.activeTriggerId=null;return}if(!this.triggers.has(t)){this.activeTriggerId=null;return}this.activeTriggerId=t};get=t=>this.triggers.get(t);has=t=>this.triggers.has(t);getFirstTriggerId=()=>{const t=this.triggers.entries().next();return t.done?null:t.value[0]};#i=()=>{const t=this.activeTriggerId;t!==null&&(this.triggers.has(t)||(this.activeTriggerId=null))}}class ec{static create(t){return Xd.set(new ec(t))}opts;#t=E(!0);get isOpenDelayed(){return l(this.#t)}set isOpenDelayed(t){v(this.#t,t,!0)}isPointerInTransit=le(!1);#e;#r=E(null);constructor(t){this.opts=t,this.#e=new Gs(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),Io(()=>St(window,"scroll",r=>{const n=l(this.#r);if(!n)return;const i=n.triggerNode;if(!i)return;const o=r.target;(o instanceof Element||o instanceof Document)&&o.contains(i)&&n.handleClose()}))}#n=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}else this.#e.start()};#i=()=>{this.#e.stop()};onOpen=t=>{l(this.#r)&&l(this.#r)!==t&&l(this.#r).handleClose(),this.#i(),this.isOpenDelayed=!1,v(this.#r,t,!0)};onClose=t=>{l(this.#r)===t&&(v(this.#r,null),this.#n())};isTooltipOpen=t=>l(this.#r)===t}class rc{static create(t){return tc.set(new rc(t,Xd.get()))}opts;provider;#t=y(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return l(this.#t)}set delayDuration(t){v(this.#t,t)}#e=y(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return l(this.#e)}set disableHoverableContent(t){v(this.#e,t)}#r=y(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return l(this.#r)}set disableCloseOnTriggerClick(t){v(this.#r,t)}#n=y(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return l(this.#n)}set disabled(t){v(this.#n,t)}#i=y(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return l(this.#i)}set ignoreNonKeyboardFocus(t){v(this.#i,t)}registry;tether;#o=E(null);get contentNode(){return l(this.#o)}set contentNode(t){v(this.#o,t,!0)}contentPresence;#s=E(!1);#a;#l=y(()=>this.opts.open.current?l(this.#s)?"delayed-open":"instant-open":"closed");get stateAttr(){return l(this.#l)}set stateAttr(t){v(this.#l,t)}constructor(t,r){this.opts=t,this.provider=r,this.tether=t.tether.current?.state??null,this.registry=this.tether?.registry??new Hw,this.#a=new Gs(()=>{v(this.#s,!0),this.opts.open.current=!0},this.delayDuration??0),this.tether&&(this.tether.root=this,Io(()=>()=>{this.tether?.root===this&&(this.tether.root=null)})),this.contentPresence=new cn({open:this.opts.open,ref:_(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),et(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#a=new Gs(()=>{v(this.#s,!0),this.opts.open.current=!0},this.delayDuration))}),et(()=>this.opts.open.current,n=>{n?(this.ensureActiveTrigger(),this.provider.onOpen(this)):this.provider.onClose(this)},{lazy:!0}),et(()=>this.opts.triggerId.current,n=>{n!==this.registry.activeTriggerId&&this.registry.setActiveTrigger(n)}),et(()=>this.registry.activeTriggerId,n=>{this.opts.triggerId.current!==n&&(this.opts.triggerId.current=n)})}handleOpen=()=>{this.#a.stop(),v(this.#s,!1),this.ensureActiveTrigger(),this.opts.open.current=!0};handleClose=()=>{this.#a.stop(),this.opts.open.current=!1};#c=()=>{this.#a.stop();const t=!this.provider.isOpenDelayed,r=this.delayDuration??0;t||r===0?(v(this.#s,!1),this.opts.open.current=!0):this.#a.start()};onTriggerEnter=t=>{this.setActiveTrigger(t),this.#c()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#a.stop()};ensureActiveTrigger=()=>{if(this.registry.activeTriggerId!==null&&this.registry.has(this.registry.activeTriggerId))return;if(this.opts.triggerId.current!==null&&this.registry.has(this.opts.triggerId.current)){this.registry.setActiveTrigger(this.opts.triggerId.current);return}const t=this.registry.getFirstTriggerId();this.registry.setActiveTrigger(t)};setActiveTrigger=t=>{this.registry.setActiveTrigger(t)};registerTrigger=t=>{this.registry.register(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};updateTrigger=t=>{this.registry.update(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};unregisterTrigger=t=>{const r=this.registry.activeTriggerId===t;this.registry.unregister(t),r&&this.opts.open.current&&this.handleClose()};isActiveTrigger=t=>this.registry.activeTriggerId===t;get triggerNode(){return this.registry.activeTriggerNode}get activePayload(){return this.registry.activePayload}get activeTriggerId(){return this.registry.activeTriggerId}}class bo{static create(t){return t.tether.current?new bo(t,null,t.tether.current.state):new bo(t,tc.get(),null)}opts;root;tether;attachment;#t=le(!1);#e=E(!1);domContext;#r=null;#n=!1;#i=null;constructor(t,r,n){this.opts=t,this.root=r,this.tether=n,this.domContext=new Dr(t.ref),this.attachment=rt(this.opts.ref,i=>this.#a(i)),et(()=>this.opts.id.current,()=>{this.#a(this.opts.ref.current)}),et(()=>this.opts.payload.current,()=>{this.#a(this.opts.ref.current)}),et(()=>this.opts.disabled.current,()=>{this.#a(this.opts.ref.current)}),Io(()=>(this.#n=!0,this.#a(this.opts.ref.current),()=>{const i=this.#o(),o=this.#i;o&&(this.tether?this.tether.registry.unregister(o):i?.unregisterTrigger(o)),this.#i=null,this.#n=!1}))}#o=()=>this.tether?.root??this.root;#s=()=>{const t=this.#o();return this.opts.disabled.current||!!t?.disabled};#a=t=>{if(!this.#n)return;const r=this.opts.id.current,n=this.opts.payload.current,i=this.opts.disabled.current;if(this.#i&&this.#i!==r){const a=this.#o();this.tether?this.tether.registry.unregister(this.#i):a?.unregisterTrigger(this.#i)}const o={id:r,node:t,payload:n,disabled:i},s=this.#o();this.tether?(this.tether.registry.has(r)?this.tether.registry.update(o):this.tether.registry.register(o),i&&this.tether.registry.activeTriggerId===r&&s?.opts.open.current&&s.handleClose()):s?.registry.has(r)?s.updateTrigger(o):s?.registerTrigger(o),this.#i=r};#l=()=>{this.#r!==null&&(clearTimeout(this.#r),this.#r=null)};handlePointerUp=()=>{this.#t.current=!1};#c=()=>{this.#s()||(this.#t.current=!1)};#u=()=>{this.#s()||(this.#t.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#h=t=>{const r=this.#o();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}if(t.pointerType!=="touch"){if(r.provider.isPointerInTransit.current){this.#l(),this.#r=window.setTimeout(()=>{r.provider.isPointerInTransit.current&&(r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),v(this.#e,!0))},250);return}r.onTriggerEnter(this.opts.id.current),v(this.#e,!0)}}};#f=t=>{const r=this.#o();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}t.pointerType!=="touch"&&(l(this.#e)||(this.#l(),r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),v(this.#e,!0)))}};#g=t=>{const r=this.#o();if(!r||this.#s())return;if(this.#l(),!r.isActiveTrigger(this.opts.id.current)){v(this.#e,!1);return}const n=t.relatedTarget;if(mr(n)){for(const i of r.registry.triggers.values())if(i.node===n){if(r.provider.opts.skipDelayDuration.current>0){v(this.#e,!1);return}r.handleClose(),v(this.#e,!1);return}}r.onTriggerLeave(),v(this.#e,!1)};#d=t=>{const r=this.#o();if(r&&!this.#t.current){if(this.#s()){r.opts.open.current&&r.handleClose();return}r.ignoreNonKeyboardFocus&&!$p(t.currentTarget)||(r.setActiveTrigger(this.opts.id.current),r.handleOpen())}};#p=()=>{const t=this.#o();!t||this.#s()||t.handleClose()};#v=()=>{const t=this.#o();!t||t.disableCloseOnTriggerClick||this.#s()||t.handleClose()};#m=y(()=>{const t=this.#o(),r=!!(t?.opts.open.current&&t.isActiveTrigger(this.opts.id.current)),n=this.#s();return{id:this.opts.id.current,"aria-describedby":r?t?.contentNode?.id:void 0,"data-state":r?t?.stateAttr:"closed","data-disabled":pt(n),"data-delay-duration":`${t?.delayDuration??0}`,[qd.trigger]:"",tabindex:n?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#c,onpointerdown:this.#u,onpointerenter:this.#h,onpointermove:this.#f,onpointerleave:this.#g,onfocus:this.#d,onblur:this.#p,onclick:this.#v,...this.attachment}});get props(){return l(this.#m)}set props(t){v(this.#m,t)}}class nc{static create(t){return new nc(t,tc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),new Hd({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,transitIntentTimeout:180,ignoredTargets:()=>{if(this.root.provider.opts.skipDelayDuration.current===0)return[];const n=[],i=this.root.triggerNode;for(const o of this.root.registry.triggers.values())o.node&&o.node!==i&&n.push(o.node);return n},onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}})}onInteractOutside=t=>{if(mr(t.target)&&this.root.triggerNode?.contains(t.target)&&this.root.disableCloseOnTriggerClick){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current?.(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return l(this.#t)}set snippetProps(t){v(this.#t,t)}#e=y(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":pt(this.root.disabled),...Wn(this.root.contentPresence.transitionStatus),style:{outline:"none"},[qd.content]:"",...this.attachment}));get props(){return l(this.#e)}set props(t){v(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function r_(e,t){B(t,!0);let r=m(t,"open",15,!1),n=m(t,"triggerId",15,null),i=m(t,"onOpenChange",3,st),o=m(t,"onOpenChangeComplete",3,st);const s=rc.create({open:_(()=>r(),a=>{r(a),i()(a)}),triggerId:_(()=>n(),a=>{n(a)}),delayDuration:_(()=>t.delayDuration),disableCloseOnTriggerClick:_(()=>t.disableCloseOnTriggerClick),disableHoverableContent:_(()=>t.disableHoverableContent),ignoreNonKeyboardFocus:_(()=>t.ignoreNonKeyboardFocus),disabled:_(()=>t.disabled),onOpenChangeComplete:_(()=>o()),tether:_(()=>t.tether)});ml(e,{tooltip:!0,children:(a,c)=>{var u=A(),d=P(u);M(d,()=>t.children??L,()=>({open:s.opts.open.current,triggerId:s.activeTriggerId,payload:s.activePayload})),x(a,u)},$$slots:{default:!0}}),V()}var Ww=W("<div><div><!></div></div>"),Uw=W("<div><div><!></div></div>");function n_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"ref",15,null),o=m(t,"side",3,"top"),s=m(t,"sideOffset",3,0),a=m(t,"align",3,"center"),c=m(t,"avoidCollisions",3,!0),u=m(t,"arrowPadding",3,0),d=m(t,"sticky",3,"partial"),p=m(t,"hideWhenDetached",3,!1),h=m(t,"collisionPadding",3,0),f=m(t,"onInteractOutside",3,st),g=m(t,"onEscapeKeydown",3,st),b=m(t,"forceMount",3,!1),w=G(t,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const S=nc.create({id:_(()=>n()),ref:_(()=>i(),F=>i(F)),onInteractOutside:_(()=>f()),onEscapeKeydown:_(()=>g())}),C=y(()=>({side:o(),sideOffset:s(),align:a(),avoidCollisions:c(),arrowPadding:u(),sticky:d(),hideWhenDetached:p(),collisionPadding:h(),strategy:t.strategy,customAnchor:t.customAnchor??S.root.triggerNode})),T=y(()=>q(w,l(C),S.props));var D=A(),k=P(D);{var O=F=>{{const z=(X,H)=>{let K=()=>H?.().props,Q=()=>H?.().wrapperProps;const ht=y(()=>q(K(),{style:si("tooltip")},{style:t.style}));var xt=A(),vt=P(xt);{var Z=gt=>{var It=A(),kt=P(It);{let Ut=y(()=>({props:l(ht),wrapperProps:Q(),...S.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(gt,It)},$=gt=>{var It=Ww();J(It,()=>({...Q()}));var kt=Y(It);J(kt,()=>({...l(ht)}));var Ut=Y(kt);M(Ut,()=>t.children??L),U(kt),U(It),x(gt,It)};N(vt,gt=>{t.child?gt(Z):gt($,-1)})}x(X,xt)};let R=y(()=>S.root.disableHoverableContent?"none":"auto");Al(F,bt(()=>l(T),()=>S.popperProps,{get enabled(){return S.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return S.opts.ref},tooltip:!0,get shouldRender(){return S.shouldRender},get contentPointerEvents(){return l(R)},popper:z,$$slots:{popper:!0}}))}},I=F=>{{const z=(X,H)=>{let K=()=>H?.().props,Q=()=>H?.().wrapperProps;const ht=y(()=>q(K(),{style:si("tooltip")},{style:t.style}));var xt=A(),vt=P(xt);{var Z=gt=>{var It=A(),kt=P(It);{let Ut=y(()=>({props:l(ht),wrapperProps:Q(),...S.snippetProps}));M(kt,()=>t.child,()=>l(Ut))}x(gt,It)},$=gt=>{var It=Uw();J(It,()=>({...Q()}));var kt=Y(It);J(kt,()=>({...l(ht)}));var Ut=Y(kt);M(Ut,()=>t.children??L),U(kt),U(It),x(gt,It)};N(vt,gt=>{t.child?gt(Z):gt($,-1)})}x(X,xt)};let R=y(()=>S.root.disableHoverableContent?"none":"auto");Tl(F,bt(()=>l(T),()=>S.popperProps,{get open(){return S.root.opts.open.current},get id(){return n()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return S.opts.ref},tooltip:!0,get shouldRender(){return S.shouldRender},get contentPointerEvents(){return l(R)},popper:z,$$slots:{popper:!0}}))}};N(k,F=>{b()?F(O):b()||F(I,1)})}x(e,D),V()}var zw=W("<button><!></button>");function i_(e,t){const r=at();B(t,!0);let n=m(t,"id",19,()=>lt(r)),i=m(t,"disabled",3,!1),o=m(t,"type",3,"button"),s=m(t,"tabindex",3,0),a=m(t,"ref",15,null),c=G(t,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const u=bo.create({id:_(()=>n()),disabled:_(()=>i()??!1),tabindex:_(()=>s()??0),payload:_(()=>t.payload),tether:_(()=>t.tether),ref:_(()=>a(),b=>a(b))}),d=y(()=>q(c,u.props,{type:o()}));var p=A(),h=P(p);{var f=b=>{var w=A(),S=P(w);M(S,()=>t.child,()=>({props:l(d)})),x(b,w)},g=b=>{var w=zw();J(w,()=>({...l(d)}));var S=Y(w);M(S,()=>t.children??L),U(w),x(b,w)};N(h,b=>{t.child?b(f):b(g,-1)})}x(e,p),V()}function o_(e,t){B(t,!0);let r=m(t,"ref",15,null),n=G(t,["$$slots","$$events","$$legacy","ref"]);Uy(e,bt(()=>n,{get ref(){return r()},set ref(i){r(i)}})),V()}function s_(e,t){B(t,!0);let r=m(t,"delayDuration",3,700),n=m(t,"disableCloseOnTriggerClick",3,!1),i=m(t,"disableHoverableContent",3,!1),o=m(t,"disabled",3,!1),s=m(t,"ignoreNonKeyboardFocus",3,!1),a=m(t,"skipDelayDuration",3,300);ec.create({delayDuration:_(()=>r()),disableCloseOnTriggerClick:_(()=>n()),disableHoverableContent:_(()=>i()),disabled:_(()=>o()),ignoreNonKeyboardFocus:_(()=>s()),skipDelayDuration:_(()=>a())});var c=A(),u=P(c);M(u,()=>t.children??L),x(e,c),V()}const Yw=Array(12).fill(0);var Kw=W('<div class="sonner-loading-bar"></div>'),jw=W('<div><div class="sonner-spinner"></div></div>');function qw(e,t){B(t,!0);var r=jw(),n=Y(r);En(n,23,()=>Yw,(i,o)=>`spinner-bar-${o}`,(i,o)=>{var s=Kw();x(i,s)}),U(n),U(r),Jt(i=>{Fe(r,1,i),_t(r,"data-visible",t.visible)},[()=>Ne(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),x(e,r),V()}function Je(...e){return e.filter(Boolean).join(" ")}const Xw=typeof document<"u",Gw=typeof window<"u"?window:void 0;function Zw(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Jw{#t;#e;constructor(t={}){const{window:r=Gw,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=hi(i=>{const o=St(r,"focusin",i),s=St(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?Zw(this.#t):null}}new Jw;class Qw{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Pu(this.#e)}get(){const t=Xi(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const r=Xi(this.#e);return r===void 0?t:r}set(t){return Cu(this.#e,t)}}const $w=new Qw("<Toaster/>");let au=0;class t0{#t=E(Zt([]));get toasts(){return l(this.#t)}set toasts(t){v(this.#t,t,!0)}#e=E(Zt([]));get heights(){return l(this.#e)}set heights(t){v(this.#e,t,!0)}#r=t=>{const r=this.toasts.findIndex(n=>n.id===t);return r===-1?null:r};addToast=t=>{Xw&&this.toasts.unshift(t)};updateToast=({id:t,data:r,type:n,message:i})=>{const o=this.toasts.findIndex(a=>a.id===t),s=this.toasts[o];this.toasts[o]={...s,...r,id:t,title:i,type:n,updated:!0}};create=t=>{const{message:r,...n}=t,i=typeof t?.id=="number"||t.id&&t.id?.length>0?t.id:au++,o=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,s=t.type===void 0?"default":t.type;return Et(()=>{this.toasts.find(c=>c.id===i)?this.updateToast({id:i,data:t,type:s,message:r,dismissible:o}):this.addToast({...n,id:i,title:r,dismissible:o,type:s})}),i};dismiss=t=>(Et(()=>{if(t===void 0){this.toasts=this.toasts.map(n=>({...n,dismiss:!0}));return}const r=this.toasts.findIndex(n=>n.id===t);this.toasts[r]&&(this.toasts[r]={...this.toasts[r],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const r=this.#r(t);if(r!==null)return this.toasts.splice(r,1),t};message=(t,r)=>this.create({...r,type:"default",message:t});error=(t,r)=>this.create({...r,type:"error",message:t});success=(t,r)=>this.create({...r,type:"success",message:t});info=(t,r)=>this.create({...r,type:"info",message:t});warning=(t,r)=>this.create({...r,type:"warning",message:t});loading=(t,r)=>this.create({...r,type:"loading",message:t});promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:typeof r.loading=="string"?r.loading:r.loading()}));const i=t instanceof Promise?t:t();let o=n!==void 0;return i.then(s=>{if(typeof s=="object"&&s&&"ok"in s&&typeof s.ok=="boolean"&&!s.ok){o=!1;const a=e0(s);this.create({id:n,type:"error",message:a})}else if(r.success!==void 0){o=!1;const a=typeof r.success=="function"?r.success(s):r.success;this.create({id:n,type:"success",message:a})}}).catch(s=>{if(r.error!==void 0){o=!1;const a=typeof r.error=="function"?r.error(s):r.error;this.create({id:n,type:"error",message:a})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),r.finally?.()}),n};custom=(t,r)=>{const n=r?.id||au++;return this.create({component:t,id:n,...r}),n};removeHeight=t=>{this.heights=this.heights.filter(r=>r.toastId!==t)};setHeight=t=>{const r=this.#r(t.toastId);if(r===null){this.heights.push(t);return}this.heights[r]=t};reset=()=>{this.toasts=[],this.heights=[]}}function e0(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const Ot=new t0;function r0(e,t){return Ot.create({message:e,...t})}class n0{#t=y(()=>Ot.toasts.filter(t=>!t.dismiss));get toasts(){return l(this.#t)}}const i0=r0,a_=Object.assign(i0,{success:Ot.success,info:Ot.info,warning:Ot.warning,error:Ot.error,custom:Ot.custom,message:Ot.message,promise:Ot.promise,dismiss:Ot.dismiss,loading:Ot.loading,getActiveToasts:()=>Ot.toasts.filter(e=>!e.dismiss)});function Vi(e){return e.label!==void 0}function o0(){let e=E(Zt(typeof document<"u"?document.hidden:!1));return nt(()=>St(document,"visibilitychange",()=>{v(e,document.hidden,!0)})),{get current(){return l(e)}}}const lu=4e3,s0=14,a0=45,l0=200,c0=.05,u0={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function h0(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}function cu(e){return 1/(1.5+Math.abs(e)/20)}var d0=W("<div><!></div>"),f0=W('<button data-close-button=""><!></button>'),g0=W('<div data-icon=""><!> <!></div>'),p0=W('<div data-description=""><!></div>'),v0=W('<button data-button="" data-cancel=""> </button>'),m0=W('<button data-button=""> </button>'),b0=W('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),y0=W('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function w0(e,t){B(t,!0);const r=ut=>{var mt=A(),Tt=P(mt);{var Ft=Dt=>{var $t=d0(),Gr=Y($t);M(Gr,()=>t.loadingIcon),U($t),Jt(Yn=>{Fe($t,1,Yn),_t($t,"data-visible",l(O)==="loading")},[()=>Ne(Je(l($)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),x(Dt,$t)},Rt=Dt=>{{let $t=y(()=>Je(l($)?.loader,t.toast.classes?.loader)),Gr=y(()=>l(O)==="loading");qw(Dt,{get class(){return l($t)},get visible(){return l(Gr)}})}};N(Tt,Dt=>{t.loadingIcon?Dt(Ft):Dt(Rt,-1)})}x(ut,mt)};let n=m(t,"cancelButtonStyle",3,""),i=m(t,"actionButtonStyle",3,""),o=m(t,"descriptionClass",3,""),s=m(t,"unstyled",3,!1),a=m(t,"defaultRichColors",3,!1);const c={...u0};let u=E(!1),d=E(!1),p=E(!1),h=E(!1),f=E(!1),g=E(0),b=E(0),w=t.toast.duration||t.duration||lu,S=E(void 0),C=E(null),T=E(null);const D=y(()=>t.index===0),k=y(()=>t.index+1<=t.visibleToasts),O=y(()=>t.toast.type),I=y(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),F=y(()=>t.toast.class||""),z=y(()=>t.toast.descriptionClass||""),R=y(()=>Ot.heights.findIndex(ut=>ut.toastId===t.toast.id)||0),X=y(()=>t.toast.closeButton??t.closeButton),H=y(()=>t.toast.duration??t.duration??lu);let K=null;const Q=y(()=>t.position.split("-")),ht=y(()=>Ot.heights.reduce((ut,mt,Tt)=>Tt>=l(R)?ut:ut+mt.height,0)),xt=o0(),vt=y(()=>t.toast.invert||t.invert),Z=y(()=>l(O)==="loading"),$=y(()=>({...c,...t.classes})),gt=y(()=>t.toast.title),It=y(()=>t.toast.description);let kt=E(0),Ut=E(0);const vn=y(()=>Math.round(l(R)*s0+l(ht)));nt(()=>{l(gt),l(It);let ut;t.expanded||t.expandByDefault?ut=1:ut=1-t.index*c0;const mt=Et(()=>l(S));if(mt===void 0)return;mt.style.setProperty("height","auto");const Tt=mt.offsetHeight,Ft=mt.getBoundingClientRect().height,Rt=Math.round(Ft/ut+Number.EPSILON&100)/100;mt.style.removeProperty("height");let Dt;Math.abs(Rt-Tt)<1?Dt=Rt:Dt=Tt,v(b,Dt,!0),Ot.setHeight({toastId:t.toast.id,height:Dt})});function tt(){v(d,!0),v(g,l(vn),!0),Ot.removeHeight(t.toast.id),setTimeout(()=>{Ot.remove(t.toast.id)},l0)}let zt;const qe=y(()=>t.toast.promise&&l(O)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function Xe(){v(kt,new Date().getTime(),!0),zt=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),tt()},w)}function Xr(){if(l(Ut)<l(kt)){const ut=new Date().getTime()-l(kt);w=w-ut}v(Ut,new Date().getTime(),!0)}nt(()=>{t.toast.updated&&(clearTimeout(zt),w=l(H),Xe())}),nt(()=>(l(qe)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&xt.current?Xr():Xe()),()=>clearTimeout(zt))),pi(()=>{v(u,!0);const ut=l(S)?.getBoundingClientRect().height;return v(b,ut,!0),Ot.setHeight({toastId:t.toast.id,height:ut}),()=>{Ot.removeHeight(t.toast.id)}}),nt(()=>{t.toast.delete&&Et(()=>{tt(),t.toast.onDismiss?.(t.toast)})});const Ko=ut=>{if(l(Z))return;v(g,l(vn),!0);const mt=ut.target;mt.setPointerCapture(ut.pointerId),mt.tagName!=="BUTTON"&&(v(p,!0),K={x:ut.clientX,y:ut.clientY})},ic=()=>{if(l(h)||!l(I))return;K=null;const ut=Number(l(S)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),mt=Number(l(S)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Tt=new Date().getTime()-0,Ft=l(C)==="x"?ut:mt,Rt=Math.abs(Ft)/Tt;if(Math.abs(Ft)>=a0||Rt>.11){v(g,l(vn),!0),t.toast.onDismiss?.(t.toast),l(C)==="x"?v(T,ut>0?"right":"left",!0):v(T,mt>0?"down":"up",!0),tt(),v(h,!0);return}else l(S)?.style.setProperty("--swipe-amount-x","0px"),l(S)?.style.setProperty("--swipe-amount-y","0px");v(f,!1),v(p,!1),v(C,null)},Ai=ut=>{if(!K||!l(I)||(window.getSelection()?.toString().length??-1)>0)return;const Tt=ut.clientY-K.y,Ft=ut.clientX-K.x,Rt=t.swipeDirections??h0(t.position);!l(C)&&(Math.abs(Ft)>1||Math.abs(Tt)>1)&&v(C,Math.abs(Ft)>Math.abs(Tt)?"x":"y",!0);let Dt={x:0,y:0};if(l(C)==="y"){if(Rt.includes("top")||Rt.includes("bottom"))if(Rt.includes("top")&&Tt<0||Rt.includes("bottom")&&Tt>0)Dt.y=Tt;else{const $t=Tt*cu(Tt);Dt.y=Math.abs($t)<Math.abs(Tt)?$t:Tt}}else if(l(C)==="x"&&(Rt.includes("left")||Rt.includes("right")))if(Rt.includes("left")&&Ft<0||Rt.includes("right")&&Ft>0)Dt.x=Ft;else{const $t=Ft*cu(Ft);Dt.x=Math.abs($t)<Math.abs(Ft)?$t:Ft}(Math.abs(Dt.x)>0||Math.abs(Dt.y)>0)&&v(f,!0),l(S)?.style.setProperty("--swipe-amount-x",`${Dt.x}px`),l(S)?.style.setProperty("--swipe-amount-y",`${Dt.y}px`)},Ge=()=>{v(p,!1),v(C,null),K=null},dr=y(()=>t.toast.icon?t.toast.icon:l(O)==="success"?t.successIcon:l(O)==="error"?t.errorIcon:l(O)==="warning"?t.warningIcon:l(O)==="info"?t.infoIcon:l(O)==="loading"?t.loadingIcon:null);var ct=y0();_t(ct,"tabindex",0);let mn;var Di=Y(ct);{var oc=ut=>{var mt=f0(),Tt=Y(mt);M(Tt,()=>t.closeIcon??L),U(mt),Jt(Ft=>{_t(mt,"aria-label",t.closeButtonAriaLabel),_t(mt,"data-disabled",l(Z)),Fe(mt,1,Ft)},[()=>Ne(Je(l($)?.closeButton,t.toast?.classes?.closeButton))]),$r("click",mt,()=>{l(Z)||!l(I)||(tt(),t.toast.onDismiss?.(t.toast))}),x(ut,mt)};N(Di,ut=>{l(X)&&!t.toast.component&&l(O)!=="loading"&&t.closeIcon!==null&&ut(oc)})}var jo=ae(Di,2);{var qo=ut=>{const mt=y(()=>t.toast.component);var Tt=A(),Ft=P(Tt);Mr(Ft,()=>l(mt),(Rt,Dt)=>{Dt(Rt,bt(()=>t.toast.componentProps,{closeToast:tt}))}),x(ut,Tt)},Xo=ut=>{var mt=b0(),Tt=P(mt);{var Ft=Ct=>{var At=g0(),ot=Y(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);{var Yt=Er=>{var Ei=A(),Zo=P(Ei);Mr(Zo,()=>t.toast.icon,(te,re)=>{re(te,{})}),x(Er,Ei)},ke=Er=>{r(Er)};N(se,Er=>{t.toast.icon?Er(Yt):Er(ke,-1)})}x(yt,Pt)};N(ot,yt=>{(t.toast.promise||l(O)==="loading")&&yt(Lt)})}var Xt=ae(ot,2);{var Ht=yt=>{var Pt=A(),se=P(Pt);{var Yt=te=>{var re=A(),fr=P(re);Mr(fr,()=>t.toast.icon,(Jd,Qd)=>{Qd(Jd,{})}),x(te,re)},ke=te=>{var re=A(),fr=P(re);M(fr,()=>t.successIcon??L),x(te,re)},Er=te=>{var re=A(),fr=P(re);M(fr,()=>t.errorIcon??L),x(te,re)},Ei=te=>{var re=A(),fr=P(re);M(fr,()=>t.warningIcon??L),x(te,re)},Zo=te=>{var re=A(),fr=P(re);M(fr,()=>t.infoIcon??L),x(te,re)};N(se,te=>{t.toast.icon?te(Yt):l(O)==="success"?te(ke,1):l(O)==="error"?te(Er,2):l(O)==="warning"?te(Ei,3):l(O)==="info"&&te(Zo,4)})}x(yt,Pt)};N(Xt,yt=>{t.toast.type!=="loading"&&yt(Ht)})}U(At),Jt(yt=>Fe(At,1,yt),[()=>Ne(Je(l($)?.icon,t.toast?.classes?.icon))]),x(Ct,At)};N(Tt,Ct=>{(l(O)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(l(dr)!==null||t.toast.icon)&&Ct(Ft)})}var Rt=ae(Tt,2),Dt=Y(Rt),$t=Y(Dt);{var Gr=Ct=>{var At=A(),ot=P(At);{var Lt=Ht=>{const yt=y(()=>t.toast.title);var Pt=A(),se=P(Pt);Mr(se,()=>l(yt),(Yt,ke)=>{ke(Yt,bt(()=>t.toast.componentProps))}),x(Ht,Pt)},Xt=Ht=>{var yt=Is();Jt(()=>nn(yt,t.toast.title)),x(Ht,yt)};N(ot,Ht=>{typeof t.toast.title!="string"?Ht(Lt):Ht(Xt,-1)})}x(Ct,At)};N($t,Ct=>{t.toast.title&&Ct(Gr)})}U(Dt);var Yn=ae(Dt,2);{var Go=Ct=>{var At=p0(),ot=Y(At);{var Lt=Ht=>{const yt=y(()=>t.toast.description);var Pt=A(),se=P(Pt);Mr(se,()=>l(yt),(Yt,ke)=>{ke(Yt,bt(()=>t.toast.componentProps))}),x(Ht,Pt)},Xt=Ht=>{var yt=Is();Jt(()=>nn(yt,t.toast.description)),x(Ht,yt)};N(ot,Ht=>{typeof t.toast.description!="string"?Ht(Lt):Ht(Xt,-1)})}U(At),Jt(Ht=>Fe(At,1,Ht),[()=>Ne(Je(o(),l(z),l($)?.description,t.toast.classes?.description))]),x(Ct,At)};N(Yn,Ct=>{t.toast.description&&Ct(Go)})}U(Rt);var Oi=ae(Rt,2);{var Ie=Ct=>{var At=A(),ot=P(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);Mr(se,()=>t.toast.cancel,(Yt,ke)=>{ke(Yt,{})}),x(yt,Pt)},Xt=yt=>{var Pt=v0(),se=Y(Pt,!0);U(Pt),Jt(Yt=>{Ki(Pt,t.toast.cancelButtonStyle??n()),Fe(Pt,1,Yt),nn(se,t.toast.cancel.label)},[()=>Ne(Je(l($)?.cancelButton,t.toast?.classes?.cancelButton))]),$r("click",Pt,Yt=>{Vi(t.toast.cancel)&&l(I)&&(t.toast.cancel?.onClick?.(Yt),tt())}),x(yt,Pt)},Ht=y(()=>Vi(t.toast.cancel));N(ot,yt=>{typeof t.toast.cancel=="function"?yt(Lt):l(Ht)&&yt(Xt,1)})}x(Ct,At)};N(Oi,Ct=>{t.toast.cancel&&Ct(Ie)})}var ee=ae(Oi,2);{var Me=Ct=>{var At=A(),ot=P(At);{var Lt=yt=>{var Pt=A(),se=P(Pt);Mr(se,()=>t.toast.action,(Yt,ke)=>{ke(Yt,{})}),x(yt,Pt)},Xt=yt=>{var Pt=m0(),se=Y(Pt,!0);U(Pt),Jt(Yt=>{Ki(Pt,t.toast.actionButtonStyle??i()),Fe(Pt,1,Yt),nn(se,t.toast.action.label)},[()=>Ne(Je(l($)?.actionButton,t.toast?.classes?.actionButton))]),$r("click",Pt,Yt=>{Vi(t.toast.action)&&(t.toast.action?.onClick(Yt),!Yt.defaultPrevented&&tt())}),x(yt,Pt)},Ht=y(()=>Vi(t.toast.action));N(ot,yt=>{typeof t.toast.action=="function"?yt(Lt):l(Ht)&&yt(Xt,1)})}x(Ct,At)};N(ee,Ct=>{t.toast.action&&Ct(Me)})}Jt((Ct,At)=>{Fe(Rt,1,Ct),Fe(Dt,1,At)},[()=>Ne(Je(l($)?.content,t.toast?.classes?.content)),()=>Ne(Je(l($)?.title,t.toast?.classes?.title))]),x(ut,mt)};N(jo,ut=>{t.toast.component?ut(qo):ut(Xo,-1)})}U(ct),_h(ct,ut=>v(S,ut),()=>l(S)),Jt((ut,mt,Tt)=>{Fe(ct,1,ut),_t(ct,"aria-live",t.toast.important?"assertive":"polite"),_t(ct,"data-rich-colors",t.toast.richColors??a()),_t(ct,"data-styled",!(t.toast.component||t.toast.unstyled||s())),_t(ct,"data-mounted",l(u)),_t(ct,"data-promise",mt),_t(ct,"data-swiped",l(f)),_t(ct,"data-removed",l(d)),_t(ct,"data-visible",l(k)),_t(ct,"data-y-position",l(Q)[0]),_t(ct,"data-x-position",l(Q)[1]),_t(ct,"data-index",t.index),_t(ct,"data-front",l(D)),_t(ct,"data-swiping",l(p)),_t(ct,"data-dismissible",l(I)),_t(ct,"data-type",l(O)),_t(ct,"data-invert",l(vt)),_t(ct,"data-swipe-out",l(h)),_t(ct,"data-swipe-direction",l(T)),_t(ct,"data-expanded",Tt),mn=Ki(ct,`${t.style} ${t.toast.style}`,mn,{"--index":t.index,"--toasts-before":t.index,"--z-index":Ot.toasts.length-t.index,"--offset":`${l(d)?l(g):l(vn)}px`,"--initial-height":t.expandByDefault?"auto":`${l(b)}px`})},[()=>Ne(Je(t.class,l(F),l($)?.toast,t.toast?.classes?.toast,l($)?.[l(O)],t.toast?.classes?.[l(O)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&l(u))]),$r("pointermove",ct,Ai),$r("pointerup",ct,ic),$r("pointerdown",ct,Ko),bg("dragend",ct,Ge),x(e,ct),V()}lh(["pointermove","pointerup","pointerdown","click"]);var _0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function S0(e){var t=_0();x(e,t)}var x0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function C0(e){var t=x0();x(e,t)}var P0=Vn('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function T0(e){var t=P0();x(e,t)}var A0=Vn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function D0(e){var t=A0();x(e,t)}var O0=Vn('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function E0(e){var t=O0();x(e,t)}const I0=3,Gd="24px",Zd="16px",M0=4e3,k0=356,N0=14,ys="dark",Hi="light";function F0(e,t){const r={};return[e,t].forEach((n,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",a=o?Zd:Gd;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{const d=n[u];d===void 0?r[`${s}-${u}`]=a:r[`${s}-${u}`]=typeof d=="number"?`${d}px`:d}):c(a)}),r}var R0=W("<ol></ol>"),L0=W('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-6val4n"><!></section>');function l_(e,t){B(t,!0);function r(tt){return tt!=="system"?tt:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ys:Hi}let n=m(t,"invert",3,!1),i=m(t,"position",3,"bottom-right"),o=m(t,"hotkey",19,()=>["altKey","KeyT"]),s=m(t,"expand",3,!1),a=m(t,"closeButton",3,!1),c=m(t,"offset",3,Gd),u=m(t,"mobileOffset",3,Zd),d=m(t,"theme",3,"light"),p=m(t,"richColors",3,!1),h=m(t,"duration",3,M0),f=m(t,"visibleToasts",3,I0),g=m(t,"toastOptions",19,()=>({})),b=m(t,"dir",7,"auto"),w=m(t,"gap",3,N0),S=m(t,"pauseWhenPageIsHidden",3,!1),C=m(t,"containerAriaLabel",3,"Notifications"),T=m(t,"closeButtonAriaLabel",3,"Close toast"),D=G(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function k(){if(b()!=="auto")return b();if(typeof window>"u"||typeof document>"u")return"ltr";const tt=document.documentElement.getAttribute("dir");return tt==="auto"||!tt?(Et(()=>b(window.getComputedStyle(document.documentElement).direction??"ltr")),b()):(Et(()=>b(tt)),tt)}const O=y(()=>Array.from(new Set([i(),...Ot.toasts.filter(tt=>tt.position).map(tt=>tt.position)].filter(Boolean))));let I=E(!1),F=E(!1),z=E(Zt(r(d()))),R=E(void 0),X=E(null),H=E(!1);const K=y(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));nt(()=>{Ot.toasts.length<=1&&v(I,!1)}),nt(()=>{const tt=Ot.toasts.filter(zt=>zt.dismiss&&!zt.delete);if(tt.length>0){const zt=Ot.toasts.map(qe=>tt.find(Xr=>Xr.id===qe.id)?{...qe,delete:!0}:qe);Ot.toasts=zt}}),nt(()=>()=>{l(R)&&l(X)&&(l(X).focus({preventScroll:!0}),v(X,null),v(H,!1))}),pi(()=>(Ot.reset(),St(document,"keydown",zt=>{o().every(Xe=>zt[Xe]||zt.code===Xe)&&(v(I,!0),l(R)?.focus()),zt.code==="Escape"&&(document.activeElement===l(R)||l(R)?.contains(document.activeElement))&&v(I,!1)}))),nt(()=>{if(d()!=="system"&&v(z,d()),typeof window<"u"){d()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v(z,ys):v(z,Hi));const tt=window.matchMedia("(prefers-color-scheme: dark)"),zt=({matches:qe})=>{d()==="system"&&v(z,qe?ys:Hi,!0)};"addEventListener"in tt?tt.addEventListener("change",zt):tt.addListener(zt)}});const Q=tt=>{t.onblur?.(tt),l(H)&&!tt.currentTarget.contains(tt.relatedTarget)&&(v(H,!1),l(X)&&(l(X).focus({preventScroll:!0}),v(X,null)))},ht=tt=>{t.onfocus?.(tt),!(tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false")&&(l(H)||(v(H,!0),v(X,tt.relatedTarget,!0)))},xt=tt=>{t.onpointerdown?.(tt),!(tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false")&&v(F,!0)},vt=tt=>{t.onmouseenter?.(tt),v(I,!0)},Z=tt=>{t.onmouseleave?.(tt),l(F)||v(I,!1)},$=tt=>{t.onmousemove?.(tt),v(I,!0)},gt=tt=>{t.ondragend?.(tt),v(I,!1)},It=tt=>{t.onpointerup?.(tt),v(F,!1)};$w.set(new n0);var kt=L0();_t(kt,"tabindex",-1);var Ut=Y(kt);{var vn=tt=>{var zt=A(),qe=P(zt);En(qe,18,()=>l(O),Xe=>Xe,(Xe,Xr,Ko,ic)=>{const Ai=y(()=>{const[ct,mn]=Xr.split("-");return{y:ct,x:mn}}),Ge=y(()=>F0(c(),u()));var dr=R0();J(dr,ct=>({tabindex:-1,dir:ct,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":l(z),"data-y-position":l(Ai).y,"data-x-position":l(Ai).x,style:t.style,onblur:Q,onfocus:ht,onmouseenter:vt,onmousemove:$,onmouseleave:Z,ondragend:gt,onpointerdown:xt,onpointerup:It,...D,[wn]:{"--front-toast-height":`${Ot.heights[0]?.height}px`,"--width":`${k0}px`,"--gap":`${w()}px`,"--offset-top":l(Ge)["--offset-top"],"--offset-right":l(Ge)["--offset-right"],"--offset-bottom":l(Ge)["--offset-bottom"],"--offset-left":l(Ge)["--offset-left"],"--mobile-offset-top":l(Ge)["--mobile-offset-top"],"--mobile-offset-right":l(Ge)["--mobile-offset-right"],"--mobile-offset-bottom":l(Ge)["--mobile-offset-bottom"],"--mobile-offset-left":l(Ge)["--mobile-offset-left"]}}),[()=>k()],void 0,void 0,"svelte-6val4n"),En(dr,23,()=>Ot.toasts.filter(ct=>!ct.position&&l(Ko)===0||ct.position===Xr),ct=>ct.id,(ct,mn,Di,oc)=>{{const jo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.successIcon??L),x(ot,Lt)},At=ot=>{S0(ot)};N(Me,ot=>{t.successIcon?ot(Ct):t.successIcon!==null&&ot(At,1)})}x(Ie,ee)},qo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.errorIcon??L),x(ot,Lt)},At=ot=>{C0(ot)};N(Me,ot=>{t.errorIcon?ot(Ct):t.errorIcon!==null&&ot(At,1)})}x(Ie,ee)},Xo=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.warningIcon??L),x(ot,Lt)},At=ot=>{T0(ot)};N(Me,ot=>{t.warningIcon?ot(Ct):t.warningIcon!==null&&ot(At,1)})}x(Ie,ee)},ut=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.infoIcon??L),x(ot,Lt)},At=ot=>{D0(ot)};N(Me,ot=>{t.infoIcon?ot(Ct):t.infoIcon!==null&&ot(At,1)})}x(Ie,ee)},mt=Ie=>{var ee=A(),Me=P(ee);{var Ct=ot=>{var Lt=A(),Xt=P(Lt);M(Xt,()=>t.closeIcon??L),x(ot,Lt)},At=ot=>{E0(ot)};N(Me,ot=>{t.closeIcon?ot(Ct):t.closeIcon!==null&&ot(At,1)})}x(Ie,ee)};let Tt=y(()=>g()?.duration??h()),Ft=y(()=>g()?.class??""),Rt=y(()=>g()?.descriptionClass||""),Dt=y(()=>g()?.style??""),$t=y(()=>g().classes||{}),Gr=y(()=>g().unstyled??!1),Yn=y(()=>g()?.cancelButtonStyle??""),Go=y(()=>g()?.actionButtonStyle??""),Oi=y(()=>g()?.closeButtonAriaLabel??T());w0(ct,{get index(){return l(Di)},get toast(){return l(mn)},get defaultRichColors(){return p()},get duration(){return l(Tt)},get class(){return l(Ft)},get descriptionClass(){return l(Rt)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return a()},get interacting(){return l(F)},get position(){return Xr},get style(){return l(Dt)},get classes(){return l($t)},get unstyled(){return l(Gr)},get cancelButtonStyle(){return l(Yn)},get actionButtonStyle(){return l(Go)},get closeButtonAriaLabel(){return l(Oi)},get expandByDefault(){return s()},get expanded(){return l(I)},get pauseWhenPageIsHidden(){return S()},get loadingIcon(){return t.loadingIcon},successIcon:jo,errorIcon:qo,warningIcon:Xo,infoIcon:ut,closeIcon:mt,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),U(dr),_h(dr,ct=>v(R,ct),()=>l(R)),Jt(()=>dr.dir=dr.dir),x(Xe,dr)}),x(tt,zt)};N(Ut,tt=>{Ot.toasts.length>0&&tt(vn)})}U(kt),Jt(()=>_t(kt,"aria-label",`${C()??""} ${l(K)??""}`)),x(e,kt),V()}export{dc as $,En as A,Fe as B,T1 as C,_t as D,J as E,_h as F,Q1 as G,U0 as H,zg as I,e1 as J,j0 as K,U1 as L,G0 as M,bg as N,$r as O,lh as P,nt as Q,Ne as R,J1 as S,K0 as T,ih as U,j1 as V,q1 as W,K1 as X,X1 as Y,Y1 as Z,D1 as _,M as a,s_ as a$,O1 as a0,A1 as a1,q0 as a2,Ln as a3,n1 as a4,c1 as a5,R1 as a6,L1 as a7,z1 as a8,Ki as a9,v1 as aA,b1 as aB,w1 as aC,p1 as aD,y1 as aE,_1 as aF,x1 as aG,C1 as aH,Sh as aI,r1 as aJ,sa as aK,Et as aL,i1 as aM,vh as aN,Ji as aO,t_ as aP,e_ as aQ,$1 as aR,Fs as aS,Y0 as aT,t1 as aU,o1 as aV,Xi as aW,Cu as aX,Yi as aY,n_ as aZ,o_ as a_,J0 as aa,Hg as ab,$0 as ac,Q0 as ad,B0 as ae,Vn as af,E1 as ag,Wr as ah,Fr as ai,W0 as aj,N1 as ak,F1 as al,I1 as am,k1 as an,M1 as ao,Z1 as ap,G1 as aq,B1 as ar,S1 as as,pa as at,P1 as au,f1 as av,d1 as aw,Ze as ax,m1 as ay,g1 as az,x as b,i_ as b0,r_ as b1,q as b2,u1 as b3,W1 as b4,H1 as b5,h1 as b6,l1 as b7,V1 as b8,Cg as b9,X0 as ba,hi as bb,St as bc,eg as bd,l_ as be,a_ as bf,Z0 as bg,Bn as bh,Jf as bi,H0 as bj,z0 as bk,A as c,V as d,Zt as e,P as f,m as g,Mr as h,l as i,Y as j,N as k,U as l,W as m,L as n,E as o,B as p,pi as q,G as r,bt as s,ae as t,y as u,v,Mf as w,Is as x,Jt as y,nn as z};