@stacksjs/components 0.2.863 → 0.2.865
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.
- package/dist/{Button-k3j4cc3h.stx → Button-sebyqeva.stx} +6 -0
- package/dist/{CodeEditor-jg4w7e15.stx → CodeEditor-kaywcb83.stx} +111 -23
- package/dist/code-editor/editor.js +551 -10
- package/dist/index.js +12 -12
- package/dist/ui/code-editor/CodeEditor.d.ts +6 -1
- package/dist/ui/code-editor/controller.d.ts +31 -1
- package/dist/ui/code-editor/core/completion.d.ts +1 -0
- package/dist/ui/code-editor/core/hints.d.ts +68 -0
- package/dist/ui/code-editor/core/index.d.ts +1 -0
- package/dist/ui/code-editor/index.d.ts +6 -3
- package/dist/ui/code-editor/view.d.ts +30 -1
- package/package.json +3 -3
- package/src/ui/button/Button.stx +6 -0
- package/src/ui/code-editor/CodeEditor.stx +111 -23
- package/src/ui/code-editor/README.md +56 -2
- package/src/ui/code-editor/controller.ts +378 -6
- package/src/ui/code-editor/core/completion.ts +2 -0
- package/src/ui/code-editor/core/hints.ts +241 -0
- package/src/ui/code-editor/core/index.ts +1 -0
- package/src/ui/code-editor/core/keymap.ts +2 -0
- package/src/ui/code-editor/index.ts +9 -3
- package/src/ui/code-editor/view.ts +272 -7
- package/src/ui/preview-frame/README.md +15 -7
- package/src/ui/preview-frame/index.ts +6 -1
- package/src/ui/preview-frame/view.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Us={__stx:!0,src:"./components/CodeBlock.stx"};var Js={__stx:!0,src:"./components/Footer.stx"};var Ys={__stx:!0,src:"./components/Hero.stx"};var Xs={__stx:!0,src:"./components/Installation.stx"};function dd(e){let{code:t,onSuccess:s,onError:o,timeout:n=2000}=e,a=!1,r=null;return{copied:a,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),a=!0,s?.(),r=setTimeout(()=>{a=!1,r=null},n)}catch(i){let d=i instanceof Error?i:Error("Failed to copy code");o?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(a=!1,r)clearTimeout(r),r=null}}}async function pd(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function Zs(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function
|
|
3
|
-
`)}function G(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function xd(e,t,s={}){let{enabled:o=!0,ignore:n=[]}=s,a=(r)=>{if(!o||!e)return;let l=r.target;if(!e.contains(l)){if(!n.some((i)=>{let d=document.querySelectorAll(i);return Array.from(d).some((u)=>u.contains(l))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",a),document.addEventListener("touchstart",a);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}}function wd(e,t={}){let{enabled:s=!0,initialFocus:o=null,returnFocus:n=!0,fallbackFocus:a=null}=t,r=null,l=!1;function c(){if(!e)return[];let h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(h))}function i(h){if(!s||!l||!e)return;let g=c();if(g.length===0){h.preventDefault();return}let m=g[0],w=g[g.length-1];if(h.shiftKey){if(document.activeElement===m||document.activeElement===e)h.preventDefault(),w.focus()}else if(document.activeElement===w)h.preventDefault(),m.focus()}function d(h){if(h.key==="Escape"&&s&&l)p()}function u(){if(!s||!e||l)return;if(r=document.activeElement,o)o.focus();else{let h=c();if(h.length>0)h[0].focus();else if(a)a.focus();else e.focus()}document.addEventListener("keydown",i),document.addEventListener("keydown",d),l=!0}function p(){if(!l)return;if(document.removeEventListener("keydown",i),document.removeEventListener("keydown",d),n&&r)r.focus();l=!1}return{activate:u,deactivate:p}}function kd(e,t={}){let{enabled:s=!0,preventDefault:o=!0,stopPropagation:n=!1,target:a=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],l=(c)=>{if(!s)return;r.forEach((i)=>{if(!(Array.isArray(i.key)?i.key:[i.key]).some((p)=>p.toLowerCase()===c.key.toLowerCase()))return;if(i.ctrl!==void 0&&i.ctrl!==c.ctrlKey)return;if(i.shift!==void 0&&i.shift!==c.shiftKey)return;if(i.alt!==void 0&&i.alt!==c.altKey)return;if(i.meta!==void 0&&i.meta!==c.metaKey)return;if(o)c.preventDefault();if(n)c.stopPropagation();i.handler(c)})};if(a)a.addEventListener("keydown",l);return()=>{if(a)a.removeEventListener("keydown",l)}}var Cd={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function $d(e,t,s={}){let{serializer:o=JSON.stringify,deserializer:n=JSON.parse,onError:a=console.error}=s,r=t;try{if(typeof window<"u"){let u=window.localStorage.getItem(e);if(u!==null)r=n(u)}}catch(u){a(u)}let l=r,c=new Set;function i(u){try{let p=typeof u==="function"?u(l):u;if(l=p,typeof window<"u")window.localStorage.setItem(e,o(p));c.forEach((h)=>h(p))}catch(p){a(p)}}function d(){try{if(l=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((u)=>u(t))}catch(u){a(u)}}if(typeof window<"u"){let u=(p)=>{if(p.key===e&&p.newValue!==null)try{let h=n(p.newValue);l=h,c.forEach((g)=>g(h))}catch(h){a(h)}else if(p.key===e&&p.newValue===null)l=t,c.forEach((h)=>h(t))};window.addEventListener("storage",u)}return{value:l,setValue:i,removeValue:d}}function pe(e,t={}){let{defaultValue:s=!1}=t,o=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),o=n.matches;let r=(l)=>{o=l.matches};if(n.addEventListener)n.addEventListener("change",r);else n.addListener(r)}function a(){if(n)o=n.matches}return{matches:o,updateMatches:a}}var ue={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Ed(e){return pe(ue[e])}function Id(){return pe(ue.mobile)}function Ad(){return pe(ue.desktop)}function Pd(){return pe(ue.dark)}function Md(){return pe(ue.reducedMotion)}function ke(){return globalThis.stx?.overlays}function Ld(e,t){ke()?.open(e,t)}function Nd(e){ke()?.close(e)}function Od(e){return ke()?.isTop(e)??!1}function Dd(){return ke()?.list()??[]}var vt=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],
|
|
2
|
+
var Us={__stx:!0,src:"./components/CodeBlock.stx"};var Js={__stx:!0,src:"./components/Footer.stx"};var Ys={__stx:!0,src:"./components/Hero.stx"};var Xs={__stx:!0,src:"./components/Installation.stx"};function dd(e){let{code:t,onSuccess:s,onError:o,timeout:n=2000}=e,a=!1,r=null;return{copied:a,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),a=!0,s?.(),r=setTimeout(()=>{a=!1,r=null},n)}catch(i){let d=i instanceof Error?i:Error("Failed to copy code");o?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(a=!1,r)clearTimeout(r),r=null}}}async function pd(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function Zs(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function _e(e){return e==="system"?Zs():e}function hd(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,o=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)o=c}let n=_e(o)==="dark",a=(c)=>{let i=_e(c);if(typeof document<"u")if(i==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},r=(c)=>{o=c,a(c)},l=()=>{let i=_e(o)==="dark"?"light":"dark";r(i)};if(a(o),typeof window<"u"&&o==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(o==="system")a("system")});return{isDark:n,theme:o,toggle:l,setTheme:r}}function Qs(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function K(e,t,s=!1){if(typeof document>"u")return;let o=s?"property":"name",n=document.querySelector(`meta[${o}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(o,e),document.head.appendChild(n);n.setAttribute("content",t)}function eo(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function md(e){let{title:t,description:s,author:o,keywords:n,ogImage:a,ogImageWidth:r,ogImageHeight:l,twitterCard:c="summary_large_image",twitterSite:i,twitterCreator:d,canonical:u}=e;if(t)Qs(t),K("og:title",t,!0),K("twitter:title",t);if(s)K("description",s),K("og:description",s,!0),K("twitter:description",s);if(o)K("author",o);if(n&&n.length>0)K("keywords",n.join(", "));if(a)K("og:image",a,!0),K("twitter:image",a);if(r)K("og:image:width",r,!0);if(l)K("og:image:height",l,!0);if(K("twitter:card",c),i)K("twitter:site",i);if(d)K("twitter:creator",d);if(u)eo("canonical",u);if(K("og:type","website",!0),typeof window<"u")K("og:url",window.location.href,!0)}function gd(e){let t=[],{title:s,description:o,author:n,keywords:a,ogImage:r,ogImageWidth:l,ogImageHeight:c,twitterCard:i="summary_large_image",twitterSite:d,twitterCreator:u,canonical:p}=e;if(s)t.push(`<title>${G(s)}</title>`),t.push(`<meta property="og:title" content="${G(s)}" />`),t.push(`<meta name="twitter:title" content="${G(s)}" />`);if(o)t.push(`<meta name="description" content="${G(o)}" />`),t.push(`<meta property="og:description" content="${G(o)}" />`),t.push(`<meta name="twitter:description" content="${G(o)}" />`);if(n)t.push(`<meta name="author" content="${G(n)}" />`);if(a&&a.length>0)t.push(`<meta name="keywords" content="${G(a.join(", "))}" />`);if(r)t.push(`<meta property="og:image" content="${G(r)}" />`),t.push(`<meta name="twitter:image" content="${G(r)}" />`);if(l)t.push(`<meta property="og:image:width" content="${G(l)}" />`);if(c)t.push(`<meta property="og:image:height" content="${G(c)}" />`);if(t.push(`<meta name="twitter:card" content="${G(i)}" />`),d)t.push(`<meta name="twitter:site" content="${G(d)}" />`);if(u)t.push(`<meta name="twitter:creator" content="${G(u)}" />`);if(p)t.push(`<link rel="canonical" href="${G(p)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
|
|
3
|
+
`)}function G(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function xd(e,t,s={}){let{enabled:o=!0,ignore:n=[]}=s,a=(r)=>{if(!o||!e)return;let l=r.target;if(!e.contains(l)){if(!n.some((i)=>{let d=document.querySelectorAll(i);return Array.from(d).some((u)=>u.contains(l))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",a),document.addEventListener("touchstart",a);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}}function wd(e,t={}){let{enabled:s=!0,initialFocus:o=null,returnFocus:n=!0,fallbackFocus:a=null}=t,r=null,l=!1;function c(){if(!e)return[];let h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(h))}function i(h){if(!s||!l||!e)return;let g=c();if(g.length===0){h.preventDefault();return}let m=g[0],w=g[g.length-1];if(h.shiftKey){if(document.activeElement===m||document.activeElement===e)h.preventDefault(),w.focus()}else if(document.activeElement===w)h.preventDefault(),m.focus()}function d(h){if(h.key==="Escape"&&s&&l)p()}function u(){if(!s||!e||l)return;if(r=document.activeElement,o)o.focus();else{let h=c();if(h.length>0)h[0].focus();else if(a)a.focus();else e.focus()}document.addEventListener("keydown",i),document.addEventListener("keydown",d),l=!0}function p(){if(!l)return;if(document.removeEventListener("keydown",i),document.removeEventListener("keydown",d),n&&r)r.focus();l=!1}return{activate:u,deactivate:p}}function kd(e,t={}){let{enabled:s=!0,preventDefault:o=!0,stopPropagation:n=!1,target:a=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],l=(c)=>{if(!s)return;r.forEach((i)=>{if(!(Array.isArray(i.key)?i.key:[i.key]).some((p)=>p.toLowerCase()===c.key.toLowerCase()))return;if(i.ctrl!==void 0&&i.ctrl!==c.ctrlKey)return;if(i.shift!==void 0&&i.shift!==c.shiftKey)return;if(i.alt!==void 0&&i.alt!==c.altKey)return;if(i.meta!==void 0&&i.meta!==c.metaKey)return;if(o)c.preventDefault();if(n)c.stopPropagation();i.handler(c)})};if(a)a.addEventListener("keydown",l);return()=>{if(a)a.removeEventListener("keydown",l)}}var Cd={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function $d(e,t,s={}){let{serializer:o=JSON.stringify,deserializer:n=JSON.parse,onError:a=console.error}=s,r=t;try{if(typeof window<"u"){let u=window.localStorage.getItem(e);if(u!==null)r=n(u)}}catch(u){a(u)}let l=r,c=new Set;function i(u){try{let p=typeof u==="function"?u(l):u;if(l=p,typeof window<"u")window.localStorage.setItem(e,o(p));c.forEach((h)=>h(p))}catch(p){a(p)}}function d(){try{if(l=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((u)=>u(t))}catch(u){a(u)}}if(typeof window<"u"){let u=(p)=>{if(p.key===e&&p.newValue!==null)try{let h=n(p.newValue);l=h,c.forEach((g)=>g(h))}catch(h){a(h)}else if(p.key===e&&p.newValue===null)l=t,c.forEach((h)=>h(t))};window.addEventListener("storage",u)}return{value:l,setValue:i,removeValue:d}}function pe(e,t={}){let{defaultValue:s=!1}=t,o=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),o=n.matches;let r=(l)=>{o=l.matches};if(n.addEventListener)n.addEventListener("change",r);else n.addListener(r)}function a(){if(n)o=n.matches}return{matches:o,updateMatches:a}}var ue={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Ed(e){return pe(ue[e])}function Id(){return pe(ue.mobile)}function Ad(){return pe(ue.desktop)}function Pd(){return pe(ue.dark)}function Md(){return pe(ue.reducedMotion)}function ke(){return globalThis.stx?.overlays}function Ld(e,t){ke()?.open(e,t)}function Nd(e){ke()?.close(e)}function Od(e){return ke()?.isTop(e)??!1}function Dd(){return ke()?.list()??[]}var vt=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],Hd="--stx-color";function to(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function jd(e={}){let t={};for(let s of vt){let o=e[s];if(!o||typeof o==="string")continue;let n={};for(let[a,r]of Object.entries(o))n[a]=to(`--stx-color-${s}-${a}`,r);t[s]=n}return t}function Vd(e={}){let t=[];for(let s of vt){let o=e[s];if(!o||typeof o==="string")continue;for(let n of Object.keys(o))t.push(`--stx-color-${s}-${n}`)}return t}var oo="./Accordion-ehpymjam.stx";var ao="./AccordionItem-fc4ekdqf.stx";var io="./AddressField-gcydmvkf.stx";var co="./CommandBar-k35nsefs.stx";var uo="./ContentCard-gjsm9qrr.stx";var fo="./FloatingPanel-qp8cq8hz.stx";var go="./SidebarDivider-6whech7a.stx";var xo="./SidebarRow-301dd797.stx";var wo="./SpaceSwitcher-297p5gnb.stx";var ko="./TileGrid-nne4x506.stx";var So="./Audio-ay34sh1f.stx";var To="./Login-4666t7j4.stx";var Io="./Signup-pm2r0f2m.stx";var Po="./TwoFactorChallenge-3tsbfdsd.stx";var Ro="./Avatar-6gexb2xv.stx";var No="./Badge-33phrqza.stx";var Do="./Breadcrumb-cgw1bb6s.stx";class Y extends Error{component;context;constructor(e,t,s={}){let o=Y.formatMessage(e,t,s);super(o);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,Y)}static formatMessage(e,t,s){let o=`[${e}] ${t}`;if(s.prop)o+=`
|
|
4
4
|
Prop: "${s.prop}"`;if(s.received!==void 0)o+=`
|
|
5
5
|
Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let n=Array.isArray(s.expected)?s.expected.map((a)=>JSON.stringify(a)).join(", "):JSON.stringify(s.expected);o+=`
|
|
6
6
|
Expected: ${n}`}if(s.details)o+=`
|
|
7
7
|
Details: ${s.details}`;if(s.docsUrl)o+=`
|
|
8
8
|
Documentation: ${s.docsUrl}`;else if(e)o+=`
|
|
9
|
-
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var ce={invalidProp(e,t,s,o){return new Y(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new Y(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new Y(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new Y("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new Y(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new Y(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new Y(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new Y(e,"Failed to render component",{details:t.message})}},Ce=null;function Ap(e){Ce=e}function Pp(){Ce=null}function Se(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof Y)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(Ce)try{Ce(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function wt(e,t,s){return(...o)=>{try{let n=e(...o);if(n instanceof Promise)return n.catch((a)=>{let r=ce.eventHandler(t,s,a);throw Se(r,{throwError:!1}),r});return n}catch(n){let a=ce.eventHandler(t,s,n);throw Se(a,{throwError:!1}),a}}}function zo(e,t){if(!e)throw t}function
|
|
9
|
+
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var ce={invalidProp(e,t,s,o){return new Y(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new Y(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new Y(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new Y("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new Y(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new Y(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new Y(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new Y(e,"Failed to render component",{details:t.message})}},Ce=null;function Ap(e){Ce=e}function Pp(){Ce=null}function Se(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof Y)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(Ce)try{Ce(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function wt(e,t,s){return(...o)=>{try{let n=e(...o);if(n instanceof Promise)return n.catch((a)=>{let r=ce.eventHandler(t,s,a);throw Se(r,{throwError:!1}),r});return n}catch(n){let a=ce.eventHandler(t,s,n);throw Se(a,{throwError:!1}),a}}}function zo(e,t){if(!e)throw t}function Ho(e,t,s={}){let o=Y.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function Mp(e,t){zo(e,t)}function Rp(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){Ho(e,s,o)},error(s,o){let n=new Y(e,s,o);Se(n,{throwError:!1})}}}function Lp(e,t,s){try{return t()}catch(o){let n=ce.render(e,o);return Se(n,{throwError:!1}),s}}class q{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new q(this.validate,this.message,!0)}}var f={string:new q((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new q((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new q((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new q((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new q((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new q((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new q(()=>!0,()=>""),oneOf(e){return new q((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new q((t,s,o)=>e.some((n)=>n.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new q((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((n,a)=>e.validate(n,`${s}[${a}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new q((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,a]of Object.entries(e)){if(a.isRequired&&!(n in t))return!1;if(n in t&&!a.validate(t[n],`${s}.${n}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new q((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new q(e,typeof t==="string"?()=>t:t)},min(e){return new q((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new q((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new q((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,n)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new q((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new q((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new q((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function jo(e,t,s,o={}){let{throwOnError:n=!1,logWarnings:a=!0}=o,r=[];for(let[l,c]of Object.entries(s)){let i=t[l],d=i===void 0;if(c.isRequired&&d){let u=`Required prop \`${l}\` was not specified in \`${e}\`.`;r.push(u);continue}if(d)continue;if(!c.validate(i,l,e)){let u=c.message(i,l,e);r.push(u)}}if(r.length>0){if(a)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((l)=>console.warn(l)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function ee(e,t,s){return(o)=>Ho(e,o,t,s)}function Op(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Dp(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Fo="./Button-k3j4cc3h.stx";var Bo={variant:f.oneOf(["primary","secondary","outline","ghost","danger"]),size:f.oneOf(["xs","sm","md","lg","xl"]),disabled:f.boolean,loading:f.boolean,type:f.oneOf(["button","submit","reset"]),fullWidth:f.boolean,label:f.string,text:f.string,leftIcon:f.string,rightIcon:f.string,className:f.string,onClick:f.func},Fp=ee("Button",Bo);function Bp(e){return wt(e,"Button","onClick")}function _p(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw ce.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Wp(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw ce.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Wo="./Calendar-5vs6x7gj.stx";var Ko="./DateRangePicker-4zmf34e4.stx";var Uo="./EmptyState-snj7gbsn.stx";var Yo="./ErrorState-qb7af5zb.stx";var Zo="./ThemeToggle-4wm9zare.stx";var en="./Card-r55zpjqh.stx";var sn="./Checkbox-80myyzzm.stx";var nn="./ChoiceChips-8dcf172n.stx";var rn="./CodeEditor-jg4w7e15.stx";var cn="./Combobox-9n04ec5w.stx";var pn="./ComboboxButton-4r6a45s1.stx";var hn="./ComboboxInput-1gyfpnca.stx";var mn="./ComboboxOption-wkw70js7.stx";var bn="./ComboboxOptions-zhr9b6rx.stx";var vn="./CommandPalette-qqjdbcyg.stx";var yn="./CommandPaletteItem-7290ce1z.stx";var Cn="./ContextMenu-43g3w5tp.stx";function qe(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let o of e){if(!o||typeof o!=="object")continue;if(o.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...o,id:o.id==null?"":String(o.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((o,n)=>{if(o.path=[...t,n],o.separator||o.id==="")o.id=o.path.join(".");if(!o.separator&&Array.isArray(o.children))o.children=qe(o.children,o.path)}),s}function yt(e){return Boolean(e)&&!e.separator}function kt(e){return Boolean(e)&&!e.separator&&!e.disabled}function de(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function he(e,t,s){let o=e.length;if(o===0)return-1;let n=t;for(let a=0;a<o;a++)if(n=n<0?s===1?0:o-1:(n+s+o)%o,yt(e[n]))return n;return-1}function fe(e){return he(e,-1,1)}function Ct(e){return he(e,-1,-1)}function St(e,t,s){let o=s.toLowerCase();if(o===""||e.length===0)return-1;let n=o.length>1&&o.split("").every((l)=>l===o.charAt(0)),a=n?o.charAt(0):o,r=o.length===1||n?t+1:Math.max(t,0);for(let l=0;l<e.length;l++){let c=(r+l+e.length)%e.length,i=e[c];if(yt(i)&&(i.label||"").toLowerCase().startsWith(a))return c}return-1}function Sn(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let o=Sn(s.children,t);if(o)return o}}return null}function $t(e,t,s,o=8){let n=(a,r,l)=>{if(a+r<=l-o)return a;if(a-r>=o)return a-r;return Math.max(o,l-o-r)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function Tt(e,t,s,o=8,n=4){let a=e.left;if(a+t.width>s.width-o)a=Math.max(o,Math.min(e.right-t.width,s.width-o-t.width));let r=e.bottom+n;if(r+t.height>s.height-o){let l=e.top-n-t.height;r=l>=o?l:Math.max(o,s.height-o-t.height)}return{x:Math.max(o,a),y:r}}function Et(e,t,s,o=8,n=4){let a="right",r=e.right-n;if(r+t.width>s.width-o){let c=e.left+n-t.width;if(c>=o)r=c,a="left";else r=Math.max(o,s.width-o-t.width)}let l=Math.max(o,Math.min(e.top-n,s.height-o-t.height));return{x:r,y:l,side:a}}var $n={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},Tn={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},En={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},In={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},An=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],Pn=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function It(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),o=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:o}}function $e(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function At(e,t){if(!e)return"";let{modifiers:s,key:o}=It(e),n=t?An:Pn,r=[...s].sort((c,i)=>n.indexOf(c)-n.indexOf(i)).map((c)=>(t?$n:Tn)[c]??$e(c)),l=(t?En:In)[o.toLowerCase()]??$e(o);return t?r.join("")+l:[...new Set(r),l].join("+")}function Pt(e,t){if(!e)return"";let{modifiers:s,key:o}=It(e),n={mod:t?"Meta":"Control",meta:"Meta",cmd:"Meta",command:"Meta",ctrl:"Control",control:"Control",alt:"Alt",option:"Alt",shift:"Shift"};return[...new Set(s.map((a)=>n[a]??$e(a))),$e(o)].join("+")}var Mn=160,Rn=600;function Ln(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var Nn=0;class On{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++Nn}`;stack=[];target=null;returnFocus=null;hoverTimer=null;typed="";typedAt=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.items=t.items??null,this.label=t.label||"Context menu",this.disabled=Boolean(t.disabled),this.apple=t.apple??Ln(),this.layer=document.createElement("div"),this.layer.className="stx-menu-layer",this.layer.setAttribute("data-menu-layer",""),this.layer.__stx_inert_content=!0,"popover"in HTMLElement.prototype)this.layer.setAttribute("popover","manual");else this.layer.hidden=!0;this.root.appendChild(this.layer),this.listen(this.root,"contextmenu",(o)=>this.onContextMenu(o)),this.listen(this.root,"keydown",(o)=>this.onHostKeyDown(o)),this.listen(this.layer,"keydown",(o)=>this.onMenuKeyDown(o)),this.listen(this.layer,"click",(o)=>this.onMenuClick(o)),this.listen(this.layer,"pointermove",(o)=>this.onMenuPointerMove(o)),this.listen(this.layer,"contextmenu",(o)=>o.preventDefault()),this.root.setAttribute("data-menu-ready","")}get isOpen(){return this.stack.length>0}setItems(e){this.items=e??null}setDisabled(e){if(this.disabled=e,e)this.close("api")}setLabel(e){this.label=e||"Context menu"}open(e,t,s={}){this.close("api",!1);let o=e instanceof Element?e:null,n=s.target??o??null,a=t??(typeof this.items==="function"?this.items(n):this.items),r=qe(a);if(r.length===0)return!1;this.target=n;let l=document.activeElement;this.returnFocus=l instanceof HTMLElement&&l!==document.body?l:null,this.showLayer();let c=this.buildMenu(r,null),i=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},u=o?Tt(Mt(o),i,d):$t(e,i,d);if(this.position(c.element,u),this.listenWhileOpen(),s.keyboard||o)this.focusItem(c,fe(c.items));else c.element.focus({preventScroll:!0});return this.callbacks.onOpen?.({x:u.x,y:u.y,target:n,keyboard:Boolean(s.keyboard)}),!0}close(e="api",t=!0){if(!this.isOpen)return;this.clearHover();for(let o of this.stack)o.element.remove();this.stack=[],this.hideLayer(),this.stopListeningWhileOpen();let s=this.returnFocus;if(this.returnFocus=null,this.target=null,t&&e!=="outside"&&e!=="blur"&&s&&s.isConnected)s.focus({preventScroll:!0});this.callbacks.onClose?.({reason:e})}destroy(){this.close("api",!1);for(let e of this.disposers)e();this.layer.remove(),this.root.removeAttribute("data-menu-ready")}listen(e,t,s,o){e.addEventListener(t,s,o);let n=()=>e.removeEventListener(t,s,o);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,o,n,a)=>{s.addEventListener(o,n,a),this.whileOpen.push(()=>s.removeEventListener(o,n,a))},t=(s)=>{if(!(s.target instanceof Node)||!this.layer.contains(s.target))this.close("outside")};e(document,"pointerdown",t,{capture:!0}),e(document,"scroll",t,{capture:!0,passive:!0}),e(window,"resize",()=>this.close("blur")),e(window,"blur",()=>this.close("blur"))}stopListeningWhileOpen(){for(let e of this.whileOpen)e();this.whileOpen=[]}showLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.showPopover()}catch{}else this.layer.hidden=!1}hideLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.hidePopover()}catch{}else this.layer.hidden=!0}position(e,t){e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`}buildMenu(e,t){let s=document.createElement("div");if(s.className="stx-menu",s.setAttribute("role","menu"),s.setAttribute("tabindex","-1"),s.setAttribute("data-menu-depth",String(this.stack.length)),t)s.setAttribute("aria-labelledby",t.id);else s.setAttribute("aria-label",this.label);e.forEach((n,a)=>{if(n.separator){let i=document.createElement("div");i.className="stx-menu-separator",i.setAttribute("role","separator"),s.appendChild(i);return}let r=document.createElement("div");if(r.className="stx-menu-item",r.id=`${this.uid}-${n.path.join("-")}`,r.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),r.setAttribute("tabindex","-1"),r.setAttribute("data-menu-index",String(a)),r.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")r.setAttribute("aria-checked",String(n.checked));if(n.disabled)r.setAttribute("aria-disabled","true");if(n.danger)r.setAttribute("data-danger","");let l=document.createElement("span");l.className="stx-menu-check",l.setAttribute("aria-hidden","true"),l.textContent=n.checked===!0?"\u2713":"",r.appendChild(l);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",r.appendChild(c),de(n)){r.setAttribute("aria-haspopup","menu"),r.setAttribute("aria-expanded","false");let i=document.createElement("span");i.className="stx-menu-arrow",i.setAttribute("aria-hidden","true"),i.textContent="\u203A",r.appendChild(i)}else if(n.shortcut){r.setAttribute("aria-keyshortcuts",Pt(n.shortcut,this.apple));let i=document.createElement("span");i.className="stx-menu-shortcut",i.setAttribute("aria-hidden","true"),i.textContent=At(n.shortcut,this.apple),r.appendChild(i)}s.appendChild(r)}),this.layer.appendChild(s);let o={element:s,items:e,opener:t};return this.stack.push(o),o}menuOf(e){if(!(e instanceof Element))return null;let t=e.closest(".stx-menu");return this.stack.find((s)=>s.element===t)??null}rowAt(e,t){return t<0?null:e.element.querySelector(`:scope > [data-menu-index="${t}"]`)}activeIndex(e){let t=document.activeElement;if(!(t instanceof HTMLElement)||t.parentElement!==e.element)return-1;let s=Number(t.getAttribute("data-menu-index"));return Number.isInteger(s)?s:-1}focusItem(e,t){let s=this.rowAt(e,t);if(s)s.focus({preventScroll:!1});else e.element.focus({preventScroll:!0})}closeBelow(e){let t=this.stack.indexOf(e);for(let s of this.stack.splice(t+1))s.opener?.setAttribute("aria-expanded","false"),s.element.remove()}openSubmenu(e,t,s){let o=e.items[t],n=this.rowAt(e,t);if(!n||!de(o)||o.disabled)return;let a=this.stack[this.stack.indexOf(e)+1];if(a&&a.opener===n){if(s)this.focusItem(a,fe(a.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let r=this.buildMenu(o.children,n),l=Et(Mt(n),r.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(r.element.setAttribute("data-side",l.side),this.position(r.element,l),s)this.focusItem(r,fe(r.items))}choose(e,t){let s=e.items[t];if(!kt(s))return;if(de(s)){this.openSubmenu(e,t,!0);return}let{children:o,path:n,id:a,...r}=s,l={item:{...r,id:a},id:a,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(l)}clearHover(){if(this.hoverTimer)clearTimeout(this.hoverTimer);this.hoverTimer=null}onContextMenu(e){if(this.disabled||this.layer.contains(e.target))return;let t=e.target instanceof Element?e.target:null;if(e.button!==2&&e.detail===0&&e.clientX===0&&e.clientY===0&&t?this.open(t,null,{keyboard:!0,target:t}):this.open({x:e.clientX,y:e.clientY},null,{target:t}))e.preventDefault()}onHostKeyDown(e){if(this.disabled||this.isOpen||this.layer.contains(e.target))return;if(e.key!=="ContextMenu"&&!(e.key==="F10"&&e.shiftKey))return;let t=e.target instanceof Element?e.target:null;if(t&&this.open(t,null,{keyboard:!0,target:t}))e.preventDefault()}onMenuClick(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s)return;this.choose(t,Number(s.getAttribute("data-menu-index")))}onMenuPointerMove(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s||document.activeElement===s)return;let o=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(de(t.items[o]))this.openSubmenu(t,o,!1);else this.closeBelow(t)},Mn)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),o=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,he(t.items,s,1));break;case"ArrowUp":this.focusItem(t,he(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,fe(t.items));break;case"End":case"PageDown":this.focusItem(t,Ct(t.items));break;case"ArrowRight":if(de(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(o>0)this.closeSubmenu(t);break;case"Escape":if(o>0)this.closeSubmenu(t);else this.close("escape");break;case"Enter":case" ":if(s>=0)this.choose(t,s);break;case"Tab":this.close("tab"),n=!1;break;default:n=this.typeAhead(t,s,e)}if(n)e.preventDefault(),e.stopPropagation()}closeSubmenu(e){let t=e.opener,s=this.stack[this.stack.indexOf(e)-1];if(s)this.closeBelow(s);t?.focus({preventScroll:!0})}typeAhead(e,t,s){if(s.key.length!==1||s.metaKey||s.ctrlKey||s.altKey)return!1;let o=Date.now();this.typed=o-this.typedAt>Rn?s.key:this.typed+s.key,this.typedAt=o;let n=St(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function Mt(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var Wu=48,qu=2000,Ku=420,Gu=160,Dn=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,zn=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function ge(e,t){let s=new WeakSet,o=JSON.stringify(e,(n,a)=>{if(typeof a==="bigint")return a.toString();if(typeof a==="object"&&a!==null){if(s.has(a))return"[Circular]";s.add(a)}return a},t);return o===void 0?"null":o}function te(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function jn(e){let t=0,s=0,o=0,n=0,a=0;for(let r of e){if(r===null||r===void 0||r==="")continue;if(t++,typeof r==="number"||typeof r==="bigint")s++;else if(typeof r==="boolean")n++;else if(r instanceof Date)o++;else if(typeof r==="object")a++;else if(typeof r==="string"){let l=r.trim();if(Dn.test(l))s++;else if(zn.test(l)&&!Number.isNaN(Date.parse(l)))o++}}if(t===0)return"string";if(s===t)return"number";if(o===t)return"date";if(n===t)return"boolean";if(a===t)return"json";return"string"}function Hn(e,t=200){let s=[],o=new Set,n=Math.min(e.length,t);for(let a=0;a<n;a++){let r=e[a];if(r===null||typeof r!=="object")continue;if(Array.isArray(r)){for(let l=0;l<r.length;l++){let c=String(l);if(!o.has(c))o.add(c),s.push(c)}continue}for(let l in r)if(!o.has(l))o.add(l),s.push(l)}if(s.length>0&&s.every((a)=>/^\d+$/.test(a)))s.sort((a,r)=>Number(a)-Number(r));return s.map((a)=>({key:a}))}function Nt(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function me(e,t="string"){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e==="string")return e;if(typeof e==="number"||typeof e==="boolean"||typeof e==="bigint")return String(e);if(e instanceof Date)return Number.isNaN(e.getTime())?"Invalid Date":e.toISOString();if(typeof e==="object"||t==="json"){let s=ge(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function Ot(e){return ge(e)}function Dt(e,t){let s={};for(let o of t){let n=te(e,o);s[o.key]=n===void 0?null:n}return s}function zt(e,t){return ge(Dt(e,t),2)}function Vn(e,t){return ge(e.map((s)=>Dt(s,t)),2)}function Rt(e){if(e===null||e===void 0)return"";let t;if(typeof e==="string")t=e;else if(e instanceof Date)t=Number.isNaN(e.getTime())?"":e.toISOString();else if(typeof e==="object")t=ge(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function Fn(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>Rt(n.label??n.key)).join(",");let o=t.length;for(let n=0;n<e.length;n++){let a=e[n],r="";for(let l=0;l<o;l++){if(l>0)r+=",";r+=Rt(te(a,t[l]))}s[n+1]=r}return`${s.join(`\r
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function ee(e,t,s){return(o)=>jo(e,o,t,s)}function Op(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Dp(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Fo="./Button-sebyqeva.stx";var Bo={variant:f.oneOf(["primary","secondary","outline","ghost","danger"]),size:f.oneOf(["xs","sm","md","lg","xl"]),disabled:f.boolean,loading:f.boolean,type:f.oneOf(["button","submit","reset"]),fullWidth:f.boolean,label:f.string,text:f.string,leftIcon:f.string,rightIcon:f.string,className:f.string,onClick:f.func},Fp=ee("Button",Bo);function Bp(e){return wt(e,"Button","onClick")}function qp(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw ce.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function _p(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw ce.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var _o="./Calendar-5vs6x7gj.stx";var Ko="./DateRangePicker-4zmf34e4.stx";var Uo="./EmptyState-snj7gbsn.stx";var Yo="./ErrorState-qb7af5zb.stx";var Zo="./ThemeToggle-4wm9zare.stx";var en="./Card-r55zpjqh.stx";var sn="./Checkbox-80myyzzm.stx";var nn="./ChoiceChips-8dcf172n.stx";var rn="./CodeEditor-kaywcb83.stx";var cn="./Combobox-9n04ec5w.stx";var pn="./ComboboxButton-4r6a45s1.stx";var hn="./ComboboxInput-1gyfpnca.stx";var mn="./ComboboxOption-wkw70js7.stx";var bn="./ComboboxOptions-zhr9b6rx.stx";var vn="./CommandPalette-qqjdbcyg.stx";var yn="./CommandPaletteItem-7290ce1z.stx";var Cn="./ContextMenu-43g3w5tp.stx";function We(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let o of e){if(!o||typeof o!=="object")continue;if(o.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...o,id:o.id==null?"":String(o.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((o,n)=>{if(o.path=[...t,n],o.separator||o.id==="")o.id=o.path.join(".");if(!o.separator&&Array.isArray(o.children))o.children=We(o.children,o.path)}),s}function yt(e){return Boolean(e)&&!e.separator}function kt(e){return Boolean(e)&&!e.separator&&!e.disabled}function de(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function he(e,t,s){let o=e.length;if(o===0)return-1;let n=t;for(let a=0;a<o;a++)if(n=n<0?s===1?0:o-1:(n+s+o)%o,yt(e[n]))return n;return-1}function fe(e){return he(e,-1,1)}function Ct(e){return he(e,-1,-1)}function St(e,t,s){let o=s.toLowerCase();if(o===""||e.length===0)return-1;let n=o.length>1&&o.split("").every((l)=>l===o.charAt(0)),a=n?o.charAt(0):o,r=o.length===1||n?t+1:Math.max(t,0);for(let l=0;l<e.length;l++){let c=(r+l+e.length)%e.length,i=e[c];if(yt(i)&&(i.label||"").toLowerCase().startsWith(a))return c}return-1}function Sn(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let o=Sn(s.children,t);if(o)return o}}return null}function $t(e,t,s,o=8){let n=(a,r,l)=>{if(a+r<=l-o)return a;if(a-r>=o)return a-r;return Math.max(o,l-o-r)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function Tt(e,t,s,o=8,n=4){let a=e.left;if(a+t.width>s.width-o)a=Math.max(o,Math.min(e.right-t.width,s.width-o-t.width));let r=e.bottom+n;if(r+t.height>s.height-o){let l=e.top-n-t.height;r=l>=o?l:Math.max(o,s.height-o-t.height)}return{x:Math.max(o,a),y:r}}function Et(e,t,s,o=8,n=4){let a="right",r=e.right-n;if(r+t.width>s.width-o){let c=e.left+n-t.width;if(c>=o)r=c,a="left";else r=Math.max(o,s.width-o-t.width)}let l=Math.max(o,Math.min(e.top-n,s.height-o-t.height));return{x:r,y:l,side:a}}var $n={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},Tn={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},En={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},In={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},An=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],Pn=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function It(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),o=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:o}}function $e(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function At(e,t){if(!e)return"";let{modifiers:s,key:o}=It(e),n=t?An:Pn,r=[...s].sort((c,i)=>n.indexOf(c)-n.indexOf(i)).map((c)=>(t?$n:Tn)[c]??$e(c)),l=(t?En:In)[o.toLowerCase()]??$e(o);return t?r.join("")+l:[...new Set(r),l].join("+")}function Pt(e,t){if(!e)return"";let{modifiers:s,key:o}=It(e),n={mod:t?"Meta":"Control",meta:"Meta",cmd:"Meta",command:"Meta",ctrl:"Control",control:"Control",alt:"Alt",option:"Alt",shift:"Shift"};return[...new Set(s.map((a)=>n[a]??$e(a))),$e(o)].join("+")}var Mn=160,Rn=600;function Ln(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var Nn=0;class On{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++Nn}`;stack=[];target=null;returnFocus=null;hoverTimer=null;typed="";typedAt=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.items=t.items??null,this.label=t.label||"Context menu",this.disabled=Boolean(t.disabled),this.apple=t.apple??Ln(),this.layer=document.createElement("div"),this.layer.className="stx-menu-layer",this.layer.setAttribute("data-menu-layer",""),this.layer.__stx_inert_content=!0,"popover"in HTMLElement.prototype)this.layer.setAttribute("popover","manual");else this.layer.hidden=!0;this.root.appendChild(this.layer),this.listen(this.root,"contextmenu",(o)=>this.onContextMenu(o)),this.listen(this.root,"keydown",(o)=>this.onHostKeyDown(o)),this.listen(this.layer,"keydown",(o)=>this.onMenuKeyDown(o)),this.listen(this.layer,"click",(o)=>this.onMenuClick(o)),this.listen(this.layer,"pointermove",(o)=>this.onMenuPointerMove(o)),this.listen(this.layer,"contextmenu",(o)=>o.preventDefault()),this.root.setAttribute("data-menu-ready","")}get isOpen(){return this.stack.length>0}setItems(e){this.items=e??null}setDisabled(e){if(this.disabled=e,e)this.close("api")}setLabel(e){this.label=e||"Context menu"}open(e,t,s={}){this.close("api",!1);let o=e instanceof Element?e:null,n=s.target??o??null,a=t??(typeof this.items==="function"?this.items(n):this.items),r=We(a);if(r.length===0)return!1;this.target=n;let l=document.activeElement;this.returnFocus=l instanceof HTMLElement&&l!==document.body?l:null,this.showLayer();let c=this.buildMenu(r,null),i=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},u=o?Tt(Mt(o),i,d):$t(e,i,d);if(this.position(c.element,u),this.listenWhileOpen(),s.keyboard||o)this.focusItem(c,fe(c.items));else c.element.focus({preventScroll:!0});return this.callbacks.onOpen?.({x:u.x,y:u.y,target:n,keyboard:Boolean(s.keyboard)}),!0}close(e="api",t=!0){if(!this.isOpen)return;this.clearHover();for(let o of this.stack)o.element.remove();this.stack=[],this.hideLayer(),this.stopListeningWhileOpen();let s=this.returnFocus;if(this.returnFocus=null,this.target=null,t&&e!=="outside"&&e!=="blur"&&s&&s.isConnected)s.focus({preventScroll:!0});this.callbacks.onClose?.({reason:e})}destroy(){this.close("api",!1);for(let e of this.disposers)e();this.layer.remove(),this.root.removeAttribute("data-menu-ready")}listen(e,t,s,o){e.addEventListener(t,s,o);let n=()=>e.removeEventListener(t,s,o);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,o,n,a)=>{s.addEventListener(o,n,a),this.whileOpen.push(()=>s.removeEventListener(o,n,a))},t=(s)=>{if(!(s.target instanceof Node)||!this.layer.contains(s.target))this.close("outside")};e(document,"pointerdown",t,{capture:!0}),e(document,"scroll",t,{capture:!0,passive:!0}),e(window,"resize",()=>this.close("blur")),e(window,"blur",()=>this.close("blur"))}stopListeningWhileOpen(){for(let e of this.whileOpen)e();this.whileOpen=[]}showLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.showPopover()}catch{}else this.layer.hidden=!1}hideLayer(){if(this.layer.hasAttribute("popover"))try{this.layer.hidePopover()}catch{}else this.layer.hidden=!0}position(e,t){e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`}buildMenu(e,t){let s=document.createElement("div");if(s.className="stx-menu",s.setAttribute("role","menu"),s.setAttribute("tabindex","-1"),s.setAttribute("data-menu-depth",String(this.stack.length)),t)s.setAttribute("aria-labelledby",t.id);else s.setAttribute("aria-label",this.label);e.forEach((n,a)=>{if(n.separator){let i=document.createElement("div");i.className="stx-menu-separator",i.setAttribute("role","separator"),s.appendChild(i);return}let r=document.createElement("div");if(r.className="stx-menu-item",r.id=`${this.uid}-${n.path.join("-")}`,r.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),r.setAttribute("tabindex","-1"),r.setAttribute("data-menu-index",String(a)),r.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")r.setAttribute("aria-checked",String(n.checked));if(n.disabled)r.setAttribute("aria-disabled","true");if(n.danger)r.setAttribute("data-danger","");let l=document.createElement("span");l.className="stx-menu-check",l.setAttribute("aria-hidden","true"),l.textContent=n.checked===!0?"\u2713":"",r.appendChild(l);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",r.appendChild(c),de(n)){r.setAttribute("aria-haspopup","menu"),r.setAttribute("aria-expanded","false");let i=document.createElement("span");i.className="stx-menu-arrow",i.setAttribute("aria-hidden","true"),i.textContent="\u203A",r.appendChild(i)}else if(n.shortcut){r.setAttribute("aria-keyshortcuts",Pt(n.shortcut,this.apple));let i=document.createElement("span");i.className="stx-menu-shortcut",i.setAttribute("aria-hidden","true"),i.textContent=At(n.shortcut,this.apple),r.appendChild(i)}s.appendChild(r)}),this.layer.appendChild(s);let o={element:s,items:e,opener:t};return this.stack.push(o),o}menuOf(e){if(!(e instanceof Element))return null;let t=e.closest(".stx-menu");return this.stack.find((s)=>s.element===t)??null}rowAt(e,t){return t<0?null:e.element.querySelector(`:scope > [data-menu-index="${t}"]`)}activeIndex(e){let t=document.activeElement;if(!(t instanceof HTMLElement)||t.parentElement!==e.element)return-1;let s=Number(t.getAttribute("data-menu-index"));return Number.isInteger(s)?s:-1}focusItem(e,t){let s=this.rowAt(e,t);if(s)s.focus({preventScroll:!1});else e.element.focus({preventScroll:!0})}closeBelow(e){let t=this.stack.indexOf(e);for(let s of this.stack.splice(t+1))s.opener?.setAttribute("aria-expanded","false"),s.element.remove()}openSubmenu(e,t,s){let o=e.items[t],n=this.rowAt(e,t);if(!n||!de(o)||o.disabled)return;let a=this.stack[this.stack.indexOf(e)+1];if(a&&a.opener===n){if(s)this.focusItem(a,fe(a.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let r=this.buildMenu(o.children,n),l=Et(Mt(n),r.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(r.element.setAttribute("data-side",l.side),this.position(r.element,l),s)this.focusItem(r,fe(r.items))}choose(e,t){let s=e.items[t];if(!kt(s))return;if(de(s)){this.openSubmenu(e,t,!0);return}let{children:o,path:n,id:a,...r}=s,l={item:{...r,id:a},id:a,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(l)}clearHover(){if(this.hoverTimer)clearTimeout(this.hoverTimer);this.hoverTimer=null}onContextMenu(e){if(this.disabled||this.layer.contains(e.target))return;let t=e.target instanceof Element?e.target:null;if(e.button!==2&&e.detail===0&&e.clientX===0&&e.clientY===0&&t?this.open(t,null,{keyboard:!0,target:t}):this.open({x:e.clientX,y:e.clientY},null,{target:t}))e.preventDefault()}onHostKeyDown(e){if(this.disabled||this.isOpen||this.layer.contains(e.target))return;if(e.key!=="ContextMenu"&&!(e.key==="F10"&&e.shiftKey))return;let t=e.target instanceof Element?e.target:null;if(t&&this.open(t,null,{keyboard:!0,target:t}))e.preventDefault()}onMenuClick(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s)return;this.choose(t,Number(s.getAttribute("data-menu-index")))}onMenuPointerMove(e){let t=this.menuOf(e.target),s=e.target instanceof Element?e.target.closest(".stx-menu-item"):null;if(!t||!s||document.activeElement===s)return;let o=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(de(t.items[o]))this.openSubmenu(t,o,!1);else this.closeBelow(t)},Mn)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),o=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,he(t.items,s,1));break;case"ArrowUp":this.focusItem(t,he(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,fe(t.items));break;case"End":case"PageDown":this.focusItem(t,Ct(t.items));break;case"ArrowRight":if(de(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(o>0)this.closeSubmenu(t);break;case"Escape":if(o>0)this.closeSubmenu(t);else this.close("escape");break;case"Enter":case" ":if(s>=0)this.choose(t,s);break;case"Tab":this.close("tab"),n=!1;break;default:n=this.typeAhead(t,s,e)}if(n)e.preventDefault(),e.stopPropagation()}closeSubmenu(e){let t=e.opener,s=this.stack[this.stack.indexOf(e)-1];if(s)this.closeBelow(s);t?.focus({preventScroll:!0})}typeAhead(e,t,s){if(s.key.length!==1||s.metaKey||s.ctrlKey||s.altKey)return!1;let o=Date.now();this.typed=o-this.typedAt>Rn?s.key:this.typed+s.key,this.typedAt=o;let n=St(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function Mt(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var _u=48,Wu=2000,Ku=420,Gu=160,Dn=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,zn=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function ge(e,t){let s=new WeakSet,o=JSON.stringify(e,(n,a)=>{if(typeof a==="bigint")return a.toString();if(typeof a==="object"&&a!==null){if(s.has(a))return"[Circular]";s.add(a)}return a},t);return o===void 0?"null":o}function te(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function Hn(e){let t=0,s=0,o=0,n=0,a=0;for(let r of e){if(r===null||r===void 0||r==="")continue;if(t++,typeof r==="number"||typeof r==="bigint")s++;else if(typeof r==="boolean")n++;else if(r instanceof Date)o++;else if(typeof r==="object")a++;else if(typeof r==="string"){let l=r.trim();if(Dn.test(l))s++;else if(zn.test(l)&&!Number.isNaN(Date.parse(l)))o++}}if(t===0)return"string";if(s===t)return"number";if(o===t)return"date";if(n===t)return"boolean";if(a===t)return"json";return"string"}function jn(e,t=200){let s=[],o=new Set,n=Math.min(e.length,t);for(let a=0;a<n;a++){let r=e[a];if(r===null||typeof r!=="object")continue;if(Array.isArray(r)){for(let l=0;l<r.length;l++){let c=String(l);if(!o.has(c))o.add(c),s.push(c)}continue}for(let l in r)if(!o.has(l))o.add(l),s.push(l)}if(s.length>0&&s.every((a)=>/^\d+$/.test(a)))s.sort((a,r)=>Number(a)-Number(r));return s.map((a)=>({key:a}))}function Nt(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function me(e,t="string"){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e==="string")return e;if(typeof e==="number"||typeof e==="boolean"||typeof e==="bigint")return String(e);if(e instanceof Date)return Number.isNaN(e.getTime())?"Invalid Date":e.toISOString();if(typeof e==="object"||t==="json"){let s=ge(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function Ot(e){return ge(e)}function Dt(e,t){let s={};for(let o of t){let n=te(e,o);s[o.key]=n===void 0?null:n}return s}function zt(e,t){return ge(Dt(e,t),2)}function Vn(e,t){return ge(e.map((s)=>Dt(s,t)),2)}function Rt(e){if(e===null||e===void 0)return"";let t;if(typeof e==="string")t=e;else if(e instanceof Date)t=Number.isNaN(e.getTime())?"":e.toISOString();else if(typeof e==="object")t=ge(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function Fn(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>Rt(n.label??n.key)).join(",");let o=t.length;for(let n=0;n<e.length;n++){let a=e[n],r="";for(let l=0;l<o;l++){if(l>0)r+=",";r+=Rt(te(a,t[l]))}s[n+1]=r}return`${s.join(`\r
|
|
12
12
|
`)}\r
|
|
13
|
-
`}function jt(e,t,s,o,n=0){if(o<=0||s<=0)return{start:0,end:0};let a=Math.floor(Math.max(0,e)/s),r=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),l=Math.min(o,Math.max(0,a-n));return{start:l,end:Math.max(l,Math.min(o,r+n))}}function Ht(e,t,s){let o=s.rows-1,n=Math.max(0,s.columns-1),a=Math.max(1,s.page),{row:r,column:l}=e;switch(t){case"ArrowUp":r=Math.max(-1,r-1);break;case"ArrowDown":r=Math.min(o,r+1);break;case"ArrowLeft":l-=1;break;case"ArrowRight":l+=1;break;case"PageUp":r=r<=0?r:Math.max(0,r-a);break;case"PageDown":r=Math.min(o,Math.max(0,r)+(r<0?0:a));break;case"Home":if(l=0,s.mod)r=Math.min(0,o);break;case"End":if(l=n,s.mod)r=o;break;default:return e}return{row:Math.max(-1,Math.min(o,r)),column:Math.max(0,Math.min(n,l))}}function Bn(e,t,s=!1){let o=e.find((a)=>a.key===t),n=!o?{key:t,direction:"asc"}:o.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!o)return[...e,n];return n?e.map((a)=>a.key===t?n:a):e.filter((a)=>a.key!==t)}var Lt=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class Ke{rows=[];columns=[];view=new Uint32Array(0);sort=[];filter="";selected=new Set;given=null;filtered=new Uint32Array(0);searchText=null;sortKeys=new Map;offsets=new Float64Array(1);anchor=-1;charWidth;cellPadding;constructor(e=[],t=null,s={}){this.charWidth=s.charWidth??7.25,this.cellPadding=s.cellPadding??24,this.given=t&&t.length>0?[...t]:null,this.setRows(e)}get count(){return this.view.length}get totalWidth(){return this.offsets[this.columns.length]}setRows(e){this.rows=Array.isArray(e)?e:[],this.selected.clear(),this.anchor=-1,this.forget(),this.resolveColumns(),this.refilter()}setColumns(e){this.given=e&&e.length>0?[...e]:null,this.forget(),this.resolveColumns(),this.sort=this.sort.filter((t)=>this.columns.some((s)=>s.key===t.key)),this.refilter()}setFilter(e){return this.filter=e==null?"":String(e),this.refilter(),this.count}setSort(e){this.sort=(e??[]).filter((t)=>t&&(t.direction==="asc"||t.direction==="desc")&&this.columns.some((s)=>s.key===t.key)),this.resort()}toggleSort(e,t=!1){let s=this.columns.find((o)=>o.key===e);if(!s||!s.sortable)return this.sort;return this.sort=Bn(this.sort,e,t),this.resort(),this.sort}sortOf(e){let t=this.sort.findIndex((s)=>s.key===e);return t<0?null:{direction:this.sort[t].direction,priority:t+1}}rowAt(e){return e>=0&&e<this.view.length?this.rows[this.view[e]]:void 0}valueAt(e,t){let s=this.columns[t],o=this.rowAt(e);return s&&o!==void 0?te(o,s):void 0}viewRows(){let e=Array.from({length:this.view.length});for(let t=0;t<e.length;t++)e[t]=this.rows[this.view[t]];return e}toCsv(){return Fn(this.viewRows(),this.columns)}toJson(){return Vn(this.viewRows(),this.columns)}select(e,t="replace"){if(e<0||e>=this.view.length)return;let s=this.view[e];if(t==="range"&&this.anchor>=0){let o=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let a=o;a<=n&&a<this.view.length;a++)this.selected.add(this.view[a]);return}if(t==="toggle")if(this.selected.has(s))this.selected.delete(s);else this.selected.add(s);else this.selected.clear(),this.selected.add(s);this.anchor=e}selectAll(){this.selected.clear();for(let e=0;e<this.view.length;e++)this.selected.add(this.view[e])}clearSelection(){this.selected.clear(),this.anchor=-1}isSelected(e){return e>=0&&e<this.view.length&&this.selected.has(this.view[e])}selectedIndices(){return[...this.selected].sort((e,t)=>e-t)}selectedRows(){return this.selectedIndices().map((e)=>this.rows[e])}offsetOf(e){return this.offsets[Math.max(0,Math.min(this.columns.length,e))]}columnAt(e){let t=this.columns.length;if(t===0)return-1;let s=0,o=t-1;while(s<o){let n=s+o+1>>1;if(this.offsets[n]<=e)s=n;else o=n-1}return s}columnRange(e,t,s=0){let o=this.columns.length;if(o===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),a=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(o,a+1+s)}}resizeColumn(e,t){let s=this.columns[e];if(!s)return 0;return s.width=Math.round(Math.max(s.minWidth,Math.min(s.maxWidth,t))),this.measure(),s.width}autoWidth(e,t=200){let s=this.columns[e];if(!s)return 0;let o=s.label.length+3,n=Math.min(this.view.length,t);for(let r=0;r<n;r++){let l=me(te(this.rows[this.view[r]],s),s.type).length;if(l>o)o=l}let a=Math.ceil(o*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,a))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??Hn(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let o=0;o<t;o++)this.view[o]=o;this.columns=e.map((o)=>{let n=o.type;if(!n){let a=[];for(let r=0;r<t;r++)a.push(te(this.rows[r],o));n=jn(a)}return{...o,label:o.label??o.key,type:n,width:o.width??0,minWidth:o.minWidth??48,maxWidth:o.maxWidth??2000,align:o.align??(n==="number"?"right":"left"),sortable:o.sortable!==!1}}),this.columns.forEach((o,n)=>{if(!o.width)o.width=this.autoWidth(n);o.width=Math.max(o.minWidth,Math.min(o.maxWidth,o.width))}),this.view=s,this.measure()}measure(){let e=new Float64Array(this.columns.length+1);for(let t=0;t<this.columns.length;t++)e[t+1]=e[t]+this.columns[t].width;this.offsets=e}searchable(){if(this.searchText)return this.searchText;let e=this.rows,t=this.columns,s=Array.from({length:e.length});for(let o=0;o<e.length;o++){let n=e[o],a="";for(let r=0;r<t.length;r++){let l=te(n,t[r]);if(l===null||l===void 0)continue;a+=typeof l==="string"?l:me(l,t[r].type),a+="\x01"}s[o]=a.toLowerCase()}return this.searchText=s,s}refilter(){let e=this.rows.length,t=this.filter.toLowerCase().split(/\s+/).filter(Boolean);if(t.length===0){let s=new Uint32Array(e);for(let o=0;o<e;o++)s[o]=o;this.filtered=s}else{let s=this.searchable(),o=new Uint32Array(e),n=0,a=t.length===1?t[0]:null;for(let r=0;r<e;r++){let l=s[r];if(a!==null){if(l.includes(a))o[n++]=r;continue}let c=!0;for(let i=0;i<t.length;i++)if(!l.includes(t[i])){c=!1;break}if(c)o[n++]=r}this.filtered=o.slice(0,n)}this.anchor=-1,this.resort()}keysFor(e){let t=this.sortKeys.get(e.key);if(t)return t;let s=this.rows,o=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let a=te(s[n],e),r=Number.NaN;if(a===null||a===void 0||a==="")r=Number.NaN;else if(typeof a==="number")r=a;else if(typeof a==="boolean")r=a?1:0;else if(a instanceof Date)r=a.getTime();else if(e.type==="date")r=Date.parse(String(a));else if(e.type==="boolean")r=String(a).toLowerCase()==="true"?1:0;else r=Number(a);o[n]=r}else{let n=Array.from({length:s.length}),a=new Map;for(let c=0;c<s.length;c++){let i=te(s[c],e);if(i===null||i===void 0){n[c]=null;continue}let d=typeof i==="string"?i:me(i,e.type);if(n[c]=d,!a.has(d))a.set(d,0)}let r=[...a.keys()].sort(Lt.compare),l=0;for(let c=0;c<r.length;c++){if(c>0&&Lt.compare(r[c-1],r[c])!==0)l++;a.set(r[c],l)}for(let c=0;c<s.length;c++){let i=n[c];o[c]=i===null?Number.NaN:a.get(i)}}return this.sortKeys.set(e.key,o),o}resort(){let e=[];for(let s of this.sort){let o=this.columns.find((n)=>n.key===s.key);if(o)e.push({keys:this.keysFor(o),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:o}=e[0];t.sort((n,a)=>{let r=s[n],l=s[a];if(r<l)return-o;if(r>l)return o;if(r===l)return n-a;let c=r!==r;return c===(l!==l)?n-a:c?1:-1})}else if(e.length>1)t.sort((s,o)=>{for(let n=0;n<e.length;n++){let a=e[n].keys[s],r=e[n].keys[o];if(a<r)return-e[n].sign;if(a>r)return e[n].sign;if(a===r)continue;let l=a!==a;if(l!==(r!==r))return l?1:-1}return s-o});this.view=t}}var Wn="./DataGrid-7rt7v865.stx";var qn=120,Te=new Intl.NumberFormat("en-US");function ne(e,t){return e.querySelector(`[data-dg="${t}"]`)}function Kn(e){let t=()=>{let s=document.createElement("textarea");s.value=e,s.setAttribute("aria-hidden","true"),s.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(s);let o=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),o?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class Gn{root;callbacks;model;scroller;content;header;body;status;filterInput;prefix;rowHeight;headerHeight;overscan;columnOverscan;selectable;resizeStep;fileName;contextMenu;slots=new Map;pool=[];headerCells=[];rows={start:0,end:0};cols={start:0,end:0};stale=!0;active={row:0,column:0};activeEl=null;filterTimer=null;resize=null;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let o=ne(e,"scroller"),n=ne(e,"content"),a=ne(e,"header"),r=ne(e,"body");if(!o||!n||!a||!r)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=o,this.content=n,this.header=a,this.body=r,this.status=ne(e,"status"),this.filterInput=ne(e,"filter"),this.prefix=o.id||`data-grid-${Math.random().toString(36).slice(2,8)}`,this.rowHeight=Math.max(8,t.rowHeight??28),this.headerHeight=Math.max(8,t.headerHeight??32),this.overscan=t.overscan??6,this.columnOverscan=t.columnOverscan??2,this.selectable=t.selectable!==!1,this.resizeStep=t.resizeStep??16,this.fileName=t.fileName||"data",this.contextMenu=Boolean(t.contextMenu),this.header.__stx_inert_content=!0,this.body.__stx_inert_content=!0,e.style.setProperty("--stx-grid-row-height",`${this.rowHeight}px`),e.style.setProperty("--stx-grid-header-height",`${this.headerHeight}px`),this.model=new Ke(t.rows??[],t.columns??null),t.filter){if(this.model.setFilter(t.filter),this.filterInput)this.filterInput.value=t.filter}if(this.listen(this.scroller,"scroll",()=>this.render()),this.listen(this.scroller,"keydown",(i)=>this.onKeyDown(i)),this.listen(this.body,"click",(i)=>this.onBodyClick(i)),this.listen(this.body,"dblclick",(i)=>this.onBodyDoubleClick(i)),this.listen(this.body,"contextmenu",(i)=>this.onContextMenu(i)),this.listen(this.header,"click",(i)=>this.onHeaderClick(i)),this.listen(this.header,"dblclick",(i)=>this.onHeaderDoubleClick(i)),this.listen(this.header,"pointerdown",(i)=>this.onResizeStart(i)),this.listen(this.header,"pointermove",(i)=>this.onResizeMove(i)),this.listen(this.header,"pointerup",(i)=>this.onResizeEnd(i)),this.listen(this.header,"pointercancel",(i)=>this.onResizeEnd(i)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let l=ne(e,"export-csv"),c=ne(e,"export-json");if(l)this.listen(l,"click",()=>this.download("csv"));if(c)this.listen(c,"click",()=>this.download("json"));if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.refresh(),e.setAttribute("data-dg-ready","")}setRows(e){this.model.setRows(e),this.active={row:Math.min(0,this.model.count-1),column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.scroller.scrollTop=0,this.refresh()}setColumns(e){this.model.setColumns(e),this.active={row:this.active.row,column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.refresh()}setFilter(e){let t=e==null?"":String(e);if(this.filterInput&&this.filterInput.value!==t)this.filterInput.value=t;this.applyFilter(t)}setSort(e){this.model.setSort(e),this.refresh()}setFileName(e){this.fileName=e||"data"}getView(){return this.model.viewRows()}getSelection(){let e=this.model.selectedIndices();return{rows:e.map((t)=>this.model.rows[t]),indices:e}}clearSelection(){this.model.clearSelection(),this.paintSelection(),this.reportSelection()}exportCsv(){return this.model.toCsv()}exportJson(){return this.model.toJson()}download(e){let t=e==="json"?this.model.toJson():this.model.toCsv(),s=new Blob([t],{type:e==="json"?"application/json":"text/csv;charset=utf-8"}),o=URL.createObjectURL(s),n=document.createElement("a");return n.href=o,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(o),1000),this.callbacks.onExport?.({format:e,text:t,rows:this.model.count}),t}scrollToRow(e){let t=Math.max(0,Math.min(this.model.count-1,e));this.revealRow(t),this.render()}focus(){this.scroller.focus({preventScroll:!0})}getActiveCell(){return{...this.active}}setActiveCell(e,t){this.moveTo({row:e,column:t},!1)}destroy(){if(this.observer?.disconnect(),this.filterTimer)clearTimeout(this.filterTimer);for(let e of this.disposers)e();this.header.replaceChildren(),this.body.replaceChildren(),this.slots.clear(),this.pool.length=0,this.root.removeAttribute("data-dg-ready")}refresh(){let e=this.model;this.content.style.width=`${e.totalWidth}px`,this.content.style.height=`${this.headerHeight+e.count*this.rowHeight}px`,this.header.style.width=`${e.totalWidth}px`,this.body.style.height=`${e.count*this.rowHeight}px`,this.scroller.setAttribute("aria-rowcount",String(e.count+1)),this.scroller.setAttribute("aria-colcount",String(e.columns.length)),this.root.toggleAttribute("data-empty",e.count===0),this.stale=!0,this.render(),this.paintStatus()}render(){let e=this.model,t=this.scroller,s=jt(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),o=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||o.start!==this.cols.start||o.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=o,n)this.renderHeader();for(let[a,r]of this.slots)if(a<s.start||a>=s.end)this.slots.delete(a),r.index=-1,r.el.style.display="none",this.pool.push(r);for(let a=s.start;a<s.end;a++){let r=this.slots.get(a);if(r){if(n)this.fill(r);continue}r=this.pool.pop()??this.createSlot(),r.index=a,r.el.style.display="",this.slots.set(a,r),this.fill(r)}this.stale=!1,this.paintActive()}createSlot(){let e=document.createElement("div");return e.className="stx-dg-row",e.setAttribute("role","row"),this.body.appendChild(e),{el:e,index:-1,cells:[]}}fill(e){let t=this.model,s=e.index,o=t.rowAt(s),n=this.selectable&&t.isSelected(s),a=e.el;if(a.__dgRow=s,a.style.transform=`translateY(${s*this.rowHeight}px)`,a.setAttribute("aria-rowindex",String(s+2)),this.selectable)a.setAttribute("aria-selected",n?"true":"false");let r=this.cols.end-this.cols.start;while(e.cells.length<r){let l=document.createElement("div");l.className="stx-dg-cell",l.setAttribute("role","gridcell"),l.appendChild(document.createTextNode("")),a.appendChild(l),e.cells.push(l)}while(e.cells.length>r)e.cells.pop().remove();for(let l=0;l<r;l++){let c=this.cols.start+l,i=t.columns[c],d=e.cells[l],u=o===void 0?void 0:te(o,i),p=Nt(u);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${i.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",i.type),d.setAttribute("data-align",i.align),p==="value")d.removeAttribute("data-empty");else d.setAttribute("data-empty",p);if(this.selectable)d.setAttribute("aria-selected",n?"true":"false");d.firstChild.data=typeof u==="string"?u:me(u,i.type)}}renderHeader(){let e=this.model,t=this.cols.end-this.cols.start;while(this.headerCells.length<t){let s=document.createElement("div");s.className="stx-dg-head",s.setAttribute("role","columnheader");let o=document.createElement("span");o.className="stx-dg-head-label",o.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let a=document.createElement("span");a.className="stx-dg-resize",a.setAttribute("aria-hidden","true"),s.append(o,n,a),this.header.appendChild(s),this.headerCells.push(s)}while(this.headerCells.length>t)this.headerCells.pop().remove();for(let s=0;s<t;s++){let o=this.cols.start+s,n=e.columns[o],a=this.headerCells[s],r=e.sortOf(n.key);if(a.__dgColumn=o,a.id=`${this.prefix}-h-c${o}`,a.style.left=`${e.offsetOf(o)}px`,a.style.width=`${n.width}px`,a.setAttribute("aria-colindex",String(o+1)),a.setAttribute("data-align",n.align),a.toggleAttribute("data-sortable",n.sortable),n.sortable)a.setAttribute("aria-sort",r?r.direction==="asc"?"ascending":"descending":"none");else a.removeAttribute("aria-sort");a.children[0].firstChild.data=n.label,a.children[1].firstChild.data=r?`${r.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?r.priority:""}`:""}}cellElement(e){if(e.column<this.cols.start||e.column>=this.cols.end)return null;let t=e.column-this.cols.start;if(e.row<0)return this.headerCells[t]??null;return this.slots.get(e.row)?.cells[t]??null}paintActive(){let e=this.cellElement(this.active);if(this.activeEl&&this.activeEl!==e)this.activeEl.removeAttribute("data-active");if(this.activeEl=e,e)e.setAttribute("data-active",""),this.scroller.setAttribute("aria-activedescendant",e.id);else this.scroller.removeAttribute("aria-activedescendant")}paintSelection(){if(!this.selectable)return;for(let[e,t]of this.slots){let s=this.model.isSelected(e)?"true":"false";t.el.setAttribute("aria-selected",s);for(let o of t.cells)o.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${Te.format(t)} ${t===1?"row":"rows"}`:`${Te.format(e.count)} of ${Te.format(t)} rows`;if(e.selected.size>0)s+=`, ${Te.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,o=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+o)t.scrollTop=s+this.rowHeight-o}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),o=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(o>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,o-t.clientWidth)}detail(e){return{row:this.model.rowAt(e.row),rowIndex:e.row,column:this.model.columns[e.column],value:e.row<0?void 0:this.model.valueAt(e.row,e.column)}}moveTo(e,t=!0){let s=this.model,o={row:Math.max(-1,Math.min(s.count-1,e.row)),column:Math.max(0,Math.min(s.columns.length-1,e.column))};if(this.active=o,o.row>=0)this.revealRow(o.row);if(this.revealColumn(o.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(o))}reportSelection(){this.callbacks.onSelect?.(this.getSelection())}applyFilter(e){let t=this.model.setFilter(e);this.active={row:Math.min(0,t-1),column:this.active.column},this.scroller.scrollTop=0,this.refresh(),this.callbacks.onFilter?.({text:e,count:t})}sortBy(e,t){let s=this.model.columns[e];if(!s||!s.sortable)return;let o=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...o])}setColumnWidth(e,t){this.model.resizeColumn(e,t),this.content.style.width=`${this.model.totalWidth}px`,this.header.style.width=`${this.model.totalWidth}px`,this.stale=!0,this.render()}copy(e){if(this.active.row<0)return;let t=this.model.rowAt(this.active.row);if(t===void 0)return;let s=e==="row"?zt(t,this.model.columns):Ot(this.model.valueAt(this.active.row,this.active.column));Kn(s),this.callbacks.onCopy?.({what:e,text:s})}listen(e,t,s){e.addEventListener(t,s),this.disposers.push(()=>e.removeEventListener(t,s))}cellFrom(e){let s=e.target?.closest(".stx-dg-cell"),o=s?.parentElement;if(!s||!o||s.__dgColumn===void 0||o.__dgRow===void 0)return null;return{row:o.__dgRow,column:s.__dgColumn}}headFrom(e){let t=e.target,s=t?.closest(".stx-dg-head");if(!s||s.__dgColumn===void 0)return null;let o=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(o),handle:o}}onBodyClick(e){let t=this.cellFrom(e);if(!t)return;if(this.selectable)this.model.select(t.row,e.shiftKey?"range":e.metaKey||e.ctrlKey?"toggle":"replace"),this.paintSelection(),this.reportSelection();this.moveTo(t)}onBodyDoubleClick(e){let t=this.cellFrom(e),s=t?this.model.rowAt(t.row):void 0;if(t&&s!==void 0)this.callbacks.onActivate?.({row:s,rowIndex:t.row})}onContextMenu(e){let t=this.cellFrom(e);if(!t)return;if(this.contextMenu)e.preventDefault();this.moveTo(t,!1),this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onHeaderClick(e){let t=this.headFrom(e);if(!t||t.onHandle)return;this.active={row:-1,column:t.column},this.sortBy(t.column,e.shiftKey)}onHeaderDoubleClick(e){let t=this.headFrom(e);if(t&&t.onHandle)this.setColumnWidth(t.column,this.model.autoWidth(t.column))}onResizeStart(e){let t=this.headFrom(e);if(!t||!t.onHandle||!t.handle||e.button!==0)return;e.preventDefault();try{t.handle.setPointerCapture(e.pointerId)}catch{}this.resize={column:t.column,start:e.clientX,width:this.model.columns[t.column].width,pointer:e.pointerId,handle:t.handle},this.root.setAttribute("data-resizing","")}onResizeMove(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.setColumnWidth(t.column,t.width+e.clientX-t.start)}onResizeEnd(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.resize=null,this.root.removeAttribute("data-resizing");try{t.handle.releasePointerCapture(e.pointerId)}catch{}}onFilterInput(){if(this.filterTimer)clearTimeout(this.filterTimer);this.filterTimer=setTimeout(()=>{this.filterTimer=null,this.applyFilter(this.filterInput?this.filterInput.value:"")},qn)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,o=this.active.row<0,n=e.key;if(s&&(n==="a"||n==="A")){if(!this.selectable)return;e.preventDefault(),t.selectAll(),this.paintSelection(),this.reportSelection();return}if(s&&(n==="c"||n==="C")){if(o)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(o&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let l=t.columns[this.active.column];if(l)this.setColumnWidth(this.active.column,l.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),o){this.sortBy(this.active.column,e.shiftKey);return}if(n===" "){if(!this.selectable)return;t.select(this.active.row,"toggle"),this.paintSelection(),this.reportSelection();return}let l=t.rowAt(this.active.row);if(l!==void 0)this.callbacks.onActivate?.({row:l,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let a=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),r=Ht(this.active,n,{rows:t.count,columns:t.columns.length,page:a,mod:s});if(r===this.active)return;if(e.preventDefault(),r.row===this.active.row&&r.column===this.active.column)return;if(e.shiftKey&&this.selectable&&r.row>=0&&r.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(r.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(r)}}var Jn="./Dialog-wm7zjqnb.stx";var Xn="./DialogBackdrop-de5m5m4w.stx";var Qn="./DialogDescription-yd2jgt2m.stx";var ta="./DialogPanel-v972ztcc.stx";var oa="./DialogTitle-nw0pw114.stx";var aa="./Drawer-d78cdr6d.stx";var ia="./Dropdown-hb8ks69x.stx";var ca="./DropdownButton-wxc25hsy.stx";var pa="./DropdownItem-af0vzc8a.stx";var ha="./DropdownItems-bkz7jkyz.stx";var ma="./Form-cybgg9ym.stx";var ga={action:f.string,method:f.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:f.object,initialValues:f.object,validateOnChange:f.boolean,validateOnBlur:f.boolean,onSubmit:f.func,onError:f.func,className:f.string},Eh=ee("Form",ga);var Vt=(e)=>Math.round(e*100)/100,X=(e)=>`${Vt(e.x)} ${Vt(e.y)}`;function Ft(e,t,s){let o=s.x-e.x,n=s.y-e.y;if(o===0&&n===0)return{x:e.x,y:e.y};let a=o===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(o),r=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),l=Math.min(a,r);return{x:e.x+o*l,y:e.y+n*l}}function Bt(e,t,s){let o=e.x-t.x,n=e.y-t.y,a=Math.sqrt(o*o+n*n);if(s<=0||a<=s)return e;return{x:e.x-o/a*s,y:e.y-n/a*s}}function ba(e,t,s=0){let o=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},a={x:e.x+t.width/2,y:e.y-t.height/4},r={x:n.x,y:n.y-o},l={x:a.x+o,y:a.y};return{d:`M ${X(n)} C ${X(r)}, ${X(l)}, ${X(a)}`,start:n,end:a,label:_t(n,r,l,a,0.5),angle:Math.atan2(a.y-l.y,a.x-l.x)}}function _t(e,t,s,o,n){let a=1-n;return{x:a*a*a*e.x+3*a*a*n*t.x+3*a*n*n*s.x+n*n*n*o.x,y:a*a*a*e.y+3*a*a*n*t.y+3*a*n*n*s.y+n*n*n*o.y}}function Wt(e,t={}){let{source:s,sourceSize:o,target:n,targetSize:a}=e,r=t.offset??0,l=t.inset??0;if(s.x===n.x&&s.y===n.y)return ba(s,o,r);if(t.curve==="bezier"){let w=t.direction!=="TB",y=(w?n.x-s.x:n.y-s.y)>=0?1:-1,v=w?{x:s.x+y*o.width/2,y:s.y}:{x:s.x,y:s.y+y*o.height/2},x=w?{x:n.x-y*a.width/2,y:n.y}:{x:n.x,y:n.y-y*a.height/2},S=Math.abs(w?x.x-v.x:x.y-v.y),P=Math.max(S/2,24)*y,T=w?{x:x.x-y*l,y:x.y}:{x:x.x,y:x.y-y*l},H=w?{x:v.x+P,y:v.y+r}:{x:v.x+r,y:v.y+P},V=w?{x:T.x-P,y:T.y+r}:{x:T.x+r,y:T.y-P};return{d:`M ${X(v)} C ${X(H)}, ${X(V)}, ${X(T)}`,start:v,end:T,label:_t(v,H,V,T,0.5),angle:Math.atan2(T.y-V.y,T.x-V.x)}}let c=Ft(s,o,n),i=Ft(n,a,s);if(r===0){let w=Bt(i,c,l);return{d:`M ${X(c)} L ${X(w)}`,start:c,end:w,label:{x:(c.x+w.x)/2,y:(c.y+w.y)/2},angle:Math.atan2(w.y-c.y,w.x-c.x)}}let d=s.x<n.x||s.x===n.x&&s.y<n.y?1:-1,u=(n.x-s.x)*d,p=(n.y-s.y)*d,h=Math.sqrt(u*u+p*p)||1,g={x:(c.x+i.x)/2+-p/h*r*2,y:(c.y+i.y)/2+u/h*r*2},m=Bt(i,g,l);return{d:`M ${X(c)} Q ${X(g)}, ${X(m)}`,start:c,end:m,label:{x:0.25*c.x+0.5*g.x+0.25*m.x,y:0.25*c.y+0.5*g.y+0.25*m.y},angle:Math.atan2(m.y-g.y,m.x-g.x)}}function qt(e,t=14){let s=new Map;for(let n of e){let a=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,r=s.get(a);if(r)r.push(n);else s.set(a,[n])}let o=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((a,r)=>{let l=(r-(n.length-1)/2)*t;o.set(a.id,a.source===a.target?r*t:l)})}return o}var Ge={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function se(e){return e.label==null||e.label===""?e.id:String(e.label)}function Kt(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Gt(e,t=Ge){let s=Math.max(se(e).length,e.detail?e.detail.length*0.85:0),o=e.expandable===!0?t.charWidth+4:0;return{width:Math.min(t.maxWidth,Math.max(t.minWidth,Math.ceil(s*t.charWidth)+t.paddingX*2+o)),height:t.height+(e.detail?t.detailHeight:0)}}function Ut(e=Ge){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function Ee(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class Ie{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=Ge){this.metrics=s;this.merge(e,t)}get nodes(){return[...this.nodeMap.values()]}get edges(){return[...this.edgeMap.values()]}get nodeCount(){return this.nodeMap.size}get edgeCount(){return this.edgeMap.size}has(e){return this.nodeMap.has(e)}node(e){return this.nodeMap.get(e)}edge(e){return this.edgeMap.get(e)}addNode(e){if(!e||e.id==null||e.id==="")return!1;let t=String(e.id);if(this.nodeMap.has(t))return!1;let s={...e,id:t};return this.nodeMap.set(t,s),this.incident.set(t,new Set),this.sizes.set(t,Gt(s,this.metrics)),!0}addEdge(e){if(!e)return!1;let t=String(e.source),s=String(e.target);if(!this.nodeMap.has(t)||!this.nodeMap.has(s))return!1;let o=Kt({...e,source:t,target:s});if(this.edgeMap.has(o))return!1;return this.edgeMap.set(o,{...e,id:o,source:t,target:s}),this.incident.get(t).add(o),this.incident.get(s).add(o),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let o={...s,...t,id:e};return this.nodeMap.set(e,o),this.sizes.set(e,Gt(o,this.metrics)),!0}removeNode(e){if(!this.nodeMap.has(e))return!1;for(let t of[...this.incident.get(e)])this.removeEdge(t);return this.nodeMap.delete(e),this.incident.delete(e),this.sizes.delete(e),!0}removeEdge(e){let t=this.edgeMap.get(e);if(!t)return!1;return this.edgeMap.delete(e),this.incident.get(t.source)?.delete(e),this.incident.get(t.target)?.delete(e),!0}merge(e=[],t=[]){let s={nodes:[],edges:[]};for(let o of e)if(this.addNode(o))s.nodes.push(String(o.id));for(let o of t)if(this.addEdge(o))s.edges.push(Kt({...o,source:String(o.source),target:String(o.target)}));return s}edgesOf(e){let t=this.incident.get(e);return t?[...t].map((s)=>this.edgeMap.get(s)):[]}neighbours(e){let t=new Set;for(let s of this.edgesOf(e)){let o=s.source===e?s.target:s.source;if(o!==e)t.add(o)}return[...t]}degree(e){return this.neighbours(e).length}size(e){return this.sizes.get(e)??{width:this.metrics.minWidth,height:this.metrics.height}}bounds(e){let{POSITIVE_INFINITY:t,POSITIVE_INFINITY:s,NEGATIVE_INFINITY:o,NEGATIVE_INFINITY:n}=Number;for(let[a,r]of e){if(!this.nodeMap.has(a))continue;let l=this.size(a);t=Math.min(t,r.x-l.width/2),o=Math.max(o,r.x+l.width/2),s=Math.min(s,r.y-l.height/2),n=Math.max(n,r.y+l.height/2)}return Number.isFinite(t)?{x:t,y:s,width:o-t,height:n-s}:null}}function Jt(e){let t=e>>>0||1;return()=>{t=t+1831565813>>>0;let s=t;return s=Math.imul(s^s>>>15,s|1),s^=s+Math.imul(s^s>>>7,s|61),((s^s>>>14)>>>0)/4294967296}}var xa=0.15,Yt=0.06;function Xt(e,t={}){let s=e.nodes,o=s.length,n=new Map;if(o===0)return n;let a=t.linkDistance??90,r=t.padding??16,l=Jt(t.seed??1),c=t.positions??null,i=new Set(t.pinned??[]),d=new Map(s.map((R,L)=>[R.id,L])),u=new Float64Array(o),p=new Float64Array(o),h=new Float64Array(o),g=new Float64Array(o),m=new Uint8Array(o),w=new Uint8Array(o),y=new Float64Array(o).fill(1),v=0;s.forEach((R,L)=>{let E=e.size(R.id);h[L]=E.width/2,g[L]=E.height/2;let M=c?.get(R.id);if(M&&Number.isFinite(M.x)&&Number.isFinite(M.y))u[L]=M.x,p[L]=M.y,w[L]=1,m[L]=i.has(R.id)?1:0,y[L]=0,v++});let x=a*Math.sqrt(o)*0.6;s.forEach((R,L)=>{if(w[L])return;let E=e.neighbours(R.id).map((k)=>d.get(k)).find((k)=>w[k]),M=l()*Math.PI*2;if(E!==void 0)u[L]=u[E]+Math.cos(M)*a*0.5,p[L]=p[E]+Math.sin(M)*a*0.5;else{let k=Math.sqrt(l())*x;u[L]=Math.cos(M)*k,p[L]=Math.sin(M)*k}});let S=Uint8Array.from(w),P=v>0,T=Math.max(0,t.iterations??(P?80:300)),H=[],V=new Set;for(let R of e.edges){let L=d.get(R.source),E=d.get(R.target);if(L===E)continue;let M=L<E?L*o+E:E*o+L;if(!V.has(M))V.add(M),H.push(L,E)}let F=new Float64Array(o),b=new Float64Array(o),C=a,N=P?C*0.5:C*1.5;for(let R=0;R<T;R++){let L=N*(1-R/T);F.fill(0),b.fill(0);for(let E=0;E<o;E++)for(let M=E+1;M<o;M++){if(S[E]&&S[M])continue;let k=u[E]-u[M],D=p[E]-p[M],O=Math.sqrt(k*k+D*D);if(O<0.01){let W=(E*31+M*17)%360*Math.PI/180;k=Math.cos(W)*0.01,D=Math.sin(W)*0.01,O=0.01}let J=Math.max(1,O-(h[E]+h[M])*0.5),j=C*C*xa/J/O;F[E]+=k*j,b[E]+=D*j,F[M]-=k*j,b[M]-=D*j}for(let E=0;E<H.length;E+=2){let M=H[E],k=H[E+1];if(S[M]&&S[k])continue;let D=u[M]-u[k],O=p[M]-p[k],J=Math.sqrt(D*D+O*O)||0.01,j=(h[M]+h[k])*0.5,W=Math.max(0,J-j),Z=W*W/C/J;F[M]-=D*Z,b[M]-=O*Z,F[k]+=D*Z,b[k]+=O*Z}for(let E=0;E<o;E++){if(m[E])continue;if(!S[E])F[E]-=u[E]*Yt,b[E]-=p[E]*Yt;let M=Math.sqrt(F[E]*F[E]+b[E]*b[E]);if(M>0){let k=Math.min(M,L)/M*y[E];u[E]+=F[E]*k,p[E]+=b[E]*k}}}return va(u,p,h,g,m,r),s.forEach((R,L)=>{n.set(R.id,{x:Math.round(u[L]*100)/100,y:Math.round(p[L]*100)/100})}),n}function va(e,t,s,o,n,a){let r=e.length;for(let l=0;l<40;l++){let c=!1;for(let i=0;i<r;i++)for(let d=i+1;d<r;d++){let u=s[i]+s[d]+a-Math.abs(e[i]-e[d]);if(u<=0)continue;let p=o[i]+o[d]+a-Math.abs(t[i]-t[d]);if(p<=0)continue;if(n[i]&&n[d])continue;c=!0;let h=n[i]?0:n[d]?1:0.5,g=1-h;if(u<p){let m=e[i]<e[d]||e[i]===e[d]&&i<d?-1:1;e[i]+=m*u*h,e[d]-=m*u*g}else{let m=t[i]<t[d]||t[i]===t[d]&&i<d?-1:1;t[i]+=m*p*h,t[d]-=m*p*g}}if(!c)break}}function wa(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let a=[],r=[n.id];t.add(n.id);while(r.length){let l=r.shift();a.push(l);for(let c of e.neighbours(l))if(!t.has(c))t.add(c),r.push(c)}s.push(a)}let o=new Map(e.nodes.map((n,a)=>[n.id,a]));for(let n of s)n.sort((a,r)=>o.get(a)-o.get(r));return s}function ya(e){let t=new Map;for(let n of e.nodes)t.set(n.id,[]);for(let n of e.edges)if(n.source!==n.target)t.get(n.source).push({id:n.id,to:n.target});let s=new Set,o=new Map;for(let n of e.nodes){if(o.has(n.id))continue;let a=[{id:n.id,next:0}];o.set(n.id,1);while(a.length){let r=a[a.length-1],l=t.get(r.id);if(r.next>=l.length){o.set(r.id,2),a.pop();continue}let c=l[r.next++],i=o.get(c.to);if(i===1)s.add(c.id);else if(i===void 0)o.set(c.to,1),a.push({id:c.to,next:0})}}return s}function Zt(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,a)=>n[0]-a[0]||n[1]-a[1]),o=0;for(let n=0;n<s.length;n++)for(let a=n+1;a<s.length;a++)if(s[n][0]<s[a][0]&&s[n][1]>s[a][1])o++;return o}function Qt(e,t={}){let s=t.direction==="TB"?"TB":"LR",o=t.nodeGap??24,n=t.layerGap??80,a=t.componentGap??48,r=t.sweeps??4,l=s==="LR",c=ya(e),i=[],d=new Set;for(let x of e.edges){if(x.source===x.target)continue;let S=c.has(x.id)?x.target:x.source,P=c.has(x.id)?x.source:x.target,T=`${S}\x00${P}`;if(!d.has(T))d.add(T),i.push({from:S,to:P})}let u=new Map,p=new Map;for(let x of e.nodes)u.set(x.id,[]),p.set(x.id,[]);for(let x of i)u.get(x.from).push(x.to),p.get(x.to).push(x.from);let h=new Map,g=new Map,m=[];for(let x of e.nodes)if(g.set(x.id,p.get(x.id).length),p.get(x.id).length===0)m.push(x.id),h.set(x.id,0);for(let x=0;x<m.length;x++){let S=m[x];for(let P of u.get(S)){h.set(P,Math.max(h.get(P)??0,h.get(S)+1));let T=g.get(P)-1;if(g.set(P,T),T===0)m.push(P)}}let w=new Map,y=[],v=0;for(let x of wa(e)){let S=[];for(let k of x){let D=h.get(k)??0;while(S.length<=D)S.push([]);S[D].push(k)}let P=new Set(x),T=i.filter((k)=>P.has(k.from)&&h.get(k.to)-h.get(k.from)===1),H=new Map,V=()=>{for(let k of S)k.forEach((D,O)=>H.set(D,k.length>1?O/(k.length-1):0.5))},F=(k,D)=>{let O=new Map;k.forEach((j,W)=>{let Z=D.get(j),ve=k.length>1?W/(k.length-1):0.5;O.set(j,Z.length?Z.reduce((je,we)=>je+H.get(we),0)/Z.length:ve)});let J=new Map(k.map((j,W)=>[j,W]));k.sort((j,W)=>O.get(j)-O.get(W)||J.get(j)-J.get(W)),k.forEach((j,W)=>H.set(j,k.length>1?W/(k.length-1):0.5))};V();let b=S.map((k)=>[...k]),C=Zt(T,H);for(let k=0;k<r&&C>0;k++){for(let O=1;O<S.length;O++)F(S[O],p);for(let O=S.length-2;O>=0;O--)F(S[O],u);let D=Zt(T,H);if(D<C)C=D,b=S.map((O)=>[...O])}let N=(k)=>l?e.size(k).width:e.size(k).height,R=(k)=>l?e.size(k).height:e.size(k).width,L=b.map((k)=>k.reduce((D,O)=>D+R(O),0)+o*Math.max(0,k.length-1)),E=Math.max(0,...L),M=0;b.forEach((k,D)=>{let O=Math.max(0,...k.map(N)),J=v+(E-L[D])/2;for(let j of k){let W=J+R(j)/2;w.set(j,l?{x:M+O/2,y:W}:{x:W,y:M+O/2}),J+=R(j)+o}M+=O+n}),y.push(b),v+=E+a}return{positions:w,layerOf:h,reversed:c,components:y,bounds:e.bounds(w)}}var ka={x:0,y:0,k:1};function es(e,t,s){return Math.min(Math.max(e,t),s)}function Oh(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Ue(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function Ae(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function ts(e,t,s,o=0.1,n=4){let a=es(e.k*s,o,n),r=a/e.k;return{x:t.x-(t.x-e.x)*r,y:t.y-(t.y-e.y)*r,k:a}}function ss(e,t,s=24,o=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...ka};let a=Math.max(1,t.width-s*2),r=Math.max(1,t.height-s*2),l=es(Math.min(a/Math.max(1,e.width),r/Math.max(1,e.height)),o,n);return{x:t.width/2-(e.x+e.width/2)*l,y:t.height/2-(e.y+e.height/2)*l,k:l}}function os(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function ns(e,t,s,o=16){let n=t.x*e.k+e.x,a=t.y*e.k+e.y,r=n+t.width*e.k,l=a+t.height*e.k,c=0,i=0;if(n<o)c=o-n;else if(r>s.width-o)c=s.width-o-r;if(a<o)i=o-a;else if(l>s.height-o)i=s.height-o-l;return c===0&&i===0?e:Ae(e,c,i)}function as(e,t,s){let o=e.get(t);if(!o)return null;let n=s==="left"?-1:s==="right"?1:0,a=s==="up"?-1:s==="down"?1:0,r=null,l=Number.POSITIVE_INFINITY;for(let[c,i]of e){if(c===t)continue;let d=i.x-o.x,u=i.y-o.y,p=d*n+u*a;if(p<=0.5)continue;let h=Math.abs(d*a)+Math.abs(u*n);if(h>p*2)continue;let g=p+h*2;if(g<l)l=g,r=c}return r}function rs(e,t){let s=null,o=Number.POSITIVE_INFINITY;for(let[n,a]of e){let r=(a.x-t.x)**2+(a.y-t.y)**2;if(r<o)o=r,s=n}return s}function Dh(e,t,s){let o=null;for(let[n,a]of t){let r=e.size(n);if(Math.abs(s.x-a.x)<=r.width/2&&Math.abs(s.y-a.y)<=r.height/2)o=n}return o}var Sa="./GraphView-0t3t9mec.stx";var $a="http://www.w3.org/2000/svg",is=3,ls=350,Ta=240,Ea=6.2;function q(e,t={}){let s=document.createElementNS($a,e);for(let o in t)s.setAttribute(o,String(t[o]));return s}var Ia=0;class Aa{root;callbacks;timings={layout:0,render:0};model=new Ie;positions=new Map;shown=new Map;pinned=new Set;view={x:0,y:0,k:1};size={width:0,height:0};layoutName;direction;selected=null;autoFit=!0;animate;minZoom;maxZoom;contextMenu;prefix;surface;status;svg;stage;edgeLayer;nodeLayer;labelLayer;nodeEls=new Map;edgeEls=new Map;idOf=new WeakMap;offsets=new Map;serial=0;gesture=null;pinch=null;lastClick={id:"",at:0};lastExpand=0;frame=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.prefix=`${e.id||"graph"}-${++Ia}`,this.layoutName=t.layout==="force"?"force":"layered",this.direction=t.direction==="TB"?"TB":"LR",this.minZoom=t.minZoom??0.1,this.maxZoom=t.maxZoom??4,this.contextMenu=Boolean(t.contextMenu),this.animate=t.animate!==!1,this.surface=e.querySelector('[data-gv="surface"]')??e,this.status=e.querySelector('[data-gv="status"]'),t.label)this.surface.setAttribute("aria-label",t.label);this.svg=q("svg",{class:"stx-gv-svg","aria-hidden":"false",focusable:"false"}),this.svg.__stx_inert_content=!0;let o=q("defs");for(let n of["arrow","arrow-active"]){let a=q("marker",{id:`${this.prefix}-${n}`,viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:7,markerHeight:7,orient:"auto-start-reverse",class:`stx-gv-${n}`});a.append(q("path",{d:"M 0 0 L 10 5 L 0 10 z"})),o.append(a)}if(this.stage=q("g",{class:"stx-gv-stage"}),this.edgeLayer=q("g",{class:"stx-gv-edges"}),this.nodeLayer=q("g",{class:"stx-gv-nodes"}),this.labelLayer=q("g",{class:"stx-gv-edge-labels"}),this.stage.append(this.edgeLayer,this.nodeLayer,this.labelLayer),this.svg.append(o,this.stage),this.surface.append(this.svg),this.listen(),this.measure(),this.setGraph(t.nodes??[],t.edges??[]),t.selected)this.select(t.selected,{silent:!0});if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{if(this.measure(),this.autoFit)this.fit()}),this.observer.observe(this.surface);e.setAttribute("data-gv-ready","")}graph(){return this.model}getViewport(){return{...this.view}}getLayout(){return this.layoutName}getSelected(){return this.selected}getPositions(){return Object.fromEntries([...this.positions].map(([e,t])=>[e,{...t}]))}setGraph(e,t){if(this.stop(),this.model=new Ie(e??[],t??[]),this.positions=new Map,this.pinned.clear(),this.selected&&!this.model.has(this.selected))this.selected=null;this.layout(!1),this.shown=new Map(this.positions),this.render(),this.autoFit=!0,this.fit(),this.mark()}addNeighbours(e,t,s){let o=this.model.merge(t??[],s??[]);if(o.nodes.length===0&&o.edges.length===0)return o;let n=this.shown.get(e)??this.positions.get(e)??Ue(this.view,{x:this.size.width/2,y:this.size.height/2});for(let a of o.nodes)this.shown.set(a,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),o.nodes.length)this.announce(`${o.nodes.length} ${o.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${se(this.model.node(e))}`:""}`);return o}updateNode(e,t){if(!this.model.updateNode(e,t))return;let s=this.nodeEls.get(e);if(s)s.remove(),this.nodeEls.delete(e);this.sync(),this.draw(),this.mark()}setLayout(e){let t=e==="force"?"force":"layered";if(t===this.layoutName)return;this.layoutName=t,this.relayout(),this.callbacks.onLayout?.({layout:t})}setDirection(e){let t=e==="TB"?"TB":"LR";if(t===this.direction)return;if(this.direction=t,this.layoutName==="layered")this.relayout()}select(e,t={}){let s=e!=null&&this.model.has(e)?e:null;if(s===this.selected)return;if(this.selected=s,this.mark(),s)this.describe(s);if(!t.silent)this.callbacks.onSelect?.(this.selection())}focusNode(e){if(!this.model.has(e))return;this.select(e);let t=this.positions.get(e);if(t)this.autoFit=!1,this.setView(os(this.view,t,this.size))}fit(){this.measure(),this.setView(ss(this.model.bounds(this.positions),this.size,32,this.minZoom,Math.min(1,this.maxZoom))),this.autoFit=!0}zoomIn(){this.zoomBy(1.25)}zoomOut(){this.zoomBy(0.8)}zoomBy(e,t){this.autoFit=!1,this.setView(ts(this.view,t??{x:this.size.width/2,y:this.size.height/2},e,this.minZoom,this.maxZoom))}panBy(e,t){this.autoFit=!1,this.setView(Ae(this.view,e,t))}setZoomLimits(e,t){this.minZoom=e,this.maxZoom=t}destroy(){this.stop(),this.observer?.disconnect();for(let e of this.disposers)e();this.svg.remove(),this.root.removeAttribute("data-gv-ready")}selection(){let e=this.selected?this.model.node(this.selected)??null:null;return{node:e,neighbours:e?this.model.neighbours(e.id).map((t)=>this.model.node(t)):[]}}measure(){let e=this.surface.getBoundingClientRect();this.size={width:e.width,height:e.height}}layout(e){let t=performance.now();if(this.layoutName==="layered")this.positions=Qt(this.model,{direction:this.direction}).positions;else this.positions=Xt(this.model,{positions:e&&this.positions.size?this.positions:null,pinned:e?this.pinned:null});this.timings.layout=performance.now()-t}relayout(){if(this.pinned.clear(),this.layout(!1),this.sync(),this.moveToPlace(),this.autoFit)this.fit()}render(){let e=performance.now();this.sync(),this.draw(),this.timings.render=performance.now()-e}sync(){let e=Ut(this.model.metrics);for(let[t,s]of this.nodeEls)if(!this.model.has(t))s.remove(),this.nodeEls.delete(t);for(let t of this.model.nodes){let s=this.nodeEls.get(t.id);if(!s)s=this.buildNode(t,e),this.nodeEls.set(t.id,s),this.idOf.set(s,t.id),this.nodeLayer.append(s);let o=this.model.degree(t.id);s.setAttribute("aria-label",`${se(t)}, ${o} ${o===1?"connection":"connections"}`)}for(let[t,s]of this.edgeEls)if(!this.model.edge(t))s.group.remove(),s.label?.remove(),this.edgeEls.delete(t);for(let t of this.model.edges)if(!this.edgeEls.has(t.id))this.edgeEls.set(t.id,this.buildEdge(t));this.offsets=qt(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),o=q("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)o.setAttribute("data-kind",e.kind);if(e.expandable===!0)o.setAttribute("data-expandable","");let n=q("title");n.textContent=e.detail?`${se(e)}: ${e.detail}`:se(e);let a=q("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),r=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,l=q("text",{class:"stx-gv-node-label",x:-r,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(l.textContent=Ee(se(e),t),o.append(n,a,l),e.detail){let c=q("text",{class:"stx-gv-node-detail",x:-r,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=Ee(e.detail,Math.floor(t/0.85)),o.append(c)}if(e.expandable===!0){let c=q("text",{class:"stx-gv-node-mark",x:s.width/2-10,y:0,"text-anchor":"middle","dominant-baseline":"central","aria-hidden":"true"});c.textContent="+",o.append(c)}return o}buildEdge(e){let t=q("g",{class:"stx-gv-edge","data-edge":e.id}),s=q("path",{fill:"none"});if(e.directed!==!1)s.setAttribute("marker-end",`url(#${this.prefix}-arrow)`);t.append(s),this.edgeLayer.append(t);let o=null;if(e.label){let n=Ee(String(e.label),32),a=Math.ceil(n.length*Ea)+8;o=q("g",{class:"stx-gv-edge-label","data-edge":e.id});let r=q("rect",{x:-a/2,y:-8,width:a,height:16,rx:3,ry:3}),l=q("text",{"text-anchor":"middle","dominant-baseline":"central"});l.textContent=n,o.append(r,l),this.labelLayer.append(o)}return{group:t,path:s,label:o}}draw(){for(let[e,t]of this.nodeEls){let s=this.shown.get(e)??this.positions.get(e);if(s)t.setAttribute("transform",`translate(${s.x} ${s.y})`)}for(let e of this.model.edges)this.drawEdge(e)}shape(e){let t=this.shown.get(e.source)??this.positions.get(e.source),s=this.shown.get(e.target)??this.positions.get(e.target);if(!t||!s)return null;return Wt({source:t,sourceSize:this.model.size(e.source),target:s,targetSize:this.model.size(e.target)},{curve:this.layoutName==="layered"?"bezier":"straight",direction:this.direction,offset:this.offsets.get(e.id)??0,inset:e.directed!==!1?1:0})}drawEdge(e){let t=this.edgeEls.get(e.id),s=t&&this.shape(e);if(!t||!s)return;t.path.setAttribute("d",s.d),t.label?.setAttribute("transform",`translate(${Math.round(s.label.x*10)/10} ${Math.round(s.label.y*10)/10})`)}moveToPlace(){this.stop();let e=typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this.animate||e||typeof requestAnimationFrame!=="function"){this.shown=new Map(this.positions),this.draw();return}let t=new Map;for(let[n,a]of this.positions)t.set(n,this.shown.get(n)??a);let s=performance.now(),o=(n)=>{let a=Math.min(1,(n-s)/Ta),r=1-(1-a)**3;for(let[l,c]of this.positions){let i=t.get(l);this.shown.set(l,{x:i.x+(c.x-i.x)*r,y:i.y+(c.y-i.y)*r})}if(this.draw(),this.frame=a<1?requestAnimationFrame(o):0,a>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(o)}stop(){if(this.frame)cancelAnimationFrame(this.frame);this.frame=0}setView(e){this.view=e,this.stage.setAttribute("transform",`translate(${e.x} ${e.y}) scale(${e.k})`),this.callbacks.onViewport?.({...e})}mark(){let e=this.selected,t=new Set(e?this.model.neighbours(e):[]);this.root.toggleAttribute("data-has-selection",Boolean(e));for(let[o,n]of this.nodeEls)if(n.toggleAttribute("data-selected",o===e),n.toggleAttribute("data-neighbour",t.has(o)),o===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let o of this.model.edges){let n=this.edgeEls.get(o.id);if(!n)continue;let a=e!=null&&(o.source===e||o.target===e);if(n.group.toggleAttribute("data-active",a),n.label?.toggleAttribute("data-active",a),o.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${a?"arrow-active":"arrow"})`)}let s=e?this.nodeEls.get(e):null;if(s)this.surface.setAttribute("aria-activedescendant",s.id);else this.surface.removeAttribute("aria-activedescendant")}describe(e){let t=this.model.node(e);if(!t)return;let s=this.model.neighbours(e).map((a)=>se(this.model.node(a))),o=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${se(t)}, no connections`:`${se(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${o}${n}`)}announce(e){if(this.status)this.status.textContent=e}expand(e,t=!1){let s=this.model.node(e);if(!s)return;if(this.lastExpand=performance.now(),t||s.expandable===!1)this.callbacks.onOpen?.({node:s});else this.callbacks.onExpand?.({node:s})}nodeUnder(e){let t=e instanceof Element?e.closest(".stx-gv-node"):null;return t?this.idOf.get(t)??null:null}local(e){let t=this.surface.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}listen(){let e=(s,o,n)=>{this.surface.addEventListener(s,o,n),this.disposers.push(()=>this.surface.removeEventListener(s,o,n))};e("pointerdown",(s)=>this.onPointerDown(s)),e("pointermove",(s)=>this.onPointerMove(s)),e("pointerup",(s)=>this.onPointerUp(s)),e("pointercancel",()=>this.endGesture()),e("dblclick",(s)=>{let o=this.nodeUnder(s.target);if(o&&performance.now()-this.lastExpand>ls)this.expand(o,s.metaKey||s.ctrlKey)}),e("wheel",(s)=>this.onWheel(s),{passive:!1}),e("keydown",(s)=>this.onKeyDown(s)),e("contextmenu",(s)=>{if(this.contextMenu)s.preventDefault();let o=this.nodeUnder(s.target);if(o)this.select(o);this.callbacks.onContext?.({node:o?this.model.node(o):null,x:s.clientX,y:s.clientY})});let t=(s,o)=>{this.surface.addEventListener(s,o),this.disposers.push(()=>this.surface.removeEventListener(s,o))};t("gesturestart",(s)=>{s.preventDefault();let o=this.local(s);this.pinch={k:this.view.k,x:o.x,y:o.y}}),t("gesturechange",(s)=>{if(!this.pinch)return;s.preventDefault(),this.zoomBy(this.pinch.k*s.scale/this.view.k,{x:this.pinch.x,y:this.pinch.y})}),t("gestureend",()=>{this.pinch=null})}onPointerDown(e){if(e.button!==0)return;let t=this.nodeUnder(e.target);this.surface.focus({preventScroll:!0});try{this.surface.setPointerCapture(e.pointerId)}catch{}this.gesture={pointer:e.pointerId,node:t,startX:e.clientX,startY:e.clientY,origin:t?{...this.positions.get(t)??{x:0,y:0}}:{x:0,y:0},view:{...this.view},moved:!1}}onPointerMove(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;let s=e.clientX-t.startX,o=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<is&&Math.abs(o)<is)return;t.moved=!0,this.stop(),this.shown=new Map(this.positions),this.root.setAttribute("data-dragging",t.node?"node":"pan")}if(t.node){let n={x:t.origin.x+s/this.view.k,y:t.origin.y+o/this.view.k};this.positions.set(t.node,n),this.shown.set(t.node,n),this.nodeEls.get(t.node)?.setAttribute("transform",`translate(${n.x} ${n.y})`);for(let a of this.model.edgesOf(t.node))this.drawEdge(a)}else this.autoFit=!1,this.setView(Ae(t.view,s,o))}onPointerUp(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;if(this.endGesture(),t.moved){if(t.node){this.pinned.add(t.node),this.autoFit=!1;let n=this.positions.get(t.node);this.callbacks.onMove?.({node:this.model.node(t.node),x:n.x,y:n.y})}return}if(!t.node){this.select(null);return}let s=performance.now(),o=this.lastClick.id===t.node&&s-this.lastClick.at<ls;if(this.lastClick=o?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),o)this.expand(t.node,e.metaKey||e.ctrlKey)}endGesture(){let e=this.gesture;if(this.gesture=null,this.root.removeAttribute("data-dragging"),e)try{this.surface.releasePointerCapture(e.pointer)}catch{}}onWheel(e){if(e.preventDefault(),e.ctrlKey||e.metaKey){this.zoomBy(Math.exp(-e.deltaY*(e.deltaMode===1?0.05:0.01)),this.local(e));return}let t=e.deltaMode===1?16:1;this.panBy(-e.deltaX*t,-e.deltaY*t)}onKeyDown(e){let s={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"}[e.key];if(s){e.preventDefault();let n=this.selected?as(this.positions,this.selected,s):rs(this.positions,Ue(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let o=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,o)}else if(o||e.altKey);else if(e.key==="+"||e.key==="=")e.preventDefault(),this.zoomIn();else if(e.key==="-"||e.key==="_")e.preventDefault(),this.zoomOut();else if(e.key==="0")e.preventDefault(),this.fit();else if(e.key==="f"||e.key==="F"){if(!this.selected)return;e.preventDefault(),this.focusNode(this.selected)}else if(e.key==="o"||e.key==="O"){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,!0)}else if(e.key==="Escape"&&this.selected)e.preventDefault(),this.select(null)}bringIntoView(e){let t=this.positions.get(e);if(!t)return;let s=this.model.size(e),o=ns(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(o!==this.view)this.autoFit=!1,this.setView(o)}}var Ma="./GroupedList-j3sxv5pb.stx";var La="./GroupedListRow-v52zmzpk.stx";var Oa="./Image-6x38ddd7.stx";var za="./EmailInput-sf9jfrgz.stx";var Ha="./NumberInput-axcfj9y8.stx";var Fa="./PasswordInput-8m3109tp.stx";var _a="./SearchInput-w15r5t95.stx";var qa="./TextInput-tsvfwxmg.stx";var Ka={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string},Ga={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,leftIcon:f.string,rightIcon:f.string,clearable:f.boolean,maxLength:f.number,showCount:f.boolean,type:f.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:f.string,list:f.string,minLength:f.number,htmlSize:f.number,autofocus:f.boolean},Ua={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,min:f.number,max:f.number,step:f.number,showControls:f.boolean},Ja={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,showStrength:f.boolean},Ya={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,onSearch:f.func,loading:f.boolean},af=ee("TextInput",Ga),rf=ee("EmailInput",Ka),lf=ee("PasswordInput",Ja),cf=ee("NumberInput",Ua),df=ee("SearchInput",Ya);var Xa=new Set(["array","set"]),Za=/^[A-Z_$][\w$]*$/i;function Xe(e){return Xa.has(e.kind)}function Je(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Ze(e,t="$"){let s=t;for(let o of e)if(typeof o==="number")s+=`[${o}]`;else if(Za.test(o))s+=`.${o}`;else s+=`[${JSON.stringify(o)}]`;return s}function Ye(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Xe(e))return e.children.map((s)=>Ye(s));let t={};return e.children.forEach((s,o)=>{t[s.key!==void 0?String(s.key):s.label??String(o)]=Ye(s)}),t}if("value"in e){let t=e.value;if(typeof t==="bigint")return t.toString();if(typeof t==="number"&&!Number.isFinite(t))return String(t);if(typeof t==="function"||typeof t==="symbol")return e.preview??String(t);return t}return e.preview??null}function ds(e,t=2){let s=Ye(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var cs=80;function Qe(e){if(e.preview!==void 0)return e.preview;if(e.ref!==void 0)return"[Circular]";if(e.children||e.more){let t=(e.children?.length??0)+(e.more??0);if(Xe(e))return`${e.kind==="set"?"Set":"Array"}(${t})`;return t===0?"{}":`{${t}}`}if("value"in e){let t=e.value;if(typeof t==="string")return JSON.stringify(t.length>cs?`${t.slice(0,cs)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function bf(e,t,s={}){let o=s.maxItems??1000,n=s.maxDepth??32,a=new Map,r=1,l=(i,d)=>{if(d!==void 0)i.label=d;return i},c=(i,d,u)=>{if(i===null)return l({kind:"null",value:null,preview:"null"},d);switch(typeof i){case"undefined":return l({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return l({kind:typeof i,value:i},d);case"symbol":return l({kind:"symbol",preview:i.toString()},d);case"function":return l({kind:"function",preview:`\u0192 ${i.name||"(anonymous)"}()`},d)}let p=i,h=a.get(p);if(h!==void 0)return l({kind:"ref",ref:h},d);if(p instanceof Date)return l({kind:"date",value:Number.isNaN(p.getTime())?null:p.toISOString(),preview:Number.isNaN(p.getTime())?"Invalid Date":p.toISOString()},d);if(p instanceof RegExp)return l({kind:"regexp",value:p.toString(),preview:p.toString()},d);let g=`v${r++}`;a.set(p,g);let m=Array.isArray(p),w=p instanceof Set,y=p instanceof Map,v=l({id:g,kind:m?"array":w?"set":y?"map":"object",children:[]},d);if(u>=n)return v.preview=m?"Array":"Object",delete v.children,v;let x=v.children,S=0;if(m||w)for(let P of p){if(S<o)x.push(c(P,String(S),u+1));S++}else if(y)for(let[P,T]of p){if(S<o)x.push(c(T,typeof P==="string"?P:Qe(c(P,void 0,n)),u+1));S++}else{for(let T of Object.keys(p)){if(S<o)x.push(c(p[T],T,u+1));S++}let P=p.constructor?.name;if(P&&P!=="Object")v.preview=`${P} {${S}}`}if(S>x.length)v.more=S-x.length;if(y)v.preview=`Map(${S})`;return v};return c(e,t,0)}class et{rows=[];version=0;roots=[];depth;opened=new Set;closed=new Set;index=null;constructor(e,t={}){this.depth=t.depth??1,this.setValue(e)}setValue(e){this.roots=e==null?[]:Array.isArray(e)?e:[e],this.opened.clear(),this.closed.clear(),this.flatten()}setDepth(e){this.depth=e,this.opened.clear(),this.closed.clear(),this.flatten()}getRoots(){return this.roots}indexOf(e){if(!this.index){this.index=new Map;for(let t=0;t<this.rows.length;t++)this.index.set(this.rows[t].id,t)}return this.index.get(e)??-1}pathOf(e){let t=[];for(let s=e;s>=0;s=this.rows[s].parent){let o=this.rows[s];if(o.isMore)continue;if(o.parent!==-1||this.roots.length>1)t.push(o.key)}return t.reverse()}isExpanded(e,t){return this.opened.has(e)||t<this.depth&&!this.closed.has(e)}expand(e){return this.set(e,!0)}collapse(e){return this.set(e,!1)}toggle(e){let t=this.indexOf(e);if(t===-1)return!1;return this.set(e,!this.rows[t].expanded)}expandAll(e){let t=(s,o,n)=>{if(!Je(s))return;if(n>=this.depth)this.opened.add(o);this.closed.delete(o),s.children?.forEach((a,r)=>t(a,a.id??`${o}.${r}`,n+1))};if(e===void 0)this.roots.forEach((s,o)=>t(s,s.id??String(o),0));else{let s=this.find(e);if(!s)return;t(s.node,e,s.ancestors.length)}this.flatten()}collapseAll(){this.opened.clear(),this.closed.clear();let e=(t,s,o)=>{if(o>=this.depth||!Je(t))return;this.closed.add(s),t.children?.forEach((n,a)=>e(n,n.id??`${s}.${a}`,o+1))};this.roots.forEach((t,s)=>e(t,t.id??String(s),0)),this.flatten()}reveal(e){let t=this.find(e);if(!t)return-1;return t.ancestors.forEach((s,o)=>{if(this.closed.delete(s),o>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let o=this.find(e);if(!o)return!1;let n=o.node;if(n.children=[...n.children??[],...t],s>0)n.more=s;else delete n.more;return this.flatten(),!0}move(e,t,s=10){let o=this.rows.length-1;if(o<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),o),a=this.rows[n],r=(l)=>({index:Math.min(Math.max(l,0),o),changed:!1});switch(t){case"ArrowDown":return r(e<0?0:n+1);case"ArrowUp":return r(n-1);case"Home":return r(0);case"End":return r(o);case"PageDown":return r(n+s);case"PageUp":return r(n-s);case"ArrowRight":if(!a.expandable||a.isMore)return r(n);if(!a.expanded)return{index:n,changed:this.expand(a.id)};return r(n+1);case"ArrowLeft":if(a.expanded&&!a.isMore)return{index:n,changed:this.collapse(a.id)};return r(a.parent===-1?n:a.parent);case"*":{let l=!1,c=a.parent,i=this.rows.filter((d)=>d.parent===c&&d.depth===a.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of i)this.mark(d.id,d.depth,!0),l=!0;if(l)this.flatten();return{index:this.indexOf(a.id),changed:l}}}return r(n)}typeahead(e,t){let s=t.toLowerCase(),o=this.rows.length;if(s===""||o===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let a=0;a<o;a++){let r=(n+a+o)%o,l=this.rows[r];if(!l.isMore&&(l.node.label??"").toLowerCase().startsWith(s))return r}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let o=this.rows[s];if(!o.expandable||o.isMore||o.expanded===t)return!1;return this.mark(e,o.depth,t),this.flatten(),!0}mark(e,t,s){if(s){if(this.closed.delete(e),t>=this.depth)this.opened.add(e)}else if(this.opened.delete(e),t<this.depth)this.closed.add(e)}find(e){let t=[];for(let s=this.roots.length-1;s>=0;s--)t.push({node:this.roots[s],id:this.roots[s].id??String(s),ancestors:[]});while(t.length>0){let s=t.pop();if(s.id===e)return{node:s.node,ancestors:s.ancestors};let o=s.node.children;if(!o||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let a=o.length-1;a>=0;a--)t.push({node:o[a],id:o[a].id??`${s.id}.${a}`,ancestors:n})}return null}flatten(){let e=[],t=(s,o,n,a,r,l,c)=>{let i=Je(s),d=i&&this.isExpanded(o,n),u=e.length;if(e.push({id:o,node:s,depth:n,key:r,parent:a,expandable:i,expanded:d,posInSet:l,setSize:c,isMore:!1}),!d)return;let p=s.children??[],h=s.more??0,g=Xe(s),m=p.length+(h>0?1:0);for(let w=0;w<p.length;w++){let y=p[w];t(y,y.id??`${o}.${w}`,n+1,u,y.key??(g?w:y.label??w),w+1,m)}if(h>0)e.push({id:`${o}.+`,node:s,depth:n+1,key:"",parent:u,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,o)=>t(s,s.id??String(o),0,-1,s.key??o,o+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var er="./JsonTree-satc4010.stx";var hs=new Set(["array","object","map","set","model","error"]);function tr(e){return e.t==="object"||e.t==="model"}function ps(e){return e.length>0&&e.slice(0,20).every(tr)}function us(e){return e.some((t)=>hs.has(t.t))}function tt(e,t){let s=e.length>120?`${e.slice(0,120)}\u2026`:e;return t?`${JSON.stringify(s)} (${t} more characters)`:JSON.stringify(s)}function sr(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function wf(e,t,s={}){let o=s.idPrefix??"t",n=(i)=>`${o}${i}`,a=(i,d)=>{if(d!==void 0)i.label=d;return i},r=(i)=>c(i,void 0).preview??i.t,l=(i,d)=>{if(d.length>0)i.openable=d.length===1?d[0]:d;return i};function c(i,d){switch(i.t){case"undefined":return a({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return a({kind:"null",value:null,preview:"null"},d);case"boolean":return a({kind:"boolean",value:i.v,preview:String(i.v)},d);case"number":{let u=typeof i.v==="number"?i.v:i.v==="-0"?-0:Number(i.v);return a({kind:"number",value:u,preview:String(i.v)},d)}case"bigint":return a({kind:"bigint",value:i.v,preview:`${i.v}n`},d);case"string":return a({kind:"string",value:i.v,preview:tt(i.v,i.truncated)},d);case"symbol":return a({kind:"symbol",preview:`Symbol(${i.v})`},d);case"function":{let u=i.kind==="class"?`class ${i.name}`:`${i.kind==="async"?"async ":""}\u0192${i.kind==="generator"?"*":""} ${i.name}()`;return a({kind:"function",preview:u},d)}case"date":return a({kind:"date",value:i.v,preview:i.v??"Invalid Date"},d);case"regexp":return a({kind:"regexp",value:i.v,preview:i.v},d);case"url":return a({kind:"url",value:i.v,preview:i.v},d);case"promise":return a({kind:"promise",preview:"Promise"},d);case"bytes":{let u=i.length*2>i.hex.length;return a({kind:"bytes",value:i.hex,preview:`${i.ctor}(${i.length}) <${i.hex}${u?"\u2026":""}>`},d)}case"ref":return a({kind:"ref",ref:n(i.id),preview:"[Circular]"},d);case"cut":return a({kind:"cut",preview:`${i.ctor??"Object"} \u2026 (${i.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let u={id:n(i.id),kind:"array",preview:`${i.ctor??"Array"}(${i.length})`,children:i.items.map((p,h)=>c(p,String(h)))};if(i.more)u.more=i.more;return a(l(u,ps(i.items)?["table"]:[]),d)}case"set":{let u={id:n(i.id),kind:"set",preview:`Set(${i.size})`,children:i.items.map((p,h)=>c(p,String(h)))};if(i.more)u.more=i.more;return a(l(u,ps(i.items)?["table"]:[]),d)}case"object":{let u=i.entries.slice(0,5).map(([m])=>m).join(", "),p=i.entries.length+(i.more??0),h=p===0?"{}":`{${u}${p>5?", \u2026":""}}`,g={id:n(i.id),kind:"object",preview:i.ctor&&i.ctor!=="Object"?`${i.ctor} ${h}`:h,children:i.entries.map(([m,w])=>c(w,m))};if(i.more)g.more=i.more;return a(l(g,us(i.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let u={id:n(i.id),kind:"map",preview:`Map(${i.size})`,children:i.entries.map(([p,h],g)=>{if(!hs.has(p.t)){let m=c(h,r(p));return m.key=p.t==="string"?p.v:r(p),m}return{kind:"entry",label:String(g),key:g,preview:`${r(p)} => ${r(h)}`,children:[c(p,"key"),c(h,"value")]}})};if(i.more)u.more=i.more;return a(l(u,us(i.entries.map((p)=>p[1]))?["graph"]:[]),d)}case"model":{let u=i.attributes.map(([g,m])=>c(m,g));for(let[g,m]of i.loaded??[]){let w=c(m,g);w.meta=w.meta??{relation:!0},u.push(w)}if(i.hidden?.length)u.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:i.hidden.join(", "),children:i.hidden.map((g,m)=>({kind:"hidden",label:String(m),value:g,preview:g}))});if(i.relations?.length)u.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${i.relations.length} declared`,children:i.relations.map((g)=>({kind:"relation",label:g.name??g.model,value:g,preview:`${g.kind} ${g.model}`}))});let p={model:i.model,hidden:i.hidden??[],relations:i.relations??[]};if(i.table)p.table=i.table;if(i.primaryKey)p.primaryKey=i.primaryKey;let h={id:n(i.id),kind:"model",preview:i.key?`${i.model} #${r(i.key).replace(/^"|"$/g,"")}`:i.model,children:u,meta:p};if(i.more)h.more=i.more;return a(l(h,["graph"]),d)}case"html":{let u={kind:i.kind};if(i.title)u.title=i.title;if(i.text)u.text=i.text;if(i.truncated)u.truncated=i.truncated;let p=i.truncated?`, ${i.truncated} more cut`:"",h=i.title?`: ${i.title}`:"";return a(l({kind:"html",value:i.html,preview:`${i.kind}${h} (${i.html.length} characters${p})`,meta:u},["preview"]),d)}case"error":{let u=[{kind:"string",label:"message",value:i.message,preview:tt(i.message)}];if(i.frames?.length)u.push({kind:"stack",label:"stack",preview:`${i.frames.length} frames`,value:i.stack,children:i.frames.map((p,h)=>({kind:"frame",label:String(h),value:p,preview:[p.function,sr(p)].filter(Boolean).join(" at ")||"(unknown)",meta:p}))});else if(i.stack)u.push({kind:"string",label:"stack",value:i.stack,preview:tt(i.stack)});if(i.cause)u.push(c(i.cause,"cause"));for(let[p,h]of i.entries??[])u.push(c(h,p));return a({kind:"error",preview:i.message?`${i.name}: ${i.message}`:i.name,children:u},d)}}return a({kind:"unknown",preview:String(i.t??"unknown")},d)}return c(e,t)}var or=600,fs=400,ms={table:"Table",graph:"Graph",preview:"Preview"};function gs(e){return e.length>fs?`${e.slice(0,fs)}\u2026`:e}function bs(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class nr{root;callbacks;model;scroller;content;rowsEl;status;prefix;rowHeight;overscan;openable;contextMenu;pool=[];parts=new WeakMap;active=-1;activeId="";typed="";typedAt=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let o=(a)=>e.querySelector(`[data-jt="${a}"]`);this.scroller=o("scroller")??e,this.content=o("content")??this.scroller,this.rowsEl=o("rows")??this.content,this.status=o("status"),this.prefix=`${e.id||`json-tree-${Math.random().toString(36).slice(2,8)}`}-row-`,this.rowHeight=t.rowHeight&&t.rowHeight>0?t.rowHeight:22,this.overscan=t.overscan??6,this.openable=t.openable??null,this.contextMenu=Boolean(t.contextMenu),this.model=new et(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(a,r,l,c)=>{a.addEventListener(r,l,c),this.disposers.push(()=>a.removeEventListener(r,l,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(a)=>this.onKeyDown(a)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(a)=>{if(a.target.closest("[data-jt-action]"))a.preventDefault()}),n(this.rowsEl,"click",(a)=>this.onClick(a)),n(this.rowsEl,"dblclick",(a)=>this.onDoubleClick(a)),n(this.rowsEl,"contextmenu",(a)=>this.onContextMenu(a)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.render(),e.setAttribute("data-jt-ready","")}setValue(e){this.model.setValue(e),this.active=-1,this.activeId="",this.scroller.scrollTop=0,this.render()}setDepth(e){this.model.setDepth(e),this.afterChange()}setOpenable(e){this.openable=e??null,this.model.version++,this.render()}setContextMenu(e){this.contextMenu=e}expandAll(e){this.model.expandAll(e),this.afterChange()}collapseAll(){this.model.collapseAll(),this.afterChange()}expand(e){let t=this.model.expand(e);if(t)this.afterChange();return t}collapse(e){let t=this.model.collapse(e);if(t)this.afterChange();return t}reveal(e){let t=this.model.reveal(e);if(t===-1)return this.afterChange(),!1;return this.active=t,this.activeId=e,this.scrollToRow(t),this.render(),this.emitSelect(),!0}appendChildren(e,t,s=0){let o=this.model.appendChildren(e,t,s);if(o)this.afterChange();return o}getSelected(){return this.active===-1?null:this.detail(this.active)}select(e){let t=this.model.indexOf(e);if(t===-1)return!1;return this.setActive(t,!0),!0}focus(){this.scroller.focus()}get drawn(){return this.pool.filter((e)=>e.style.display!=="none").length}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();this.rowsEl.textContent="",this.pool=[],this.root.removeAttribute("data-jt-ready")}afterChange(){if(this.activeId){let e=this.model.indexOf(this.activeId);if(this.active=e,e===-1)this.activeId=""}this.render()}detail(e){let t=this.model.rows[e],s=this.model.pathOf(e);return{id:t.id,node:t.node,path:s,pathText:Ze(s)}}emitSelect(){if(this.active!==-1)this.callbacks.onSelect?.(this.detail(this.active))}setActive(e,t){if(e<0||e>=this.model.rows.length)return;let s=e!==this.active;if(this.active=e,this.activeId=this.model.rows[e].id,t)this.scrollToRow(e);if(this.render(),s)this.emitSelect()}scrollToRow(e){let t=e*this.rowHeight,s=this.scroller.clientHeight;if(t<this.scroller.scrollTop)this.scroller.scrollTop=t;else if(t+this.rowHeight>this.scroller.scrollTop+s)this.scroller.scrollTop=t+this.rowHeight-s}pageSize(){return Math.max(1,Math.floor(this.scroller.clientHeight/this.rowHeight)-1)}createRow(){let e=document.createElement("div");e.setAttribute("role","treeitem"),e.className="stx-jt-row";let t=(o,n)=>{let a=document.createElement("span");if(a.className=o,n)a.setAttribute("aria-hidden","true");return e.appendChild(a),a},s={twisty:t("stx-jt-twisty",!0),label:t("stx-jt-label",!1),separator:t("stx-jt-separator",!0),preview:t("stx-jt-preview",!1),actions:t("stx-jt-actions",!1)};return s.separator.textContent=": ",this.parts.set(e,s),this.rowsEl.appendChild(e),e}button(e,t,s,o){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),o)n.setAttribute("data-jt-as",o);return n.setAttribute("aria-label",s),n.textContent=t,n}opensOf(e,t){if(e.isMore)return[];if(this.openable){let s=this.openable(e.node,this.model.pathOf(t));if(s!==void 0)return bs(s)}return bs(e.node.openable)}render(){let e=this.model.rows,t=e.length,s=this.scroller.clientHeight;this.content.style.height=`${t*this.rowHeight}px`;let o=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(o/this.rowHeight)-this.overscan),a=Math.min(t,Math.ceil((o+s)/this.rowHeight)+this.overscan),r=Math.max(0,a-n);while(this.pool.length<r)this.pool.push(this.createRow());let l=this.pool.length,c=new Uint8Array(l);for(let d=n;d<a;d++){let u=d%l;c[u]=1,this.paint(this.pool[u],e[d],d)}for(let d=0;d<l;d++)if(!c[d]&&this.pool[d].style.display!=="none")this.pool[d].style.display="none",this.pool[d].__jt=void 0,this.pool[d].removeAttribute("id");if(this.active>=n&&this.active<a)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let o=this.model.version,n=s===this.active,a=e.__jt;if(!a||a.index!==s||a.version!==o){let r=this.parts.get(e),l=t.node;if(e.style.display="",e.style.transform=`translateY(${s*this.rowHeight}px)`,e.style.setProperty("--stx-tree-depth",String(t.depth)),e.id=this.prefix+s,e.setAttribute("data-jt-index",String(s)),e.setAttribute("aria-level",String(t.depth+1)),e.setAttribute("aria-posinset",String(t.posInSet)),e.setAttribute("aria-setsize",String(t.setSize)),t.expandable)e.setAttribute("aria-expanded",t.expanded?"true":"false");else e.removeAttribute("aria-expanded");if(t.isMore)e.setAttribute("data-kind","more"),r.twisty.textContent="",r.label.textContent="",r.separator.style.display="none",r.preview.textContent=`\u2026 ${l.more} more`,r.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",l.kind),r.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=l.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");r.label.textContent=gs(d),r.separator.style.display=d===""?"none":"",r.preview.textContent=gs(Qe(l)),r.preview.setAttribute("data-kind",l.kind)}let c=this.opensOf(t,s),i=t.isMore?"+":c.join("|");if(!a||a.opens!==i)if(r.actions.textContent="",t.isMore)r.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)r.actions.appendChild(this.button("open",ms[d]??d,`Open as ${ms[d]?.toLowerCase()??d}`,d));r.actions.appendChild(this.button("copy-value","Copy","Copy value")),r.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:o,opens:i}}if(n)e.setAttribute("aria-selected","true"),e.setAttribute("data-active","");else e.setAttribute("aria-selected","false"),e.removeAttribute("data-active")}rowIndexOf(e){let t=e instanceof Element?e.closest("[data-jt-index]"):null;if(!t||t.style.display==="none")return-1;return Number(t.getAttribute("data-jt-index"))}say(e){if(this.status)this.status.textContent=e}toggleRow(e){let t=this.model.rows[e];if(!t)return;if(t.isMore){this.loadMore(e);return}if(t.node.ref!==void 0){this.follow(e);return}if(!t.expandable)return;let s=t.id;this.model.toggle(s),this.afterChange();let o=this.model.indexOf(s);if(o!==-1)this.callbacks.onToggle?.({...this.detail(o),expanded:this.model.rows[o].expanded})}follow(e){let t=this.model.rows[e].node.ref;if(t===void 0)return;if(!this.reveal(t))this.say("The value this points back to is not part of what was sent.")}loadMore(e){let s=this.model.rows[e].parent;if(s===-1)return;this.callbacks.onLoadMore?.(this.detail(s))}copy(e,t){let s=this.model.rows[e];if(!s)return;let o=s.isMore?s.parent:e,n=this.model.pathOf(o),a=this.model.rows[o].node,r=t==="path"?Ze(n):ds(a);try{navigator.clipboard?.writeText(r)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${r}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:r,path:n,node:a})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let o=t??this.opensOf(s,e)[0];if(o===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:o})}onClick(e){let t=this.rowIndexOf(e.target);if(t===-1)return;let s=e.target instanceof Element?e.target.closest("[data-jt-action]"):null;if(this.setActive(t,!1),s){let n=s.getAttribute("data-jt-action");if(n==="copy-value")this.copy(t,"value");else if(n==="copy-path")this.copy(t,"path");else if(n==="open")this.open(t,s.getAttribute("data-jt-as")??void 0);else if(n==="more")this.loadMore(t);return}let o=this.model.rows[t];if(o.expandable||o.isMore||o.node.ref!==void 0)this.toggleRow(t)}onDoubleClick(e){let t=this.rowIndexOf(e.target);if(t===-1||e.target instanceof Element&&e.target.closest("[data-jt-action]"))return;let s=this.model.rows[t];if(!s.expandable&&!s.isMore&&s.node.ref===void 0)this.open(t)}onContextMenu(e){let t=this.rowIndexOf(e.target);if(t===-1)return;if(this.setActive(t,!1),this.contextMenu)e.preventDefault();this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onKeyDown(e){let t=this.model.rows;if(t.length===0)return;let s=e.metaKey||e.ctrlKey,o=e.key;if(s&&(o==="c"||o==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(o==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=or;if(o==="Enter"||o===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(o==="ArrowDown"||o==="ArrowUp"||o==="ArrowLeft"||o==="ArrowRight"||o==="Home"||o==="End"||o==="PageDown"||o==="PageUp"||o==="*"){e.preventDefault(),this.typed="";let a=this.active===-1?null:t[this.active],r=a?.expanded,l=this.model.move(this.active,o,this.pageSize());if(l.changed){if(this.active=l.index,this.activeId=this.model.rows[l.index]?.id??"",this.scrollToRow(l.index),this.render(),a&&o!=="*"){let c=this.model.indexOf(a.id);if(c!==-1&&this.model.rows[c].expanded!==r)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(l.index,!0);return}if(o.length===1){let a=Date.now();if(!n)this.typed="";this.typedAt=a,this.typed+=o;let r=this.model.typeahead(this.active,this.typed);if(r!==-1)e.preventDefault(),this.setActive(r,!0)}}}var rr="./List-q8ff8gdr.stx";var lr="./Listbox-83j2q4x6.stx";var dr="./ListboxButton-gan8e3nw.stx";var ur="./ListboxLabel-ka0hfm7b.stx";var fr="./ListboxOption-gpaqvk3s.stx";var gr="./ListboxOptions-2928864k.stx";var xr="./FilterChip-bynt5maa.stx";var wr="./FilterChips-mpmev5v5.stx";var kr="./ListRow-nvyg2fwb.stx";var Sr="./NavBar-ky8tedjb.stx";var Tr="./SectionCard-8b5fyrjd.stx";var Ir="./TabBar-6m1ajm1d.stx";var Pr="./TabBarItem-kddfnhk3.stx";var Rr="./Navigator-1yk1c3pp.stx";var Nr="./Notification-b3cz24f0.stx";var Dr="./Pager-5e7knyqh.stx";var jr="./PagerDots-076w890y.stx";var Vr="./Pagination-8bhbkpcp.stx";var Br="./Checkout-crbegxyv.stx";var Wr="./DefaultPaymentMethod-ss3x61tr.stx";var Kr="./PaymentMethods-z4hhr0kv.stx";var Ur="./SubscriptionCheckout-rdcv32n1.stx";var Yr="./Popover-jjt7p7sn.stx";var Zr="./PopoverButton-ks3cttd9.stx";var ei="./PopoverPanel-ddgj4gz3.stx";var si="./Portal-m73vz879.stx";var ys=[{name:"phone",label:"Phone",width:390,height:844},{name:"tablet",label:"Tablet",width:820,height:1180},{name:"desktop",label:"Desktop",width:1280,height:800}];function xs(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function st(e,t={}){let s=xs(t.width),o=xs(t.height),n=Boolean(t.landscape);if(s&&o)return{name:"custom",size:{width:s,height:o},landscape:!1};let a=ys.find((l)=>l.name===e);if(!a)return{name:"fill",size:null,landscape:!1};let r=n&&a.height>a.width;return{name:a.name,size:r?{width:a.height,height:a.width}:{width:a.width,height:a.height},landscape:r}}function ks(e,t,s=0){let o=t.width-s*2,n=t.height-s*2;if(o<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,o/e.width,n/e.height)}function Cs(e,t=1){if(!e.size)return"Fills the frame";let s=`${e.size.width} \xD7 ${e.size.height}`;return t<0.995?`${s} at ${Math.round(t*100)}%`:s}function ot(e){return e==="light"||e==="dark"?e:"auto"}var oi=["allow-same-origin","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols","allow-popups","allow-popups-to-escape-sandbox","allow-modals","allow-downloads","allow-pointer-lock","allow-presentation","allow-storage-access-by-user-activation"];function Ss(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function zm(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>oi.includes(s))}var ni=/<!doctype\s|<html[\s>]/i,vs=/<head(?:\s[^>]*)?>/i,ws=/<html(?:\s[^>]*)?>/i,ai=/<base[\s>]/i,ri=/<meta[^>]+name\s*=\s*["']?color-scheme/i;function ii(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function $s(e,t={}){let s=e==null?"":String(e),o='<base target="_blank">';if(!ni.test(s))return`<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><base target="_blank">${t.title?`<title>${ii(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(ai.test(s))return s;if(vs.test(s))return s.replace(vs,(n)=>n+'<base target="_blank">');if(ws.test(s))return s.replace(ws,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function jm(e){return ri.test(e)}function Ts(e,t){let s=["fill",...ys.map((n)=>n.name)],o=s.indexOf(e);return s[((o<0?0:o)+t+s.length)%s.length]}var ci="./PreviewFrame-erbgvzj8.stx";var di=16;class pi{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;stage;device;observer=null;pending=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;this.html=t.html??"",this.viewportName=t.viewport||"fill",this.frameWidth=t.frameWidth??null,this.frameHeight=t.frameHeight??null,this.landscape=Boolean(t.landscape),this.scheme=ot(t.scheme),this.scripts=Boolean(t.scripts),this.forms=Boolean(t.forms),this.title=t.title||"Preview",this.viewport=this.resolve(),this.stage=this.part("stage"),this.device=this.part("device");let o=(a)=>this.onToolbarClick(a),n=(a)=>this.onToolbarKey(a);if(this.root.addEventListener("click",o),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",o),()=>this.root.removeEventListener("keydown",n)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{cancelAnimationFrame(this.pending),this.pending=requestAnimationFrame(()=>this.layout())}),this.observer.observe(this.stage);this.load(),this.reflect(),this.root.setAttribute("data-preview-ready","")}getState(){return{viewport:this.viewport.name,width:this.viewport.size?.width??null,height:this.viewport.size?.height??null,landscape:this.viewport.landscape,scale:this.scale,scheme:this.scheme,effectiveScheme:this.effectiveScheme()}}setHtml(e){let t=e==null?"":String(e);if(t===this.html)return;this.html=t,this.load()}setViewport(e,t={}){if(this.viewportName=e||"fill","landscape"in t)this.landscape=Boolean(t.landscape);if("width"in t)this.frameWidth=t.width??null;if("height"in t)this.frameHeight=t.height??null;let s=JSON.stringify(this.viewport);if(this.viewport=this.resolve(),this.layout(),this.reflect(),JSON.stringify(this.viewport)!==s)this.callbacks.onViewport?.(this.getState())}setScheme(e){let t=ot(e);if(t===this.scheme)return;this.scheme=t,this.applyScheme(),this.reflect(),this.callbacks.onScheme?.(this.getState())}setPermissions(e){let t=e.scripts??this.scripts,s=e.forms??this.forms;if(t===this.scripts&&s===this.forms)return;this.scripts=t,this.forms=s,this.load()}reload(){this.load(),this.callbacks.onReload?.(this.getState())}destroy(){this.observer?.disconnect(),cancelAnimationFrame(this.pending);for(let e of this.disposers)e();this.frame?.remove(),this.frame=null,this.root.removeAttribute("data-preview-ready")}part(e){let t=this.root.querySelector(`[data-pf="${e}"]`);if(!t)throw Error(`PreviewFrame: the template has no ${e} part`);return t}resolve(){return st(this.viewportName,{width:this.frameWidth,height:this.frameHeight,landscape:this.landscape})}effectiveScheme(){if(this.scheme!=="auto")return this.scheme;if(this.root.closest(".dark"))return"dark";if(this.root.closest(".light"))return"light";return typeof matchMedia==="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",Ss({scripts:this.scripts,forms:this.forms})),e.setAttribute("referrerpolicy","no-referrer"),e.setAttribute("title",this.title),e.setAttribute("data-pf","frame"),e.className="stx-preview-frame",e.addEventListener("load",()=>{if(e===this.frame)this.callbacks.onLoad?.(this.getState())}),e.srcdoc=$s(this.html,{title:this.title}),this.frame?.remove(),this.frame=e,this.applyScheme(),this.device.appendChild(e),this.layout()}applyScheme(){let e=this.effectiveScheme();if(this.root.setAttribute("data-scheme",e),this.frame)this.frame.style.colorScheme=e}layout(){let e=this.frame;if(!e)return;let t=this.viewport.size;if(this.root.setAttribute("data-viewport",this.viewport.name),!t)this.scale=1,this.device.style.width="",this.device.style.height="",e.style.width="",e.style.height="",e.style.transform="";else{let o=this.stage.getBoundingClientRect();this.scale=ks(t,{width:o.width,height:o.height},di),this.device.style.width=`${t.width*this.scale}px`,this.device.style.height=`${t.height*this.scale}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=this.scale===1?"":`scale(${this.scale})`}let s=this.root.querySelector('[data-pf="size"]');if(s)s.textContent=Cs(this.viewport,this.scale)}reflect(){for(let o of this.root.querySelectorAll("[data-pf-viewport]")){let n=o.getAttribute("data-pf-viewport")===this.viewport.name;o.setAttribute("aria-checked",String(n)),o.tabIndex=n?0:-1}if(!this.root.querySelector('[data-pf-viewport][tabindex="0"]'))this.root.querySelector("[data-pf-viewport]")?.setAttribute("tabindex","0");let e=this.effectiveScheme()==="dark",t=this.root.querySelector('[data-pf-action="scheme"]');if(t){t.setAttribute("aria-pressed",String(e));let o=t.querySelector('[data-pf="scheme-text"]');if(o)o.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let o=st(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!o||this.viewport.name==="custom"||o.height<=o.width,s.setAttribute("aria-pressed",String(this.viewport.landscape))}}onToolbarClick(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport], [data-pf-action]"):null;if(!t||!this.root.contains(t))return;let s=t.getAttribute("data-pf-viewport");if(s){this.setViewport(s,{width:null,height:null});return}switch(t.getAttribute("data-pf-action")){case"scheme":this.setScheme(this.effectiveScheme()==="dark"?"light":"dark");break;case"rotate":this.setViewport(this.viewportName,{landscape:!this.landscape});break;case"reload":this.reload();break}}onToolbarKey(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport]"):null;if(!t)return;let s=e.key==="ArrowRight"||e.key==="ArrowDown"?1:e.key==="ArrowLeft"||e.key==="ArrowUp"?-1:0;if(s===0)return;e.preventDefault();let o=t.getAttribute("data-pf-viewport")||"fill",n=Ts(o,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var hi="./Progress-2qzb77kc.stx";var mi="./Radio-8153x74w.stx";var bi="./RadioGroup-smqcqgds.stx";var vi="./RadioGroupDescription-z34r9avr.stx";var yi="./RadioGroupLabel-ka0hfm7b.stx";var Ci="./RadioGroupOption-twcw1b2a.stx";var $i="./SegmentedControl-fr69q4gb.stx";var Ei="./Select-1cnqbcmg.stx";var Ai="./Sidebar-8dygywjv.stx";var Mi="./SidebarFooter-s7skj92y.stx";var Li="./SidebarHeader-x7jdhmyr.stx";var Oi="./SidebarItem-64sjb2fe.stx";var zi="./SidebarPinned-48kyk193.stx";var Hi="./SidebarSection-vx5bahsk.stx";var Fi="./SidebarSpace-bwv98azf.stx";var _i="./SidebarSpaces-mdtrynr2.stx";var qi="./SidebarSpaceSwitcher-1mycft2g.stx";var Pe={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},ie={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ki={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Gi={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ui={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Ji={...ie,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Yi={...ie,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Xi={...ie,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Es={macos:ie,tahoe:ie,"macos-tahoe":ie,"macos-latest":ie,arc:Ui,workspace:Ki,desktop:Gi,solid:Ji,transparent:Yi,vibrancy:Xi};function Cg(e){return Es[e||"macos"]||Es.macos}function Sg(e){if(!e)return;return Pe[e]||e}var Zi=Pe.gray;function ae(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Is(e){return{light:{from:ae(e,35,"#ffffff"),to:ae(e,12.5,"#ffffff"),ink:ae(e,22,"#17171b"),accent:ae(e,88,"#2a2a30")},dark:{from:ae(e,27,"#101014"),to:ae(e,10,"#08080b"),ink:ae(e,12,"#f4f4f7"),accent:ae(e,74,"#ffffff")}}}function Eg(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qi(e){if(!e)return Is(Zi);if(typeof e!=="string")return e;return Is(Pe[e]||e)}function el(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function As(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function tl(e){let t=Qi(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:As(e.action,e.id,"action","i-f7-plus"),clear:As(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:el(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function Ig(e){return(e||[]).map(tl)}function Ag(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Pg(e){return e.map((t)=>t.tint)}var ol="./Skeleton-m4p66zcs.stx";var al="./Spinner-vhnc3y03.stx";function rl(e){return Array.from({length:e},()=>1/e)}function Me(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((o)=>typeof o!=="number"||!Number.isFinite(o)||o<=0))return rl(t);let s=e.reduce((o,n)=>o+n,0);return e.map((o)=>o/s)}function Ps(e){let t=e;if(typeof e==="string"){let o=e.trim();if(o==="")return null;if(o.charAt(0)==="[")try{t=JSON.parse(o)}catch{return null}else t=o.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((o)=>typeof o==="string"?Number.parseFloat(o):o);return s.every((o)=>typeof o==="number"&&Number.isFinite(o)&&o>0)?s:null}function nt(e,t){if(typeof e==="number")return Number.isFinite(e)&&e>=0?e:t;if(typeof e!=="string"||e.trim()==="")return t;let s=Number.parseFloat(e);return Number.isFinite(s)&&s>=0?s:t}function Ms(e,t,s){let o=e.length;if(o===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),a=n.reduce((c,i)=>c+i,0);if(a>=t)return a===0?[...e]:n.map((c)=>c/a);let r=e.map((c)=>c*t);for(let c=0;c<=o;c++){let i=0;for(let p=0;p<o;p++){let h=Math.min(Math.max(r[p],n[p]),s[p].max);i+=r[p]-h,r[p]=h}if(Math.abs(i)<0.000000001)break;let d=r.map((p,h)=>i>0?s[h].max-p:p-n[h]),u=d.reduce((p,h)=>p+(Number.isFinite(h)?h:t),0);if(u<0.000000001)break;for(let p=0;p<o;p++){let h=(Number.isFinite(d[p])?d[p]:t)/u;r[p]+=i*h}}let l=r.reduce((c,i)=>c+i,0);return r.map((c)=>c/l)}function at(e,t,s,o,n){let a=e.length;if(t<0||t>=a-1||o<=0||s===0)return[...e];let r=e.map((p)=>p*o),l=s>0,c=l?t:t+1,i=l?1:-1,d=Math.min(Math.abs(s),n[c].max-r[c]);if(d<=0)return[...e];let u=0;for(let p=l?t+1:t;p>=0&&p<a&&d>0.000000001;p+=i){let h=Math.min(d,Math.max(0,r[p]-Math.max(0,n[p].min)));r[p]-=h,u+=h,d-=h}return r[c]+=u,r.map((p)=>p/o)}function Re(e,t,s,o){let n=e.map((r)=>r*s),a=(r,l)=>{let c=0;for(let i=r;i<=l;i++)c+=Math.max(0,n[i]-Math.max(0,o[i].min));return c};return{back:Math.min(a(0,t),o[t+1].max-n[t+1]),forward:Math.min(a(t+1,e.length-1),o[t].max-n[t])}}function Rs(e,t,s,o){let n=Re(e,t,s,o),a=e[t]*100,r=s>0?100/s:0;return{now:Math.round(a),min:Math.round(a-n.back*r),max:Math.round(a+n.forward*r)}}function rt(e){return`stx:split-pane:${e}`}function Ls(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var ll="./SplitPane-7sqfdwqa.stx";var Ns="data-split-separator";class cl{root;callbacks;direction;panes=[];separators=[];sizes=[];initial=[];limits=[];minSize;step;label;storageKey;observer=null;drag=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.direction=t.direction==="vertical"?"vertical":"horizontal",this.minSize=t.minSize??48,this.step=t.step??16,this.label=t.label||"Resize panes",this.storageKey=t.storageKey||"",this.collect(),this.initial=this.startingSizes(t.sizes),this.sizes=Me(this.stored()??this.initial,this.panes.length),this.build(),this.apply(!1),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.apply(!1)),this.observer.observe(this.root);this.root.setAttribute("data-split-ready","")}getSizes(){return[...this.sizes]}setSizes(e){if(!e||e.length!==this.panes.length)return;this.sizes=Me(e,this.panes.length),this.apply(!0),this.report(-1,"api",!0)}reset(e=-1){this.sizes=[...this.initial],this.apply(!0),this.report(e,"reset",!0)}setDirection(e){let t=e==="vertical"?"vertical":"horizontal";if(t===this.direction)return;this.direction=t,this.root.setAttribute("data-direction",t);for(let s of this.separators)s.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal");this.apply(!1)}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();for(let e of this.separators)e.remove();for(let e of this.panes)e.style.removeProperty("flex"),e.removeAttribute("data-split-pane");this.root.removeAttribute("data-split-ready")}available(){let e=this.root.getBoundingClientRect(),t=this.direction==="horizontal"?e.width:e.height,s=0;for(let o of this.separators){let n=o.getBoundingClientRect();s+=this.direction==="horizontal"?n.width:n.height}return Math.max(0,t-s)}collect(){this.panes=Array.from(this.root.children).filter((e)=>e instanceof HTMLElement&&!e.hasAttribute(Ns)),this.limits=this.panes.map((e)=>({min:nt(e.getAttribute("data-min-size"),this.minSize),max:nt(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((o)=>Number.parseFloat(o.getAttribute("data-size")||"")),s=t.every((o)=>Number.isFinite(o)&&o>0)?t:null;return Me(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=Ps(localStorage.getItem(rt(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(rt(this.storageKey),Ls(this.sizes))}catch{}}build(){let e=this.root.id||`split-${Math.random().toString(36).slice(2,8)}`;this.panes.forEach((t,s)=>{if(t.setAttribute("data-split-pane",""),!t.id)t.id=`${e}-pane-${s}`;if(s===this.panes.length-1)return;let o=document.createElement("div");o.setAttribute(Ns,""),o.setAttribute("role","separator"),o.setAttribute("tabindex","0"),o.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),o.className="stx-split-separator",t.after(o),this.separators.push(o);let n=(a,r)=>{o.addEventListener(a,r),this.disposers.push(()=>o.removeEventListener(a,r))};n("pointerdown",(a)=>this.onPointerDown(a,s)),n("pointermove",(a)=>this.onPointerMove(a)),n("pointerup",(a)=>this.onPointerEnd(a)),n("pointercancel",(a)=>this.onPointerEnd(a)),n("dblclick",()=>this.reset(s)),n("keydown",(a)=>this.onKeyDown(a,s))})}apply(e){let t=this.available();if(t>0)this.sizes=Ms(this.sizes,t,this.limits);if(this.panes.forEach((s,o)=>{s.style.flex=`${(this.sizes[o]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,o)=>{let n=Rs(this.sizes,o,t,this.limits);s.setAttribute("aria-valuenow",String(n.now)),s.setAttribute("aria-valuemin",String(n.min)),s.setAttribute("aria-valuemax",String(n.max))}),e)this.store()}report(e,t,s){let o=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((a)=>Math.round(a*o)),index:e,source:t};if(this.callbacks.onResize?.(n),s)this.callbacks.onResizeEnd?.(n)}position(e){return this.direction==="horizontal"?e.clientX:e.clientY}onPointerDown(e,t){if(e.button!==0)return;e.preventDefault();let s=this.separators[t];try{s.setPointerCapture(e.pointerId)}catch{}this.drag={index:t,start:this.position(e),sizes:[...this.sizes],pointer:e.pointerId},this.root.setAttribute("data-dragging",""),s.setAttribute("data-active","")}onPointerMove(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.sizes=at(t.sizes,t.index,this.position(e)-t.start,this.available(),this.limits),this.apply(!1),this.report(t.index,"pointer",!1)}onPointerEnd(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.drag=null,this.root.removeAttribute("data-dragging"),this.separators[t.index].removeAttribute("data-active");try{this.separators[t.index].releasePointerCapture(e.pointerId)}catch{}this.store(),this.report(t.index,"pointer",!0)}onKeyDown(e,t){let s=this.direction==="horizontal",o=this.available(),n=this.step*(e.shiftKey?5:1),a=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))a=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))a=n;else if(e.key==="Home")a=-Re(this.sizes,t,o,this.limits).back;else if(e.key==="End")a=Re(this.sizes,t,o,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=at(this.sizes,t,a,o,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var pl="./Stepper-68gxcmej.stx";var hl="./StepperStep-zf4pq1s0.stx";class Le{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),l=n+r;if(t[l]!==void 0)n=l;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[l]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let l=t[r],c;if(s[l]!==void 0)c=s[l];else if(l===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var db={local:new Le("local"),session:new Le("session")};function pb(e="local",t){return new Le(e,t)}var ml="./Switch-s8yf2rvm.stx";var bl="./Table-0a4y46vd.stx";var vl="./TableBody-y49bqb1p.stx";var yl="./TableCell-jhvsxw8b.stx";var Cl="./TableHead-e9xvjx2j.stx";var $l="./TableHeader-krzcx4sv.stx";var El="./TableRow-dt8e11aj.stx";var Al="./Tab-j9f4t166.stx";var Ml="./TabList-r1pc87xs.stx";var Ll="./TabPanel-5htevsq6.stx";var Ol="./Tabs-psm5wj7c.stx";var zl="./Teleport-vqs75x36.stx";var Hl="./Textarea-bb63fsz0.stx";var Fl="./AiTextarea-bg6xq5wc.stx";var _l="./Tooltip-tt73d42w.stx";var ql="./Transition-7m0mk45s.stx";var Gl="./Video-bqsx3wr8.stx";var Jl="./VirtualList-fa7v5a3h.stx";var Xl="./VirtualTable-kp7b3wyv.stx";var Zl=0;function Os(e="a11y"){return`${e}-${++Zl}-${Date.now()}`}function ix(e,t,s={}){let{visible:o=!1,id:n=Os("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function lx(e,t){let s=Os("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function cx(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function it(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function dx(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:l,onDeactivate:c}=t,i=!1,d=!1,u=null,p=(v)=>{if(d)return;if(n&&v.key==="Escape"){v.preventDefault(),m();return}if(v.key==="Tab"){let x=it(e);if(x.length===0){v.preventDefault();return}let S=x[0],P=x[x.length-1];if(v.shiftKey){if(document.activeElement===S)v.preventDefault(),P.focus()}else if(document.activeElement===P)v.preventDefault(),S.focus()}},h=(v)=>{if(d)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&a)m()}else if(!r&&a)m()}};function g(){if(i)return;i=!0,u=document.activeElement;let v=s||it(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",p),document.addEventListener("click",h),l?.()}function m(){if(!i)return;i=!1;let v=o||u;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",p),document.removeEventListener("click",h),c?.()}function w(){d=!0}function y(){d=!1}return{activate:g,deactivate:m,pause:w,unpause:y}}function px(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,l=o,c=()=>Array.from(e.querySelectorAll(s)),i=(u)=>{let p=c();if(u<0||u>=p.length)return;p.forEach((h,g)=>{if(g===u){if(h.setAttribute("tabindex","0"),typeof h.focus==="function")h.focus()}else h.setAttribute("tabindex","-1")}),l=u,r?.(u,p[u])},d=(u)=>{let h=c().length-1,g=!1,m=l;switch(u.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=l+1,m>h)m=a?0:h;g=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=l-1,m<0)m=a?h:0;g=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=l+1,m>h)m=a?0:h;g=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=l-1,m<0)m=a?h:0;g=!0}break;case"Home":m=0,g=!0;break;case"End":m=h,g=!0;break}if(g)u.preventDefault(),i(m)};return i(o),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var ux={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function hx(e){return document.activeElement===e}function fx(e,t){let s=t||document.activeElement,o=it(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function mx(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var gx={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function bx(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function xx(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function vx(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function wx(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function yx(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function kx(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Ql=(e,t,s,o)=>s*e/o+t,ec=(e,t,s,o)=>(e/=o,s*e*e+t),tc=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),sc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},oc=(e,t,s,o)=>(e/=o,s*e*e*e+t),nc=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),ac=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},rc=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),ic=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),lc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},cc=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),dc=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),pc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},uc=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,hc=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,fc=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,mc=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,gc=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,bc=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},xc=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),vc=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),wc=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},yc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},kc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Cc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},Sc=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),$c=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Tc=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},lt=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ds=(e,t,s,o)=>s-lt(o-e,0,s,o)+t,Ec=(e,t,s,o)=>{if(e<o/2)return Ds(e*2,0,s,o)*0.5+t;return lt(e*2-o,0,s,o)*0.5+s*0.5+t},Sx={linear:Ql,easeInQuad:ec,easeOutQuad:tc,easeInOutQuad:sc,easeInCubic:oc,easeOutCubic:nc,easeInOutCubic:ac,easeInQuart:rc,easeOutQuart:ic,easeInOutQuart:lc,easeInQuint:cc,easeOutQuint:dc,easeInOutQuint:pc,easeInSine:uc,easeOutSine:hc,easeInOutSine:fc,easeInExpo:mc,easeOutExpo:gc,easeInOutExpo:bc,easeInCirc:xc,easeOutCirc:vc,easeInOutCirc:wc,easeInElastic:yc,easeOutElastic:kc,easeInOutElastic:Cc,easeInBack:Sc,easeOutBack:$c,easeInOutBack:Tc,easeInBounce:Ds,easeOutBounce:lt,easeInOutBounce:Ec};function Ic(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:l="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${l} ${c}`}function zs(e,t,s={}){e.style.animation=Ic(t,s)}function Tx(e){e.style.animation=""}function Ac(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Ex(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let l=`${r*o}ms`;zs(a,t,{...n,delay:l})})}async function Ix(e,t){for(let s of t)zs(e,s.name,s.options),await Ac(e)}var Ax={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function Px(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Mx(e,t){let s=`
|
|
13
|
+
`}function Ht(e,t,s,o,n=0){if(o<=0||s<=0)return{start:0,end:0};let a=Math.floor(Math.max(0,e)/s),r=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),l=Math.min(o,Math.max(0,a-n));return{start:l,end:Math.max(l,Math.min(o,r+n))}}function jt(e,t,s){let o=s.rows-1,n=Math.max(0,s.columns-1),a=Math.max(1,s.page),{row:r,column:l}=e;switch(t){case"ArrowUp":r=Math.max(-1,r-1);break;case"ArrowDown":r=Math.min(o,r+1);break;case"ArrowLeft":l-=1;break;case"ArrowRight":l+=1;break;case"PageUp":r=r<=0?r:Math.max(0,r-a);break;case"PageDown":r=Math.min(o,Math.max(0,r)+(r<0?0:a));break;case"Home":if(l=0,s.mod)r=Math.min(0,o);break;case"End":if(l=n,s.mod)r=o;break;default:return e}return{row:Math.max(-1,Math.min(o,r)),column:Math.max(0,Math.min(n,l))}}function Bn(e,t,s=!1){let o=e.find((a)=>a.key===t),n=!o?{key:t,direction:"asc"}:o.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!o)return[...e,n];return n?e.map((a)=>a.key===t?n:a):e.filter((a)=>a.key!==t)}var Lt=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class Ke{rows=[];columns=[];view=new Uint32Array(0);sort=[];filter="";selected=new Set;given=null;filtered=new Uint32Array(0);searchText=null;sortKeys=new Map;offsets=new Float64Array(1);anchor=-1;charWidth;cellPadding;constructor(e=[],t=null,s={}){this.charWidth=s.charWidth??7.25,this.cellPadding=s.cellPadding??24,this.given=t&&t.length>0?[...t]:null,this.setRows(e)}get count(){return this.view.length}get totalWidth(){return this.offsets[this.columns.length]}setRows(e){this.rows=Array.isArray(e)?e:[],this.selected.clear(),this.anchor=-1,this.forget(),this.resolveColumns(),this.refilter()}setColumns(e){this.given=e&&e.length>0?[...e]:null,this.forget(),this.resolveColumns(),this.sort=this.sort.filter((t)=>this.columns.some((s)=>s.key===t.key)),this.refilter()}setFilter(e){return this.filter=e==null?"":String(e),this.refilter(),this.count}setSort(e){this.sort=(e??[]).filter((t)=>t&&(t.direction==="asc"||t.direction==="desc")&&this.columns.some((s)=>s.key===t.key)),this.resort()}toggleSort(e,t=!1){let s=this.columns.find((o)=>o.key===e);if(!s||!s.sortable)return this.sort;return this.sort=Bn(this.sort,e,t),this.resort(),this.sort}sortOf(e){let t=this.sort.findIndex((s)=>s.key===e);return t<0?null:{direction:this.sort[t].direction,priority:t+1}}rowAt(e){return e>=0&&e<this.view.length?this.rows[this.view[e]]:void 0}valueAt(e,t){let s=this.columns[t],o=this.rowAt(e);return s&&o!==void 0?te(o,s):void 0}viewRows(){let e=Array.from({length:this.view.length});for(let t=0;t<e.length;t++)e[t]=this.rows[this.view[t]];return e}toCsv(){return Fn(this.viewRows(),this.columns)}toJson(){return Vn(this.viewRows(),this.columns)}select(e,t="replace"){if(e<0||e>=this.view.length)return;let s=this.view[e];if(t==="range"&&this.anchor>=0){let o=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let a=o;a<=n&&a<this.view.length;a++)this.selected.add(this.view[a]);return}if(t==="toggle")if(this.selected.has(s))this.selected.delete(s);else this.selected.add(s);else this.selected.clear(),this.selected.add(s);this.anchor=e}selectAll(){this.selected.clear();for(let e=0;e<this.view.length;e++)this.selected.add(this.view[e])}clearSelection(){this.selected.clear(),this.anchor=-1}isSelected(e){return e>=0&&e<this.view.length&&this.selected.has(this.view[e])}selectedIndices(){return[...this.selected].sort((e,t)=>e-t)}selectedRows(){return this.selectedIndices().map((e)=>this.rows[e])}offsetOf(e){return this.offsets[Math.max(0,Math.min(this.columns.length,e))]}columnAt(e){let t=this.columns.length;if(t===0)return-1;let s=0,o=t-1;while(s<o){let n=s+o+1>>1;if(this.offsets[n]<=e)s=n;else o=n-1}return s}columnRange(e,t,s=0){let o=this.columns.length;if(o===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),a=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(o,a+1+s)}}resizeColumn(e,t){let s=this.columns[e];if(!s)return 0;return s.width=Math.round(Math.max(s.minWidth,Math.min(s.maxWidth,t))),this.measure(),s.width}autoWidth(e,t=200){let s=this.columns[e];if(!s)return 0;let o=s.label.length+3,n=Math.min(this.view.length,t);for(let r=0;r<n;r++){let l=me(te(this.rows[this.view[r]],s),s.type).length;if(l>o)o=l}let a=Math.ceil(o*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,a))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??jn(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let o=0;o<t;o++)this.view[o]=o;this.columns=e.map((o)=>{let n=o.type;if(!n){let a=[];for(let r=0;r<t;r++)a.push(te(this.rows[r],o));n=Hn(a)}return{...o,label:o.label??o.key,type:n,width:o.width??0,minWidth:o.minWidth??48,maxWidth:o.maxWidth??2000,align:o.align??(n==="number"?"right":"left"),sortable:o.sortable!==!1}}),this.columns.forEach((o,n)=>{if(!o.width)o.width=this.autoWidth(n);o.width=Math.max(o.minWidth,Math.min(o.maxWidth,o.width))}),this.view=s,this.measure()}measure(){let e=new Float64Array(this.columns.length+1);for(let t=0;t<this.columns.length;t++)e[t+1]=e[t]+this.columns[t].width;this.offsets=e}searchable(){if(this.searchText)return this.searchText;let e=this.rows,t=this.columns,s=Array.from({length:e.length});for(let o=0;o<e.length;o++){let n=e[o],a="";for(let r=0;r<t.length;r++){let l=te(n,t[r]);if(l===null||l===void 0)continue;a+=typeof l==="string"?l:me(l,t[r].type),a+="\x01"}s[o]=a.toLowerCase()}return this.searchText=s,s}refilter(){let e=this.rows.length,t=this.filter.toLowerCase().split(/\s+/).filter(Boolean);if(t.length===0){let s=new Uint32Array(e);for(let o=0;o<e;o++)s[o]=o;this.filtered=s}else{let s=this.searchable(),o=new Uint32Array(e),n=0,a=t.length===1?t[0]:null;for(let r=0;r<e;r++){let l=s[r];if(a!==null){if(l.includes(a))o[n++]=r;continue}let c=!0;for(let i=0;i<t.length;i++)if(!l.includes(t[i])){c=!1;break}if(c)o[n++]=r}this.filtered=o.slice(0,n)}this.anchor=-1,this.resort()}keysFor(e){let t=this.sortKeys.get(e.key);if(t)return t;let s=this.rows,o=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let a=te(s[n],e),r=Number.NaN;if(a===null||a===void 0||a==="")r=Number.NaN;else if(typeof a==="number")r=a;else if(typeof a==="boolean")r=a?1:0;else if(a instanceof Date)r=a.getTime();else if(e.type==="date")r=Date.parse(String(a));else if(e.type==="boolean")r=String(a).toLowerCase()==="true"?1:0;else r=Number(a);o[n]=r}else{let n=Array.from({length:s.length}),a=new Map;for(let c=0;c<s.length;c++){let i=te(s[c],e);if(i===null||i===void 0){n[c]=null;continue}let d=typeof i==="string"?i:me(i,e.type);if(n[c]=d,!a.has(d))a.set(d,0)}let r=[...a.keys()].sort(Lt.compare),l=0;for(let c=0;c<r.length;c++){if(c>0&&Lt.compare(r[c-1],r[c])!==0)l++;a.set(r[c],l)}for(let c=0;c<s.length;c++){let i=n[c];o[c]=i===null?Number.NaN:a.get(i)}}return this.sortKeys.set(e.key,o),o}resort(){let e=[];for(let s of this.sort){let o=this.columns.find((n)=>n.key===s.key);if(o)e.push({keys:this.keysFor(o),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:o}=e[0];t.sort((n,a)=>{let r=s[n],l=s[a];if(r<l)return-o;if(r>l)return o;if(r===l)return n-a;let c=r!==r;return c===(l!==l)?n-a:c?1:-1})}else if(e.length>1)t.sort((s,o)=>{for(let n=0;n<e.length;n++){let a=e[n].keys[s],r=e[n].keys[o];if(a<r)return-e[n].sign;if(a>r)return e[n].sign;if(a===r)continue;let l=a!==a;if(l!==(r!==r))return l?1:-1}return s-o});this.view=t}}var _n="./DataGrid-7rt7v865.stx";var Wn=120,Te=new Intl.NumberFormat("en-US");function ne(e,t){return e.querySelector(`[data-dg="${t}"]`)}function Kn(e){let t=()=>{let s=document.createElement("textarea");s.value=e,s.setAttribute("aria-hidden","true"),s.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(s);let o=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),o?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class Gn{root;callbacks;model;scroller;content;header;body;status;filterInput;prefix;rowHeight;headerHeight;overscan;columnOverscan;selectable;resizeStep;fileName;contextMenu;slots=new Map;pool=[];headerCells=[];rows={start:0,end:0};cols={start:0,end:0};stale=!0;active={row:0,column:0};activeEl=null;filterTimer=null;resize=null;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let o=ne(e,"scroller"),n=ne(e,"content"),a=ne(e,"header"),r=ne(e,"body");if(!o||!n||!a||!r)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=o,this.content=n,this.header=a,this.body=r,this.status=ne(e,"status"),this.filterInput=ne(e,"filter"),this.prefix=o.id||`data-grid-${Math.random().toString(36).slice(2,8)}`,this.rowHeight=Math.max(8,t.rowHeight??28),this.headerHeight=Math.max(8,t.headerHeight??32),this.overscan=t.overscan??6,this.columnOverscan=t.columnOverscan??2,this.selectable=t.selectable!==!1,this.resizeStep=t.resizeStep??16,this.fileName=t.fileName||"data",this.contextMenu=Boolean(t.contextMenu),this.header.__stx_inert_content=!0,this.body.__stx_inert_content=!0,e.style.setProperty("--stx-grid-row-height",`${this.rowHeight}px`),e.style.setProperty("--stx-grid-header-height",`${this.headerHeight}px`),this.model=new Ke(t.rows??[],t.columns??null),t.filter){if(this.model.setFilter(t.filter),this.filterInput)this.filterInput.value=t.filter}if(this.listen(this.scroller,"scroll",()=>this.render()),this.listen(this.scroller,"keydown",(i)=>this.onKeyDown(i)),this.listen(this.body,"click",(i)=>this.onBodyClick(i)),this.listen(this.body,"dblclick",(i)=>this.onBodyDoubleClick(i)),this.listen(this.body,"contextmenu",(i)=>this.onContextMenu(i)),this.listen(this.header,"click",(i)=>this.onHeaderClick(i)),this.listen(this.header,"dblclick",(i)=>this.onHeaderDoubleClick(i)),this.listen(this.header,"pointerdown",(i)=>this.onResizeStart(i)),this.listen(this.header,"pointermove",(i)=>this.onResizeMove(i)),this.listen(this.header,"pointerup",(i)=>this.onResizeEnd(i)),this.listen(this.header,"pointercancel",(i)=>this.onResizeEnd(i)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let l=ne(e,"export-csv"),c=ne(e,"export-json");if(l)this.listen(l,"click",()=>this.download("csv"));if(c)this.listen(c,"click",()=>this.download("json"));if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.refresh(),e.setAttribute("data-dg-ready","")}setRows(e){this.model.setRows(e),this.active={row:Math.min(0,this.model.count-1),column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.scroller.scrollTop=0,this.refresh()}setColumns(e){this.model.setColumns(e),this.active={row:this.active.row,column:Math.min(this.active.column,Math.max(0,this.model.columns.length-1))},this.refresh()}setFilter(e){let t=e==null?"":String(e);if(this.filterInput&&this.filterInput.value!==t)this.filterInput.value=t;this.applyFilter(t)}setSort(e){this.model.setSort(e),this.refresh()}setFileName(e){this.fileName=e||"data"}getView(){return this.model.viewRows()}getSelection(){let e=this.model.selectedIndices();return{rows:e.map((t)=>this.model.rows[t]),indices:e}}clearSelection(){this.model.clearSelection(),this.paintSelection(),this.reportSelection()}exportCsv(){return this.model.toCsv()}exportJson(){return this.model.toJson()}download(e){let t=e==="json"?this.model.toJson():this.model.toCsv(),s=new Blob([t],{type:e==="json"?"application/json":"text/csv;charset=utf-8"}),o=URL.createObjectURL(s),n=document.createElement("a");return n.href=o,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(o),1000),this.callbacks.onExport?.({format:e,text:t,rows:this.model.count}),t}scrollToRow(e){let t=Math.max(0,Math.min(this.model.count-1,e));this.revealRow(t),this.render()}focus(){this.scroller.focus({preventScroll:!0})}getActiveCell(){return{...this.active}}setActiveCell(e,t){this.moveTo({row:e,column:t},!1)}destroy(){if(this.observer?.disconnect(),this.filterTimer)clearTimeout(this.filterTimer);for(let e of this.disposers)e();this.header.replaceChildren(),this.body.replaceChildren(),this.slots.clear(),this.pool.length=0,this.root.removeAttribute("data-dg-ready")}refresh(){let e=this.model;this.content.style.width=`${e.totalWidth}px`,this.content.style.height=`${this.headerHeight+e.count*this.rowHeight}px`,this.header.style.width=`${e.totalWidth}px`,this.body.style.height=`${e.count*this.rowHeight}px`,this.scroller.setAttribute("aria-rowcount",String(e.count+1)),this.scroller.setAttribute("aria-colcount",String(e.columns.length)),this.root.toggleAttribute("data-empty",e.count===0),this.stale=!0,this.render(),this.paintStatus()}render(){let e=this.model,t=this.scroller,s=Ht(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),o=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||o.start!==this.cols.start||o.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=o,n)this.renderHeader();for(let[a,r]of this.slots)if(a<s.start||a>=s.end)this.slots.delete(a),r.index=-1,r.el.style.display="none",this.pool.push(r);for(let a=s.start;a<s.end;a++){let r=this.slots.get(a);if(r){if(n)this.fill(r);continue}r=this.pool.pop()??this.createSlot(),r.index=a,r.el.style.display="",this.slots.set(a,r),this.fill(r)}this.stale=!1,this.paintActive()}createSlot(){let e=document.createElement("div");return e.className="stx-dg-row",e.setAttribute("role","row"),this.body.appendChild(e),{el:e,index:-1,cells:[]}}fill(e){let t=this.model,s=e.index,o=t.rowAt(s),n=this.selectable&&t.isSelected(s),a=e.el;if(a.__dgRow=s,a.style.transform=`translateY(${s*this.rowHeight}px)`,a.setAttribute("aria-rowindex",String(s+2)),this.selectable)a.setAttribute("aria-selected",n?"true":"false");let r=this.cols.end-this.cols.start;while(e.cells.length<r){let l=document.createElement("div");l.className="stx-dg-cell",l.setAttribute("role","gridcell"),l.appendChild(document.createTextNode("")),a.appendChild(l),e.cells.push(l)}while(e.cells.length>r)e.cells.pop().remove();for(let l=0;l<r;l++){let c=this.cols.start+l,i=t.columns[c],d=e.cells[l],u=o===void 0?void 0:te(o,i),p=Nt(u);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${i.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",i.type),d.setAttribute("data-align",i.align),p==="value")d.removeAttribute("data-empty");else d.setAttribute("data-empty",p);if(this.selectable)d.setAttribute("aria-selected",n?"true":"false");d.firstChild.data=typeof u==="string"?u:me(u,i.type)}}renderHeader(){let e=this.model,t=this.cols.end-this.cols.start;while(this.headerCells.length<t){let s=document.createElement("div");s.className="stx-dg-head",s.setAttribute("role","columnheader");let o=document.createElement("span");o.className="stx-dg-head-label",o.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let a=document.createElement("span");a.className="stx-dg-resize",a.setAttribute("aria-hidden","true"),s.append(o,n,a),this.header.appendChild(s),this.headerCells.push(s)}while(this.headerCells.length>t)this.headerCells.pop().remove();for(let s=0;s<t;s++){let o=this.cols.start+s,n=e.columns[o],a=this.headerCells[s],r=e.sortOf(n.key);if(a.__dgColumn=o,a.id=`${this.prefix}-h-c${o}`,a.style.left=`${e.offsetOf(o)}px`,a.style.width=`${n.width}px`,a.setAttribute("aria-colindex",String(o+1)),a.setAttribute("data-align",n.align),a.toggleAttribute("data-sortable",n.sortable),n.sortable)a.setAttribute("aria-sort",r?r.direction==="asc"?"ascending":"descending":"none");else a.removeAttribute("aria-sort");a.children[0].firstChild.data=n.label,a.children[1].firstChild.data=r?`${r.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?r.priority:""}`:""}}cellElement(e){if(e.column<this.cols.start||e.column>=this.cols.end)return null;let t=e.column-this.cols.start;if(e.row<0)return this.headerCells[t]??null;return this.slots.get(e.row)?.cells[t]??null}paintActive(){let e=this.cellElement(this.active);if(this.activeEl&&this.activeEl!==e)this.activeEl.removeAttribute("data-active");if(this.activeEl=e,e)e.setAttribute("data-active",""),this.scroller.setAttribute("aria-activedescendant",e.id);else this.scroller.removeAttribute("aria-activedescendant")}paintSelection(){if(!this.selectable)return;for(let[e,t]of this.slots){let s=this.model.isSelected(e)?"true":"false";t.el.setAttribute("aria-selected",s);for(let o of t.cells)o.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${Te.format(t)} ${t===1?"row":"rows"}`:`${Te.format(e.count)} of ${Te.format(t)} rows`;if(e.selected.size>0)s+=`, ${Te.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,o=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+o)t.scrollTop=s+this.rowHeight-o}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),o=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(o>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,o-t.clientWidth)}detail(e){return{row:this.model.rowAt(e.row),rowIndex:e.row,column:this.model.columns[e.column],value:e.row<0?void 0:this.model.valueAt(e.row,e.column)}}moveTo(e,t=!0){let s=this.model,o={row:Math.max(-1,Math.min(s.count-1,e.row)),column:Math.max(0,Math.min(s.columns.length-1,e.column))};if(this.active=o,o.row>=0)this.revealRow(o.row);if(this.revealColumn(o.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(o))}reportSelection(){this.callbacks.onSelect?.(this.getSelection())}applyFilter(e){let t=this.model.setFilter(e);this.active={row:Math.min(0,t-1),column:this.active.column},this.scroller.scrollTop=0,this.refresh(),this.callbacks.onFilter?.({text:e,count:t})}sortBy(e,t){let s=this.model.columns[e];if(!s||!s.sortable)return;let o=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...o])}setColumnWidth(e,t){this.model.resizeColumn(e,t),this.content.style.width=`${this.model.totalWidth}px`,this.header.style.width=`${this.model.totalWidth}px`,this.stale=!0,this.render()}copy(e){if(this.active.row<0)return;let t=this.model.rowAt(this.active.row);if(t===void 0)return;let s=e==="row"?zt(t,this.model.columns):Ot(this.model.valueAt(this.active.row,this.active.column));Kn(s),this.callbacks.onCopy?.({what:e,text:s})}listen(e,t,s){e.addEventListener(t,s),this.disposers.push(()=>e.removeEventListener(t,s))}cellFrom(e){let s=e.target?.closest(".stx-dg-cell"),o=s?.parentElement;if(!s||!o||s.__dgColumn===void 0||o.__dgRow===void 0)return null;return{row:o.__dgRow,column:s.__dgColumn}}headFrom(e){let t=e.target,s=t?.closest(".stx-dg-head");if(!s||s.__dgColumn===void 0)return null;let o=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(o),handle:o}}onBodyClick(e){let t=this.cellFrom(e);if(!t)return;if(this.selectable)this.model.select(t.row,e.shiftKey?"range":e.metaKey||e.ctrlKey?"toggle":"replace"),this.paintSelection(),this.reportSelection();this.moveTo(t)}onBodyDoubleClick(e){let t=this.cellFrom(e),s=t?this.model.rowAt(t.row):void 0;if(t&&s!==void 0)this.callbacks.onActivate?.({row:s,rowIndex:t.row})}onContextMenu(e){let t=this.cellFrom(e);if(!t)return;if(this.contextMenu)e.preventDefault();this.moveTo(t,!1),this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onHeaderClick(e){let t=this.headFrom(e);if(!t||t.onHandle)return;this.active={row:-1,column:t.column},this.sortBy(t.column,e.shiftKey)}onHeaderDoubleClick(e){let t=this.headFrom(e);if(t&&t.onHandle)this.setColumnWidth(t.column,this.model.autoWidth(t.column))}onResizeStart(e){let t=this.headFrom(e);if(!t||!t.onHandle||!t.handle||e.button!==0)return;e.preventDefault();try{t.handle.setPointerCapture(e.pointerId)}catch{}this.resize={column:t.column,start:e.clientX,width:this.model.columns[t.column].width,pointer:e.pointerId,handle:t.handle},this.root.setAttribute("data-resizing","")}onResizeMove(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.setColumnWidth(t.column,t.width+e.clientX-t.start)}onResizeEnd(e){let t=this.resize;if(!t||e.pointerId!==t.pointer)return;this.resize=null,this.root.removeAttribute("data-resizing");try{t.handle.releasePointerCapture(e.pointerId)}catch{}}onFilterInput(){if(this.filterTimer)clearTimeout(this.filterTimer);this.filterTimer=setTimeout(()=>{this.filterTimer=null,this.applyFilter(this.filterInput?this.filterInput.value:"")},Wn)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,o=this.active.row<0,n=e.key;if(s&&(n==="a"||n==="A")){if(!this.selectable)return;e.preventDefault(),t.selectAll(),this.paintSelection(),this.reportSelection();return}if(s&&(n==="c"||n==="C")){if(o)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(o&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let l=t.columns[this.active.column];if(l)this.setColumnWidth(this.active.column,l.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),o){this.sortBy(this.active.column,e.shiftKey);return}if(n===" "){if(!this.selectable)return;t.select(this.active.row,"toggle"),this.paintSelection(),this.reportSelection();return}let l=t.rowAt(this.active.row);if(l!==void 0)this.callbacks.onActivate?.({row:l,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let a=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),r=jt(this.active,n,{rows:t.count,columns:t.columns.length,page:a,mod:s});if(r===this.active)return;if(e.preventDefault(),r.row===this.active.row&&r.column===this.active.column)return;if(e.shiftKey&&this.selectable&&r.row>=0&&r.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(r.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(r)}}var Jn="./Dialog-wm7zjqnb.stx";var Xn="./DialogBackdrop-de5m5m4w.stx";var Qn="./DialogDescription-yd2jgt2m.stx";var ta="./DialogPanel-v972ztcc.stx";var oa="./DialogTitle-nw0pw114.stx";var aa="./Drawer-d78cdr6d.stx";var ia="./Dropdown-hb8ks69x.stx";var ca="./DropdownButton-wxc25hsy.stx";var pa="./DropdownItem-af0vzc8a.stx";var ha="./DropdownItems-bkz7jkyz.stx";var ma="./Form-cybgg9ym.stx";var ga={action:f.string,method:f.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:f.object,initialValues:f.object,validateOnChange:f.boolean,validateOnBlur:f.boolean,onSubmit:f.func,onError:f.func,className:f.string},Eh=ee("Form",ga);var Vt=(e)=>Math.round(e*100)/100,X=(e)=>`${Vt(e.x)} ${Vt(e.y)}`;function Ft(e,t,s){let o=s.x-e.x,n=s.y-e.y;if(o===0&&n===0)return{x:e.x,y:e.y};let a=o===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(o),r=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),l=Math.min(a,r);return{x:e.x+o*l,y:e.y+n*l}}function Bt(e,t,s){let o=e.x-t.x,n=e.y-t.y,a=Math.sqrt(o*o+n*n);if(s<=0||a<=s)return e;return{x:e.x-o/a*s,y:e.y-n/a*s}}function ba(e,t,s=0){let o=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},a={x:e.x+t.width/2,y:e.y-t.height/4},r={x:n.x,y:n.y-o},l={x:a.x+o,y:a.y};return{d:`M ${X(n)} C ${X(r)}, ${X(l)}, ${X(a)}`,start:n,end:a,label:qt(n,r,l,a,0.5),angle:Math.atan2(a.y-l.y,a.x-l.x)}}function qt(e,t,s,o,n){let a=1-n;return{x:a*a*a*e.x+3*a*a*n*t.x+3*a*n*n*s.x+n*n*n*o.x,y:a*a*a*e.y+3*a*a*n*t.y+3*a*n*n*s.y+n*n*n*o.y}}function _t(e,t={}){let{source:s,sourceSize:o,target:n,targetSize:a}=e,r=t.offset??0,l=t.inset??0;if(s.x===n.x&&s.y===n.y)return ba(s,o,r);if(t.curve==="bezier"){let w=t.direction!=="TB",y=(w?n.x-s.x:n.y-s.y)>=0?1:-1,v=w?{x:s.x+y*o.width/2,y:s.y}:{x:s.x,y:s.y+y*o.height/2},x=w?{x:n.x-y*a.width/2,y:n.y}:{x:n.x,y:n.y-y*a.height/2},S=Math.abs(w?x.x-v.x:x.y-v.y),P=Math.max(S/2,24)*y,T=w?{x:x.x-y*l,y:x.y}:{x:x.x,y:x.y-y*l},j=w?{x:v.x+P,y:v.y+r}:{x:v.x+r,y:v.y+P},V=w?{x:T.x-P,y:T.y+r}:{x:T.x+r,y:T.y-P};return{d:`M ${X(v)} C ${X(j)}, ${X(V)}, ${X(T)}`,start:v,end:T,label:qt(v,j,V,T,0.5),angle:Math.atan2(T.y-V.y,T.x-V.x)}}let c=Ft(s,o,n),i=Ft(n,a,s);if(r===0){let w=Bt(i,c,l);return{d:`M ${X(c)} L ${X(w)}`,start:c,end:w,label:{x:(c.x+w.x)/2,y:(c.y+w.y)/2},angle:Math.atan2(w.y-c.y,w.x-c.x)}}let d=s.x<n.x||s.x===n.x&&s.y<n.y?1:-1,u=(n.x-s.x)*d,p=(n.y-s.y)*d,h=Math.sqrt(u*u+p*p)||1,g={x:(c.x+i.x)/2+-p/h*r*2,y:(c.y+i.y)/2+u/h*r*2},m=Bt(i,g,l);return{d:`M ${X(c)} Q ${X(g)}, ${X(m)}`,start:c,end:m,label:{x:0.25*c.x+0.5*g.x+0.25*m.x,y:0.25*c.y+0.5*g.y+0.25*m.y},angle:Math.atan2(m.y-g.y,m.x-g.x)}}function Wt(e,t=14){let s=new Map;for(let n of e){let a=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,r=s.get(a);if(r)r.push(n);else s.set(a,[n])}let o=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((a,r)=>{let l=(r-(n.length-1)/2)*t;o.set(a.id,a.source===a.target?r*t:l)})}return o}var Ge={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function se(e){return e.label==null||e.label===""?e.id:String(e.label)}function Kt(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Gt(e,t=Ge){let s=Math.max(se(e).length,e.detail?e.detail.length*0.85:0),o=e.expandable===!0?t.charWidth+4:0;return{width:Math.min(t.maxWidth,Math.max(t.minWidth,Math.ceil(s*t.charWidth)+t.paddingX*2+o)),height:t.height+(e.detail?t.detailHeight:0)}}function Ut(e=Ge){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function Ee(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class Ie{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=Ge){this.metrics=s;this.merge(e,t)}get nodes(){return[...this.nodeMap.values()]}get edges(){return[...this.edgeMap.values()]}get nodeCount(){return this.nodeMap.size}get edgeCount(){return this.edgeMap.size}has(e){return this.nodeMap.has(e)}node(e){return this.nodeMap.get(e)}edge(e){return this.edgeMap.get(e)}addNode(e){if(!e||e.id==null||e.id==="")return!1;let t=String(e.id);if(this.nodeMap.has(t))return!1;let s={...e,id:t};return this.nodeMap.set(t,s),this.incident.set(t,new Set),this.sizes.set(t,Gt(s,this.metrics)),!0}addEdge(e){if(!e)return!1;let t=String(e.source),s=String(e.target);if(!this.nodeMap.has(t)||!this.nodeMap.has(s))return!1;let o=Kt({...e,source:t,target:s});if(this.edgeMap.has(o))return!1;return this.edgeMap.set(o,{...e,id:o,source:t,target:s}),this.incident.get(t).add(o),this.incident.get(s).add(o),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let o={...s,...t,id:e};return this.nodeMap.set(e,o),this.sizes.set(e,Gt(o,this.metrics)),!0}removeNode(e){if(!this.nodeMap.has(e))return!1;for(let t of[...this.incident.get(e)])this.removeEdge(t);return this.nodeMap.delete(e),this.incident.delete(e),this.sizes.delete(e),!0}removeEdge(e){let t=this.edgeMap.get(e);if(!t)return!1;return this.edgeMap.delete(e),this.incident.get(t.source)?.delete(e),this.incident.get(t.target)?.delete(e),!0}merge(e=[],t=[]){let s={nodes:[],edges:[]};for(let o of e)if(this.addNode(o))s.nodes.push(String(o.id));for(let o of t)if(this.addEdge(o))s.edges.push(Kt({...o,source:String(o.source),target:String(o.target)}));return s}edgesOf(e){let t=this.incident.get(e);return t?[...t].map((s)=>this.edgeMap.get(s)):[]}neighbours(e){let t=new Set;for(let s of this.edgesOf(e)){let o=s.source===e?s.target:s.source;if(o!==e)t.add(o)}return[...t]}degree(e){return this.neighbours(e).length}size(e){return this.sizes.get(e)??{width:this.metrics.minWidth,height:this.metrics.height}}bounds(e){let{POSITIVE_INFINITY:t,POSITIVE_INFINITY:s,NEGATIVE_INFINITY:o,NEGATIVE_INFINITY:n}=Number;for(let[a,r]of e){if(!this.nodeMap.has(a))continue;let l=this.size(a);t=Math.min(t,r.x-l.width/2),o=Math.max(o,r.x+l.width/2),s=Math.min(s,r.y-l.height/2),n=Math.max(n,r.y+l.height/2)}return Number.isFinite(t)?{x:t,y:s,width:o-t,height:n-s}:null}}function Jt(e){let t=e>>>0||1;return()=>{t=t+1831565813>>>0;let s=t;return s=Math.imul(s^s>>>15,s|1),s^=s+Math.imul(s^s>>>7,s|61),((s^s>>>14)>>>0)/4294967296}}var xa=0.15,Yt=0.06;function Xt(e,t={}){let s=e.nodes,o=s.length,n=new Map;if(o===0)return n;let a=t.linkDistance??90,r=t.padding??16,l=Jt(t.seed??1),c=t.positions??null,i=new Set(t.pinned??[]),d=new Map(s.map((R,L)=>[R.id,L])),u=new Float64Array(o),p=new Float64Array(o),h=new Float64Array(o),g=new Float64Array(o),m=new Uint8Array(o),w=new Uint8Array(o),y=new Float64Array(o).fill(1),v=0;s.forEach((R,L)=>{let E=e.size(R.id);h[L]=E.width/2,g[L]=E.height/2;let M=c?.get(R.id);if(M&&Number.isFinite(M.x)&&Number.isFinite(M.y))u[L]=M.x,p[L]=M.y,w[L]=1,m[L]=i.has(R.id)?1:0,y[L]=0,v++});let x=a*Math.sqrt(o)*0.6;s.forEach((R,L)=>{if(w[L])return;let E=e.neighbours(R.id).map((k)=>d.get(k)).find((k)=>w[k]),M=l()*Math.PI*2;if(E!==void 0)u[L]=u[E]+Math.cos(M)*a*0.5,p[L]=p[E]+Math.sin(M)*a*0.5;else{let k=Math.sqrt(l())*x;u[L]=Math.cos(M)*k,p[L]=Math.sin(M)*k}});let S=Uint8Array.from(w),P=v>0,T=Math.max(0,t.iterations??(P?80:300)),j=[],V=new Set;for(let R of e.edges){let L=d.get(R.source),E=d.get(R.target);if(L===E)continue;let M=L<E?L*o+E:E*o+L;if(!V.has(M))V.add(M),j.push(L,E)}let F=new Float64Array(o),b=new Float64Array(o),C=a,N=P?C*0.5:C*1.5;for(let R=0;R<T;R++){let L=N*(1-R/T);F.fill(0),b.fill(0);for(let E=0;E<o;E++)for(let M=E+1;M<o;M++){if(S[E]&&S[M])continue;let k=u[E]-u[M],D=p[E]-p[M],O=Math.sqrt(k*k+D*D);if(O<0.01){let _=(E*31+M*17)%360*Math.PI/180;k=Math.cos(_)*0.01,D=Math.sin(_)*0.01,O=0.01}let J=Math.max(1,O-(h[E]+h[M])*0.5),H=C*C*xa/J/O;F[E]+=k*H,b[E]+=D*H,F[M]-=k*H,b[M]-=D*H}for(let E=0;E<j.length;E+=2){let M=j[E],k=j[E+1];if(S[M]&&S[k])continue;let D=u[M]-u[k],O=p[M]-p[k],J=Math.sqrt(D*D+O*O)||0.01,H=(h[M]+h[k])*0.5,_=Math.max(0,J-H),Z=_*_/C/J;F[M]-=D*Z,b[M]-=O*Z,F[k]+=D*Z,b[k]+=O*Z}for(let E=0;E<o;E++){if(m[E])continue;if(!S[E])F[E]-=u[E]*Yt,b[E]-=p[E]*Yt;let M=Math.sqrt(F[E]*F[E]+b[E]*b[E]);if(M>0){let k=Math.min(M,L)/M*y[E];u[E]+=F[E]*k,p[E]+=b[E]*k}}}return va(u,p,h,g,m,r),s.forEach((R,L)=>{n.set(R.id,{x:Math.round(u[L]*100)/100,y:Math.round(p[L]*100)/100})}),n}function va(e,t,s,o,n,a){let r=e.length;for(let l=0;l<40;l++){let c=!1;for(let i=0;i<r;i++)for(let d=i+1;d<r;d++){let u=s[i]+s[d]+a-Math.abs(e[i]-e[d]);if(u<=0)continue;let p=o[i]+o[d]+a-Math.abs(t[i]-t[d]);if(p<=0)continue;if(n[i]&&n[d])continue;c=!0;let h=n[i]?0:n[d]?1:0.5,g=1-h;if(u<p){let m=e[i]<e[d]||e[i]===e[d]&&i<d?-1:1;e[i]+=m*u*h,e[d]-=m*u*g}else{let m=t[i]<t[d]||t[i]===t[d]&&i<d?-1:1;t[i]+=m*p*h,t[d]-=m*p*g}}if(!c)break}}function wa(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let a=[],r=[n.id];t.add(n.id);while(r.length){let l=r.shift();a.push(l);for(let c of e.neighbours(l))if(!t.has(c))t.add(c),r.push(c)}s.push(a)}let o=new Map(e.nodes.map((n,a)=>[n.id,a]));for(let n of s)n.sort((a,r)=>o.get(a)-o.get(r));return s}function ya(e){let t=new Map;for(let n of e.nodes)t.set(n.id,[]);for(let n of e.edges)if(n.source!==n.target)t.get(n.source).push({id:n.id,to:n.target});let s=new Set,o=new Map;for(let n of e.nodes){if(o.has(n.id))continue;let a=[{id:n.id,next:0}];o.set(n.id,1);while(a.length){let r=a[a.length-1],l=t.get(r.id);if(r.next>=l.length){o.set(r.id,2),a.pop();continue}let c=l[r.next++],i=o.get(c.to);if(i===1)s.add(c.id);else if(i===void 0)o.set(c.to,1),a.push({id:c.to,next:0})}}return s}function Zt(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,a)=>n[0]-a[0]||n[1]-a[1]),o=0;for(let n=0;n<s.length;n++)for(let a=n+1;a<s.length;a++)if(s[n][0]<s[a][0]&&s[n][1]>s[a][1])o++;return o}function Qt(e,t={}){let s=t.direction==="TB"?"TB":"LR",o=t.nodeGap??24,n=t.layerGap??80,a=t.componentGap??48,r=t.sweeps??4,l=s==="LR",c=ya(e),i=[],d=new Set;for(let x of e.edges){if(x.source===x.target)continue;let S=c.has(x.id)?x.target:x.source,P=c.has(x.id)?x.source:x.target,T=`${S}\x00${P}`;if(!d.has(T))d.add(T),i.push({from:S,to:P})}let u=new Map,p=new Map;for(let x of e.nodes)u.set(x.id,[]),p.set(x.id,[]);for(let x of i)u.get(x.from).push(x.to),p.get(x.to).push(x.from);let h=new Map,g=new Map,m=[];for(let x of e.nodes)if(g.set(x.id,p.get(x.id).length),p.get(x.id).length===0)m.push(x.id),h.set(x.id,0);for(let x=0;x<m.length;x++){let S=m[x];for(let P of u.get(S)){h.set(P,Math.max(h.get(P)??0,h.get(S)+1));let T=g.get(P)-1;if(g.set(P,T),T===0)m.push(P)}}let w=new Map,y=[],v=0;for(let x of wa(e)){let S=[];for(let k of x){let D=h.get(k)??0;while(S.length<=D)S.push([]);S[D].push(k)}let P=new Set(x),T=i.filter((k)=>P.has(k.from)&&h.get(k.to)-h.get(k.from)===1),j=new Map,V=()=>{for(let k of S)k.forEach((D,O)=>j.set(D,k.length>1?O/(k.length-1):0.5))},F=(k,D)=>{let O=new Map;k.forEach((H,_)=>{let Z=D.get(H),ve=k.length>1?_/(k.length-1):0.5;O.set(H,Z.length?Z.reduce((He,we)=>He+j.get(we),0)/Z.length:ve)});let J=new Map(k.map((H,_)=>[H,_]));k.sort((H,_)=>O.get(H)-O.get(_)||J.get(H)-J.get(_)),k.forEach((H,_)=>j.set(H,k.length>1?_/(k.length-1):0.5))};V();let b=S.map((k)=>[...k]),C=Zt(T,j);for(let k=0;k<r&&C>0;k++){for(let O=1;O<S.length;O++)F(S[O],p);for(let O=S.length-2;O>=0;O--)F(S[O],u);let D=Zt(T,j);if(D<C)C=D,b=S.map((O)=>[...O])}let N=(k)=>l?e.size(k).width:e.size(k).height,R=(k)=>l?e.size(k).height:e.size(k).width,L=b.map((k)=>k.reduce((D,O)=>D+R(O),0)+o*Math.max(0,k.length-1)),E=Math.max(0,...L),M=0;b.forEach((k,D)=>{let O=Math.max(0,...k.map(N)),J=v+(E-L[D])/2;for(let H of k){let _=J+R(H)/2;w.set(H,l?{x:M+O/2,y:_}:{x:_,y:M+O/2}),J+=R(H)+o}M+=O+n}),y.push(b),v+=E+a}return{positions:w,layerOf:h,reversed:c,components:y,bounds:e.bounds(w)}}var ka={x:0,y:0,k:1};function es(e,t,s){return Math.min(Math.max(e,t),s)}function Oh(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Ue(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function Ae(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function ts(e,t,s,o=0.1,n=4){let a=es(e.k*s,o,n),r=a/e.k;return{x:t.x-(t.x-e.x)*r,y:t.y-(t.y-e.y)*r,k:a}}function ss(e,t,s=24,o=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...ka};let a=Math.max(1,t.width-s*2),r=Math.max(1,t.height-s*2),l=es(Math.min(a/Math.max(1,e.width),r/Math.max(1,e.height)),o,n);return{x:t.width/2-(e.x+e.width/2)*l,y:t.height/2-(e.y+e.height/2)*l,k:l}}function os(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function ns(e,t,s,o=16){let n=t.x*e.k+e.x,a=t.y*e.k+e.y,r=n+t.width*e.k,l=a+t.height*e.k,c=0,i=0;if(n<o)c=o-n;else if(r>s.width-o)c=s.width-o-r;if(a<o)i=o-a;else if(l>s.height-o)i=s.height-o-l;return c===0&&i===0?e:Ae(e,c,i)}function as(e,t,s){let o=e.get(t);if(!o)return null;let n=s==="left"?-1:s==="right"?1:0,a=s==="up"?-1:s==="down"?1:0,r=null,l=Number.POSITIVE_INFINITY;for(let[c,i]of e){if(c===t)continue;let d=i.x-o.x,u=i.y-o.y,p=d*n+u*a;if(p<=0.5)continue;let h=Math.abs(d*a)+Math.abs(u*n);if(h>p*2)continue;let g=p+h*2;if(g<l)l=g,r=c}return r}function rs(e,t){let s=null,o=Number.POSITIVE_INFINITY;for(let[n,a]of e){let r=(a.x-t.x)**2+(a.y-t.y)**2;if(r<o)o=r,s=n}return s}function Dh(e,t,s){let o=null;for(let[n,a]of t){let r=e.size(n);if(Math.abs(s.x-a.x)<=r.width/2&&Math.abs(s.y-a.y)<=r.height/2)o=n}return o}var Sa="./GraphView-0t3t9mec.stx";var $a="http://www.w3.org/2000/svg",is=3,ls=350,Ta=240,Ea=6.2;function W(e,t={}){let s=document.createElementNS($a,e);for(let o in t)s.setAttribute(o,String(t[o]));return s}var Ia=0;class Aa{root;callbacks;timings={layout:0,render:0};model=new Ie;positions=new Map;shown=new Map;pinned=new Set;view={x:0,y:0,k:1};size={width:0,height:0};layoutName;direction;selected=null;autoFit=!0;animate;minZoom;maxZoom;contextMenu;prefix;surface;status;svg;stage;edgeLayer;nodeLayer;labelLayer;nodeEls=new Map;edgeEls=new Map;idOf=new WeakMap;offsets=new Map;serial=0;gesture=null;pinch=null;lastClick={id:"",at:0};lastExpand=0;frame=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.prefix=`${e.id||"graph"}-${++Ia}`,this.layoutName=t.layout==="force"?"force":"layered",this.direction=t.direction==="TB"?"TB":"LR",this.minZoom=t.minZoom??0.1,this.maxZoom=t.maxZoom??4,this.contextMenu=Boolean(t.contextMenu),this.animate=t.animate!==!1,this.surface=e.querySelector('[data-gv="surface"]')??e,this.status=e.querySelector('[data-gv="status"]'),t.label)this.surface.setAttribute("aria-label",t.label);this.svg=W("svg",{class:"stx-gv-svg","aria-hidden":"false",focusable:"false"}),this.svg.__stx_inert_content=!0;let o=W("defs");for(let n of["arrow","arrow-active"]){let a=W("marker",{id:`${this.prefix}-${n}`,viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:7,markerHeight:7,orient:"auto-start-reverse",class:`stx-gv-${n}`});a.append(W("path",{d:"M 0 0 L 10 5 L 0 10 z"})),o.append(a)}if(this.stage=W("g",{class:"stx-gv-stage"}),this.edgeLayer=W("g",{class:"stx-gv-edges"}),this.nodeLayer=W("g",{class:"stx-gv-nodes"}),this.labelLayer=W("g",{class:"stx-gv-edge-labels"}),this.stage.append(this.edgeLayer,this.nodeLayer,this.labelLayer),this.svg.append(o,this.stage),this.surface.append(this.svg),this.listen(),this.measure(),this.setGraph(t.nodes??[],t.edges??[]),t.selected)this.select(t.selected,{silent:!0});if(typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{if(this.measure(),this.autoFit)this.fit()}),this.observer.observe(this.surface);e.setAttribute("data-gv-ready","")}graph(){return this.model}getViewport(){return{...this.view}}getLayout(){return this.layoutName}getSelected(){return this.selected}getPositions(){return Object.fromEntries([...this.positions].map(([e,t])=>[e,{...t}]))}setGraph(e,t){if(this.stop(),this.model=new Ie(e??[],t??[]),this.positions=new Map,this.pinned.clear(),this.selected&&!this.model.has(this.selected))this.selected=null;this.layout(!1),this.shown=new Map(this.positions),this.render(),this.autoFit=!0,this.fit(),this.mark()}addNeighbours(e,t,s){let o=this.model.merge(t??[],s??[]);if(o.nodes.length===0&&o.edges.length===0)return o;let n=this.shown.get(e)??this.positions.get(e)??Ue(this.view,{x:this.size.width/2,y:this.size.height/2});for(let a of o.nodes)this.shown.set(a,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),o.nodes.length)this.announce(`${o.nodes.length} ${o.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${se(this.model.node(e))}`:""}`);return o}updateNode(e,t){if(!this.model.updateNode(e,t))return;let s=this.nodeEls.get(e);if(s)s.remove(),this.nodeEls.delete(e);this.sync(),this.draw(),this.mark()}setLayout(e){let t=e==="force"?"force":"layered";if(t===this.layoutName)return;this.layoutName=t,this.relayout(),this.callbacks.onLayout?.({layout:t})}setDirection(e){let t=e==="TB"?"TB":"LR";if(t===this.direction)return;if(this.direction=t,this.layoutName==="layered")this.relayout()}select(e,t={}){let s=e!=null&&this.model.has(e)?e:null;if(s===this.selected)return;if(this.selected=s,this.mark(),s)this.describe(s);if(!t.silent)this.callbacks.onSelect?.(this.selection())}focusNode(e){if(!this.model.has(e))return;this.select(e);let t=this.positions.get(e);if(t)this.autoFit=!1,this.setView(os(this.view,t,this.size))}fit(){this.measure(),this.setView(ss(this.model.bounds(this.positions),this.size,32,this.minZoom,Math.min(1,this.maxZoom))),this.autoFit=!0}zoomIn(){this.zoomBy(1.25)}zoomOut(){this.zoomBy(0.8)}zoomBy(e,t){this.autoFit=!1,this.setView(ts(this.view,t??{x:this.size.width/2,y:this.size.height/2},e,this.minZoom,this.maxZoom))}panBy(e,t){this.autoFit=!1,this.setView(Ae(this.view,e,t))}setZoomLimits(e,t){this.minZoom=e,this.maxZoom=t}destroy(){this.stop(),this.observer?.disconnect();for(let e of this.disposers)e();this.svg.remove(),this.root.removeAttribute("data-gv-ready")}selection(){let e=this.selected?this.model.node(this.selected)??null:null;return{node:e,neighbours:e?this.model.neighbours(e.id).map((t)=>this.model.node(t)):[]}}measure(){let e=this.surface.getBoundingClientRect();this.size={width:e.width,height:e.height}}layout(e){let t=performance.now();if(this.layoutName==="layered")this.positions=Qt(this.model,{direction:this.direction}).positions;else this.positions=Xt(this.model,{positions:e&&this.positions.size?this.positions:null,pinned:e?this.pinned:null});this.timings.layout=performance.now()-t}relayout(){if(this.pinned.clear(),this.layout(!1),this.sync(),this.moveToPlace(),this.autoFit)this.fit()}render(){let e=performance.now();this.sync(),this.draw(),this.timings.render=performance.now()-e}sync(){let e=Ut(this.model.metrics);for(let[t,s]of this.nodeEls)if(!this.model.has(t))s.remove(),this.nodeEls.delete(t);for(let t of this.model.nodes){let s=this.nodeEls.get(t.id);if(!s)s=this.buildNode(t,e),this.nodeEls.set(t.id,s),this.idOf.set(s,t.id),this.nodeLayer.append(s);let o=this.model.degree(t.id);s.setAttribute("aria-label",`${se(t)}, ${o} ${o===1?"connection":"connections"}`)}for(let[t,s]of this.edgeEls)if(!this.model.edge(t))s.group.remove(),s.label?.remove(),this.edgeEls.delete(t);for(let t of this.model.edges)if(!this.edgeEls.has(t.id))this.edgeEls.set(t.id,this.buildEdge(t));this.offsets=Wt(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),o=W("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)o.setAttribute("data-kind",e.kind);if(e.expandable===!0)o.setAttribute("data-expandable","");let n=W("title");n.textContent=e.detail?`${se(e)}: ${e.detail}`:se(e);let a=W("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),r=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,l=W("text",{class:"stx-gv-node-label",x:-r,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(l.textContent=Ee(se(e),t),o.append(n,a,l),e.detail){let c=W("text",{class:"stx-gv-node-detail",x:-r,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=Ee(e.detail,Math.floor(t/0.85)),o.append(c)}if(e.expandable===!0){let c=W("text",{class:"stx-gv-node-mark",x:s.width/2-10,y:0,"text-anchor":"middle","dominant-baseline":"central","aria-hidden":"true"});c.textContent="+",o.append(c)}return o}buildEdge(e){let t=W("g",{class:"stx-gv-edge","data-edge":e.id}),s=W("path",{fill:"none"});if(e.directed!==!1)s.setAttribute("marker-end",`url(#${this.prefix}-arrow)`);t.append(s),this.edgeLayer.append(t);let o=null;if(e.label){let n=Ee(String(e.label),32),a=Math.ceil(n.length*Ea)+8;o=W("g",{class:"stx-gv-edge-label","data-edge":e.id});let r=W("rect",{x:-a/2,y:-8,width:a,height:16,rx:3,ry:3}),l=W("text",{"text-anchor":"middle","dominant-baseline":"central"});l.textContent=n,o.append(r,l),this.labelLayer.append(o)}return{group:t,path:s,label:o}}draw(){for(let[e,t]of this.nodeEls){let s=this.shown.get(e)??this.positions.get(e);if(s)t.setAttribute("transform",`translate(${s.x} ${s.y})`)}for(let e of this.model.edges)this.drawEdge(e)}shape(e){let t=this.shown.get(e.source)??this.positions.get(e.source),s=this.shown.get(e.target)??this.positions.get(e.target);if(!t||!s)return null;return _t({source:t,sourceSize:this.model.size(e.source),target:s,targetSize:this.model.size(e.target)},{curve:this.layoutName==="layered"?"bezier":"straight",direction:this.direction,offset:this.offsets.get(e.id)??0,inset:e.directed!==!1?1:0})}drawEdge(e){let t=this.edgeEls.get(e.id),s=t&&this.shape(e);if(!t||!s)return;t.path.setAttribute("d",s.d),t.label?.setAttribute("transform",`translate(${Math.round(s.label.x*10)/10} ${Math.round(s.label.y*10)/10})`)}moveToPlace(){this.stop();let e=typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this.animate||e||typeof requestAnimationFrame!=="function"){this.shown=new Map(this.positions),this.draw();return}let t=new Map;for(let[n,a]of this.positions)t.set(n,this.shown.get(n)??a);let s=performance.now(),o=(n)=>{let a=Math.min(1,(n-s)/Ta),r=1-(1-a)**3;for(let[l,c]of this.positions){let i=t.get(l);this.shown.set(l,{x:i.x+(c.x-i.x)*r,y:i.y+(c.y-i.y)*r})}if(this.draw(),this.frame=a<1?requestAnimationFrame(o):0,a>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(o)}stop(){if(this.frame)cancelAnimationFrame(this.frame);this.frame=0}setView(e){this.view=e,this.stage.setAttribute("transform",`translate(${e.x} ${e.y}) scale(${e.k})`),this.callbacks.onViewport?.({...e})}mark(){let e=this.selected,t=new Set(e?this.model.neighbours(e):[]);this.root.toggleAttribute("data-has-selection",Boolean(e));for(let[o,n]of this.nodeEls)if(n.toggleAttribute("data-selected",o===e),n.toggleAttribute("data-neighbour",t.has(o)),o===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let o of this.model.edges){let n=this.edgeEls.get(o.id);if(!n)continue;let a=e!=null&&(o.source===e||o.target===e);if(n.group.toggleAttribute("data-active",a),n.label?.toggleAttribute("data-active",a),o.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${a?"arrow-active":"arrow"})`)}let s=e?this.nodeEls.get(e):null;if(s)this.surface.setAttribute("aria-activedescendant",s.id);else this.surface.removeAttribute("aria-activedescendant")}describe(e){let t=this.model.node(e);if(!t)return;let s=this.model.neighbours(e).map((a)=>se(this.model.node(a))),o=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${se(t)}, no connections`:`${se(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${o}${n}`)}announce(e){if(this.status)this.status.textContent=e}expand(e,t=!1){let s=this.model.node(e);if(!s)return;if(this.lastExpand=performance.now(),t||s.expandable===!1)this.callbacks.onOpen?.({node:s});else this.callbacks.onExpand?.({node:s})}nodeUnder(e){let t=e instanceof Element?e.closest(".stx-gv-node"):null;return t?this.idOf.get(t)??null:null}local(e){let t=this.surface.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}listen(){let e=(s,o,n)=>{this.surface.addEventListener(s,o,n),this.disposers.push(()=>this.surface.removeEventListener(s,o,n))};e("pointerdown",(s)=>this.onPointerDown(s)),e("pointermove",(s)=>this.onPointerMove(s)),e("pointerup",(s)=>this.onPointerUp(s)),e("pointercancel",()=>this.endGesture()),e("dblclick",(s)=>{let o=this.nodeUnder(s.target);if(o&&performance.now()-this.lastExpand>ls)this.expand(o,s.metaKey||s.ctrlKey)}),e("wheel",(s)=>this.onWheel(s),{passive:!1}),e("keydown",(s)=>this.onKeyDown(s)),e("contextmenu",(s)=>{if(this.contextMenu)s.preventDefault();let o=this.nodeUnder(s.target);if(o)this.select(o);this.callbacks.onContext?.({node:o?this.model.node(o):null,x:s.clientX,y:s.clientY})});let t=(s,o)=>{this.surface.addEventListener(s,o),this.disposers.push(()=>this.surface.removeEventListener(s,o))};t("gesturestart",(s)=>{s.preventDefault();let o=this.local(s);this.pinch={k:this.view.k,x:o.x,y:o.y}}),t("gesturechange",(s)=>{if(!this.pinch)return;s.preventDefault(),this.zoomBy(this.pinch.k*s.scale/this.view.k,{x:this.pinch.x,y:this.pinch.y})}),t("gestureend",()=>{this.pinch=null})}onPointerDown(e){if(e.button!==0)return;let t=this.nodeUnder(e.target);this.surface.focus({preventScroll:!0});try{this.surface.setPointerCapture(e.pointerId)}catch{}this.gesture={pointer:e.pointerId,node:t,startX:e.clientX,startY:e.clientY,origin:t?{...this.positions.get(t)??{x:0,y:0}}:{x:0,y:0},view:{...this.view},moved:!1}}onPointerMove(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;let s=e.clientX-t.startX,o=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<is&&Math.abs(o)<is)return;t.moved=!0,this.stop(),this.shown=new Map(this.positions),this.root.setAttribute("data-dragging",t.node?"node":"pan")}if(t.node){let n={x:t.origin.x+s/this.view.k,y:t.origin.y+o/this.view.k};this.positions.set(t.node,n),this.shown.set(t.node,n),this.nodeEls.get(t.node)?.setAttribute("transform",`translate(${n.x} ${n.y})`);for(let a of this.model.edgesOf(t.node))this.drawEdge(a)}else this.autoFit=!1,this.setView(Ae(t.view,s,o))}onPointerUp(e){let t=this.gesture;if(!t||e.pointerId!==t.pointer)return;if(this.endGesture(),t.moved){if(t.node){this.pinned.add(t.node),this.autoFit=!1;let n=this.positions.get(t.node);this.callbacks.onMove?.({node:this.model.node(t.node),x:n.x,y:n.y})}return}if(!t.node){this.select(null);return}let s=performance.now(),o=this.lastClick.id===t.node&&s-this.lastClick.at<ls;if(this.lastClick=o?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),o)this.expand(t.node,e.metaKey||e.ctrlKey)}endGesture(){let e=this.gesture;if(this.gesture=null,this.root.removeAttribute("data-dragging"),e)try{this.surface.releasePointerCapture(e.pointer)}catch{}}onWheel(e){if(e.preventDefault(),e.ctrlKey||e.metaKey){this.zoomBy(Math.exp(-e.deltaY*(e.deltaMode===1?0.05:0.01)),this.local(e));return}let t=e.deltaMode===1?16:1;this.panBy(-e.deltaX*t,-e.deltaY*t)}onKeyDown(e){let s={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"}[e.key];if(s){e.preventDefault();let n=this.selected?as(this.positions,this.selected,s):rs(this.positions,Ue(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let o=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,o)}else if(o||e.altKey);else if(e.key==="+"||e.key==="=")e.preventDefault(),this.zoomIn();else if(e.key==="-"||e.key==="_")e.preventDefault(),this.zoomOut();else if(e.key==="0")e.preventDefault(),this.fit();else if(e.key==="f"||e.key==="F"){if(!this.selected)return;e.preventDefault(),this.focusNode(this.selected)}else if(e.key==="o"||e.key==="O"){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,!0)}else if(e.key==="Escape"&&this.selected)e.preventDefault(),this.select(null)}bringIntoView(e){let t=this.positions.get(e);if(!t)return;let s=this.model.size(e),o=ns(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(o!==this.view)this.autoFit=!1,this.setView(o)}}var Ma="./GroupedList-j3sxv5pb.stx";var La="./GroupedListRow-v52zmzpk.stx";var Oa="./Image-6x38ddd7.stx";var za="./EmailInput-sf9jfrgz.stx";var ja="./NumberInput-axcfj9y8.stx";var Fa="./PasswordInput-8m3109tp.stx";var qa="./SearchInput-w15r5t95.stx";var Wa="./TextInput-tsvfwxmg.stx";var Ka={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string},Ga={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,leftIcon:f.string,rightIcon:f.string,clearable:f.boolean,maxLength:f.number,showCount:f.boolean,type:f.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:f.string,list:f.string,minLength:f.number,htmlSize:f.number,autofocus:f.boolean},Ua={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,min:f.number,max:f.number,step:f.number,showControls:f.boolean},Ja={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,showStrength:f.boolean},Ya={value:f.string,onChange:f.func,placeholder:f.string,disabled:f.boolean,readonly:f.boolean,size:f.oneOf(["sm","md","lg"]),error:f.boolean,label:f.string,helperText:f.string,required:f.boolean,className:f.string,inputClassName:f.string,onSearch:f.func,loading:f.boolean},af=ee("TextInput",Ga),rf=ee("EmailInput",Ka),lf=ee("PasswordInput",Ja),cf=ee("NumberInput",Ua),df=ee("SearchInput",Ya);var Xa=new Set(["array","set"]),Za=/^[A-Z_$][\w$]*$/i;function Xe(e){return Xa.has(e.kind)}function Je(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Ze(e,t="$"){let s=t;for(let o of e)if(typeof o==="number")s+=`[${o}]`;else if(Za.test(o))s+=`.${o}`;else s+=`[${JSON.stringify(o)}]`;return s}function Ye(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Xe(e))return e.children.map((s)=>Ye(s));let t={};return e.children.forEach((s,o)=>{t[s.key!==void 0?String(s.key):s.label??String(o)]=Ye(s)}),t}if("value"in e){let t=e.value;if(typeof t==="bigint")return t.toString();if(typeof t==="number"&&!Number.isFinite(t))return String(t);if(typeof t==="function"||typeof t==="symbol")return e.preview??String(t);return t}return e.preview??null}function ds(e,t=2){let s=Ye(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var cs=80;function Qe(e){if(e.preview!==void 0)return e.preview;if(e.ref!==void 0)return"[Circular]";if(e.children||e.more){let t=(e.children?.length??0)+(e.more??0);if(Xe(e))return`${e.kind==="set"?"Set":"Array"}(${t})`;return t===0?"{}":`{${t}}`}if("value"in e){let t=e.value;if(typeof t==="string")return JSON.stringify(t.length>cs?`${t.slice(0,cs)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function bf(e,t,s={}){let o=s.maxItems??1000,n=s.maxDepth??32,a=new Map,r=1,l=(i,d)=>{if(d!==void 0)i.label=d;return i},c=(i,d,u)=>{if(i===null)return l({kind:"null",value:null,preview:"null"},d);switch(typeof i){case"undefined":return l({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return l({kind:typeof i,value:i},d);case"symbol":return l({kind:"symbol",preview:i.toString()},d);case"function":return l({kind:"function",preview:`\u0192 ${i.name||"(anonymous)"}()`},d)}let p=i,h=a.get(p);if(h!==void 0)return l({kind:"ref",ref:h},d);if(p instanceof Date)return l({kind:"date",value:Number.isNaN(p.getTime())?null:p.toISOString(),preview:Number.isNaN(p.getTime())?"Invalid Date":p.toISOString()},d);if(p instanceof RegExp)return l({kind:"regexp",value:p.toString(),preview:p.toString()},d);let g=`v${r++}`;a.set(p,g);let m=Array.isArray(p),w=p instanceof Set,y=p instanceof Map,v=l({id:g,kind:m?"array":w?"set":y?"map":"object",children:[]},d);if(u>=n)return v.preview=m?"Array":"Object",delete v.children,v;let x=v.children,S=0;if(m||w)for(let P of p){if(S<o)x.push(c(P,String(S),u+1));S++}else if(y)for(let[P,T]of p){if(S<o)x.push(c(T,typeof P==="string"?P:Qe(c(P,void 0,n)),u+1));S++}else{for(let T of Object.keys(p)){if(S<o)x.push(c(p[T],T,u+1));S++}let P=p.constructor?.name;if(P&&P!=="Object")v.preview=`${P} {${S}}`}if(S>x.length)v.more=S-x.length;if(y)v.preview=`Map(${S})`;return v};return c(e,t,0)}class et{rows=[];version=0;roots=[];depth;opened=new Set;closed=new Set;index=null;constructor(e,t={}){this.depth=t.depth??1,this.setValue(e)}setValue(e){this.roots=e==null?[]:Array.isArray(e)?e:[e],this.opened.clear(),this.closed.clear(),this.flatten()}setDepth(e){this.depth=e,this.opened.clear(),this.closed.clear(),this.flatten()}getRoots(){return this.roots}indexOf(e){if(!this.index){this.index=new Map;for(let t=0;t<this.rows.length;t++)this.index.set(this.rows[t].id,t)}return this.index.get(e)??-1}pathOf(e){let t=[];for(let s=e;s>=0;s=this.rows[s].parent){let o=this.rows[s];if(o.isMore)continue;if(o.parent!==-1||this.roots.length>1)t.push(o.key)}return t.reverse()}isExpanded(e,t){return this.opened.has(e)||t<this.depth&&!this.closed.has(e)}expand(e){return this.set(e,!0)}collapse(e){return this.set(e,!1)}toggle(e){let t=this.indexOf(e);if(t===-1)return!1;return this.set(e,!this.rows[t].expanded)}expandAll(e){let t=(s,o,n)=>{if(!Je(s))return;if(n>=this.depth)this.opened.add(o);this.closed.delete(o),s.children?.forEach((a,r)=>t(a,a.id??`${o}.${r}`,n+1))};if(e===void 0)this.roots.forEach((s,o)=>t(s,s.id??String(o),0));else{let s=this.find(e);if(!s)return;t(s.node,e,s.ancestors.length)}this.flatten()}collapseAll(){this.opened.clear(),this.closed.clear();let e=(t,s,o)=>{if(o>=this.depth||!Je(t))return;this.closed.add(s),t.children?.forEach((n,a)=>e(n,n.id??`${s}.${a}`,o+1))};this.roots.forEach((t,s)=>e(t,t.id??String(s),0)),this.flatten()}reveal(e){let t=this.find(e);if(!t)return-1;return t.ancestors.forEach((s,o)=>{if(this.closed.delete(s),o>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let o=this.find(e);if(!o)return!1;let n=o.node;if(n.children=[...n.children??[],...t],s>0)n.more=s;else delete n.more;return this.flatten(),!0}move(e,t,s=10){let o=this.rows.length-1;if(o<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),o),a=this.rows[n],r=(l)=>({index:Math.min(Math.max(l,0),o),changed:!1});switch(t){case"ArrowDown":return r(e<0?0:n+1);case"ArrowUp":return r(n-1);case"Home":return r(0);case"End":return r(o);case"PageDown":return r(n+s);case"PageUp":return r(n-s);case"ArrowRight":if(!a.expandable||a.isMore)return r(n);if(!a.expanded)return{index:n,changed:this.expand(a.id)};return r(n+1);case"ArrowLeft":if(a.expanded&&!a.isMore)return{index:n,changed:this.collapse(a.id)};return r(a.parent===-1?n:a.parent);case"*":{let l=!1,c=a.parent,i=this.rows.filter((d)=>d.parent===c&&d.depth===a.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of i)this.mark(d.id,d.depth,!0),l=!0;if(l)this.flatten();return{index:this.indexOf(a.id),changed:l}}}return r(n)}typeahead(e,t){let s=t.toLowerCase(),o=this.rows.length;if(s===""||o===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let a=0;a<o;a++){let r=(n+a+o)%o,l=this.rows[r];if(!l.isMore&&(l.node.label??"").toLowerCase().startsWith(s))return r}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let o=this.rows[s];if(!o.expandable||o.isMore||o.expanded===t)return!1;return this.mark(e,o.depth,t),this.flatten(),!0}mark(e,t,s){if(s){if(this.closed.delete(e),t>=this.depth)this.opened.add(e)}else if(this.opened.delete(e),t<this.depth)this.closed.add(e)}find(e){let t=[];for(let s=this.roots.length-1;s>=0;s--)t.push({node:this.roots[s],id:this.roots[s].id??String(s),ancestors:[]});while(t.length>0){let s=t.pop();if(s.id===e)return{node:s.node,ancestors:s.ancestors};let o=s.node.children;if(!o||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let a=o.length-1;a>=0;a--)t.push({node:o[a],id:o[a].id??`${s.id}.${a}`,ancestors:n})}return null}flatten(){let e=[],t=(s,o,n,a,r,l,c)=>{let i=Je(s),d=i&&this.isExpanded(o,n),u=e.length;if(e.push({id:o,node:s,depth:n,key:r,parent:a,expandable:i,expanded:d,posInSet:l,setSize:c,isMore:!1}),!d)return;let p=s.children??[],h=s.more??0,g=Xe(s),m=p.length+(h>0?1:0);for(let w=0;w<p.length;w++){let y=p[w];t(y,y.id??`${o}.${w}`,n+1,u,y.key??(g?w:y.label??w),w+1,m)}if(h>0)e.push({id:`${o}.+`,node:s,depth:n+1,key:"",parent:u,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,o)=>t(s,s.id??String(o),0,-1,s.key??o,o+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var er="./JsonTree-satc4010.stx";var hs=new Set(["array","object","map","set","model","error"]);function tr(e){return e.t==="object"||e.t==="model"}function ps(e){return e.length>0&&e.slice(0,20).every(tr)}function us(e){return e.some((t)=>hs.has(t.t))}function tt(e,t){let s=e.length>120?`${e.slice(0,120)}\u2026`:e;return t?`${JSON.stringify(s)} (${t} more characters)`:JSON.stringify(s)}function sr(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function wf(e,t,s={}){let o=s.idPrefix??"t",n=(i)=>`${o}${i}`,a=(i,d)=>{if(d!==void 0)i.label=d;return i},r=(i)=>c(i,void 0).preview??i.t,l=(i,d)=>{if(d.length>0)i.openable=d.length===1?d[0]:d;return i};function c(i,d){switch(i.t){case"undefined":return a({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return a({kind:"null",value:null,preview:"null"},d);case"boolean":return a({kind:"boolean",value:i.v,preview:String(i.v)},d);case"number":{let u=typeof i.v==="number"?i.v:i.v==="-0"?-0:Number(i.v);return a({kind:"number",value:u,preview:String(i.v)},d)}case"bigint":return a({kind:"bigint",value:i.v,preview:`${i.v}n`},d);case"string":return a({kind:"string",value:i.v,preview:tt(i.v,i.truncated)},d);case"symbol":return a({kind:"symbol",preview:`Symbol(${i.v})`},d);case"function":{let u=i.kind==="class"?`class ${i.name}`:`${i.kind==="async"?"async ":""}\u0192${i.kind==="generator"?"*":""} ${i.name}()`;return a({kind:"function",preview:u},d)}case"date":return a({kind:"date",value:i.v,preview:i.v??"Invalid Date"},d);case"regexp":return a({kind:"regexp",value:i.v,preview:i.v},d);case"url":return a({kind:"url",value:i.v,preview:i.v},d);case"promise":return a({kind:"promise",preview:"Promise"},d);case"bytes":{let u=i.length*2>i.hex.length;return a({kind:"bytes",value:i.hex,preview:`${i.ctor}(${i.length}) <${i.hex}${u?"\u2026":""}>`},d)}case"ref":return a({kind:"ref",ref:n(i.id),preview:"[Circular]"},d);case"cut":return a({kind:"cut",preview:`${i.ctor??"Object"} \u2026 (${i.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let u={id:n(i.id),kind:"array",preview:`${i.ctor??"Array"}(${i.length})`,children:i.items.map((p,h)=>c(p,String(h)))};if(i.more)u.more=i.more;return a(l(u,ps(i.items)?["table"]:[]),d)}case"set":{let u={id:n(i.id),kind:"set",preview:`Set(${i.size})`,children:i.items.map((p,h)=>c(p,String(h)))};if(i.more)u.more=i.more;return a(l(u,ps(i.items)?["table"]:[]),d)}case"object":{let u=i.entries.slice(0,5).map(([m])=>m).join(", "),p=i.entries.length+(i.more??0),h=p===0?"{}":`{${u}${p>5?", \u2026":""}}`,g={id:n(i.id),kind:"object",preview:i.ctor&&i.ctor!=="Object"?`${i.ctor} ${h}`:h,children:i.entries.map(([m,w])=>c(w,m))};if(i.more)g.more=i.more;return a(l(g,us(i.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let u={id:n(i.id),kind:"map",preview:`Map(${i.size})`,children:i.entries.map(([p,h],g)=>{if(!hs.has(p.t)){let m=c(h,r(p));return m.key=p.t==="string"?p.v:r(p),m}return{kind:"entry",label:String(g),key:g,preview:`${r(p)} => ${r(h)}`,children:[c(p,"key"),c(h,"value")]}})};if(i.more)u.more=i.more;return a(l(u,us(i.entries.map((p)=>p[1]))?["graph"]:[]),d)}case"model":{let u=i.attributes.map(([g,m])=>c(m,g));for(let[g,m]of i.loaded??[]){let w=c(m,g);w.meta=w.meta??{relation:!0},u.push(w)}if(i.hidden?.length)u.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:i.hidden.join(", "),children:i.hidden.map((g,m)=>({kind:"hidden",label:String(m),value:g,preview:g}))});if(i.relations?.length)u.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${i.relations.length} declared`,children:i.relations.map((g)=>({kind:"relation",label:g.name??g.model,value:g,preview:`${g.kind} ${g.model}`}))});let p={model:i.model,hidden:i.hidden??[],relations:i.relations??[]};if(i.table)p.table=i.table;if(i.primaryKey)p.primaryKey=i.primaryKey;let h={id:n(i.id),kind:"model",preview:i.key?`${i.model} #${r(i.key).replace(/^"|"$/g,"")}`:i.model,children:u,meta:p};if(i.more)h.more=i.more;return a(l(h,["graph"]),d)}case"html":{let u={kind:i.kind};if(i.title)u.title=i.title;if(i.text)u.text=i.text;if(i.truncated)u.truncated=i.truncated;let p=i.truncated?`, ${i.truncated} more cut`:"",h=i.title?`: ${i.title}`:"";return a(l({kind:"html",value:i.html,preview:`${i.kind}${h} (${i.html.length} characters${p})`,meta:u},["preview"]),d)}case"error":{let u=[{kind:"string",label:"message",value:i.message,preview:tt(i.message)}];if(i.frames?.length)u.push({kind:"stack",label:"stack",preview:`${i.frames.length} frames`,value:i.stack,children:i.frames.map((p,h)=>({kind:"frame",label:String(h),value:p,preview:[p.function,sr(p)].filter(Boolean).join(" at ")||"(unknown)",meta:p}))});else if(i.stack)u.push({kind:"string",label:"stack",value:i.stack,preview:tt(i.stack)});if(i.cause)u.push(c(i.cause,"cause"));for(let[p,h]of i.entries??[])u.push(c(h,p));return a({kind:"error",preview:i.message?`${i.name}: ${i.message}`:i.name,children:u},d)}}return a({kind:"unknown",preview:String(i.t??"unknown")},d)}return c(e,t)}var or=600,fs=400,ms={table:"Table",graph:"Graph",preview:"Preview"};function gs(e){return e.length>fs?`${e.slice(0,fs)}\u2026`:e}function bs(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class nr{root;callbacks;model;scroller;content;rowsEl;status;prefix;rowHeight;overscan;openable;contextMenu;pool=[];parts=new WeakMap;active=-1;activeId="";typed="";typedAt=0;observer=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;let o=(a)=>e.querySelector(`[data-jt="${a}"]`);this.scroller=o("scroller")??e,this.content=o("content")??this.scroller,this.rowsEl=o("rows")??this.content,this.status=o("status"),this.prefix=`${e.id||`json-tree-${Math.random().toString(36).slice(2,8)}`}-row-`,this.rowHeight=t.rowHeight&&t.rowHeight>0?t.rowHeight:22,this.overscan=t.overscan??6,this.openable=t.openable??null,this.contextMenu=Boolean(t.contextMenu),this.model=new et(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(a,r,l,c)=>{a.addEventListener(r,l,c),this.disposers.push(()=>a.removeEventListener(r,l,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(a)=>this.onKeyDown(a)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(a)=>{if(a.target.closest("[data-jt-action]"))a.preventDefault()}),n(this.rowsEl,"click",(a)=>this.onClick(a)),n(this.rowsEl,"dblclick",(a)=>this.onDoubleClick(a)),n(this.rowsEl,"contextmenu",(a)=>this.onContextMenu(a)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.render()),this.observer.observe(this.scroller);this.render(),e.setAttribute("data-jt-ready","")}setValue(e){this.model.setValue(e),this.active=-1,this.activeId="",this.scroller.scrollTop=0,this.render()}setDepth(e){this.model.setDepth(e),this.afterChange()}setOpenable(e){this.openable=e??null,this.model.version++,this.render()}setContextMenu(e){this.contextMenu=e}expandAll(e){this.model.expandAll(e),this.afterChange()}collapseAll(){this.model.collapseAll(),this.afterChange()}expand(e){let t=this.model.expand(e);if(t)this.afterChange();return t}collapse(e){let t=this.model.collapse(e);if(t)this.afterChange();return t}reveal(e){let t=this.model.reveal(e);if(t===-1)return this.afterChange(),!1;return this.active=t,this.activeId=e,this.scrollToRow(t),this.render(),this.emitSelect(),!0}appendChildren(e,t,s=0){let o=this.model.appendChildren(e,t,s);if(o)this.afterChange();return o}getSelected(){return this.active===-1?null:this.detail(this.active)}select(e){let t=this.model.indexOf(e);if(t===-1)return!1;return this.setActive(t,!0),!0}focus(){this.scroller.focus()}get drawn(){return this.pool.filter((e)=>e.style.display!=="none").length}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();this.rowsEl.textContent="",this.pool=[],this.root.removeAttribute("data-jt-ready")}afterChange(){if(this.activeId){let e=this.model.indexOf(this.activeId);if(this.active=e,e===-1)this.activeId=""}this.render()}detail(e){let t=this.model.rows[e],s=this.model.pathOf(e);return{id:t.id,node:t.node,path:s,pathText:Ze(s)}}emitSelect(){if(this.active!==-1)this.callbacks.onSelect?.(this.detail(this.active))}setActive(e,t){if(e<0||e>=this.model.rows.length)return;let s=e!==this.active;if(this.active=e,this.activeId=this.model.rows[e].id,t)this.scrollToRow(e);if(this.render(),s)this.emitSelect()}scrollToRow(e){let t=e*this.rowHeight,s=this.scroller.clientHeight;if(t<this.scroller.scrollTop)this.scroller.scrollTop=t;else if(t+this.rowHeight>this.scroller.scrollTop+s)this.scroller.scrollTop=t+this.rowHeight-s}pageSize(){return Math.max(1,Math.floor(this.scroller.clientHeight/this.rowHeight)-1)}createRow(){let e=document.createElement("div");e.setAttribute("role","treeitem"),e.className="stx-jt-row";let t=(o,n)=>{let a=document.createElement("span");if(a.className=o,n)a.setAttribute("aria-hidden","true");return e.appendChild(a),a},s={twisty:t("stx-jt-twisty",!0),label:t("stx-jt-label",!1),separator:t("stx-jt-separator",!0),preview:t("stx-jt-preview",!1),actions:t("stx-jt-actions",!1)};return s.separator.textContent=": ",this.parts.set(e,s),this.rowsEl.appendChild(e),e}button(e,t,s,o){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),o)n.setAttribute("data-jt-as",o);return n.setAttribute("aria-label",s),n.textContent=t,n}opensOf(e,t){if(e.isMore)return[];if(this.openable){let s=this.openable(e.node,this.model.pathOf(t));if(s!==void 0)return bs(s)}return bs(e.node.openable)}render(){let e=this.model.rows,t=e.length,s=this.scroller.clientHeight;this.content.style.height=`${t*this.rowHeight}px`;let o=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(o/this.rowHeight)-this.overscan),a=Math.min(t,Math.ceil((o+s)/this.rowHeight)+this.overscan),r=Math.max(0,a-n);while(this.pool.length<r)this.pool.push(this.createRow());let l=this.pool.length,c=new Uint8Array(l);for(let d=n;d<a;d++){let u=d%l;c[u]=1,this.paint(this.pool[u],e[d],d)}for(let d=0;d<l;d++)if(!c[d]&&this.pool[d].style.display!=="none")this.pool[d].style.display="none",this.pool[d].__jt=void 0,this.pool[d].removeAttribute("id");if(this.active>=n&&this.active<a)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let o=this.model.version,n=s===this.active,a=e.__jt;if(!a||a.index!==s||a.version!==o){let r=this.parts.get(e),l=t.node;if(e.style.display="",e.style.transform=`translateY(${s*this.rowHeight}px)`,e.style.setProperty("--stx-tree-depth",String(t.depth)),e.id=this.prefix+s,e.setAttribute("data-jt-index",String(s)),e.setAttribute("aria-level",String(t.depth+1)),e.setAttribute("aria-posinset",String(t.posInSet)),e.setAttribute("aria-setsize",String(t.setSize)),t.expandable)e.setAttribute("aria-expanded",t.expanded?"true":"false");else e.removeAttribute("aria-expanded");if(t.isMore)e.setAttribute("data-kind","more"),r.twisty.textContent="",r.label.textContent="",r.separator.style.display="none",r.preview.textContent=`\u2026 ${l.more} more`,r.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",l.kind),r.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=l.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");r.label.textContent=gs(d),r.separator.style.display=d===""?"none":"",r.preview.textContent=gs(Qe(l)),r.preview.setAttribute("data-kind",l.kind)}let c=this.opensOf(t,s),i=t.isMore?"+":c.join("|");if(!a||a.opens!==i)if(r.actions.textContent="",t.isMore)r.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)r.actions.appendChild(this.button("open",ms[d]??d,`Open as ${ms[d]?.toLowerCase()??d}`,d));r.actions.appendChild(this.button("copy-value","Copy","Copy value")),r.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:o,opens:i}}if(n)e.setAttribute("aria-selected","true"),e.setAttribute("data-active","");else e.setAttribute("aria-selected","false"),e.removeAttribute("data-active")}rowIndexOf(e){let t=e instanceof Element?e.closest("[data-jt-index]"):null;if(!t||t.style.display==="none")return-1;return Number(t.getAttribute("data-jt-index"))}say(e){if(this.status)this.status.textContent=e}toggleRow(e){let t=this.model.rows[e];if(!t)return;if(t.isMore){this.loadMore(e);return}if(t.node.ref!==void 0){this.follow(e);return}if(!t.expandable)return;let s=t.id;this.model.toggle(s),this.afterChange();let o=this.model.indexOf(s);if(o!==-1)this.callbacks.onToggle?.({...this.detail(o),expanded:this.model.rows[o].expanded})}follow(e){let t=this.model.rows[e].node.ref;if(t===void 0)return;if(!this.reveal(t))this.say("The value this points back to is not part of what was sent.")}loadMore(e){let s=this.model.rows[e].parent;if(s===-1)return;this.callbacks.onLoadMore?.(this.detail(s))}copy(e,t){let s=this.model.rows[e];if(!s)return;let o=s.isMore?s.parent:e,n=this.model.pathOf(o),a=this.model.rows[o].node,r=t==="path"?Ze(n):ds(a);try{navigator.clipboard?.writeText(r)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${r}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:r,path:n,node:a})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let o=t??this.opensOf(s,e)[0];if(o===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:o})}onClick(e){let t=this.rowIndexOf(e.target);if(t===-1)return;let s=e.target instanceof Element?e.target.closest("[data-jt-action]"):null;if(this.setActive(t,!1),s){let n=s.getAttribute("data-jt-action");if(n==="copy-value")this.copy(t,"value");else if(n==="copy-path")this.copy(t,"path");else if(n==="open")this.open(t,s.getAttribute("data-jt-as")??void 0);else if(n==="more")this.loadMore(t);return}let o=this.model.rows[t];if(o.expandable||o.isMore||o.node.ref!==void 0)this.toggleRow(t)}onDoubleClick(e){let t=this.rowIndexOf(e.target);if(t===-1||e.target instanceof Element&&e.target.closest("[data-jt-action]"))return;let s=this.model.rows[t];if(!s.expandable&&!s.isMore&&s.node.ref===void 0)this.open(t)}onContextMenu(e){let t=this.rowIndexOf(e.target);if(t===-1)return;if(this.setActive(t,!1),this.contextMenu)e.preventDefault();this.callbacks.onContext?.({...this.detail(t),x:e.clientX,y:e.clientY})}onKeyDown(e){let t=this.model.rows;if(t.length===0)return;let s=e.metaKey||e.ctrlKey,o=e.key;if(s&&(o==="c"||o==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(o==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=or;if(o==="Enter"||o===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(o==="ArrowDown"||o==="ArrowUp"||o==="ArrowLeft"||o==="ArrowRight"||o==="Home"||o==="End"||o==="PageDown"||o==="PageUp"||o==="*"){e.preventDefault(),this.typed="";let a=this.active===-1?null:t[this.active],r=a?.expanded,l=this.model.move(this.active,o,this.pageSize());if(l.changed){if(this.active=l.index,this.activeId=this.model.rows[l.index]?.id??"",this.scrollToRow(l.index),this.render(),a&&o!=="*"){let c=this.model.indexOf(a.id);if(c!==-1&&this.model.rows[c].expanded!==r)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(l.index,!0);return}if(o.length===1){let a=Date.now();if(!n)this.typed="";this.typedAt=a,this.typed+=o;let r=this.model.typeahead(this.active,this.typed);if(r!==-1)e.preventDefault(),this.setActive(r,!0)}}}var rr="./List-q8ff8gdr.stx";var lr="./Listbox-83j2q4x6.stx";var dr="./ListboxButton-gan8e3nw.stx";var ur="./ListboxLabel-ka0hfm7b.stx";var fr="./ListboxOption-gpaqvk3s.stx";var gr="./ListboxOptions-2928864k.stx";var xr="./FilterChip-bynt5maa.stx";var wr="./FilterChips-mpmev5v5.stx";var kr="./ListRow-nvyg2fwb.stx";var Sr="./NavBar-ky8tedjb.stx";var Tr="./SectionCard-8b5fyrjd.stx";var Ir="./TabBar-6m1ajm1d.stx";var Pr="./TabBarItem-kddfnhk3.stx";var Rr="./Navigator-1yk1c3pp.stx";var Nr="./Notification-b3cz24f0.stx";var Dr="./Pager-5e7knyqh.stx";var Hr="./PagerDots-076w890y.stx";var Vr="./Pagination-8bhbkpcp.stx";var Br="./Checkout-crbegxyv.stx";var _r="./DefaultPaymentMethod-ss3x61tr.stx";var Kr="./PaymentMethods-z4hhr0kv.stx";var Ur="./SubscriptionCheckout-rdcv32n1.stx";var Yr="./Popover-jjt7p7sn.stx";var Zr="./PopoverButton-ks3cttd9.stx";var ei="./PopoverPanel-ddgj4gz3.stx";var si="./Portal-m73vz879.stx";var ys=[{name:"phone",label:"Phone",width:390,height:844},{name:"tablet",label:"Tablet",width:820,height:1180},{name:"desktop",label:"Desktop",width:1280,height:800}];function xs(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function st(e,t={}){let s=xs(t.width),o=xs(t.height),n=Boolean(t.landscape);if(s&&o)return{name:"custom",size:{width:s,height:o},landscape:!1};let a=ys.find((l)=>l.name===e);if(!a)return{name:"fill",size:null,landscape:!1};let r=n&&a.height>a.width;return{name:a.name,size:r?{width:a.height,height:a.width}:{width:a.width,height:a.height},landscape:r}}function ks(e,t,s=0){let o=t.width-s*2,n=t.height-s*2;if(o<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,o/e.width,n/e.height)}function Cs(e,t=1){if(!e.size)return"Fills the frame";let s=`${e.size.width} \xD7 ${e.size.height}`;return t<0.995?`${s} at ${Math.round(t*100)}%`:s}function ot(e){return e==="light"||e==="dark"?e:"auto"}var oi=["allow-same-origin","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols","allow-popups","allow-popups-to-escape-sandbox","allow-modals","allow-downloads","allow-pointer-lock","allow-presentation","allow-storage-access-by-user-activation"];function Ss(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function zm(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>oi.includes(s))}var ni=/<!doctype\s|<html[\s>]/i,vs=/<head(?:\s[^>]*)?>/i,ws=/<html(?:\s[^>]*)?>/i,ai=/<base[\s>]/i,ri=/<meta[^>]+name\s*=\s*["']?color-scheme/i;function ii(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function $s(e,t={}){let s=e==null?"":String(e),o='<base target="_blank">';if(!ni.test(s))return`<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><base target="_blank">${t.title?`<title>${ii(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(ai.test(s))return s;if(vs.test(s))return s.replace(vs,(n)=>n+'<base target="_blank">');if(ws.test(s))return s.replace(ws,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function Hm(e){return ri.test(e)}function Ts(e,t){let s=["fill",...ys.map((n)=>n.name)],o=s.indexOf(e);return s[((o<0?0:o)+t+s.length)%s.length]}var ci="./PreviewFrame-erbgvzj8.stx";var di=16;class pi{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;stage;device;observer=null;pending=0;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;this.html=t.html??"",this.viewportName=t.viewport||"fill",this.frameWidth=t.frameWidth??null,this.frameHeight=t.frameHeight??null,this.landscape=Boolean(t.landscape),this.scheme=ot(t.scheme),this.scripts=Boolean(t.scripts),this.forms=Boolean(t.forms),this.title=t.title||"Preview",this.viewport=this.resolve(),this.stage=this.part("stage"),this.device=this.part("device");let o=(a)=>this.onToolbarClick(a),n=(a)=>this.onToolbarKey(a);if(this.root.addEventListener("click",o),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",o),()=>this.root.removeEventListener("keydown",n)),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>{cancelAnimationFrame(this.pending),this.pending=requestAnimationFrame(()=>this.layout())}),this.observer.observe(this.stage);this.load(),this.reflect(),this.root.setAttribute("data-preview-ready","")}getState(){return{viewport:this.viewport.name,width:this.viewport.size?.width??null,height:this.viewport.size?.height??null,landscape:this.viewport.landscape,scale:this.scale,scheme:this.scheme,effectiveScheme:this.effectiveScheme()}}setHtml(e){let t=e==null?"":String(e);if(t===this.html)return;this.html=t,this.load()}setViewport(e,t={}){if(this.viewportName=e||"fill","landscape"in t)this.landscape=Boolean(t.landscape);if("width"in t)this.frameWidth=t.width??null;if("height"in t)this.frameHeight=t.height??null;let s=JSON.stringify(this.viewport);if(this.viewport=this.resolve(),this.layout(),this.reflect(),JSON.stringify(this.viewport)!==s)this.callbacks.onViewport?.(this.getState())}setScheme(e){let t=ot(e);if(t===this.scheme)return;this.scheme=t,this.applyScheme(),this.reflect(),this.callbacks.onScheme?.(this.getState())}setPermissions(e){let t=e.scripts??this.scripts,s=e.forms??this.forms;if(t===this.scripts&&s===this.forms)return;this.scripts=t,this.forms=s,this.load()}reload(){this.load(),this.callbacks.onReload?.(this.getState())}destroy(){this.observer?.disconnect(),cancelAnimationFrame(this.pending);for(let e of this.disposers)e();this.frame?.remove(),this.frame=null,this.root.removeAttribute("data-preview-ready")}part(e){let t=this.root.querySelector(`[data-pf="${e}"]`);if(!t)throw Error(`PreviewFrame: the template has no ${e} part`);return t}resolve(){return st(this.viewportName,{width:this.frameWidth,height:this.frameHeight,landscape:this.landscape})}effectiveScheme(){if(this.scheme!=="auto")return this.scheme;if(this.root.closest(".dark"))return"dark";if(this.root.closest(".light"))return"light";return typeof matchMedia==="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",Ss({scripts:this.scripts,forms:this.forms})),e.setAttribute("referrerpolicy","no-referrer"),e.setAttribute("title",this.title),e.setAttribute("data-pf","frame"),e.className="stx-preview-frame",e.addEventListener("load",()=>{if(e===this.frame)this.callbacks.onLoad?.(this.getState())}),e.srcdoc=$s(this.html,{title:this.title}),this.frame?.remove(),this.frame=e,this.applyScheme(),this.device.appendChild(e),this.layout()}applyScheme(){let e=this.effectiveScheme();if(this.root.setAttribute("data-scheme",e),this.frame)this.frame.style.colorScheme=e}layout(){let e=this.frame;if(!e)return;let t=this.viewport.size;if(this.root.setAttribute("data-viewport",this.viewport.name),!t)this.scale=1,this.device.style.width="",this.device.style.height="",e.style.width="",e.style.height="",e.style.transform="";else{let o=this.stage.getBoundingClientRect();this.scale=ks(t,{width:o.width,height:o.height},di),this.device.style.width=`${t.width*this.scale}px`,this.device.style.height=`${t.height*this.scale}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=this.scale===1?"":`scale(${this.scale})`}let s=this.root.querySelector('[data-pf="size"]');if(s)s.textContent=Cs(this.viewport,this.scale)}reflect(){for(let o of this.root.querySelectorAll("[data-pf-viewport]")){let n=o.getAttribute("data-pf-viewport")===this.viewport.name;o.setAttribute("aria-checked",String(n)),o.tabIndex=n?0:-1}if(!this.root.querySelector('[data-pf-viewport][tabindex="0"]'))this.root.querySelector("[data-pf-viewport]")?.setAttribute("tabindex","0");let e=this.effectiveScheme()==="dark",t=this.root.querySelector('[data-pf-action="scheme"]');if(t){t.setAttribute("aria-pressed",String(e));let o=t.querySelector('[data-pf="scheme-text"]');if(o)o.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let o=st(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!o||this.viewport.name==="custom"||o.height<=o.width,s.setAttribute("aria-pressed",String(this.viewport.landscape))}}onToolbarClick(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport], [data-pf-action]"):null;if(!t||!this.root.contains(t))return;let s=t.getAttribute("data-pf-viewport");if(s){this.setViewport(s,{width:null,height:null});return}switch(t.getAttribute("data-pf-action")){case"scheme":this.setScheme(this.effectiveScheme()==="dark"?"light":"dark");break;case"rotate":this.setViewport(this.viewportName,{landscape:!this.landscape});break;case"reload":this.reload();break}}onToolbarKey(e){let t=e.target instanceof Element?e.target.closest("[data-pf-viewport]"):null;if(!t)return;let s=e.key==="ArrowRight"||e.key==="ArrowDown"?1:e.key==="ArrowLeft"||e.key==="ArrowUp"?-1:0;if(s===0)return;e.preventDefault();let o=t.getAttribute("data-pf-viewport")||"fill",n=Ts(o,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var hi="./Progress-2qzb77kc.stx";var mi="./Radio-8153x74w.stx";var bi="./RadioGroup-smqcqgds.stx";var vi="./RadioGroupDescription-z34r9avr.stx";var yi="./RadioGroupLabel-ka0hfm7b.stx";var Ci="./RadioGroupOption-twcw1b2a.stx";var $i="./SegmentedControl-fr69q4gb.stx";var Ei="./Select-1cnqbcmg.stx";var Ai="./Sidebar-8dygywjv.stx";var Mi="./SidebarFooter-s7skj92y.stx";var Li="./SidebarHeader-x7jdhmyr.stx";var Oi="./SidebarItem-64sjb2fe.stx";var zi="./SidebarPinned-48kyk193.stx";var ji="./SidebarSection-vx5bahsk.stx";var Fi="./SidebarSpace-bwv98azf.stx";var qi="./SidebarSpaces-mdtrynr2.stx";var Wi="./SidebarSpaceSwitcher-1mycft2g.stx";var Pe={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},ie={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ki={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Gi={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ui={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Ji={...ie,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Yi={...ie,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Xi={...ie,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Es={macos:ie,tahoe:ie,"macos-tahoe":ie,"macos-latest":ie,arc:Ui,workspace:Ki,desktop:Gi,solid:Ji,transparent:Yi,vibrancy:Xi};function Cg(e){return Es[e||"macos"]||Es.macos}function Sg(e){if(!e)return;return Pe[e]||e}var Zi=Pe.gray;function ae(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Is(e){return{light:{from:ae(e,35,"#ffffff"),to:ae(e,12.5,"#ffffff"),ink:ae(e,22,"#17171b"),accent:ae(e,88,"#2a2a30")},dark:{from:ae(e,27,"#101014"),to:ae(e,10,"#08080b"),ink:ae(e,12,"#f4f4f7"),accent:ae(e,74,"#ffffff")}}}function Eg(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qi(e){if(!e)return Is(Zi);if(typeof e!=="string")return e;return Is(Pe[e]||e)}function el(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function As(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function tl(e){let t=Qi(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:As(e.action,e.id,"action","i-f7-plus"),clear:As(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:el(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function Ig(e){return(e||[]).map(tl)}function Ag(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Pg(e){return e.map((t)=>t.tint)}var ol="./Skeleton-m4p66zcs.stx";var al="./Spinner-vhnc3y03.stx";function rl(e){return Array.from({length:e},()=>1/e)}function Me(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((o)=>typeof o!=="number"||!Number.isFinite(o)||o<=0))return rl(t);let s=e.reduce((o,n)=>o+n,0);return e.map((o)=>o/s)}function Ps(e){let t=e;if(typeof e==="string"){let o=e.trim();if(o==="")return null;if(o.charAt(0)==="[")try{t=JSON.parse(o)}catch{return null}else t=o.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((o)=>typeof o==="string"?Number.parseFloat(o):o);return s.every((o)=>typeof o==="number"&&Number.isFinite(o)&&o>0)?s:null}function nt(e,t){if(typeof e==="number")return Number.isFinite(e)&&e>=0?e:t;if(typeof e!=="string"||e.trim()==="")return t;let s=Number.parseFloat(e);return Number.isFinite(s)&&s>=0?s:t}function Ms(e,t,s){let o=e.length;if(o===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),a=n.reduce((c,i)=>c+i,0);if(a>=t)return a===0?[...e]:n.map((c)=>c/a);let r=e.map((c)=>c*t);for(let c=0;c<=o;c++){let i=0;for(let p=0;p<o;p++){let h=Math.min(Math.max(r[p],n[p]),s[p].max);i+=r[p]-h,r[p]=h}if(Math.abs(i)<0.000000001)break;let d=r.map((p,h)=>i>0?s[h].max-p:p-n[h]),u=d.reduce((p,h)=>p+(Number.isFinite(h)?h:t),0);if(u<0.000000001)break;for(let p=0;p<o;p++){let h=(Number.isFinite(d[p])?d[p]:t)/u;r[p]+=i*h}}let l=r.reduce((c,i)=>c+i,0);return r.map((c)=>c/l)}function at(e,t,s,o,n){let a=e.length;if(t<0||t>=a-1||o<=0||s===0)return[...e];let r=e.map((p)=>p*o),l=s>0,c=l?t:t+1,i=l?1:-1,d=Math.min(Math.abs(s),n[c].max-r[c]);if(d<=0)return[...e];let u=0;for(let p=l?t+1:t;p>=0&&p<a&&d>0.000000001;p+=i){let h=Math.min(d,Math.max(0,r[p]-Math.max(0,n[p].min)));r[p]-=h,u+=h,d-=h}return r[c]+=u,r.map((p)=>p/o)}function Re(e,t,s,o){let n=e.map((r)=>r*s),a=(r,l)=>{let c=0;for(let i=r;i<=l;i++)c+=Math.max(0,n[i]-Math.max(0,o[i].min));return c};return{back:Math.min(a(0,t),o[t+1].max-n[t+1]),forward:Math.min(a(t+1,e.length-1),o[t].max-n[t])}}function Rs(e,t,s,o){let n=Re(e,t,s,o),a=e[t]*100,r=s>0?100/s:0;return{now:Math.round(a),min:Math.round(a-n.back*r),max:Math.round(a+n.forward*r)}}function rt(e){return`stx:split-pane:${e}`}function Ls(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var ll="./SplitPane-7sqfdwqa.stx";var Ns="data-split-separator";class cl{root;callbacks;direction;panes=[];separators=[];sizes=[];initial=[];limits=[];minSize;step;label;storageKey;observer=null;drag=null;disposers=[];constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.direction=t.direction==="vertical"?"vertical":"horizontal",this.minSize=t.minSize??48,this.step=t.step??16,this.label=t.label||"Resize panes",this.storageKey=t.storageKey||"",this.collect(),this.initial=this.startingSizes(t.sizes),this.sizes=Me(this.stored()??this.initial,this.panes.length),this.build(),this.apply(!1),typeof ResizeObserver<"u")this.observer=new ResizeObserver(()=>this.apply(!1)),this.observer.observe(this.root);this.root.setAttribute("data-split-ready","")}getSizes(){return[...this.sizes]}setSizes(e){if(!e||e.length!==this.panes.length)return;this.sizes=Me(e,this.panes.length),this.apply(!0),this.report(-1,"api",!0)}reset(e=-1){this.sizes=[...this.initial],this.apply(!0),this.report(e,"reset",!0)}setDirection(e){let t=e==="vertical"?"vertical":"horizontal";if(t===this.direction)return;this.direction=t,this.root.setAttribute("data-direction",t);for(let s of this.separators)s.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal");this.apply(!1)}destroy(){this.observer?.disconnect();for(let e of this.disposers)e();for(let e of this.separators)e.remove();for(let e of this.panes)e.style.removeProperty("flex"),e.removeAttribute("data-split-pane");this.root.removeAttribute("data-split-ready")}available(){let e=this.root.getBoundingClientRect(),t=this.direction==="horizontal"?e.width:e.height,s=0;for(let o of this.separators){let n=o.getBoundingClientRect();s+=this.direction==="horizontal"?n.width:n.height}return Math.max(0,t-s)}collect(){this.panes=Array.from(this.root.children).filter((e)=>e instanceof HTMLElement&&!e.hasAttribute(Ns)),this.limits=this.panes.map((e)=>({min:nt(e.getAttribute("data-min-size"),this.minSize),max:nt(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((o)=>Number.parseFloat(o.getAttribute("data-size")||"")),s=t.every((o)=>Number.isFinite(o)&&o>0)?t:null;return Me(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=Ps(localStorage.getItem(rt(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(rt(this.storageKey),Ls(this.sizes))}catch{}}build(){let e=this.root.id||`split-${Math.random().toString(36).slice(2,8)}`;this.panes.forEach((t,s)=>{if(t.setAttribute("data-split-pane",""),!t.id)t.id=`${e}-pane-${s}`;if(s===this.panes.length-1)return;let o=document.createElement("div");o.setAttribute(Ns,""),o.setAttribute("role","separator"),o.setAttribute("tabindex","0"),o.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),o.className="stx-split-separator",t.after(o),this.separators.push(o);let n=(a,r)=>{o.addEventListener(a,r),this.disposers.push(()=>o.removeEventListener(a,r))};n("pointerdown",(a)=>this.onPointerDown(a,s)),n("pointermove",(a)=>this.onPointerMove(a)),n("pointerup",(a)=>this.onPointerEnd(a)),n("pointercancel",(a)=>this.onPointerEnd(a)),n("dblclick",()=>this.reset(s)),n("keydown",(a)=>this.onKeyDown(a,s))})}apply(e){let t=this.available();if(t>0)this.sizes=Ms(this.sizes,t,this.limits);if(this.panes.forEach((s,o)=>{s.style.flex=`${(this.sizes[o]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,o)=>{let n=Rs(this.sizes,o,t,this.limits);s.setAttribute("aria-valuenow",String(n.now)),s.setAttribute("aria-valuemin",String(n.min)),s.setAttribute("aria-valuemax",String(n.max))}),e)this.store()}report(e,t,s){let o=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((a)=>Math.round(a*o)),index:e,source:t};if(this.callbacks.onResize?.(n),s)this.callbacks.onResizeEnd?.(n)}position(e){return this.direction==="horizontal"?e.clientX:e.clientY}onPointerDown(e,t){if(e.button!==0)return;e.preventDefault();let s=this.separators[t];try{s.setPointerCapture(e.pointerId)}catch{}this.drag={index:t,start:this.position(e),sizes:[...this.sizes],pointer:e.pointerId},this.root.setAttribute("data-dragging",""),s.setAttribute("data-active","")}onPointerMove(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.sizes=at(t.sizes,t.index,this.position(e)-t.start,this.available(),this.limits),this.apply(!1),this.report(t.index,"pointer",!1)}onPointerEnd(e){let t=this.drag;if(!t||e.pointerId!==t.pointer)return;this.drag=null,this.root.removeAttribute("data-dragging"),this.separators[t.index].removeAttribute("data-active");try{this.separators[t.index].releasePointerCapture(e.pointerId)}catch{}this.store(),this.report(t.index,"pointer",!0)}onKeyDown(e,t){let s=this.direction==="horizontal",o=this.available(),n=this.step*(e.shiftKey?5:1),a=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))a=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))a=n;else if(e.key==="Home")a=-Re(this.sizes,t,o,this.limits).back;else if(e.key==="End")a=Re(this.sizes,t,o,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=at(this.sizes,t,a,o,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var pl="./Stepper-68gxcmej.stx";var hl="./StepperStep-zf4pq1s0.stx";class Le{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),l=n+r;if(t[l]!==void 0)n=l;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[l]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let l=t[r],c;if(s[l]!==void 0)c=s[l];else if(l===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var db={local:new Le("local"),session:new Le("session")};function pb(e="local",t){return new Le(e,t)}var ml="./Switch-s8yf2rvm.stx";var bl="./Table-0a4y46vd.stx";var vl="./TableBody-y49bqb1p.stx";var yl="./TableCell-jhvsxw8b.stx";var Cl="./TableHead-e9xvjx2j.stx";var $l="./TableHeader-krzcx4sv.stx";var El="./TableRow-dt8e11aj.stx";var Al="./Tab-j9f4t166.stx";var Ml="./TabList-r1pc87xs.stx";var Ll="./TabPanel-5htevsq6.stx";var Ol="./Tabs-psm5wj7c.stx";var zl="./Teleport-vqs75x36.stx";var jl="./Textarea-bb63fsz0.stx";var Fl="./AiTextarea-bg6xq5wc.stx";var ql="./Tooltip-tt73d42w.stx";var Wl="./Transition-7m0mk45s.stx";var Gl="./Video-bqsx3wr8.stx";var Jl="./VirtualList-fa7v5a3h.stx";var Xl="./VirtualTable-kp7b3wyv.stx";var Zl=0;function Os(e="a11y"){return`${e}-${++Zl}-${Date.now()}`}function ix(e,t,s={}){let{visible:o=!1,id:n=Os("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function lx(e,t){let s=Os("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function cx(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function it(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function dx(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:l,onDeactivate:c}=t,i=!1,d=!1,u=null,p=(v)=>{if(d)return;if(n&&v.key==="Escape"){v.preventDefault(),m();return}if(v.key==="Tab"){let x=it(e);if(x.length===0){v.preventDefault();return}let S=x[0],P=x[x.length-1];if(v.shiftKey){if(document.activeElement===S)v.preventDefault(),P.focus()}else if(document.activeElement===P)v.preventDefault(),S.focus()}},h=(v)=>{if(d)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&a)m()}else if(!r&&a)m()}};function g(){if(i)return;i=!0,u=document.activeElement;let v=s||it(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",p),document.addEventListener("click",h),l?.()}function m(){if(!i)return;i=!1;let v=o||u;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",p),document.removeEventListener("click",h),c?.()}function w(){d=!0}function y(){d=!1}return{activate:g,deactivate:m,pause:w,unpause:y}}function px(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,l=o,c=()=>Array.from(e.querySelectorAll(s)),i=(u)=>{let p=c();if(u<0||u>=p.length)return;p.forEach((h,g)=>{if(g===u){if(h.setAttribute("tabindex","0"),typeof h.focus==="function")h.focus()}else h.setAttribute("tabindex","-1")}),l=u,r?.(u,p[u])},d=(u)=>{let h=c().length-1,g=!1,m=l;switch(u.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=l+1,m>h)m=a?0:h;g=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=l-1,m<0)m=a?h:0;g=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=l+1,m>h)m=a?0:h;g=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=l-1,m<0)m=a?h:0;g=!0}break;case"Home":m=0,g=!0;break;case"End":m=h,g=!0;break}if(g)u.preventDefault(),i(m)};return i(o),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var ux={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function hx(e){return document.activeElement===e}function fx(e,t){let s=t||document.activeElement,o=it(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function mx(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var gx={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function bx(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function xx(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function vx(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function wx(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function yx(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function kx(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Ql=(e,t,s,o)=>s*e/o+t,ec=(e,t,s,o)=>(e/=o,s*e*e+t),tc=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),sc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},oc=(e,t,s,o)=>(e/=o,s*e*e*e+t),nc=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),ac=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},rc=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),ic=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),lc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},cc=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),dc=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),pc=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},uc=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,hc=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,fc=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,mc=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,gc=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,bc=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},xc=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),vc=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),wc=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},yc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},kc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Cc=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},Sc=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),$c=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Tc=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},lt=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ds=(e,t,s,o)=>s-lt(o-e,0,s,o)+t,Ec=(e,t,s,o)=>{if(e<o/2)return Ds(e*2,0,s,o)*0.5+t;return lt(e*2-o,0,s,o)*0.5+s*0.5+t},Sx={linear:Ql,easeInQuad:ec,easeOutQuad:tc,easeInOutQuad:sc,easeInCubic:oc,easeOutCubic:nc,easeInOutCubic:ac,easeInQuart:rc,easeOutQuart:ic,easeInOutQuart:lc,easeInQuint:cc,easeOutQuint:dc,easeInOutQuint:pc,easeInSine:uc,easeOutSine:hc,easeInOutSine:fc,easeInExpo:mc,easeOutExpo:gc,easeInOutExpo:bc,easeInCirc:xc,easeOutCirc:vc,easeInOutCirc:wc,easeInElastic:yc,easeOutElastic:kc,easeInOutElastic:Cc,easeInBack:Sc,easeOutBack:$c,easeInOutBack:Tc,easeInBounce:Ds,easeOutBounce:lt,easeInOutBounce:Ec};function Ic(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:l="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${l} ${c}`}function zs(e,t,s={}){e.style.animation=Ic(t,s)}function Tx(e){e.style.animation=""}function Ac(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Ex(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let l=`${r*o}ms`;zs(a,t,{...n,delay:l})})}async function Ix(e,t){for(let s of t)zs(e,s.name,s.options),await Ac(e)}var Ax={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function Px(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Mx(e,t){let s=`
|
|
14
14
|
@keyframes ${e} {
|
|
15
15
|
${Object.entries(t).map(([n,a])=>{let r=Object.entries(a).map(([l,c])=>`${l}: ${c};`).join(" ");return`${n} { ${r} }`}).join(`
|
|
16
16
|
`)}
|
|
17
17
|
}
|
|
18
|
-
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function Pc(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:o=1000,easing:n="ease",delay:a=0,iterations:r=1,direction:l="normal",fill:c="both"}=s;return e.animate([...t],{duration:o,easing:n,delay:a,iterations:r,direction:l,fill:c})}var Mc={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function Lx(e,t,s={}){return Pc(e,Mc[t],s)}function Rc(e){if(!e)return null;if(typeof e!=="string")return e;if(typeof document>"u")return null;let t=/^[\w-]+$/.test(e)?document.getElementById(e):null;if(t)return t;try{return document.querySelector(e)}catch{return null}}function Ox(e){let t=Rc(e);if(!t||typeof t.closest!=="function")return null;if(t.__stx_exposed)return t.__stx_exposed;let s=t.closest("[data-stx-scope]");if(s?.__stx_exposed)return s.__stx_exposed;for(let o of Array.from(t.querySelectorAll("[data-stx-scope]")))if(o.__stx_exposed)return o.__stx_exposed;return null}var
|
|
19
|
-
`)}function pt(){return
|
|
18
|
+
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function Pc(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:o=1000,easing:n="ease",delay:a=0,iterations:r=1,direction:l="normal",fill:c="both"}=s;return e.animate([...t],{duration:o,easing:n,delay:a,iterations:r,direction:l,fill:c})}var Mc={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function Lx(e,t,s={}){return Pc(e,Mc[t],s)}function Rc(e){if(!e)return null;if(typeof e!=="string")return e;if(typeof document>"u")return null;let t=/^[\w-]+$/.test(e)?document.getElementById(e):null;if(t)return t;try{return document.querySelector(e)}catch{return null}}function Ox(e){let t=Rc(e);if(!t||typeof t.closest!=="function")return null;if(t.__stx_exposed)return t.__stx_exposed;let s=t.closest("[data-stx-scope]");if(s?.__stx_exposed)return s.__stx_exposed;for(let o of Array.from(t.querySelectorAll("[data-stx-scope]")))if(o.__stx_exposed)return o.__stx_exposed;return null}var Hs=["keyword","string","comment","numeric","constant","function","operator","punctuation","type","variable","tag","attribute"],ct={background:"#ffffff",foreground:"#24292f",keyword:"#cf222e",string:"#0a3069",comment:"#6e7781",numeric:"#0550ae",constant:"#0550ae",function:"#8250df",operator:"#cf222e",punctuation:"#24292f",type:"#953800",variable:"#953800",tag:"#116329",attribute:"#0550ae"},dt={background:"#0d1117",foreground:"#c9d1d9",keyword:"#ff7b72",string:"#a5d6ff",comment:"#8b949e",numeric:"#79c0ff",constant:"#79c0ff",function:"#d2a8ff",operator:"#ff7b72",punctuation:"#c9d1d9",type:"#ffa657",variable:"#ffa657",tag:"#7ee787",attribute:"#79c0ff"},Lc=["background","foreground",...Hs];function Ne(e,t=" "){return Lc.map((s)=>`${t}--stx-syntax-${s}: ${e[s]};`).join(`
|
|
19
|
+
`)}function pt(){return Hs.map((e)=>`.tok-${e} { color: var(--stx-syntax-${e}); }`).concat(".tok-comment { font-style: italic; }").join(`
|
|
20
20
|
`)}function Nc(){let e=Ne(ct),t=Ne(dt);return[`:where(:root) {
|
|
21
21
|
${e}
|
|
22
22
|
}`,`@media (prefers-color-scheme: dark) {
|
|
@@ -31,14 +31,14 @@ ${e}
|
|
|
31
31
|
${t}
|
|
32
32
|
}`,pt()].join(`
|
|
33
33
|
`)}function ut(){return[".syntax {"," margin: 0;"," padding: 1rem;"," overflow-x: auto;"," border-radius: 0.375rem;"," background-color: var(--stx-syntax-background);"," color: var(--stx-syntax-foreground);",' font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;'," font-size: 0.875rem;"," line-height: 1.5;"," tab-size: 2;","}",".syntax code { display: block; font-family: inherit; }",".syntax[data-line-numbers] { counter-reset: stx-syntax-line; }",".syntax[data-line-numbers] .line::before {"," counter-increment: stx-syntax-line;"," content: counter(stx-syntax-line);"," display: inline-block;"," width: 2.5em;"," margin-right: 1em;"," text-align: right;"," opacity: 0.5;"," user-select: none;","}"].join(`
|
|
34
|
-
`)}function
|
|
35
|
-
${ut()}`}var Vs=null;function Oc(){return Vs??=import("ts-syntax-highlighter/browser").catch(()=>null),Vs}var ht=null,Fs="github-light",Bs="github-dark";function ft(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Dc(e){return`<pre class="syntax"><code>${ft(e)}</code></pre>`}async function
|
|
34
|
+
`)}function js(){return`${Nc()}
|
|
35
|
+
${ut()}`}var Vs=null;function Oc(){return Vs??=import("ts-syntax-highlighter/browser").catch(()=>null),Vs}var ht=null,Fs="github-light",Bs="github-dark";function ft(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Dc(e){return`<pre class="syntax"><code>${ft(e)}</code></pre>`}async function jx(){if(!ht){let{createHighlighter:e}=await import("ts-syntax-highlighter");ht=await e({theme:"github-light"})}return ht}async function zc(e,t={}){let s=await Oc();if(!s)return null;let o;try{let r=await s.resolveGrammar(t.language??"typescript");if(!r)return null;o=new s.Tokenizer(r).tokenizeLinesFrom(e.replace(/\r\n?/g,`
|
|
36
36
|
`).split(`
|
|
37
37
|
`)).lines}catch{return null}let n=o.map((r)=>{let l="",c="",i="",d=()=>{if(c!=="")l+=i===""?ft(c):`<span class="tok-${i}">${ft(c)}</span>`;c=""};for(let u of r.tokens){let p=s.tokenClass(u.type);if(p!==i)d(),i=p;c+=u.content}return d(),`<span class="line">${l}</span>`}).join(`
|
|
38
|
-
`);return`<pre ${['class="syntax"',t.theme==="light"||t.theme==="dark"?`data-syntax-theme="${t.theme}"`:"",t.lineNumbers?"data-line-numbers":""].filter(Boolean).join(" ")}><code>${n}</code></pre>`}function
|
|
38
|
+
`);return`<pre ${['class="syntax"',t.theme==="light"||t.theme==="dark"?`data-syntax-theme="${t.theme}"`:"",t.lineNumbers?"data-line-numbers":""].filter(Boolean).join(" ")}><code>${n}</code></pre>`}function Hc(e){if(e==="auto")return js();return[`[data-syntax-theme="${e}"] {
|
|
39
39
|
${Ne(e==="dark"?dt:ct)}
|
|
40
40
|
}`,pt(),ut()].join(`
|
|
41
|
-
`)}async function Vx(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:n=!1}=t,a=await zc(e,{language:o,theme:s,lineNumbers:n});if(a===null)return{html:Dc(e),css:"",language:o,theme:s==="dark"?Bs:Fs};return{html:a,css:jc(s),language:o,theme:s==="auto"?"auto":s==="dark"?Bs:Fs}}function Fx(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function Bx(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var oe=null,Hc=(e)=>e===1?0:1;function Oe(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function mt(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function Wx(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:n={},dateTimeFormats:a={},numberFormats:r={},missing:l,warnMissing:c=!0}=e;function i(y,v={}){let x=Oe(o[t],y);if(x===void 0&&s)x=Oe(o[s],y);if(x===void 0){if(l){let S=l(t,y);if(S)return mt(S,v)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${y}" in locale "${t}"`);return y}if(typeof x==="string")return mt(x,v);return String(x)}function d(y,v,x={}){let S=i(y,{...x,count:v});if(S.includes("|")){let P=S.split("|").map((F)=>F.trim()),H=(n[t]||Hc)(v,t),V=P[H]||P[P.length-1];return mt(V,{...x,count:v})}return S}function u(y,v="default"){let x=typeof y==="number"?new Date(y):y,S=a[v]||a.default||{};return new Intl.DateTimeFormat(t,S).format(x)}function p(y,v="default"){let x=r[v]||r.default||{};return new Intl.NumberFormat(t,x).format(y)}function h(y){if(Oe(o[t],y)!==void 0)return!0;if(s)return Oe(o[s],y)!==void 0;return!1}function g(y){if(!o[y]){console.warn(`[i18n] Locale "${y}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=y}function m(y,v){if(!o[y])o[y]={};o[y]={...o[y],...v}}function w(y){delete o[y]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:g,t:i,tc:d,d:u,n:p,te:h,addMessages:m,removeLocale:w}}function qx(e){oe=e}function Kx(){return oe}function Gx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return oe.t(e,t)}function Ux(e,t,s){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return oe.tc(e,t,s)}function Jx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return oe.d(e,t)}function Yx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return oe.n(e,t)}var Xx={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},Zx={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},Qx={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function ev(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function tv(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var sv={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function nv(e={}){let{max:t=10,ttl:s=0,include:o,exclude:n,hooks:a,debug:r=!1}=e,l=new Map,c=0,i=0;function d(...b){if(r)console.log("[KeepAlive]",...b)}function u(b){if(n){if(n instanceof RegExp&&n.test(b))return!1;if(Array.isArray(n)&&n.includes(b))return!1}if(o){if(o instanceof RegExp&&!o.test(b))return!1;if(Array.isArray(o)&&!o.includes(b))return!1}return!0}function p(b){if(!s||!b.expiresAt)return!1;return Date.now()>b.expiresAt}function h(b){let C=l.get(b);if(C)C.lastAccessedAt=Date.now(),C.accessCount++,C.instance.lastAccessedAt=C.lastAccessedAt,l.delete(b),l.set(b,C),d(`Touched: ${b} (access count: ${C.accessCount})`)}function g(){if(l.size===0)return!1;let b=l.keys().next().value;if(!b)return!1;let C=l.get(b);if(C){d(`Evicting LRU: ${b}`);let N=C.instance.hooks;if(N?.onDeactivate)N.onDeactivate(C.instance);if(a?.onDeactivate)a.onDeactivate(C.instance);return l.delete(b),!0}return!1}function m(b,C,N){if(!u(C.type))return d(`Type not cacheable: ${C.type}`),C;if(l.size>=t)g();let R=Date.now(),L={instance:{...C,hooks:N||C.hooks,createdAt:C.createdAt||R,lastAccessedAt:R},accessCount:0,createdAt:R,lastAccessedAt:R,expiresAt:s?R+s:void 0};if(l.set(b,L),d(`Cached: ${b} (size: ${l.size}/${t})`),N?.onMount)N.onMount(L.instance);if(a?.onMount)a.onMount(L.instance);return L.instance}function w(b){let C=l.get(b);if(!C)return i++,d(`Miss: ${b}`),null;if(p(C))return d(`Expired: ${b}`),l.delete(b),i++,null;return c++,h(b),d(`Hit: ${b}`),C.instance}function y(b){let C=l.get(b);if(!C)return!1;if(p(C))return l.delete(b),!1;return!0}function v(b){let C=l.get(b);if(!C)return!1;d(`Removing: ${b}`);let N=C.instance.hooks;if(N?.onUnmount)N.onUnmount(C.instance);if(a?.onUnmount)a.onUnmount(C.instance);return l.delete(b)}function x(){d("Clearing cache"),l.forEach((b)=>{let C=b.instance.hooks;if(C?.onUnmount)C.onUnmount(b.instance);if(a?.onUnmount)a.onUnmount(b.instance)}),l.clear(),c=0,i=0}function S(){let b=0,C=Date.now();for(let[N,R]of l.entries())if(p(R))d(`Pruning expired: ${N}`),v(N),b++;while(l.size>t)if(g())b++;else break;if(b>0)d(`Pruned ${b} entries`);return b}function P(b){let C=w(b);if(!C)return null;d(`Activating: ${b}`);let N=C.hooks;if(N?.onActivate)N.onActivate(C);if(a?.onActivate)a.onActivate(C);if(C.state&&N?.onRestore)N.onRestore(C,C.state);return C}function T(b){let C=l.get(b);if(!C)return!1;d(`Deactivating: ${b}`);let N=C.instance,R=N.hooks;if(R?.onSave)N.state=R.onSave(N);if(R?.onDeactivate)R.onDeactivate(N);if(a?.onDeactivate)a.onDeactivate(N);return!0}function H(){let b=c+i;return{hits:c,misses:i,size:l.size,max:t,hitRate:b>0?c/b:0,keys:Array.from(l.keys())}}function V(){return Array.from(l.keys())}function F(){return l.size}return{cache:m,get:w,has:y,remove:v,clear:x,prune:S,activate:P,deactivate:T,getStats:H,keys:V,size:F}}function av(e){let t=new Map;return{set(s,o){if(t.has(s))t.delete(s);if(t.set(s,o),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let o=t.get(s);return t.delete(s),t.set(s,o),o},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function rv(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function iv(e,t={}){let{maxSize:s=100,reset:o}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(a){if(n.length<s){if(o)o(a);n.push(a)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var re=new Map;async function De(e,t){let s=t||e.toString();if(re.has(s))return re.get(s);let o=e();re.set(s,o);try{return await o}catch(n){throw re.delete(s),n}}function cv(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:n,onLoaded:a,onError:r}=t,l="idle",c,i,d=async(u=0)=>{try{if(l==="loading"||l==="loaded"){if(c)return c}l="loading",n?.();let p=await De(e);return c=p,l="loaded",a?.(p),p}catch(p){let h=p;if(u<s)return await new Promise((g)=>setTimeout(g,o*(u+1))),d(u+1);throw l="error",i=h,r?.(h),h}};return{get state(){return l},get module(){return c},get error(){return i},load:()=>d(),preload:()=>d()}}function Vc(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:n="0px",threshold:a=0.01,placeholder:r,errorContent:l,onLoading:c,onLoaded:i,onError:d}=s,u=!1,p=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return p=new IntersectionObserver(async(g)=>{for(let m of g)if(m.isIntersecting&&!u){u=!0,p?.disconnect();try{c?.();let w=await De(t);if(i?.(w),w&&typeof w.default?.render==="function"){let y=await w.default.render();e.innerHTML=y}}catch(w){let y=w;if(d?.(y),l)if(typeof l==="string")e.innerHTML=l;else e.innerHTML="",e.appendChild(l);else e.innerHTML=`<div style="color: red;">Failed to load component: ${y.message}</div>`}}},{root:o,rootMargin:n,threshold:a}),p.observe(e),()=>{p?.disconnect(),p=null}}function dv(e,t,s={}){let o=[],n=Array.from(e);for(let a of n){let r=typeof t==="function"&&t.length>0?()=>t(a):t,l=Vc(a,r,s);o.push(l)}return()=>{o.forEach((a)=>a())}}function Fc(e){return De(e)}function pv(e){return Promise.all(e.map((t)=>Fc(t)))}function uv(e){if(e)re.delete(e);else re.clear()}function hv(){return{size:re.size,keys:Array.from(re.keys())}}function fv(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return De(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Bc(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:n="50px",threshold:a=0.01,placeholder:r,onLoading:l,onLoaded:c,onError:i}=s;if(r&&typeof r==="string")e.src=r;let d=!1,u=null;return u=new IntersectionObserver((h)=>{for(let g of h)if(g.isIntersecting&&!d)d=!0,u?.disconnect(),l?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(m)=>{let w=Error(`Failed to load image: ${t}`);i?.(w),e.classList.add("error")},{once:!0})},{root:o,rootMargin:n,threshold:a}),u.observe(e),()=>{u?.disconnect(),u=null}}function mv(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((n)=>{let a=n.getAttribute("data-lazy-src");if(a){let r=Bc(n,a,t);o.push(r)}}),()=>{o.forEach((n)=>n())}}var gt={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function _s(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=_s(e[o],t[o]);else s[o]=t[o];return s}function be(e){return _s(gt,e)}var ze=gt;function bv(){return ze}function _c(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,o])=>{if(o)t.push(`--color-${s}: ${o};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,o])=>{if(o)t.push(`--font-${s}: ${o};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,o])=>{if(o)t.push(`--text-${s}: ${o};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,o])=>{if(o)t.push(`--font-weight-${s}: ${o};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,o])=>{if(o)t.push(`--leading-${s}: ${o};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,o])=>{if(o)t.push(`--spacing-${s}: ${o};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,o])=>{if(o)t.push(`--radius-${s}: ${o};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,o])=>{if(o)t.push(`--shadow-${s}: ${o};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,o])=>{if(o)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,o])=>{if(o)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,o])=>{if(o)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});return`:root {
|
|
41
|
+
`)}async function Vx(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:n=!1}=t,a=await zc(e,{language:o,theme:s,lineNumbers:n});if(a===null)return{html:Dc(e),css:"",language:o,theme:s==="dark"?Bs:Fs};return{html:a,css:Hc(s),language:o,theme:s==="auto"?"auto":s==="dark"?Bs:Fs}}function Fx(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function Bx(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var oe=null,jc=(e)=>e===1?0:1;function Oe(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function mt(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function _x(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:n={},dateTimeFormats:a={},numberFormats:r={},missing:l,warnMissing:c=!0}=e;function i(y,v={}){let x=Oe(o[t],y);if(x===void 0&&s)x=Oe(o[s],y);if(x===void 0){if(l){let S=l(t,y);if(S)return mt(S,v)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${y}" in locale "${t}"`);return y}if(typeof x==="string")return mt(x,v);return String(x)}function d(y,v,x={}){let S=i(y,{...x,count:v});if(S.includes("|")){let P=S.split("|").map((F)=>F.trim()),j=(n[t]||jc)(v,t),V=P[j]||P[P.length-1];return mt(V,{...x,count:v})}return S}function u(y,v="default"){let x=typeof y==="number"?new Date(y):y,S=a[v]||a.default||{};return new Intl.DateTimeFormat(t,S).format(x)}function p(y,v="default"){let x=r[v]||r.default||{};return new Intl.NumberFormat(t,x).format(y)}function h(y){if(Oe(o[t],y)!==void 0)return!0;if(s)return Oe(o[s],y)!==void 0;return!1}function g(y){if(!o[y]){console.warn(`[i18n] Locale "${y}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=y}function m(y,v){if(!o[y])o[y]={};o[y]={...o[y],...v}}function w(y){delete o[y]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:g,t:i,tc:d,d:u,n:p,te:h,addMessages:m,removeLocale:w}}function Wx(e){oe=e}function Kx(){return oe}function Gx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return oe.t(e,t)}function Ux(e,t,s){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return oe.tc(e,t,s)}function Jx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return oe.d(e,t)}function Yx(e,t){if(!oe)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return oe.n(e,t)}var Xx={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},Zx={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},Qx={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function ev(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function tv(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var sv={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function nv(e={}){let{max:t=10,ttl:s=0,include:o,exclude:n,hooks:a,debug:r=!1}=e,l=new Map,c=0,i=0;function d(...b){if(r)console.log("[KeepAlive]",...b)}function u(b){if(n){if(n instanceof RegExp&&n.test(b))return!1;if(Array.isArray(n)&&n.includes(b))return!1}if(o){if(o instanceof RegExp&&!o.test(b))return!1;if(Array.isArray(o)&&!o.includes(b))return!1}return!0}function p(b){if(!s||!b.expiresAt)return!1;return Date.now()>b.expiresAt}function h(b){let C=l.get(b);if(C)C.lastAccessedAt=Date.now(),C.accessCount++,C.instance.lastAccessedAt=C.lastAccessedAt,l.delete(b),l.set(b,C),d(`Touched: ${b} (access count: ${C.accessCount})`)}function g(){if(l.size===0)return!1;let b=l.keys().next().value;if(!b)return!1;let C=l.get(b);if(C){d(`Evicting LRU: ${b}`);let N=C.instance.hooks;if(N?.onDeactivate)N.onDeactivate(C.instance);if(a?.onDeactivate)a.onDeactivate(C.instance);return l.delete(b),!0}return!1}function m(b,C,N){if(!u(C.type))return d(`Type not cacheable: ${C.type}`),C;if(l.size>=t)g();let R=Date.now(),L={instance:{...C,hooks:N||C.hooks,createdAt:C.createdAt||R,lastAccessedAt:R},accessCount:0,createdAt:R,lastAccessedAt:R,expiresAt:s?R+s:void 0};if(l.set(b,L),d(`Cached: ${b} (size: ${l.size}/${t})`),N?.onMount)N.onMount(L.instance);if(a?.onMount)a.onMount(L.instance);return L.instance}function w(b){let C=l.get(b);if(!C)return i++,d(`Miss: ${b}`),null;if(p(C))return d(`Expired: ${b}`),l.delete(b),i++,null;return c++,h(b),d(`Hit: ${b}`),C.instance}function y(b){let C=l.get(b);if(!C)return!1;if(p(C))return l.delete(b),!1;return!0}function v(b){let C=l.get(b);if(!C)return!1;d(`Removing: ${b}`);let N=C.instance.hooks;if(N?.onUnmount)N.onUnmount(C.instance);if(a?.onUnmount)a.onUnmount(C.instance);return l.delete(b)}function x(){d("Clearing cache"),l.forEach((b)=>{let C=b.instance.hooks;if(C?.onUnmount)C.onUnmount(b.instance);if(a?.onUnmount)a.onUnmount(b.instance)}),l.clear(),c=0,i=0}function S(){let b=0,C=Date.now();for(let[N,R]of l.entries())if(p(R))d(`Pruning expired: ${N}`),v(N),b++;while(l.size>t)if(g())b++;else break;if(b>0)d(`Pruned ${b} entries`);return b}function P(b){let C=w(b);if(!C)return null;d(`Activating: ${b}`);let N=C.hooks;if(N?.onActivate)N.onActivate(C);if(a?.onActivate)a.onActivate(C);if(C.state&&N?.onRestore)N.onRestore(C,C.state);return C}function T(b){let C=l.get(b);if(!C)return!1;d(`Deactivating: ${b}`);let N=C.instance,R=N.hooks;if(R?.onSave)N.state=R.onSave(N);if(R?.onDeactivate)R.onDeactivate(N);if(a?.onDeactivate)a.onDeactivate(N);return!0}function j(){let b=c+i;return{hits:c,misses:i,size:l.size,max:t,hitRate:b>0?c/b:0,keys:Array.from(l.keys())}}function V(){return Array.from(l.keys())}function F(){return l.size}return{cache:m,get:w,has:y,remove:v,clear:x,prune:S,activate:P,deactivate:T,getStats:j,keys:V,size:F}}function av(e){let t=new Map;return{set(s,o){if(t.has(s))t.delete(s);if(t.set(s,o),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let o=t.get(s);return t.delete(s),t.set(s,o),o},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function rv(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function iv(e,t={}){let{maxSize:s=100,reset:o}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(a){if(n.length<s){if(o)o(a);n.push(a)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var re=new Map;async function De(e,t){let s=t||e.toString();if(re.has(s))return re.get(s);let o=e();re.set(s,o);try{return await o}catch(n){throw re.delete(s),n}}function cv(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:n,onLoaded:a,onError:r}=t,l="idle",c,i,d=async(u=0)=>{try{if(l==="loading"||l==="loaded"){if(c)return c}l="loading",n?.();let p=await De(e);return c=p,l="loaded",a?.(p),p}catch(p){let h=p;if(u<s)return await new Promise((g)=>setTimeout(g,o*(u+1))),d(u+1);throw l="error",i=h,r?.(h),h}};return{get state(){return l},get module(){return c},get error(){return i},load:()=>d(),preload:()=>d()}}function Vc(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:n="0px",threshold:a=0.01,placeholder:r,errorContent:l,onLoading:c,onLoaded:i,onError:d}=s,u=!1,p=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return p=new IntersectionObserver(async(g)=>{for(let m of g)if(m.isIntersecting&&!u){u=!0,p?.disconnect();try{c?.();let w=await De(t);if(i?.(w),w&&typeof w.default?.render==="function"){let y=await w.default.render();e.innerHTML=y}}catch(w){let y=w;if(d?.(y),l)if(typeof l==="string")e.innerHTML=l;else e.innerHTML="",e.appendChild(l);else e.innerHTML=`<div style="color: red;">Failed to load component: ${y.message}</div>`}}},{root:o,rootMargin:n,threshold:a}),p.observe(e),()=>{p?.disconnect(),p=null}}function dv(e,t,s={}){let o=[],n=Array.from(e);for(let a of n){let r=typeof t==="function"&&t.length>0?()=>t(a):t,l=Vc(a,r,s);o.push(l)}return()=>{o.forEach((a)=>a())}}function Fc(e){return De(e)}function pv(e){return Promise.all(e.map((t)=>Fc(t)))}function uv(e){if(e)re.delete(e);else re.clear()}function hv(){return{size:re.size,keys:Array.from(re.keys())}}function fv(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return De(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Bc(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:n="50px",threshold:a=0.01,placeholder:r,onLoading:l,onLoaded:c,onError:i}=s;if(r&&typeof r==="string")e.src=r;let d=!1,u=null;return u=new IntersectionObserver((h)=>{for(let g of h)if(g.isIntersecting&&!d)d=!0,u?.disconnect(),l?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(m)=>{let w=Error(`Failed to load image: ${t}`);i?.(w),e.classList.add("error")},{once:!0})},{root:o,rootMargin:n,threshold:a}),u.observe(e),()=>{u?.disconnect(),u=null}}function mv(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((n)=>{let a=n.getAttribute("data-lazy-src");if(a){let r=Bc(n,a,t);o.push(r)}}),()=>{o.forEach((n)=>n())}}var gt={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function qs(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=qs(e[o],t[o]);else s[o]=t[o];return s}function be(e){return qs(gt,e)}var ze=gt;function bv(){return ze}function qc(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,o])=>{if(o)t.push(`--color-${s}: ${o};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,o])=>{if(o)t.push(`--font-${s}: ${o};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,o])=>{if(o)t.push(`--text-${s}: ${o};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,o])=>{if(o)t.push(`--font-weight-${s}: ${o};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,o])=>{if(o)t.push(`--leading-${s}: ${o};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,o])=>{if(o)t.push(`--spacing-${s}: ${o};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,o])=>{if(o)t.push(`--radius-${s}: ${o};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,o])=>{if(o)t.push(`--shadow-${s}: ${o};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,o])=>{if(o)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,o])=>{if(o)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,o])=>{if(o)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});return`:root {
|
|
42
42
|
${t.join(`
|
|
43
43
|
`)}
|
|
44
|
-
}`}function xv(e,t){if(ze=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,n])=>{if(n)s.style.setProperty(`--color-${o}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-${o}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,n])=>{if(n)s.style.setProperty(`--text-${o}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-weight-${o}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--leading-${o}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([o,n])=>{if(n)s.style.setProperty(`--spacing-${o}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,n])=>{if(n)s.style.setProperty(`--radius-${o}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([o,n])=>{if(n)s.style.setProperty(`--shadow-${o}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,n])=>{if(n)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,n])=>{if(n)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,n])=>{if(n)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function vv(){return ze}function wv(e){let t=e.split("."),s=ze;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var yv={default:gt,purple:be({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:be({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:be({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:be({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:be({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function kv(e){return _c(e)}var qc="./ChatInbox-3cz5tt0d.stx";var Gc="./ChatMessage-rj37tdgn.stx";var Jc="./ConversationListItem-fjha2cgq.stx";var Xc="./MessageBubble-v5m96g43.stx";function Iv(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let o=!1,n=t.replace(/\{(\w+)\}/g,(a,r)=>{let l=s[r];if(l==null||l==="")return o=!0,"";return encodeURIComponent(String(l))});return o?"":n}import{derived as xe,effect as Zc,sharedRequest as Qc,state as U}from"@stacksjs/stx";import{useBroadcastStream as ed}from"@stacksjs/stx/composables/use-broadcast-stream";var td=1500;function Rv(e){let t=e.endpoint??"/messages",s=xe(e.scopeKey),o=U([]),n=U([]),a=U(null),r=U(""),l=U([]),c=U(!1),i=U(!1),d=U(!1),u=U(""),p=U(""),h=U(""),g=U(!1),m=U(!1),w=U(4000),y=U(!1),v=new Set,x=null,S=null,P="",T=0,H=new Map,V=null,F=!1,b=0;function C(){T++,o.set([]),n.set([]),a.set(null),r.set(""),l.set([]),p.set(""),u.set(""),c.set(!1),i.set(!1),d.set(!1),H=new Map,V=null,b=0,m.set(!1),x?.close(),x=null}function N(){let A=e.scopeKey();if(A!==P)C(),P=A;return Ks(),T}async function R(A,I){let z=await e.request(`${t}${A}`,{...I,cache:"no-store"}),B=await z.json().catch(()=>({}));if(!z.ok)throw Error(B.error||"Could not load messages. Try again.");return B}let L=xe(()=>{let A=h().toLowerCase().trim();return o().map((I)=>({...I,conversation:n().find((z)=>z.recipient_id===I.id)})).filter((I)=>(!A||`${I.name} ${I.role}`.toLowerCase().includes(A))&&(!g()||(I.conversation?.unread??0)>0)).sort((I,z)=>(z.conversation?.last_message?.id??0)-(I.conversation?.last_message?.id??0)||I.name.localeCompare(z.name))}),E=xe(()=>n().reduce((A,I)=>A+I.unread,0)),M=xe(()=>!!r()&&!!p().trim()&&p().trim().length<=w()&&!d()&&!i()),k=xe(e.selfId);function D(A){u.set(A instanceof Error?A.message:"Could not load messages. Try again.")}async function O(A,I,z=!0){let B=await R(`/conversations/${I}`);if(A!==T||I!==r()||e.scopeKey()!==P)return;let Q=B.messages[0]?.id;if(l.set([...l().filter((Be)=>Q&&Be.id<Q),...B.messages]),l().length===B.messages.length)m.set(B.has_more);let ye=B.messages.at(-1);if(z&&ye){if(await R(`/conversations/${I}/read`,{method:"POST",body:JSON.stringify({through_id:ye.id})}),A===T&&I===r())n.update((Be)=>Be.map((_e)=>_e.id===I?{..._e,unread:0}:_e))}}let J=Qc(),j=new Set;function W(){if(!e.broadcastEndpoint||!e.selfId()||y())return Promise.resolve();return new Promise((A)=>{let I=()=>{clearTimeout(z),j.delete(I),A()},z=setTimeout(I,td);j.add(I)})}function Z(){if(!j.size)return!1;for(let A of[...j])A();return!0}function ve(){return N(),J.run(T,()=>W().then(we)).finally(le)}async function je(){N(),await J.fresh(T,()=>we()).finally(le)}async function we(){let A=N();c.set(!0),u.set("");try{let I=await R("");if(A!==T||e.scopeKey()!==P)return;o.set(I.contacts),n.set(I.conversations),w.set(I.max_length),c.set(!1);let z=a()?I.contacts.find((Q)=>Q.id===a().id):null;if(a()&&!z){let Q=a().id;bt(),H.delete(Q),p.set(""),V=null}else if(z)a.set(z);let B=e.initialRecipient?.()??0;if(B>0&&B!==b){let Q=I.contacts.find((ye)=>ye.id===B);if(Q)b=B,await He(Q)}}catch(I){if(A===T)D(I)}finally{if(A===T)c.set(!1)}}async function He(A){if(N(),a())H.set(a().id,p());let I=++T;d.set(!1),a.set(A),p.set(H.get(A.id)??""),r.set(""),l.set([]),m.set(!1),u.set(""),i.set(!0);try{let z=await R("/conversations",{method:"POST",body:JSON.stringify({recipient_id:A.id})});if(I!==T||e.scopeKey()!==P)return;r.set(z.id),await O(I,z.id)}catch(z){if(I===T)D(z)}finally{if(I===T)i.set(!1);le()}}function bt(){if(a())H.set(a().id,p());T++,d.set(!1),i.set(!1),a.set(null),r.set(""),l.set([]),u.set("")}async function Ws(){if(N(),!M())return;let A=r(),I=p().trim(),z=T,B=V?.body===I&&V.thread===A?V.key:crypto.randomUUID();V={body:I,key:B,thread:A},d.set(!0),u.set("");try{if(await R(`/conversations/${A}/messages`,{method:"POST",body:JSON.stringify({body:I,client_key:B})}),z!==T||e.scopeKey()!==P)return;if(p().trim()===I)p.set("");H.delete(a().id),V=null,await O(z,A),await je()}catch(Q){if(z===T)D(Q)}finally{if(z===T)d.set(!1);le()}}async function qs(){let A=r(),I=l()[0]?.id,z=T;if(!A||!I||i())return;i.set(!0);try{let B=await R(`/conversations/${A}?before=${I}`);if(z===T&&A===r())l.set([...B.messages,...l()]),m.set(B.has_more)}catch(B){if(z===T)D(B)}finally{if(z===T)i.set(!1);le()}}async function xt(A=!1){if(F||d()||i())return;F=!0;try{if(await ve(),A&&a()&&!r())await He(a());else if(A&&r())await O(T,r())}catch(I){D(I)}finally{F=!1,le()}}let Ve=!1;async function Fe(){if(F||J.busy||d()||i()){Ve=!0;return}await xt([...v].some((A)=>A()))}function Ks(){if(x||!v.size||!e.selfId()||!e.broadcastEndpoint)return;let A=P;x=ed({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(I)=>{if(y.set(I),!I)Z()},onConnected:()=>{if(!Z()&&A===e.scopeKey())Fe()},onMessage:(I)=>{if(A===e.scopeKey()&&I.event.startsWith("messaging."))Fe()}})}function Gs(A=()=>!1){if(v.add(A),N(),!S)S=Zc(()=>{N()});return()=>{if(v.delete(A),!v.size)x?.close(),x=null,S?.(),S=null}}function le(){if(Ve)Ve=!1,Fe()}return{contacts:o,conversations:n,selected:a,threadId:r,messages:l,loading:c,threadLoading:i,sending:d,error:u,draft:p,search:h,unreadOnly:g,hasMore:m,maxLength:w,rows:L,unread:E,canSend:M,selfId:k,scopeKey:s,load:ve,open:He,back:bt,send:Ws,older:qs,refresh:xt,reset:C,observe:Gs,connected:y}}var od="./ChatUnreadBadge-3vq0t8d2.stx";var ad="./ChatLauncher-3zph4trh.stx";export{oo as Accordion,ao as AccordionItem,io as AddressField,Fl as AiTextarea,Ax as AnimationClasses,So as Audio,Ro as Avatar,No as Badge,Do as Breadcrumb,ue as Breakpoints,Fo as Button,Wo as Calendar,en as Card,qc as ChatInbox,ad as ChatLauncher,Gc as ChatMessage,od as ChatUnreadBadge,sn as Checkbox,Br as Checkout,nn as ChoiceChips,Us as CodeBlock,rn as CodeEditor,cn as Combobox,pn as ComboboxButton,hn as ComboboxInput,mn as ComboboxOption,bn as ComboboxOptions,co as CommandBar,vn as CommandPalette,yn as CommandPaletteItem,Y as ComponentError,uo as ContentCard,Cn as ContextMenu,On as ContextMenuView,Jc as ConversationListItem,qu as DEFAULT_MAX_WIDTH,Wu as DEFAULT_MIN_WIDTH,Wn as DataGrid,Gn as DataGridView,Ko as DateRangePicker,Wr as DefaultPaymentMethod,Jn as Dialog,Xn as DialogBackdrop,Qn as DialogDescription,ta as DialogPanel,oa as DialogTitle,aa as Drawer,ia as Dropdown,ca as DropdownButton,pa as DropdownItem,ha as DropdownItems,Sx as Easing,za as EmailInput,Uo as EmptyState,Yo as ErrorState,ce as ErrorTypes,Ku as FIT_MAX_WIDTH,oi as FORBIDDEN_SANDBOX_TOKENS,xr as FilterChip,wr as FilterChips,fo as FloatingPanel,Js as Footer,ma as Form,Aa as GraphCanvas,Ie as GraphModel,Sa as GraphView,Ke as GridModel,Ma as GroupedList,La as GroupedListRow,Ys as Hero,Oa as Image,Xs as Installation,Gu as JSON_PREVIEW_LENGTH,er as JsonTree,nr as JsonTreeView,ux as KeyboardKeys,Cd as KeyboardShortcuts,Mc as KeyframeAnimations,rr as List,kr as ListRow,lr as Listbox,dr as ListboxButton,ur as ListboxLabel,fr as ListboxOption,gr as ListboxOptions,To as Login,Xc as MessageBubble,Sr as NavBar,Rr as Navigator,Nr as Notification,Ha as NumberInput,Dr as Pager,jr as PagerDots,Vr as Pagination,Fa as PasswordInput,Kr as PaymentMethods,Yr as Popover,Zr as PopoverButton,ei as PopoverPanel,si as Portal,ci as PreviewFrame,pi as PreviewFrameView,hi as Progress,f as PropTypes,mi as Radio,bi as RadioGroup,vi as RadioGroupDescription,yi as RadioGroupLabel,Ci as RadioGroupOption,jd as SHADE_VAR_PREFIX,dt as SYNTAX_DARK,ct as SYNTAX_LIGHT,Lc as SYNTAX_PROPERTIES,js as SYNTAX_TOKENS,_a as SearchInput,Tr as SectionCard,$i as SegmentedControl,Ei as Select,Ai as Sidebar,go as SidebarDivider,Mi as SidebarFooter,Li as SidebarHeader,Oi as SidebarItem,zi as SidebarPinned,xo as SidebarRow,Hi as SidebarSection,Fi as SidebarSpace,qi as SidebarSpaceSwitcher,_i as SidebarSpaces,Io as Signup,ol as Skeleton,wo as SpaceSwitcher,al as Spinner,ll as SplitPane,cl as SplitPaneView,pl as Stepper,hl as StepperStep,Le as StorageManager,Ur as SubscriptionCheckout,ml as Switch,vt as THEMED_FAMILIES,Al as Tab,Ir as TabBar,Pr as TabBarItem,Ml as TabList,Ll as TabPanel,bl as Table,vl as TableBody,yl as TableCell,Cl as TableHead,$l as TableHeader,El as TableRow,Ol as Tabs,zl as Teleport,qa as TextInput,Hl as Textarea,Zo as ThemeToggle,ko as TileGrid,_l as Tooltip,ql as Transition,et as TreeModel,Po as TwoFactorChallenge,ys as VIEWPORT_PRESETS,Gl as Video,Jl as VirtualList,Xl as VirtualTable,Lx as animate,Px as animateWithClass,cx as announceToScreenReader,zs as applyAnimation,Bx as applyHeadwindClasses,xv as applyTheme,gx as aria,Pt as ariaShortcut,zo as assert,Op as assertProp,$s as buildDocument,Bo as buttonPropSchema,Ot as cellJson,Nt as cellKind,te as cellValue,os as centreOn,es as clampZoom,Pp as clearErrorHandler,uv as clearModuleCache,Ft as clipToRect,Nd as closeOverlay,Hs as codeBlockCss,Ox as componentApi,sv as componentMessages,wa as connectedComponents,Iv as contactLink,pd as copyToClipboard,lx as createAriaDescription,ix as createAriaLabel,Rv as createChat,iv as createComponentPool,Rp as createDebugger,dx as createFocusTrap,Wx as createI18n,nv as createKeepAlive,Pc as createKeyframeAnimation,Mx as createKeyframes,av as createLRUCache,ee as createPropValidator,fv as createRouteLoader,px as createRovingTabindex,Bp as createSafeClickHandler,bx as createScreenReaderText,yx as createSkipLink,rv as createStateManager,pb as createStorage,be as createTheme,Ic as cssAnimation,Bn as cycleSort,Jx as d,Zx as dateTimeFormats,jm as declaresColorScheme,Ge as defaultNodeMetrics,gt as defaultTheme,Is as deriveSpaceTint,Cs as describeViewport,Fx as detectLanguage,Mp as devAssert,Re as dividerRange,Sc as easeInBack,Ds as easeInBounce,xc as easeInCirc,oc as easeInCubic,yc as easeInElastic,mc as easeInExpo,Tc as easeInOutBack,Ec as easeInOutBounce,wc as easeInOutCirc,ac as easeInOutCubic,Cc as easeInOutElastic,bc as easeInOutExpo,sc as easeInOutQuad,lc as easeInOutQuart,pc as easeInOutQuint,fc as easeInOutSine,ec as easeInQuad,rc as easeInQuart,cc as easeInQuint,uc as easeInSine,$c as easeOutBack,lt as easeOutBounce,vc as easeOutCirc,nc as easeOutCubic,kc as easeOutElastic,gc as easeOutExpo,tc as easeOutQuad,ic as easeOutQuart,dc as easeOutQuint,hc as easeOutSine,Kt as edgeIdOf,Wt as edgeShape,rl as equalSizes,Lp as errorBoundary,ya as findBackEdges,Sn as findItem,fe as firstIndex,ss as fit,Ee as fitLabel,ks as fitScale,Ms as fitSizes,Xt as forceLayout,ga as formPropSchema,me as formatCell,Ze as formatPath,At as formatShortcut,wf as fromTinkerValue,bf as fromValue,Os as generateId,gd as generateSEOTags,kv as generateThemeCSS,hv as getCacheStats,wx as getColorSchemePreference,We as getEffectiveTheme,it as getFocusableElements,Hx as getHighlighter,Kx as getI18n,Zs as getSystemTheme,bv as getTheme,wv as getThemeValue,Se as handleError,hx as hasFocus,de as hasSubmenu,Vx as highlight,zc as highlightToHtml,ka as identityViewport,Hn as inferColumns,jn as inferType,kt as isActionable,Je as isExpandable,yt as isFocusable,Xe as isIndexed,zm as isIsolatingSandbox,ev as isRTL,Od as isTopOverlay,mx as isVisibleToScreenReader,se as labelOf,Ct as lastIndex,Qt as layeredLayout,Vc as lazyLoad,dv as lazyLoadAll,cv as lazyLoadComponent,Bc as lazyLoadImage,mv as lazyLoadImages,De as lazyLoadModule,Ql as linear,tv as loadLocaleMessages,Pe as macosColors,Ut as maxLabelLength,Ht as moveCell,fx as moveFocus,Yx as n,as as nearestInDirection,rs as nearestTo,Dh as nodeAt,Gt as nodeSize,ds as nodeToJson,Ye as nodeToPlain,ot as normalizeScheme,Me as normalizeSizes,tl as normalizeSpace,Ig as normalizeSpaces,Qx as numberFormats,Ua as numberInputPropSchema,Ld as openOverlay,Dd as openOverlays,Ae as pan,qt as parallelOffsets,nt as parseLength,Ps as parseSizes,Tt as placeAtBox,$t as placeAtPoint,Et as placeSubmenu,Xx as pluralRules,vx as prefersHighContrast,xx as prefersReducedMotion,Fc as preloadModule,pv as preloadModules,Qe as previewOf,Dt as projectRow,Tx as removeAnimation,at as resizeAt,Sg as resolveIconColor,qe as resolveItems,Cg as resolveSidebarTheme,Qi as resolveSpaceTint,st as resolveViewport,ns as reveal,zt as rowJson,jt as rowRange,Ss as sandboxValue,Jt as seededRandom,ba as selfLoopShape,Rs as separatorValue,Ix as sequenceAnimations,Ls as serializeSizes,Ap as setErrorHandler,qx as setI18n,eo as setLink,K as setMeta,Qs as setTitle,Es as sidebarThemes,Ag as spaceIndexOf,Pg as spaceTintPayload,el as spaceTintVars,Eg as spaceWashGradient,Ex as staggerAnimation,he as stepIndex,Ts as stepViewport,db as storage,rt as storageName,Hd as stxThemePreset,ut as syntaxPanelCss,Nc as syntaxThemeCss,pt as syntaxTokenRules,Ne as syntaxVariables,Gx as t,Ux as tc,Ga as textInputPropSchema,yv as themePresets,_c as themeToCSSProperties,Vd as themeVariableNames,Fn as toCsv,Ue as toGraph,Vn as toJson,Oh as toScreen,St as typeAheadIndex,Ed as useBreakpoint,xd as useClickOutside,dd as useCopyCode,hd as useDarkMode,wd as useFocusTrap,Pd as useIsDarkMode,Ad as useIsDesktop,Id as useIsMobile,kd as useKeyboard,$d as useLocalStorage,pe as useMediaQuery,Md as usePrefersReducedMotion,md as useSEO,vv as useTheme,kx as validateAriaRelationships,Fp as validateButtonProps,rf as validateEmailInputProps,Eh as validateFormProps,cf as validateNumberInputProps,lf as validatePasswordInputProps,Ho as validateProps,df as validateSearchInputProps,Wp as validateSize,af as validateTextInputProps,_p as validateVariant,Ac as waitForAnimation,jo as warn,Dp as warnProp,wt as wrapErrorHandler,ts as zoomAt};
|
|
44
|
+
}`}function xv(e,t){if(ze=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,n])=>{if(n)s.style.setProperty(`--color-${o}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-${o}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,n])=>{if(n)s.style.setProperty(`--text-${o}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-weight-${o}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--leading-${o}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([o,n])=>{if(n)s.style.setProperty(`--spacing-${o}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,n])=>{if(n)s.style.setProperty(`--radius-${o}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([o,n])=>{if(n)s.style.setProperty(`--shadow-${o}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,n])=>{if(n)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,n])=>{if(n)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,n])=>{if(n)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function vv(){return ze}function wv(e){let t=e.split("."),s=ze;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var yv={default:gt,purple:be({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:be({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:be({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:be({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:be({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function kv(e){return qc(e)}var Wc="./ChatInbox-3cz5tt0d.stx";var Gc="./ChatMessage-rj37tdgn.stx";var Jc="./ConversationListItem-fjha2cgq.stx";var Xc="./MessageBubble-v5m96g43.stx";function Iv(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let o=!1,n=t.replace(/\{(\w+)\}/g,(a,r)=>{let l=s[r];if(l==null||l==="")return o=!0,"";return encodeURIComponent(String(l))});return o?"":n}import{derived as xe,effect as Zc,sharedRequest as Qc,state as U}from"@stacksjs/stx";import{useBroadcastStream as ed}from"@stacksjs/stx/composables/use-broadcast-stream";var td=1500;function Rv(e){let t=e.endpoint??"/messages",s=xe(e.scopeKey),o=U([]),n=U([]),a=U(null),r=U(""),l=U([]),c=U(!1),i=U(!1),d=U(!1),u=U(""),p=U(""),h=U(""),g=U(!1),m=U(!1),w=U(4000),y=U(!1),v=new Set,x=null,S=null,P="",T=0,j=new Map,V=null,F=!1,b=0;function C(){T++,o.set([]),n.set([]),a.set(null),r.set(""),l.set([]),p.set(""),u.set(""),c.set(!1),i.set(!1),d.set(!1),j=new Map,V=null,b=0,m.set(!1),x?.close(),x=null}function N(){let A=e.scopeKey();if(A!==P)C(),P=A;return Ks(),T}async function R(A,I){let z=await e.request(`${t}${A}`,{...I,cache:"no-store"}),B=await z.json().catch(()=>({}));if(!z.ok)throw Error(B.error||"Could not load messages. Try again.");return B}let L=xe(()=>{let A=h().toLowerCase().trim();return o().map((I)=>({...I,conversation:n().find((z)=>z.recipient_id===I.id)})).filter((I)=>(!A||`${I.name} ${I.role}`.toLowerCase().includes(A))&&(!g()||(I.conversation?.unread??0)>0)).sort((I,z)=>(z.conversation?.last_message?.id??0)-(I.conversation?.last_message?.id??0)||I.name.localeCompare(z.name))}),E=xe(()=>n().reduce((A,I)=>A+I.unread,0)),M=xe(()=>!!r()&&!!p().trim()&&p().trim().length<=w()&&!d()&&!i()),k=xe(e.selfId);function D(A){u.set(A instanceof Error?A.message:"Could not load messages. Try again.")}async function O(A,I,z=!0){let B=await R(`/conversations/${I}`);if(A!==T||I!==r()||e.scopeKey()!==P)return;let Q=B.messages[0]?.id;if(l.set([...l().filter((Be)=>Q&&Be.id<Q),...B.messages]),l().length===B.messages.length)m.set(B.has_more);let ye=B.messages.at(-1);if(z&&ye){if(await R(`/conversations/${I}/read`,{method:"POST",body:JSON.stringify({through_id:ye.id})}),A===T&&I===r())n.update((Be)=>Be.map((qe)=>qe.id===I?{...qe,unread:0}:qe))}}let J=Qc(),H=new Set;function _(){if(!e.broadcastEndpoint||!e.selfId()||y())return Promise.resolve();return new Promise((A)=>{let I=()=>{clearTimeout(z),H.delete(I),A()},z=setTimeout(I,td);H.add(I)})}function Z(){if(!H.size)return!1;for(let A of[...H])A();return!0}function ve(){return N(),J.run(T,()=>_().then(we)).finally(le)}async function He(){N(),await J.fresh(T,()=>we()).finally(le)}async function we(){let A=N();c.set(!0),u.set("");try{let I=await R("");if(A!==T||e.scopeKey()!==P)return;o.set(I.contacts),n.set(I.conversations),w.set(I.max_length),c.set(!1);let z=a()?I.contacts.find((Q)=>Q.id===a().id):null;if(a()&&!z){let Q=a().id;bt(),j.delete(Q),p.set(""),V=null}else if(z)a.set(z);let B=e.initialRecipient?.()??0;if(B>0&&B!==b){let Q=I.contacts.find((ye)=>ye.id===B);if(Q)b=B,await je(Q)}}catch(I){if(A===T)D(I)}finally{if(A===T)c.set(!1)}}async function je(A){if(N(),a())j.set(a().id,p());let I=++T;d.set(!1),a.set(A),p.set(j.get(A.id)??""),r.set(""),l.set([]),m.set(!1),u.set(""),i.set(!0);try{let z=await R("/conversations",{method:"POST",body:JSON.stringify({recipient_id:A.id})});if(I!==T||e.scopeKey()!==P)return;r.set(z.id),await O(I,z.id)}catch(z){if(I===T)D(z)}finally{if(I===T)i.set(!1);le()}}function bt(){if(a())j.set(a().id,p());T++,d.set(!1),i.set(!1),a.set(null),r.set(""),l.set([]),u.set("")}async function _s(){if(N(),!M())return;let A=r(),I=p().trim(),z=T,B=V?.body===I&&V.thread===A?V.key:crypto.randomUUID();V={body:I,key:B,thread:A},d.set(!0),u.set("");try{if(await R(`/conversations/${A}/messages`,{method:"POST",body:JSON.stringify({body:I,client_key:B})}),z!==T||e.scopeKey()!==P)return;if(p().trim()===I)p.set("");j.delete(a().id),V=null,await O(z,A),await He()}catch(Q){if(z===T)D(Q)}finally{if(z===T)d.set(!1);le()}}async function Ws(){let A=r(),I=l()[0]?.id,z=T;if(!A||!I||i())return;i.set(!0);try{let B=await R(`/conversations/${A}?before=${I}`);if(z===T&&A===r())l.set([...B.messages,...l()]),m.set(B.has_more)}catch(B){if(z===T)D(B)}finally{if(z===T)i.set(!1);le()}}async function xt(A=!1){if(F||d()||i())return;F=!0;try{if(await ve(),A&&a()&&!r())await je(a());else if(A&&r())await O(T,r())}catch(I){D(I)}finally{F=!1,le()}}let Ve=!1;async function Fe(){if(F||J.busy||d()||i()){Ve=!0;return}await xt([...v].some((A)=>A()))}function Ks(){if(x||!v.size||!e.selfId()||!e.broadcastEndpoint)return;let A=P;x=ed({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(I)=>{if(y.set(I),!I)Z()},onConnected:()=>{if(!Z()&&A===e.scopeKey())Fe()},onMessage:(I)=>{if(A===e.scopeKey()&&I.event.startsWith("messaging."))Fe()}})}function Gs(A=()=>!1){if(v.add(A),N(),!S)S=Zc(()=>{N()});return()=>{if(v.delete(A),!v.size)x?.close(),x=null,S?.(),S=null}}function le(){if(Ve)Ve=!1,Fe()}return{contacts:o,conversations:n,selected:a,threadId:r,messages:l,loading:c,threadLoading:i,sending:d,error:u,draft:p,search:h,unreadOnly:g,hasMore:m,maxLength:w,rows:L,unread:E,canSend:M,selfId:k,scopeKey:s,load:ve,open:je,back:bt,send:_s,older:Ws,refresh:xt,reset:C,observe:Gs,connected:y}}var od="./ChatUnreadBadge-3vq0t8d2.stx";var ad="./ChatLauncher-3zph4trh.stx";export{oo as Accordion,ao as AccordionItem,io as AddressField,Fl as AiTextarea,Ax as AnimationClasses,So as Audio,Ro as Avatar,No as Badge,Do as Breadcrumb,ue as Breakpoints,Fo as Button,_o as Calendar,en as Card,Wc as ChatInbox,ad as ChatLauncher,Gc as ChatMessage,od as ChatUnreadBadge,sn as Checkbox,Br as Checkout,nn as ChoiceChips,Us as CodeBlock,rn as CodeEditor,cn as Combobox,pn as ComboboxButton,hn as ComboboxInput,mn as ComboboxOption,bn as ComboboxOptions,co as CommandBar,vn as CommandPalette,yn as CommandPaletteItem,Y as ComponentError,uo as ContentCard,Cn as ContextMenu,On as ContextMenuView,Jc as ConversationListItem,Wu as DEFAULT_MAX_WIDTH,_u as DEFAULT_MIN_WIDTH,_n as DataGrid,Gn as DataGridView,Ko as DateRangePicker,_r as DefaultPaymentMethod,Jn as Dialog,Xn as DialogBackdrop,Qn as DialogDescription,ta as DialogPanel,oa as DialogTitle,aa as Drawer,ia as Dropdown,ca as DropdownButton,pa as DropdownItem,ha as DropdownItems,Sx as Easing,za as EmailInput,Uo as EmptyState,Yo as ErrorState,ce as ErrorTypes,Ku as FIT_MAX_WIDTH,oi as FORBIDDEN_SANDBOX_TOKENS,xr as FilterChip,wr as FilterChips,fo as FloatingPanel,Js as Footer,ma as Form,Aa as GraphCanvas,Ie as GraphModel,Sa as GraphView,Ke as GridModel,Ma as GroupedList,La as GroupedListRow,Ys as Hero,Oa as Image,Xs as Installation,Gu as JSON_PREVIEW_LENGTH,er as JsonTree,nr as JsonTreeView,ux as KeyboardKeys,Cd as KeyboardShortcuts,Mc as KeyframeAnimations,rr as List,kr as ListRow,lr as Listbox,dr as ListboxButton,ur as ListboxLabel,fr as ListboxOption,gr as ListboxOptions,To as Login,Xc as MessageBubble,Sr as NavBar,Rr as Navigator,Nr as Notification,ja as NumberInput,Dr as Pager,Hr as PagerDots,Vr as Pagination,Fa as PasswordInput,Kr as PaymentMethods,Yr as Popover,Zr as PopoverButton,ei as PopoverPanel,si as Portal,ci as PreviewFrame,pi as PreviewFrameView,hi as Progress,f as PropTypes,mi as Radio,bi as RadioGroup,vi as RadioGroupDescription,yi as RadioGroupLabel,Ci as RadioGroupOption,Hd as SHADE_VAR_PREFIX,dt as SYNTAX_DARK,ct as SYNTAX_LIGHT,Lc as SYNTAX_PROPERTIES,Hs as SYNTAX_TOKENS,qa as SearchInput,Tr as SectionCard,$i as SegmentedControl,Ei as Select,Ai as Sidebar,go as SidebarDivider,Mi as SidebarFooter,Li as SidebarHeader,Oi as SidebarItem,zi as SidebarPinned,xo as SidebarRow,ji as SidebarSection,Fi as SidebarSpace,Wi as SidebarSpaceSwitcher,qi as SidebarSpaces,Io as Signup,ol as Skeleton,wo as SpaceSwitcher,al as Spinner,ll as SplitPane,cl as SplitPaneView,pl as Stepper,hl as StepperStep,Le as StorageManager,Ur as SubscriptionCheckout,ml as Switch,vt as THEMED_FAMILIES,Al as Tab,Ir as TabBar,Pr as TabBarItem,Ml as TabList,Ll as TabPanel,bl as Table,vl as TableBody,yl as TableCell,Cl as TableHead,$l as TableHeader,El as TableRow,Ol as Tabs,zl as Teleport,Wa as TextInput,jl as Textarea,Zo as ThemeToggle,ko as TileGrid,ql as Tooltip,Wl as Transition,et as TreeModel,Po as TwoFactorChallenge,ys as VIEWPORT_PRESETS,Gl as Video,Jl as VirtualList,Xl as VirtualTable,Lx as animate,Px as animateWithClass,cx as announceToScreenReader,zs as applyAnimation,Bx as applyHeadwindClasses,xv as applyTheme,gx as aria,Pt as ariaShortcut,zo as assert,Op as assertProp,$s as buildDocument,Bo as buttonPropSchema,Ot as cellJson,Nt as cellKind,te as cellValue,os as centreOn,es as clampZoom,Pp as clearErrorHandler,uv as clearModuleCache,Ft as clipToRect,Nd as closeOverlay,js as codeBlockCss,Ox as componentApi,sv as componentMessages,wa as connectedComponents,Iv as contactLink,pd as copyToClipboard,lx as createAriaDescription,ix as createAriaLabel,Rv as createChat,iv as createComponentPool,Rp as createDebugger,dx as createFocusTrap,_x as createI18n,nv as createKeepAlive,Pc as createKeyframeAnimation,Mx as createKeyframes,av as createLRUCache,ee as createPropValidator,fv as createRouteLoader,px as createRovingTabindex,Bp as createSafeClickHandler,bx as createScreenReaderText,yx as createSkipLink,rv as createStateManager,pb as createStorage,be as createTheme,Ic as cssAnimation,Bn as cycleSort,Jx as d,Zx as dateTimeFormats,Hm as declaresColorScheme,Ge as defaultNodeMetrics,gt as defaultTheme,Is as deriveSpaceTint,Cs as describeViewport,Fx as detectLanguage,Mp as devAssert,Re as dividerRange,Sc as easeInBack,Ds as easeInBounce,xc as easeInCirc,oc as easeInCubic,yc as easeInElastic,mc as easeInExpo,Tc as easeInOutBack,Ec as easeInOutBounce,wc as easeInOutCirc,ac as easeInOutCubic,Cc as easeInOutElastic,bc as easeInOutExpo,sc as easeInOutQuad,lc as easeInOutQuart,pc as easeInOutQuint,fc as easeInOutSine,ec as easeInQuad,rc as easeInQuart,cc as easeInQuint,uc as easeInSine,$c as easeOutBack,lt as easeOutBounce,vc as easeOutCirc,nc as easeOutCubic,kc as easeOutElastic,gc as easeOutExpo,tc as easeOutQuad,ic as easeOutQuart,dc as easeOutQuint,hc as easeOutSine,Kt as edgeIdOf,_t as edgeShape,rl as equalSizes,Lp as errorBoundary,ya as findBackEdges,Sn as findItem,fe as firstIndex,ss as fit,Ee as fitLabel,ks as fitScale,Ms as fitSizes,Xt as forceLayout,ga as formPropSchema,me as formatCell,Ze as formatPath,At as formatShortcut,wf as fromTinkerValue,bf as fromValue,Os as generateId,gd as generateSEOTags,kv as generateThemeCSS,hv as getCacheStats,wx as getColorSchemePreference,_e as getEffectiveTheme,it as getFocusableElements,jx as getHighlighter,Kx as getI18n,Zs as getSystemTheme,bv as getTheme,wv as getThemeValue,Se as handleError,hx as hasFocus,de as hasSubmenu,Vx as highlight,zc as highlightToHtml,ka as identityViewport,jn as inferColumns,Hn as inferType,kt as isActionable,Je as isExpandable,yt as isFocusable,Xe as isIndexed,zm as isIsolatingSandbox,ev as isRTL,Od as isTopOverlay,mx as isVisibleToScreenReader,se as labelOf,Ct as lastIndex,Qt as layeredLayout,Vc as lazyLoad,dv as lazyLoadAll,cv as lazyLoadComponent,Bc as lazyLoadImage,mv as lazyLoadImages,De as lazyLoadModule,Ql as linear,tv as loadLocaleMessages,Pe as macosColors,Ut as maxLabelLength,jt as moveCell,fx as moveFocus,Yx as n,as as nearestInDirection,rs as nearestTo,Dh as nodeAt,Gt as nodeSize,ds as nodeToJson,Ye as nodeToPlain,ot as normalizeScheme,Me as normalizeSizes,tl as normalizeSpace,Ig as normalizeSpaces,Qx as numberFormats,Ua as numberInputPropSchema,Ld as openOverlay,Dd as openOverlays,Ae as pan,Wt as parallelOffsets,nt as parseLength,Ps as parseSizes,Tt as placeAtBox,$t as placeAtPoint,Et as placeSubmenu,Xx as pluralRules,vx as prefersHighContrast,xx as prefersReducedMotion,Fc as preloadModule,pv as preloadModules,Qe as previewOf,Dt as projectRow,Tx as removeAnimation,at as resizeAt,Sg as resolveIconColor,We as resolveItems,Cg as resolveSidebarTheme,Qi as resolveSpaceTint,st as resolveViewport,ns as reveal,zt as rowJson,Ht as rowRange,Ss as sandboxValue,Jt as seededRandom,ba as selfLoopShape,Rs as separatorValue,Ix as sequenceAnimations,Ls as serializeSizes,Ap as setErrorHandler,Wx as setI18n,eo as setLink,K as setMeta,Qs as setTitle,Es as sidebarThemes,Ag as spaceIndexOf,Pg as spaceTintPayload,el as spaceTintVars,Eg as spaceWashGradient,Ex as staggerAnimation,he as stepIndex,Ts as stepViewport,db as storage,rt as storageName,jd as stxThemePreset,ut as syntaxPanelCss,Nc as syntaxThemeCss,pt as syntaxTokenRules,Ne as syntaxVariables,Gx as t,Ux as tc,Ga as textInputPropSchema,yv as themePresets,qc as themeToCSSProperties,Vd as themeVariableNames,Fn as toCsv,Ue as toGraph,Vn as toJson,Oh as toScreen,St as typeAheadIndex,Ed as useBreakpoint,xd as useClickOutside,dd as useCopyCode,hd as useDarkMode,wd as useFocusTrap,Pd as useIsDarkMode,Ad as useIsDesktop,Id as useIsMobile,kd as useKeyboard,$d as useLocalStorage,pe as useMediaQuery,Md as usePrefersReducedMotion,md as useSEO,vv as useTheme,kx as validateAriaRelationships,Fp as validateButtonProps,rf as validateEmailInputProps,Eh as validateFormProps,cf as validateNumberInputProps,lf as validatePasswordInputProps,jo as validateProps,df as validateSearchInputProps,_p as validateSize,af as validateTextInputProps,qp as validateVariant,Ac as waitForAnimation,Ho as warn,Dp as warnProp,wt as wrapErrorHandler,ts as zoomAt};
|