studiograph 1.3.43 → 1.3.44-next.1

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 (124) hide show
  1. package/dist/agent/tools/graph-tools.d.ts +58 -0
  2. package/dist/agent/tools/graph-tools.js +92 -0
  3. package/dist/agent/tools/graph-tools.js.map +1 -1
  4. package/dist/core/graph.d.ts +5 -0
  5. package/dist/core/graph.js +100 -2
  6. package/dist/core/graph.js.map +1 -1
  7. package/dist/core/validation.d.ts +201 -149
  8. package/dist/core/validation.js +18 -31
  9. package/dist/core/validation.js.map +1 -1
  10. package/dist/integrations/linear.js +13 -3
  11. package/dist/integrations/linear.js.map +1 -1
  12. package/dist/mcp/tools.d.ts +2 -1
  13. package/dist/mcp/tools.js +80 -1
  14. package/dist/mcp/tools.js.map +1 -1
  15. package/dist/server/index.js +4 -1
  16. package/dist/server/index.js.map +1 -1
  17. package/dist/server/routes/graph-api.js +132 -6
  18. package/dist/server/routes/graph-api.js.map +1 -1
  19. package/dist/server/routes/mcp.d.ts +2 -1
  20. package/dist/server/routes/mcp.js +2 -2
  21. package/dist/server/routes/mcp.js.map +1 -1
  22. package/dist/server/routes/views-api.d.ts +10 -0
  23. package/dist/server/routes/views-api.js +66 -0
  24. package/dist/server/routes/views-api.js.map +1 -0
  25. package/dist/services/auth-service.d.ts +20 -0
  26. package/dist/services/auth-service.js +62 -0
  27. package/dist/services/auth-service.js.map +1 -1
  28. package/dist/services/sync/collection-sync.js +1 -0
  29. package/dist/services/sync/collection-sync.js.map +1 -1
  30. package/dist/services/sync/structured-extractor.js +26 -5
  31. package/dist/services/sync/structured-extractor.js.map +1 -1
  32. package/dist/services/sync/types.d.ts +4 -0
  33. package/dist/web/_app/immutable/assets/{0.Bzn6qb0O.css → 0.n3qM-DRk.css} +1 -1
  34. package/dist/web/_app/immutable/assets/2.DNpjFx0k.css +1 -0
  35. package/dist/web/_app/immutable/assets/4.CjSyz-ka.css +1 -0
  36. package/dist/web/_app/immutable/assets/{7.X0WUW64S.css → 7.CObh-s2-.css} +1 -1
  37. package/dist/web/_app/immutable/assets/8.DfcI2i9H.css +1 -0
  38. package/dist/web/_app/immutable/assets/Toaster.rN8r_Hzv.css +1 -0
  39. package/dist/web/_app/immutable/assets/ViewToolbar.BX74Ki7U.css +1 -0
  40. package/dist/web/_app/immutable/assets/checkbox.D6tMDJWk.css +1 -0
  41. package/dist/web/_app/immutable/chunks/7lzM-85A.js +1 -0
  42. package/dist/web/_app/immutable/chunks/9QAsBMIK.js +1 -0
  43. package/dist/web/_app/immutable/chunks/{CIgxv4dO.js → B-eIKuyV.js} +1 -1
  44. package/dist/web/_app/immutable/chunks/BA_Wro7X.js +1 -0
  45. package/dist/web/_app/immutable/chunks/{BlYD-5Z_.js → BH82yShn.js} +1 -1
  46. package/dist/web/_app/immutable/chunks/BJimep0Q.js +1 -0
  47. package/dist/web/_app/immutable/chunks/BLi1Oegj.js +1 -0
  48. package/dist/web/_app/immutable/chunks/BZd_7gpI.js +1 -0
  49. package/dist/web/_app/immutable/chunks/Be5VhuaI.js +1 -0
  50. package/dist/web/_app/immutable/chunks/BtJ5VKKi.js +1 -0
  51. package/dist/web/_app/immutable/chunks/Bypyvp-Q.js +1 -0
  52. package/dist/web/_app/immutable/chunks/CAEA_aBe.js +1 -0
  53. package/dist/web/_app/immutable/chunks/CHDa87Lu.js +1 -0
  54. package/dist/web/_app/immutable/chunks/CNVuHNwC.js +5 -0
  55. package/dist/web/_app/immutable/chunks/{DY21hM66.js → CajNsaOw.js} +2 -2
  56. package/dist/web/_app/immutable/chunks/{CA7sXyoK.js → CdeYcEuU.js} +1 -1
  57. package/dist/web/_app/immutable/chunks/CdvQjHNy.js +1 -0
  58. package/dist/web/_app/immutable/chunks/CfuRx7rA.js +1 -0
  59. package/dist/web/_app/immutable/chunks/{BbsQ7LcO.js → Cwkp_c4R.js} +1 -1
  60. package/dist/web/_app/immutable/chunks/D0zbd2ZV.js +1 -0
  61. package/dist/web/_app/immutable/chunks/D18-Aspv.js +1 -0
  62. package/dist/web/_app/immutable/chunks/{Cbba0X2k.js → DEyrdHQB.js} +2 -2
  63. package/dist/web/_app/immutable/chunks/DP6MOIr2.js +1 -0
  64. package/dist/web/_app/immutable/chunks/DQ_O96iG.js +1 -0
  65. package/dist/web/_app/immutable/chunks/DRJ9YW_E.js +1 -0
  66. package/dist/web/_app/immutable/chunks/DTDfEpZd.js +1 -0
  67. package/dist/web/_app/immutable/chunks/DUsnWwWN.js +1 -0
  68. package/dist/web/_app/immutable/chunks/DYVSnKKh.js +1 -0
  69. package/dist/web/_app/immutable/chunks/{B-46Slz_.js → DgMUDNqD.js} +2 -2
  70. package/dist/web/_app/immutable/chunks/Dg_GUhrt.js +1 -0
  71. package/dist/web/_app/immutable/chunks/Dv65pOU4.js +1 -0
  72. package/dist/web/_app/immutable/chunks/JDb8RpWX.js +1 -0
  73. package/dist/web/_app/immutable/chunks/P7PfXw_H.js +1 -0
  74. package/dist/web/_app/immutable/chunks/RGHlrGBn.js +1 -0
  75. package/dist/web/_app/immutable/chunks/SJusBvJH.js +1 -0
  76. package/dist/web/_app/immutable/chunks/fKdE_Jx_.js +1 -0
  77. package/dist/web/_app/immutable/chunks/mkNdSDMf.js +1 -0
  78. package/dist/web/_app/immutable/entry/app.FJ-QaQhu.js +2 -0
  79. package/dist/web/_app/immutable/entry/start.Cae6DI7N.js +1 -0
  80. package/dist/web/_app/immutable/nodes/0.tyq0tjYR.js +2 -0
  81. package/dist/web/_app/immutable/nodes/{1.Bsi4xvt_.js → 1.D-QPCIcu.js} +1 -1
  82. package/dist/web/_app/immutable/nodes/{9.B9Hbxu54.js → 10.BqjRpXN6.js} +1 -1
  83. package/dist/web/_app/immutable/nodes/2.CogYiW3g.js +84 -0
  84. package/dist/web/_app/immutable/nodes/{3.BnPkMEuM.js → 3.CQ8SfijF.js} +1 -1
  85. package/dist/web/_app/immutable/nodes/4.BS-4PSr6.js +11 -0
  86. package/dist/web/_app/immutable/nodes/{5.jC5vBcjM.js → 5.pB3H4l7g.js} +2 -2
  87. package/dist/web/_app/immutable/nodes/{6.BrJWdUaW.js → 6.CKD5i0Ve.js} +1 -1
  88. package/dist/web/_app/immutable/nodes/7.au7lCUbq.js +2 -0
  89. package/dist/web/_app/immutable/nodes/8.B5sO5Rkn.js +1 -0
  90. package/dist/web/_app/immutable/nodes/{8.D4qXhOtf.js → 9.DOysjWYm.js} +1 -1
  91. package/dist/web/_app/version.json +1 -1
  92. package/dist/web/index.html +12 -12
  93. package/package.json +1 -1
  94. package/dist/web/_app/immutable/assets/2.C8WqLKVH.css +0 -1
  95. package/dist/web/_app/immutable/assets/4.C3fKtWtl.css +0 -1
  96. package/dist/web/_app/immutable/assets/ViewToolbar.39HnhXNY.css +0 -1
  97. package/dist/web/_app/immutable/chunks/3kn731Pp.js +0 -1
  98. package/dist/web/_app/immutable/chunks/9TVbAwoF.js +0 -1
  99. package/dist/web/_app/immutable/chunks/B3OdLZwd.js +0 -1
  100. package/dist/web/_app/immutable/chunks/B3cgneCL.js +0 -1
  101. package/dist/web/_app/immutable/chunks/BOcEeypC.js +0 -1
  102. package/dist/web/_app/immutable/chunks/BRjGNUzV.js +0 -5
  103. package/dist/web/_app/immutable/chunks/Bo0CMKlC.js +0 -1
  104. package/dist/web/_app/immutable/chunks/BpQkNqbd.js +0 -1
  105. package/dist/web/_app/immutable/chunks/BwiF2fxX.js +0 -1
  106. package/dist/web/_app/immutable/chunks/ByGNDrbC.js +0 -1
  107. package/dist/web/_app/immutable/chunks/C39N6y-4.js +0 -1
  108. package/dist/web/_app/immutable/chunks/CHyNkE69.js +0 -1
  109. package/dist/web/_app/immutable/chunks/CP30HKCf.js +0 -1
  110. package/dist/web/_app/immutable/chunks/CdoeTcKU.js +0 -1
  111. package/dist/web/_app/immutable/chunks/CvT005bt.js +0 -1
  112. package/dist/web/_app/immutable/chunks/D-Er8WL_.js +0 -1
  113. package/dist/web/_app/immutable/chunks/D5GOt_JW.js +0 -1
  114. package/dist/web/_app/immutable/chunks/DNfruFPs.js +0 -1
  115. package/dist/web/_app/immutable/chunks/DVpZtGWL.js +0 -1
  116. package/dist/web/_app/immutable/chunks/Dw9UPwc-.js +0 -1
  117. package/dist/web/_app/immutable/entry/app.EJEuMPYz.js +0 -2
  118. package/dist/web/_app/immutable/entry/start.BOMbKPKA.js +0 -1
  119. package/dist/web/_app/immutable/nodes/0.BZ4775L8.js +0 -2
  120. package/dist/web/_app/immutable/nodes/2.Dtg7XjMw.js +0 -84
  121. package/dist/web/_app/immutable/nodes/4.B8xw3uIV.js +0 -11
  122. package/dist/web/_app/immutable/nodes/7.DhmNA9F-.js +0 -2
  123. /package/dist/web/_app/immutable/assets/{9.BUrHkYry.css → 10.BUrHkYry.css} +0 -0
  124. /package/dist/web/_app/immutable/assets/{8.CT4xL4K3.css → 9.CT4xL4K3.css} +0 -0
