studiograph 1.3.42 → 1.3.44-next.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 (72) hide show
  1. package/dist/core/graph.d.ts +5 -0
  2. package/dist/core/graph.js +93 -2
  3. package/dist/core/graph.js.map +1 -1
  4. package/dist/core/validation.d.ts +189 -119
  5. package/dist/core/validation.js +16 -26
  6. package/dist/core/validation.js.map +1 -1
  7. package/dist/server/routes/graph-api.js +41 -0
  8. package/dist/server/routes/graph-api.js.map +1 -1
  9. package/dist/web/_app/immutable/assets/2.DNpjFx0k.css +1 -0
  10. package/dist/web/_app/immutable/assets/4.CjSyz-ka.css +1 -0
  11. package/dist/web/_app/immutable/chunks/{BnPh5q8z.js → 3ONneP0Z.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/8aEH9o48.js +1 -0
  13. package/dist/web/_app/immutable/chunks/B3cbqYdb.js +1 -0
  14. package/dist/web/_app/immutable/chunks/BBDMeJL4.js +1 -0
  15. package/dist/web/_app/immutable/chunks/{l5w7mUkV.js → BMrbs3EC.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/{DD0eH0_A.js → BQZlAX3A.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/BmP3yl81.js +1 -0
  18. package/dist/web/_app/immutable/chunks/{1vztr6_A.js → Bt7P6UBm.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/C8IfoK2g.js +1 -0
  20. package/dist/web/_app/immutable/chunks/{DlkslpnI.js → C8t_lVji.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/CClliU_-.js +4 -0
  22. package/dist/web/_app/immutable/chunks/{KCOVknl_.js → CDs3H3KT.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{FmR2V1-h.js → CRbsz2jz.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{CYMV9O2_.js → CWmHQEyb.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{D9BdHkd3.js → CpAdcarq.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/CpXgbTWt.js +1 -0
  27. package/dist/web/_app/immutable/chunks/{Brxs8A3C.js → DYpjUIN_.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{Dr5ZUnae.js → Ddpk8P2X.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{DSZYl5ah.js → Dtbtl5su.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/DvqvTNdq.js +1 -0
  31. package/dist/web/_app/immutable/chunks/{BUMhcVI4.js → Dx6YFABE.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/{DmLcKvmV.js → Iwcm6r7d.js} +1 -1
  33. package/dist/web/_app/immutable/chunks/{rcG0Y_x7.js → QOJagAiA.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/Zf7H0ZZc.js +5 -0
  35. package/dist/web/_app/immutable/chunks/{HzJbEnio.js → qvfhHbjx.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{DfwW1gF2.js → yEDUbZbk.js} +2 -2
  37. package/dist/web/_app/immutable/entry/app.oDy7ig5b.js +2 -0
  38. package/dist/web/_app/immutable/entry/start.Cz7A2G8_.js +1 -0
  39. package/dist/web/_app/immutable/nodes/0.BuWS-_Tw.js +2 -0
  40. package/dist/web/_app/immutable/nodes/{1.CUZf-oFi.js → 1.ClV7Vf9J.js} +1 -1
  41. package/dist/web/_app/immutable/nodes/2.Dg3m027a.js +84 -0
  42. package/dist/web/_app/immutable/nodes/{3.CywCCe9F.js → 3.9iNkY9mM.js} +1 -1
  43. package/dist/web/_app/immutable/nodes/4.UG11YFmx.js +11 -0
  44. package/dist/web/_app/immutable/nodes/{5.BG_fz1Pc.js → 5.BZZysw6z.js} +2 -2
  45. package/dist/web/_app/immutable/nodes/6.LCPXZT0S.js +2 -0
  46. package/dist/web/_app/immutable/nodes/7.kgjplPpk.js +2 -0
  47. package/dist/web/_app/immutable/nodes/{8.B2uOoOa7.js → 8.CZ7vB_Pl.js} +1 -1
  48. package/dist/web/_app/immutable/nodes/{9.jU4WCAQj.js → 9.DlSjDUl0.js} +1 -1
  49. package/dist/web/_app/version.json +1 -1
  50. package/dist/web/index.html +12 -12
  51. package/package.json +1 -1
  52. package/dist/web/_app/immutable/assets/2.DtDUN2Ae.css +0 -1
  53. package/dist/web/_app/immutable/assets/4.C3fKtWtl.css +0 -1
  54. package/dist/web/_app/immutable/chunks/B2LOVFFz.js +0 -1
  55. package/dist/web/_app/immutable/chunks/BKAD6OjK.js +0 -1
  56. package/dist/web/_app/immutable/chunks/CA7sXyoK.js +0 -1
  57. package/dist/web/_app/immutable/chunks/CgcfyvoD.js +0 -1
  58. package/dist/web/_app/immutable/chunks/D91YXE6T.js +0 -1
  59. package/dist/web/_app/immutable/chunks/DVyuW48M.js +0 -1
  60. package/dist/web/_app/immutable/chunks/Dty7t9WP.js +0 -4
  61. package/dist/web/_app/immutable/chunks/SAMwKg4j.js +0 -5
  62. package/dist/web/_app/immutable/chunks/Y2eppfkg.js +0 -1
  63. package/dist/web/_app/immutable/chunks/qeyyXhHO.js +0 -1
  64. package/dist/web/_app/immutable/chunks/yMbbhP0p.js +0 -1
  65. package/dist/web/_app/immutable/entry/app.CUfCyEld.js +0 -2
  66. package/dist/web/_app/immutable/entry/start.aufF8xaf.js +0 -1
  67. package/dist/web/_app/immutable/nodes/0.C-CmG3eF.js +0 -2
  68. package/dist/web/_app/immutable/nodes/2.BuPKoNE3.js +0 -84
  69. package/dist/web/_app/immutable/nodes/4.BXLn5nFI.js +0 -11
  70. package/dist/web/_app/immutable/nodes/6.s5GRZINE.js +0 -2
  71. package/dist/web/_app/immutable/nodes/7.C24TRVUy.js +0 -2
  72. /package/dist/web/_app/immutable/assets/{dialog-close.FS8bdfxr.css → Copy.FS8bdfxr.css} +0 -0
@@ -1 +1 @@
1
- import{O as k,T as u,P as g,u as _,B as v,z as A,h as l,q as T,ay as m,F as E,e as S,f as w,E as R,i as F,H as M,w as B,j as D,k as N,o as b,az as O,a2 as x,a1 as H,U as I,at as Y}from"./yMbbhP0p.js";class q{anchor;#e=new Map;#t=new Map;#s=new Map;#a=new Set;#i=!0;constructor(s,t=!0){this.anchor=s,this.#i=t}#r=s=>{if(this.#e.has(s)){var t=this.#e.get(s),a=this.#t.get(t);if(a)k(a),this.#a.delete(t);else{var i=this.#s.get(t);i&&(this.#t.set(t,i.effect),this.#s.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),a=i.effect)}for(const[e,f]of this.#e){if(this.#e.delete(e),e===s)break;const r=this.#s.get(f);r&&(u(r.effect),this.#s.delete(f))}for(const[e,f]of this.#t){if(e===t||this.#a.has(e))continue;const r=()=>{if(Array.from(this.#e.values()).includes(e)){var c=document.createDocumentFragment();m(f,c),c.append(_()),this.#s.set(e,{effect:f,fragment:c})}else u(f);this.#a.delete(e),this.#t.delete(e)};this.#i||!a?(this.#a.add(e),g(f,r,!1)):r()}}};#f=s=>{this.#e.delete(s);const t=Array.from(this.#e.values());for(const[a,i]of this.#s)t.includes(a)||(u(i.effect),this.#s.delete(a))};ensure(s,t){var a=A,i=E();if(t&&!this.#t.has(s)&&!this.#s.has(s))if(i){var e=document.createDocumentFragment(),f=_();e.append(f),this.#s.set(s,{effect:v(()=>t(f)),fragment:e})}else this.#t.set(s,v(()=>t(this.anchor)));if(this.#e.set(a,s),i){for(const[r,h]of this.#t)r===s?a.unskip_effect(h):a.skip_effect(h);for(const[r,h]of this.#s)r===s?a.unskip_effect(h.effect):a.skip_effect(h.effect);a.oncommit(this.#r),a.ondiscard(this.#f)}else l&&(this.anchor=T),this.#r(a)}}function C(n,s,t=!1){var a;l&&(a=T,w());var i=new q(n),e=t?R:0;function f(r,h){if(l){var c=F(a),o;if(c===M?o=0:c===B?o=!1:o=parseInt(c.substring(1)),r!==o){var d=D();N(d),i.anchor=d,b(!1),i.ensure(r,h),b(!0);return}}i.ensure(r,h)}S(()=>{var r=!1;s((h,c=0)=>{r=!0,f(c,h)}),r||f(!1,null)},e)}function p(n,s){return n===s||n?.[Y]===s}function L(n={},s,t,a){return O(()=>{var i,e;return x(()=>{i=e,e=[],H(()=>{n!==t(...e)&&(s(n,...e),i&&p(t(...i),n)&&s(null,...i))})}),()=>{I(()=>{e&&p(t(...e),n)&&s(null,...e)})}}),n}export{q as B,L as b,C as i};
1
+ import{O as k,T as u,P as g,u as _,B as v,z as A,h as l,q as T,aD as m,F as E,e as S,f as w,E as R,i as D,H as F,w as M,j as x,k as B,o as b,aE as N,a2 as O,a1 as H,U as I,ax as Y}from"./BBDMeJL4.js";class q{anchor;#e=new Map;#t=new Map;#s=new Map;#a=new Set;#i=!0;constructor(s,t=!0){this.anchor=s,this.#i=t}#r=s=>{if(this.#e.has(s)){var t=this.#e.get(s),a=this.#t.get(t);if(a)k(a),this.#a.delete(t);else{var i=this.#s.get(t);i&&(this.#t.set(t,i.effect),this.#s.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),a=i.effect)}for(const[e,f]of this.#e){if(this.#e.delete(e),e===s)break;const r=this.#s.get(f);r&&(u(r.effect),this.#s.delete(f))}for(const[e,f]of this.#t){if(e===t||this.#a.has(e))continue;const r=()=>{if(Array.from(this.#e.values()).includes(e)){var c=document.createDocumentFragment();m(f,c),c.append(_()),this.#s.set(e,{effect:f,fragment:c})}else u(f);this.#a.delete(e),this.#t.delete(e)};this.#i||!a?(this.#a.add(e),g(f,r,!1)):r()}}};#f=s=>{this.#e.delete(s);const t=Array.from(this.#e.values());for(const[a,i]of this.#s)t.includes(a)||(u(i.effect),this.#s.delete(a))};ensure(s,t){var a=A,i=E();if(t&&!this.#t.has(s)&&!this.#s.has(s))if(i){var e=document.createDocumentFragment(),f=_();e.append(f),this.#s.set(s,{effect:v(()=>t(f)),fragment:e})}else this.#t.set(s,v(()=>t(this.anchor)));if(this.#e.set(a,s),i){for(const[r,h]of this.#t)r===s?a.unskip_effect(h):a.skip_effect(h);for(const[r,h]of this.#s)r===s?a.unskip_effect(h.effect):a.skip_effect(h.effect);a.oncommit(this.#r),a.ondiscard(this.#f)}else l&&(this.anchor=T),this.#r(a)}}function L(n,s,t=!1){var a;l&&(a=T,w());var i=new q(n),e=t?R:0;function f(r,h){if(l){var c=D(a),o;if(c===F?o=0:c===M?o=!1:o=parseInt(c.substring(1)),r!==o){var d=x();B(d),i.anchor=d,b(!1),i.ensure(r,h),b(!0);return}}i.ensure(r,h)}S(()=>{var r=!1;s((h,c=0)=>{r=!0,f(c,h)}),r||f(!1,null)},e)}function p(n,s){return n===s||n?.[Y]===s}function P(n={},s,t,a){return N(()=>{var i,e;return O(()=>{i=e,e=[],H(()=>{n!==t(...e)&&(s(n,...e),i&&p(t(...i),n)&&s(null,...i))})}),()=>{I(()=>{e&&p(t(...e),n)&&s(null,...e)})}}),n}export{q as B,P as b,L as i};
@@ -0,0 +1 @@
1
+ import{a as d,s as J,f as de,p as ce,g as O,b as V,t as oe}from"./yEDUbZbk.js";import{i as be}from"./Ddpk8P2X.js";import{p as Z,l as se,s as ae,d as $,g as l,a as Pe,c as L,n as Q,r as K,b as Y,m as le,t as X,a4 as x,ah as re,ae as z,Y as ye,ag as we,a5 as ve}from"./BBDMeJL4.js";import{i as B}from"./Dtbtl5su.js";import{a as D,s as H}from"./BMrbs3EC.js";import{l as ie,p as i,r as ue,s as _e}from"./CpXgbTWt.js";import{c as fe,n as ee,M as Me,b as C,m as te,a as Ce,d as Se,e as xe,F as Ae,f as Oe,P as Fe,g as Ie,h as he,D as Re,i as ke,j as Ee,A as ze,k as Le,l as Ke,o as He,p as Te,q as Ue,r as De,s as je}from"./Zf7H0ZZc.js";import{r as pe}from"./CRbsz2jz.js";import{c as j}from"./CDs3H3KT.js";import{b as me}from"./DYpjUIN_.js";var Be=de("<title> </title>"),Ve=de('<svg><!><path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>');function _t(u,e){const o=ie(e,["children","$$slots","$$events","$$legacy"]),h=ie(o,["size","title"]);Z(e,!1);const f=le(),p=le();let b=i(e,"size",8,16),g=i(e,"title",8,void 0);se(()=>($(o),$(g())),()=>{ae(f,o["aria-label"]||o["aria-labelledby"]||g())}),se(()=>(l(f),$(o)),()=>{ae(p,{"aria-hidden":l(f)?void 0:!0,role:l(f)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Pe(),be();var c=Ve();D(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:b(),height:b(),...l(p),...h}));var w=L(c);{var v=P=>{var n=Be(),t=L(n,!0);K(n),X(()=>J(t,g())),d(P,n)};B(w,P=>{g()&&P(v)})}Q(),K(c),d(u,c),Y()}var Ze=V("<div><!></div>");function Ye(u,e){const o=ce();Z(e,!0);let h=i(e,"ref",15,null),f=i(e,"id",19,()=>fe(o)),p=i(e,"disabled",3,!1),b=i(e,"onSelect",3,ee),g=i(e,"closeOnSelect",3,!0),c=ue(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const w=Me.create({id:C(()=>f()),disabled:C(()=>p()),onSelect:C(()=>b()),ref:C(()=>h(),r=>h(r)),closeOnSelect:C(()=>g())}),v=z(()=>te(c,w.props));var P=O(),n=x(P);{var t=r=>{var s=O(),y=x(s);H(y,()=>e.child,()=>({props:l(v)})),d(r,s)},a=r=>{var s=Ze();D(s,()=>({...l(v)}));var y=L(s);H(y,()=>e.children??re),K(s),d(r,s)};B(n,r=>{e.child?r(t):r(a,!1)})}d(u,P),Y()}var Ne=V("<div><!></div>");function We(u,e){const o=ce();Z(e,!0);let h=i(e,"ref",15,null),f=i(e,"id",19,()=>fe(o)),p=ue(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const b=Ce.create({id:C(()=>f()),ref:C(()=>h(),n=>h(n))}),g=z(()=>te(p,b.props));var c=O(),w=x(c);{var v=n=>{var t=O(),a=x(t);H(a,()=>e.child,()=>({props:l(g)})),d(n,t)},P=n=>{var t=Ne();D(t,()=>({...l(g)}));var a=L(t);H(a,()=>e.children??re),K(t),d(n,t)};B(w,n=>{e.child?n(v):n(P,!1)})}d(u,c),Y()}function qe(u,e){Z(e,!0);let o=i(e,"open",15,!1),h=i(e,"dir",3,"ltr"),f=i(e,"onOpenChange",3,ee),p=i(e,"onOpenChangeComplete",3,ee),b=i(e,"_internal_variant",3,"dropdown-menu");const g=Se.create({variant:C(()=>b()),dir:C(()=>h()),onClose:()=>{o(!1),f()(!1)}});xe.create({open:C(()=>o(),c=>{o(c),f()(c)}),onOpenChangeComplete:C(()=>p())},g),Ae(u,{children:(c,w)=>{var v=O(),P=x(v);H(P,()=>e.children??re),d(c,v)},$$slots:{default:!0}}),Y()}var Ge=V("<div><div><!></div></div>"),Je=V("<div><div><!></div></div>");function Qe(u,e){const o=ce();Z(e,!0);let h=i(e,"id",19,()=>fe(o)),f=i(e,"ref",15,null),p=i(e,"loop",3,!0),b=i(e,"onInteractOutside",3,ee),g=i(e,"onEscapeKeydown",3,ee),c=i(e,"onCloseAutoFocus",3,ee),w=i(e,"forceMount",3,!1),v=i(e,"trapFocus",3,!1),P=ue(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const n=Oe.create({id:C(()=>h()),loop:C(()=>p()),ref:C(()=>f(),m=>f(m)),onCloseAutoFocus:C(()=>c())}),t=z(()=>te(P,n.props));function a(m){if(n.handleInteractOutside(m),!m.defaultPrevented&&(b()(m),!m.defaultPrevented)){if(m.target&&m.target instanceof Element){const N=`[${n.parentMenu.root.getBitsAttr("sub-content")}]`;if(m.target.closest(N))return}n.parentMenu.onClose()}}function r(m){g()(m),!m.defaultPrevented&&n.parentMenu.onClose()}var s=O(),y=x(s);{var A=m=>{Fe(m,_e(()=>l(t),()=>n.popperProps,{get ref(){return n.opts.ref},get enabled(){return n.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:r,get trapFocus(){return v()},get loop(){return p()},forceMount:!0,get id(){return h()},get shouldRender(){return n.shouldRender},popper:(W,T)=>{let ne=()=>T?.().props,F=()=>T?.().wrapperProps;const I=z(()=>te(ne(),{style:he("dropdown-menu")},{style:e.style}));var U=O(),R=x(U);{var k=M=>{var _=O(),S=x(_);{let q=z(()=>({props:l(I),wrapperProps:F(),...n.snippetProps}));H(S,()=>e.child,()=>l(q))}d(M,_)},E=M=>{var _=Ge();D(_,()=>({...F()}));var S=L(_);D(S,()=>({...l(I)}));var q=L(S);H(q,()=>e.children??re),K(S),K(_),d(M,_)};B(R,M=>{e.child?M(k):M(E,!1)})}d(W,U)},$$slots:{popper:!0}}))},G=m=>{Ie(m,_e(()=>l(t),()=>n.popperProps,{get ref(){return n.opts.ref},get open(){return n.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:r,get trapFocus(){return v()},get loop(){return p()},forceMount:!1,get id(){return h()},get shouldRender(){return n.shouldRender},popper:(W,T)=>{let ne=()=>T?.().props,F=()=>T?.().wrapperProps;const I=z(()=>te(ne(),{style:he("dropdown-menu")},{style:e.style}));var U=O(),R=x(U);{var k=M=>{var _=O(),S=x(_);{let q=z(()=>({props:l(I),wrapperProps:F(),...n.snippetProps}));H(S,()=>e.child,()=>l(q))}d(M,_)},E=M=>{var _=Je();D(_,()=>({...F()}));var S=L(_);D(S,()=>({...l(I)}));var q=L(S);H(q,()=>e.children??re),K(S),K(_),d(M,_)};B(R,M=>{e.child?M(k):M(E,!1)})}d(W,U)},$$slots:{popper:!0}}))};B(y,m=>{w()?m(A):w()||m(G,1)})}d(u,s),Y()}var Xe=V("<button><!></button>");function $e(u,e){const o=ce();Z(e,!0);let h=i(e,"id",19,()=>fe(o)),f=i(e,"ref",15,null),p=i(e,"disabled",3,!1),b=i(e,"type",3,"button"),g=ue(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const c=Re.create({id:C(()=>h()),disabled:C(()=>p()??!1),ref:C(()=>f(),v=>f(v))}),w=z(()=>te(g,c.props,{type:b()}));ke(u,{get id(){return h()},get ref(){return c.opts.ref},children:(v,P)=>{var n=O(),t=x(n);{var a=s=>{var y=O(),A=x(y);H(A,()=>e.child,()=>({props:l(w)})),d(s,y)},r=s=>{var y=Xe();D(y,()=>({...l(w)}));var A=L(y);H(A,()=>e.children??re),K(y),d(s,y)};B(t,s=>{e.child?s(a):s(r,!1)})}d(v,n)},$$slots:{default:!0}}),Y()}const ht=qe,mt=$e,bt=Ee,Pt=Qe,yt=Ye,wt=We;function et(){let u=ye(we({})),e=null,o=null;function h(t,a,r){o&&(clearInterval(o),o=null),e=`${t}/${a}/${r}`,p("enter",t,a,r),o=setInterval(()=>{e&&p("heartbeat",t,a,r)},3e4)}function f(){if(o&&(clearInterval(o),o=null),e){const[t,a,r]=e.split("/");t&&a&&r&&p("leave",t,a,r),e=null}}function p(t,a,r,s){pe.send({type:"presence",action:t,repo:a,entityType:r,entityId:s})}function b(t){const a=`${t.repo}/${t.entityType}/${t.entityId}`,r=l(u)[a]??[];if(t.action==="leave")l(u)[a]=r.filter(s=>s.id!==t.user.id);else{const s=r.findIndex(y=>y.id===t.user.id);s>=0?(r[s]=t.user,l(u)[a]=[...r]):l(u)[a]=[...r,t.user]}}function g(){if(ae(u,{},!0),!e)return;const[t,a,r]=e.split("/");t&&a&&r&&p("enter",t,a,r)}function c(t,a,r,s){const y=`${t}/${a}/${r}`,A=l(u)[y]??[];return s?A.filter(G=>G.id!==s):A}function w(t,a){const r=new Map;for(const[s,y]of Object.entries(l(u)))if(s.startsWith(t))for(const A of y)(!a||A.id!==a)&&r.set(A.id,A);return[...r.values()]}function v(t,a){return w(`${t}/`,a)}function P(t){const a=new Map;for(const r of Object.values(l(u)))for(const s of r)(!t||s.id!==t)&&a.set(s.id,s);return[...a.values()]}const n=z(()=>{const t=new Map;for(const a of Object.values(l(u)))for(const r of a)t.set(r.id,r);return[...t.values()]});return{enter:h,leave:f,handlePresenceEvent:b,resetAndResend:g,getPresence:c,getPresenceByPrefix:w,getRepoPresence:v,getAllUsers:P,get allUsers(){return l(n)}}}const ge=et();pe.setPresenceHandler(u=>ge.handlePresenceEvent(u));pe.addConnectHandler(()=>ge.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>ge.leave());var tt=de("<title> </title>"),rt=de('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function Mt(u,e){const o=ie(e,["children","$$slots","$$events","$$legacy"]),h=ie(o,["size","title"]);Z(e,!1);const f=le(),p=le();let b=i(e,"size",8,16),g=i(e,"title",8,void 0);se(()=>($(o),$(g())),()=>{ae(f,o["aria-label"]||o["aria-labelledby"]||g())}),se(()=>(l(f),$(o)),()=>{ae(p,{"aria-hidden":l(f)?void 0:!0,role:l(f)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Pe(),be();var c=rt();D(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:b(),height:b(),...l(p),...h}));var w=L(c);{var v=P=>{var n=tt(),t=L(n,!0);K(n),X(()=>J(t,g())),d(P,n)};B(w,P=>{g()&&P(v)})}Q(2),K(c),d(u,c),Y()}var nt=V("<!> <!>",1),at=V("<!> <!>",1),ot=V("<!> <!>",1);function Ct(u,e){Z(e,!0);let o=i(e,"open",15),h=i(e,"confirmLabel",3,"Confirm"),f=i(e,"cancelLabel",3,"Cancel"),p=i(e,"destructive",3,!1);var b=O(),g=x(b);j(g,()=>je,(c,w)=>{w(c,{onOpenChange:v=>{v||e.oncancel()},get open(){return o()},set open(v){o(v)},children:(v,P)=>{var n=O(),t=x(n);j(t,()=>ze,(a,r)=>{r(a,{children:(s,y)=>{var A=ot(),G=x(A);j(G,()=>Le,(N,W)=>{W(N,{children:(T,ne)=>{var F=nt(),I=x(F);j(I,()=>Ke,(R,k)=>{k(R,{children:(E,M)=>{Q();var _=oe();X(()=>J(_,e.title)),d(E,_)},$$slots:{default:!0}})});var U=ve(I,2);j(U,()=>He,(R,k)=>{k(R,{children:(E,M)=>{Q();var _=oe();X(()=>J(_,e.message)),d(E,_)},$$slots:{default:!0}})}),d(T,F)},$$slots:{default:!0}})});var m=ve(G,2);j(m,()=>Te,(N,W)=>{W(N,{children:(T,ne)=>{var F=at(),I=x(F);{let R=z(()=>me({variant:"ghost"}));j(I,()=>Ue,(k,E)=>{E(k,{get class(){return l(R)},get onclick(){return e.oncancel},children:(M,_)=>{Q();var S=oe();X(()=>J(S,f())),d(M,S)},$$slots:{default:!0}})})}var U=ve(I,2);{let R=z(()=>me({variant:p()?"destructive":"accent"}));j(U,()=>De,(k,E)=>{E(k,{get class(){return l(R)},get onclick(){return e.onconfirm},children:(M,_)=>{Q();var S=oe();X(()=>J(S,h())),d(M,S)},$$slots:{default:!0}})})}d(T,F)},$$slots:{default:!0}})}),d(s,A)},$$slots:{default:!0}})}),d(v,n)},$$slots:{default:!0}})}),d(u,b),Y()}export{Pt as C,yt as I,bt as P,ht as R,wt as S,mt as T,Mt as a,_t as b,Ct as c,ge as p};
@@ -1 +1 @@
1
- import{s as e,g as t,Y as u}from"./yMbbhP0p.js";import{f}from"./CgcfyvoD.js";function T(){let n=u(null),i=u(null),r=u(null),c=u(null),o=u("entity"),g=u(null),d=u("general"),h=u(!1);function p(l,s){t(n)&&(t(n)!==l||t(r)!==s)&&f(t(n)).catch(()=>{})}function y(l,s,a,I){p(l,a),e(n,l,!0),e(i,s,!0),e(r,a,!0),e(c,I??null,!0)}function b(){e(o,"entity")}function v(){e(o,"graph")}function S(){e(o,"settings"),e(d,"general")}function m(l,s,a){t(r)===a&&t(n)===l?(e(n,null),e(i,null),e(r,null)):(e(n,l,!0),e(i,s,!0),e(r,a,!0)),e(c,null)}function w(){t(n)&&f(t(n)).catch(()=>{}),e(n,null),e(i,null),e(r,null),e(c,null)}return{get selectedRepo(){return t(n)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(c)},get activeView(){return t(o)},get entityPath(){return t(n)&&t(i)&&t(r)?`/${t(n)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(l){e(g,l,!0)},get settingsTab(){return t(d)},set settingsTab(l){e(d,l,!0)},get hideSidebar(){return t(h)},set hideSidebar(l){e(h,l,!0)},select:y,deselect:w,selectOnGraph:m,showEntity:b,showGraph:v,showSettings:S}}const R=T();export{R as n};
1
+ import{s as e,g as t,Y as u}from"./BBDMeJL4.js";import{f}from"./B3cbqYdb.js";function T(){let n=u(null),i=u(null),r=u(null),c=u(null),o=u("entity"),g=u(null),d=u("general"),h=u(!1);function p(l,s){t(n)&&(t(n)!==l||t(r)!==s)&&f(t(n)).catch(()=>{})}function y(l,s,a,I){p(l,a),e(n,l,!0),e(i,s,!0),e(r,a,!0),e(c,I??null,!0)}function b(){e(o,"entity")}function v(){e(o,"graph")}function S(){e(o,"settings"),e(d,"general")}function m(l,s,a){t(r)===a&&t(n)===l?(e(n,null),e(i,null),e(r,null)):(e(n,l,!0),e(i,s,!0),e(r,a,!0)),e(c,null)}function w(){t(n)&&f(t(n)).catch(()=>{}),e(n,null),e(i,null),e(r,null),e(c,null)}return{get selectedRepo(){return t(n)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(c)},get activeView(){return t(o)},get entityPath(){return t(n)&&t(i)&&t(r)?`/${t(n)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(l){e(g,l,!0)},get settingsTab(){return t(d)},set settingsTab(l){e(d,l,!0)},get hideSidebar(){return t(h)},set hideSidebar(l){e(h,l,!0)},select:y,deselect:w,selectOnGraph:m,showEntity:b,showGraph:v,showSettings:S}}const R=T();export{R as n};
@@ -1 +1 @@
1
- import{a as p,s as $,f as h}from"./DfwW1gF2.js";import{i as M}from"./Dr5ZUnae.js";import{p as I,l as c,a as P,g as i,c as m,n as Z,r as _,b as k,m as u,s as g,d as n,t as B}from"./yMbbhP0p.js";import{i as C}from"./DSZYl5ah.js";import{a as N}from"./l5w7mUkV.js";import{l as v,p as b}from"./DVyuW48M.js";var R=h("<title> </title>"),V=h('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"></path></svg>');function G(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);I(t,!1);const a=u(),f=u();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{g(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{g(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),P(),M();var r=V();N(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(f),...w}));var y=m(r);{var z=o=>{var l=R(),A=m(l,!0);_(l),B(()=>$(A,s())),p(o,l)};C(y,o=>{s()&&o(z)})}Z(),_(r),p(x,r),k()}export{G as I};
1
+ import{a as p,s as $,f as h}from"./yEDUbZbk.js";import{i as M}from"./Ddpk8P2X.js";import{p as I,l as c,a as P,g as i,c as m,n as Z,r as _,b as k,m as u,s as g,d as n,t as B}from"./BBDMeJL4.js";import{i as C}from"./Dtbtl5su.js";import{a as N}from"./BMrbs3EC.js";import{l as v,p as b}from"./CpXgbTWt.js";var R=h("<title> </title>"),V=h('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"></path></svg>');function G(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);I(t,!1);const a=u(),f=u();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{g(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{g(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),P(),M();var r=V();N(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(f),...w}));var y=m(r);{var z=o=>{var l=R(),A=m(l,!0);_(l),B(()=>$(A,s())),p(o,l)};C(y,o=>{s()&&o(z)})}Z(),_(r),p(x,r),k()}export{G as I};
@@ -1 +1 @@
1
- import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./FmR2V1-h.js";const b=3e4;class K extends B{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=A();this.getLocalState()!==null&&b/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&b<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&x(this,s,"timeout")},F(b/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:A()});const l=[],u=[],r=[],p=[];n===null?p.push(e):c==null?n!=null&&l.push(e):(u.push(e),V(c,n)||r.push(e)),(l.length>0||r.length>0||p.length>0)&&this.emit("change",[{added:l,updated:r,removed:p},"local"]),this.emit("update",[{added:l,updated:u,removed:p},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const x=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const l=t.meta.get(c);t.meta.set(c,{clock:l.clock+1,lastUpdated:A()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},Q=(t,n,e=t.states)=>{const s=n.length,a=D();S(a,s);for(let c=0;c<s;c++){const l=n[c],u=e.get(l)||null,r=t.meta.get(l).clock;S(a,l),S(a,r),J(a,JSON.stringify(u))}return v(a)},X=(t,n,e)=>{const s=N(n),a=A(),c=[],l=[],u=[],r=[],p=L(s);for(let m=0;m<p;m++){const d=L(s);let g=L(s);const h=JSON.parse(_(s)),y=t.meta.get(d),k=t.states.get(d),o=y===void 0?0:y.clock;(o<g||o===g&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?g++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:g,lastUpdated:a}),y===void 0&&h!==null?c.push(d):y!==void 0&&h===null?r.push(d):h!==null&&(V(h,k)||u.push(d),l.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||l.length>0||r.length>0)&&t.emit("update",[{added:c,updated:l,removed:r},e])},W=0,j=1,C=2,Z=(t,n)=>{S(t,W);const e=P(n);E(t,e)},$=(t,n,e)=>{S(t,j),E(t,q(n,e))},H=(t,n,e)=>$(n,e,O(t)),Y=(t,n,e,s)=>{try{G(n,O(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},tt=(t,n)=>{S(t,C),E(t,n)},et=Y,nt=(t,n,e,s,a)=>{const c=L(t);switch(c){case W:H(t,n,e);break;case j:Y(t,e,s,a);break;case C:et(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},U=0,T=1;function st(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function at(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function lt(t,n){const e=new R,s=e.getText("content"),a=new K(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,l=!1;function u(){return M.ws??null}function r(o,f){const i=u();!i||i.readyState!==WebSocket.OPEN||i.send(st(t,o,f))}function p(){const o=D();Z(o,e),r(U,v(o))}function m(o){const f=o??[e.clientID],i=Q(a,f);r(T,i)}function d(o){if(l||typeof o.data=="string")return;const f=o.data instanceof ArrayBuffer?o.data:null;if(!f)return;const i=at(f);if(!(!i||i.docName!==t))if(i.msgType===U){const I=N(i.payload),w=D();nt(I,w,e,"ws-server"),z(w)>0&&r(U,v(w))}else i.msgType===T&&X(a,i.payload,"ws-server")}function g(o,f){if(l||f==="ws-server")return;const i=D();tt(i,o),r(U,v(i))}function h({added:o,updated:f,removed:i},I){if(l||I==="ws-server")return;const w=o.concat(f,i);m(w)}function y(){if(l)return;const o=u();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=d,o.addEventListener("message",c),p(),m())}e.on("update",g),a.on("update",h),y(),M.addConnectHandler(y);function k(){if(l)return;l=!0,x(a,[e.clientID],"local"),m([e.clientID]);const o=u();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",g),a.off("update",h),a.destroy(),e.destroy()}return{ydoc:e,ytext:s,awareness:a,destroy:k}}export{lt as createCollabSession};
1
+ import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./CRbsz2jz.js";const b=3e4;class K extends B{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=A();this.getLocalState()!==null&&b/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&b<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&x(this,s,"timeout")},F(b/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:A()});const l=[],u=[],r=[],p=[];n===null?p.push(e):c==null?n!=null&&l.push(e):(u.push(e),V(c,n)||r.push(e)),(l.length>0||r.length>0||p.length>0)&&this.emit("change",[{added:l,updated:r,removed:p},"local"]),this.emit("update",[{added:l,updated:u,removed:p},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const x=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const l=t.meta.get(c);t.meta.set(c,{clock:l.clock+1,lastUpdated:A()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},Q=(t,n,e=t.states)=>{const s=n.length,a=D();S(a,s);for(let c=0;c<s;c++){const l=n[c],u=e.get(l)||null,r=t.meta.get(l).clock;S(a,l),S(a,r),J(a,JSON.stringify(u))}return v(a)},X=(t,n,e)=>{const s=N(n),a=A(),c=[],l=[],u=[],r=[],p=L(s);for(let m=0;m<p;m++){const d=L(s);let g=L(s);const h=JSON.parse(_(s)),y=t.meta.get(d),k=t.states.get(d),o=y===void 0?0:y.clock;(o<g||o===g&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?g++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:g,lastUpdated:a}),y===void 0&&h!==null?c.push(d):y!==void 0&&h===null?r.push(d):h!==null&&(V(h,k)||u.push(d),l.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||l.length>0||r.length>0)&&t.emit("update",[{added:c,updated:l,removed:r},e])},W=0,j=1,C=2,Z=(t,n)=>{S(t,W);const e=P(n);E(t,e)},$=(t,n,e)=>{S(t,j),E(t,q(n,e))},H=(t,n,e)=>$(n,e,O(t)),Y=(t,n,e,s)=>{try{G(n,O(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},tt=(t,n)=>{S(t,C),E(t,n)},et=Y,nt=(t,n,e,s,a)=>{const c=L(t);switch(c){case W:H(t,n,e);break;case j:Y(t,e,s,a);break;case C:et(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},U=0,T=1;function st(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function at(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function lt(t,n){const e=new R,s=e.getText("content"),a=new K(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,l=!1;function u(){return M.ws??null}function r(o,f){const i=u();!i||i.readyState!==WebSocket.OPEN||i.send(st(t,o,f))}function p(){const o=D();Z(o,e),r(U,v(o))}function m(o){const f=o??[e.clientID],i=Q(a,f);r(T,i)}function d(o){if(l||typeof o.data=="string")return;const f=o.data instanceof ArrayBuffer?o.data:null;if(!f)return;const i=at(f);if(!(!i||i.docName!==t))if(i.msgType===U){const I=N(i.payload),w=D();nt(I,w,e,"ws-server"),z(w)>0&&r(U,v(w))}else i.msgType===T&&X(a,i.payload,"ws-server")}function g(o,f){if(l||f==="ws-server")return;const i=D();tt(i,o),r(U,v(i))}function h({added:o,updated:f,removed:i},I){if(l||I==="ws-server")return;const w=o.concat(f,i);m(w)}function y(){if(l)return;const o=u();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=d,o.addEventListener("message",c),p(),m())}e.on("update",g),a.on("update",h),y(),M.addConnectHandler(y);function k(){if(l)return;l=!0,x(a,[e.clientID],"local"),m([e.clientID]);const o=u();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",g),a.off("update",h),a.destroy(),e.destroy()}return{ydoc:e,ytext:s,awareness:a,destroy:k}}export{lt as createCollabSession};
@@ -0,0 +1,5 @@
1
+ import{a as O,s as Ie,f as Rt,l as ir,o as V,g as M,p as Gt,b as ht,m as ho,u as go}from"./yEDUbZbk.js";import{i as Fe}from"./Ddpk8P2X.js";import{aO as po,h as mo,f as vo,by as yo,e as bo,Y as T,bz as Nn,M as wo,g as u,s as y,aW as te,p as I,l as Ct,d as ct,a as Ne,c as X,n as ke,r as q,b as F,m as Pt,t as De,ae as x,ag as Ht,bo as xo,aC as kn,bp as So,a7 as Ao,a8 as $,a1 as Ge,a0 as Oo,a4 as E,ah as L,bA as Co,bB as sr,a5 as ve,aG as Po}from"./BBDMeJL4.js";import{B as Eo,i as K,b as ar}from"./Dtbtl5su.js";import{a as lt,s as D}from"./BMrbs3EC.js";import{l as Et,p as v,r as W,s as tt}from"./CpXgbTWt.js";import{b as Ke,a as et}from"./Bt7P6UBm.js";import{c as It}from"./CDs3H3KT.js";import{c as Ft,b as cr}from"./DYpjUIN_.js";function To(){return Symbol(po)}const Mo=Symbol("NaN");function Ro(e,t,n){mo&&vo();var r=new Eo(e),o=!yo();bo(()=>{var s=t();s!==s&&(s=Mo),o&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}class Io extends Map{#t=new Map;#e=T(0);#n=T(0);#r=Nn||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#n.v=super.size}}#o(t){return Nn===this.#r?T(t):wo(t)}has(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#o(0),n.set(t,r);else return u(this.#e),!1;return u(r),!0}forEach(t,n){this.#i(),super.forEach(t,n)}get(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#o(0),n.set(t,r);else{u(this.#e);return}return u(r),super.get(t)}set(t,n){var r=this.#t,o=r.get(t),s=super.get(t),i=super.set(t,n),a=this.#e;if(o===void 0)o=this.#o(0),r.set(t,o),y(this.#n,super.size),te(a);else if(s!==n){te(o);var c=a.reactions===null?null:new Set(a.reactions),l=c===null||!o.reactions?.every(g=>c.has(g));l&&te(a)}return i}delete(t){var n=this.#t,r=n.get(t),o=super.delete(t);return r!==void 0&&(n.delete(t),y(r,-1)),o&&(y(this.#n,super.size),te(this.#e)),o}clear(){if(super.size!==0){super.clear();var t=this.#t;y(this.#n,0);for(var n of t.values())y(n,-1);te(this.#e),t.clear()}}#i(){u(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#o(0);t.set(n,r)}}for([,r]of this.#t)u(r)}keys(){return u(this.#e),super.keys()}values(){return this.#i(),super.values()}entries(){return this.#i(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return u(this.#n),super.size}}var Fo=Rt("<title> </title>"),No=Rt('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function Rc(e,t){const n=Et(t,["children","$$slots","$$events","$$legacy"]),r=Et(n,["size","title"]);I(t,!1);const o=Pt(),s=Pt();let i=v(t,"size",8,16),a=v(t,"title",8,void 0);Ct(()=>(ct(n),ct(a())),()=>{y(o,n["aria-label"]||n["aria-labelledby"]||a())}),Ct(()=>(u(o),ct(n)),()=>{y(s,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Ne(),Fe();var c=No();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:i(),height:i(),...u(s),...r}));var l=X(c);{var g=d=>{var h=Fo(),f=X(h,!0);q(h),De(()=>Ie(f,a())),O(d,h)};K(l,d=>{a()&&d(g)})}ke(),q(c),O(e,c),F()}var ko=Rt("<title> </title>"),Do=Rt('<svg><!><path d="M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"></path></svg>');function Ic(e,t){const n=Et(t,["children","$$slots","$$events","$$legacy"]),r=Et(n,["size","title"]);I(t,!1);const o=Pt(),s=Pt();let i=v(t,"size",8,16),a=v(t,"title",8,void 0);Ct(()=>(ct(n),ct(a())),()=>{y(o,n["aria-label"]||n["aria-labelledby"]||a())}),Ct(()=>(u(o),ct(n)),()=>{y(s,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Ne(),Fe();var c=Do();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:i(),height:i(),...u(s),...r}));var l=X(c);{var g=d=>{var h=ko(),f=X(h,!0);q(h),De(()=>Ie(f,a())),O(d,h)};K(l,d=>{a()&&d(g)})}ke(),q(c),O(e,c),F()}var _o=Rt("<title> </title>"),Bo=Rt('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function Fc(e,t){const n=Et(t,["children","$$slots","$$events","$$legacy"]),r=Et(n,["size","title"]);I(t,!1);const o=Pt(),s=Pt();let i=v(t,"size",8,16),a=v(t,"title",8,void 0);Ct(()=>(ct(n),ct(a())),()=>{y(o,n["aria-label"]||n["aria-labelledby"]||a())}),Ct(()=>(u(o),ct(n)),()=>{y(s,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Ne(),Fe();var c=Bo();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:i(),height:i(),...u(s),...r}));var l=X(c);{var g=d=>{var h=_o(),f=X(h,!0);q(h),De(()=>Ie(f,a())),O(d,h)};K(l,d=>{a()&&d(g)})}ke(4),q(c),O(e,c),F()}function Lo(e){return typeof e=="function"}function ce(e){return e!==null&&typeof e=="object"}const Wo=["string","number","bigint","boolean"];function Xe(e){return e==null||Wo.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Xe(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Ut=Symbol("box"),_e=Symbol("is-writable");function w(e,t){const n=x(e);return t?{[Ut]:!0,[_e]:!0,get current(){return u(n)},set current(r){t(r)}}:{[Ut]:!0,get current(){return e()}}}function le(e){return ce(e)&&Ut in e}function nn(e){return le(e)&&_e in e}function lr(e){return le(e)?e:Lo(e)?w(e):gt(e)}function zo(e){return Object.entries(e).reduce((t,[n,r])=>le(r)?(nn(r)?Object.defineProperty(t,n,{get(){return r.current},set(o){r.current=o}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function Vo(e){return nn(e)?{[Ut]:!0,get current(){return e.current}}:e}function gt(e){let t=T(Ht(e));return{[Ut]:!0,[_e]:!0,get current(){return u(t)},set current(n){y(t,n,!0)}}}function Vt(e){let t=T(Ht(e));return{[Ut]:!0,[_e]:!0,get current(){return u(t)},set current(n){y(t,n,!0)}}}Vt.from=lr;Vt.with=w;Vt.flatten=zo;Vt.readonly=Vo;Vt.isBox=le;Vt.isWritableBox=nn;function ur(...e){return function(t){for(const n of e)if(n){if(t.defaultPrevented)return;typeof n=="function"?n.call(this,t):n.current?.call(this,t)}}}var Dn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ho=/\n/g,Ko=/^\s*/,Uo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,jo=/^:\s*/,Yo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Go=/^[;\s]*/,Xo=/^\s+|\s+$/g,qo=`
2
+ `,_n="/",Bn="*",Bt="",Zo="comment",Jo="declaration";function Qo(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(p){var m=p.match(Ho);m&&(n+=m.length);var b=p.lastIndexOf(qo);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new i(p),l(),m}}function i(p){this.start=p,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(p){var m=p.exec(e);if(m){var b=m[0];return o(b),e=e.slice(b.length),m}}function l(){c(Ko)}function g(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!(_n!=e.charAt(0)||Bn!=e.charAt(1))){for(var m=2;Bt!=e.charAt(m)&&(Bn!=e.charAt(m)||_n!=e.charAt(m+1));)++m;if(m+=2,Bt===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,o(b),e=e.slice(m),r+=2,p({type:Zo,comment:b})}}function h(){var p=s(),m=c(Uo);if(m){if(d(),!c(jo))return a("property missing ':'");var b=c(Yo),S=p({type:Jo,property:Ln(m[0].replace(Dn,Bt)),value:b?Ln(b[0].replace(Dn,Bt)):Bt});return c(Go),S}}function f(){var p=[];g(p);for(var m;m=h();)m!==!1&&(p.push(m),g(p));return p}return l(),f()}function Ln(e){return e?e.replace(Xo,Bt):Bt}function $o(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Qo(e),o=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:i,value:a}=s;o?t(i,a,s):a&&(n=n||{},n[i]=a)}),n}const ti=/\d/,ei=["-","_","/","."];function ni(e=""){if(!ti.test(e))return e!==e.toLowerCase()}function ri(e){const t=[];let n="",r,o;for(const s of e){const i=ei.includes(s);if(i===!0){t.push(n),n="",r=void 0;continue}const a=ni(s);if(o===!1){if(r===!1&&a===!0){t.push(n),n=s,r=a;continue}if(r===!0&&a===!1&&n.length>1){const c=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,r=a;continue}}n+=s,r=a,o=i}return t.push(n),t}function dr(e){return e?ri(e).map(t=>ii(t)).join(""):""}function oi(e){return si(dr(e||""))}function ii(e){return e?e[0].toUpperCase()+e.slice(1):""}function si(e){return e?e[0].toLowerCase()+e.slice(1):""}function oe(e){if(!e)return{};const t={};function n(r,o){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[dr(r)]=o;return}if(r.startsWith("--")){t[r]=o;return}t[oi(r)]=o}return $o(e,n),t}function Lt(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function ai(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const ci=ai(/[A-Z]/,e=>`-${e.toLowerCase()}`);function li(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=>`${ci(t)}: ${e[t]};`).join(`
3
+ `)}function fr(e={}){return li(e).replace(`
4
+ `," ")}const ui=["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"],di=new Set(ui);function fi(e){return di.has(e)}function it(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const o of Object.keys(r)){const s=t[o],i=r[o],a=typeof s=="function",c=typeof i=="function";if(a&&fi(o)){const l=s,g=i;t[o]=ur(l,g)}else if(a&&c)t[o]=Lt(s,i);else if(o==="class"){const l=Xe(s),g=Xe(i);l&&g?t[o]=Ke(s,i):l?t[o]=Ke(s):g&&(t[o]=Ke(i))}else if(o==="style"){const l=typeof s=="object",g=typeof i=="object",d=typeof s=="string",h=typeof i=="string";if(l&&g)t[o]={...s,...i};else if(l&&h){const f=oe(i);t[o]={...s,...f}}else if(d&&g){const f=oe(s);t[o]={...f,...i}}else if(d&&h){const f=oe(s),p=oe(i);t[o]={...f,...p}}else l?t[o]=s:g?t[o]=i:d?t[o]=s:h&&(t[o]=i)}else t[o]=i!==void 0?i:s}for(const o of Object.getOwnPropertySymbols(r)){const s=t[o],i=r[o];t[o]=i!==void 0?i:s}}}return typeof t.style=="object"&&(t.style=fr(t.style).replaceAll(`
5
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const hr=typeof window<"u"?window:void 0;function hi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class gi{#t;#e;constructor(t={}){const{window:n=hr,document:r=n?.document}=t;n!==void 0&&(this.#t=r,this.#e=ir(o=>{const s=V(n,"focusin",o),i=V(n,"focusout",o);return()=>{s(),i()}}))}get current(){return this.#e?.(),this.#t?hi(this.#t):null}}new gi;function pi(e){return typeof e=="function"}class Nt{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return xo(this.#e)}get(){const t=kn(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const n=kn(this.#e);return n===void 0?t:n}set(t){return So(this.#e,t)}}function mi(e,t){switch(e){case"post":$(t);break;case"pre":Ao(t);break}}function gr(e,t,n,r={}){const{lazy:o=!1}=r;let s=!o,i=Array.isArray(e)?[]:void 0;mi(t,()=>{const a=Array.isArray(e)?e.map(l=>l()):e();if(!s){s=!0,i=a;return}const c=Ge(()=>n(a,i));return i=a,c})}function U(e,t,n){gr(e,"post",t,n)}function vi(e,t,n){gr(e,"pre",t,n)}U.pre=vi;function Wn(e){return pi(e)?e():e}class yi{#t={width:0,height:0};#e=!1;#n;#r;#o;#i=x(()=>(u(this.#s)?.(),this.getSize().width));#a=x(()=>(u(this.#s)?.(),this.getSize().height));#s=x(()=>{const t=Wn(this.#r);if(t)return ir(n=>{if(!this.#o)return;const r=new this.#o.ResizeObserver(o=>{this.#e=!0;for(const s of o){const i=this.#n.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(i)?i:[i];this.#t.width=a.reduce((c,l)=>Math.max(c,l.inlineSize),0),this.#t.height=a.reduce((c,l)=>Math.max(c,l.blockSize),0)}n()});return r.observe(t),()=>{this.#e=!1,r.disconnect()}})});constructor(t,n={box:"border-box"}){this.#o=n.window??hr,this.#n=n,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=Wn(this.#r);if(!t||!this.#o)return;const n=t.offsetWidth,r=t.offsetHeight;if(this.#n.box==="border-box")return{width:n,height:r};const o=this.#o.getComputedStyle(t),s=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),a=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),c=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),l=n-s-a,g=r-i-c;return{width:l,height:g}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return u(this.#s)?.(),this.getSize()}get width(){return u(this.#i)}get height(){return u(this.#a)}}function Xt(e){$(()=>()=>{e()})}function pr(e,t){return setTimeout(t,e)}function bt(e){Oo().then(e)}const bi=1,wi=9,xi=11;function qe(e){return ce(e)&&e.nodeType===bi&&typeof e.nodeName=="string"}function mr(e){return ce(e)&&e.nodeType===wi}function Si(e){return ce(e)&&e.constructor?.name==="VisualViewport"}function Ai(e){return ce(e)&&e.nodeType!==void 0}function vr(e){return Ai(e)&&e.nodeType===xi&&"host"in e}function Oi(e,t){if(!e||!t||!qe(e)||!qe(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&vr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ue(e){return mr(e)?e:Si(e)?e.document:e?.ownerDocument??document}function rn(e){return vr(e)?rn(e.host):mr(e)?e.defaultView??window:qe(e)?e.ownerDocument?.defaultView??window:window}function Ci(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class on{element;#t=x(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return u(this.#t)}set root(t){y(this.#t,t)}constructor(t){typeof t=="function"?this.element=w(t):this.element=t}getDocument=()=>ue(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Ci(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,n)=>this.getWindow().setTimeout(t,n);clearTimeout=t=>this.getWindow().clearTimeout(t)}function rt(e,t){return{[To()]:n=>le(e)?(e.current=n,Ge(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Ge(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t?.(null))})}}function yr(e){return e?"true":"false"}function jt(e){return e?"":void 0}function Nc(e){return e?!0:void 0}function sn(e){return e?"open":"closed"}function kc(e,t){return t?"mixed":e?"true":"false"}class Pi{#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(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${this.#e}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}function br(e){const t=new Pi(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const se="ArrowDown",an="ArrowLeft",cn="ArrowRight",ye="ArrowUp",wr="End",Be="Enter",Ei="Escape",xr="Home",Ti="PageDown",Mi="PageUp",de=" ",Ri="Tab";function Ii(e){return window.getComputedStyle(e).getPropertyValue("direction")}function Fi(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?an:cn,vertical:se}[t]}function Ni(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?cn:an,vertical:ye}[t]}function ki(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:Fi(e,t),prevKey:Ni(e,t)}}const Sr=typeof document<"u",zn=Di();function Di(){return Sr&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function wt(e){return e instanceof HTMLElement}function Ze(e){return e instanceof Element}function Ar(e){return e instanceof Element||e instanceof SVGElement}function _i(e){return e!==null}function Bi(e){return e instanceof HTMLInputElement&&"select"in e}class Li{#t;#e=Vt(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,n,r=!1){const o=this.#t.rootNode.current;if(!o||!t)return;const s=this.getCandidateNodes();if(!s.length)return;const i=s.indexOf(t),a=Ii(o),{nextKey:c,prevKey:l}=ki(a,this.#t.orientation.current),g=this.#t.loop.current,d={[c]:i+1,[l]:i-1,[xr]:0,[wr]:s.length-1};if(r){const p=c===se?cn:se,m=l===ye?an:ye;d[p]=i+1,d[m]=i-1}let h=d[n.key];if(h===void 0)return;n.preventDefault(),h<0&&g?h=s.length-1:h===s.length&&g&&(h=0);const f=s[h];if(f)return f.focus(),this.#e.current=f.id,this.#t.onCandidateFocus?.(f),f}getTabIndex(t){const n=this.getCandidateNodes(),r=this.#e.current!==null;return t&&!r&&n[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 n=this.#t.rootNode.current?.querySelector(`#${t}`);!n||!wt(n)||n.focus()}}class Wi{#t;#e=null;constructor(t){this.#t=t,Xt(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const n=this.#t.ref.current;if(n){if(typeof n.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=n.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(o=>o.finished)).then(()=>{this.#r(t)})})}}#r(t){const n=()=>{t()};this.#t.afterTick?bt(n):n()}}class Je{#t;#e;#n;#r=T(!1);constructor(t){this.#t=t,y(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new Wi({ref:this.#t.ref,afterTick:this.#t.open}),U(()=>this.#t.open.current,n=>{n&&y(this.#r,!0),this.#e&&this.#n.run(()=>{n===this.#t.open.current&&(this.#t.open.current||y(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return u(this.#r)}}function B(){}function qt(e,t){return`bits-${e}`}const zi=br({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),xt=new Nt("Dialog.Root | AlertDialog.Root");class ln{static create(t){const n=xt.getOr(null);return xt.set(new ln(t,n))}opts;#t=T(null);get triggerNode(){return u(this.#t)}set triggerNode(t){y(this.#t,t,!0)}#e=T(null);get contentNode(){return u(this.#e)}set contentNode(t){y(this.#e,t,!0)}#n=T(null);get overlayNode(){return u(this.#n)}set overlayNode(t){y(this.#n,t,!0)}#r=T(null);get descriptionNode(){return u(this.#r)}set descriptionNode(t){y(this.#r,t,!0)}#o=T(void 0);get contentId(){return u(this.#o)}set contentId(t){y(this.#o,t,!0)}#i=T(void 0);get titleId(){return u(this.#i)}set titleId(t){y(this.#i,t,!0)}#a=T(void 0);get triggerId(){return u(this.#a)}set triggerId(t){y(this.#a,t,!0)}#s=T(void 0);get descriptionId(){return u(this.#s)}set descriptionId(t){y(this.#s,t,!0)}#c=T(null);get cancelNode(){return u(this.#c)}set cancelNode(t){y(this.#c,t,!0)}#u=T(0);get nestedOpenCount(){return u(this.#u)}set nestedOpenCount(t){y(this.#u,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,n){this.opts=t,this.parent=n,this.depth=n?n.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Je({ref:w(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Je({ref:w(()=>this.overlayNode),open:this.opts.open,enabled:!0}),U(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Xt(()=>{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=>zi.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#l=x(()=>({"data-state":sn(this.opts.open.current)}));get sharedProps(){return u(this.#l)}set sharedProps(t){y(this.#l,t)}}class Or{static create(t){return new Or(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,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===de||t.key===Be)&&(t.preventDefault(),this.root.handleClose())}#t=x(()=>({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 u(this.#t)}set props(t){y(this.#t,t)}}class un{static create(t){return new un(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=rt(this.opts.ref)}#t=x(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return u(this.#t)}set props(t){y(this.#t,t)}}class dn{static create(t){return new dn(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.root.titleId=this.opts.id.current,this.attachment=rt(this.opts.ref),U.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#t=x(()=>({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 u(this.#t)}set props(t){y(this.#t,t)}}class fn{static create(t){return new fn(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.root.descriptionId=this.opts.id.current,this.attachment=rt(this.opts.ref,r=>{this.root.descriptionNode=r}),U.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#t=x(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return u(this.#t)}set props(t){y(this.#t,t)}}class hn{static create(t){return new hn(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=rt(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#t=x(()=>({open:this.root.opts.open.current}));get snippetProps(){return u(this.#t)}set snippetProps(t){y(this.#t,t)}#e=x(()=>({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":jt(this.root.nestedOpenCount>0),"data-nested":jt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return u(this.#e)}set props(t){y(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class gn{static create(t){return new gn(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=rt(this.opts.ref,r=>this.root.overlayNode=r)}#t=x(()=>({open:this.root.opts.open.current}));get snippetProps(){return u(this.#t)}set snippetProps(t){y(this.#t,t)}#e=x(()=>({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":jt(this.root.nestedOpenCount>0),"data-nested":jt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return u(this.#e)}set props(t){y(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class pn{static create(t){return new pn(t,xt.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=rt(this.opts.ref,r=>this.root.cancelNode=r),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===de||t.key===Be)&&(t.preventDefault(),this.root.handleClose())}#t=x(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return u(this.#t)}set props(t){y(this.#t,t)}}function Vi(e,t){I(t,!0);let n=v(t,"open",15,!1),r=v(t,"onOpenChange",3,B),o=v(t,"onOpenChangeComplete",3,B);ln.create({variant:w(()=>"alert-dialog"),open:w(()=>n(),a=>{n(a),r()(a)}),onOpenChangeComplete:w(()=>o())});var s=M(),i=E(s);D(i,()=>t.children??L),O(e,s),F()}var Hi=ht("<div><!></div>");function Ki(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"ref",15,null),s=v(t,"level",3,2),i=W(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=dn.create({id:w(()=>r()),level:w(()=>s()),ref:w(()=>o(),f=>o(f))}),c=x(()=>it(i,a.props));var l=M(),g=E(l);{var d=f=>{var p=M(),m=E(p);D(m,()=>t.child,()=>({props:u(c)})),O(f,p)},h=f=>{var p=Hi();lt(p,()=>({...u(c)}));var m=X(p);D(m,()=>t.children??L),q(p),O(f,p)};K(g,f=>{t.child?f(d):f(h,!1)})}O(e,l),F()}var Ui=ht("<button><!></button>");function ji(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"ref",15,null),s=W(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const i=un.create({id:w(()=>r()),ref:w(()=>o(),h=>o(h))}),a=x(()=>it(s,i.props));var c=M(),l=E(c);{var g=h=>{var f=M(),p=E(f);D(p,()=>t.child,()=>({props:u(a)})),O(h,f)},d=h=>{var f=Ui();lt(f,()=>({...u(a)}));var p=X(f);D(p,()=>t.children??L),q(f),O(h,f)};K(l,h=>{t.child?h(g):h(d,!1)})}O(e,c),F()}var Yi=ht("<button><!></button>");function Gi(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"ref",15,null),s=v(t,"disabled",3,!1),i=W(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const a=pn.create({id:w(()=>r()),ref:w(()=>o(),f=>o(f)),disabled:w(()=>!!s())}),c=x(()=>it(i,a.props));var l=M(),g=E(l);{var d=f=>{var p=M(),m=E(p);D(m,()=>t.child,()=>({props:u(c)})),O(f,p)},h=f=>{var p=Yi();lt(p,()=>({...u(c)}));var m=X(p);D(m,()=>t.children??L),q(p),O(f,p)};K(g,f=>{t.child?f(d):f(h,!1)})}O(e,l),F()}function Xi(e,t){var n=M(),r=E(n);Ro(r,()=>t.children,o=>{var s=M(),i=E(s);D(i,()=>t.children??L),O(o,s)}),O(e,n)}const qi=new Nt("BitsConfig");function Zi(){const e=new Ji(null,{});return qi.getOr(e).opts}class Ji{opts;constructor(t,n){const r=Qi(t,n);this.opts={defaultPortalTo:r(o=>o.defaultPortalTo),defaultLocale:r(o=>o.defaultLocale)}}}function Qi(e,t){return n=>w(()=>{const o=n(t)?.current;if(o!==void 0)return o;if(e!==null)return n(e.opts)?.current})}function $i(e,t){return n=>{const r=Zi();return w(()=>{const o=n();if(o!==void 0)return o;const s=e(r).current;return s!==void 0?s:t})}}const ts=$i(e=>e.defaultPortalTo,"body");function es(e,t){I(t,!0);const n=ts(()=>t.to),r=Co();let o=x(s);function s(){if(!Sr||t.disabled)return null;let d=null;return typeof n.current=="string"?d=document.querySelector(n.current):d=n.current,d}let i;function a(){i&&(go(i),i=null)}U([()=>u(o),()=>t.disabled],([d,h])=>{if(!d||h){a();return}return i=ho(Xi,{target:d,props:{children:t.children},context:r}),()=>{a()}});var c=M(),l=E(c);{var g=d=>{var h=M(),f=E(h);D(f,()=>t.children??L),O(d,h)};K(l,d=>{t.disabled&&d(g)})}O(e,c),F()}class ns{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const r=this.createEvent(n);return t.dispatchEvent(r),r}listen(t,n,r){const o=s=>{n(s)};return V(t,this.eventName,o,r)}}function Vn(e,t=500){let n=null;const r=(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function Cr(e,t){return e===t||e.contains(t)}function Pr(e){return e?.ownerDocument??document}function rs(e,t){const{clientX:n,clientY:r}=e,o=t.getBoundingClientRect();return n<o.left||n>o.right||r<o.top||r>o.bottom}const os=[Be,de],is=[se,Mi,xr],Er=[ye,Ti,wr],ss=[...is,...Er];function Hn(e){return e.pointerType==="mouse"}function as(e,{select:t=!1}={}){if(!e||!e.focus)return;const n=ue(e);if(n.activeElement===e)return;const r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&Bi(e)&&t&&e.select()}function cs(e,{select:t=!1}={},n){const r=n();for(const o of e)if(as(o,{select:t}),n()!==r)return!0}let ee=T(!1);class Ot{static _refs=0;static _cleanup;constructor(){$(()=>(Ot._refs===0&&(Ot._cleanup=sr(()=>{const t=[],n=o=>{y(ee,!1)},r=o=>{y(ee,!0)};return t.push(V(document,"pointerdown",n,{capture:!0}),V(document,"pointermove",n,{capture:!0}),V(document,"keydown",r,{capture:!0})),Lt(...t)})),Ot._refs++,()=>{Ot._refs--,Ot._refs===0&&(y(ee,!1),Ot._cleanup?.())}))}get current(){return u(ee)}set current(t){y(ee,t,!0)}}var Tr=["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] *)"],be=Tr.join(","),Mr=typeof Element>"u",Wt=Mr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!Mr&&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},xe=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):xe(t.parentNode));return i},ls=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rr=function(t,n,r){if(xe(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(be));return n&&Wt.call(t,be)&&o.unshift(t),o=o.filter(r),o},Se=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!xe(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,l=Se(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:i,candidates:l})}else{var g=Wt.call(i,be);g&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!xe(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&h){var f=Se(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},Ir=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Fr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ls(t))&&!Ir(t)?0:t.tabIndex},us=function(t,n){var r=Fr(t);return r<0&&n&&!Ir(t)?0:r},ds=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Nr=function(t){return t.tagName==="INPUT"},fs=function(t){return Nr(t)&&t.type==="hidden"},hs=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},gs=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},ps=function(t){if(!t.name)return!0;var n=t.form||we(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=gs(o,t.form);return!s||s===t},ms=function(t){return Nr(t)&&t.type==="radio"},vs=function(t){return ms(t)&&!ps(t)},ys=function(t){var n,r=t&&we(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,c;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&o;){var l,g,d;r=we(o),o=(l=r)===null||l===void 0?void 0:l.host,s=!!((g=o)!==null&&g!==void 0&&(d=g.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Kn=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},bs=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wt.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wt.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=t;t;){var l=t.parentElement,g=we(t);if(l&&!l.shadowRoot&&o(l)===!0)return Kn(t);t.assignedSlot?t=t.assignedSlot:!l&&g!==t.ownerDocument?t=g.host:t=l}t=c}if(ys(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Kn(t);return!1},ws=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Wt.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ae=function(t,n){return!(n.disabled||fs(n)||bs(n,t)||hs(n)||ws(n))},Qe=function(t,n){return!(vs(n)||Fr(n)<0||!Ae(t,n))},xs=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},kr=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,c=us(a,i),l=i?kr(o.candidates):a;c===0?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:s,tabIndex:c,item:o,isScope:i,content:l})}),r.sort(ds).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Dr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Se([t],n.includeContainer,{filter:Qe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:xs}):r=Rr(t,n.includeContainer,Qe.bind(null,n)),kr(r)},_r=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Se([t],n.includeContainer,{filter:Ae.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Rr(t,n.includeContainer,Ae.bind(null,n)),r},mn=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wt.call(t,be)===!1?!1:Qe(n,t)},Ss=Tr.concat("iframe:not([inert]):not([inert] *)").join(","),Br=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wt.call(t,Ss)===!1?!1:Ae(n,t)};function ie(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function As(e,t){if(!mn(e,ie()))return Os(e,t);const n=ue(e),r=Dr(n.body,ie());t==="prev"&&r.reverse();const o=r.indexOf(e);return o===-1?n.body:r.slice(o+1)[0]}function Os(e,t){const n=ue(e);if(!Br(e,ie()))return n.body;const r=_r(n.body,ie());t==="prev"&&r.reverse();const o=r.indexOf(e);return o===-1?n.body:r.slice(o+1).find(i=>mn(i,ie()))??n.body}function Cs(e,t){return e.length!==t.length?!1:e.every((n,r)=>Lr(n,t[r]))}function Lr(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?Cs(e,t):typeof e=="object"&&typeof t=="object"?Ps(e,t):Object.is(e,t)}function Ps(e,t){if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o)||!Lr(e[o],t[o]))return!1;return!0}function Dc(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function _c(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function Bc(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let o=t+n;return r?o=(o%e.length+e.length)%e.length:o=Math.max(0,Math.min(o,e.length-1)),e[o]}function Lc(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let o=t-n;return r?o=(o%e.length+e.length)%e.length:o=Math.max(0,Math.min(o,e.length-1)),e[o]}function Wr(e,t,n){const r=t.toLowerCase();if(r.endsWith(" ")){const d=r.slice(0,-1);if(e.filter(m=>m.toLowerCase().startsWith(d)).length<=1)return Wr(e,d,n);const f=n?.toLowerCase();if(f&&f.startsWith(d)&&f.charAt(d.length)===" "&&t.trim()===d)return n;const p=e.filter(m=>m.toLowerCase().startsWith(r));if(p.length>0){const m=n?e.indexOf(n):-1;return Un(p,Math.max(m,0)).find(C=>C!==n)||n}}const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=s.toLowerCase(),a=n?e.indexOf(n):-1;let c=Un(e,Math.max(a,0));s.length===1&&(c=c.filter(d=>d!==n));const g=c.find(d=>d?.toLowerCase().startsWith(i));return g!==n?g:void 0}function Un(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Es={afterMs:1e4,onChange:B};function zr(e,t){const{afterMs:n,onChange:r,getWindow:o}={...Es,...t};let s=null,i=T(Ht(e));function a(){return o().setTimeout(()=>{y(i,e,!0),r?.(e)},n)}return $(()=>()=>{s&&o().clearTimeout(s)}),w(()=>u(i),c=>{y(i,c,!0),r?.(c),s&&o().clearTimeout(s),s=a()})}class Ts{#t;#e;#n=x(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#r=x(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=zr("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#e.current=this.#e.current+t;const r=u(this.#r)(),o=n.find(c=>c===r)?.textContent?.trim()??"",s=n.map(c=>c.textContent?.trim()??""),i=Wr(s,this.#e.current,o),a=n.find(c=>c.textContent?.trim()===i);return a&&u(this.#n)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}class Ms{#t;#e;#n;#r=T(null);constructor(t){this.#t=t,this.#e=x(()=>this.#t.enabled()),this.#n=zr(!1,{afterMs:t.transitTimeout??300,onChange:n=>{u(this.#e)&&this.#t.setIsPointerInTransit?.(n)},getWindow:()=>rn(this.#t.triggerNode())}),U([t.triggerNode,t.contentNode,t.enabled],([n,r,o])=>{if(!n||!r||!o)return;const s=a=>{this.#i(a,r)},i=a=>{this.#i(a,n)};return Lt(V(n,"pointerleave",s),V(r,"pointerleave",i))}),U(()=>u(this.#r),()=>{const n=o=>{if(!u(this.#r))return;const s=o.target;if(!Ze(s))return;const i={x:o.clientX,y:o.clientY},a=t.triggerNode()?.contains(s)||t.contentNode()?.contains(s),c=!Ns(i,u(this.#r));a?this.#o():c&&(this.#o(),t.onPointerExit())},r=ue(t.triggerNode()??t.contentNode());if(r)return V(r,"pointermove",n)})}#o(){y(this.#r,null),this.#n.current=!1}#i(t,n){const r=t.currentTarget;if(!wt(r))return;const o={x:t.clientX,y:t.clientY},s=Rs(o,r.getBoundingClientRect()),i=Is(o,s),a=Fs(n.getBoundingClientRect()),c=ks([...i,...a]);y(this.#r,c,!0),this.#n.current=!0}}function Rs(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Is(e,t,n=5){const r=n*1.5;switch(t){case"top":return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case"bottom":return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case"left":return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case"right":return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function Fs(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ns(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,g=t[i].y;c>r!=g>r&&n<(l-a)*(r-c)/(g-c)+a&&(o=!o)}return o}function ks(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ds(t)}function Ds(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const _s="data-context-menu-trigger",Bs="data-context-menu-content",Vr=new Nt("Menu.Root"),vn=new Nt("Menu.Root | Menu.Sub"),Hr=new Nt("Menu.Content"),Ls=new ns("bitsmenuopen",{bubbles:!1,cancelable:!0}),Ws=br({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class Kr{static create(t){const n=new Kr(t);return Vr.set(n)}opts;isUsingKeyboard=new Ot;#t=T(!1);get ignoreCloseAutoFocus(){return u(this.#t)}set ignoreCloseAutoFocus(t){y(this.#t,t,!0)}#e=T(!1);get isPointerInTransit(){return u(this.#e)}set isPointerInTransit(t){y(this.#e,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>Ws.getAttr(t,this.opts.variant.current)}class Ur{static create(t,n){return vn.set(new Ur(t,n,null))}opts;root;parentMenu;contentId=w(()=>"");#t=T(null);get contentNode(){return u(this.#t)}set contentNode(t){y(this.#t,t,!0)}contentPresence;#e=T(null);get triggerNode(){return u(this.#e)}set triggerNode(t){y(this.#e,t,!0)}constructor(t,n,r){this.opts=t,this.root=n,this.parentMenu=r,this.contentPresence=new Je({ref:w(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&U(()=>r.opts.open.current,()=>{r.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class jr{static create(t){return Hr.set(new jr(t,vn.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#t=T("");get search(){return u(this.#t)}set search(t){y(this.#t,t,!0)}#e=0;#n;#r=T(!1);get mounted(){return u(this.#r)}set mounted(t){y(this.#r,t,!0)}#o;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new on(t.ref),this.attachment=rt(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),n.contentId=t.id,this.#o=t.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Ms({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:r=>{this.parentMenu.root.isPointerInTransit=r}}),this.#n=new Ts({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new Li({rootNode:w(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:w(()=>"vertical")}),U(()=>this.parentMenu.contentNode,r=>{if(!r)return;const o=()=>{bt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return Ls.listen(r,o)}),$(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#e)})}#i(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#a(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=t=>{this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#o)&&this.parentMenu.triggerNode&&mn(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const r=As(n.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),bt(()=>{r.focus(),bt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===Ri){this.handleTabKeyDown(t);return}const n=t.target,r=t.currentTarget;if(!wt(n)||!wt(r))return;const o=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,s=t.ctrlKey||t.altKey||t.metaKey,i=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const c=this.#i();o&&!s&&i&&this.#n(t.key,c),t.target?.id===this.parentMenu.contentId.current&&ss.includes(t.key)&&(t.preventDefault(),Er.includes(t.key)&&c.reverse(),cs(c,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Ze(t.currentTarget)&&Ze(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#e),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&bt(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#a()}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#a()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#a()}handleInteractOutside(t){if(!Ar(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}t.target.closest(`#${n}`)&&t.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=x(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return u(this.#s)}set snippetProps(t){y(this.#s,t)}#c=x(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":sn(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return u(this.#c)}set props(t){y(this.#c,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class zs{opts;content;attachment;#t=T(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=rt(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(t){if(!t.defaultPrevented&&Hn(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const r=t.currentTarget;if(!wt(r))return;r.focus()}}onpointerleave(t){t.defaultPrevented||Hn(t)&&this.content.onItemLeave(t)}onfocus(t){bt(()=>{t.defaultPrevented||this.opts.disabled.current||y(this.#t,!0)})}onblur(t){bt(()=>{t.defaultPrevented||y(this.#t,!1)})}#e=x(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":yr(this.opts.disabled.current),"data-disabled":jt(this.opts.disabled.current),"data-highlighted":u(this.#t)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return u(this.#e)}set props(t){y(this.#e,t)}}class Yr{static create(t){const n=new zs(t,Hr.get());return new Yr(t,n)}opts;item;root;#t=!1;constructor(t,n){this.opts=t,this.item=n,this.root=n.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===de)&&os.includes(t.key)){if(!wt(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){if(!t.defaultPrevented&&!this.#t){if(!wt(t.currentTarget))return;t.currentTarget?.click()}}onpointerdown(t){this.#t=!0}#n=x(()=>it(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return u(this.#n)}set props(t){y(this.#n,t)}}class Gr{static create(t){return new Gr(t,Vr.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=rt(this.opts.ref)}#t=x(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return u(this.#t)}set props(t){y(this.#t,t)}}class Xr{static create(t){return new Xr(t,vn.get())}opts;parentMenu;attachment;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=rt(this.opts.ref,r=>this.parentMenu.triggerNode=r)}onclick=t=>{this.opts.disabled.current||t.detail!==0||(this.parentMenu.toggleOpen(),t.preventDefault())};onpointerdown=t=>{if(!this.opts.disabled.current){if(t.pointerType==="touch")return t.preventDefault();t.button===0&&t.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||t.preventDefault())}};onpointerup=t=>{this.opts.disabled.current||t.pointerType==="touch"&&(t.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=t=>{if(!this.opts.disabled.current){if(t.key===de||t.key===Be){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===se&&(this.parentMenu.onOpen(),t.preventDefault())}};#t=x(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#e=x(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":yr(this.parentMenu.opts.open.current),"aria-controls":u(this.#t),"data-disabled":jt(this.opts.disabled.current),"data-state":sn(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return u(this.#e)}set props(t){y(this.#e,t)}}globalThis.bitsDismissableLayers??=new Map;class yn{static create(t){return new yn(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#o=!1;#i=void 0;#a;#s=B;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#a=t.onFocusOutside,$(()=>{this.#i=Pr(this.opts.ref.current)});let n=B;const r=()=>{this.#f(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),n()};U([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return pr(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),n(),n=this.#u())}),r}),Xt(()=>{this.#f.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),n()})}#c=t=>{t.defaultPrevented||this.opts.ref.current&&bt(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#o&&this.#a.current?.(t)})};#u(){return Lt(V(this.#i,"pointerdown",Lt(this.#h,this.#p),{capture:!0}),V(this.#i,"pointerdown",Lt(this.#g,this.#d)),V(this.#i,"focusin",this.#c))}#l=t=>{let n=t;n.defaultPrevented&&(n=jn(t)),this.#t.current(t)};#d=Vn(t=>{if(!this.opts.ref.current){this.#s();return}const n=this.opts.isValidEvent.current(t,this.opts.ref.current)||Ks(t,this.opts.ref.current);if(!this.#r||this.#v()||!n){this.#s();return}let r=t;if(r.defaultPrevented&&(r=jn(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#s();return}t.pointerType==="touch"?(this.#s(),this.#s=V(this.#i,"click",this.#l,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#g=t=>{this.#n[t.type]=!1};#p=()=>{this.opts.ref.current&&(this.#r=Hs(this.opts.ref.current))};#m=t=>this.opts.ref.current?Cr(this.opts.ref.current,t):!1;#f=Vn(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#v(){return Object.values(this.#n).some(Boolean)}#y=()=>{this.#o=!0};#b=()=>{this.#o=!1};props={onfocuscapture:this.#y,onblurcapture:this.#b}}function Vs(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function Hs(e){const t=[...globalThis.bitsDismissableLayers],n=Vs(t);if(n)return n[0].opts.ref.current===e;const[r]=t[0];return r.opts.ref.current===e}function Ks(e,t){const n=e.target;if(!Ar(n))return!1;const r=!!n.closest(`[${_s}]`);if("button"in e&&e.button>0&&!r)return!1;if("button"in e&&e.button===0&&r)return!0;const o=!!t.closest(`[${Bs}]`);return r&&o?!1:Pr(n).documentElement.contains(n)&&!Cr(t,n)&&rs(e,t)}function jn(e){const t=e.currentTarget,n=e.target;let r;e instanceof PointerEvent?r=new PointerEvent(e.type,e):r=new PointerEvent("pointerdown",e);let o=!1;return new Proxy(r,{get:(i,a)=>a==="currentTarget"?t:a==="target"?n:a==="preventDefault"?()=>{o=!0,typeof i.preventDefault=="function"&&i.preventDefault()}:a==="defaultPrevented"?o:a in i?i[a]:e[a]})}function qr(e,t){I(t,!0);let n=v(t,"interactOutsideBehavior",3,"close"),r=v(t,"onInteractOutside",3,B),o=v(t,"onFocusOutside",3,B),s=v(t,"isValidEvent",3,()=>!1);const i=yn.create({id:w(()=>t.id),interactOutsideBehavior:w(()=>n()),onInteractOutside:w(()=>r()),enabled:w(()=>t.enabled),onFocusOutside:w(()=>o()),isValidEvent:w(()=>s()),ref:t.ref});var a=M(),c=E(a);D(c,()=>t.children??L,()=>({props:i.props})),O(e,a),F()}globalThis.bitsEscapeLayers??=new Map;class bn{static create(t){return new bn(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new on(this.opts.ref);let n=B;U(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=this.#t()),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>V(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==Ei||!Us(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)}}function Us(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([o,{current:s}])=>s==="close"||s==="ignore");if(n)return n[0]===e;const[r]=t[0];return r===e}function Zr(e,t){I(t,!0);let n=v(t,"escapeKeydownBehavior",3,"close"),r=v(t,"onEscapeKeydown",3,B);bn.create({escapeKeydownBehavior:w(()=>n()),onEscapeKeydown:w(()=>r()),enabled:w(()=>t.enabled),ref:t.ref});var o=M(),s=E(o);D(s,()=>t.children??L),O(e,o),F()}class wn{static instance;#t=gt([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new wn),this.instance}register(t){const n=this.getActive();n&&n!==t&&n.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(o=>o!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const n=this.getActive();n&&n.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,n){this.#e.set(t,n)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,n){this.#n.set(t,n)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class xn{#t=!1;#e=null;#n=wn.getInstance();#r=[];#o;constructor(t){this.#o=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#i(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#c(),this.#a()}unmount(){this.#e&&(this.#i(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#a(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#o.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const n=this.#l();n?(n.focus(),this.#n.setFocusMemory(this,n)):this.#e.focus()})}#s(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#o.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const n=this.#n.getPreFocusMemory(this);if(n&&document.contains(n))try{n.focus()}catch{document.body.focus()}}}#c(){if(!this.#e||!this.#o.trap.current)return;const t=this.#e,n=t.ownerDocument,r=i=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=i.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const l=this.#n.getFocusMemory(this);if(l&&t.contains(l)&&Br(l))i.preventDefault(),l.focus();else{const g=this.#l(),d=this.#d()[0];(g||d||t).focus()}}},o=i=>{if(!this.#o.loop||this.#t||i.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#u();if(a.length===0)return;const c=a[0],l=a[a.length-1];!i.shiftKey&&n.activeElement===l?(i.preventDefault(),c.focus()):i.shiftKey&&n.activeElement===c&&(i.preventDefault(),l.focus())};this.#r.push(V(n,"focusin",r,{capture:!0}),V(t,"keydown",o));const s=new MutationObserver(()=>{const i=this.#n.getFocusMemory(this);if(i&&!t.contains(i)){const a=this.#l(),c=this.#d()[0],l=a||c;l?(l.focus(),this.#n.setFocusMemory(this,l)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>s.disconnect())}#u(){return this.#e?Dr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#l(){return this.#u()[0]||null}#d(){return this.#e?_r(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return U([()=>t.ref.current,()=>t.enabled.current],([r,o])=>{r&&o?(n||(n=new xn(t)),n.mount(r)):n&&(n.unmount(),n=null)}),Xt(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}}function Jr(e,t){I(t,!0);let n=v(t,"enabled",3,!1),r=v(t,"trapFocus",3,!1),o=v(t,"loop",3,!1),s=v(t,"onCloseAutoFocus",3,B),i=v(t,"onOpenAutoFocus",3,B);const a=xn.use({enabled:w(()=>n()),trap:w(()=>r()),loop:o(),onCloseAutoFocus:w(()=>s()),onOpenAutoFocus:w(()=>i()),ref:t.ref});var c=M(),l=E(c);D(l,()=>t.focusScope??L,()=>({props:a.props})),O(e,c),F()}globalThis.bitsTextSelectionLayers??=new Map;class Sn{static create(t){return new Sn(t)}opts;domContext;#t=B;constructor(t){this.opts=t,this.domContext=new on(t.ref);let n=B;U(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=this.#e()),()=>{n(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return Lt(V(this.domContext.getDocument(),"pointerdown",this.#n),V(this.domContext.getDocument(),"pointerup",ur(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const n=this.opts.ref.current,r=t.target;!wt(n)||!wt(r)||!this.opts.enabled.current||!Ys(this)||!Oi(n,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=js(n,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=B}}const Yn=e=>e.style.userSelect||e.style.webkitUserSelect;function js(e,t){const n=Yn(t),r=Yn(e);return he(t,"none"),he(e,"text"),()=>{he(t,n),he(e,r)}}function he(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Ys(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function Qr(e,t){I(t,!0);let n=v(t,"preventOverflowTextSelection",3,!0),r=v(t,"onPointerDown",3,B),o=v(t,"onPointerUp",3,B);Sn.create({id:w(()=>t.id),onPointerDown:w(()=>r()),onPointerUp:w(()=>o()),enabled:w(()=>t.enabled&&n()),ref:t.ref});var s=M(),i=E(s);D(i,()=>t.children??L),O(e,s),F()}globalThis.bitsIdCounter??={current:0};function An(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class Gs{#t;#e=0;#n=T();#r;constructor(t){this.#t=t}#o(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),y(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,u(this.#n)===void 0&&(this.#r=sr(()=>{y(this.#n,this.#t(...t),!0)})),$(()=>()=>{this.#o()}),u(this.#n)}}const me=new Io;let ge=T(null),Ue=null,ne=null,re=!1;const Gn=w(()=>{for(const e of me.values())if(e)return!0;return!1});let je=null;const Xs=new Gs(()=>{function e(){document.body.setAttribute("style",u(ge)??""),document.body.style.removeProperty("--scrollbar-width"),zn&&Ue?.(),y(ge,null)}function t(){ne!==null&&(window.clearTimeout(ne),ne=null)}function n(o,s){t(),re=!0,je=Date.now();const i=je,a=()=>{ne=null,je===i&&($r(me)?re=!1:(re=!1,s()))},c=o===null?24:o;ne=window.setTimeout(a,c)}function r(){u(ge)===null&&me.size===0&&!re&&y(ge,document.body.getAttribute("style"),!0)}return U(()=>Gn.current,()=>{if(!Gn.current)return;r(),re=!1;const o=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),i=o.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!i&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",zn&&(Ue=V(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),bt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Xt(()=>()=>{Ue?.()}),{get lockMap(){return me},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class qs{#t=An();#e;#n=()=>null;#r;locked;constructor(t,n=()=>null){this.#e=t,this.#n=n,this.#r=Xs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=w(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),Xt(()=>{if(this.#r.lockMap.delete(this.#t),$r(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function $r(e){for(const[t,n]of e)if(n)return!0;return!1}function Oe(e,t){I(t,!0);let n=v(t,"preventScroll",3,!0),r=v(t,"restoreScrollDelay",3,null);n()&&new qs(n(),()=>r()),F()}var Zs=ht("<!> <!>",1),Js=ht("<!> <div><!></div>",1);function Qs(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"ref",15,null),s=v(t,"forceMount",3,!1),i=v(t,"interactOutsideBehavior",3,"ignore"),a=v(t,"onCloseAutoFocus",3,B),c=v(t,"onEscapeKeydown",3,B),l=v(t,"onOpenAutoFocus",3,B),g=v(t,"onInteractOutside",3,B),d=v(t,"preventScroll",3,!0),h=v(t,"trapFocus",3,!0),f=v(t,"restoreScrollDelay",3,null),p=W(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const m=hn.create({id:w(()=>r()),ref:w(()=>o(),A=>o(A))}),b=x(()=>it(p,m.props));var S=M(),C=E(S);{var P=A=>{Jr(A,{get ref(){return m.opts.ref},loop:!0,get trapFocus(){return h()},get enabled(){return m.root.opts.open.current},get onCloseAutoFocus(){return a()},onOpenAutoFocus:R=>{l()(R),!R.defaultPrevented&&(R.preventDefault(),pr(0,()=>m.opts.ref.current?.focus()))},focusScope:(R,_)=>{let j=()=>_?.().props;Zr(R,tt(()=>u(b),{get enabled(){return m.root.opts.open.current},get ref(){return m.opts.ref},onEscapeKeydown:k=>{c()(k),!k.defaultPrevented&&m.root.handleClose()},children:(k,z)=>{qr(k,tt(()=>u(b),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get interactOutsideBehavior(){return i()},onInteractOutside:Y=>{g()(Y),!Y.defaultPrevented&&m.root.handleClose()},children:(Y,G)=>{Qr(Y,tt(()=>u(b),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},children:(at,H)=>{var ut=M(),nt=E(ut);{var Z=Q=>{var kt=Zs(),Qt=E(kt);{var $t=Dt=>{Oe(Dt,{get preventScroll(){return d()},get restoreScrollDelay(){return f()}})};K(Qt,Dt=>{m.root.opts.open.current&&Dt($t)})}var He=ve(Qt,2);{let Dt=x(()=>({props:it(u(b),j()),...m.snippetProps}));D(He,()=>t.child,()=>u(Dt))}O(Q,kt)},J=Q=>{var kt=Js(),Qt=E(kt);Oe(Qt,{get preventScroll(){return d()}});var $t=ve(Qt,2);lt($t,Dt=>({...Dt}),[()=>it(u(b),j())]);var He=X($t);D(He,()=>t.children??L),q($t),O(Q,kt)};K(nt,Q=>{t.child?Q(Z):Q(J,!1)})}O(at,ut)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};K(C,A=>{(m.shouldRender||s())&&A(P)})}O(e,S),F()}var $s=ht("<div><!></div>");function ta(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"forceMount",3,!1),s=v(t,"ref",15,null),i=W(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=gn.create({id:w(()=>r()),ref:w(()=>s(),h=>s(h))}),c=x(()=>it(i,a.props));var l=M(),g=E(l);{var d=h=>{var f=M(),p=E(f);{var m=S=>{var C=M(),P=E(C);{let A=x(()=>({props:it(u(c)),...a.snippetProps}));D(P,()=>t.child,()=>u(A))}O(S,C)},b=S=>{var C=$s();lt(C,A=>({...A}),[()=>it(u(c))]);var P=X(C);D(P,()=>t.children??L,()=>a.snippetProps),q(C),O(S,C)};K(p,S=>{t.child?S(m):S(b,!1)})}O(h,f)};K(g,h=>{(a.shouldRender||o())&&h(d)})}O(e,l),F()}var ea=ht("<div><!></div>");function na(e,t){const n=Gt();I(t,!0);let r=v(t,"id",19,()=>qt(n)),o=v(t,"ref",15,null),s=W(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const i=fn.create({id:w(()=>r()),ref:w(()=>o(),h=>o(h))}),a=x(()=>it(s,i.props));var c=M(),l=E(c);{var g=h=>{var f=M(),p=E(f);D(p,()=>t.child,()=>({props:u(a)})),O(h,f)},d=h=>{var f=ea();lt(f,()=>({...u(a)}));var p=X(f);D(p,()=>t.children??L),q(f),O(h,f)};K(l,h=>{t.child?h(g):h(d,!1)})}O(e,c),F()}const ra=["top","right","bottom","left"],Tt=Math.min,ot=Math.max,Ce=Math.round,pe=Math.floor,mt=e=>({x:e,y:e}),oa={left:"right",right:"left",bottom:"top",top:"bottom"},ia={start:"end",end:"start"};function $e(e,t,n){return ot(e,Tt(t,n))}function St(e,t){return typeof e=="function"?e(t):e}function At(e){return e.split("-")[0]}function Zt(e){return e.split("-")[1]}function On(e){return e==="x"?"y":"x"}function Cn(e){return e==="y"?"height":"width"}const sa=new Set(["top","bottom"]);function pt(e){return sa.has(At(e))?"y":"x"}function Pn(e){return On(pt(e))}function aa(e,t,n){n===void 0&&(n=!1);const r=Zt(e),o=Pn(e),s=Cn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Pe(i)),[i,Pe(i)]}function ca(e){const t=Pe(e);return[tn(e),t,tn(t)]}function tn(e){return e.replace(/start|end/g,t=>ia[t])}const Xn=["left","right"],qn=["right","left"],la=["top","bottom"],ua=["bottom","top"];function da(e,t,n){switch(e){case"top":case"bottom":return n?t?qn:Xn:t?Xn:qn;case"left":case"right":return t?la:ua;default:return[]}}function fa(e,t,n,r){const o=Zt(e);let s=da(At(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(tn)))),s}function Pe(e){return e.replace(/left|right|bottom|top/g,t=>oa[t])}function ha(e){return{top:0,right:0,bottom:0,left:0,...e}}function to(e){return typeof e!="number"?ha(e):{top:e,right:e,bottom:e,left:e}}function Ee(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zn(e,t,n){let{reference:r,floating:o}=e;const s=pt(t),i=Pn(t),a=Cn(i),c=At(t),l=s==="y",g=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(c){case"top":f={x:g,y:r.y-o.height};break;case"bottom":f={x:g,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Zt(t)){case"start":f[i]-=h*(n&&l?-1:1);break;case"end":f[i]+=h*(n&&l?-1:1);break}return f}async function ga(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:g="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=St(t,e),p=to(f),b=a[h?d==="floating"?"reference":"floating":d],S=Ee(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:g,strategy:c})),C=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(P))?await(s.getScale==null?void 0:s.getScale(P))||{x:1,y:1}:{x:1,y:1},N=Ee(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:P,strategy:c}):C);return{top:(S.top-N.top+p.top)/A.y,bottom:(N.bottom-S.bottom+p.bottom)/A.y,left:(S.left-N.left+p.left)/A.x,right:(N.right-S.right+p.right)/A.x}}const pa=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:d}=Zn(l,r,c),h=r,f={},p=0;for(let b=0;b<a.length;b++){var m;const{name:S,fn:C}=a[b],{x:P,y:A,data:N,reset:R}=await C({x:g,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:l,platform:{...i,detectOverflow:(m=i.detectOverflow)!=null?m:ga},elements:{reference:e,floating:t}});g=P??g,d=A??d,f={...f,[S]:{...f[S],...N}},R&&p<=50&&(p++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(l=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:g,y:d}=Zn(l,h,c)),b=-1)}return{x:g,y:d,placement:h,strategy:o,middlewareData:f}},ma=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:g=0}=St(e,t)||{};if(l==null)return{};const d=to(g),h={x:n,y:r},f=Pn(o),p=Cn(f),m=await i.getDimensions(l),b=f==="y",S=b?"top":"left",C=b?"bottom":"right",P=b?"clientHeight":"clientWidth",A=s.reference[p]+s.reference[f]-h[f]-s.floating[p],N=h[f]-s.reference[f],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let _=R?R[P]:0;(!_||!await(i.isElement==null?void 0:i.isElement(R)))&&(_=a.floating[P]||s.floating[p]);const j=A/2-N/2,k=_/2-m[p]/2-1,z=Tt(d[S],k),Y=Tt(d[C],k),G=z,at=_-m[p]-Y,H=_/2-m[p]/2+j,ut=$e(G,H,at),nt=!c.arrow&&Zt(o)!=null&&H!==ut&&s.reference[p]/2-(H<G?z:Y)-m[p]/2<0,Z=nt?H<G?H-G:H-at:0;return{[f]:h[f]+Z,data:{[f]:ut,centerOffset:H-ut-Z,...nt&&{alignmentOffset:Z}},reset:nt}}}),va=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:g=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=St(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=At(o),C=pt(a),P=At(a)===a,A=await(c.isRTL==null?void 0:c.isRTL(l.floating)),N=h||(P||!m?[Pe(a)]:ca(a)),R=p!=="none";!h&&R&&N.push(...fa(a,m,p,A));const _=[a,...N],j=await c.detectOverflow(t,b),k=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(g&&k.push(j[S]),d){const H=aa(o,i,A);k.push(j[H[0]],j[H[1]])}if(z=[...z,{placement:o,overflows:k}],!k.every(H=>H<=0)){var Y,G;const H=(((Y=s.flip)==null?void 0:Y.index)||0)+1,ut=_[H];if(ut&&(!(d==="alignment"?C!==pt(ut):!1)||z.every(J=>pt(J.placement)===C?J.overflows[0]>0:!0)))return{data:{index:H,overflows:z},reset:{placement:ut}};let nt=(G=z.filter(Z=>Z.overflows[0]<=0).sort((Z,J)=>Z.overflows[1]-J.overflows[1])[0])==null?void 0:G.placement;if(!nt)switch(f){case"bestFit":{var at;const Z=(at=z.filter(J=>{if(R){const Q=pt(J.placement);return Q===C||Q==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(Q=>Q>0).reduce((Q,kt)=>Q+kt,0)]).sort((J,Q)=>J[1]-Q[1])[0])==null?void 0:at[0];Z&&(nt=Z);break}case"initialPlacement":nt=a;break}if(o!==nt)return{reset:{placement:nt}}}return{}}}};function Jn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qn(e){return ra.some(t=>e[t]>=0)}const ya=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=St(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Jn(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qn(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Jn(i,n.floating);return{data:{escapedOffsets:a,escaped:Qn(a)}}}default:return{}}}}},eo=new Set(["left","top"]);async function ba(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=At(n),a=Zt(n),c=pt(n)==="y",l=eo.has(i)?-1:1,g=s&&c?-1:1,d=St(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),c?{x:f*g,y:h*l}:{x:h*l,y:f*g}}const wa=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await ba(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},xa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:S=>{let{x:C,y:P}=S;return{x:C,y:P}}},...l}=St(e,t),g={x:n,y:r},d=await s.detectOverflow(t,l),h=pt(At(o)),f=On(h);let p=g[f],m=g[h];if(i){const S=f==="y"?"top":"left",C=f==="y"?"bottom":"right",P=p+d[S],A=p-d[C];p=$e(P,p,A)}if(a){const S=h==="y"?"top":"left",C=h==="y"?"bottom":"right",P=m+d[S],A=m-d[C];m=$e(P,m,A)}const b=c.fn({...t,[f]:p,[h]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:i,[h]:a}}}}}},Sa=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=St(e,t),g={x:n,y:r},d=pt(o),h=On(d);let f=g[h],p=g[d];const m=St(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const P=h==="y"?"height":"width",A=s.reference[h]-s.floating[P]+b.mainAxis,N=s.reference[h]+s.reference[P]-b.mainAxis;f<A?f=A:f>N&&(f=N)}if(l){var S,C;const P=h==="y"?"width":"height",A=eo.has(At(o)),N=s.reference[d]-s.floating[P]+(A&&((S=i.offset)==null?void 0:S[d])||0)+(A?0:b.crossAxis),R=s.reference[d]+s.reference[P]+(A?0:((C=i.offset)==null?void 0:C[d])||0)-(A?b.crossAxis:0);p<N?p=N:p>R&&(p=R)}return{[h]:f,[d]:p}}}},Aa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=St(e,t),g=await i.detectOverflow(t,l),d=At(o),h=Zt(o),f=pt(o)==="y",{width:p,height:m}=s.floating;let b,S;d==="top"||d==="bottom"?(b=d,S=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(S=d,b=h==="end"?"top":"bottom");const C=m-g.top-g.bottom,P=p-g.left-g.right,A=Tt(m-g[b],C),N=Tt(p-g[S],P),R=!t.middlewareData.shift;let _=A,j=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=P),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=C),R&&!h){const z=ot(g.left,0),Y=ot(g.right,0),G=ot(g.top,0),at=ot(g.bottom,0);f?j=p-2*(z!==0||Y!==0?z+Y:ot(g.left,g.right)):_=m-2*(G!==0||at!==0?G+at:ot(g.top,g.bottom))}await c({...t,availableWidth:j,availableHeight:_});const k=await i.getDimensions(a.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function Le(){return typeof window<"u"}function Jt(e){return no(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yt(e){var t;return(t=(no(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function no(e){return Le()?e instanceof Node||e instanceof st(e).Node:!1}function dt(e){return Le()?e instanceof Element||e instanceof st(e).Element:!1}function vt(e){return Le()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function $n(e){return!Le()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}const Oa=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Oa.has(o)}const Ca=new Set(["table","td","th"]);function Pa(e){return Ca.has(Jt(e))}const Ea=[":popover-open",":modal"];function We(e){return Ea.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ta=["transform","translate","scale","rotate","perspective"],Ma=["transform","translate","scale","rotate","perspective","filter"],Ra=["paint","layout","strict","content"];function En(e){const t=Tn(),n=dt(e)?ft(e):e;return Ta.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ma.some(r=>(n.willChange||"").includes(r))||Ra.some(r=>(n.contain||"").includes(r))}function Ia(e){let t=Mt(e);for(;vt(t)&&!Yt(t);){if(En(t))return t;if(We(t))return null;t=Mt(t)}return null}function Tn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Fa=new Set(["html","body","#document"]);function Yt(e){return Fa.has(Jt(e))}function ft(e){return st(e).getComputedStyle(e)}function ze(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mt(e){if(Jt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$n(e)&&e.host||yt(e);return $n(t)?t.host:t}function ro(e){const t=Mt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&fe(t)?t:ro(t)}function ae(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ro(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=st(o);if(s){const a=en(i);return t.concat(i,i.visualViewport||[],fe(o)?o:[],a&&n?ae(a):[])}return t.concat(o,ae(o,[],n))}function en(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oo(e){const t=ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=vt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ce(n)!==s||Ce(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Mn(e){return dt(e)?e:e.contextElement}function Kt(e){const t=Mn(e);if(!vt(t))return mt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=oo(t);let i=(s?Ce(n.width):n.width)/r,a=(s?Ce(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Na=mt(0);function io(e){const t=st(e);return!Tn()||!t.visualViewport?Na:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ka(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function zt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Mn(e);let i=mt(1);t&&(r?dt(r)&&(i=Kt(r)):i=Kt(e));const a=ka(s,n,r)?io(s):mt(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,g=o.width/i.x,d=o.height/i.y;if(s){const h=st(s),f=r&&dt(r)?st(r):r;let p=h,m=en(p);for(;m&&r&&f!==p;){const b=Kt(m),S=m.getBoundingClientRect(),C=ft(m),P=S.left+(m.clientLeft+parseFloat(C.paddingLeft))*b.x,A=S.top+(m.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,l*=b.y,g*=b.x,d*=b.y,c+=P,l+=A,p=st(m),m=en(p)}}return Ee({width:g,height:d,x:c,y:l})}function Ve(e,t){const n=ze(e).scrollLeft;return t?t.left+n:zt(yt(e)).left+n}function so(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ve(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Da(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=yt(r),a=t?We(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=mt(1);const g=mt(0),d=vt(r);if((d||!d&&!s)&&((Jt(r)!=="body"||fe(i))&&(c=ze(r)),vt(r))){const f=zt(r);l=Kt(r),g.x=f.x+r.clientLeft,g.y=f.y+r.clientTop}const h=i&&!d&&!s?so(i,c):mt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+g.x+h.x,y:n.y*l.y-c.scrollTop*l.y+g.y+h.y}}function _a(e){return Array.from(e.getClientRects())}function Ba(e){const t=yt(e),n=ze(e),r=e.ownerDocument.body,o=ot(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ot(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ve(e);const a=-n.scrollTop;return ft(r).direction==="rtl"&&(i+=ot(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const tr=25;function La(e,t){const n=st(e),r=yt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const g=Tn();(!g||g&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Ve(r);if(l<=0){const g=r.ownerDocument,d=g.body,h=getComputedStyle(d),f=g.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-f);p<=tr&&(s-=p)}else l<=tr&&(s+=l);return{width:s,height:i,x:a,y:c}}const Wa=new Set(["absolute","fixed"]);function za(e,t){const n=zt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=vt(e)?Kt(e):mt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function er(e,t,n){let r;if(t==="viewport")r=La(e,n);else if(t==="document")r=Ba(yt(e));else if(dt(t))r=za(t,n);else{const o=io(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ee(r)}function ao(e,t){const n=Mt(e);return n===t||!dt(n)||Yt(n)?!1:ft(n).position==="fixed"||ao(n,t)}function Va(e,t){const n=t.get(e);if(n)return n;let r=ae(e,[],!1).filter(a=>dt(a)&&Jt(a)!=="body"),o=null;const s=ft(e).position==="fixed";let i=s?Mt(e):e;for(;dt(i)&&!Yt(i);){const a=ft(i),c=En(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Wa.has(o.position)||fe(i)&&!c&&ao(e,i))?r=r.filter(g=>g!==i):o=a,i=Mt(i)}return t.set(e,r),r}function Ha(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?We(t)?[]:Va(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,g)=>{const d=er(t,g,o);return l.top=ot(d.top,l.top),l.right=Tt(d.right,l.right),l.bottom=Tt(d.bottom,l.bottom),l.left=ot(d.left,l.left),l},er(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ka(e){const{width:t,height:n}=oo(e);return{width:t,height:n}}function Ua(e,t,n){const r=vt(t),o=yt(t),s=n==="fixed",i=zt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=mt(0);function l(){c.x=Ve(o)}if(r||!r&&!s)if((Jt(t)!=="body"||fe(o))&&(a=ze(t)),r){const f=zt(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&l();s&&!r&&o&&l();const g=o&&!r&&!s?so(o,a):mt(0),d=i.left+a.scrollLeft-c.x-g.x,h=i.top+a.scrollTop-c.y-g.y;return{x:d,y:h,width:i.width,height:i.height}}function Ye(e){return ft(e).position==="static"}function nr(e,t){if(!vt(e)||ft(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yt(e)===n&&(n=n.ownerDocument.body),n}function co(e,t){const n=st(e);if(We(e))return n;if(!vt(e)){let o=Mt(e);for(;o&&!Yt(o);){if(dt(o)&&!Ye(o))return o;o=Mt(o)}return n}let r=nr(e,t);for(;r&&Pa(r)&&Ye(r);)r=nr(r,t);return r&&Yt(r)&&Ye(r)&&!En(r)?n:r||Ia(e)||n}const ja=async function(e){const t=this.getOffsetParent||co,n=this.getDimensions,r=await n(e.floating);return{reference:Ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ya(e){return ft(e).direction==="rtl"}const Ga={convertOffsetParentRelativeRectToViewportRelativeRect:Da,getDocumentElement:yt,getClippingRect:Ha,getOffsetParent:co,getElementRects:ja,getClientRects:_a,getDimensions:Ka,getScale:Kt,isElement:dt,isRTL:Ya};function lo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xa(e,t){let n=null,r;const o=yt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:g,top:d,width:h,height:f}=l;if(a||t(),!h||!f)return;const p=pe(d),m=pe(o.clientWidth-(g+h)),b=pe(o.clientHeight-(d+f)),S=pe(g),P={rootMargin:-p+"px "+-m+"px "+-b+"px "+-S+"px",threshold:ot(0,Tt(1,c))||1};let A=!0;function N(R){const _=R[0].intersectionRatio;if(_!==c){if(!A)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},1e3)}_===1&&!lo(l,e.getBoundingClientRect())&&i(),A=!1}try{n=new IntersectionObserver(N,{...P,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,P)}n.observe(e)}return i(!0),s}function qa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Mn(e),g=o||s?[...l?ae(l):[],...ae(t)]:[];g.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const d=l&&a?Xa(l,n):null;let h=-1,f=null;i&&(f=new ResizeObserver(S=>{let[C]=S;C&&C.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var P;(P=f)==null||P.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let p,m=c?zt(e):null;c&&b();function b(){const S=zt(e);m&&!lo(m,S)&&n(),m=S,p=requestAnimationFrame(b)}return n(),()=>{var S;g.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),d?.(),(S=f)==null||S.disconnect(),f=null,c&&cancelAnimationFrame(p)}}const Za=wa,Ja=xa,Qa=va,$a=Aa,tc=ya,ec=ma,nc=Sa,rc=(e,t,n)=>{const r=new Map,o={platform:Ga,...n},s={...o.platform,_c:r};return pa(e,t,{...o,platform:s})};function _t(e){return typeof e=="function"?e():e}function uo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rr(e,t){const n=uo(e);return Math.round(t*n)/n}function Wc(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 oc(e){const t=e.whileElementsMounted,n=x(()=>_t(e.open)??!0),r=x(()=>_t(e.middleware)),o=x(()=>_t(e.transform)??!0),s=x(()=>_t(e.placement)??"bottom"),i=x(()=>_t(e.strategy)??"absolute"),a=x(()=>_t(e.sideOffset)??0),c=x(()=>_t(e.alignOffset)??0),l=e.reference;let g=T(0),d=T(0);const h=gt(null);let f=T(Ht(u(i))),p=T(Ht(u(s))),m=T(Ht({})),b=T(!1),S=!1;const C=x(()=>{const k=h.current?rr(h.current,u(g)):u(g),z=h.current?rr(h.current,u(d)):u(d);return u(o)?{position:u(f),left:"0",top:"0",transform:`translate(${k}px, ${z}px)`,...h.current&&uo(h.current)>=1.5&&{willChange:"transform"}}:{position:u(f),left:`${k}px`,top:`${z}px`}});let P;function A(){l.current===null||h.current===null||rc(l.current,h.current,{middleware:u(r),placement:u(s),strategy:u(i)}).then(k=>{const z=l.current;if(ic(z)){y(m,{...u(m),hide:{...u(m).hide,referenceHidden:!0}},!0);return}if(!u(n)&&u(g)!==0&&u(d)!==0){const G=Math.max(Math.abs(u(a)),Math.abs(u(c)),15);if(k.x<=G&&k.y<=G)return}y(g,k.x,!0),y(d,k.y,!0),y(f,k.strategy,!0),y(p,k.placement,!0),y(m,k.middlewareData,!0),y(b,!0)})}function N(){typeof P=="function"&&(P(),P=void 0)}function R(){if(N(),t===void 0){A();return}u(n)&&(l.current===null||h.current===null||(P=t(l.current,h.current,A)))}function _(){u(n)||y(b,!1)}function j(){return[u(r),u(s),u(i),u(a),u(c),u(n)]}return $(()=>{t===void 0&&u(n)&&A()}),$(R),$(()=>{if(t!==void 0){if(j(),!u(n)){S=!1;return}if(!u(b)){S=!1;return}if(!S){S=!0;return}A()}}),$(_),$(()=>N),{floating:h,reference:l,get strategy(){return u(f)},get placement(){return u(p)},get middlewareData(){return u(m)},get isPositioned(){return u(b)},get floatingStyles(){return u(C)},get update(){return A}}}function ic(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const sc={top:"bottom",right:"left",bottom:"top",left:"right"},Rn=new Nt("Floating.Root"),or=new Nt("Floating.Content"),In=new Nt("Floating.Root");class Te{static create(t=!1){return t?In.set(new Te):Rn.set(new Te)}anchorNode=gt(null);customAnchorNode=gt(null);triggerNode=gt(null);constructor(){$(()=>{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 Me{static create(t,n=!1){return n?or.set(new Me(t,In.get())):or.set(new Me(t,Rn.get()))}opts;root;contentRef=gt(null);wrapperRef=gt(null);arrowRef=gt(null);contentAttachment=rt(this.contentRef);wrapperAttachment=rt(this.wrapperRef);arrowAttachment=rt(this.arrowRef);arrowId=gt(An());#t=x(()=>{if(typeof this.opts.style=="string")return oe(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new yi(()=>this.arrowRef.current??void 0);#r=x(()=>this.#n?.width??0);#o=x(()=>this.#n?.height??0);#i=x(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=x(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=x(()=>u(this.#a).length>0);get hasExplicitBoundaries(){return u(this.#s)}set hasExplicitBoundaries(t){y(this.#s,t)}#c=x(()=>({padding:this.opts.collisionPadding.current,boundary:u(this.#a).filter(_i),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return u(this.#c)}set detectOverflowOptions(t){y(this.#c,t)}#u=T(void 0);#l=T(void 0);#d=T(void 0);#h=T(void 0);#g=x(()=>[Za({mainAxis:this.opts.sideOffset.current+u(this.#o),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Ja({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?nc():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Qa({...this.detectOverflowOptions}),$a({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:s}=t.reference;y(this.#u,n,!0),y(this.#l,r,!0),y(this.#d,o,!0),y(this.#h,s,!0)}}),this.arrowRef.current&&ec({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),ac({arrowWidth:u(this.#r),arrowHeight:u(this.#o)}),this.opts.hideWhenDetached.current&&tc({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return u(this.#g)}set middleware(t){y(this.#g,t)}floating;#p=x(()=>cc(this.floating.placement));get placedSide(){return u(this.#p)}set placedSide(t){y(this.#p,t)}#m=x(()=>lc(this.floating.placement));get placedAlign(){return u(this.#m)}set placedAlign(t){y(this.#m,t)}#f=x(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return u(this.#f)}set arrowX(t){y(this.#f,t)}#v=x(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return u(this.#v)}set arrowY(t){y(this.#v,t)}#y=x(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return u(this.#y)}set cannotCenterArrow(t){y(this.#y,t)}#b=T();get contentZIndex(){return u(this.#b)}set contentZIndex(t){y(this.#b,t,!0)}#w=x(()=>sc[this.placedSide]);get arrowBaseSide(){return u(this.#w)}set arrowBaseSide(t){y(this.#w,t)}#x=x(()=>({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":`${u(this.#u)}px`,"--bits-floating-available-height":`${u(this.#l)}px`,"--bits-floating-anchor-width":`${u(this.#d)}px`,"--bits-floating-anchor-height":`${u(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...u(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return u(this.#x)}set wrapperProps(t){y(this.#x,t)}#S=x(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:fr({...u(this.#t)}),...this.contentAttachment}));get props(){return u(this.#S)}set props(t){y(this.#S,t)}#A=x(()=>({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 u(this.#A)}set arrowStyle(t){y(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),U(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=oc({strategy:()=>this.opts.strategy.current,placement:()=>u(this.#i),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>qa(...r,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),$(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),U(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const o=rn(r),s=o.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const i=o.getComputedStyle(r).zIndex;i!==this.contentZIndex&&(this.contentZIndex=i)});return()=>{o.cancelAnimationFrame(s)}}),$(()=>{this.floating.floating.current=this.wrapperRef.current})}}class Re{static create(t,n=!1){return n?new Re(t,In.get()):new Re(t,Rn.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=lr(t.virtualEl.current):n.triggerNode=t.ref}}function ac(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,g]=Fn(n),d={start:"0%",center:"50%",end:"100%"}[g],h=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+c/2;let p="",m="";return l==="bottom"?(p=i?d:`${h}px`,m=`${-c}px`):l==="top"?(p=i?d:`${h}px`,m=`${r.floating.height+c}px`):l==="right"?(p=`${-c}px`,m=i?d:`${f}px`):l==="left"&&(p=`${r.floating.width+c}px`,m=i?d:`${f}px`),{data:{x:p,y:m}}}}}function Fn(e){const[t,n="center"]=e.split("-");return[t,n]}function cc(e){return Fn(e)[0]}function lc(e){return Fn(e)[1]}function zc(e,t){I(t,!0);let n=v(t,"tooltip",3,!1);Te.create(n());var r=M(),o=E(r);D(o,()=>t.children??L),O(e,r),F()}function Vc(e,t){I(t,!0);let n=v(t,"tooltip",3,!1);Re.create({id:w(()=>t.id),virtualEl:w(()=>t.virtualEl),ref:t.ref},n());var r=M(),o=E(r);D(o,()=>t.children??L),O(e,r),F()}function uc(e,t){I(t,!0);let n=v(t,"side",3,"bottom"),r=v(t,"sideOffset",3,0),o=v(t,"align",3,"center"),s=v(t,"alignOffset",3,0),i=v(t,"arrowPadding",3,0),a=v(t,"avoidCollisions",3,!0),c=v(t,"collisionBoundary",19,()=>[]),l=v(t,"collisionPadding",3,0),g=v(t,"hideWhenDetached",3,!1),d=v(t,"onPlaced",3,()=>{}),h=v(t,"sticky",3,"partial"),f=v(t,"updatePositionStrategy",3,"optimized"),p=v(t,"strategy",3,"fixed"),m=v(t,"dir",3,"ltr"),b=v(t,"style",19,()=>({})),S=v(t,"wrapperId",19,An),C=v(t,"customAnchor",3,null),P=v(t,"tooltip",3,!1);const A=Me.create({side:w(()=>n()),sideOffset:w(()=>r()),align:w(()=>o()),alignOffset:w(()=>s()),id:w(()=>t.id),arrowPadding:w(()=>i()),avoidCollisions:w(()=>a()),collisionBoundary:w(()=>c()),collisionPadding:w(()=>l()),hideWhenDetached:w(()=>g()),onPlaced:w(()=>d()),sticky:w(()=>h()),updatePositionStrategy:w(()=>f()),strategy:w(()=>p()),dir:w(()=>m()),style:w(()=>b()),enabled:w(()=>t.enabled),wrapperId:w(()=>S()),customAnchor:w(()=>C())},P()),N=x(()=>it(A.wrapperProps,{style:{pointerEvents:"auto"}}));var R=M(),_=E(R);D(_,()=>t.content??L,()=>({props:A.props,wrapperProps:u(N)})),O(e,R),F()}function dc(e,t){I(t,!0),Po(()=>{t.onPlaced?.()});var n=M(),r=E(n);D(r,()=>t.content??L,()=>({props:{},wrapperProps:{}})),O(e,n),F()}function fc(e,t){let n=v(t,"isStatic",3,!1),r=W(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var o=M(),s=E(o);{var i=c=>{dc(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{uc(c,tt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};K(s,c=>{n()?c(i):c(a,!1)})}O(e,o)}var hc=ht("<!> <!>",1);function fo(e,t){I(t,!0);let n=v(t,"interactOutsideBehavior",3,"close"),r=v(t,"trapFocus",3,!0),o=v(t,"isValidEvent",3,()=>!1),s=v(t,"customAnchor",3,null),i=v(t,"isStatic",3,!1),a=v(t,"tooltip",3,!1),c=v(t,"contentPointerEvents",3,"auto"),l=W(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"]);fc(e,{get isStatic(){return i()},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 t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(d,h)=>{let f=()=>h?.().props,p=()=>h?.().wrapperProps;var m=hc(),b=E(m);{var S=A=>{Oe(A,{get preventScroll(){return t.preventScroll}})},C=A=>{Oe(A,{get preventScroll(){return t.preventScroll}})};K(b,A=>{t.forceMount&&t.enabled?A(S):t.forceMount||A(C,1)})}var P=ve(b,2);Jr(P,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(N,R)=>{let _=()=>R?.().props;Zr(N,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(j,k)=>{qr(j,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return o()},get enabled(){return t.enabled},get ref(){return t.ref},children:(Y,G)=>{let at=()=>G?.().props;Qr(Y,{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:(H,ut)=>{var nt=M(),Z=E(nt);{let J=x(()=>({props:it(l,f(),at(),_(),{style:{pointerEvents:c()}}),wrapperProps:p()}));D(Z,()=>t.popper??L,()=>u(J))}O(H,nt)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),O(d,m)},$$slots:{content:!0}}),F()}function Hc(e,t){let n=v(t,"interactOutsideBehavior",3,"close"),r=v(t,"trapFocus",3,!0),o=v(t,"isValidEvent",3,()=>!1),s=v(t,"customAnchor",3,null),i=v(t,"isStatic",3,!1),a=W(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=M(),l=E(c);{var g=d=>{fo(d,tt({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 s()},get isStatic(){return i()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};K(l,d=>{t.shouldRender&&d(g)})}O(e,c)}function Kc(e,t){let n=v(t,"interactOutsideBehavior",3,"close"),r=v(t,"trapFocus",3,!0),o=v(t,"isValidEvent",3,()=>!1),s=v(t,"customAnchor",3,null),i=v(t,"isStatic",3,!1),a=W(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"]);fo(e,tt({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 s()},get isStatic(){return i()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}function Uc(e){return et(`/api/repos/${encodeURIComponent(e)}/sync`,{method:"POST"})}function jc(){return et("/api/sync",{method:"POST"})}function Yc(e,t,n){return et(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(n)}/refresh`,{method:"POST"})}function Gc(e,t,n){return et(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(n)}/refresh/apply`,{method:"POST"})}function Xc(){return et("/api/sources")}function qc(){return et("/api/connectors")}function Zc(e){return et(`/api/connectors/${encodeURIComponent(e)}/config`)}function Jc(e,t){return et(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"POST",body:JSON.stringify({...t,name:e})})}function Qc(e){return et(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"DELETE"})}function $c(e){return et(`/api/sources/${encodeURIComponent(e)}`)}function tl(e,t){return et(`/api/sources/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify(t)})}function el(e,t){return et(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({sync:t})})}function nl(e){return et(`/api/connectors/${encodeURIComponent(e)}/oauth/authorize`,{method:"POST"})}function rl(e){return et(`/api/connectors/${encodeURIComponent(e)}/oauth/status`)}function ol(e){return et(`/api/connectors/${encodeURIComponent(e)}/oauth/disconnect`,{method:"POST"})}function il(e,t){I(t,!0);let n=v(t,"open",15,!1),r=W(t,["$$slots","$$events","$$legacy","open"]);var o=M(),s=E(o);It(s,()=>Vi,(i,a)=>{a(i,tt(()=>r,{get open(){return n()},set open(c){n(c)}}))}),O(e,o),F()}function gc(e,t){let n=W(t,["$$slots","$$events","$$legacy"]);var r=M(),o=E(r);It(o,()=>es,(s,i)=>{i(s,tt(()=>n))}),O(e,r)}function sl(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=E(o);{let i=x(()=>Ft("text-lg font-semibold",t.class));It(s,()=>Ki,(a,c)=>{c(a,tt({"data-slot":"alert-dialog-title",get class(){return u(i)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),F()}function al(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=E(o);{let i=x(()=>t.class||Ft(cr()));It(s,()=>ji,(a,c)=>{c(a,tt({"data-slot":"alert-dialog-action",get class(){return u(i)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),F()}function cl(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=E(o);{let i=x(()=>t.class||Ft(cr({variant:"ghost"})));It(s,()=>Gi,(a,c)=>{c(a,tt({"data-slot":"alert-dialog-cancel",get class(){return u(i)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),F()}var pc=ht("<div><!></div>");function ll(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=pc();lt(o,i=>({"data-slot":"alert-dialog-footer",class:i,...r}),[()=>Ft("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var s=X(o);D(s,()=>t.children??L),q(o),ar(o,i=>n(i),()=>n()),O(e,o),F()}var mc=ht("<div><!></div>");function ul(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=mc();lt(o,i=>({"data-slot":"alert-dialog-header",class:i,...r}),[()=>Ft("flex flex-col gap-2 text-center sm:text-start",t.class)]);var s=X(o);D(s,()=>t.children??L),q(o),ar(o,i=>n(i),()=>n()),O(e,o),F()}function vc(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=E(o);{let i=x(()=>Ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));It(s,()=>ta,(a,c)=>{c(a,tt({"data-slot":"alert-dialog-overlay",get class(){return u(i)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),F()}var yc=ht("<!> <!>",1);function dl(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class","portalProps"]);gc(e,tt(()=>t.portalProps,{children:(o,s)=>{var i=yc(),a=E(i);vc(a,{});var c=ve(a,2);{let l=x(()=>Ft("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));It(c,()=>Qs,(g,d)=>{d(g,tt({"data-slot":"alert-dialog-content",get class(){return u(l)}},()=>r,{get ref(){return n()},set ref(h){n(h)}}))})}O(o,i)},$$slots:{default:!0}})),F()}function fl(e,t){I(t,!0);let n=v(t,"ref",15,null),r=W(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=E(o);{let i=x(()=>Ft("text-[var(--color-text-secondary)] text-sm",t.class));It(s,()=>na,(a,c)=>{c(a,tt({"data-slot":"alert-dialog-description",get class(){return u(i)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),F()}var bc=Rt("<title> </title>"),wc=Rt('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function hl(e,t){const n=Et(t,["children","$$slots","$$events","$$legacy"]),r=Et(n,["size","title"]);I(t,!1);const o=Pt(),s=Pt();let i=v(t,"size",8,16),a=v(t,"title",8,void 0);Ct(()=>(ct(n),ct(a())),()=>{y(o,n["aria-label"]||n["aria-labelledby"]||a())}),Ct(()=>(u(o),ct(n)),()=>{y(s,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Ne(),Fe();var c=wc();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:i(),height:i(),...u(s),...r}));var l=X(c);{var g=d=>{var h=bc(),f=X(h,!0);q(h),De(()=>Ie(f,a())),O(d,h)};K(l,d=>{a()&&d(g)})}ke(),q(c),O(e,c),F()}export{kc as $,dl as A,Rc as B,hl as C,Xr as D,Zr as E,zc as F,Ic as G,Gc as H,Yc as I,fr as J,Nt as K,rt as L,Yr as M,Je as N,jt as O,Kc as P,sn as Q,de as R,Oe as S,Qr as T,Be as U,yr as V,U as W,bt as X,br as Y,Li as Z,on as _,Gr as a,wt as a0,Cs as a1,zr as a2,Wr as a3,Ts as a4,ye as a5,se as a6,Ri as a7,Mi as a8,xr as a9,Ti as aa,wr as ab,Dc as ac,_c as ad,Bc as ae,Lc as af,Xt as ag,zn as ah,Nc as ai,Xc as aj,qc as ak,Ro as al,tl as am,$c as an,el as ao,Zc as ap,Jc as aq,ol as ar,Qc as as,nl as at,rl as au,Or as av,Io as aw,na as ax,jc as ay,Uc as az,w as b,qt as c,Kr as d,Ur as e,jr as f,Hc as g,Wc as h,Vc as i,es as j,ul as k,sl as l,it as m,B as n,fl as o,ll as p,cl as q,al as r,il as s,ln as t,hn as u,Jr as v,qr as w,ta as x,Ki as y,Fc as z};
@@ -1 +1 @@
1
- import{a as n,b as c}from"./DfwW1gF2.js";import{c as p}from"./Brxs8A3C.js";import{p as d,b as m}from"./yMbbhP0p.js";import{a as u}from"./l5w7mUkV.js";import{b as f}from"./BnPh5q8z.js";import{b}from"./DSZYl5ah.js";import{p as a,r as v}from"./DVyuW48M.js";var x=c("<input/>");function j(l,r){d(r,!0);let e=a(r,"ref",15,null),s=a(r,"value",15),i=v(r,["$$slots","$$events","$$legacy","class","ref","value"]);var o=x();u(o,t=>({class:t,...i}),[()=>p("h-8 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-2.5 text-[14px] text-[var(--color-text-primary)] font-[inherit] outline-none transition-colors placeholder:text-[var(--color-text-tertiary)] focus:border-[var(--color-accent,#e05050)] disabled:cursor-not-allowed disabled:opacity-50",r.class)],void 0,void 0,void 0,!0),b(o,t=>e(t),()=>e()),f(o,s),n(l,o),m()}export{j as I};
1
+ import{a as n,b as c}from"./yEDUbZbk.js";import{c as p}from"./DYpjUIN_.js";import{p as d,b as m}from"./BBDMeJL4.js";import{a as u}from"./BMrbs3EC.js";import{b as f}from"./3ONneP0Z.js";import{b}from"./Dtbtl5su.js";import{p as a,r as v}from"./CpXgbTWt.js";var x=c("<input/>");function j(l,r){d(r,!0);let e=a(r,"ref",15,null),s=a(r,"value",15),i=v(r,["$$slots","$$events","$$legacy","class","ref","value"]);var o=x();u(o,t=>({class:t,...i}),[()=>p("h-8 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-2.5 text-[14px] text-[var(--color-text-primary)] font-[inherit] outline-none transition-colors placeholder:text-[var(--color-text-tertiary)] focus:border-[var(--color-accent,#e05050)] disabled:cursor-not-allowed disabled:opacity-50",r.class)],void 0,void 0,void 0,!0),b(o,t=>e(t),()=>e()),f(o,s),n(l,o),m()}export{j as I};
@@ -1,2 +1,2 @@
1
- import{aT as ae,g as K,a2 as oe,a1 as le,aU as U,U as N,M as Q,q as l,h as _,am as b,aV as q,e as ue,f as Y,w as fe,aW as z,B as m,u as R,aX as I,P as C,ay as ce,aY as X,aZ as de,a_ as G,a$ as he,b0 as _e,aw as L,b1 as O,b2 as J,b3 as pe,b4 as ee,a8 as te,y as ve,T as P,k as S,n as ge,j as be,b5 as k,E as me,_ as ye,b6 as Te,b7 as Ee,aH as we,b8 as Ne,aB as Re,b9 as Se,v as A,ba as Ae,bb as ke,bc as De,bd as Me,be as Le,bf as Oe,C as $,bg as F,H as xe,V as Ie,bh as V,o as D,bi as Ce,S as Pe,bj as Fe,J as Ve,p as He,x as We,bk as Be,b as Ye}from"./yMbbhP0p.js";function $e(t){let e=0,r=Q(0),s;return()=>{ae()&&(K(r),oe(()=>(e===0&&(s=le(()=>t(()=>U(r)))),e+=1,()=>{N(()=>{e-=1,e===0&&(s?.(),s=void 0,U(r))})})))}}var je=me|ye;function Ue(t,e,r,s){new qe(t,e,r,s)}class qe{parent;is_pending=!1;transform_error;#t;#v=_?l:null;#s;#u;#e;#i=null;#r=null;#n=null;#a=null;#f=0;#l=0;#c=!1;#d=new Set;#h=new Set;#o=null;#m=$e(()=>(this.#o=Q(this.#f),()=>{this.#o=null}));constructor(e,r,s,i){this.#t=e,this.#s=r,this.#u=n=>{var a=b;a.b=this,a.f|=q,s(n)},this.parent=b.b,this.transform_error=i??this.parent?.transform_error??(n=>n),this.#e=ue(()=>{if(_){const n=this.#v;Y();const a=n.data===fe;if(n.data.startsWith(z)){const o=JSON.parse(n.data.slice(z.length));this.#T(o)}else a?this.#E():this.#y()}else this.#g()},je),_&&(this.#t=l)}#y(){try{this.#i=m(()=>this.#u(this.#t))}catch(e){this.error(e)}}#T(e){const r=this.#s.failed;r&&(this.#n=m(()=>{r(this.#t,()=>e,()=>()=>{})}))}#E(){const e=this.#s.pending;e&&(this.is_pending=!0,this.#r=m(()=>e(this.#t)),N(()=>{var r=this.#a=document.createDocumentFragment(),s=R();r.append(s),this.#i=this.#p(()=>(I.ensure(),m(()=>this.#u(s)))),this.#l===0&&(this.#t.before(r),this.#a=null,C(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#f=0,this.#i=m(()=>{this.#u(this.#t)}),this.#l>0){var e=this.#a=document.createDocumentFragment();ce(this.#i,e);const r=this.#s.pending;this.#r=m(()=>r(this.#t))}else this.#_()}catch(r){this.error(r)}}#_(){this.is_pending=!1;for(const e of this.#d)X(e,de),G(e);for(const e of this.#h)X(e,he),G(e);this.#d.clear(),this.#h.clear()}defer_effect(e){_e(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(e){var r=b,s=ee,i=te;L(this.#e),O(this.#e),J(this.#e.ctx);try{return e()}catch(n){return pe(n),null}finally{L(r),O(s),J(i)}}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#l+=e,this.#l===0&&(this.#_(),this.#r&&C(this.#r,()=>{this.#r=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e){this.#b(e),this.#f+=e,!(!this.#o||this.#c)&&(this.#c=!0,N(()=>{this.#c=!1,this.#o&&ve(this.#o,this.#f)}))}get_effect_pending(){return this.#m(),K(this.#o)}error(e){var r=this.#s.onerror;let s=this.#s.failed;if(!r&&!s)throw e;this.#i&&(P(this.#i),this.#i=null),this.#r&&(P(this.#r),this.#r=null),this.#n&&(P(this.#n),this.#n=null),_&&(S(this.#v),ge(),S(be()));var i=!1,n=!1;const a=()=>{if(i){Ee();return}i=!0,n&&Te(),this.#n!==null&&C(this.#n,()=>{this.#n=null}),this.#p(()=>{I.ensure(),this.#g()})},f=o=>{try{n=!0,r?.(o,a),n=!1}catch(u){k(u,this.#e&&this.#e.parent)}s&&(this.#n=this.#p(()=>{I.ensure();try{return m(()=>{var u=b;u.b=this,u.f|=q,s(this.#t,()=>o,()=>a)})}catch(u){return k(u,this.#e.parent),null}}))};N(()=>{var o;try{o=this.transform_error(e)}catch(u){k(u,this.#e&&this.#e.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(f,u=>k(u,this.#e&&this.#e.parent)):f(o)})}}function st(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ze=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function it(t){return ze.includes(t)}const Xe={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function at(t){return t=t.toLowerCase(),Xe[t]??t}const Ge=["touchstart","touchmove"];function Je(t){return Ge.includes(t)}const Ze=["textarea","script","style","title"];function ot(t){return Ze.includes(t)}const w=Symbol("events"),re=new Set,H=new Set;function ne(t,e,r,s={}){function i(n){if(s.capture||W.call(e,n),!n.cancelBubble)return Ne(()=>r?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?N(()=>{e.addEventListener(t,i,s)}):e.addEventListener(t,i,s),i}function lt(t,e,r,s={}){var i=ne(e,t,r,s);return()=>{t.removeEventListener(e,i,s)}}function ut(t,e,r,s,i){var n={capture:s,passive:i},a=ne(t,e,r,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&we(()=>{e.removeEventListener(t,a,n)})}function ft(t,e,r){(e[w]??={})[t]=r}function ct(t){for(var e=0;e<t.length;e++)re.add(t[e]);for(var r of H)r(t)}let Z=null;function W(t){var e=this,r=e.ownerDocument,s=t.type,i=t.composedPath?.()||[],n=i[0]||t.target;Z=t;var a=0,f=Z===t&&t[w];if(f){var o=i.indexOf(f);if(o!==-1&&(e===document||e===window)){t[w]=e;return}var u=i.indexOf(e);if(u===-1)return;o<=u&&(a=o)}if(n=i[a]||t.target,n!==e){Re(t,"currentTarget",{configurable:!0,get(){return n||r}});var y=ee,E=b;O(null),L(null);try{for(var g,d=[];n!==null;){var c=n.assignedSlot||n.parentNode||n.host||null;try{var h=n[w]?.[s];h!=null&&(!n.disabled||t.target===n)&&h.call(n,t)}catch(p){g?d.push(p):g=p}if(t.cancelBubble||c===e||c===null)break;n=c}if(g){for(let p of d)queueMicrotask(()=>{throw p});throw g}}finally{t[w]=e,delete t.currentTarget,O(y),L(E)}}}const Ke=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Qe(t){return Ke?.createHTML(t)??t}function se(t){var e=Se("template");return e.innerHTML=Qe(t.replaceAll("<!>","<!---->")),e.content}function v(t,e){var r=b;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function dt(t,e){var r=(e&ke)!==0,s=(e&De)!==0,i,n=!t.startsWith("<!>");return()=>{if(_)return v(l,null),l;i===void 0&&(i=se(n?t:"<!>"+t),r||(i=A(i)));var a=s||Ae?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=A(a),o=a.lastChild;v(f,o)}else v(a,a);return a}}function et(t,e,r="svg"){var s=!t.startsWith("<!>"),i=`<${r}>${s?t:"<!>"+t}</${r}>`,n;return()=>{if(_)return v(l,null),l;if(!n){var a=se(i),f=A(a);n=A(f)}var o=n.cloneNode(!0);return v(o,o),o}}function ht(t,e){return et(t,e,"svg")}function _t(t=""){if(!_){var e=R(t+"");return v(e,e),e}var r=l;return r.nodeType!==Me?(r.before(r=R()),S(r)):Le(r),v(r,r),r}function pt(){if(_)return v(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=R();return t.append(e,r),v(e,r),t}function vt(t,e){if(_){var r=b;((r.f&Oe)===0||r.nodes.end===null)&&(r.nodes.end=l),Y();return}t!==null&&t.before(e)}function gt(){if(_&&l&&l.nodeType===$&&l.textContent?.startsWith("$")){const t=l.textContent.substring(1);return Y(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function bt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function tt(t,e){return ie(t,e)}function mt(t,e){F(),e.intro=e.intro??!1;const r=e.target,s=_,i=l;try{for(var n=A(r);n&&(n.nodeType!==$||n.data!==xe);)n=Ie(n);if(!n)throw V;D(!0),S(n);const a=ie(t,{...e,anchor:n});return D(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
- `).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==V&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Ce(),F(),Pe(r),D(!1),tt(t,e)}finally{D(s),S(i)}}const M=new Map;function ie(t,{target:e,anchor:r,props:s={},events:i,context:n,intro:a=!0,transformError:f}){F();var o=void 0,u=Fe(()=>{var y=r??e.appendChild(R());Ue(y,{pending:()=>{}},d=>{He({});var c=te;if(n&&(c.c=n),i&&(s.$$events=i),_&&v(d,null),o=t(d,s)||{},_&&(b.nodes.end=l,l===null||l.nodeType!==$||l.data!==We))throw Be(),V;Ye()},f);var E=new Set,g=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!E.has(h)){E.add(h);var p=Je(h);for(const x of[e,document]){var T=M.get(x);T===void 0&&(T=new Map,M.set(x,T));var j=T.get(h);j===void 0?(x.addEventListener(h,W,{passive:p}),T.set(h,1)):T.set(h,j+1)}}}};return g(Ve(re)),H.add(g),()=>{for(var d of E)for(const p of[e,document]){var c=M.get(p),h=c.get(d);--h==0?(p.removeEventListener(d,W),c.delete(d),c.size===0&&M.delete(p)):c.set(d,h)}H.delete(g),y!==r&&y.parentNode?.removeChild(y)}});return B.set(o,u),o}let B=new WeakMap;function yt(t,e){const r=B.get(t);return r?(B.delete(t),r(e)):Promise.resolve()}const rt="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(rt);export{vt as a,dt as b,ft as c,ct as d,ut as e,ht as f,pt as g,mt as h,st as i,ne as j,it as k,$e as l,tt as m,at as n,lt as o,gt as p,v as q,ot as r,bt as s,_t as t,yt as u};
1
+ import{aV as ae,g as K,a2 as oe,a1 as le,aW as q,U as N,M as Q,q as l,h as _,aq as b,aX as U,e as ue,f as Y,w as fe,aY as z,B as m,u as R,aZ as I,P as C,aD as ce,a_ as X,a$ as de,b0 as G,b1 as he,b2 as _e,aB as L,b3 as O,b4 as J,b5 as pe,b6 as ee,a6 as te,y as ve,T as P,k as S,n as ge,j as be,b7 as k,E as me,_ as ye,b8 as Ee,b9 as Te,ak as we,ba as Ne,al as Re,bb as Se,v as A,bc as Ae,bd as ke,be as De,bf as Me,bg as Le,bh as Oe,C as $,bi as F,H as xe,V as Ie,bj as V,o as D,bk as Ce,S as Pe,bl as Fe,J as Ve,p as We,x as Be,bm as He,b as Ye}from"./BBDMeJL4.js";function $e(t){let e=0,r=Q(0),s;return()=>{ae()&&(K(r),oe(()=>(e===0&&(s=le(()=>t(()=>q(r)))),e+=1,()=>{N(()=>{e-=1,e===0&&(s?.(),s=void 0,q(r))})})))}}var je=me|ye;function qe(t,e,r,s){new Ue(t,e,r,s)}class Ue{parent;is_pending=!1;transform_error;#t;#v=_?l:null;#s;#u;#e;#i=null;#r=null;#n=null;#a=null;#f=0;#l=0;#c=!1;#d=new Set;#h=new Set;#o=null;#m=$e(()=>(this.#o=Q(this.#f),()=>{this.#o=null}));constructor(e,r,s,i){this.#t=e,this.#s=r,this.#u=n=>{var a=b;a.b=this,a.f|=U,s(n)},this.parent=b.b,this.transform_error=i??this.parent?.transform_error??(n=>n),this.#e=ue(()=>{if(_){const n=this.#v;Y();const a=n.data===fe;if(n.data.startsWith(z)){const o=JSON.parse(n.data.slice(z.length));this.#E(o)}else a?this.#T():this.#y()}else this.#g()},je),_&&(this.#t=l)}#y(){try{this.#i=m(()=>this.#u(this.#t))}catch(e){this.error(e)}}#E(e){const r=this.#s.failed;r&&(this.#n=m(()=>{r(this.#t,()=>e,()=>()=>{})}))}#T(){const e=this.#s.pending;e&&(this.is_pending=!0,this.#r=m(()=>e(this.#t)),N(()=>{var r=this.#a=document.createDocumentFragment(),s=R();r.append(s),this.#i=this.#p(()=>(I.ensure(),m(()=>this.#u(s)))),this.#l===0&&(this.#t.before(r),this.#a=null,C(this.#r,()=>{this.#r=null}),this.#_())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#f=0,this.#i=m(()=>{this.#u(this.#t)}),this.#l>0){var e=this.#a=document.createDocumentFragment();ce(this.#i,e);const r=this.#s.pending;this.#r=m(()=>r(this.#t))}else this.#_()}catch(r){this.error(r)}}#_(){this.is_pending=!1;for(const e of this.#d)X(e,de),G(e);for(const e of this.#h)X(e,he),G(e);this.#d.clear(),this.#h.clear()}defer_effect(e){_e(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#p(e){var r=b,s=ee,i=te;L(this.#e),O(this.#e),J(this.#e.ctx);try{return e()}catch(n){return pe(n),null}finally{L(r),O(s),J(i)}}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#l+=e,this.#l===0&&(this.#_(),this.#r&&C(this.#r,()=>{this.#r=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e){this.#b(e),this.#f+=e,!(!this.#o||this.#c)&&(this.#c=!0,N(()=>{this.#c=!1,this.#o&&ve(this.#o,this.#f)}))}get_effect_pending(){return this.#m(),K(this.#o)}error(e){var r=this.#s.onerror;let s=this.#s.failed;if(!r&&!s)throw e;this.#i&&(P(this.#i),this.#i=null),this.#r&&(P(this.#r),this.#r=null),this.#n&&(P(this.#n),this.#n=null),_&&(S(this.#v),ge(),S(be()));var i=!1,n=!1;const a=()=>{if(i){Te();return}i=!0,n&&Ee(),this.#n!==null&&C(this.#n,()=>{this.#n=null}),this.#p(()=>{I.ensure(),this.#g()})},f=o=>{try{n=!0,r?.(o,a),n=!1}catch(u){k(u,this.#e&&this.#e.parent)}s&&(this.#n=this.#p(()=>{I.ensure();try{return m(()=>{var u=b;u.b=this,u.f|=U,s(this.#t,()=>o,()=>a)})}catch(u){return k(u,this.#e.parent),null}}))};N(()=>{var o;try{o=this.transform_error(e)}catch(u){k(u,this.#e&&this.#e.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(f,u=>k(u,this.#e&&this.#e.parent)):f(o)})}}function st(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ze=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function it(t){return ze.includes(t)}const Xe={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function at(t){return t=t.toLowerCase(),Xe[t]??t}const Ge=["touchstart","touchmove"];function Je(t){return Ge.includes(t)}const Ze=["textarea","script","style","title"];function ot(t){return Ze.includes(t)}const w=Symbol("events"),re=new Set,W=new Set;function ne(t,e,r,s={}){function i(n){if(s.capture||B.call(e,n),!n.cancelBubble)return Ne(()=>r?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?N(()=>{e.addEventListener(t,i,s)}):e.addEventListener(t,i,s),i}function lt(t,e,r,s={}){var i=ne(e,t,r,s);return()=>{t.removeEventListener(e,i,s)}}function ut(t,e,r,s,i){var n={capture:s,passive:i},a=ne(t,e,r,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&we(()=>{e.removeEventListener(t,a,n)})}function ft(t,e,r){(e[w]??={})[t]=r}function ct(t){for(var e=0;e<t.length;e++)re.add(t[e]);for(var r of W)r(t)}let Z=null;function B(t){var e=this,r=e.ownerDocument,s=t.type,i=t.composedPath?.()||[],n=i[0]||t.target;Z=t;var a=0,f=Z===t&&t[w];if(f){var o=i.indexOf(f);if(o!==-1&&(e===document||e===window)){t[w]=e;return}var u=i.indexOf(e);if(u===-1)return;o<=u&&(a=o)}if(n=i[a]||t.target,n!==e){Re(t,"currentTarget",{configurable:!0,get(){return n||r}});var y=ee,T=b;O(null),L(null);try{for(var g,d=[];n!==null;){var c=n.assignedSlot||n.parentNode||n.host||null;try{var h=n[w]?.[s];h!=null&&(!n.disabled||t.target===n)&&h.call(n,t)}catch(p){g?d.push(p):g=p}if(t.cancelBubble||c===e||c===null)break;n=c}if(g){for(let p of d)queueMicrotask(()=>{throw p});throw g}}finally{t[w]=e,delete t.currentTarget,O(y),L(T)}}}const Ke=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Qe(t){return Ke?.createHTML(t)??t}function se(t){var e=Se("template");return e.innerHTML=Qe(t.replaceAll("<!>","<!---->")),e.content}function v(t,e){var r=b;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function dt(t,e){var r=(e&ke)!==0,s=(e&De)!==0,i,n=!t.startsWith("<!>");return()=>{if(_)return v(l,null),l;i===void 0&&(i=se(n?t:"<!>"+t),r||(i=A(i)));var a=s||Ae?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=A(a),o=a.lastChild;v(f,o)}else v(a,a);return a}}function et(t,e,r="svg"){var s=!t.startsWith("<!>"),i=`<${r}>${s?t:"<!>"+t}</${r}>`,n;return()=>{if(_)return v(l,null),l;if(!n){var a=se(i),f=A(a);n=A(f)}var o=n.cloneNode(!0);return v(o,o),o}}function ht(t,e){return et(t,e,"svg")}function _t(t=""){if(!_){var e=R(t+"");return v(e,e),e}var r=l;return r.nodeType!==Me?(r.before(r=R()),S(r)):Le(r),v(r,r),r}function pt(){if(_)return v(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=R();return t.append(e,r),v(e,r),t}function vt(t,e){if(_){var r=b;((r.f&Oe)===0||r.nodes.end===null)&&(r.nodes.end=l),Y();return}t!==null&&t.before(e)}function gt(){if(_&&l&&l.nodeType===$&&l.textContent?.startsWith("$")){const t=l.textContent.substring(1);return Y(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function bt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function tt(t,e){return ie(t,e)}function mt(t,e){F(),e.intro=e.intro??!1;const r=e.target,s=_,i=l;try{for(var n=A(r);n&&(n.nodeType!==$||n.data!==xe);)n=Ie(n);if(!n)throw V;D(!0),S(n);const a=ie(t,{...e,anchor:n});return D(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==V&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Ce(),F(),Pe(r),D(!1),tt(t,e)}finally{D(s),S(i)}}const M=new Map;function ie(t,{target:e,anchor:r,props:s={},events:i,context:n,intro:a=!0,transformError:f}){F();var o=void 0,u=Fe(()=>{var y=r??e.appendChild(R());qe(y,{pending:()=>{}},d=>{We({});var c=te;if(n&&(c.c=n),i&&(s.$$events=i),_&&v(d,null),o=t(d,s)||{},_&&(b.nodes.end=l,l===null||l.nodeType!==$||l.data!==Be))throw He(),V;Ye()},f);var T=new Set,g=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!T.has(h)){T.add(h);var p=Je(h);for(const x of[e,document]){var E=M.get(x);E===void 0&&(E=new Map,M.set(x,E));var j=E.get(h);j===void 0?(x.addEventListener(h,B,{passive:p}),E.set(h,1)):E.set(h,j+1)}}}};return g(Ve(re)),W.add(g),()=>{for(var d of T)for(const p of[e,document]){var c=M.get(p),h=c.get(d);--h==0?(p.removeEventListener(d,B),c.delete(d),c.size===0&&M.delete(p)):c.set(d,h)}W.delete(g),y!==r&&y.parentNode?.removeChild(y)}});return H.set(o,u),o}let H=new WeakMap;function yt(t,e){const r=H.get(t);return r?(H.delete(t),r(e)):Promise.resolve()}const rt="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(rt);export{vt as a,dt as b,ft as c,ct as d,ut as e,ht as f,pt as g,mt as h,st as i,ne as j,it as k,$e as l,tt as m,at as n,lt as o,gt as p,v as q,ot as r,bt as s,_t as t,yt as u};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BuWS-_Tw.js","../chunks/PPVm8Dsz.js","../chunks/yEDUbZbk.js","../chunks/BBDMeJL4.js","../chunks/Dtbtl5su.js","../chunks/BMrbs3EC.js","../chunks/Bt7P6UBm.js","../chunks/CWmHQEyb.js","../chunks/BmP3yl81.js","../chunks/C8IfoK2g.js","../chunks/B3cbqYdb.js","../chunks/Dx6YFABE.js","../chunks/C8t_lVji.js","../chunks/CRbsz2jz.js","../chunks/CpXgbTWt.js","../chunks/CpAdcarq.js","../chunks/CDs3H3KT.js","../chunks/Ddpk8P2X.js","../chunks/Iwcm6r7d.js","../assets/0.Bzn6qb0O.css","../nodes/1.ClV7Vf9J.js","../nodes/2.Dg3m027a.js","../chunks/DvqvTNdq.js","../chunks/Zf7H0ZZc.js","../chunks/DYpjUIN_.js","../chunks/8aEH9o48.js","../assets/Copy.FS8bdfxr.css","../chunks/CClliU_-.js","../chunks/qvfhHbjx.js","../chunks/3ONneP0Z.js","../assets/2.DNpjFx0k.css","../nodes/3.9iNkY9mM.js","../chunks/BQZlAX3A.js","../assets/ViewToolbar.39HnhXNY.css","../assets/3.CHSDCrUY.css","../nodes/4.UG11YFmx.js","../chunks/CqkleIqs.js","../assets/4.CjSyz-ka.css","../nodes/5.BZZysw6z.js","../assets/5.DFeGxLYf.css","../nodes/6.LCPXZT0S.js","../assets/6.CquhUpOu.css","../nodes/7.kgjplPpk.js","../assets/7.X0WUW64S.css","../nodes/8.CZ7vB_Pl.js","../assets/8.CT4xL4K3.css","../nodes/9.DlSjDUl0.js","../assets/9.BUrHkYry.css"])))=>i.map(i=>d[i]);
2
+ import{_ as c}from"../chunks/PPVm8Dsz.js";import{s as D,ay as $,g as i,aF as tt,al as et,m as rt,p as at,a7 as st,a8 as ot,aG as nt,a0 as it,a4 as g,a5 as mt,b as ct,Y as w,ae as O,c as ut,r as _t,t as dt}from"../chunks/BBDMeJL4.js";import{h as lt,m as ft,u as gt,a as _,g as E,b as Y,t as vt,s as ht}from"../chunks/yEDUbZbk.js";import{i as L,b as R}from"../chunks/Dtbtl5su.js";import{c as A}from"../chunks/CDs3H3KT.js";import{p as x}from"../chunks/CpXgbTWt.js";function Et(s){return class extends pt{constructor(t){super({component:s,...t})}}}class pt{#e;#t;constructor(t){var a=new Map,m=(r,e)=>{var u=rt(e,!1,!1);return a.set(r,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(r,e){return i(a.get(e)??m(e,Reflect.get(r,e)))},has(r,e){return e===$?!0:(i(a.get(e)??m(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,u){return D(a.get(e)??m(e,u),u),Reflect.set(r,e,u)}});this.#t=(t.hydrate?lt:ft)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&tt(),this.#e=n.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||et(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(n,r)},this.#t.$destroy=()=>{gt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const m=(...n)=>a.call(this,...n);return this.#e[t].push(m),()=>{this.#e[t]=this.#e[t].filter(n=>n!==m)}}$destroy(){this.#t.$destroy()}}const jt={};var yt=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Pt=Y("<!> <!>",1);function bt(s,t){at(t,!0);let a=x(t,"components",23,()=>[]),m=x(t,"data_0",3,null),n=x(t,"data_1",3,null),r=x(t,"data_2",3,null);st(()=>t.stores.page.set(t.page)),ot(()=>{t.stores,t.page,t.constructors,a(),t.form,m(),n(),r(),t.stores.page.notify()});let e=w(!1),u=w(!1),k=w(null);nt(()=>{const o=t.stores.page.subscribe(()=>{i(e)&&(D(u,!0),it().then(()=>{D(k,document.title||"untitled page",!0)}))});return D(e,!0),o});const q=O(()=>t.constructors[2]);var C=Pt(),S=g(C);{var z=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=g(l);A(p,()=>i(d),(f,v)=>{R(v(f,{get data(){return m()},get form(){return t.form},get params(){return t.page.params},children:(y,Rt)=>{var G=E(),K=g(G);{var N=h=>{const I=O(()=>t.constructors[1]);var P=E(),T=g(P);A(T,()=>i(I),(V,j)=>{R(j(V,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(b,At)=>{var M=E(),U=g(M);A(U,()=>i(q),(W,X)=>{R(X(W,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),Z=>a()[2]=Z,()=>a()?.[2])}),_(b,M)},$$slots:{default:!0}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)},Q=h=>{const I=O(()=>t.constructors[1]);var P=E(),T=g(P);A(T,()=>i(I),(V,j)=>{R(j(V,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)};L(K,h=>{t.constructors[2]?h(N):h(Q,!1)})}_(y,G)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)},B=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=g(l);A(p,()=>i(d),(f,v)=>{R(v(f,{get data(){return m()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)};L(S,o=>{t.constructors[1]?o(z):o(B,!1)})}var H=mt(S,2);{var J=o=>{var d=yt(),l=ut(d);{var p=f=>{var v=vt();dt(()=>ht(v,i(k))),_(f,v)};L(l,f=>{i(u)&&f(p)})}_t(d),_(o,d)};L(H,o=>{i(e)&&o(J)})}_(s,C),ct()}const wt=Et(bt),kt=[()=>c(()=>import("../nodes/0.BuWS-_Tw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),()=>c(()=>import("../nodes/1.ClV7Vf9J.js"),__vite__mapDeps([20,2,3,17,9,8]),import.meta.url),()=>c(()=>import("../nodes/2.Dg3m027a.js"),__vite__mapDeps([21,2,3,5,4,6,1,15,16,8,9,17,14,22,23,24,13,10,12,11,25,26,27,28,29,30]),import.meta.url),()=>c(()=>import("../nodes/3.9iNkY9mM.js"),__vite__mapDeps([31,2,3,17,4,32,5,6,14,8,9,11,10,24,33,34]),import.meta.url),()=>c(()=>import("../nodes/4.UG11YFmx.js"),__vite__mapDeps([35,10,3,6,1,2,4,15,16,14,8,9,32,5,17,11,24,33,29,27,22,23,13,12,36,18,37]),import.meta.url),()=>c(()=>import("../nodes/5.BZZysw6z.js"),__vite__mapDeps([38,10,3,6,2,4,8,9,11,39]),import.meta.url),()=>c(()=>import("../nodes/6.LCPXZT0S.js"),__vite__mapDeps([40,2,3,32,5,4,6,14,8,9,17,11,10,24,33,1,15,27,41]),import.meta.url),()=>c(()=>import("../nodes/7.kgjplPpk.js"),__vite__mapDeps([42,2,3,17,4,23,5,6,14,16,24,15,29,25,26,28,1,12,10,9,11,43]),import.meta.url),()=>c(()=>import("../nodes/8.CZ7vB_Pl.js"),__vite__mapDeps([44,2,3,4,7,8,9,12,6,24,5,14,28,29,45]),import.meta.url),()=>c(()=>import("../nodes/9.DlSjDUl0.js"),__vite__mapDeps([46,2,3,4,7,8,9,12,6,10,24,5,14,28,29,47]),import.meta.url)],Ct=[],St={"/(app)":[3,[2]],"/(app)/graph":[6,[2]],"/login":[8],"/(app)/settings":[7,[2]],"/setup":[9],"/(app)/[repo]/[type]/[id]":[4,[2]],"/(app)/[repo]/[type]/[id]/edit":[5,[2]]},F={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Ot=Object.fromEntries(Object.entries(F.transport).map(([s,t])=>[s,t.decode])),Gt=Object.fromEntries(Object.entries(F.transport).map(([s,t])=>[s,t.encode])),Mt=!1,Yt=(s,t)=>Ot[s](t);export{Yt as decode,Ot as decoders,St as dictionary,Gt as encoders,Mt as hash,F as hooks,jt as matchers,kt as nodes,wt as root,Ct as server_loads};
@@ -0,0 +1 @@
1
+ import{a as r}from"../chunks/BmP3yl81.js";import{x as t}from"../chunks/C8IfoK2g.js";export{t as load_css,r as start};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js"])))=>i.map(i=>d[i]);
2
+ import{_ as jt}from"../chunks/PPVm8Dsz.js";import{a as o,b as at,l as Ye,o as re,c as Kt,e as Ue,g as S,d as je,t as Le,s as Lt,f as ot}from"../chunks/yEDUbZbk.js";import{p as At,c as Y,r as F,t as G,b as Bt,bo as Ke,aC as Se,bp as Ae,Y as R,ag as Qt,a8 as vt,s as a,g as e,a1 as le,aG as Pe,a5 as Vt,ae as f,ah as yt,a4 as x,l as Ht,a as ce,n as de,m as Ot,d as ct,ad as Ge,af as Xe}from"../chunks/BBDMeJL4.js";import{i as D,b as Re}from"../chunks/Dtbtl5su.js";import{b as P,c as Te,s as lt,a as Jt,S as qe}from"../chunks/BMrbs3EC.js";import{h as Qe}from"../chunks/CWmHQEyb.js";import{g as Me}from"../chunks/BmP3yl81.js";import{w as He}from"../chunks/B3cbqYdb.js";import{n as Je}from"../chunks/Dx6YFABE.js";import{a as qt}from"../chunks/C8t_lVji.js";import{t as Q,c as _t,S as pe,r as Oe}from"../chunks/CRbsz2jz.js";import{p as I,s as se,r as Ne,l as zt}from"../chunks/CpXgbTWt.js";import{e as Be}from"../chunks/CpAdcarq.js";import{c as Zt}from"../chunks/CDs3H3KT.js";import{c as bt,s as wt}from"../chunks/Bt7P6UBm.js";import{i as ue}from"../chunks/Ddpk8P2X.js";import{I as $e}from"../chunks/Iwcm6r7d.js";const tn=Array(12).fill(0);var en=at('<div class="sonner-loading-bar"></div>'),nn=at('<div><div class="sonner-spinner"></div></div>');function an(c,t){At(t,!0);var n=nn(),b=Y(n);Be(b,23,()=>tn,(d,C)=>`spinner-bar-${C}`,(d,C)=>{var T=en();o(d,T)}),F(b),F(n),G(d=>{wt(n,1,d),P(n,"data-visible",t.visible)},[()=>bt(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),o(c,n),Bt()}const on=typeof window<"u"?window:void 0;function sn(c){let t=c.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class rn{#e;#t;constructor(t={}){const{window:n=on,document:b=n?.document}=t;n!==void 0&&(this.#e=b,this.#t=Ye(d=>{const C=re(n,"focusin",d),T=re(n,"focusout",d);return()=>{C(),T()}}))}get current(){return this.#t?.(),this.#e?sn(this.#e):null}}new rn;class ln{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return Ke(this.#t)}get(){const t=Se(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const n=Se(this.#t);return n===void 0?t:n}set(t){return Ae(this.#t,t)}}const cn=new ln("<Toaster/>");function oe(c){return c.label!==void 0}function dn(){let c=R(Qt(typeof document<"u"?document.hidden:!1));return vt(()=>re(document,"visibilitychange",()=>{a(c,document.hidden,!0)})),{get current(){return e(c)}}}const ze=4e3,un=14,fn=45,vn=200,mn=.05,gn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function hn(c){const[t,n]=c.split("-"),b=[];return t&&b.push(t),n&&b.push(n),b}function ke(c){return 1/(1.5+Math.abs(c)/20)}var _n=at("<div><!></div>"),bn=at('<button data-close-button=""><!></button>'),wn=at('<div data-icon=""><!> <!></div>'),yn=at('<div data-description=""><!></div>'),xn=at('<button data-button="" data-cancel=""> </button>'),In=at('<button data-button=""> </button>'),Tn=at('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Mn=at('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function En(c,t){At(t,!0);const n=l=>{var v=S(),w=x(v);{var L=E=>{var X=_n(),Ft=Y(X);lt(Ft,()=>t.loadingIcon),F(X),G(Xt=>{wt(X,1,Xt),P(X,"data-visible",e(k)==="loading")},[()=>bt(_t(e(nt)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),o(E,X)},H=E=>{{let X=f(()=>_t(e(nt)?.loader,t.toast.classes?.loader)),Ft=f(()=>e(k)==="loading");an(E,{get class(){return e(X)},get visible(){return e(Ft)}})}};D(w,E=>{t.loadingIcon?E(L):E(H,!1)})}o(l,v)};let b=I(t,"cancelButtonStyle",3,""),d=I(t,"actionButtonStyle",3,""),C=I(t,"descriptionClass",3,""),T=I(t,"unstyled",3,!1),M=I(t,"defaultRichColors",3,!1);const g={...gn};let u=R(!1),A=R(!1),B=R(!1),N=R(!1),U=R(!1),j=R(0),it=R(0),Pt=t.toast.duration||t.duration||ze,et=R(void 0),z=R(null),st=R(null);const xt=f(()=>t.index===0),Wt=f(()=>t.index+1<=t.visibleToasts),k=f(()=>t.toast.type),J=f(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),rt=f(()=>t.toast.class||""),kt=f(()=>t.toast.descriptionClass||""),It=f(()=>Q.heights.findIndex(l=>l.toastId===t.toast.id)||0),Tt=f(()=>t.toast.closeButton??t.closeButton),Rt=f(()=>t.toast.duration??t.duration??ze);let Dt=null;const pt=f(()=>t.position.split("-")),fe=f(()=>Q.heights.reduce((l,v,w)=>w>=e(It)?l:l+v.height,0)),ve=dn(),me=f(()=>t.toast.invert||t.invert),Gt=f(()=>e(k)==="loading"),nt=f(()=>({...g,...t.classes})),ge=f(()=>t.toast.title),he=f(()=>t.toast.description);let Mt=R(0),$t=R(0);const Yt=f(()=>Math.round(e(It)*un+e(fe)));vt(()=>{e(ge),e(he);let l;t.expanded||t.expandByDefault?l=1:l=1-t.index*mn;const v=le(()=>e(et));if(v===void 0)return;v.style.setProperty("height","auto");const w=v.offsetHeight,L=v.getBoundingClientRect().height,H=Math.round(L/l+Number.EPSILON&100)/100;v.style.removeProperty("height");let E;Math.abs(H-w)<1?E=H:E=w,a(it,E,!0),Q.setHeight({toastId:t.toast.id,height:E})});function i(){a(A,!0),a(j,e(Yt),!0),Q.removeHeight(t.toast.id),setTimeout(()=>{Q.remove(t.toast.id)},vn)}let V;const mt=f(()=>t.toast.promise&&e(k)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function gt(){a(Mt,new Date().getTime(),!0),V=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),i()},Pt)}function Nt(){if(e($t)<e(Mt)){const l=new Date().getTime()-e(Mt);Pt=Pt-l}a($t,new Date().getTime(),!0)}vt(()=>{t.toast.updated&&(clearTimeout(V),Pt=e(Rt),gt())}),vt(()=>(e(mt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&ve.current?Nt():gt()),()=>clearTimeout(V))),Pe(()=>{a(u,!0);const l=e(et)?.getBoundingClientRect().height;return a(it,l,!0),Q.setHeight({toastId:t.toast.id,height:l}),()=>{Q.removeHeight(t.toast.id)}}),vt(()=>{t.toast.delete&&le(()=>{i(),t.toast.onDismiss?.(t.toast)})});const _e=l=>{if(e(Gt))return;a(j,e(Yt),!0);const v=l.target;v.setPointerCapture(l.pointerId),v.tagName!=="BUTTON"&&(a(B,!0),Dt={x:l.clientX,y:l.clientY})},De=()=>{if(e(N)||!e(J))return;Dt=null;const l=Number(e(et)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),v=Number(e(et)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),w=new Date().getTime()-0,L=e(z)==="x"?l:v,H=Math.abs(L)/w;if(Math.abs(L)>=fn||H>.11){a(j,e(Yt),!0),t.toast.onDismiss?.(t.toast),e(z)==="x"?a(st,l>0?"right":"left",!0):a(st,v>0?"down":"up",!0),i(),a(N,!0);return}else e(et)?.style.setProperty("--swipe-amount-x","0px"),e(et)?.style.setProperty("--swipe-amount-y","0px");a(U,!1),a(B,!1),a(z,null)},te=l=>{if(!Dt||!e(J)||(window.getSelection()?.toString().length??-1)>0)return;const w=l.clientY-Dt.y,L=l.clientX-Dt.x,H=t.swipeDirections??hn(t.position);!e(z)&&(Math.abs(L)>1||Math.abs(w)>1)&&a(z,Math.abs(L)>Math.abs(w)?"x":"y",!0);let E={x:0,y:0};if(e(z)==="y"){if(H.includes("top")||H.includes("bottom"))if(H.includes("top")&&w<0||H.includes("bottom")&&w>0)E.y=w;else{const X=w*ke(w);E.y=Math.abs(X)<Math.abs(w)?X:w}}else if(e(z)==="x"&&(H.includes("left")||H.includes("right")))if(H.includes("left")&&L<0||H.includes("right")&&L>0)E.x=L;else{const X=L*ke(L);E.x=Math.abs(X)<Math.abs(L)?X:L}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&a(U,!0),e(et)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(et)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},ht=()=>{a(B,!1),a(z,null),Dt=null},Et=f(()=>t.toast.icon?t.toast.icon:e(k)==="success"?t.successIcon:e(k)==="error"?t.errorIcon:e(k)==="warning"?t.warningIcon:e(k)==="info"?t.infoIcon:e(k)==="loading"?t.loadingIcon:null);var r=Mn();P(r,"tabindex",0);let Ut;var ee=Y(r);{var Ce=l=>{var v=bn(),w=Y(v);lt(w,()=>t.closeIcon??yt),F(v),G(L=>{P(v,"aria-label",t.closeButtonAriaLabel),P(v,"data-disabled",e(Gt)),wt(v,1,L)},[()=>bt(_t(e(nt)?.closeButton,t.toast?.classes?.closeButton))]),Kt("click",v,()=>{e(Gt)||!e(J)||(i(),t.toast.onDismiss?.(t.toast))}),o(l,v)};D(ee,l=>{e(Tt)&&!t.toast.component&&e(k)!=="loading"&&t.closeIcon!==null&&l(Ce)})}var be=Vt(ee,2);{var we=l=>{const v=f(()=>t.toast.component);var w=S(),L=x(w);Zt(L,()=>e(v),(H,E)=>{E(H,se(()=>t.toast.componentProps,{closeToast:i}))}),o(l,w)},ye=l=>{var v=Tn(),w=x(v);{var L=h=>{var y=wn(),s=Y(y);{var O=m=>{var _=S(),tt=x(_);{var W=Ct=>{var ae=S(),Ie=x(ae);Zt(Ie,()=>t.toast.icon,(q,$)=>{$(q,{})}),o(Ct,ae)},ft=Ct=>{n(Ct)};D(tt,Ct=>{t.toast.icon?Ct(W):Ct(ft,!1)})}o(m,_)};D(s,m=>{(t.toast.promise||e(k)==="loading")&&m(O)})}var K=Vt(s,2);{var Z=m=>{var _=S(),tt=x(_);{var W=q=>{var $=S(),St=x($);Zt(St,()=>t.toast.icon,(Ve,We)=>{We(Ve,{})}),o(q,$)},ft=q=>{var $=S(),St=x($);lt(St,()=>t.successIcon??yt),o(q,$)},Ct=q=>{var $=S(),St=x($);lt(St,()=>t.errorIcon??yt),o(q,$)},ae=q=>{var $=S(),St=x($);lt(St,()=>t.warningIcon??yt),o(q,$)},Ie=q=>{var $=S(),St=x($);lt(St,()=>t.infoIcon??yt),o(q,$)};D(tt,q=>{t.toast.icon?q(W):e(k)==="success"?q(ft,1):e(k)==="error"?q(Ct,2):e(k)==="warning"?q(ae,3):e(k)==="info"&&q(Ie,4)})}o(m,_)};D(K,m=>{t.toast.type!=="loading"&&m(Z)})}F(y),G(m=>wt(y,1,m),[()=>bt(_t(e(nt)?.icon,t.toast?.classes?.icon))]),o(h,y)};D(w,h=>{(e(k)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&h(L)})}var H=Vt(w,2),E=Y(H),X=Y(E);{var Ft=h=>{var y=S(),s=x(y);{var O=Z=>{const m=f(()=>t.toast.title);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.title)),o(Z,m)};D(s,Z=>{typeof t.toast.title!="string"?Z(O):Z(K,!1)})}o(h,y)};D(X,h=>{t.toast.title&&h(Ft)})}F(E);var Xt=Vt(E,2);{var xe=h=>{var y=yn(),s=Y(y);{var O=Z=>{const m=f(()=>t.toast.description);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.description)),o(Z,m)};D(s,Z=>{typeof t.toast.description!="string"?Z(O):Z(K,!1)})}F(y),G(Z=>wt(y,1,Z),[()=>bt(_t(C(),e(kt),e(nt)?.description,t.toast.classes?.description))]),o(h,y)};D(Xt,h=>{t.toast.description&&h(xe)})}F(H);var ne=Vt(H,2);{var dt=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=xn(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.cancelButtonStyle??b()),wt(_,1,W),Lt(tt,t.toast.cancel.label)},[()=>bt(_t(e(nt)?.cancelButton,t.toast?.classes?.cancelButton))]),Kt("click",_,W=>{oe(t.toast.cancel)&&e(J)&&(t.toast.cancel?.onClick?.(W),i())}),o(m,_)},Z=f(()=>oe(t.toast.cancel));D(s,m=>{typeof t.toast.cancel=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(ne,h=>{t.toast.cancel&&h(dt)})}var p=Vt(ne,2);{var ut=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.action,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=In(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.actionButtonStyle??d()),wt(_,1,W),Lt(tt,t.toast.action.label)},[()=>bt(_t(e(nt)?.actionButton,t.toast?.classes?.actionButton))]),Kt("click",_,W=>{oe(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&i())}),o(m,_)},Z=f(()=>oe(t.toast.action));D(s,m=>{typeof t.toast.action=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(p,h=>{t.toast.action&&h(ut)})}G((h,y)=>{wt(H,1,h),wt(E,1,y)},[()=>bt(_t(e(nt)?.content,t.toast?.classes?.content)),()=>bt(_t(e(nt)?.title,t.toast?.classes?.title))]),o(l,v)};D(be,l=>{t.toast.component?l(we):l(ye,!1)})}F(r),Re(r,l=>a(et,l),()=>e(et)),G((l,v,w)=>{wt(r,1,l),P(r,"aria-live",t.toast.important?"assertive":"polite"),P(r,"data-rich-colors",t.toast.richColors??M()),P(r,"data-styled",!(t.toast.component||t.toast.unstyled||T())),P(r,"data-mounted",e(u)),P(r,"data-promise",v),P(r,"data-swiped",e(U)),P(r,"data-removed",e(A)),P(r,"data-visible",e(Wt)),P(r,"data-y-position",e(pt)[0]),P(r,"data-x-position",e(pt)[1]),P(r,"data-index",t.index),P(r,"data-front",e(xt)),P(r,"data-swiping",e(B)),P(r,"data-dismissible",e(J)),P(r,"data-type",e(k)),P(r,"data-invert",e(me)),P(r,"data-swipe-out",e(N)),P(r,"data-swipe-direction",e(st)),P(r,"data-expanded",w),Ut=Te(r,`${t.style} ${t.toast.style}`,Ut,{"--index":t.index,"--toasts-before":t.index,"--z-index":Q.toasts.length-t.index,"--offset":`${e(A)?e(j):e(Yt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(it)}px`})},[()=>bt(_t(t.class,e(rt),e(nt)?.toast,t.toast?.classes?.toast,e(nt)?.[e(k)],t.toast?.classes?.[e(k)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(u))]),Kt("pointermove",r,te),Kt("pointerup",r,De),Kt("pointerdown",r,_e),Ue("dragend",r,ht),o(c,r),Bt()}je(["pointermove","pointerup","pointerdown","click"]);var Sn=ot('<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 An(c){var t=Sn();o(c,t)}var Bn=ot('<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 Pn(c){var t=Bn();o(c,t)}var Dn=ot('<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 Cn(c){var t=Dn();o(c,t)}var Ln=ot('<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 Hn(c){var t=Ln();o(c,t)}var On=ot('<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 zn(c){var t=On();o(c,t)}const kn=3,Fe="24px",Ze="16px",Rn=4e3,Nn=356,Fn=14,Ee="dark",ie="light";function Zn(c,t){const n={};return[c,t].forEach((b,d)=>{const C=d===1,T=C?"--mobile-offset":"--offset",M=C?Ze:Fe;function g(u){["top","right","bottom","left"].forEach(A=>{n[`${T}-${A}`]=typeof u=="number"?`${u}px`:u})}typeof b=="number"||typeof b=="string"?g(b):typeof b=="object"?["top","right","bottom","left"].forEach(u=>{const A=b[u];A===void 0?n[`${T}-${u}`]=M:n[`${T}-${u}`]=typeof A=="number"?`${A}px`:A}):g(M)}),n}var Vn=at("<ol></ol>"),Wn=at('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function Yn(c,t){At(t,!0);function n(i){return i!=="system"?i:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ee:ie}let b=I(t,"invert",3,!1),d=I(t,"position",3,"bottom-right"),C=I(t,"hotkey",19,()=>["altKey","KeyT"]),T=I(t,"expand",3,!1),M=I(t,"closeButton",3,!1),g=I(t,"offset",3,Fe),u=I(t,"mobileOffset",3,Ze),A=I(t,"theme",3,"light"),B=I(t,"richColors",3,!1),N=I(t,"duration",3,Rn),U=I(t,"visibleToasts",3,kn),j=I(t,"toastOptions",19,()=>({})),it=I(t,"dir",7,"auto"),Pt=I(t,"gap",3,Fn),et=I(t,"pauseWhenPageIsHidden",3,!1),z=I(t,"containerAriaLabel",3,"Notifications"),st=I(t,"closeButtonAriaLabel",3,"Close toast"),xt=Ne(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 Wt(){if(it()!=="auto")return it();if(typeof window>"u"||typeof document>"u")return"ltr";const i=document.documentElement.getAttribute("dir");return i==="auto"||!i?(le(()=>it(window.getComputedStyle(document.documentElement).direction??"ltr")),it()):(le(()=>it(i)),i)}const k=f(()=>Array.from(new Set([d(),...Q.toasts.filter(i=>i.position).map(i=>i.position)].filter(Boolean))));let J=R(!1),rt=R(!1),kt=R(Qt(n(A()))),It=R(void 0),Tt=R(null),Rt=R(!1);const Dt=f(()=>C().join("+").replace(/Key/g,"").replace(/Digit/g,""));vt(()=>{Q.toasts.length<=1&&a(J,!1)}),vt(()=>{const i=Q.toasts.filter(V=>V.dismiss&&!V.delete);if(i.length>0){const V=Q.toasts.map(mt=>i.find(Nt=>Nt.id===mt.id)?{...mt,delete:!0}:mt);Q.toasts=V}}),vt(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null),a(Rt,!1))}),Pe(()=>(Q.reset(),re(document,"keydown",V=>{C().every(gt=>V[gt]||V.code===gt)&&(a(J,!0),e(It)?.focus()),V.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&a(J,!1)}))),vt(()=>{if(A()!=="system"&&a(kt,A()),typeof window<"u"){A()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?a(kt,Ee):a(kt,ie));const i=window.matchMedia("(prefers-color-scheme: dark)"),V=({matches:mt})=>{A()==="system"&&a(kt,mt?Ee:ie,!0)};"addEventListener"in i?i.addEventListener("change",V):i.addListener(V)}});const pt=i=>{t.onblur?.(i),e(Rt)&&!i.currentTarget.contains(i.relatedTarget)&&(a(Rt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null)))},fe=i=>{t.onfocus?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&(e(Rt)||(a(Rt,!0),a(Tt,i.relatedTarget,!0)))},ve=i=>{t.onpointerdown?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&a(rt,!0)},me=i=>{t.onmouseenter?.(i),a(J,!0)},Gt=i=>{t.onmouseleave?.(i),e(rt)||a(J,!1)},nt=i=>{t.onmousemove?.(i),a(J,!0)},ge=i=>{t.ondragend?.(i),a(J,!1)},he=i=>{t.onpointerup?.(i),a(rt,!1)};cn.set(new pe);var Mt=Wn();P(Mt,"tabindex",-1);var $t=Y(Mt);{var Yt=i=>{var V=S(),mt=x(V);Be(mt,18,()=>e(k),gt=>gt,(gt,Nt,_e,De)=>{const te=f(()=>{const[r,Ut]=Nt.split("-");return{y:r,x:Ut}}),ht=f(()=>Zn(g(),u()));var Et=Vn();Jt(Et,r=>({tabindex:-1,dir:r,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(kt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:fe,onmouseenter:me,onmousemove:nt,onmouseleave:Gt,ondragend:ge,onpointerdown:ve,onpointerup:he,...xt,[qe]:{"--front-toast-height":`${Q.heights[0]?.height}px`,"--width":`${Nn}px`,"--gap":`${Pt()}px`,"--offset-top":e(ht)["--offset-top"],"--offset-right":e(ht)["--offset-right"],"--offset-bottom":e(ht)["--offset-bottom"],"--offset-left":e(ht)["--offset-left"],"--mobile-offset-top":e(ht)["--mobile-offset-top"],"--mobile-offset-right":e(ht)["--mobile-offset-right"],"--mobile-offset-bottom":e(ht)["--mobile-offset-bottom"],"--mobile-offset-left":e(ht)["--mobile-offset-left"]}}),[Wt],void 0,void 0,"svelte-nbs0zk"),Be(Et,23,()=>Q.toasts.filter(r=>!r.position&&e(_e)===0||r.position===Nt),r=>r.id,(r,Ut,ee,Ce)=>{{const be=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.successIcon??yt),o(s,O)},y=s=>{An(s)};D(ut,s=>{t.successIcon?s(h):t.successIcon!==null&&s(y,1)})}o(dt,p)},we=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.errorIcon??yt),o(s,O)},y=s=>{Pn(s)};D(ut,s=>{t.errorIcon?s(h):t.errorIcon!==null&&s(y,1)})}o(dt,p)},ye=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.warningIcon??yt),o(s,O)},y=s=>{Cn(s)};D(ut,s=>{t.warningIcon?s(h):t.warningIcon!==null&&s(y,1)})}o(dt,p)},l=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.infoIcon??yt),o(s,O)},y=s=>{Hn(s)};D(ut,s=>{t.infoIcon?s(h):t.infoIcon!==null&&s(y,1)})}o(dt,p)},v=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.closeIcon??yt),o(s,O)},y=s=>{zn(s)};D(ut,s=>{t.closeIcon?s(h):t.closeIcon!==null&&s(y,1)})}o(dt,p)};let w=f(()=>j()?.duration??N()),L=f(()=>j()?.class??""),H=f(()=>j()?.descriptionClass||""),E=f(()=>j()?.style??""),X=f(()=>j().classes||{}),Ft=f(()=>j().unstyled??!1),Xt=f(()=>j()?.cancelButtonStyle??""),xe=f(()=>j()?.actionButtonStyle??""),ne=f(()=>j()?.closeButtonAriaLabel??st());En(r,{get index(){return e(ee)},get toast(){return e(Ut)},get defaultRichColors(){return B()},get duration(){return e(w)},get class(){return e(L)},get descriptionClass(){return e(H)},get invert(){return b()},get visibleToasts(){return U()},get closeButton(){return M()},get interacting(){return e(rt)},get position(){return Nt},get style(){return e(E)},get classes(){return e(X)},get unstyled(){return e(Ft)},get cancelButtonStyle(){return e(Xt)},get actionButtonStyle(){return e(xe)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return T()},get expanded(){return e(J)},get pauseWhenPageIsHidden(){return et()},get loadingIcon(){return t.loadingIcon},successIcon:be,errorIcon:we,warningIcon:ye,infoIcon:l,closeIcon:v,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),F(Et),Re(Et,r=>a(It,r),()=>e(It)),G(()=>Et.dir=Et.dir),o(gt,Et)}),o(i,V)};D($t,i=>{Q.toasts.length>0&&i(Yt)})}F(Mt),G(()=>P(Mt,"aria-label",`${z()??""} ${e(Dt)??""}`)),o(c,Mt),Bt()}var Un=ot("<title> </title>"),jn=ot('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function Kn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Un(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Gn=ot("<title> </title>"),Xn=ot('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function qn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Xn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Gn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Qn=ot("<title> </title>"),Jn=ot('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function pn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Qn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var $n=ot("<title> </title>"),ta=ot('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function ea(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=ta();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=$n(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(3),F(g),o(c,g),Bt()}function na(c,t){At(t,!0);const n=Se("theme");let b=Ne(t,["$$slots","$$events","$$legacy"]);Yn(c,se({get theme(){return n.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>b,{loadingIcon:u=>{$e(u,{class:"size-4 animate-spin"})},successIcon:u=>{Kn(u,{class:"size-4"})},errorIcon:u=>{qn(u,{class:"size-4"})},infoIcon:u=>{pn(u,{class:"size-4"})},warningIcon:u=>{ea(u,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),Bt()}var aa=at('<div style="display: contents;"><!> <!></div>');function xa(c,t){At(t,!0);const n=typeof localStorage<"u"?localStorage.getItem("theme"):null,b=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let d=R(Qt(n||b));Ae("theme",{get current(){return e(d)},toggle(){a(d,e(d)==="dark"?"light":"dark",!0),localStorage.setItem("theme",e(d))}});const T=typeof localStorage<"u"?localStorage.getItem("chatMode"):null,M=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null,g=T==="panel"||T==="full"?T:T==="closed"?"closed":M==="true"?"panel":"closed";let u=R(Qt(g)),A=R(Qt(g==="closed"?"panel":g));function B(){localStorage.setItem("chatMode",e(u))}Ae("chat",{get open(){return e(u)!=="closed"},get mode(){return e(u)},toggle(){a(u,e(u)==="closed"?e(A):"closed",!0),B()},close(){a(u,"closed"),B()},expand(){a(u,"full"),a(A,"full"),B()},collapse(){a(u,"panel"),a(A,"panel"),B()}}),vt(()=>{document.documentElement.setAttribute("data-theme",e(d))});let U=R(null);vt(()=>{if(qt.loading)return;const z=qt.user?.email??(qt.authEnabled?null:"__open__");z&&z!==e(U)&&(e(U)!==null&&Je.deselect(),a(U,z,!0),He.load(),Oe.connect()),!z&&e(U)&&(a(U,null),Oe.disconnect())}),Pe(async()=>{const z=window.location.pathname,st=z==="/login",xt=z==="/setup",{authenticated:Wt,authEnabled:k,needsSetup:J}=await qt.checkAuth();if(J&&!xt){Me("/setup");return}if(k&&!Wt&&!st){Me("/login");return}if(Wt&&(st||xt)){Me("/");return}st||xt||(jt(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url).catch(()=>{}),Promise.all([jt(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),jt(()=>import("../chunks/DnL9f0lc.js").then(rt=>rt.i),__vite__mapDeps([3,4]),import.meta.url),jt(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([5,4,3,6,7,8]),import.meta.url),jt(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([6,7,4,3]),import.meta.url),jt(()=>import("../chunks/C7VoTosa.js").then(rt=>rt.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",rt=>{a(d,rt.detail,!0)}))});var j=aa();Qe("12qhfyh",z=>{Ge(()=>{Xe.title=(He.name||"Studiograph")??""})});var it=Y(j);{var Pt=z=>{var st=S(),xt=x(st);lt(xt,()=>t.children),o(z,st)};D(it,z=>{qt.loading||z(Pt)})}var et=Vt(it,2);na(et,{}),F(j),G(()=>P(j,"data-theme",e(d))),o(c,j),Bt()}export{xa as component};