@@ -0,0 +1,5 @@
1
+ import{a as R,s as Dn,f as pe,l as Nn,o as I,c as _,m as Vr,u as Kr,b as Hr}from"./CajNsaOw.js";import{i as Ln}from"./BLi1Oegj.js";import{aM as Ur,i as jr,j as Yr,by as Gr,h as Xr,e as P,bz as cn,P as qr,g as d,s as b,aY as kt,p as Y,l as Jt,d as At,a as Bn,c as Qt,n as _n,r as $t,b as G,m as te,t as Wn,ac as A,f as Et,aW as Zr,ay as un,aV as Jr,a4 as Qr,a5 as B,a6 as Pe,aE as $r,a0 as N,ae as Q,bA as ti,bB as zn,aD as ei,a1 as ni}from"./CfuRx7rA.js";import{B as ri,i as Mt}from"./Cwkp_c4R.js";import{a as Vn,s as $}from"./BA_Wro7X.js";import{l as ee,p as y,s as Be,r as me}from"./RGHlrGBn.js";import{b as Ee}from"./DEyrdHQB.js";function ii(){return Symbol(Ur)}const oi=Symbol("NaN");function si(e,t,n){jr&&Yr();var r=new ri(e),i=!Gr();Xr(()=>{var s=t();s!==s&&(s=oi),i&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}class ai extends Map{#t=new Map;#e=P(0);#n=P(0);#r=cn||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#n.v=super.size}}#i(t){return cn===this.#r?P(t):qr(t)}has(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,n){this.#o(),super.forEach(t,n)}get(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,n){var r=this.#t,i=r.get(t),s=super.get(t),o=super.set(t,n),a=this.#e;if(i===void 0)i=this.#i(0),r.set(t,i),b(this.#n,super.size),kt(a);else if(s!==n){kt(i);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!i.reactions?.every(f=>c.has(f));u&&kt(a)}return o}delete(t){var n=this.#t,r=n.get(t),i=super.delete(t);return r!==void 0&&(n.delete(t),b(r,-1)),i&&(b(this.#n,super.size),kt(this.#e)),i}clear(){if(super.size!==0){super.clear();var t=this.#t;b(this.#n,0);for(var n of t.values())b(n,-1);kt(this.#e),t.clear()}}#o(){d(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.#i(0);t.set(n,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}var ci=pe("<title> </title>"),ui=pe('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function Wa(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=ui();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=ci(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}function li(e){return typeof e=="function"}function Vt(e){return e!==null&&typeof e=="object"}const fi=["string","number","bigint","boolean"];function Me(e){return e==null||fi.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Me(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Tt=Symbol("box"),be=Symbol("is-writable");function x(e,t){const n=A(e);return t?{[Tt]:!0,[be]:!0,get current(){return d(n)},set current(r){t(r)}}:{[Tt]:!0,get current(){return e()}}}function Kt(e){return Vt(e)&&Tt in e}function _e(e){return Kt(e)&&be in e}function Kn(e){return Kt(e)?e:li(e)?x(e):et(e)}function di(e){return Object.entries(e).reduce((t,[n,r])=>Kt(r)?(_e(r)?Object.defineProperty(t,n,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function hi(e){return _e(e)?{[Tt]:!0,get current(){return e.current}}:e}function et(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}function xt(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}xt.from=Kn;xt.with=x;xt.flatten=di;xt.readonly=hi;xt.isBox=Kt;xt.isWritableBox=_e;function Hn(...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 ln=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gi=/\n/g,pi=/^\s*/,mi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bi=/^:\s*/,vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yi=/^[;\s]*/,wi=/^\s+|\s+$/g,xi=`
2
+ `,fn="/",dn="*",bt="",Si="comment",Ai="declaration";function Ei(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 i(m){var p=m.match(gi);p&&(n+=p.length);var v=m.lastIndexOf(xi);r=~v?m.length-v:r+m.length}function s(){var m={line:n,column:r};return function(p){return p.position=new o(m),u(),p}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var p=new Error(t.source+":"+n+":"+r+": "+m);if(p.reason=m,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function c(m){var p=m.exec(e);if(p){var v=p[0];return i(v),e=e.slice(v.length),p}}function u(){c(pi)}function f(m){var p;for(m=m||[];p=l();)p!==!1&&m.push(p);return m}function l(){var m=s();if(!(fn!=e.charAt(0)||dn!=e.charAt(1))){for(var p=2;bt!=e.charAt(p)&&(dn!=e.charAt(p)||fn!=e.charAt(p+1));)++p;if(p+=2,bt===e.charAt(p-1))return a("End of comment missing");var v=e.slice(2,p-2);return r+=2,i(v),e=e.slice(p),r+=2,m({type:Si,comment:v})}}function g(){var m=s(),p=c(mi);if(p){if(l(),!c(bi))return a("property missing ':'");var v=c(vi),w=m({type:Ai,property:hn(p[0].replace(ln,bt)),value:v?hn(v[0].replace(ln,bt)):bt});return c(yi),w}}function h(){var m=[];f(m);for(var p;p=g();)p!==!1&&(m.push(p),f(m));return m}return u(),h()}function hn(e){return e?e.replace(wi,bt):bt}function Oi(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Ei(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}const Ti=/\d/,Ci=["-","_","/","."];function Pi(e=""){if(!Ti.test(e))return e!==e.toLowerCase()}function Mi(e){const t=[];let n="",r,i;for(const s of e){const o=Ci.includes(s);if(o===!0){t.push(n),n="",r=void 0;continue}const a=Pi(s);if(i===!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,i=o}return t.push(n),t}function Un(e){return e?Mi(e).map(t=>Ri(t)).join(""):""}function Fi(e){return Ii(Un(e||""))}function Ri(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ii(e){return e?e[0].toLowerCase()+e.slice(1):""}function Bt(e){if(!e)return{};const t={};function n(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[Un(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Fi(r)]=i}return Oi(e,n),t}function vt(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function ki(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 Di=ki(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Ni(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=>`${Di(t)}: ${e[t]};`).join(`
3
+ `)}function jn(e={}){return Ni(e).replace(`
4
+ `," ")}const Li=["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"],Bi=new Set(Li);function _i(e){return Bi.has(e)}function ve(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const i of Object.keys(r)){const s=t[i],o=r[i],a=typeof s=="function",c=typeof o=="function";if(a&&_i(i)){const u=s,f=o;t[i]=Hn(u,f)}else if(a&&c)t[i]=vt(s,o);else if(i==="class"){const u=Me(s),f=Me(o);u&&f?t[i]=Ee(s,o):u?t[i]=Ee(s):f&&(t[i]=Ee(o))}else if(i==="style"){const u=typeof s=="object",f=typeof o=="object",l=typeof s=="string",g=typeof o=="string";if(u&&f)t[i]={...s,...o};else if(u&&g){const h=Bt(o);t[i]={...s,...h}}else if(l&&f){const h=Bt(s);t[i]={...h,...o}}else if(l&&g){const h=Bt(s),m=Bt(o);t[i]={...h,...m}}else u?t[i]=s:f?t[i]=o:l?t[i]=s:g&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(r)){const s=t[i],o=r[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=jn(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 Yn=typeof window<"u"?window:void 0;function Wi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class zi{#t;#e;constructor(t={}){const{window:n=Yn,document:r=n?.document}=t;n!==void 0&&(this.#t=r,this.#e=Nn(i=>{const s=I(n,"focusin",i),o=I(n,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#e?.(),this.#t?Wi(this.#t):null}}new zi;function Vi(e){return typeof e=="function"}class St{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Zr(this.#e)}get(){const t=un(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const n=un(this.#e);return n===void 0?t:n}set(t){return Jr(this.#e,t)}}function Ki(e,t){switch(e){case"post":B(t);break;case"pre":Qr(t);break}}function Gn(e,t,n,r={}){const{lazy:i=!1}=r;let s=!i,o=Array.isArray(e)?[]:void 0;Ki(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!s){s=!0,o=a;return}const c=Pe(()=>n(a,o));return o=a,c})}function z(e,t,n){Gn(e,"post",t,n)}function Hi(e,t,n){Gn(e,"pre",t,n)}z.pre=Hi;function gn(e){return Vi(e)?e():e}class Ui{#t={width:0,height:0};#e=!1;#n;#r;#i;#o=A(()=>(d(this.#s)?.(),this.getSize().width));#a=A(()=>(d(this.#s)?.(),this.getSize().height));#s=A(()=>{const t=gn(this.#r);if(t)return Nn(n=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const s of i){const o=this.#n.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}n()});return r.observe(t),()=>{this.#e=!1,r.disconnect()}})});constructor(t,n={box:"border-box"}){this.#i=n.window??Yn,this.#n=n,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=gn(this.#r);if(!t||!this.#i)return;const n=t.offsetWidth,r=t.offsetHeight;if(this.#n.box==="border-box")return{width:n,height:r};const i=this.#i.getComputedStyle(t),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=n-s-a,f=r-o-c;return{width:u,height:f}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return d(this.#s)?.(),this.getSize()}get width(){return d(this.#o)}get height(){return d(this.#a)}}function Ft(e){B(()=>()=>{e()})}function ji(e,t){return setTimeout(t,e)}function nt(e){$r().then(e)}const Yi=1,Gi=9,Xi=11;function Fe(e){return Vt(e)&&e.nodeType===Yi&&typeof e.nodeName=="string"}function Xn(e){return Vt(e)&&e.nodeType===Gi}function qi(e){return Vt(e)&&e.constructor?.name==="VisualViewport"}function Zi(e){return Vt(e)&&e.nodeType!==void 0}function qn(e){return Zi(e)&&e.nodeType===Xi&&"host"in e}function Ji(e,t){if(!e||!t||!Fe(e)||!Fe(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&qn(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return Xn(e)?e:qi(e)?e.document:e?.ownerDocument??document}function We(e){return qn(e)?We(e.host):Xn(e)?e.defaultView??window:Fe(e)?e.ownerDocument?.defaultView??window:window}function Qi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class ze{element;#t=A(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){b(this.#t,t)}constructor(t){typeof t=="function"?this.element=x(t):this.element=t}getDocument=()=>Ht(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Qi(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 ht(e,t){return{[ii()]:n=>Kt(e)?(e.current=n,Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t?.(null))})}}function Ve(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function za(e){return e?!0:void 0}function Ke(e){return e?"open":"closed"}function Va(e,t){return t?"mixed":e?"true":"false"}class $i{#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 to(e){const t=new $i(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Wt="ArrowDown",Ut="ArrowLeft",jt="ArrowRight",ne="ArrowUp",Jn="End",Qn="Enter",eo="Escape",$n="Home",no="PageDown",ro="PageUp",ye=" ",io="Tab";function oo(e){return window.getComputedStyle(e).getPropertyValue("direction")}function so(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Ut:jt,vertical:Wt}[t]}function ao(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?jt:Ut,vertical:ne}[t]}function co(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:so(e,t),prevKey:ao(e,t)}}const tr=typeof document<"u",pn=uo();function uo(){return tr&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ot(e){return e instanceof HTMLElement}function Re(e){return e instanceof Element}function er(e){return e instanceof Element||e instanceof SVGElement}function Ka(e){return e.pointerType==="touch"}function lo(e){return e!==null}function fo(e){return e instanceof HTMLInputElement&&"select"in e}class ho{#t;#e=xt(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 i=this.#t.rootNode.current;if(!i||!t)return;const s=this.getCandidateNodes();if(!s.length)return;const o=s.indexOf(t),a=oo(i),{nextKey:c,prevKey:u}=co(a,this.#t.orientation.current),f=this.#t.loop.current,l={[c]:o+1,[u]:o-1,[$n]:0,[Jn]:s.length-1};if(r){const m=c===Wt?jt:Wt,p=u===ne?Ut:ne;l[m]=o+1,l[p]=o-1}let g=l[n.key];if(g===void 0)return;n.preventDefault(),g<0&&f?g=s.length-1:g===s.length&&f&&(g=0);const h=s[g];if(h)return h.focus(),this.#e.current=h.id,this.#t.onCandidateFocus?.(h),h}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||!ot(n)||n.focus()}}class go{#t;#e=null;constructor(t){this.#t=t,Ft(()=>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(i=>i.finished)).then(()=>{this.#r(t)})})}}#r(t){const n=()=>{t()};this.#t.afterTick?nt(n):n()}}class po{#t;#e;#n;#r=P(!1);constructor(t){this.#t=t,b(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new go({ref:this.#t.ref,afterTick:this.#t.open}),z(()=>this.#t.open.current,n=>{n&&b(this.#r,!0),this.#e&&this.#n.run(()=>{n===this.#t.open.current&&(this.#t.open.current||b(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function W(){}function Ha(e,t){return`bits-${e}`}function mo(e,t){var n=_(),r=N(n);si(r,()=>t.children,i=>{var s=_(),o=N(s);$(o,()=>t.children??Q),R(i,s)}),R(e,n)}const bo=new St("BitsConfig");function vo(){const e=new yo(null,{});return bo.getOr(e).opts}class yo{opts;constructor(t,n){const r=wo(t,n);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function wo(e,t){return n=>x(()=>{const i=n(t)?.current;if(i!==void 0)return i;if(e!==null)return n(e.opts)?.current})}function xo(e,t){return n=>{const r=vo();return x(()=>{const i=n();if(i!==void 0)return i;const s=e(r).current;return s!==void 0?s:t})}}const So=xo(e=>e.defaultPortalTo,"body");function Ua(e,t){Y(t,!0);const n=So(()=>t.to),r=ti();let i=A(s);function s(){if(!tr||t.disabled)return null;let l=null;return typeof n.current=="string"?l=document.querySelector(n.current):l=n.current,l}let o;function a(){o&&(Kr(o),o=null)}z([()=>d(i),()=>t.disabled],([l,g])=>{if(!l||g){a();return}return o=Vr(mo,{target:l,props:{children:t.children},context:r}),()=>{a()}});var c=_(),u=N(c);{var f=l=>{var g=_(),h=N(g);$(h,()=>t.children??Q),R(l,g)};Mt(u,l=>{t.disabled&&l(f)})}R(e,c),G()}class Ao{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 i=s=>{n(s)};return I(t,this.eventName,i,r)}}function mn(e,t=500){let n=null;const r=(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function nr(e,t){return e===t||e.contains(t)}function rr(e){return e?.ownerDocument??document}function Eo(e,t){const{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}const Ie=[Qn,ye],Oo=[Wt,ro,$n],ir=[ne,no,Jn],To=[...Oo,...ir],Co={ltr:[...Ie,jt],rtl:[...Ie,Ut]},ja={ltr:[Ut],rtl:[jt]};function re(e){return e.pointerType==="mouse"}function Po(e,{select:t=!1}={}){if(!e||!e.focus)return;const n=Ht(e);if(n.activeElement===e)return;const r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&fo(e)&&t&&e.select()}function Mo(e,{select:t=!1}={},n){const r=n();for(const i of e)if(Po(i,{select:t}),n()!==r)return!0}let Dt=P(!1);class dt{static _refs=0;static _cleanup;constructor(){B(()=>(dt._refs===0&&(dt._cleanup=zn(()=>{const t=[],n=i=>{b(Dt,!1)},r=i=>{b(Dt,!0)};return t.push(I(document,"pointerdown",n,{capture:!0}),I(document,"pointermove",n,{capture:!0}),I(document,"keydown",r,{capture:!0})),vt(...t)})),dt._refs++,()=>{dt._refs--,dt._refs===0&&(b(Dt,!1),dt._cleanup?.())}))}get current(){return d(Dt)}set current(t){b(Dt,t,!0)}}var or=["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] *)"],ie=or.join(","),sr=typeof Element>"u",yt=sr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oe=!sr&&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},se=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):se(t.parentNode));return o},Fo=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ar=function(t,n,r){if(se(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ie));return n&&yt.call(t,ie)&&i.unshift(t),i=i.filter(r),i},ae=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!se(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=ae(c,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var f=yt.call(o,ie);f&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!se(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&g){var h=ae(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else s.unshift.apply(s,o.children)}}return i},cr=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ur=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fo(t))&&!cr(t)?0:t.tabIndex},Ro=function(t,n){var r=ur(t);return r<0&&n&&!cr(t)?0:r},Io=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lr=function(t){return t.tagName==="INPUT"},ko=function(t){return lr(t)&&t.type==="hidden"},Do=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},No=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Lo=function(t){if(!t.name)return!0;var n=t.form||oe(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){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",o.message),!1}var s=No(i,t.form);return!s||s===t},Bo=function(t){return lr(t)&&t.type==="radio"},_o=function(t){return Bo(t)&&!Lo(t)},Wo=function(t){var n,r=t&&oe(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,c;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var u,f,l;r=oe(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=i)!==null&&f!==void 0&&(l=f.ownerDocument)!==null&&l!==void 0&&l.contains(i))}}return s},bn=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},zo=function(t,n){var r=n.displayCheck,i=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 o=yt.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yt.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,f=oe(t);if(u&&!u.shadowRoot&&i(u)===!0)return bn(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=c}if(Wo(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bn(t);return!1},Vo=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 i=n.children.item(r);if(i.tagName==="LEGEND")return yt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ce=function(t,n){return!(n.disabled||ko(n)||zo(n,t)||Do(n)||Vo(n))},ke=function(t,n){return!(_o(n)||ur(n)<0||!ce(t,n))},Ko=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},fr=function(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,c=Ro(a,o),u=o?fr(i.candidates):a;c===0?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:u})}),r.sort(Io).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},dr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ke.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ko}):r=ar(t,n.includeContainer,ke.bind(null,n)),fr(r)},hr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ce.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=ar(t,n.includeContainer,ce.bind(null,n)),r},He=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,ie)===!1?!1:ke(n,t)},Ho=or.concat("iframe:not([inert]):not([inert] *)").join(","),gr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,Ho)===!1?!1:ce(n,t)};function _t(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Uo(e,t){if(!He(e,_t()))return jo(e,t);const n=Ht(e),r=dr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function jo(e,t){const n=Ht(e);if(!gr(e,_t()))return n.body;const r=hr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(o=>He(o,_t()))??n.body}function Yo(e,t){return e.length!==t.length?!1:e.every((n,r)=>pr(n,t[r]))}function pr(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?Yo(e,t):typeof e=="object"&&typeof t=="object"?Go(e,t):Object.is(e,t)}function Go(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 i of n)if(!r.includes(i)||!pr(e[i],t[i]))return!1;return!0}function Ya(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 Ga(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 Xa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function qa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function mr(e,t,n){const r=t.toLowerCase();if(r.endsWith(" ")){const l=r.slice(0,-1);if(e.filter(p=>p.toLowerCase().startsWith(l)).length<=1)return mr(e,l,n);const h=n?.toLowerCase();if(h&&h.startsWith(l)&&h.charAt(l.length)===" "&&t.trim()===l)return n;const m=e.filter(p=>p.toLowerCase().startsWith(r));if(m.length>0){const p=n?e.indexOf(n):-1;return vn(m,Math.max(p,0)).find(O=>O!==n)||n}}const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=s.toLowerCase(),a=n?e.indexOf(n):-1;let c=vn(e,Math.max(a,0));s.length===1&&(c=c.filter(l=>l!==n));const f=c.find(l=>l?.toLowerCase().startsWith(o));return f!==n?f:void 0}function vn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Xo={afterMs:1e4,onChange:W};function br(e,t){const{afterMs:n,onChange:r,getWindow:i}={...Xo,...t};let s=null,o=P(Et(e));function a(){return i().setTimeout(()=>{b(o,e,!0),r?.(e)},n)}return B(()=>()=>{s&&i().clearTimeout(s)}),x(()=>d(o),c=>{b(o,c,!0),r?.(c),s&&i().clearTimeout(s),s=a()})}class qo{#t;#e;#n=A(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#r=A(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=br("",{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=d(this.#r)(),i=n.find(c=>c===r)?.textContent?.trim()??"",s=n.map(c=>c.textContent?.trim()??""),o=mr(s,this.#e.current,i),a=n.find(c=>c.textContent?.trim()===o);return a&&d(this.#n)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}class Zo{#t;#e;#n;#r=P(null);constructor(t){this.#t=t,this.#e=A(()=>this.#t.enabled()),this.#n=br(!1,{afterMs:t.transitTimeout??300,onChange:n=>{d(this.#e)&&this.#t.setIsPointerInTransit?.(n)},getWindow:()=>We(this.#t.triggerNode())}),z([t.triggerNode,t.contentNode,t.enabled],([n,r,i])=>{if(!n||!r||!i)return;const s=a=>{this.#o(a,r)},o=a=>{this.#o(a,n)};return vt(I(n,"pointerleave",s),I(r,"pointerleave",o))}),z(()=>d(this.#r),()=>{const n=i=>{if(!d(this.#r))return;const s=i.target;if(!Re(s))return;const o={x:i.clientX,y:i.clientY},a=t.triggerNode()?.contains(s)||t.contentNode()?.contains(s),c=!ts(o,d(this.#r));a?this.#i():c&&(this.#i(),t.onPointerExit())},r=Ht(t.triggerNode()??t.contentNode());if(r)return I(r,"pointermove",n)})}#i(){b(this.#r,null),this.#n.current=!1}#o(t,n){const r=t.currentTarget;if(!ot(r))return;const i={x:t.clientX,y:t.clientY},s=Jo(i,r.getBoundingClientRect()),o=Qo(i,s),a=$o(n.getBoundingClientRect()),c=es([...o,...a]);b(this.#r,c,!0),this.#n.current=!0}}function Jo(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qo(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 $o(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ts(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,c=t[s].y,u=t[o].x,f=t[o].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function es(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),ns(t)}function ns(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}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 rs="data-context-menu-trigger",is="data-context-menu-content",vr=new St("Menu.Root"),Ct=new St("Menu.Root | Menu.Sub"),Ue=new St("Menu.Content"),yr=new Ao("bitsmenuopen",{bubbles:!1,cancelable:!0}),os=to({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class wr{static create(t){const n=new wr(t);return vr.set(n)}opts;isUsingKeyboard=new dt;#t=P(!1);get ignoreCloseAutoFocus(){return d(this.#t)}set ignoreCloseAutoFocus(t){b(this.#t,t,!0)}#e=P(!1);get isPointerInTransit(){return d(this.#e)}set isPointerInTransit(t){b(this.#e,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>os.getAttr(t,this.opts.variant.current)}class je{static create(t,n){return Ct.set(new je(t,n,null))}opts;root;parentMenu;contentId=x(()=>"");#t=P(null);get contentNode(){return d(this.#t)}set contentNode(t){b(this.#t,t,!0)}contentPresence;#e=P(null);get triggerNode(){return d(this.#e)}set triggerNode(t){b(this.#e,t,!0)}constructor(t,n,r){this.opts=t,this.root=n,this.parentMenu=r,this.contentPresence=new po({ref:x(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&z(()=>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 xr{static create(t){return Ue.set(new xr(t,Ct.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#t=P("");get search(){return d(this.#t)}set search(t){b(this.#t,t,!0)}#e=0;#n;#r=P(!1);get mounted(){return d(this.#r)}set mounted(t){b(this.#r,t,!0)}#i;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new ze(t.ref),this.attachment=ht(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),n.contentId=t.id,this.#i=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 Zo({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 qo({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new ho({rootNode:x(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:x(()=>"vertical")}),z(()=>this.parentMenu.contentNode,r=>{if(!r)return;const i=()=>{nt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return yr.listen(r,i)}),B(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#e)})}#o(){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.#i)&&this.parentMenu.triggerNode&&He(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=Uo(n.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),nt(()=>{r.focus(),nt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===io){this.handleTabKeyDown(t);return}const n=t.target,r=t.currentTarget;if(!ot(n)||!ot(r))return;const i=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,s=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const c=this.#o();i&&!s&&o&&this.#n(t.key,c),t.target?.id===this.parentMenu.contentId.current&&To.includes(t.key)&&(t.preventDefault(),ir.includes(t.key)&&c.reverse(),Mo(c,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Re(t.currentTarget)&&Re(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#e),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&nt(()=>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(!er(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=A(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return d(this.#s)}set snippetProps(t){b(this.#s,t)}#c=A(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Ke(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 d(this.#c)}set props(t){b(this.#c,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Sr{opts;content;attachment;#t=P(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=ht(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&&re(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const r=t.currentTarget;if(!ot(r))return;r.focus()}}onpointerleave(t){t.defaultPrevented||re(t)&&this.content.onItemLeave(t)}onfocus(t){nt(()=>{t.defaultPrevented||this.opts.disabled.current||b(this.#t,!0)})}onblur(t){nt(()=>{t.defaultPrevented||b(this.#t,!1)})}#e=A(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Ve(this.opts.disabled.current),"data-disabled":Zn(this.opts.disabled.current),"data-highlighted":d(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 d(this.#e)}set props(t){b(this.#e,t)}}class Ar{static create(t){const n=new Sr(t,Ue.get());return new Ar(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===ye)&&Ie.includes(t.key)){if(!ot(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(!ot(t.currentTarget))return;t.currentTarget?.click()}}onpointerdown(t){this.#t=!0}#n=A(()=>ve(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Er{static create(t){const n=Ue.get(),r=new Sr(t,n),i=Ct.get();return new Er(t,r,n,i)}opts;item;content;submenu;attachment;#t=null;constructor(t,n,r,i){this.opts=t,this.item=n,this.content=r,this.submenu=i,this.attachment=ht(this.opts.ref,s=>this.submenu.triggerNode=s),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Ft(()=>{this.#e()})}#e(){this.#t!==null&&(this.content.domContext.getWindow().clearTimeout(this.#t),this.#t=null)}onpointermove(t){re(t)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#t&&!this.content.parentMenu.root.isPointerInTransit&&(this.#t=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#e()},this.opts.openDelay.current))}onpointerleave(t){re(t)&&this.#e()}onkeydown(t){const n=this.content.search!=="";this.item.opts.disabled.current||n&&t.key===ye||Co[this.submenu.root.opts.dir.current].includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}onclick(t){if(this.item.opts.disabled.current||!ot(t.currentTarget))return;t.currentTarget.focus();const n=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(n),this.submenu.opts.open.current||(this.submenu.onOpen(),nt(()=>{const r=this.submenu.contentNode;r&&yr.dispatch(r)}))}#n=A(()=>ve({"aria-haspopup":"menu","aria-expanded":Ve(this.submenu.opts.open.current),"data-state":Ke(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Or{static create(t){return new Or(t,vr.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=ht(this.opts.ref)}#t=A(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){b(this.#t,t)}}class Tr{static create(t){return new Tr(t,Ct.get())}opts;parentMenu;attachment;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=ht(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===ye||t.key===Qn){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===Wt&&(this.parentMenu.onOpen(),t.preventDefault())}};#t=A(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#e=A(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Ve(this.parentMenu.opts.open.current),"aria-controls":d(this.#t),"data-disabled":Zn(this.opts.disabled.current),"data-state":Ke(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 d(this.#e)}set props(t){b(this.#e,t)}}class Za{static create(t){const n=Ct.get();return Ct.set(new je(t,n.root,n))}}globalThis.bitsDismissableLayers??=new Map;class Ye{static create(t){return new Ye(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#i=!1;#o=void 0;#a;#s=W;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#a=t.onFocusOutside,B(()=>{this.#o=rr(this.opts.ref.current)});let n=W;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),n()};z([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ji(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),n(),n=this.#f())}),r}),Ft(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#s(),n()})}#c=t=>{t.defaultPrevented||this.opts.ref.current&&nt(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#f(){return vt(I(this.#o,"pointerdown",vt(this.#h,this.#p),{capture:!0}),I(this.#o,"pointerdown",vt(this.#g,this.#u)),I(this.#o,"focusin",this.#c))}#l=t=>{let n=t;n.defaultPrevented&&(n=yn(t)),this.#t.current(t)};#u=mn(t=>{if(!this.opts.ref.current){this.#s();return}const n=this.opts.isValidEvent.current(t,this.opts.ref.current)||cs(t,this.opts.ref.current);if(!this.#r||this.#b()||!n){this.#s();return}let r=t;if(r.defaultPrevented&&(r=yn(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#s();return}t.pointerType==="touch"?(this.#s(),this.#s=I(this.#o,"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=as(this.opts.ref.current))};#m=t=>this.opts.ref.current?nr(this.opts.ref.current,t):!1;#d=mn(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}}function ss(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function as(e){const t=[...globalThis.bitsDismissableLayers],n=ss(t);if(n)return n[0].opts.ref.current===e;const[r]=t[0];return r.opts.ref.current===e}function cs(e,t){const n=e.target;if(!er(n))return!1;const r=!!n.closest(`[${rs}]`);if("button"in e&&e.button>0&&!r)return!1;if("button"in e&&e.button===0&&r)return!0;const i=!!t.closest(`[${is}]`);return r&&i?!1:rr(n).documentElement.contains(n)&&!nr(t,n)&&Eo(e,t)}function yn(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 i=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?n:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:e[a]})}function us(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"onInteractOutside",3,W),i=y(t,"onFocusOutside",3,W),s=y(t,"isValidEvent",3,()=>!1);const o=Ye.create({id:x(()=>t.id),interactOutsideBehavior:x(()=>n()),onInteractOutside:x(()=>r()),enabled:x(()=>t.enabled),onFocusOutside:x(()=>i()),isValidEvent:x(()=>s()),ref:t.ref});var a=_(),c=N(a);$(c,()=>t.children??Q,()=>({props:o.props})),R(e,a),G()}globalThis.bitsEscapeLayers??=new Map;class Ge{static create(t){return new Ge(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ze(this.opts.ref);let n=W;z(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=this.#t()),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>I(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==eo||!ls(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 ls(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(n)return n[0]===e;const[r]=t[0];return r===e}function fs(e,t){Y(t,!0);let n=y(t,"escapeKeydownBehavior",3,"close"),r=y(t,"onEscapeKeydown",3,W);Ge.create({escapeKeydownBehavior:x(()=>n()),onEscapeKeydown:x(()=>r()),enabled:x(()=>t.enabled),ref:t.ref});var i=_(),s=N(i);$(s,()=>t.children??Q),R(e,i),G()}class Xe{static instance;#t=et([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Xe),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(i=>i!==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 qe{#t=!1;#e=null;#n=Xe.getInstance();#r=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#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.#o(),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.#i.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.#i.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.#i.trap.current)return;const t=this.#e,n=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&gr(u))o.preventDefault(),u.focus();else{const f=this.#l(),l=this.#u()[0];(f||l||t).focus()}}},i=o=>{if(!this.#i.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#f();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&n.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&n.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(I(n,"focusin",r,{capture:!0}),I(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#l(),c=this.#u()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>s.disconnect())}#f(){return this.#e?dr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#l(){return this.#f()[0]||null}#u(){return this.#e?hr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return z([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new qe(t)),n.mount(r)):n&&(n.unmount(),n=null)}),Ft(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}}function ds(e,t){Y(t,!0);let n=y(t,"enabled",3,!1),r=y(t,"trapFocus",3,!1),i=y(t,"loop",3,!1),s=y(t,"onCloseAutoFocus",3,W),o=y(t,"onOpenAutoFocus",3,W);const a=qe.use({enabled:x(()=>n()),trap:x(()=>r()),loop:i(),onCloseAutoFocus:x(()=>s()),onOpenAutoFocus:x(()=>o()),ref:t.ref});var c=_(),u=N(c);$(u,()=>t.focusScope??Q,()=>({props:a.props})),R(e,c),G()}globalThis.bitsTextSelectionLayers??=new Map;class Ze{static create(t){return new Ze(t)}opts;domContext;#t=W;constructor(t){this.opts=t,this.domContext=new ze(t.ref);let n=W;z(()=>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 vt(I(this.domContext.getDocument(),"pointerdown",this.#n),I(this.domContext.getDocument(),"pointerup",Hn(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const n=this.opts.ref.current,r=t.target;!ot(n)||!ot(r)||!this.opts.enabled.current||!gs(this)||!Ji(n,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=hs(n,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=W}}const wn=e=>e.style.userSelect||e.style.webkitUserSelect;function hs(e,t){const n=wn(t),r=wn(e);return Gt(t,"none"),Gt(e,"text"),()=>{Gt(t,n),Gt(e,r)}}function Gt(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function gs(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function ps(e,t){Y(t,!0);let n=y(t,"preventOverflowTextSelection",3,!0),r=y(t,"onPointerDown",3,W),i=y(t,"onPointerUp",3,W);Ze.create({id:x(()=>t.id),onPointerDown:x(()=>r()),onPointerUp:x(()=>i()),enabled:x(()=>t.enabled&&n()),ref:t.ref});var s=_(),o=N(s);$(o,()=>t.children??Q),R(e,s),G()}globalThis.bitsIdCounter??={current:0};function Je(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class ms{#t;#e=0;#n=P();#r;constructor(t){this.#t=t}#i(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),b(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=zn(()=>{b(this.#n,this.#t(...t),!0)})),B(()=>()=>{this.#i()}),d(this.#n)}}const Zt=new ai;let Xt=P(null),Oe=null,Nt=null,Lt=!1;const xn=x(()=>{for(const e of Zt.values())if(e)return!0;return!1});let Te=null;const bs=new ms(()=>{function e(){document.body.setAttribute("style",d(Xt)??""),document.body.style.removeProperty("--scrollbar-width"),pn&&Oe?.(),b(Xt,null)}function t(){Nt!==null&&(window.clearTimeout(Nt),Nt=null)}function n(i,s){t(),Lt=!0,Te=Date.now();const o=Te,a=()=>{Nt=null,Te===o&&(Cr(Zt)?Lt=!1:(Lt=!1,s()))},c=i===null?24:i;Nt=window.setTimeout(a,c)}function r(){d(Xt)===null&&Zt.size===0&&!Lt&&b(Xt,document.body.getAttribute("style"),!0)}return z(()=>xn.current,()=>{if(!xn.current)return;r(),Lt=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",pn&&(Oe=I(document,"touchmove",f=>{f.target===document.documentElement&&(f.touches.length>1||f.preventDefault())},{passive:!1})),nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Ft(()=>()=>{Oe?.()}),{get lockMap(){return Zt},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class vs{#t=Je();#e;#n=()=>null;#r;locked;constructor(t,n=()=>null){this.#e=t,this.#n=n,this.#r=bs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=x(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),Ft(()=>{if(this.#r.lockMap.delete(this.#t),Cr(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Cr(e){for(const[t,n]of e)if(n)return!0;return!1}function Sn(e,t){Y(t,!0);let n=y(t,"preventScroll",3,!0),r=y(t,"restoreScrollDelay",3,null);n()&&new vs(n(),()=>r()),G()}const ys=["top","right","bottom","left"],gt=Math.min,U=Math.max,ue=Math.round,qt=Math.floor,it=e=>({x:e,y:e}),ws={left:"right",right:"left",bottom:"top",top:"bottom"},xs={start:"end",end:"start"};function De(e,t,n){return U(e,gt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function Qe(e){return e==="x"?"y":"x"}function $e(e){return e==="y"?"height":"width"}const Ss=new Set(["top","bottom"]);function rt(e){return Ss.has(ut(e))?"y":"x"}function tn(e){return Qe(rt(e))}function As(e,t,n){n===void 0&&(n=!1);const r=Rt(e),i=tn(e),s=$e(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=le(o)),[o,le(o)]}function Es(e){const t=le(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>xs[t])}const An=["left","right"],En=["right","left"],Os=["top","bottom"],Ts=["bottom","top"];function Cs(e,t,n){switch(e){case"top":case"bottom":return n?t?En:An:t?An:En;case"left":case"right":return t?Os:Ts;default:return[]}}function Ps(e,t,n,r){const i=Rt(e);let s=Cs(ut(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ne)))),s}function le(e){return e.replace(/left|right|bottom|top/g,t=>ws[t])}function Ms(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pr(e){return typeof e!="number"?Ms(e):{top:e,right:e,bottom:e,left:e}}function fe(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function On(e,t,n){let{reference:r,floating:i}=e;const s=rt(t),o=tn(t),a=$e(o),c=ut(t),u=s==="y",f=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let h;switch(c){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-i.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rt(t)){case"start":h[o]-=g*(n&&u?-1:1);break;case"end":h[o]+=g*(n&&u?-1:1);break}return h}async function Fs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:g=!1,padding:h=0}=ct(t,e),m=Pr(h),v=a[g?l==="floating"?"reference":"floating":l],w=fe(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),O=l==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=fe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:E,strategy:c}):O);return{top:(w.top-T.top+m.top)/S.y,bottom:(T.bottom-w.bottom+m.bottom)/S.y,left:(w.left-T.left+m.left)/S.x,right:(T.right-w.right+m.right)/S.x}}const Rs=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:l}=On(u,r,c),g=r,h={},m=0;for(let v=0;v<a.length;v++){var p;const{name:w,fn:O}=a[v],{x:E,y:S,data:T,reset:C}=await O({x:f,y:l,initialPlacement:r,placement:g,strategy:i,middlewareData:h,rects:u,platform:{...o,detectOverflow:(p=o.detectOverflow)!=null?p:Fs},elements:{reference:e,floating:t}});f=E??f,l=S??l,h={...h,[w]:{...h[w],...T}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:f,y:l}=On(u,g,c)),v=-1)}return{x:f,y:l,placement:g,strategy:i,middlewareData:h}},Is=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const l=Pr(f),g={x:n,y:r},h=tn(i),m=$e(h),p=await o.getDimensions(u),v=h==="y",w=v?"top":"left",O=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-g[h]-s.floating[m],T=g[h]-s.reference[h],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=C?C[E]:0;(!M||!await(o.isElement==null?void 0:o.isElement(C)))&&(M=a.floating[E]||s.floating[m]);const V=S/2-T/2,F=M/2-p[m]/2-1,k=gt(l[w],F),q=gt(l[O],F),L=k,tt=M-p[m]-q,D=M/2-p[m]/2+V,lt=De(L,D,tt),X=!c.arrow&&Rt(i)!=null&&D!==lt&&s.reference[m]/2-(D<L?k:q)-p[m]/2<0,K=X?D<L?D-L:D-tt:0;return{[h]:g[h]+K,data:{[h]:lt,centerOffset:D-lt-K,...X&&{alignmentOffset:K}},reset:X}}}),ks=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ct(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ut(i),O=rt(a),E=ut(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),T=g||(E||!p?[le(a)]:Es(a)),C=m!=="none";!g&&C&&T.push(...Ps(a,p,m,S));const M=[a,...T],V=await c.detectOverflow(t,v),F=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[w]),l){const D=As(i,o,S);F.push(V[D[0]],V[D[1]])}if(k=[...k,{placement:i,overflows:F}],!F.every(D=>D<=0)){var q,L;const D=(((q=s.flip)==null?void 0:q.index)||0)+1,lt=M[D];if(lt&&(!(l==="alignment"?O!==rt(lt):!1)||k.every(H=>rt(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:lt}};let X=(L=k.filter(K=>K.overflows[0]<=0).sort((K,H)=>K.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!X)switch(h){case"bestFit":{var tt;const K=(tt=k.filter(H=>{if(C){const ft=rt(H.placement);return ft===O||ft==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ft=>ft>0).reduce((ft,zr)=>ft+zr,0)]).sort((H,ft)=>H[1]-ft[1])[0])==null?void 0:tt[0];K&&(X=K);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function Tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cn(e){return ys.some(t=>e[t]>=0)}const Ds=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ct(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Tn(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cn(a)}}}case"escaped":{const o=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Tn(o,n.floating);return{data:{escapedOffsets:a,escaped:Cn(a)}}}default:return{}}}}},Mr=new Set(["left","top"]);async function Ns(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ut(n),a=Rt(n),c=rt(n)==="y",u=Mr.has(o)?-1:1,f=s&&c?-1:1,l=ct(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*f,y:g*u}:{x:g*u,y:h*f}}const Ls=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await Ns(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:O,y:E}=w;return{x:O,y:E}}},...u}=ct(e,t),f={x:n,y:r},l=await s.detectOverflow(t,u),g=rt(ut(i)),h=Qe(g);let m=f[h],p=f[g];if(o){const w=h==="y"?"top":"left",O=h==="y"?"bottom":"right",E=m+l[w],S=m-l[O];m=De(E,m,S)}if(a){const w=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=p+l[w],S=p-l[O];p=De(E,p,S)}const v=c.fn({...t,[h]:m,[g]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:o,[g]:a}}}}}},_s=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:n,y:r},l=rt(i),g=Qe(l);let h=f[g],m=f[l];const p=ct(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const E=g==="y"?"height":"width",S=s.reference[g]-s.floating[E]+v.mainAxis,T=s.reference[g]+s.reference[E]-v.mainAxis;h<S?h=S:h>T&&(h=T)}if(u){var w,O;const E=g==="y"?"width":"height",S=Mr.has(ut(i)),T=s.reference[l]-s.floating[E]+(S&&((w=o.offset)==null?void 0:w[l])||0)+(S?0:v.crossAxis),C=s.reference[l]+s.reference[E]+(S?0:((O=o.offset)==null?void 0:O[l])||0)-(S?v.crossAxis:0);m<T?m=T:m>C&&(m=C)}return{[g]:h,[l]:m}}}},Ws=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...u}=ct(e,t),f=await o.detectOverflow(t,u),l=ut(i),g=Rt(i),h=rt(i)==="y",{width:m,height:p}=s.floating;let v,w;l==="top"||l==="bottom"?(v=l,w=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=l,v=g==="end"?"top":"bottom");const O=p-f.top-f.bottom,E=m-f.left-f.right,S=gt(p-f[v],O),T=gt(m-f[w],E),C=!t.middlewareData.shift;let M=S,V=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=O),C&&!g){const k=U(f.left,0),q=U(f.right,0),L=U(f.top,0),tt=U(f.bottom,0);h?V=m-2*(k!==0||q!==0?k+q:U(f.left,f.right)):M=p-2*(L!==0||tt!==0?L+tt:U(f.top,f.bottom))}await c({...t,availableWidth:V,availableHeight:M});const F=await o.getDimensions(a.floating);return m!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function we(){return typeof window<"u"}function It(e){return Fr(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){var t;return(t=(Fr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fr(e){return we()?e instanceof Node||e instanceof j(e).Node:!1}function Z(e){return we()?e instanceof Element||e instanceof j(e).Element:!1}function st(e){return we()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function Pn(e){return!we()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}const zs=new Set(["inline","contents"]);function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zs.has(i)}const Vs=new Set(["table","td","th"]);function Ks(e){return Vs.has(It(e))}const Hs=[":popover-open",":modal"];function xe(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Us=["transform","translate","scale","rotate","perspective"],js=["transform","translate","scale","rotate","perspective","filter"],Ys=["paint","layout","strict","content"];function en(e){const t=nn(),n=Z(e)?J(e):e;return Us.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)||js.some(r=>(n.willChange||"").includes(r))||Ys.some(r=>(n.contain||"").includes(r))}function Gs(e){let t=pt(e);for(;st(t)&&!Pt(t);){if(en(t))return t;if(xe(t))return null;t=pt(t)}return null}function nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xs=new Set(["html","body","#document"]);function Pt(e){return Xs.has(It(e))}function J(e){return j(e).getComputedStyle(e)}function Se(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pt(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||at(e);return Pn(t)?t.host:t}function Rr(e){const t=pt(e);return Pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Yt(t)?t:Rr(t)}function zt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rr(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=j(i);if(s){const a=Le(o);return t.concat(o,o.visualViewport||[],Yt(i)?i:[],a&&n?zt(a):[])}return t.concat(i,zt(i,[],n))}function Le(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ir(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=st(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=ue(n)!==s||ue(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rn(e){return Z(e)?e:e.contextElement}function Ot(e){const t=rn(e);if(!st(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Ir(t);let o=(s?ue(n.width):n.width)/r,a=(s?ue(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const qs=it(0);function kr(e){const t=j(e);return!nn()||!t.visualViewport?qs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rn(e);let o=it(1);t&&(r?Z(r)&&(o=Ot(r)):o=Ot(e));const a=Zs(s,n,r)?kr(s):it(0);let c=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,l=i.height/o.y;if(s){const g=j(s),h=r&&Z(r)?j(r):r;let m=g,p=Le(m);for(;p&&r&&h!==m;){const v=Ot(p),w=p.getBoundingClientRect(),O=J(p),E=w.left+(p.clientLeft+parseFloat(O.paddingLeft))*v.x,S=w.top+(p.clientTop+parseFloat(O.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=S,m=j(p),p=Le(m)}}return fe({width:f,height:l,x:c,y:u})}function Ae(e,t){const n=Se(e).scrollLeft;return t?t.left+n:wt(at(e)).left+n}function Dr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ae(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=at(r),a=t?xe(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=it(1);const f=it(0),l=st(r);if((l||!l&&!s)&&((It(r)!=="body"||Yt(o))&&(c=Se(r)),st(r))){const h=wt(r);u=Ot(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=o&&!l&&!s?Dr(o,c):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Qs(e){return Array.from(e.getClientRects())}function $s(e){const t=at(e),n=Se(e),r=e.ownerDocument.body,i=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ae(e);const a=-n.scrollTop;return J(r).direction==="rtl"&&(o+=U(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Mn=25;function ta(e,t){const n=j(e),r=at(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const f=nn();(!f||f&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Ae(r);if(u<=0){const f=r.ownerDocument,l=f.body,g=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(r.clientWidth-l.clientWidth-h);m<=Mn&&(s-=m)}else u<=Mn&&(s+=u);return{width:s,height:o,x:a,y:c}}const ea=new Set(["absolute","fixed"]);function na(e,t){const n=wt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=st(e)?Ot(e):it(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:o,height:a,x:c,y:u}}function Fn(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=$s(at(e));else if(Z(t))r=na(t,n);else{const i=kr(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fe(r)}function Nr(e,t){const n=pt(e);return n===t||!Z(n)||Pt(n)?!1:J(n).position==="fixed"||Nr(n,t)}function ra(e,t){const n=t.get(e);if(n)return n;let r=zt(e,[],!1).filter(a=>Z(a)&&It(a)!=="body"),i=null;const s=J(e).position==="fixed";let o=s?pt(e):e;for(;Z(o)&&!Pt(o);){const a=J(o),c=en(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&ea.has(i.position)||Yt(o)&&!c&&Nr(e,o))?r=r.filter(f=>f!==o):i=a,o=pt(o)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?xe(t)?[]:ra(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=Fn(t,f,i);return u.top=U(l.top,u.top),u.right=gt(l.right,u.right),u.bottom=gt(l.bottom,u.bottom),u.left=U(l.left,u.left),u},Fn(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function oa(e){const{width:t,height:n}=Ir(e);return{width:t,height:n}}function sa(e,t,n){const r=st(t),i=at(t),s=n==="fixed",o=wt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=it(0);function u(){c.x=Ae(i)}if(r||!r&&!s)if((It(t)!=="body"||Yt(i))&&(a=Se(t)),r){const h=wt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const f=i&&!r&&!s?Dr(i,a):it(0),l=o.left+a.scrollLeft-c.x-f.x,g=o.top+a.scrollTop-c.y-f.y;return{x:l,y:g,width:o.width,height:o.height}}function Ce(e){return J(e).position==="static"}function Rn(e,t){if(!st(e)||J(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return at(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){const n=j(e);if(xe(e))return n;if(!st(e)){let i=pt(e);for(;i&&!Pt(i);){if(Z(i)&&!Ce(i))return i;i=pt(i)}return n}let r=Rn(e,t);for(;r&&Ks(r)&&Ce(r);)r=Rn(r,t);return r&&Pt(r)&&Ce(r)&&!en(r)?n:r||Gs(e)||n}const aa=async function(e){const t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:sa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ca(e){return J(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Js,getDocumentElement:at,getClippingRect:ia,getOffsetParent:Lr,getElementRects:aa,getClientRects:Qs,getDimensions:oa,getScale:Ot,isElement:Z,isRTL:ca};function Br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function la(e,t){let n=null,r;const i=at(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:l,width:g,height:h}=u;if(a||t(),!g||!h)return;const m=qt(l),p=qt(i.clientWidth-(f+g)),v=qt(i.clientHeight-(l+h)),w=qt(f),E={rootMargin:-m+"px "+-p+"px "+-v+"px "+-w+"px",threshold:U(0,gt(1,c))||1};let S=!0;function T(C){const M=C[0].intersectionRatio;if(M!==c){if(!S)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Br(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(e)}return o(!0),s}function fa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=rn(e),f=i||s?[...u?zt(u):[],...zt(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=u&&a?la(u,n):null;let g=-1,h=null;o&&(h=new ResizeObserver(w=>{let[O]=w;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?wt(e):null;c&&v();function v(){const w=wt(e);p&&!Br(p,w)&&n(),p=w,m=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),l?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const da=Ls,ha=Bs,ga=ks,pa=Ws,ma=Ds,ba=Is,va=_s,ya=(e,t,n)=>{const r=new Map,i={platform:ua,...n},s={...i.platform,_c:r};return Rs(e,t,{...i,platform:s})};function mt(e){return typeof e=="function"?e():e}function _r(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function In(e,t){const n=_r(e);return Math.round(t*n)/n}function Ja(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 wa(e){const t=e.whileElementsMounted,n=A(()=>mt(e.open)??!0),r=A(()=>mt(e.middleware)),i=A(()=>mt(e.transform)??!0),s=A(()=>mt(e.placement)??"bottom"),o=A(()=>mt(e.strategy)??"absolute"),a=A(()=>mt(e.sideOffset)??0),c=A(()=>mt(e.alignOffset)??0),u=e.reference;let f=P(0),l=P(0);const g=et(null);let h=P(Et(d(o))),m=P(Et(d(s))),p=P(Et({})),v=P(!1),w=!1;const O=A(()=>{const F=g.current?In(g.current,d(f)):d(f),k=g.current?In(g.current,d(l)):d(l);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${F}px, ${k}px)`,...g.current&&_r(g.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${F}px`,top:`${k}px`}});let E;function S(){u.current===null||g.current===null||ya(u.current,g.current,{middleware:d(r),placement:d(s),strategy:d(o)}).then(F=>{const k=u.current;if(xa(k)){b(p,{...d(p),hide:{...d(p).hide,referenceHidden:!0}},!0);return}if(!d(n)&&d(f)!==0&&d(l)!==0){const L=Math.max(Math.abs(d(a)),Math.abs(d(c)),15);if(F.x<=L&&F.y<=L)return}b(f,F.x,!0),b(l,F.y,!0),b(h,F.strategy,!0),b(m,F.placement,!0),b(p,F.middlewareData,!0),b(v,!0)})}function T(){typeof E=="function"&&(E(),E=void 0)}function C(){if(T(),t===void 0){S();return}d(n)&&(u.current===null||g.current===null||(E=t(u.current,g.current,S)))}function M(){d(n)||b(v,!1)}function V(){return[d(r),d(s),d(o),d(a),d(c),d(n)]}return B(()=>{t===void 0&&d(n)&&S()}),B(C),B(()=>{if(t!==void 0){if(V(),!d(n)){w=!1;return}if(!d(v)){w=!1;return}if(!w){w=!0;return}S()}}),B(M),B(()=>T),{floating:g,reference:u,get strategy(){return d(h)},get placement(){return d(m)},get middlewareData(){return d(p)},get isPositioned(){return d(v)},get floatingStyles(){return d(O)},get update(){return S}}}function xa(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Sa={top:"bottom",right:"left",bottom:"top",left:"right"},on=new St("Floating.Root"),kn=new St("Floating.Content"),sn=new St("Floating.Root");class de{static create(t=!1){return t?sn.set(new de):on.set(new de)}anchorNode=et(null);customAnchorNode=et(null);triggerNode=et(null);constructor(){B(()=>{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 he{static create(t,n=!1){return n?kn.set(new he(t,sn.get())):kn.set(new he(t,on.get()))}opts;root;contentRef=et(null);wrapperRef=et(null);arrowRef=et(null);contentAttachment=ht(this.contentRef);wrapperAttachment=ht(this.wrapperRef);arrowAttachment=ht(this.arrowRef);arrowId=et(Je());#t=A(()=>{if(typeof this.opts.style=="string")return Bt(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new Ui(()=>this.arrowRef.current??void 0);#r=A(()=>this.#n?.width??0);#i=A(()=>this.#n?.height??0);#o=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=A(()=>d(this.#a).length>0);get hasExplicitBoundaries(){return d(this.#s)}set hasExplicitBoundaries(t){b(this.#s,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#a).filter(lo),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#c)}set detectOverflowOptions(t){b(this.#c,t)}#f=P(void 0);#l=P(void 0);#u=P(void 0);#h=P(void 0);#g=A(()=>[da({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&ha({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?va():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ga({...this.detectOverflowOptions}),pa({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:s}=t.reference;b(this.#f,n,!0),b(this.#l,r,!0),b(this.#u,i,!0),b(this.#h,s,!0)}}),this.arrowRef.current&&ba({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Aa({arrowWidth:d(this.#r),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&ma({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#g)}set middleware(t){b(this.#g,t)}floating;#p=A(()=>Ea(this.floating.placement));get placedSide(){return d(this.#p)}set placedSide(t){b(this.#p,t)}#m=A(()=>Oa(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){b(this.#m,t)}#d=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#d)}set arrowX(t){b(this.#d,t)}#b=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#b)}set arrowY(t){b(this.#b,t)}#v=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#v)}set cannotCenterArrow(t){b(this.#v,t)}#y=P();get contentZIndex(){return d(this.#y)}set contentZIndex(t){b(this.#y,t,!0)}#w=A(()=>Sa[this.placedSide]);get arrowBaseSide(){return d(this.#w)}set arrowBaseSide(t){b(this.#w,t)}#x=A(()=>({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":`${d(this.#f)}px`,"--bits-floating-available-height":`${d(this.#l)}px`,"--bits-floating-anchor-width":`${d(this.#u)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#x)}set wrapperProps(t){b(this.#x,t)}#S=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:jn({...d(this.#t)}),...this.contentAttachment}));get props(){return d(this.#S)}set props(t){b(this.#S,t)}#A=A(()=>({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 d(this.#A)}set arrowStyle(t){b(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),z(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=wa({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>fa(...r,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),B(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),z(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const i=We(r),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const o=i.getComputedStyle(r).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),B(()=>{this.floating.floating.current=this.wrapperRef.current})}}class ge{static create(t,n=!1){return n?new ge(t,sn.get()):new ge(t,on.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Kn(t.virtualEl.current):n.triggerNode=t.ref}}function Aa(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=an(n),l={start:"0%",center:"50%",end:"100%"}[f],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=o?l:`${g}px`,p=`${-c}px`):u==="top"?(m=o?l:`${g}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=o?l:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=o?l:`${h}px`),{data:{x:m,y:p}}}}}function an(e){const[t,n="center"]=e.split("-");return[t,n]}function Ea(e){return an(e)[0]}function Oa(e){return an(e)[1]}function Qa(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);de.create(n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function $a(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);ge.create({id:x(()=>t.id),virtualEl:x(()=>t.virtualEl),ref:t.ref},n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function Ta(e,t){Y(t,!0);let n=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),i=y(t,"align",3,"center"),s=y(t,"alignOffset",3,0),o=y(t,"arrowPadding",3,0),a=y(t,"avoidCollisions",3,!0),c=y(t,"collisionBoundary",19,()=>[]),u=y(t,"collisionPadding",3,0),f=y(t,"hideWhenDetached",3,!1),l=y(t,"onPlaced",3,()=>{}),g=y(t,"sticky",3,"partial"),h=y(t,"updatePositionStrategy",3,"optimized"),m=y(t,"strategy",3,"fixed"),p=y(t,"dir",3,"ltr"),v=y(t,"style",19,()=>({})),w=y(t,"wrapperId",19,Je),O=y(t,"customAnchor",3,null),E=y(t,"tooltip",3,!1);const S=he.create({side:x(()=>n()),sideOffset:x(()=>r()),align:x(()=>i()),alignOffset:x(()=>s()),id:x(()=>t.id),arrowPadding:x(()=>o()),avoidCollisions:x(()=>a()),collisionBoundary:x(()=>c()),collisionPadding:x(()=>u()),hideWhenDetached:x(()=>f()),onPlaced:x(()=>l()),sticky:x(()=>g()),updatePositionStrategy:x(()=>h()),strategy:x(()=>m()),dir:x(()=>p()),style:x(()=>v()),enabled:x(()=>t.enabled),wrapperId:x(()=>w()),customAnchor:x(()=>O())},E()),T=A(()=>ve(S.wrapperProps,{style:{pointerEvents:"auto"}}));var C=_(),M=N(C);$(M,()=>t.content??Q,()=>({props:S.props,wrapperProps:d(T)})),R(e,C),G()}function Ca(e,t){Y(t,!0),ei(()=>{t.onPlaced?.()});var n=_(),r=N(n);$(r,()=>t.content??Q,()=>({props:{},wrapperProps:{}})),R(e,n),G()}function Pa(e,t){let n=y(t,"isStatic",3,!1),r=me(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=_(),s=N(i);{var o=c=>{Ca(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Ta(c,Be({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};Mt(s,c=>{n()?c(o):c(a,!1)})}R(e,i)}var Ma=Hr("<!> <!>",1);function Wr(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=y(t,"tooltip",3,!1),c=y(t,"contentPointerEvents",3,"auto"),u=me(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"]);Pa(e,{get isStatic(){return o()},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:(l,g)=>{let h=()=>g?.().props,m=()=>g?.().wrapperProps;var p=Ma(),v=N(p);{var w=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})},O=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})};Mt(v,S=>{t.forceMount&&t.enabled?S(w):t.forceMount||S(O,1)})}var E=ni(v,2);ds(E,{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:(T,C)=>{let M=()=>C?.().props;fs(T,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(V,F)=>{us(V,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(q,L)=>{let tt=()=>L?.().props;ps(q,{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:(D,lt)=>{var X=_(),K=N(X);{let H=A(()=>({props:ve(u,h(),tt(),M(),{style:{pointerEvents:c()}}),wrapperProps:m()}));$(K,()=>t.popper??Q,()=>d(H))}R(D,X)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),R(l,p)},$$slots:{content:!0}}),G()}function tc(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(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=_(),u=N(c);{var f=l=>{Wr(l,Be({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 o()},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 i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Mt(u,l=>{t.shouldRender&&l(f)})}R(e,c)}function ec(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(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"]);Wr(e,Be({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 o()},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 i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Fa=pe("<title> </title>"),Ra=pe('<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 nc(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=Ra();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=Fa(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}export{qo as $,po as A,to as B,St as C,Tr as D,Qn as E,Qa as F,Wa as G,ds as H,fs as I,us as J,Sn as K,Zn as L,Za as M,Ft as N,ji as O,ec as P,nt as Q,ho as R,ja as S,ps as T,Yo as U,si as V,nc as W,jn as X,Va as Y,br as Z,mr as _,Ar as a,ne as a0,Wt as a1,io as a2,ro as a3,$n as a4,no as a5,Jn as a6,Ya as a7,Ga as a8,Xa as a9,qa as aa,pn as ab,za as ac,ai as ad,x as b,Ha as c,Or as d,xr as e,tc as f,yr as g,Ja as h,ot as i,Er as j,$a as k,wr as l,ve as m,W as n,je as o,Ua as p,Ht as q,Re as r,ht as s,ze as t,Ka as u,ye as v,z as w,Ke as x,Ve as y,He as z};
@@ -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"./Bo0CMKlC.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{aX as ae,g as K,aB as oe,a6 as le,aY as q,U as N,P as Q,v as l,i as _,an as b,aZ as z,h as ue,j as V,z as fe,a_ as U,G as m,w as A,a$ as I,S as C,az as ce,b0 as X,b1 as de,b2 as G,b3 as he,b4 as _e,aw as L,b5 as O,b6 as Z,b7 as pe,b8 as ee,a3 as te,B as ve,Y as P,q as R,n as ge,o as be,b9 as D,E as me,$ as ye,ba as Ee,bb as Te,ah as we,bc as Ne,ai as Ae,bd as Re,y as S,be as Se,bf as De,bg as Me,bh as ke,bi as Le,bj as Oe,C as W,bk as F,H as xe,Z as Ie,bl as Y,u as M,bm as Ce,X as Pe,bn as Fe,M as Ye,p as $e,A as Be,bo as He,b as Ve}from"./CfuRx7rA.js";function We(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 ze(t,e,r,s)}class ze{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=We(()=>(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|=z,s(n)},this.parent=b.b,this.transform_error=i??this.parent?.transform_error??(n=>n),this.#e=ue(()=>{if(_){const n=this.#v;V();const a=n.data===fe;if(n.data.startsWith(U)){const o=JSON.parse(n.data.slice(U.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=A();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),Z(this.#e.ctx);try{return e()}catch(n){return pe(n),null}finally{L(r),O(s),Z(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),_&&(R(this.#v),ge(),R(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){D(u,this.#e&&this.#e.parent)}s&&(this.#n=this.#p(()=>{I.ensure();try{return m(()=>{var u=b;u.b=this,u.f|=z,s(this.#t,()=>o,()=>a)})}catch(u){return D(u,this.#e.parent),null}}))};N(()=>{var o;try{o=this.transform_error(e)}catch(u){D(u,this.#e&&this.#e.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(f,u=>D(u,this.#e&&this.#e.parent)):f(o)})}}function st(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Ue=["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 Ue.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 Ze(t){return Ge.includes(t)}const Je=["textarea","script","style","title"];function ot(t){return Je.includes(t)}const w=Symbol("events"),re=new Set,$=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 $)r(t)}let J=null;function B(t){var e=this,r=e.ownerDocument,s=t.type,i=t.composedPath?.()||[],n=i[0]||t.target;J=t;var a=0,f=J===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){Ae(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=Re("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&De)!==0,s=(e&Me)!==0,i,n=!t.startsWith("<!>");return()=>{if(_)return v(l,null),l;i===void 0&&(i=se(n?t:"<!>"+t),r||(i=S(i)));var a=s||Se?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=S(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=S(a);n=S(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=A(t+"");return v(e,e),e}var r=l;return r.nodeType!==ke?(r.before(r=A()),R(r)):Le(r),v(r,r),r}function pt(){if(_)return v(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=A();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),V();return}t!==null&&t.before(e)}function gt(){if(_&&l&&l.nodeType===W&&l.textContent?.startsWith("$")){const t=l.textContent.substring(1);return V(),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=S(r);n&&(n.nodeType!==W||n.data!==xe);)n=Ie(n);if(!n)throw Y;M(!0),R(n);const a=ie(t,{...e,anchor:n});return M(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==Y&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Ce(),F(),Pe(r),M(!1),tt(t,e)}finally{M(s),R(i)}}const k=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(A());qe(y,{pending:()=>{}},d=>{$e({});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!==W||l.data!==Be))throw He(),Y;Ve()},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=Ze(h);for(const x of[e,document]){var E=k.get(x);E===void 0&&(E=new Map,k.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(Ye(re)),$.add(g),()=>{for(var d of T)for(const p of[e,document]){var c=k.get(p),h=c.get(d);--h==0?(p.removeEventListener(d,B),c.delete(d),c.size===0&&k.delete(p)):c.set(d,h)}$.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,pt as c,ct as d,ut as e,ht as f,ft as g,mt as h,st as i,ne as j,it as k,We 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 +1 @@
1
- const a={project:"#5a70b0",organization:"#89a8ab",person:"#c09088",meeting:"#b5c090",deal:"#78d098",deliverable:"#e05050",decision:"#2a38a0",dataset:"#9090c0",process:"#b09890",deck:"#4a60a0",doc:"#a0c0d8",document:"#d8a0c0",note:"#707068",publication:"#d87070",reference:"#208850",task:"#b86058",role:"#484060","practice-area":"#7a7a98","case-study":"#2a4a3a",standard:"#dada98"};function r(e){return e?a[e]??"#5c5c66":"#5c5c66"}const c={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function s(e){return c[e]??e+"s"}export{r as e,s as p};
1
+ const a={project:"#5a70b0",organization:"#89a8ab",person:"#c09088",meeting:"#b5c090",deal:"#78d098",deliverable:"#e05050",decision:"#2a38a0",dataset:"#9090c0",process:"#b09890",deck:"#4a60a0",doc:"#a0c0d8",document:"#d8a0c0",note:"#707068",publication:"#d87070",reference:"#208850",task:"#b86058",role:"#484060","practice-area":"#7a7a98","case-study":"#2a4a3a",standard:"#dada98"};function s(e){return e?a[e]??"#5c5c66":"#5c5c66"}const r={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function t(e){return r[e]??e+"s"}function o(e){return e.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())}const n=Object.keys(a);export{n as A,s as e,o as f,t as p};
@@ -0,0 +1 @@
1
+ import{w as O,h as Z,x as J,i as M,q as b,y,j as $,g as V,k as j,z as ee,o as Y,u as F,v as H,C as re,A as ne,B as U,D as fe,F as m,G as L,I as ae,J as ie,K as le,L as ue,M as B,N as se,O as oe,m as te,P as X,Q as ve,R as K,S as P,T as z,U as de,V as ce,W as pe,X as _e,Y as he,Z as ge}from"./CfuRx7rA.js";function Ce(e,i){return i}function Ee(e,i,l){for(var d=[],g=i.length,s,u=i.length,p=0;p<g;p++){let E=i[p];P(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;q(B(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var a=d.length===0&&l!==null;if(a){var t=l,n=t.parentNode;_e(n),n.append(t),e.items.clear()}q(i,!a)}else s={pending:new Set(i),done:new Set},(e.outrogroups??=new Set).add(s)}function q(e,i=!0){for(var l=0;l<e.length;l++)he(e[l],i)}var G;function we(e,i,l,d,g,s=null){var u=e,p=new Map,a=(i&J)!==0;if(a){var t=e;u=M?b(y(t)):t.appendChild(O())}M&&$();var n=null,E=le(()=>{var f=l();return ue(f)?f:f==null?[]:B(f)}),o,c=!0;function A(){r.fallback=n,me(r,o,u,i,d),n!==null&&(o.length===0?(n.f&m)===0?K(n):(n.f^=m,D(n,null,u)):P(n,()=>{n=null}))}var I=Z(()=>{o=V(E);var f=o.length;let N=!1;if(M){var S=j(u)===ee;S!==(f===0)&&(u=Y(),b(u),F(!1),N=!0)}for(var h=new Set,C=fe,x=ie(),_=0;_<f;_+=1){M&&H.nodeType===re&&H.data===ne&&(u=H,N=!0,F(!1));var w=o[_],R=d(w,_),v=c?null:p.get(R);v?(v.v&&U(v.v,w),v.i&&U(v.i,_),x&&C.unskip_effect(v.e)):(v=Te(p,c?u:G??=O(),w,R,_,g,i,l),c||(v.e.f|=m),p.set(R,v)),h.add(R)}if(f===0&&s&&!n&&(c?n=L(()=>s(u)):(n=L(()=>s(G??=O())),n.f|=m)),f>h.size&&ae(),M&&f>0&&b(Y()),!c)if(x){for(const[Q,W]of p)h.has(Q)||C.skip_effect(W.e);C.oncommit(A),C.ondiscard(()=>{})}else A();N&&F(!0),V(E)}),r={effect:I,items:p,outrogroups:null,fallback:n};c=!1,M&&(u=H)}function k(e){for(;e!==null&&(e.f&ce)===0;)e=e.next;return e}function me(e,i,l,d,g){var s=(d&pe)!==0,u=i.length,p=e.items,a=k(e.effect.first),t,n=null,E,o=[],c=[],A,I,r,f;if(s)for(f=0;f<u;f+=1)A=i[f],I=g(A,f),r=p.get(I).e,(r.f&m)===0&&(r.nodes?.a?.measure(),(E??=new Set).add(r));for(f=0;f<u;f+=1){if(A=i[f],I=g(A,f),r=p.get(I).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&m)!==0)if(r.f^=m,r===a)D(r,null,l);else{var N=n?n.next:a;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),T(e,n,r),T(e,r,N),D(r,N,l),n=r,o=[],c=[],a=k(n.next);continue}if((r.f&z)!==0&&(K(r),s&&(r.nodes?.a?.unfix(),(E??=new Set).delete(r))),r!==a){if(t!==void 0&&t.has(r)){if(o.length<c.length){var S=c[0],h;n=S.prev;var C=o[0],x=o[o.length-1];for(h=0;h<o.length;h+=1)D(o[h],S,l);for(h=0;h<c.length;h+=1)t.delete(c[h]);T(e,C.prev,x.next),T(e,n,C),T(e,x,S),a=S,n=x,f-=1,o=[],c=[]}else t.delete(r),D(r,a,l),T(e,r.prev,r.next),T(e,r,n===null?e.effect.first:n.next),T(e,n,r),n=r;continue}for(o=[],c=[];a!==null&&a!==r;)(t??=new Set).add(a),c.push(a),a=k(a.next);if(a===null)continue}(r.f&m)===0&&o.push(r),n=r,a=k(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(q(B(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||t!==void 0){var _=[];if(t!==void 0)for(r of t)(r.f&z)===0&&_.push(r);for(;a!==null;)(a.f&z)===0&&a!==e.fallback&&_.push(a),a=k(a.next);var w=_.length;if(w>0){var R=(d&J)!==0&&u===0?l:null;if(s){for(f=0;f<w;f+=1)_[f].nodes?.a?.measure();for(f=0;f<w;f+=1)_[f].nodes?.a?.fix()}Ee(e,_,R)}}s&&de(()=>{if(E!==void 0)for(r of E)r.nodes?.a?.apply()})}function Te(e,i,l,d,g,s,u,p){var a=(u&se)!==0?(u&oe)===0?te(l,!1,!1):X(l):null,t=(u&ve)!==0?X(g):null;return{v:a,i:t,e:L(()=>(s(i,a??l,t??g,p),()=>{e.delete(d)}))}}function D(e,i,l){if(e.nodes)for(var d=e.nodes.start,g=e.nodes.end,s=i&&(i.f&m)===0?i.nodes.start:l;d!==null;){var u=ge(d);if(s.before(d),d===g)return;d=u}}function T(e,i,l){i===null?e.effect.first=l:i.next=l,l===null?e.effect.last=i:l.prev=i}export{we as e,Ce as i};
@@ -0,0 +1 @@
1
+ var Kt=Array.isArray,Xt=Array.prototype.indexOf,oe=Array.prototype.includes,zn=Array.from,Gn=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Wt=Object.prototype,Jt=Array.prototype,_t=Object.getPrototypeOf,rt=Object.isExtensible;function $n(e){return typeof e=="function"}const ye=()=>{};function Kn(e){return e()}function Qt(e){for(var t=0;t<e.length;t++)e[t]()}function vt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Xn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const g=2,ie=4,ue=8,Be=1<<24,K=16,L=32,X=64,en=128,k=512,y=1024,T=2048,P=4096,F=8192,V=16384,de=32768,Se=65536,st=1<<17,tn=1<<18,he=1<<19,dt=1<<20,Zn=1<<25,re=65536,Le=1<<21,Ue=1<<22,B=1<<23,te=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},er=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tr=1,Ce=3,ht=8;function ze(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function an(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ir=1,ar=2,lr=4,or=8,ur=16,cr=1,_r=2,vr=4,dr=8,hr=16,pr=1,br=2,cn="[",_n="[!",wr="[?",vn="]",Ge={},E=Symbol(),dn="http://www.w3.org/1999/xhtml",yr="http://www.w3.org/2000/svg",Er="http://www.w3.org/1998/Math/MathML",gr="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Tr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let z=!1;function Ar(e){z=e}let S;function ce(e){if(e===null)throw $e(),Ge;return S=e}function xr(){return ce(Z(S))}function Sr(e){if(z){if(Z(S)!==null)throw $e(),Ge;S=e}}function Rr(e=1){if(z){for(var t=e,n=S;t--;)n=Z(n);S=n}}function Nr(e=!0){for(var t=0,n=S;;){if(n.nodeType===ht){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===cn||r===_n||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Or(e){if(!e||e.nodeType!==ht)throw $e(),Ge;return e.data}function pt(e){return e===this.v}function bt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function wt(e){return!bt(e,this.v)}let me=!1;function kr(){me=!0}let h=null;function Re(e){h=e}function Cr(e){return De().get(e)}function Dr(e,t){return De().set(e,t),t}function Ir(e){return De().has(e)}function Mr(){return De()}function Pr(e,t=!1,n){h={p:h,i:!1,c:null,e:null,s:e,x:null,l:me&&!t?{s:null,u:null,$:[]}:null}}function Fr(e){var t=h,n=t.e;if(n!==null){t.e=null;for(var r of n)Pt(r)}return e!==void 0&&(t.x=e),t.i=!0,h=t.p,e??{}}function Te(){return!me||h!==null&&h.l===null}function De(e){return h===null&&ze(),h.c??=new Map(hn(h)||void 0)}function hn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function yt(){var e=J;J=[],Qt(e)}function je(e){if(J.length===0&&!Ee){var t=J;queueMicrotask(()=>{t===J&&yt()})}J.push(e)}function pn(){for(;J.length>0;)yt()}function bn(e){var t=d;if(t===null)return v.f|=B,e;if((t.f&de)===0&&(t.f&ie)===0)throw e;Ne(e,t)}function Ne(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&de)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const wn=-7169;function w(e,t){e.f=e.f&wn|t}function Ke(e){(e.f&k)!==0||e.deps===null?w(e,y):w(e,P)}function Et(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&re)===0||(t.f^=re,Et(t.deps))}function yn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&P)!==0&&n.add(e),Et(e.deps),w(e,y)}const Ae=new Set;let b=null,ft=null,I=null,A=[],Ie=null,Ee=!1,_e=null;class ae{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#f=0;#i=null;#a=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#f>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)w(r,T),Y(r);for(r of n.m)w(r,P),Y(r)}}process(t){A=[],this.apply();var n=_e=[],r=[];for(const s of t)this.#u(s,n,r);if(_e=null,this.#o()){this.#c(r),this.#c(n);for(const[s,f]of this.#e)At(s,f)}else{ft=this,b=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),it(r),it(n),this.#a.clear(),this.#n.clear(),ft=null,this.#i?.resolve()}I=null}#u(t,n,r){t.f^=y;for(var s=t.first;s!==null;){var f=s.f,o=(f&(L|X))!==0,l=o&&(f&y)!==0,i=l||(f&F)!==0||this.#e.has(s);if(!i&&s.fn!==null){o?s.f^=y:(f&ie)!==0?n.push(s):pe(s)&&((f&K)!==0&&this.#n.add(s),fe(s));var a=s.first;if(a!==null){s=a;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)yn(t[n],this.#a,this.#n)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&B)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){b=this,this.apply()}deactivate(){b===this&&(b=null,I=null)}flush(){if(A.length>0)b=this,gt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#i?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(Ae.size>1){this.previous.clear();var t=b,n=I,r=!0;for(const f of Ae){if(f===this){r=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(r&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=A;A=[];const i=new Set,a=new Map;for(const u of o)mt(u,l,i,a);if(A.length>0){b=f,f.apply();for(const u of A)f.#u(u,[],[]);f.deactivate()}A=s}}b=t,I=n}this.#e.clear(),Ae.delete(this)}increment(t){this.#r+=1,t&&(this.#f+=1)}decrement(t){this.#r-=1,t&&(this.#f-=1),!this.#l&&(this.#l=!0,je(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#n.delete(t),w(t,T),Y(t);for(const t of this.#n)w(t,P),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=vt()).promise}static ensure(){if(b===null){const t=b=new ae;Ae.add(b),Ee||je(()=>{b===t&&t.flush()})}return b}apply(){}}function En(e){var t=Ee;Ee=!0;try{for(var n;;){if(pn(),A.length===0&&(b?.flush(),A.length===0))return Ie=null,n;gt()}}finally{Ee=t}}function gt(){var e=null;try{for(var t=0;A.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;gn()}n.process(A),U.clear()}}finally{A=[],Ie=null,_e=null}}function gn(){try{an()}catch(e){Ne(e,Ie)}}let j=null;function it(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|F))===0&&pe(r)&&(j=new Set,fe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jt(r),j?.size>0)){U.clear();for(const s of j){if((s.f&(V|F))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(V|F))===0&&fe(i)}}j.clear()}}j=null}}function mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?mt(s,t,n,r):(f&(Ue|K))!==0&&(f&T)===0&&Tt(s,t,r)&&(w(s,T),Y(s))}}function Tt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(oe.call(t,s))return!0;if((s.f&g)!==0&&Tt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=Ie=e,n=t.b;if(n?.is_pending&&(e.f&(ie|ue|Be))!==0&&(e.f&de)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(_e!==null&&t===d&&(e.f&ue)===0)return;if((r&(X|L))!==0){if((r&y)===0)return;t.f^=y}}A.push(t)}function At(e,t){if(!((e.f&L)!==0&&(e.f&y)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&P)!==0&&t.m.push(e),w(e,y);for(var n=e.first;n!==null;)At(n,t),n=n.next}}function xt(e,t,n,r){const s=Te()?Xe:An;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var o=d,l=mn(),i=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(_){(o.f&V)===0&&Ne(_,o)}Ye()}if(n.length===0){i.then(()=>a(t.map(s)));return}function u(){l(),Promise.all(n.map(c=>Tn(c))).then(c=>a([...t.map(s),...c])).catch(c=>Ne(c,o))}i?i.then(u):u()}function mn(){var e=d,t=v,n=h,r=b;return function(f=!0){ve(e),$(t),Re(n),f&&r?.activate()}}function Ye(e=!0){ve(null),$(null),Re(null),e&&b?.deactivate()}function St(){var e=d.b,t=b,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xe(e){var t=g|T,n=v!==null&&(v.f&g)!==0?v:null;return d!==null&&(d.f|=he),{ctx:h,deps:null,effects:null,equals:pt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??d,ac:null}}function Tn(e,t,n){d===null&&nn();var s=void 0,f=We(E),o=!v,l=new Map;return Fn(()=>{var i=vt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ye)}catch(_){i.reject(_),Ye()}var a=b;if(o){var u=St();l.get(a)?.reject(W),l.delete(a),l.set(a,i)}const c=(_,m=void 0)=>{if(a.activate(),m)m!==W&&(f.f|=B,He(f,m));else{(f.f&B)!==0&&(f.f^=B),He(f,_);for(const[p,D]of l){if(l.delete(p),p===a)break;D.reject(W)}}u&&u()};i.promise.then(c,_=>c(null,_||"unknown"))}),Mn(()=>{for(const i of l.values())i.reject(W)}),new Promise(i=>{function a(u){function c(){u===s?i(f):a(s)}u.then(c,c)}a(s)})}function Lr(e){const t=Xe(e);return Ht(t),t}function An(e){const t=Xe(e);return t.equals=wt,t}function xn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)G(t[n])}}function Sn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function Ze(e){var t,n=d;ve(Sn(e));try{e.f&=~re,xn(e),t=zt(e)}finally{ve(n)}return t}function Rt(e){var t=Ze(e);if(!e.equals(t)&&(e.wv=Bt(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){w(e,y);return}se||(I!==null?(Mt()||b?.is_fork)&&I.set(e,t):Ke(e))}function Rn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=ye,t.ac=null,ge(t,0),et(t))}function Nt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&fe(t)}let qe=new Set;const U=new Map;let Ot=!1;function We(e,t){var n={f:0,v:e,reactions:null,equals:pt,rv:0,wv:0};return n}function q(e,t){const n=We(e);return Ht(n),n}function jr(e,t=!1,n=!0){const r=We(e);return t||(r.equals=wt),me&&n&&h!==null&&h.l!==null&&(h.l.s??=[]).push(r),r}function H(e,t,n=!1){v!==null&&(!M||(v.f&st)!==0)&&Te()&&(v.f&(g|K|Ue|st))!==0&&(C===null||!oe.call(C,e))&&un();let r=n?be(t):t;return He(e,r)}function He(e,t){if(!e.equals(t)){var n=e.v;se?U.set(e,t):U.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&T)!==0&&Ze(s),Ke(s)}e.wv=Bt(),kt(e,T),Te()&&d!==null&&(d.f&y)!==0&&(d.f&(L|X))===0&&(O===null?qn([e]):O.push(e)),!r.is_fork&&qe.size>0&&!Ot&&Nn()}return t}function Nn(){Ot=!1;for(const e of qe)(e.f&y)!==0&&w(e,P),pe(e)&&fe(e);qe.clear()}function Yr(e,t=1){var n=ee(e),r=t===1?n++:n--;return H(e,n),r}function Fe(e){H(e,e.v+1)}function kt(e,t){var n=e.reactions;if(n!==null)for(var r=Te(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===d)){var i=(l&T)===0;if(i&&w(o,t),(l&g)!==0){var a=o;I?.delete(a),(l&re)===0&&(l&k&&(o.f|=re),kt(a,P))}else i&&((l&K)!==0&&j!==null&&j.add(o),Y(o))}}}function be(e){if(typeof e!="object"||e===null||te in e)return e;const t=_t(e);if(t!==Wt&&t!==Jt)return e;var n=new Map,r=Kt(e),s=q(0),f=ne,o=l=>{if(ne===f)return l();var i=v,a=ne;$(null),ct(f);var u=l();return $(i),ct(a),u};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&ln();var u=n.get(i);return u===void 0?o(()=>{var c=q(a.value);return n.set(i,c),c}):H(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>q(E));n.set(i,u),Fe(s)}}else H(a,E),Fe(s);return!0},get(l,i,a){if(i===te)return e;var u=n.get(i),c=i in l;if(u===void 0&&(!c||we(l,i)?.writable)&&(u=o(()=>{var m=be(c?l[i]:E),p=q(m);return p}),n.set(i,u)),u!==void 0){var _=ee(u);return _===E?void 0:_}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=ee(u))}else if(a===void 0){var c=n.get(i),_=c?.v;if(c!==void 0&&_!==E)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return a},has(l,i){if(i===te)return!0;var a=n.get(i),u=a!==void 0&&a.v!==E||Reflect.has(l,i);if(a!==void 0||d!==null&&(!u||we(l,i)?.writable)){a===void 0&&(a=o(()=>{var _=u?be(l[i]):E,m=q(_);return m}),n.set(i,a));var c=ee(a);if(c===E)return!1}return u},set(l,i,a,u){var c=n.get(i),_=i in l;if(r&&i==="length")for(var m=a;m<c.v;m+=1){var p=n.get(m+"");p!==void 0?H(p,E):m in l&&(p=o(()=>q(E)),n.set(m+"",p))}if(c===void 0)(!_||we(l,i)?.writable)&&(c=o(()=>q(void 0)),H(c,be(a)),n.set(i,c));else{_=c.v!==E;var D=o(()=>be(a));H(c,D)}var tt=Reflect.getOwnPropertyDescriptor(l,i);if(tt?.set&&tt.set.call(u,a),!_){if(r&&typeof i=="string"){var nt=n.get("length"),Pe=Number(i);Number.isInteger(Pe)&&Pe>=nt.v&&H(nt,Pe+1)}Fe(s)}return!0},ownKeys(l){ee(s);var i=Reflect.ownKeys(l).filter(c=>{var _=n.get(c);return _===void 0||_.v!==E});for(var[a,u]of n)u.v!==E&&!(a in l)&&i.push(a);return i},setPrototypeOf(){on()}})}function at(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function qr(e,t){return Object.is(at(e),at(t))}var lt,On,kn,Ct,Dt;function Hr(){if(lt===void 0){lt=window,On=document,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ct=we(t,"firstChild").get,Dt=we(t,"nextSibling").get,rt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function ke(e){return Ct.call(e)}function Z(e){return Dt.call(e)}function Vr(e,t){if(!z)return ke(e);var n=ke(S);if(n===null)n=S.appendChild(Oe());else if(t&&n.nodeType!==Ce){var r=Oe();return n?.before(r),ce(r),r}return t&&Je(n),ce(n),n}function Br(e,t=!1){if(!z){var n=ke(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==Ce){var r=Oe();return S?.before(r),ce(r),r}Je(S)}return S}function Ur(e,t=1,n=!1){let r=z?S:e;for(var s;t--;)s=r,r=Z(r);if(!z)return r;if(n){if(r?.nodeType!==Ce){var f=Oe();return r===null?s?.after(f):r.before(f),ce(f),f}Je(r)}return ce(r),r}function Cn(e){e.textContent=""}function zr(){return!1}function Gr(e,t,n){return document.createElementNS(t??dn,e,void 0)}function Je(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ce;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,je(()=>{document.activeElement===n&&e.focus()})}}function Kr(e){z&&ke(e)!==null&&Cn(e)}let ot=!1;function Dn(){ot||(ot=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Qe(e){var t=v,n=d;$(null),ve(null);try{return e()}finally{$(t),ve(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Dn()}function It(e){d===null&&(v===null&&fn(),sn()),se&&rn()}function In(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&F)!==0&&(e|=F);var r={ctx:h,deps:null,nodes:null,f:e|T|k,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ie)!==0)_e!==null?_e.push(r):Y(r);else if(t!==null){try{fe(r)}catch(o){throw G(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&he)===0&&(s=s.first,(e&K)!==0&&(e&Se)!==0&&s!==null&&(s.f|=Se))}if(s!==null&&(s.parent=n,n!==null&&In(s,n),v!==null&&(v.f&g)!==0&&(e&X)===0)){var f=v;(f.effects??=[]).push(s)}return r}function Mt(){return v!==null&&!M}function Mn(e){const t=N(ue,null);return w(t,y),t.teardown=e,t}function Pn(e){It();var t=d.f,n=!v&&(t&L)!==0&&(t&de)===0;if(n){var r=h;(r.e??=[]).push(e)}else return Pt(e)}function Pt(e){return N(ie|dt,e)}function Zr(e){return It(),N(ue|dt,e)}function Wr(e){ae.ensure();const t=N(X|he,e);return()=>{G(t)}}function Jr(e){ae.ensure();const t=N(X|he,e);return(n={})=>new Promise(r=>{n.outro?Yn(t,()=>{G(t),r(void 0)}):(G(t),r(void 0))})}function Qr(e){return N(ie,e)}function es(e,t){var n=h,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Ft(()=>{e(),!r.ran&&(r.ran=!0,Me(t))})}function ts(){var e=h;Ft(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&y)!==0&&n.deps!==null&&w(n,P),pe(n)&&fe(n),t.ran=!1}})}function Fn(e){return N(Ue|he,e)}function Ft(e,t=0){return N(ue|t,e)}function ns(e,t=[],n=[],r=[]){xt(r,t,n,s=>{N(ue,()=>e(...s.map(ee)))})}function rs(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=St();xt(r,t,n,f=>{N(ie,()=>e(...f.map(ee))),s&&s()})}function ss(e,t=0){var n=N(K|t,e);return n}function fs(e,t=0){var n=N(Be|t,e);return n}function is(e){return N(L|he,e)}function Lt(e){var t=e.teardown;if(t!==null){const n=se,r=v;ut(!0),$(null);try{t.call(null)}finally{ut(n),$(r)}}}function et(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Qe(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:G(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&G(t),t=n}}function G(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),et(e,t&&!n),ge(e,0),w(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Lt(e);var s=e.parent;s!==null&&s.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function jn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function jt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Yn(e,t,n=!0){var r=[];Yt(e,r,!0);var s=()=>{n&&G(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Yt(e,t,n){if((e.f&F)===0){e.f^=F;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&Se)!==0||(s.f&L)!==0&&(e.f&K)!==0;Yt(s,t,o?n:!1),s=f}}}function as(e){qt(e,!0)}function qt(e,t){if((e.f&F)!==0){e.f^=F,(e.f&y)===0&&(w(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Se)!==0||(n.f&L)!==0;qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function ls(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let xe=!1,se=!1;function ut(e){se=e}let v=null,M=!1;function $(e){v=e}let d=null;function ve(e){d=e}let C=null;function Ht(e){v!==null&&(C===null?C=[e]:C.push(e))}let x=null,R=0,O=null;function qn(e){O=e}let Vt=1,Q=0,ne=Q;function ct(e){ne=e}function Bt(){return++Vt}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&g&&(e.f&=~re),(t&P)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&Rt(f),f.wv>e.wv)return!0}(t&k)!==0&&I===null&&w(e,y)}return!1}function Ut(e,t,n=!0){var r=e.reactions;if(r!==null&&!(C!==null&&oe.call(C,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Ut(f,t,!1):t===f&&(n?w(f,T):(f.f&y)!==0&&w(f,P),Y(f))}}function zt(e){var t=x,n=R,r=O,s=v,f=C,o=h,l=M,i=ne,a=e.f;x=null,R=0,O=null,v=(a&(L|X))===0?e:null,C=null,Re(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Qe(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Le;var u=e.fn,c=u();e.f|=de;var _=e.deps,m=b?.is_fork;if(x!==null){var p;if(m||ge(e,R),_!==null&&R>0)for(_.length=R+x.length,p=0;p<x.length;p++)_[R+p]=x[p];else e.deps=_=x;if(Mt()&&(e.f&k)!==0)for(p=R;p<_.length;p++)(_[p].reactions??=[]).push(e)}else!m&&_!==null&&R<_.length&&(ge(e,R),_.length=R);if(Te()&&O!==null&&!M&&_!==null&&(e.f&(g|P|T))===0)for(p=0;p<O.length;p++)Ut(O[p],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let D=0;D<n;D+=1)s.deps[D].rv=Q;if(t!==null)for(const D of t)D.rv=Q;O!==null&&(r===null?r=O:r.push(...O))}return(e.f&B)!==0&&(e.f^=B),c}catch(D){return bn(D)}finally{e.f^=Le,x=t,R=n,O=r,v=s,C=f,Re(o),M=l,ne=i}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=Xt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(x===null||!oe.call(x,t))){var f=t;(f.f&k)!==0&&(f.f^=k,f.f&=~re),Ke(f),Rn(f),ge(f,0)}}function ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function fe(e){var t=e.f;if((t&V)===0){w(e,y);var n=d,r=xe;d=e,xe=!0;try{(t&(K|Be))!==0?Ln(e):et(e),Lt(e);var s=zt(e);e.teardown=typeof s=="function"?s:null,e.wv=Vt;var f}finally{xe=r,d=n}}}async function os(){await Promise.resolve(),En()}function us(){return ae.ensure().settled()}function ee(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(C===null||!oe.call(C,e))){var s=v.deps;if((v.f&Le)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[v]:oe.call(f,v)||f.push(v)}}}if(se&&U.has(e))return U.get(e);if(n){var o=e;if(se){var l=o.v;return((o.f&y)===0&&o.reactions!==null||$t(o))&&(l=Ze(o)),U.set(o,l),l}var i=(o.f&k)===0&&!M&&v!==null&&(xe||(v.f&k)!==0),a=(o.f&de)===0;pe(o)&&(i&&(o.f|=k),Rt(o)),i&&!a&&(Nt(o),Gt(o))}if(I?.has(e))return I.get(e);if((e.f&B)!==0)throw e.v;return e.v}function Gt(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&k)===0&&(Nt(t),Gt(t))}function $t(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&g)!==0&&$t(t))return!0;return!1}function Me(e){var t=M;try{return M=!0,e()}finally{M=t}}function cs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ve(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ve(n)}}}function Ve(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ve(e[r],t)}catch{}const n=_t(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Zt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Vn(e,t,n){if(e==null)return t(void 0),ye;const r=Me(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const le=[];function _s(e,t=ye){let n=null;const r=new Set;function s(l){if(bt(e,l)&&(e=l,n)){const i=!le.length;for(const a of r)a[1](),le.push(a,e);if(i){for(let a=0;a<le.length;a+=2)le[a][0](le[a+1]);le.length=0}}}function f(l){s(l(e))}function o(l,i=ye){const a=[l,i];return r.add(a),r.size===1&&(n=t(s,f)||ye),l(e),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:o}}function vs(e){let t;return Vn(e,n=>t=n)(),t}function Bn(e){h===null&&ze(),me&&h.l!==null?Un(h).m.push(e):Pn(()=>{const t=Me(e);if(typeof t=="function")return t})}function ds(e){h===null&&ze(),Bn(()=>()=>Me(e))}function Un(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{he as $,vn as A,He as B,ht as C,b as D,Se as E,Zn as F,is as G,cn as H,nr as I,zr as J,An as K,Kt as L,zn as M,ir as N,ur as O,We as P,ar as Q,as as R,Yn as S,F as T,je as U,L as V,or as W,Cn as X,G as Y,Z,tn as _,ts as a,ae as a$,Br as a0,Ur as a1,Yr as a2,h as a3,Zr as a4,Pn as a5,Me as a6,Kn as a7,Qt as a8,Xe as a9,Qr as aA,Ft as aB,En as aC,Bn as aD,os as aE,ds as aF,fs as aG,mr as aH,qr as aI,xt as aJ,dn as aK,_t as aL,gr as aM,Zt as aN,er as aO,$r as aP,E as aQ,Dn as aR,Jn as aS,Xr as aT,ft as aU,Dr as aV,Ir as aW,Mt as aX,Fe as aY,en as aZ,wr as a_,kr as aa,rs as ab,Lr as ac,On as ad,ye as ae,Vn as af,vs as ag,Mn as ah,Gn as ai,we as aj,sr as ak,vr as al,se as am,d as an,V as ao,dr as ap,me as aq,_r as ar,cr as as,$n as at,te as au,Wn as av,ve as aw,hr as ax,Cr as ay,ls as az,Fr as b,w as b0,T as b1,Y as b2,P as b3,yn as b4,$ as b5,Re as b6,bn as b7,v as b8,Ne as b9,Mr as bA,Wr as bB,us as bC,fr as ba,Tr as bb,Qe as bc,Gr as bd,kn as be,pr as bf,br as bg,Ce as bh,Je as bi,de as bj,Hr as bk,Ge as bl,rr as bm,Jr as bn,$e as bo,_s as bp,tr as bq,yr as br,Kr as bs,Wt as bt,lt as bu,Xn as bv,jn as bw,Er as bx,Te as by,ne as bz,Vr as c,cs as d,q as e,be as f,ee as g,ss as h,z as i,xr as j,Or as k,es as l,jr as m,Rr as n,Nr as o,Pr as p,ce as q,Sr as r,H as s,ns as t,Ar as u,S as v,Oe as w,lr as x,ke as y,_n as z};
@@ -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"./Bo0CMKlC.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{R as k,Y as u,S as A,w as _,G as v,D as g,i as l,v as T,az as m,J as S,h as E,j as R,E as w,k as D,H as M,z as B,o as F,q as N,u as b,aA as Y,aB as x,a6 as H,U as I,au as O}from"./CfuRx7rA.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),A(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=g,i=S();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,R());var i=new q(n),e=t?w:0;function f(r,h){if(l){var c=D(a),o;if(c===M?o=0:c===B?o=!1:o=parseInt(c.substring(1)),r!==o){var d=F();N(d),i.anchor=d,b(!1),i.ensure(r,h),b(!0);return}}i.ensure(r,h)}E(()=>{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?.[O]===s}function L(n={},s,t,a){return Y(()=>{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};
@@ -0,0 +1 @@
1
+ import{a as g,s as de,f as fe,d as ke,g as f,b as P,c as F,e as ze}from"./CajNsaOw.js";import{p as ue,l as le,s,d as J,g as t,a as Me,c as l,n as W,r as o,b as me,m as oe,t as I,ay as Ce,a5 as He,e as V,f as De,a0 as H,a1 as p,ac as Re}from"./CfuRx7rA.js";import{a as Ae,r as $e,s as Ie,b as Pe}from"./BA_Wro7X.js";import{i as k,b as Ee}from"./Cwkp_c4R.js";import{e as Te}from"./CdvQjHNy.js";import{s as Q}from"./DEyrdHQB.js";import{b as Be,B as Ne}from"./9QAsBMIK.js";import{l as ve,p as ee}from"./RGHlrGBn.js";import{g as ce}from"./DUsnWwWN.js";import{i as Se}from"./BLi1Oegj.js";import{A as Ye}from"./BJimep0Q.js";import{E as Ge,T as Ke}from"./Bypyvp-Q.js";import{n as U}from"./BZd_7gpI.js";import{v as D}from"./DTDfEpZd.js";var Le=fe("<title> </title>"),Oe=fe('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function Xe(E,u){const n=ve(u,["children","$$slots","$$events","$$legacy"]),R=ve(n,["size","title"]);ue(u,!1);const _=oe(),A=oe();let v=ee(u,"size",8,16),c=ee(u,"title",8,void 0);le(()=>(J(n),J(c())),()=>{s(_,n["aria-label"]||n["aria-labelledby"]||c())}),le(()=>(t(_),J(n)),()=>{s(A,{"aria-hidden":t(_)?void 0:!0,role:t(_)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Me(),Se();var d=Oe();Ae(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:v(),height:v(),...t(A),...R}));var b=l(d);{var T=w=>{var z=Le(),B=l(z,!0);o(z),I(()=>de(B,c())),g(w,z)};k(b,w=>{c()&&w(T)})}W(3),o(d),g(E,d),me()}var Ze=P('<input class="view-rename-input svelte-r6dy5f"/>'),je=P('<button><span class="toggle-label"> </span></button>'),qe=P('<div class="context-backdrop svelte-r6dy5f"></div> <div class="view-context-menu svelte-r6dy5f"><div class="view-menu-item svelte-r6dy5f"><!> Rename</div> <div class="view-menu-item view-menu-item-danger svelte-r6dy5f"><!> Delete</div></div>',1),Fe=P('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><button><span class="toggle-label">Details</span></button> <button><span class="toggle-label">Graph</span></button> <!> <button class="toggle-btn add-view-btn svelte-r6dy5f" title="New view"><!></button></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function ct(E,u){ue(u,!0);let n=ee(u,"activeView",3,"entity");const R=Ce("chat");function _(e){ce(e,{noScroll:!0})}async function A(){const e=await D.create("New View");ce(`/views/${e.id}`)}let v=V(null),c=V(""),d=V(null),b=V(!1);function T(e){s(b,!1),s(v,e.id,!0),s(c,e.name,!0)}He(()=>{t(v)&&t(d)&&(t(d).focus(),t(d).select(),setTimeout(()=>{s(b,!0)},50))});function w(){t(b)&&(t(v)&&t(c).trim()&&D.update(t(v),{name:t(c).trim()}),s(v,null),s(b,!1))}function z(){s(v,null),s(b,!1)}function B(e){e.key==="Enter"&&(e.preventDefault(),s(b,!0),w()),e.key==="Escape"&&(e.preventDefault(),z())}let $=V(null),N=V(De({x:0,y:0}));function pe(e,a){e.preventDefault(),s($,a.id,!0),s(N,{x:e.clientX,y:e.clientY},!0)}function S(){s($,null)}async function ge(e){S(),confirm(`Delete view "${e.name}"?`)&&await D.remove(e.id)}var te=Fe(),Y=H(te),G=p(l(Y),2),K=l(G);let ae;var L=p(K,2);let ie;var se=p(L,2);Te(se,17,()=>D.views,e=>e.id,(e,a)=>{var h=F(),X=H(h);{var Z=m=>{var i=Ze();$e(i),Ee(i,r=>s(d,r),()=>t(d)),f("keydown",i,B),ze("blur",i,w),Be(i,()=>t(c),r=>s(c,r)),g(m,i)},y=m=>{var i=je();let r;var M=l(i),x=l(M,!0);o(M),o(i),I(()=>{r=Q(i,1,"toggle-btn svelte-r6dy5f",null,r,{active:n()==="view"&&U.activeViewId===t(a).id}),de(x,t(a).name)}),f("click",i,()=>!(n()==="view"&&U.activeViewId===t(a).id)&&_(`/views/${t(a).id}`)),f("contextmenu",i,j=>pe(j,t(a))),g(m,i)};k(X,m=>{t(v)===t(a).id?m(Z):m(y,!1)})}g(e,h)});var O=p(se,2),_e=l(O);Ye(_e,{size:14}),o(O),o(G);var ne=p(G,2),re=l(ne);{var be=e=>{var a=F(),h=H(a);Ie(h,()=>u.right),g(e,a)};k(re,e=>{u.right&&e(be)})}var he=p(re,2);{var ye=e=>{Ne(e,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return R.toggle},children:(a,h)=>{Xe(a,{size:14})},$$slots:{default:!0}})};k(he,e=>{R.open||e(ye)})}o(ne),o(Y);var we=p(Y,2);{var xe=e=>{const a=Re(()=>D.views.find(y=>y.id===t($)));var h=F(),X=H(h);{var Z=y=>{var m=qe(),i=H(m),r=p(i,2);let M;var x=l(r),j=l(x);Ge(j,{size:12}),W(),o(x);var q=p(x,2),Ve=l(q);Ke(Ve,{size:12}),W(),o(q),o(r),I(()=>M=Pe(r,"",M,{left:`${t(N).x??""}px`,top:`${t(N).y??""}px`})),f("click",i,S),f("click",r,C=>C.stopPropagation()),f("click",x,()=>{const C=t(a);S(),T(C)}),f("click",q,()=>{const C=t(a);ge(C)}),g(y,m)};k(X,y=>{t(a)&&y(Z)})}g(e,h)};k(we,e=>{t($)&&e(xe)})}I(()=>{ae=Q(K,1,"toggle-btn svelte-r6dy5f",null,ae,{active:n()==="entity"}),ie=Q(L,1,"toggle-btn svelte-r6dy5f",null,ie,{active:n()==="graph"})}),f("click",K,()=>n()!=="entity"&&_(U.entityPath??"/")),f("click",L,()=>n()!=="graph"&&_("/graph")),f("click",O,A),g(E,te),me()}ke(["click","keydown","contextmenu"]);export{ct as V};
@@ -0,0 +1 @@
1
+ import{aW as L,ay as A,aV as Y,e as S,f as H,g,s as c,a6 as N,ac as q}from"./CfuRx7rA.js";import{i as z}from"./DUsnWwWN.js";import{e as P,w as h}from"./DQ_O96iG.js";import{a as K}from"./BH82yShn.js";import{n as $}from"./BZd_7gpI.js";import{l as Q,o as D}from"./CajNsaOw.js";function Ot(...t){return t.filter(Boolean).join(" ")}const X=typeof document<"u",Z=typeof window<"u"?window:void 0;function v(t){let e=t.activeElement;for(;e?.shadowRoot;){const s=e.shadowRoot.activeElement;if(s===e)break;e=s}return e}class tt{#e;#t;constructor(e={}){const{window:s=Z,document:n=s?.document}=e;s!==void 0&&(this.#e=n,this.#t=Q(i=>{const r=D(s,"focusin",i),o=D(s,"focusout",i);return()=>{r(),o()}}))}get current(){return this.#t?.(),this.#e?v(this.#e):null}}new tt;class et{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return L(this.#t)}get(){const e=A(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=A(this.#t);return s===void 0?e:s}set(e){return Y(this.#t,e)}}const st=new et("<Toaster/>");let U=0;class nt{#e=S(H([]));get toasts(){return g(this.#e)}set toasts(e){c(this.#e,e,!0)}#t=S(H([]));get heights(){return g(this.#t)}set heights(e){c(this.#t,e,!0)}#s=e=>{const s=this.toasts.findIndex(n=>n.id===e);return s===-1?null:s};addToast=e=>{X&&this.toasts.unshift(e)};updateToast=({id:e,data:s,type:n,message:i})=>{const r=this.toasts.findIndex(d=>d.id===e),o=this.toasts[r];this.toasts[r]={...o,...s,id:e,title:i,type:n,updated:!0}};create=e=>{const{message:s,...n}=e,i=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:U++,r=e.dismissible!==void 0?e.dismissible:e.dismissable!==void 0?e.dismissable:!0,o=e.type===void 0?"default":e.type;return N(()=>{this.toasts.find(E=>E.id===i)?this.updateToast({id:i,data:e,type:o,message:s,dismissible:r}):this.addToast({...n,id:i,title:s,dismissible:r,type:o})}),i};dismiss=e=>(N(()=>{if(e===void 0){this.toasts=this.toasts.map(n=>({...n,dismiss:!0}));return}const s=this.toasts.findIndex(n=>n.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}const s=this.#s(e);if(s!==null)return this.toasts.splice(s,1),e};message=(e,s)=>this.create({...s,type:"default",message:e});error=(e,s)=>this.create({...s,type:"error",message:e});success=(e,s)=>this.create({...s,type:"success",message:e});info=(e,s)=>this.create({...s,type:"info",message:e});warning=(e,s)=>this.create({...s,type:"warning",message:e});loading=(e,s)=>this.create({...s,type:"loading",message:e});promise=(e,s)=>{if(!s)return;let n;s.loading!==void 0&&(n=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const i=e instanceof Promise?e:e();let r=n!==void 0;return i.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){r=!1;const d=it(o);this.create({id:n,type:"error",message:d})}else if(s.success!==void 0){r=!1;const d=typeof s.success=="function"?s.success(o):s.success;this.create({id:n,type:"success",message:d})}}).catch(o=>{if(s.error!==void 0){r=!1;const d=typeof s.error=="function"?s.error(o):s.error;this.create({id:n,type:"error",message:d})}}).finally(()=>{r&&(this.dismiss(n),n=void 0),s.finally?.()}),n};custom=(e,s)=>{const n=s?.id||U++;return this.create({component:e,id:n,...s}),n};removeHeight=e=>{this.heights=this.heights.filter(s=>s.toastId!==e)};setHeight=e=>{const s=this.#s(e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e};reset=()=>{this.toasts=[],this.heights=[]}}function it(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const f=new nt;function rt(t,e){return f.create({message:t,...e})}class _t{#e=q(()=>f.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}}function At(){return st.get()}const ot=rt,u=Object.assign(ot,{success:f.success,info:f.info,warning:f.warning,error:f.error,custom:f.custom,message:f.message,promise:f.promise,dismiss:f.dismiss,loading:f.loading,getActiveToasts:()=>f.toasts.filter(t=>!t.dismiss)}),ct=800;function at(){let t=S(!1),e=S(null),s=S(null),n=null,i=null,r=!1;function o(p,w,y,l){n&&n.repo===p&&n.type===w&&n.id===y?(l.data!==void 0&&(n.payload.data=l.data),l.content!==void 0&&(n.payload.content=l.content)):n={repo:p,type:w,id:y,payload:{...l}},d()}function d(){i&&clearTimeout(i),i=setTimeout(E,ct)}async function E(){if(i=null,!r&&n){const{repo:p,type:w,id:y,payload:l}=n;n=null,r=!0,c(t,!0),c(s,null);try{if(await P(p,w,y,l),c(e,new Date,!0),l.data?.name){const b=h.repos.find(O=>O.name===p)?.entities.find(O=>O.id===y);b&&(b.title=l.data.name)}}catch(m){c(s,m.message??"Save failed",!0);const b=m.status??m.statusCode;(!b||b>=500)&&(n={repo:p,type:w,id:y,payload:l})}finally{c(t,!1),r=!1,n&&E()}}}function J(){i&&(clearTimeout(i),i=null),n&&E()}async function V(p,w,y,l){c(t,!0),c(s,null);try{const m=await P(p,w,y,l);return c(e,new Date,!0),m}catch(m){return c(s,m.message??"Save failed",!0),null}finally{c(t,!1)}}function G(){c(s,null),c(e,null),n=null,i&&(clearTimeout(i),i=null)}return{get saving(){return g(t)},get lastSaved(){return g(e)},get error(){return g(s)},get hasPending(){return!!(n||r)},scheduleAutoSave:o,flush:J,saveEntity:V,reset:G}}const ut=at();let a=null,B=null,W=null,F=[],k=null,I=1e3,C=S(!1),R=S(null);const T=new Map,x={},_={};function j(t,e){T.delete(t);const s=e.entities.length,n=s===1?`${t} updated ${e.entities[0]}`:`${t} updated ${s} entities`;u(n)}function lt(t){for(const[e,s]of T)s.repo===t&&(clearTimeout(s.timer),T.delete(e))}function ft(t){const e=K.user?.displayName;if(t.type==="sync_progress"){const s=x[t.repo];if(s){const n=t.message.trim(),i=n.match(/^Syncing from source:\s*(.+)$/i);i&&(_[t.repo]=`Syncing ${i[1].trim()}…`);const r=_[t.repo]??`Syncing ${t.repo}…`;u.loading(r,{id:s,description:n,duration:36e5})}return}if(t.type==="entity_change"){if(e&&t.actor===e&&t.source==="api"){h.refreshEntities(t.repo);return}if(h.refreshEntities(t.repo),$.selectedRepo===t.repo&&$.selectedType===t.entityType&&$.selectedId===t.entityId){ut.hasPending?u(`${t.actor} also saved changes to this entity`):z();return}const n=T.get(t.actor);if(n)clearTimeout(n.timer),n.entities.includes(t.entityId)||n.entities.push(t.entityId),n.timer=setTimeout(()=>j(t.actor,n),1e4);else{const i={entities:[t.entityId],repo:t.repo,timer:setTimeout(()=>j(t.actor,i),1e4)};T.set(t.actor,i)}return}if(t.type==="session_commit"){if(e&&t.actor===e){c(R,t.timestamp,!0);return}const s=t.entities.length,n=s===1?`${t.actor} saved changes to ${t.entities[0]}`:`${t.actor} saved ${s} changes in ${t.repo}`;u(n),h.refreshEntities(t.repo);return}if(t.type==="sync_complete"){if(lt(t.repo),!x[t.repo]){const s=t.created+t.updated+t.deleted,n=s===0?`Sync complete · no changes in ${t.repo}`:`Sync complete · ${s} ${s===1?"entity":"entities"} from ${t.source}`;u.success(n)}h.refreshEntities(t.repo);return}if(t.type==="collection_created"){u(`${t.actor} created collection ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="collection_deleted"){u(`${t.actor} deleted collection ${t.repo}`);return}if(t.type==="repo_sync"){u(`${t.actor} pushed to ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="presence"){B?.(t);return}if(t.type==="online"){W?.(t);return}if(t.type==="access_granted"||t.type==="access_revoked"){t.type==="access_revoked"&&$.selectedRepo===t.repo&&$.deselect(),h.load();return}}function M(){if(typeof window>"u"||a&&(a.readyState===WebSocket.OPEN||a.readyState===WebSocket.CONNECTING))return;const e=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{c(C,!0),I=1e3,h.refreshAll();for(const s of F)s()},a.onmessage=s=>{if(!(s.data instanceof ArrayBuffer))try{const n=JSON.parse(s.data);if(n?.type==="ping"){a?.send(JSON.stringify({type:"pong"}));return}const i=n;i.type&&i.type!=="toast"&&ft(i)}catch{}},a.onclose=()=>{c(C,!1),a=null,k=setTimeout(()=>{I=Math.min(I*2,1e4),M()},I)},a.onerror=()=>{}}function dt(){k&&(clearTimeout(k),k=null),a&&(a.close(),a=null),c(C,!1);for(const[,t]of T)clearTimeout(t.timer);T.clear()}function ht(t,e=4e3){u(t,{duration:e})}function pt(t,e){const s=crypto.randomUUID();return e?.loading?u.loading(t,{id:s,duration:36e5}):u(t,{id:s}),s}function yt(t,e,s){if(s?.loading){u.loading(e,{id:t});return}/failed|error/i.test(e)?u.error(e,{id:t,duration:s?.duration??6e3}):u.success(e,{id:t,duration:s?.duration??4e3})}function mt(t){const e=crypto.randomUUID();x[t]=e,u.loading(`Syncing ${t}…`,{id:e,duration:36e5})}function gt(t,e,s){const n=x[t];n&&(delete x[t],delete _[t],s?u.error(e,{id:n,duration:6e3}):u.success(e,{id:n,duration:4e3}))}function wt(t){B=t}function St(t){W=t}function Tt(t){F.push(t)}function Et(t){a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify(t))}const Ht={get connected(){return g(C)},get lastAutoSaved(){return g(R)},get ws(){return a},connect:M,disconnect:dt,showToast:ht,showPersistentToast:pt,updateToast:yt,startSyncToast:mt,finishSyncToast:gt,send:Et,setPresenceHandler:wt,setOnlineHandler:St,addConnectHandler:Tt};export{_t as S,f as a,Ot as c,ut as e,Ht as r,st as s,u as t,At as u};
@@ -1,2 +1,2 @@
1
- import{h as b}from"./Bo0CMKlC.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
2
- \r\f \v\uFEFF`];function T(r,i,t){var f=r==null?"":""+r;if(i&&(f=f?f+" "+i:i),t){for(var o of Object.keys(t))if(t[o])f=f?f+" "+o:o;else if(f.length)for(var n=o.length,u=0;(u=f.indexOf(o,u))>=0;){var s=u+n;(u===0||j.includes(f[u-1]))&&(s===f.length||j.includes(f[s]))?f=(u===0?"":f.substring(0,u))+f.substring(s+1):u=s}}return f===""?null:f}function A(r,i=!1){var t=i?" !important;":";",f="";for(var o of Object.keys(r)){var n=r[o];n!=null&&n!==""&&(f+=" "+o+": "+n+t)}return f}function p(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function L(r,i){if(i){var t="",f,o;if(Array.isArray(i)?(f=i[0],o=i[1]):f=i,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,u=0,s=!1,c=[];f&&c.push(...Object.keys(f).map(p)),o&&c.push(...Object.keys(o).map(p));var l=0,g=-1;const h=r.length;for(var e=0;e<h;e++){var a=r[e];if(s?a==="/"&&r[e-1]==="*"&&(s=!1):n?n===a&&(n=!1):a==="/"&&r[e+1]==="*"?s=!0:a==='"'||a==="'"?n=a:a==="("?u++:a===")"&&u--,!s&&n===!1&&u===0){if(a===":"&&g===-1)g=e;else if(a===";"||e===h-1){if(g!==-1){var O=p(r.substring(l,g).trim());if(!c.includes(O)){a!==";"&&e++;var d=r.substring(l,e).trim();t+=" "+d+";"}}l=e+1,g=-1}}}}return f&&(t+=A(f)),o&&(t+=A(o,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function z(r,i,t,f,o,n){var u=r.__className;if(b||u!==t||u===void 0){var s=T(t,f,n);(!b||s!==r.getAttribute("class"))&&(s==null?r.removeAttribute("class"):i?r.className=s:r.setAttribute("class",s)),r.__className=t}else if(n&&o!==n)for(var c in n){var l=!!n[c];(o==null||l!==!!o[c])&&r.classList.toggle(c,l)}return n}const E="";class w extends Error{constructor(i,t){super(t),this.status=i,this.name="ApiError"}}async function C(r,i){const t={...i?.headers};i?.body&&(t["Content-Type"]=t["Content-Type"]??"application/json");const f=await fetch(`${E}${r}`,{...i,headers:t});if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw f.status===401&&typeof window<"u"&&!r.startsWith("/api/auth/")&&window.location.pathname!=="/login"&&(window.location.href="/login"),new w(f.status,o.error??f.statusText)}return f.json()}const B=Object.freeze(Object.defineProperty({__proto__:null,ApiError:w,apiFetch:C},Symbol.toStringTag,{value:"Module"}));export{C as a,S as b,$ as c,B as d,z as s,L as t};
1
+ import{i as h}from"./CfuRx7rA.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
2
+ \r\f \v\uFEFF`];function T(r,i,t){var f=r==null?"":""+r;if(i&&(f=f?f+" "+i:i),t){for(var o of Object.keys(t))if(t[o])f=f?f+" "+o:o;else if(f.length)for(var n=o.length,u=0;(u=f.indexOf(o,u))>=0;){var s=u+n;(u===0||j.includes(f[u-1]))&&(s===f.length||j.includes(f[s]))?f=(u===0?"":f.substring(0,u))+f.substring(s+1):u=s}}return f===""?null:f}function A(r,i=!1){var t=i?" !important;":";",f="";for(var o of Object.keys(r)){var n=r[o];n!=null&&n!==""&&(f+=" "+o+": "+n+t)}return f}function p(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function L(r,i){if(i){var t="",f,o;if(Array.isArray(i)?(f=i[0],o=i[1]):f=i,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,u=0,s=!1,c=[];f&&c.push(...Object.keys(f).map(p)),o&&c.push(...Object.keys(o).map(p));var l=0,g=-1;const b=r.length;for(var e=0;e<b;e++){var a=r[e];if(s?a==="/"&&r[e-1]==="*"&&(s=!1):n?n===a&&(n=!1):a==="/"&&r[e+1]==="*"?s=!0:a==='"'||a==="'"?n=a:a==="("?u++:a===")"&&u--,!s&&n===!1&&u===0){if(a===":"&&g===-1)g=e;else if(a===";"||e===b-1){if(g!==-1){var O=p(r.substring(l,g).trim());if(!c.includes(O)){a!==";"&&e++;var d=r.substring(l,e).trim();t+=" "+d+";"}}l=e+1,g=-1}}}}return f&&(t+=A(f)),o&&(t+=A(o,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function z(r,i,t,f,o,n){var u=r.__className;if(h||u!==t||u===void 0){var s=T(t,f,n);(!h||s!==r.getAttribute("class"))&&(s==null?r.removeAttribute("class"):i?r.className=s:r.setAttribute("class",s)),r.__className=t}else if(n&&o!==n)for(var c in n){var l=!!n[c];(o==null||l!==!!o[c])&&r.classList.toggle(c,l)}return n}const E="";class w extends Error{constructor(i,t){super(t),this.status=i,this.name="ApiError"}}async function C(r,i){const t={...i?.headers};i?.body&&(t["Content-Type"]=t["Content-Type"]??"application/json");const f=await fetch(`${E}${r}`,{...i,headers:t});if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw f.status===401&&typeof window<"u"&&!r.startsWith("/api/auth/")&&window.location.pathname!=="/login"&&(window.location.href="/login"),new w(f.status,o.error??f.statusText)}return f.json()}const B=Object.freeze(Object.defineProperty({__proto__:null,ApiError:w,apiFetch:C},Symbol.toStringTag,{value:"Module"}));export{C as a,S as b,$ as c,B as d,z as s,L as t};
@@ -0,0 +1 @@
1
+ import{a as p,s as H,f as b}from"./CajNsaOw.js";import{i as M}from"./BLi1Oegj.js";import{p as $,l as c,s as m,d as n,g as i,a as R,c as _,n as V,r as h,b as Z,m as u,t as k}from"./CfuRx7rA.js";import{i as B}from"./Cwkp_c4R.js";import{a as C}from"./BA_Wro7X.js";import{l as v,p as g}from"./RGHlrGBn.js";var N=b("<title> </title>"),P=b('<svg><!><path d="M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z"></path><path d="M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z"></path></svg>');function G(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);$(t,!1);const a=u(),d=u();let f=g(t,"size",8,16),s=g(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{m(d,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),M();var r=P();C(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...i(d),...w}));var y=_(r);{var z=o=>{var l=N(),A=_(l,!0);h(l),k(()=>H(A,s())),p(o,l)};B(y,o=>{s()&&o(z)})}V(2),h(r),p(x,r),Z()}export{G as R};
@@ -0,0 +1 @@
1
+ import{e as m,f as w,s as u,g as o,ac as rt}from"./CfuRx7rA.js";import{a as p}from"./DEyrdHQB.js";function at(){return p("/api/workspace")}function it(e){return p("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function Ct(){return p("/api/workspace/mcp-config")}function J(){return p("/api/repos")}function st(e,a,s,f){return p("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:a||void 0,description:s,...f?{private:!0}:{}})})}function ct(e,a,s){return p(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,display_name:s||void 0})})}function lt(e){return p(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function ut(){return p("/api/apps")}function dt(e){return p(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function wt(e,a,s){return p(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(a)}/${encodeURIComponent(s)}`)}function Et(e,a,s,f,c){return p(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:a,entityId:s,data:f,content:c})})}function St(e,a,s){return p(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function bt(e,a,s,f){return p(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function $t(e,a,s,f){return p(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:a,entityId:s,newType:f})})}function It(e,a,s,f,c){return p(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:a,entityId:s,targetRepo:f,mode:c})})}function Tt(){return p("/api/views")}function kt(e,a){return p("/api/views",{method:"POST",body:JSON.stringify({name:e,config:a})})}function vt(e,a){return p(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(a)})}function Rt(e){return p(`/api/views/${e}`,{method:"DELETE"})}function Ut(e){return p(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function pt(e){return e.replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function O(e,a){return a||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const ft="#e05050";function D(e){if(typeof document>"u")return;const a=e||ft,s=parseInt(a.slice(1,3),16),f=parseInt(a.slice(3,5),16),c=parseInt(a.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",a),h.style.setProperty("--color-accent-hover",mt(a,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(a,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(a,20))}function mt(e,a){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-a/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-a/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-a/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,a){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*a/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*a/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*a/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function yt(){let e=m(""),a=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),v=m(!1),R=m(null),g=m(w({})),U=w({}),L=w({}),I=w({}),_=m(0),F=m(null),C=m(""),T=null,S=m(0),b=m(0),x=m("alpha");async function W(){u(v,!0),u(R,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([J(),ut().catch(()=>[]),at().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(a,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),D(o(s)),u(c,t.map(i=>({name:i.name,displayName:O(i.name,i.display_name),type:i.type,private:i.private,sync:i.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(i=>$(i.name)))}catch(t){u(R,t.message,!0)}finally{u(v,!1)}}function V(t,n,r){const i=o(c).find(l=>l.name===t);i&&(i.entities=i.entities.filter(l=>!(l.id===r&&l.entityType===n)),i.count=i.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await $(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>$(t.name,!0)))}async function $(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const i=(E[t]??0)+1;E[t]=i,n||(r.loading=!0);try{const l=await dt(t);if(E[t]!==i)return;let y=0,A=0;for(const d of l)y+=d.document?.wikilinks?.length??0,A+=d.subContentCount??0;u(S,o(S)+y),u(b,o(b)+A);const P=new Set(["name","created_at","updated_at"]);r.entities=l.filter(d=>!d.id.toLowerCase().startsWith("readme")).map(d=>({id:d.id,title:d.data?.name??pt(d.id),entityType:d.entityType,repo:t,hasSubContent:!!d.hasSubContent,wikilinks:d.document?.wikilinks??[],createdAt:d.data?.created_at??null,updatedAt:d.data?.updated_at??null,fields:Object.fromEntries(Object.entries(d.data??{}).filter(([M])=>!P.has(M))),status:d.data?.status??void 0,priority:d.data?.priority??void 0,assignee:d.data?.assignee??void 0,dueDate:d.data?.due_date??void 0})).sort((d,M)=>d.title.localeCompare(M.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const i=k(t,n,r),l=U[i]??!1;U[i]=!l,!l&&!L[i]?.loaded&&G(t,n,r)}function Y(t,n,r){return U[k(t,n,r)]??!1}function z(t,n,r){return L[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function G(t,n,r){const i=k(t,n,r);L[i]={entries:[],loading:!1,loaded:!0}}function N(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const i of t){const l=i.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...i,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?T={...o(g)}:!t&&o(C)&&T&&(u(g,T,!0),T=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const i=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=i}}}function Z(t){const n=t.startsWith("type:");I[t]=!(I[t]??n)}function tt(t){return I[t]??!1}function et(t){return I[t]===!1}const nt=rt(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}return{get name(){return o(e)},get about(){return o(a)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),D(t.accent_color)),await it(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(a,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(v)},get error(){return o(R)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return N(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const i of r.entities)(i.title.toLowerCase().includes(t)||i.id.toLowerCase().includes(t))&&n.add(i.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(x)},set sortMode(t){u(x,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const i of r.entities)t&&!i.title.toLowerCase().includes(t)&&!i.id.toLowerCase().includes(t)||n.push(i);return n.sort((r,i)=>{const l=r.updatedAt??"";return(i.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(_)},set sidebarScrollTop(t){u(_,t,!0)},get lastAutoExpandedFor(){return o(F)},set lastAutoExpandedFor(t){u(F,t,!0)},load:W,loadEntities:$,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:Y,getEntityContents:z,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await ct(t,n,r);const i=o(c).find(l=>l.name===t);i&&(i.name=n,i.displayName=r||O(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await lt(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,i){await st(t,n,r,i);const l=await J();u(c,l.map(y=>o(c).find(P=>P.name===y.name)??{name:y.name,displayName:O(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await $(t)}}}const Lt=yt();export{Ut as a,wt as b,kt as c,Rt as d,bt as e,Tt as f,Ct as g,$t as h,St as i,Et as j,It as t,vt as u,Lt as w};
@@ -0,0 +1 @@
1
+ import{a as p,s as C,f as h}from"./CajNsaOw.js";import{i as M}from"./BLi1Oegj.js";import{p as k,l as c,s as m,d as f,g as i,a as A,c as _,n as B,r as u,b as N,m as v,t as P}from"./CfuRx7rA.js";import{i as R}from"./Cwkp_c4R.js";import{a as Y}from"./BA_Wro7X.js";import{l as g,p as b}from"./RGHlrGBn.js";var j=h("<title> </title>"),q=h('<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 J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),n=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(f(e),f(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),f(e)),()=>{m(n,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(n),...w}));var y=_(r);{var z=o=>{var l=j(),$=_(l,!0);u(l),P(()=>C($,s())),p(o,l)};R(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),N()}export{J as C};
@@ -0,0 +1 @@
1
+ import{e as n,f as m,g as a,s}from"./CfuRx7rA.js";import{g as c}from"./DUsnWwWN.js";import{d as v,u as y,c as g,f as V}from"./DQ_O96iG.js";const x={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function I(){let r=n(m([])),i=n(null),u=n(!1);async function l(){try{s(r,await V(),!0),s(u,!0)}catch(e){console.error("Failed to load views:",e)}}async function w(e){const t=await g(e,x);return s(r,[...a(r),t],!0),t}async function f(e,t){await y(e,t),s(r,a(r).map(o=>o.id===e?{...o,...t}:o),!0)}async function d(e){if(await v(e),s(r,a(r).filter(t=>t.id!==e),!0),a(i)===e){const t=a(r)[0];t?(s(i,t.id,!0),c(`/views/${t.id}`,{replaceState:!0})):(s(i,null),c("/",{replaceState:!0}))}}function p(e){s(i,e,!0)}return{get views(){return a(r)},get activeViewId(){return a(i)},get loaded(){return a(u)},load:l,create:w,update:f,remove:d,setActive:p}}const h=I();export{h as v};