@stacksjs/components 0.2.961 → 0.2.963

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +4 -0
  2. package/dist/{AppearancePicker-30fetv0a.stx → AppearancePicker-34758z53.stx} +2 -70
  3. package/dist/{Button-ghdfqwg0.stx → Button-rns3jhjh.stx} +33 -70
  4. package/dist/{Checkbox-355qsbwd.stx → Checkbox-4g3hemtw.stx} +1 -69
  5. package/dist/{ColorSwatches-ecfxphjy.stx → ColorSwatches-mz9kt78g.stx} +1 -69
  6. package/dist/{DateTimePicker-pz9p8jw4.stx → DateTimePicker-d5984mm1.stx} +5 -3
  7. package/dist/{NumberInput-e2afxyh3.stx → NumberInput-nqqen5a6.stx} +2 -70
  8. package/dist/{PasswordInput-d78bk8r0.stx → PasswordInput-j38f2n01.stx} +2 -70
  9. package/dist/{RadioGroup-ps9kn22f.stx → RadioGroup-mz3pv7he.stx} +1 -69
  10. package/dist/{RadioGroupOption-6hyy1bvb.stx → RadioGroupOption-mk98taz5.stx} +1 -69
  11. package/dist/{SegmentedControl-b93n9n2v.stx → SegmentedControl-jm6tb9f8.stx} +1 -69
  12. package/dist/{Select-p8mgxthn.stx → Select-36s22z6d.stx} +2 -70
  13. package/dist/{SettingsGroup-g1hnxp1p.stx → SettingsGroup-t3emsgk2.stx} +2 -70
  14. package/dist/{SettingsPane-9svk1w3e.stx → SettingsPane-tqe8q5cw.stx} +11 -3
  15. package/dist/{SettingsPaneHeader-am42srhp.stx → SettingsPaneHeader-wznh6dss.stx} +2 -70
  16. package/dist/{SettingsRow-kgda3nv1.stx → SettingsRow-5jgay5ae.stx} +2 -70
  17. package/dist/SettingsSidebarGroup-p5h359bn.stx +57 -0
  18. package/dist/{SettingsSidebarItem-ga2jxq53.stx → SettingsSidebarItem-69zs4b55.stx} +2 -70
  19. package/dist/{SettingsUpdateRow-ajpnqx8a.stx → SettingsUpdateRow-92mmxvpd.stx} +1 -69
  20. package/dist/{SettingsWindow-v7jepxem.stx → SettingsWindow-q0x86xqb.stx} +8 -70
  21. package/dist/{SidebarSpace-aac0byam.stx → SidebarSpace-3w1cfnzj.stx} +3 -1
  22. package/dist/{Slider-j59dgw1c.stx → Slider-cebse060.stx} +1 -69
  23. package/dist/{Switch-vd8k23sr.stx → Switch-7s3bhjg4.stx} +2 -70
  24. package/dist/{TextInput-fge1b7tk.stx → TextInput-4v09vw1r.stx} +2 -70
  25. package/dist/index.js +17 -17
  26. package/dist/settings/settings.js +80 -19
  27. package/dist/ui/button/Button.d.ts +4 -1
  28. package/dist/ui/button/index.d.ts +4 -0
  29. package/dist/ui/date-time-picker/DateTimePicker.d.ts +2 -0
  30. package/dist/ui/settings/SettingsPane.d.ts +6 -3
  31. package/dist/ui/settings/SettingsWindow.d.ts +4 -1
  32. package/dist/ui/settings/index.d.ts +4 -0
  33. package/dist/ui/settings/view.d.ts +3 -0
  34. package/package.json +3 -3
  35. package/{dist/SettingsSidebarGroup-4ag5qjpw.stx → src/theme/macos.css} +0 -57
  36. package/src/ui/appearance-picker/AppearancePicker.stx +2 -70
  37. package/src/ui/button/Button.stx +33 -70
  38. package/src/ui/button/index.ts +9 -0
  39. package/src/ui/checkbox/Checkbox.stx +1 -69
  40. package/src/ui/color-swatches/ColorSwatches.stx +1 -69
  41. package/src/ui/date-time-picker/DateTimePicker.stx +5 -3
  42. package/src/ui/input/NumberInput.stx +2 -70
  43. package/src/ui/input/PasswordInput.stx +2 -70
  44. package/src/ui/input/TextInput.stx +2 -70
  45. package/src/ui/radio-group/RadioGroup.stx +1 -69
  46. package/src/ui/radio-group/RadioGroupOption.stx +1 -69
  47. package/src/ui/segmented-control/SegmentedControl.stx +1 -69
  48. package/src/ui/select/Select.stx +2 -70
  49. package/src/ui/settings/README.md +21 -0
  50. package/src/ui/settings/SettingsGroup.stx +2 -70
  51. package/src/ui/settings/SettingsPane.stx +11 -3
  52. package/src/ui/settings/SettingsPaneHeader.stx +2 -70
  53. package/src/ui/settings/SettingsRow.stx +2 -70
  54. package/src/ui/settings/SettingsSidebarGroup.stx +2 -70
  55. package/src/ui/settings/SettingsSidebarItem.stx +2 -70
  56. package/src/ui/settings/SettingsUpdateRow.stx +1 -69
  57. package/src/ui/settings/SettingsWindow.stx +8 -70
  58. package/src/ui/settings/index.ts +6 -0
  59. package/src/ui/settings/view.ts +93 -21
  60. package/src/ui/sidebar/SidebarSpace.stx +3 -1
  61. package/src/ui/slider/Slider.stx +1 -69
  62. package/src/ui/switch/Switch.stx +2 -70
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
1
  // @bun
2
- var Ya={__stx:!0,src:"./components/CodeBlock.stx"};var Xa={__stx:!0,src:"./components/Footer.stx"};var Za={__stx:!0,src:"./components/Hero.stx"};var Qa={__stx:!0,src:"./components/Installation.stx"};function Ch(e){let{code:t,onSuccess:s,onError:a,timeout:n=2000}=e,o=!1,i=null;return{copied:o,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),o=!0,s?.(),i=setTimeout(()=>{o=!1,i=null},n)}catch(l){let d=l instanceof Error?l:Error("Failed to copy code");a?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(o=!1,i)clearTimeout(i),i=null}}}async function Th(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function en(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function yt(e){return e==="system"?en():e}function Eh(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,a=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)a=c}let n=yt(a)==="dark",o=(c)=>{let l=yt(c);if(typeof document<"u")if(l==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},i=(c)=>{a=c,o(c)},r=()=>{let l=yt(a)==="dark"?"light":"dark";i(l)};if(o(a),typeof window<"u"&&a==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(a==="system")o("system")});return{isDark:n,theme:a,toggle:r,setTheme:i}}function tn(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function W(e,t,s=!1){if(typeof document>"u")return;let a=s?"property":"name",n=document.querySelector(`meta[${a}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(a,e),document.head.appendChild(n);n.setAttribute("content",t)}function sn(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 Ah(e){let{title:t,description:s,author:a,keywords:n,ogImage:o,ogImageWidth:i,ogImageHeight:r,twitterCard:c="summary_large_image",twitterSite:l,twitterCreator:d,canonical:h}=e;if(t)tn(t),W("og:title",t,!0),W("twitter:title",t);if(s)W("description",s),W("og:description",s,!0),W("twitter:description",s);if(a)W("author",a);if(n&&n.length>0)W("keywords",n.join(", "));if(o)W("og:image",o,!0),W("twitter:image",o);if(i)W("og:image:width",i,!0);if(r)W("og:image:height",r,!0);if(W("twitter:card",c),l)W("twitter:site",l);if(d)W("twitter:creator",d);if(h)sn("canonical",h);if(W("og:type","website",!0),typeof window<"u")W("og:url",window.location.href,!0)}function Ph(e){let t=[],{title:s,description:a,author:n,keywords:o,ogImage:i,ogImageWidth:r,ogImageHeight:c,twitterCard:l="summary_large_image",twitterSite:d,twitterCreator:h,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(a)t.push(`<meta name="description" content="${G(a)}" />`),t.push(`<meta property="og:description" content="${G(a)}" />`),t.push(`<meta name="twitter:description" content="${G(a)}" />`);if(n)t.push(`<meta name="author" content="${G(n)}" />`);if(o&&o.length>0)t.push(`<meta name="keywords" content="${G(o.join(", "))}" />`);if(i)t.push(`<meta property="og:image" content="${G(i)}" />`),t.push(`<meta name="twitter:image" content="${G(i)}" />`);if(r)t.push(`<meta property="og:image:width" content="${G(r)}" />`);if(c)t.push(`<meta property="og:image:height" content="${G(c)}" />`);if(t.push(`<meta name="twitter:card" content="${G(l)}" />`),d)t.push(`<meta name="twitter:site" content="${G(d)}" />`);if(h)t.push(`<meta name="twitter:creator" content="${G(h)}" />`);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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Rh(e,t,s={}){let{enabled:a=!0,ignore:n=[]}=s,o=(i)=>{if(!a||!e)return;let r=i.target;if(!e.contains(r)){if(!n.some((l)=>{let d=document.querySelectorAll(l);return Array.from(d).some((h)=>h.contains(r))}))t(i)}};if(typeof document<"u")document.addEventListener("mousedown",o),document.addEventListener("touchstart",o);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}function Lh(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:n=!0,fallbackFocus:o=null}=t,i=null,r=!1;function c(){if(!e)return[];let u=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(u))}function l(u){if(!s||!r||!e)return;let g=c();if(g.length===0){u.preventDefault();return}let m=g[0],w=g[g.length-1];if(u.shiftKey){if(document.activeElement===m||document.activeElement===e)u.preventDefault(),w.focus()}else if(document.activeElement===w)u.preventDefault(),m.focus()}function d(u){if(u.key==="Escape"&&s&&r)p()}function h(){if(!s||!e||r)return;if(i=document.activeElement,a)a.focus();else{let u=c();if(u.length>0)u[0].focus();else if(o)o.focus();else e.focus()}document.addEventListener("keydown",l),document.addEventListener("keydown",d),r=!0}function p(){if(!r)return;if(document.removeEventListener("keydown",l),document.removeEventListener("keydown",d),n&&i)i.focus();r=!1}return{activate:h,deactivate:p}}function Oh(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:n=!1,target:o=typeof document<"u"?document:null}=t,i=Array.isArray(e)?e:[e],r=(c)=>{if(!s)return;i.forEach((l)=>{if(!(Array.isArray(l.key)?l.key:[l.key]).some((p)=>p.toLowerCase()===c.key.toLowerCase()))return;if(l.ctrl!==void 0&&l.ctrl!==c.ctrlKey)return;if(l.shift!==void 0&&l.shift!==c.shiftKey)return;if(l.alt!==void 0&&l.alt!==c.altKey)return;if(l.meta!==void 0&&l.meta!==c.metaKey)return;if(a)c.preventDefault();if(n)c.stopPropagation();l.handler(c)})};if(o)o.addEventListener("keydown",r);return()=>{if(o)o.removeEventListener("keydown",r)}}var zh={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 Fh(e,t,s={}){let{serializer:a=JSON.stringify,deserializer:n=JSON.parse,onError:o=console.error}=s,i=t;try{if(typeof window<"u"){let h=window.localStorage.getItem(e);if(h!==null)i=n(h)}}catch(h){o(h)}let r=i,c=new Set;function l(h){try{let p=typeof h==="function"?h(r):h;if(r=p,typeof window<"u")window.localStorage.setItem(e,a(p));c.forEach((u)=>u(p))}catch(p){o(p)}}function d(){try{if(r=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((h)=>h(t))}catch(h){o(h)}}if(typeof window<"u"){let h=(p)=>{if(p.key===e&&p.newValue!==null)try{let u=n(p.newValue);r=u,c.forEach((g)=>g(u))}catch(u){o(u)}else if(p.key===e&&p.newValue===null)r=t,c.forEach((u)=>u(t))};window.addEventListener("storage",h)}return{value:r,setValue:l,removeValue:d}}function Ce(e,t={}){let{defaultValue:s=!1}=t,a=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),a=n.matches;let i=(r)=>{a=r.matches};if(n.addEventListener)n.addEventListener("change",i);else n.addListener(i)}function o(){if(n)a=n.matches}return{matches:a,updateMatches:o}}var Te={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 jh(e){return Ce(Te[e])}function Bh(){return Ce(Te.mobile)}function _h(){return Ce(Te.desktop)}function Kh(){return Ce(Te.dark)}function qh(){return Ce(Te.reducedMotion)}function He(){return globalThis.stx?.overlays}function Gh(e,t){He()?.open(e,t)}function Uh(e){He()?.close(e)}function Jh(e){return He()?.isTop(e)??!1}function Yh(){return He()?.list()??[]}var as=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],Zh="--stx-color";function an(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function Qh(e={}){let t={};for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;let n={};for(let[o,i]of Object.entries(a))n[o]=an(`--stx-color-${s}-${o}`,i);t[s]=n}return t}function eu(e={}){let t=[];for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;for(let n of Object.keys(a))t.push(`--stx-color-${s}-${n}`)}return t}var on="./Accordion-ehpymjam.stx";var ln="./AccordionItem-fc4ekdqf.stx";var dn="./AddressField-gcydmvkf.stx";var hn="./CommandBar-k35nsefs.stx";var fn="./ContentCard-gjsm9qrr.stx";var gn="./FloatingPanel-qp8cq8hz.stx";var bn="./SidebarDivider-6whech7a.stx";var wn="./SidebarRow-301dd797.stx";var kn="./SpaceSwitcher-297p5gnb.stx";var Cn="./TileGrid-nne4x506.stx";var $n="./AppearancePicker-30fetv0a.stx";var In="./Audio-ay34sh1f.stx";var Pn="./BiometricSignIn-6enqcn9e.stx";var Rn="./Login-4666t7j4.stx";var Ln="./Signup-pm2r0f2m.stx";var On="./TwoFactorChallenge-3tsbfdsd.stx";var Lu="session",zn={faceId:"Face ID",touchId:"Touch ID",fingerprint:"Fingerprint"};function ns(e){return typeof e==="string"?zn[e]||"":""}function Du(e){let t=ns(e);return t?`Sign in with ${t}`:""}function Hn(){let t=globalThis.craft?.biometrics;if(!t)return null;return["isAvailable","getBiometricType","storeCredential","getCredential","hasCredential","deleteCredential"].every((a)=>typeof t[a]==="function")?t:null}var Fe=Object.freeze({available:!1,kind:null,label:"",saved:!1});function Fn(e){let t=e?.code;return typeof t==="string"&&t?t:"UNKNOWN"}function Vn(e){return e instanceof Error?e.message:String(e??"")}function Ou(e="session",t){let s=String(e||"").trim()||"session",a=()=>t===void 0?Hn():t;async function n(){let c=a();if(!c)return Fe;try{if(!await c.isAvailable())return Fe;let l=await c.getBiometricType(),d=ns(l);if(!d)return Fe;return{available:!0,kind:l,label:d,saved:await c.hasCredential(s)===!0}}catch{return Fe}}async function o(c){let l=a();if(!l)return{status:"failed",code:"UNSUPPORTED",message:"Biometric sign-in is not available here."};try{let d=await l.getCredential(s,c||void 0);if(typeof d==="string"&&d)return{status:"signed-in",token:d};return await l.deleteCredential(s).catch(()=>{}),{status:"invalidated"}}catch(d){let h=Fn(d);if(h==="AUTHENTICATION_CANCELLED")return{status:"cancelled"};return{status:"failed",code:h,message:Vn(d)}}}async function i(c){let l=a();if(!l||typeof c!=="string"||!c)return!1;try{if(!await l.isAvailable())return!1;return await l.storeCredential(s,c),!0}catch{return!1}}async function r(){let c=a();if(!c)return;await c.deleteCredential(s).catch(()=>{})}return{probe:n,signIn:o,enable:i,forget:r}}var Bn="./Avatar-6gexb2xv.stx";var Kn="./Badge-wnz3v82e.stx";var Wn="./Breadcrumb-cgw1bb6s.stx";class X extends Error{component;context;constructor(e,t,s={}){let a=X.formatMessage(e,t,s);super(a);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,X)}static formatMessage(e,t,s){let a=`[${e}] ${t}`;if(s.prop)a+=`
2
+ var Ya={__stx:!0,src:"./components/CodeBlock.stx"};var Xa={__stx:!0,src:"./components/Footer.stx"};var Za={__stx:!0,src:"./components/Hero.stx"};var Qa={__stx:!0,src:"./components/Installation.stx"};function $u(e){let{code:t,onSuccess:s,onError:a,timeout:n=2000}=e,o=!1,i=null;return{copied:o,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),o=!0,s?.(),i=setTimeout(()=>{o=!1,i=null},n)}catch(l){let d=l instanceof Error?l:Error("Failed to copy code");a?.(d),console.error("Failed to copy code:",d)}},reset:()=>{if(o=!1,i)clearTimeout(i),i=null}}}async function Tu(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function en(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function yt(e){return e==="system"?en():e}function Iu(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,a=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)a=c}let n=yt(a)==="dark",o=(c)=>{let l=yt(c);if(typeof document<"u")if(l==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},i=(c)=>{a=c,o(c)},r=()=>{let l=yt(a)==="dark"?"light":"dark";i(l)};if(o(a),typeof window<"u"&&a==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(a==="system")o("system")});return{isDark:n,theme:a,toggle:r,setTheme:i}}function tn(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function W(e,t,s=!1){if(typeof document>"u")return;let a=s?"property":"name",n=document.querySelector(`meta[${a}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(a,e),document.head.appendChild(n);n.setAttribute("content",t)}function sn(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 Pu(e){let{title:t,description:s,author:a,keywords:n,ogImage:o,ogImageWidth:i,ogImageHeight:r,twitterCard:c="summary_large_image",twitterSite:l,twitterCreator:d,canonical:u}=e;if(t)tn(t),W("og:title",t,!0),W("twitter:title",t);if(s)W("description",s),W("og:description",s,!0),W("twitter:description",s);if(a)W("author",a);if(n&&n.length>0)W("keywords",n.join(", "));if(o)W("og:image",o,!0),W("twitter:image",o);if(i)W("og:image:width",i,!0);if(r)W("og:image:height",r,!0);if(W("twitter:card",c),l)W("twitter:site",l);if(d)W("twitter:creator",d);if(u)sn("canonical",u);if(W("og:type","website",!0),typeof window<"u")W("og:url",window.location.href,!0)}function Mu(e){let t=[],{title:s,description:a,author:n,keywords:o,ogImage:i,ogImageWidth:r,ogImageHeight:c,twitterCard:l="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(a)t.push(`<meta name="description" content="${G(a)}" />`),t.push(`<meta property="og:description" content="${G(a)}" />`),t.push(`<meta name="twitter:description" content="${G(a)}" />`);if(n)t.push(`<meta name="author" content="${G(n)}" />`);if(o&&o.length>0)t.push(`<meta name="keywords" content="${G(o.join(", "))}" />`);if(i)t.push(`<meta property="og:image" content="${G(i)}" />`),t.push(`<meta name="twitter:image" content="${G(i)}" />`);if(r)t.push(`<meta property="og:image:width" content="${G(r)}" />`);if(c)t.push(`<meta property="og:image:height" content="${G(c)}" />`);if(t.push(`<meta name="twitter:card" content="${G(l)}" />`),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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Nu(e,t,s={}){let{enabled:a=!0,ignore:n=[]}=s,o=(i)=>{if(!a||!e)return;let r=i.target;if(!e.contains(r)){if(!n.some((l)=>{let d=document.querySelectorAll(l);return Array.from(d).some((u)=>u.contains(r))}))t(i)}};if(typeof document<"u")document.addEventListener("mousedown",o),document.addEventListener("touchstart",o);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}function Du(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:n=!0,fallbackFocus:o=null}=t,i=null,r=!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 l(h){if(!s||!r||!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&&r)p()}function u(){if(!s||!e||r)return;if(i=document.activeElement,a)a.focus();else{let h=c();if(h.length>0)h[0].focus();else if(o)o.focus();else e.focus()}document.addEventListener("keydown",l),document.addEventListener("keydown",d),r=!0}function p(){if(!r)return;if(document.removeEventListener("keydown",l),document.removeEventListener("keydown",d),n&&i)i.focus();r=!1}return{activate:u,deactivate:p}}function zu(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:n=!1,target:o=typeof document<"u"?document:null}=t,i=Array.isArray(e)?e:[e],r=(c)=>{if(!s)return;i.forEach((l)=>{if(!(Array.isArray(l.key)?l.key:[l.key]).some((p)=>p.toLowerCase()===c.key.toLowerCase()))return;if(l.ctrl!==void 0&&l.ctrl!==c.ctrlKey)return;if(l.shift!==void 0&&l.shift!==c.shiftKey)return;if(l.alt!==void 0&&l.alt!==c.altKey)return;if(l.meta!==void 0&&l.meta!==c.metaKey)return;if(a)c.preventDefault();if(n)c.stopPropagation();l.handler(c)})};if(o)o.addEventListener("keydown",r);return()=>{if(o)o.removeEventListener("keydown",r)}}var Hu={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 Vu(e,t,s={}){let{serializer:a=JSON.stringify,deserializer:n=JSON.parse,onError:o=console.error}=s,i=t;try{if(typeof window<"u"){let u=window.localStorage.getItem(e);if(u!==null)i=n(u)}}catch(u){o(u)}let r=i,c=new Set;function l(u){try{let p=typeof u==="function"?u(r):u;if(r=p,typeof window<"u")window.localStorage.setItem(e,a(p));c.forEach((h)=>h(p))}catch(p){o(p)}}function d(){try{if(r=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((u)=>u(t))}catch(u){o(u)}}if(typeof window<"u"){let u=(p)=>{if(p.key===e&&p.newValue!==null)try{let h=n(p.newValue);r=h,c.forEach((g)=>g(h))}catch(h){o(h)}else if(p.key===e&&p.newValue===null)r=t,c.forEach((h)=>h(t))};window.addEventListener("storage",u)}return{value:r,setValue:l,removeValue:d}}function Ce(e,t={}){let{defaultValue:s=!1}=t,a=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),a=n.matches;let i=(r)=>{a=r.matches};if(n.addEventListener)n.addEventListener("change",i);else n.addListener(i)}function o(){if(n)a=n.matches}return{matches:a,updateMatches:o}}var $e={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 Bu(e){return Ce($e[e])}function _u(){return Ce($e.mobile)}function qu(){return Ce($e.desktop)}function Ku(){return Ce($e.dark)}function Wu(){return Ce($e.reducedMotion)}function He(){return globalThis.stx?.overlays}function Uu(e,t){He()?.open(e,t)}function Ju(e){He()?.close(e)}function Yu(e){return He()?.isTop(e)??!1}function Xu(){return He()?.list()??[]}var as=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],Qu="--stx-color";function an(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function eh(e={}){let t={};for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;let n={};for(let[o,i]of Object.entries(a))n[o]=an(`--stx-color-${s}-${o}`,i);t[s]=n}return t}function th(e={}){let t=[];for(let s of as){let a=e[s];if(!a||typeof a==="string")continue;for(let n of Object.keys(a))t.push(`--stx-color-${s}-${n}`)}return t}var on="./Accordion-ehpymjam.stx";var ln="./AccordionItem-fc4ekdqf.stx";var dn="./AddressField-gcydmvkf.stx";var un="./CommandBar-k35nsefs.stx";var fn="./ContentCard-gjsm9qrr.stx";var gn="./FloatingPanel-qp8cq8hz.stx";var bn="./SidebarDivider-6whech7a.stx";var wn="./SidebarRow-301dd797.stx";var kn="./SpaceSwitcher-297p5gnb.stx";var Cn="./TileGrid-nne4x506.stx";var Tn="./AppearancePicker-34758z53.stx";var In="./Audio-ay34sh1f.stx";var Pn="./BiometricSignIn-6enqcn9e.stx";var Rn="./Login-4666t7j4.stx";var Ln="./Signup-pm2r0f2m.stx";var On="./TwoFactorChallenge-3tsbfdsd.stx";var Dh="session",zn={faceId:"Face ID",touchId:"Touch ID",fingerprint:"Fingerprint"};function ns(e){return typeof e==="string"?zn[e]||"":""}function Oh(e){let t=ns(e);return t?`Sign in with ${t}`:""}function Hn(){let t=globalThis.craft?.biometrics;if(!t)return null;return["isAvailable","getBiometricType","storeCredential","getCredential","hasCredential","deleteCredential"].every((a)=>typeof t[a]==="function")?t:null}var Fe=Object.freeze({available:!1,kind:null,label:"",saved:!1});function Fn(e){let t=e?.code;return typeof t==="string"&&t?t:"UNKNOWN"}function Vn(e){return e instanceof Error?e.message:String(e??"")}function zh(e="session",t){let s=String(e||"").trim()||"session",a=()=>t===void 0?Hn():t;async function n(){let c=a();if(!c)return Fe;try{if(!await c.isAvailable())return Fe;let l=await c.getBiometricType(),d=ns(l);if(!d)return Fe;return{available:!0,kind:l,label:d,saved:await c.hasCredential(s)===!0}}catch{return Fe}}async function o(c){let l=a();if(!l)return{status:"failed",code:"UNSUPPORTED",message:"Biometric sign-in is not available here."};try{let d=await l.getCredential(s,c||void 0);if(typeof d==="string"&&d)return{status:"signed-in",token:d};return await l.deleteCredential(s).catch(()=>{}),{status:"invalidated"}}catch(d){let u=Fn(d);if(u==="AUTHENTICATION_CANCELLED")return{status:"cancelled"};return{status:"failed",code:u,message:Vn(d)}}}async function i(c){let l=a();if(!l||typeof c!=="string"||!c)return!1;try{if(!await l.isAvailable())return!1;return await l.storeCredential(s,c),!0}catch{return!1}}async function r(){let c=a();if(!c)return;await c.deleteCredential(s).catch(()=>{})}return{probe:n,signIn:o,enable:i,forget:r}}var Bn="./Avatar-6gexb2xv.stx";var qn="./Badge-wnz3v82e.stx";var Wn="./Breadcrumb-cgw1bb6s.stx";class X extends Error{component;context;constructor(e,t,s={}){let a=X.formatMessage(e,t,s);super(a);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,X)}static formatMessage(e,t,s){let a=`[${e}] ${t}`;if(s.prop)a+=`
4
4
  Prop: "${s.prop}"`;if(s.received!==void 0)a+=`
5
5
  Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let n=Array.isArray(s.expected)?s.expected.map((o)=>JSON.stringify(o)).join(", "):JSON.stringify(s.expected);a+=`
6
6
  Expected: ${n}`}if(s.details)a+=`
7
7
  Details: ${s.details}`;if(s.docsUrl)a+=`
8
8
  Documentation: ${s.docsUrl}`;else if(e)a+=`
9
- Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var xe={invalidProp(e,t,s,a){return new X(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:a,details:Array.isArray(a)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new X(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,a){return new X(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:a,details:`Expected "${t}" to be of type ${a}, but received ${typeof s}`})},componentNotFound(e){return new X("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new X(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new X(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new X(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new X(e,"Failed to render component",{details:t.message})}},Ve=null;function Qu(e){Ve=e}function ef(){Ve=null}function je(e,t={}){let{throwError:s=!0,logError:a=!0}=t;if(a){if(console.error("Component Error:",e),e instanceof X)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(Ve)try{Ve(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function os(e,t,s){return(...a)=>{try{let n=e(...a);if(n instanceof Promise)return n.catch((o)=>{let i=xe.eventHandler(t,s,o);throw je(i,{throwError:!1}),i});return n}catch(n){let o=xe.eventHandler(t,s,n);throw je(o,{throwError:!1}),o}}}function Gn(e,t){if(!e)throw t}function Un(e,t,s={}){let a=X.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${a}`)}function tf(e,t){Gn(e,t)}function sf(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,a){Un(e,s,a)},error(s,a){let n=new X(e,s,a);je(n,{throwError:!1})}}}function af(e,t,s){try{return t()}catch(a){let n=xe.render(e,a);return je(n,{throwError:!1}),s}}class _{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new _(this.validate,this.message,!0)}}var f={string:new _((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new _((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new _((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new _((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new _((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 _((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new _(()=>!0,()=>""),oneOf(e){return new _((t)=>e.includes(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new _((t,s,a)=>e.some((n)=>n.validate(t,s,a)),(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected one of the specified types.`)},arrayOf(e){return new _((t,s,a)=>{if(!Array.isArray(t))return!1;return t.every((n,o)=>e.validate(n,`${s}[${o}]`,a))},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected array of specified type.`)},shape(e){return new _((t,s,a)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,o]of Object.entries(e)){if(o.isRequired&&!(n in t))return!1;if(n in t&&!o.validate(t[n],`${s}.${n}`,a))return!1}return!0},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected object matching specified shape.`)},instanceOf(e){return new _((t)=>t instanceof e,(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new _(e,typeof t==="string"?()=>t:t)},min(e){return new _((t)=>typeof t==="number"&&t>=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value >= ${e}.`)},max(e){return new _((t)=>typeof t==="number"&&t<=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value <= ${e}.`)},range(e,t){return new _((s)=>typeof s==="number"&&s>=e&&s<=t,(s,a,n)=>`Invalid prop \`${a}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new _((t)=>typeof t==="string"&&e.test(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value matching pattern ${e}.`)},email:new _((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 _((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 Jn(e,t,s,a={}){let{throwOnError:n=!1,logWarnings:o=!0}=a,i=[];for(let[r,c]of Object.entries(s)){let l=t[r],d=l===void 0;if(c.isRequired&&d){let h=`Required prop \`${r}\` was not specified in \`${e}\`.`;i.push(h);continue}if(d)continue;if(!c.validate(l,r,e)){let h=c.message(l,r,e);i.push(h)}}if(i.length>0){if(o)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),i.forEach((r)=>console.warn(r)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
9
+ Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var xe={invalidProp(e,t,s,a){return new X(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:a,details:Array.isArray(a)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new X(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,a){return new X(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:a,details:`Expected "${t}" to be of type ${a}, but received ${typeof s}`})},componentNotFound(e){return new X("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new X(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new X(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new X(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new X(e,"Failed to render component",{details:t.message})}},Ve=null;function ef(e){Ve=e}function tf(){Ve=null}function je(e,t={}){let{throwError:s=!0,logError:a=!0}=t;if(a){if(console.error("Component Error:",e),e instanceof X)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(Ve)try{Ve(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function os(e,t,s){return(...a)=>{try{let n=e(...a);if(n instanceof Promise)return n.catch((o)=>{let i=xe.eventHandler(t,s,o);throw je(i,{throwError:!1}),i});return n}catch(n){let o=xe.eventHandler(t,s,n);throw je(o,{throwError:!1}),o}}}function Gn(e,t){if(!e)throw t}function Un(e,t,s={}){let a=X.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${a}`)}function sf(e,t){Gn(e,t)}function af(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,a){Un(e,s,a)},error(s,a){let n=new X(e,s,a);je(n,{throwError:!1})}}}function nf(e,t,s){try{return t()}catch(a){let n=xe.render(e,a);return je(n,{throwError:!1}),s}}class _{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new _(this.validate,this.message,!0)}}var f={string:new _((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new _((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new _((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new _((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new _((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 _((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new _(()=>!0,()=>""),oneOf(e){return new _((t)=>e.includes(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new _((t,s,a)=>e.some((n)=>n.validate(t,s,a)),(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected one of the specified types.`)},arrayOf(e){return new _((t,s,a)=>{if(!Array.isArray(t))return!1;return t.every((n,o)=>e.validate(n,`${s}[${o}]`,a))},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected array of specified type.`)},shape(e){return new _((t,s,a)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,o]of Object.entries(e)){if(o.isRequired&&!(n in t))return!1;if(n in t&&!o.validate(t[n],`${s}.${n}`,a))return!1}return!0},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected object matching specified shape.`)},instanceOf(e){return new _((t)=>t instanceof e,(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new _(e,typeof t==="string"?()=>t:t)},min(e){return new _((t)=>typeof t==="number"&&t>=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value >= ${e}.`)},max(e){return new _((t)=>typeof t==="number"&&t<=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value <= ${e}.`)},range(e,t){return new _((s)=>typeof s==="number"&&s>=e&&s<=t,(s,a,n)=>`Invalid prop \`${a}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new _((t)=>typeof t==="string"&&e.test(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value matching pattern ${e}.`)},email:new _((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 _((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 Jn(e,t,s,a={}){let{throwOnError:n=!1,logWarnings:o=!0}=a,i=[];for(let[r,c]of Object.entries(s)){let l=t[r],d=l===void 0;if(c.isRequired&&d){let u=`Required prop \`${r}\` was not specified in \`${e}\`.`;i.push(u);continue}if(d)continue;if(!c.validate(l,r,e)){let u=c.message(l,r,e);i.push(u)}}if(i.length>0){if(o)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),i.forEach((r)=>console.warn(r)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
10
10
  ${i.join(`
11
- `)}`)}return{valid:i.length===0,errors:i}}function ae(e,t,s){return(a)=>Jn(e,a,t,s)}function of(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function rf(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Xn="./Button-ghdfqwg0.stx";var Zn={variant:f.oneOf(["primary","secondary","outline","ghost","danger"]),appearance:f.oneOf(["mac"]),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},hf=ae("Button",Zn);function uf(e){return os(e,"Button","onClick")}function ff(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw xe.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function mf(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw xe.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var eo="./Calendar-hkh42jz0.stx";var so="./DateRangePicker-4zmf34e4.stx";var no="./DateTimePicker-pz9p8jw4.stx";var Be=new Map;function is(e){let t=Be.get(e);if(!t){if(t=new Intl.DateTimeFormat("en-CA",{timeZone:e,calendar:"iso8601",numberingSystem:"latn",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Be.size>=64)Be.clear();Be.set(e,t)}return t}function rs(e){if(typeof e!=="string"||!e)return!1;try{return is(e),!0}catch{return!1}}function St(e){if(e==null||e==="")return null;if(typeof e!=="string"&&!(e instanceof Date))return null;if(typeof e==="string"){let s=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/i.exec(e);if(!s||_e(s[1],s[2])==null)return null}let t=new Date(e instanceof Date?e.getTime():e);return Number.isFinite(t.getTime())?t.toISOString():null}function kt(e,t){let s=St(e);if(!s)return null;try{let a=Object.fromEntries(is(t).formatToParts(new Date(s)).map((n)=>[n.type,n.value]));return{date:`${a.year.padStart(4,"0")}-${a.month}-${a.day}`,time:`${a.hour}:${a.minute}`}}catch{return null}}function _e(e,t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),a=/^(\d{2}):(\d{2})$/.exec(t);if(!s||!a)return null;let[n,o,i,r,c]=[+s[1],+s[2],+s[3],+a[1],+a[2]];if(n<100||o<1||o>12||i<1||r>23||c>59)return null;let l=Date.UTC(n,o-1,i,r,c),d=new Date(l);return d.getUTCFullYear()===n&&d.getUTCMonth()===o-1&&d.getUTCDate()===i?l:null}function oo(e,t,s,a="earlier"){let n=_e(e,t);if(n==null||!rs(s))return null;let o=new Set;for(let r of[-2,-1,0,1,2]){let c=n+r*86400000,l=kt(new Date(c),s);if(!l)continue;let d=_e(l.date,l.time);if(d!=null)o.add(d-c)}let i=[];for(let r of o){let c=n-r,l=kt(new Date(c),s);if(l?.date===e&&l.time===t)i.push(c)}if(!i.length)return null;return new Date(a==="later"?Math.max(...i):Math.min(...i)).toISOString()}function Tf(e,t,s="en-US"){let a=St(e);if(!a)return null;try{return new Intl.DateTimeFormat(s,{timeZone:t,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(new Date(a))}catch{return null}}function $f(e,t,s=new Date,a=null){if(!rs(t)||!Number.isFinite(s.getTime()))return null;if(e==="hour")return new Date(s.getTime()+3600000).toISOString();if(e==="suggested")return St(a);let n=kt(s,t);if(!n)return null;let o=_e(n.date,"00:00");if(o==null)return null;let i=new Date(o+86400000).toISOString().slice(0,10);return oo(i,"09:00",t)}var ro="./EmptyState-snj7gbsn.stx";var co="./ErrorState-qb7af5zb.stx";var ho="./ThemeToggle-4wm9zare.stx";var fo="./Card-r55zpjqh.stx";var go="./Checkbox-355qsbwd.stx";var bo="./ChoiceChips-8dcf172n.stx";var wo="./CodeEditor-kaywcb83.stx";var ko="./ColorSwatches-ecfxphjy.stx";var Co="./Combobox-9n04ec5w.stx";var $o="./ComboboxButton-4r6a45s1.stx";var Io="./ComboboxInput-1gyfpnca.stx";var Po="./ComboboxOption-wkw70js7.stx";var Ro="./ComboboxOptions-zhr9b6rx.stx";var Lo="./CommandPalette-cj6pe5ph.stx";var Oo="./CommandPaletteItem-bzvp48j8.stx";var Ho="./ContextMenu-43g3w5tp.stx";function Ct(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let a of e){if(!a||typeof a!=="object")continue;if(a.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...a,id:a.id==null?"":String(a.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((a,n)=>{if(a.path=[...t,n],a.separator||a.id==="")a.id=a.path.join(".");if(!a.separator&&Array.isArray(a.children))a.children=Ct(a.children,a.path)}),s}function ls(e){return Boolean(e)&&!e.separator}function cs(e){return Boolean(e)&&!e.separator&&!e.disabled}function be(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function $e(e,t,s){let a=e.length;if(a===0)return-1;let n=t;for(let o=0;o<a;o++)if(n=n<0?s===1?0:a-1:(n+s+a)%a,ls(e[n]))return n;return-1}function Ee(e){return $e(e,-1,1)}function ds(e){return $e(e,-1,-1)}function ps(e,t,s){let a=s.toLowerCase();if(a===""||e.length===0)return-1;let n=a.length>1&&a.split("").every((r)=>r===a.charAt(0)),o=n?a.charAt(0):a,i=a.length===1||n?t+1:Math.max(t,0);for(let r=0;r<e.length;r++){let c=(i+r+e.length)%e.length,l=e[c];if(ls(l)&&(l.label||"").toLowerCase().startsWith(o))return c}return-1}function Fo(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let a=Fo(s.children,t);if(a)return a}}return null}function hs(e,t,s,a=8){let n=(o,i,r)=>{if(o+i<=r-a)return o;if(o-i>=a)return o-i;return Math.max(a,r-a-i)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function us(e,t,s,a=8,n=4){let o=e.left;if(o+t.width>s.width-a)o=Math.max(a,Math.min(e.right-t.width,s.width-a-t.width));let i=e.bottom+n;if(i+t.height>s.height-a){let r=e.top-n-t.height;i=r>=a?r:Math.max(a,s.height-a-t.height)}return{x:Math.max(a,o),y:i}}function fs(e,t,s,a=8,n=4){let o="right",i=e.right-n;if(i+t.width>s.width-a){let c=e.left+n-t.width;if(c>=a)i=c,o="left";else i=Math.max(a,s.width-a-t.width)}let r=Math.max(a,Math.min(e.top-n,s.height-a-t.height));return{x:i,y:r,side:o}}var Vo={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},jo={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},Bo={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},_o={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},Ko=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],qo=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function ms(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),a=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:a}}function Ke(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function gs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(e),n=t?Ko:qo,i=[...s].sort((c,l)=>n.indexOf(c)-n.indexOf(l)).map((c)=>(t?Vo:jo)[c]??Ke(c)),r=(t?Bo:_o)[a.toLowerCase()]??Ke(a);return t?i.join("")+r:[...new Set(i),r].join("+")}function xs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(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((o)=>n[o]??Ke(o))),Ke(a)].join("+")}var Wo=160,Go=600;function Uo(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var Jo=0;class Yo{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++Jo}`;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??Uo(),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",(a)=>this.onContextMenu(a)),this.listen(this.root,"keydown",(a)=>this.onHostKeyDown(a)),this.listen(this.layer,"keydown",(a)=>this.onMenuKeyDown(a)),this.listen(this.layer,"click",(a)=>this.onMenuClick(a)),this.listen(this.layer,"pointermove",(a)=>this.onMenuPointerMove(a)),this.listen(this.layer,"contextmenu",(a)=>a.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 a=e instanceof Element?e:null,n=s.target??a??null,o=t??(typeof this.items==="function"?this.items(n):this.items),i=Ct(o);if(i.length===0)return!1;this.target=n;let r=document.activeElement;this.returnFocus=r instanceof HTMLElement&&r!==document.body?r:null,this.showLayer();let c=this.buildMenu(i,null),l=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},h=a?us(bs(a),l,d):hs(e,l,d);if(this.position(c.element,h),this.listenWhileOpen(),s.keyboard||a)this.focusItem(c,Ee(c.items));else c.element.focus({preventScroll:!0});return this.callbacks.onOpen?.({x:h.x,y:h.y,target:n,keyboard:Boolean(s.keyboard)}),!0}close(e="api",t=!0){if(!this.isOpen)return;this.clearHover();for(let a of this.stack)a.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,a){e.addEventListener(t,s,a);let n=()=>e.removeEventListener(t,s,a);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,a,n,o)=>{s.addEventListener(a,n,o),this.whileOpen.push(()=>s.removeEventListener(a,n,o))},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,o)=>{if(n.separator){let l=document.createElement("div");l.className="stx-menu-separator",l.setAttribute("role","separator"),s.appendChild(l);return}let i=document.createElement("div");if(i.className="stx-menu-item",i.id=`${this.uid}-${n.path.join("-")}`,i.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),i.setAttribute("tabindex","-1"),i.setAttribute("data-menu-index",String(o)),i.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")i.setAttribute("aria-checked",String(n.checked));if(n.disabled)i.setAttribute("aria-disabled","true");if(n.danger)i.setAttribute("data-danger","");let r=document.createElement("span");r.className="stx-menu-check",r.setAttribute("aria-hidden","true"),r.textContent=n.checked===!0?"\u2713":"",i.appendChild(r);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",i.appendChild(c),be(n)){i.setAttribute("aria-haspopup","menu"),i.setAttribute("aria-expanded","false");let l=document.createElement("span");l.className="stx-menu-arrow",l.setAttribute("aria-hidden","true"),l.textContent="\u203A",i.appendChild(l)}else if(n.shortcut){i.setAttribute("aria-keyshortcuts",xs(n.shortcut,this.apple));let l=document.createElement("span");l.className="stx-menu-shortcut",l.setAttribute("aria-hidden","true"),l.textContent=gs(n.shortcut,this.apple),i.appendChild(l)}s.appendChild(i)}),this.layer.appendChild(s);let a={element:s,items:e,opener:t};return this.stack.push(a),a}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 a=e.items[t],n=this.rowAt(e,t);if(!n||!be(a)||a.disabled)return;let o=this.stack[this.stack.indexOf(e)+1];if(o&&o.opener===n){if(s)this.focusItem(o,Ee(o.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let i=this.buildMenu(a.children,n),r=fs(bs(n),i.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(i.element.setAttribute("data-side",r.side),this.position(i.element,r),s)this.focusItem(i,Ee(i.items))}choose(e,t){let s=e.items[t];if(!cs(s))return;if(be(s)){this.openSubmenu(e,t,!0);return}let{children:a,path:n,id:o,...i}=s,r={item:{...i,id:o},id:o,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(r)}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 a=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(be(t.items[a]))this.openSubmenu(t,a,!1);else this.closeBelow(t)},Wo)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),a=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,$e(t.items,s,1));break;case"ArrowUp":this.focusItem(t,$e(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,Ee(t.items));break;case"End":case"PageDown":this.focusItem(t,ds(t.items));break;case"ArrowRight":if(be(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(a>0)this.closeSubmenu(t);break;case"Escape":if(a>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 a=Date.now();this.typed=a-this.typedAt>Go?s.key:this.typed+s.key,this.typedAt=a;let n=ps(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function bs(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var Tm=48,$m=2000,Em=420,Im=160,Xo=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Zo=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function Ae(e,t){let s=new WeakSet,a=JSON.stringify(e,(n,o)=>{if(typeof o==="bigint")return o.toString();if(typeof o==="object"&&o!==null){if(s.has(o))return"[Circular]";s.add(o)}return o},t);return a===void 0?"null":a}function ne(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function Qo(e){let t=0,s=0,a=0,n=0,o=0;for(let i of e){if(i===null||i===void 0||i==="")continue;if(t++,typeof i==="number"||typeof i==="bigint")s++;else if(typeof i==="boolean")n++;else if(i instanceof Date)a++;else if(typeof i==="object")o++;else if(typeof i==="string"){let r=i.trim();if(Xo.test(r))s++;else if(Zo.test(r)&&!Number.isNaN(Date.parse(r)))a++}}if(t===0)return"string";if(s===t)return"number";if(a===t)return"date";if(n===t)return"boolean";if(o===t)return"json";return"string"}function ei(e,t=200){let s=[],a=new Set,n=Math.min(e.length,t);for(let o=0;o<n;o++){let i=e[o];if(i===null||typeof i!=="object")continue;if(Array.isArray(i)){for(let r=0;r<i.length;r++){let c=String(r);if(!a.has(c))a.add(c),s.push(c)}continue}for(let r in i)if(!a.has(r))a.add(r),s.push(r)}if(s.length>0&&s.every((o)=>/^\d+$/.test(o)))s.sort((o,i)=>Number(o)-Number(i));return s.map((o)=>({key:o}))}function ys(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function Ie(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=Ae(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function ks(e){return Ae(e)}function Ss(e,t){let s={};for(let a of t){let n=ne(e,a);s[a.key]=n===void 0?null:n}return s}function Cs(e,t){return Ae(Ss(e,t),2)}function ti(e,t){return Ae(e.map((s)=>Ss(s,t)),2)}function vs(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=Ae(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function si(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>vs(n.label??n.key)).join(",");let a=t.length;for(let n=0;n<e.length;n++){let o=e[n],i="";for(let r=0;r<a;r++){if(r>0)i+=",";i+=vs(ne(o,t[r]))}s[n+1]=i}return`${s.join(`\r
11
+ `)}`)}return{valid:i.length===0,errors:i}}function ae(e,t,s){return(a)=>Jn(e,a,t,s)}function rf(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function lf(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Xn="./Button-rns3jhjh.stx";var Zn={variant:f.oneOf(["primary","secondary","outline","ghost","danger"]),appearance:f.oneOf(["mac"]),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,ariaExpanded:f.oneOf([!0,!1,"true","false"]),ariaControls:f.string,ariaPressed:f.oneOf([!0,!1,"true","false","mixed"]),leftIcon:f.string,rightIcon:f.string,className:f.string,onClick:f.func},hf=ae("Button",Zn);function ff(e){return os(e,"Button","onClick")}function mf(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw xe.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function gf(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw xe.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var eo="./Calendar-hkh42jz0.stx";var so="./DateRangePicker-4zmf34e4.stx";var no="./DateTimePicker-d5984mm1.stx";var Be=new Map;function is(e){let t=Be.get(e);if(!t){if(t=new Intl.DateTimeFormat("en-CA",{timeZone:e,calendar:"iso8601",numberingSystem:"latn",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Be.size>=64)Be.clear();Be.set(e,t)}return t}function rs(e){if(typeof e!=="string"||!e)return!1;try{return is(e),!0}catch{return!1}}function St(e){if(e==null||e==="")return null;if(typeof e!=="string"&&!(e instanceof Date))return null;if(typeof e==="string"){let s=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/i.exec(e);if(!s||_e(s[1],s[2])==null)return null}let t=new Date(e instanceof Date?e.getTime():e);return Number.isFinite(t.getTime())?t.toISOString():null}function kt(e,t){let s=St(e);if(!s)return null;try{let a=Object.fromEntries(is(t).formatToParts(new Date(s)).map((n)=>[n.type,n.value]));return{date:`${a.year.padStart(4,"0")}-${a.month}-${a.day}`,time:`${a.hour}:${a.minute}`}}catch{return null}}function _e(e,t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),a=/^(\d{2}):(\d{2})$/.exec(t);if(!s||!a)return null;let[n,o,i,r,c]=[+s[1],+s[2],+s[3],+a[1],+a[2]];if(n<100||o<1||o>12||i<1||r>23||c>59)return null;let l=Date.UTC(n,o-1,i,r,c),d=new Date(l);return d.getUTCFullYear()===n&&d.getUTCMonth()===o-1&&d.getUTCDate()===i?l:null}function oo(e,t,s,a="earlier"){let n=_e(e,t);if(n==null||!rs(s))return null;let o=new Set;for(let r of[-2,-1,0,1,2]){let c=n+r*86400000,l=kt(new Date(c),s);if(!l)continue;let d=_e(l.date,l.time);if(d!=null)o.add(d-c)}let i=[];for(let r of o){let c=n-r,l=kt(new Date(c),s);if(l?.date===e&&l.time===t)i.push(c)}if(!i.length)return null;return new Date(a==="later"?Math.max(...i):Math.min(...i)).toISOString()}function Tf(e,t,s="en-US"){let a=St(e);if(!a)return null;try{return new Intl.DateTimeFormat(s,{timeZone:t,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(new Date(a))}catch{return null}}function Ef(e,t,s=new Date,a=null){if(!rs(t)||!Number.isFinite(s.getTime()))return null;if(e==="hour")return new Date(s.getTime()+3600000).toISOString();if(e==="suggested")return St(a);let n=kt(s,t);if(!n)return null;let o=_e(n.date,"00:00");if(o==null)return null;let i=new Date(o+86400000).toISOString().slice(0,10);return oo(i,"09:00",t)}var ro="./EmptyState-snj7gbsn.stx";var co="./ErrorState-qb7af5zb.stx";var uo="./ThemeToggle-4wm9zare.stx";var fo="./Card-r55zpjqh.stx";var go="./Checkbox-4g3hemtw.stx";var bo="./ChoiceChips-8dcf172n.stx";var wo="./CodeEditor-kaywcb83.stx";var ko="./ColorSwatches-mz9kt78g.stx";var Co="./Combobox-9n04ec5w.stx";var To="./ComboboxButton-4r6a45s1.stx";var Io="./ComboboxInput-1gyfpnca.stx";var Po="./ComboboxOption-wkw70js7.stx";var Ro="./ComboboxOptions-zhr9b6rx.stx";var Lo="./CommandPalette-cj6pe5ph.stx";var Oo="./CommandPaletteItem-bzvp48j8.stx";var Ho="./ContextMenu-43g3w5tp.stx";function Ct(e,t=[]){let s=[];if(!Array.isArray(e))return s;for(let a of e){if(!a||typeof a!=="object")continue;if(a.separator){if(s.length>0&&!s[s.length-1].separator)s.push({separator:!0,id:"",path:[]});continue}s.push({...a,id:a.id==null?"":String(a.id),path:[]})}while(s.length>0&&s[s.length-1].separator)s.pop();return s.forEach((a,n)=>{if(a.path=[...t,n],a.separator||a.id==="")a.id=a.path.join(".");if(!a.separator&&Array.isArray(a.children))a.children=Ct(a.children,a.path)}),s}function ls(e){return Boolean(e)&&!e.separator}function cs(e){return Boolean(e)&&!e.separator&&!e.disabled}function be(e){return Boolean(e)&&!e.separator&&Array.isArray(e.children)&&e.children.length>0}function Te(e,t,s){let a=e.length;if(a===0)return-1;let n=t;for(let o=0;o<a;o++)if(n=n<0?s===1?0:a-1:(n+s+a)%a,ls(e[n]))return n;return-1}function Ee(e){return Te(e,-1,1)}function ds(e){return Te(e,-1,-1)}function ps(e,t,s){let a=s.toLowerCase();if(a===""||e.length===0)return-1;let n=a.length>1&&a.split("").every((r)=>r===a.charAt(0)),o=n?a.charAt(0):a,i=a.length===1||n?t+1:Math.max(t,0);for(let r=0;r<e.length;r++){let c=(i+r+e.length)%e.length,l=e[c];if(ls(l)&&(l.label||"").toLowerCase().startsWith(o))return c}return-1}function Fo(e,t){for(let s of e){if(s.separator)continue;if(s.id===t)return s;if(s.children){let a=Fo(s.children,t);if(a)return a}}return null}function us(e,t,s,a=8){let n=(o,i,r)=>{if(o+i<=r-a)return o;if(o-i>=a)return o-i;return Math.max(a,r-a-i)};return{x:n(e.x,t.width,s.width),y:n(e.y,t.height,s.height)}}function hs(e,t,s,a=8,n=4){let o=e.left;if(o+t.width>s.width-a)o=Math.max(a,Math.min(e.right-t.width,s.width-a-t.width));let i=e.bottom+n;if(i+t.height>s.height-a){let r=e.top-n-t.height;i=r>=a?r:Math.max(a,s.height-a-t.height)}return{x:Math.max(a,o),y:i}}function fs(e,t,s,a=8,n=4){let o="right",i=e.right-n;if(i+t.width>s.width-a){let c=e.left+n-t.width;if(c>=a)i=c,o="left";else i=Math.max(a,s.width-a-t.width)}let r=Math.max(a,Math.min(e.top-n,s.height-a-t.height));return{x:i,y:r,side:o}}var Vo={mod:"\u2318",meta:"\u2318",cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7"},jo={mod:"Ctrl",meta:"Win",cmd:"Ctrl",command:"Ctrl",ctrl:"Ctrl",control:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift"},Bo={enter:"\u21A9",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},_o={escape:"Esc",esc:"Esc",delete:"Del",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",space:"Space"},qo=["ctrl","control","alt","option","shift","mod","meta","cmd","command"],Ko=["mod","ctrl","control","cmd","command","meta","alt","option","shift"];function ms(e){let s=(e.endsWith("++")?[...e.slice(0,-2).split("+"),"+"]:e.split("+")).map((n)=>n.trim()).filter((n)=>n!==""),a=s.pop()||"";return{modifiers:s.map((n)=>n.toLowerCase()),key:a}}function qe(e){return e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function gs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(e),n=t?qo:Ko,i=[...s].sort((c,l)=>n.indexOf(c)-n.indexOf(l)).map((c)=>(t?Vo:jo)[c]??qe(c)),r=(t?Bo:_o)[a.toLowerCase()]??qe(a);return t?i.join("")+r:[...new Set(i),r].join("+")}function xs(e,t){if(!e)return"";let{modifiers:s,key:a}=ms(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((o)=>n[o]??qe(o))),qe(a)].join("+")}var Wo=160,Go=600;function Uo(){let e=typeof navigator>"u"?"":navigator.platform||navigator.userAgent||"";return/mac|iphone|ipad/i.test(e)}var Jo=0;class Yo{root;callbacks;items;label;disabled;apple;layer;uid=`stx-menu-${++Jo}`;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??Uo(),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",(a)=>this.onContextMenu(a)),this.listen(this.root,"keydown",(a)=>this.onHostKeyDown(a)),this.listen(this.layer,"keydown",(a)=>this.onMenuKeyDown(a)),this.listen(this.layer,"click",(a)=>this.onMenuClick(a)),this.listen(this.layer,"pointermove",(a)=>this.onMenuPointerMove(a)),this.listen(this.layer,"contextmenu",(a)=>a.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 a=e instanceof Element?e:null,n=s.target??a??null,o=t??(typeof this.items==="function"?this.items(n):this.items),i=Ct(o);if(i.length===0)return!1;this.target=n;let r=document.activeElement;this.returnFocus=r instanceof HTMLElement&&r!==document.body?r:null,this.showLayer();let c=this.buildMenu(i,null),l=c.element.getBoundingClientRect(),d={width:window.innerWidth,height:window.innerHeight},u=a?hs(bs(a),l,d):us(e,l,d);if(this.position(c.element,u),this.listenWhileOpen(),s.keyboard||a)this.focusItem(c,Ee(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 a of this.stack)a.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,a){e.addEventListener(t,s,a);let n=()=>e.removeEventListener(t,s,a);return this.disposers.push(n),n}whileOpen=[];listenWhileOpen(){let e=(s,a,n,o)=>{s.addEventListener(a,n,o),this.whileOpen.push(()=>s.removeEventListener(a,n,o))},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,o)=>{if(n.separator){let l=document.createElement("div");l.className="stx-menu-separator",l.setAttribute("role","separator"),s.appendChild(l);return}let i=document.createElement("div");if(i.className="stx-menu-item",i.id=`${this.uid}-${n.path.join("-")}`,i.setAttribute("role",typeof n.checked==="boolean"?"menuitemcheckbox":"menuitem"),i.setAttribute("tabindex","-1"),i.setAttribute("data-menu-index",String(o)),i.setAttribute("data-menu-id",n.id),typeof n.checked==="boolean")i.setAttribute("aria-checked",String(n.checked));if(n.disabled)i.setAttribute("aria-disabled","true");if(n.danger)i.setAttribute("data-danger","");let r=document.createElement("span");r.className="stx-menu-check",r.setAttribute("aria-hidden","true"),r.textContent=n.checked===!0?"\u2713":"",i.appendChild(r);let c=document.createElement("span");if(c.className="stx-menu-label",c.textContent=n.label||"",i.appendChild(c),be(n)){i.setAttribute("aria-haspopup","menu"),i.setAttribute("aria-expanded","false");let l=document.createElement("span");l.className="stx-menu-arrow",l.setAttribute("aria-hidden","true"),l.textContent="\u203A",i.appendChild(l)}else if(n.shortcut){i.setAttribute("aria-keyshortcuts",xs(n.shortcut,this.apple));let l=document.createElement("span");l.className="stx-menu-shortcut",l.setAttribute("aria-hidden","true"),l.textContent=gs(n.shortcut,this.apple),i.appendChild(l)}s.appendChild(i)}),this.layer.appendChild(s);let a={element:s,items:e,opener:t};return this.stack.push(a),a}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 a=e.items[t],n=this.rowAt(e,t);if(!n||!be(a)||a.disabled)return;let o=this.stack[this.stack.indexOf(e)+1];if(o&&o.opener===n){if(s)this.focusItem(o,Ee(o.items));return}this.closeBelow(e),n.setAttribute("aria-expanded","true");let i=this.buildMenu(a.children,n),r=fs(bs(n),i.element.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight});if(i.element.setAttribute("data-side",r.side),this.position(i.element,r),s)this.focusItem(i,Ee(i.items))}choose(e,t){let s=e.items[t];if(!cs(s))return;if(be(s)){this.openSubmenu(e,t,!0);return}let{children:a,path:n,id:o,...i}=s,r={item:{...i,id:o},id:o,path:[...n],target:this.target};this.close("select"),this.callbacks.onSelect?.(r)}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 a=Number(s.getAttribute("data-menu-index"));s.focus({preventScroll:!0}),this.clearHover(),this.hoverTimer=setTimeout(()=>{if(document.activeElement!==s)return;if(be(t.items[a]))this.openSubmenu(t,a,!1);else this.closeBelow(t)},Wo)}onMenuKeyDown(e){let t=this.menuOf(e.target)??this.stack[this.stack.length-1];if(!t)return;let s=this.activeIndex(t),a=this.stack.indexOf(t),n=!0;switch(e.key){case"ArrowDown":this.focusItem(t,Te(t.items,s,1));break;case"ArrowUp":this.focusItem(t,Te(t.items,s,-1));break;case"Home":case"PageUp":this.focusItem(t,Ee(t.items));break;case"End":case"PageDown":this.focusItem(t,ds(t.items));break;case"ArrowRight":if(be(t.items[s]))this.openSubmenu(t,s,!0);break;case"ArrowLeft":if(a>0)this.closeSubmenu(t);break;case"Escape":if(a>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 a=Date.now();this.typed=a-this.typedAt>Go?s.key:this.typed+s.key,this.typedAt=a;let n=ps(e.items,t,this.typed);if(n>=0)this.focusItem(e,n);return!0}}function bs(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}var Tm=48,Em=2000,Im=420,Am=160,Xo=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Zo=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function Ae(e,t){let s=new WeakSet,a=JSON.stringify(e,(n,o)=>{if(typeof o==="bigint")return o.toString();if(typeof o==="object"&&o!==null){if(s.has(o))return"[Circular]";s.add(o)}return o},t);return a===void 0?"null":a}function ne(e,t){if(t.accessor)return t.accessor(e);return e==null?void 0:e[t.key]}function Qo(e){let t=0,s=0,a=0,n=0,o=0;for(let i of e){if(i===null||i===void 0||i==="")continue;if(t++,typeof i==="number"||typeof i==="bigint")s++;else if(typeof i==="boolean")n++;else if(i instanceof Date)a++;else if(typeof i==="object")o++;else if(typeof i==="string"){let r=i.trim();if(Xo.test(r))s++;else if(Zo.test(r)&&!Number.isNaN(Date.parse(r)))a++}}if(t===0)return"string";if(s===t)return"number";if(a===t)return"date";if(n===t)return"boolean";if(o===t)return"json";return"string"}function ei(e,t=200){let s=[],a=new Set,n=Math.min(e.length,t);for(let o=0;o<n;o++){let i=e[o];if(i===null||typeof i!=="object")continue;if(Array.isArray(i)){for(let r=0;r<i.length;r++){let c=String(r);if(!a.has(c))a.add(c),s.push(c)}continue}for(let r in i)if(!a.has(r))a.add(r),s.push(r)}if(s.length>0&&s.every((o)=>/^\d+$/.test(o)))s.sort((o,i)=>Number(o)-Number(i));return s.map((o)=>({key:o}))}function ys(e){if(e===null)return"null";return e===void 0?"undefined":"value"}function Ie(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=Ae(e);return s.length>160?`${s.slice(0,160)}...`:s}return String(e)}function ks(e){return Ae(e)}function Ss(e,t){let s={};for(let a of t){let n=ne(e,a);s[a.key]=n===void 0?null:n}return s}function Cs(e,t){return Ae(Ss(e,t),2)}function ti(e,t){return Ae(e.map((s)=>Ss(s,t)),2)}function vs(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=Ae(e);else t=String(e);if(/[",\r\n]/.test(t)||t!==t.trim())return`"${t.replace(/"/g,'""')}"`;return t}function si(e,t){let s=Array.from({length:e.length+1});s[0]=t.map((n)=>vs(n.label??n.key)).join(",");let a=t.length;for(let n=0;n<e.length;n++){let o=e[n],i="";for(let r=0;r<a;r++){if(r>0)i+=",";i+=vs(ne(o,t[r]))}s[n+1]=i}return`${s.join(`\r
12
12
  `)}\r
13
- `}function Ts(e,t,s,a,n=0){if(a<=0||s<=0)return{start:0,end:0};let o=Math.floor(Math.max(0,e)/s),i=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),r=Math.min(a,Math.max(0,o-n));return{start:r,end:Math.max(r,Math.min(a,i+n))}}function $s(e,t,s){let a=s.rows-1,n=Math.max(0,s.columns-1),o=Math.max(1,s.page),{row:i,column:r}=e;switch(t){case"ArrowUp":i=Math.max(-1,i-1);break;case"ArrowDown":i=Math.min(a,i+1);break;case"ArrowLeft":r-=1;break;case"ArrowRight":r+=1;break;case"PageUp":i=i<=0?i:Math.max(0,i-o);break;case"PageDown":i=Math.min(a,Math.max(0,i)+(i<0?0:o));break;case"Home":if(r=0,s.mod)i=Math.min(0,a);break;case"End":if(r=n,s.mod)i=a;break;default:return e}return{row:Math.max(-1,Math.min(a,i)),column:Math.max(0,Math.min(n,r))}}function ai(e,t,s=!1){let a=e.find((o)=>o.key===t),n=!a?{key:t,direction:"asc"}:a.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!a)return[...e,n];return n?e.map((o)=>o.key===t?n:o):e.filter((o)=>o.key!==t)}var ws=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class Tt{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((a)=>a.key===e);if(!s||!s.sortable)return this.sort;return this.sort=ai(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],a=this.rowAt(e);return s&&a!==void 0?ne(a,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 si(this.viewRows(),this.columns)}toJson(){return ti(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 a=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let o=a;o<=n&&o<this.view.length;o++)this.selected.add(this.view[o]);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,a=t-1;while(s<a){let n=s+a+1>>1;if(this.offsets[n]<=e)s=n;else a=n-1}return s}columnRange(e,t,s=0){let a=this.columns.length;if(a===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),o=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(a,o+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 a=s.label.length+3,n=Math.min(this.view.length,t);for(let i=0;i<n;i++){let r=Ie(ne(this.rows[this.view[i]],s),s.type).length;if(r>a)a=r}let o=Math.ceil(a*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,o))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??ei(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let a=0;a<t;a++)this.view[a]=a;this.columns=e.map((a)=>{let n=a.type;if(!n){let o=[];for(let i=0;i<t;i++)o.push(ne(this.rows[i],a));n=Qo(o)}return{...a,label:a.label??a.key,type:n,width:a.width??0,minWidth:a.minWidth??48,maxWidth:a.maxWidth??2000,align:a.align??(n==="number"?"right":"left"),sortable:a.sortable!==!1}}),this.columns.forEach((a,n)=>{if(!a.width)a.width=this.autoWidth(n);a.width=Math.max(a.minWidth,Math.min(a.maxWidth,a.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 a=0;a<e.length;a++){let n=e[a],o="";for(let i=0;i<t.length;i++){let r=ne(n,t[i]);if(r===null||r===void 0)continue;o+=typeof r==="string"?r:Ie(r,t[i].type),o+="\x01"}s[a]=o.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 a=0;a<e;a++)s[a]=a;this.filtered=s}else{let s=this.searchable(),a=new Uint32Array(e),n=0,o=t.length===1?t[0]:null;for(let i=0;i<e;i++){let r=s[i];if(o!==null){if(r.includes(o))a[n++]=i;continue}let c=!0;for(let l=0;l<t.length;l++)if(!r.includes(t[l])){c=!1;break}if(c)a[n++]=i}this.filtered=a.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,a=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let o=ne(s[n],e),i=Number.NaN;if(o===null||o===void 0||o==="")i=Number.NaN;else if(typeof o==="number")i=o;else if(typeof o==="boolean")i=o?1:0;else if(o instanceof Date)i=o.getTime();else if(e.type==="date")i=Date.parse(String(o));else if(e.type==="boolean")i=String(o).toLowerCase()==="true"?1:0;else i=Number(o);a[n]=i}else{let n=Array.from({length:s.length}),o=new Map;for(let c=0;c<s.length;c++){let l=ne(s[c],e);if(l===null||l===void 0){n[c]=null;continue}let d=typeof l==="string"?l:Ie(l,e.type);if(n[c]=d,!o.has(d))o.set(d,0)}let i=[...o.keys()].sort(ws.compare),r=0;for(let c=0;c<i.length;c++){if(c>0&&ws.compare(i[c-1],i[c])!==0)r++;o.set(i[c],r)}for(let c=0;c<s.length;c++){let l=n[c];a[c]=l===null?Number.NaN:o.get(l)}}return this.sortKeys.set(e.key,a),a}resort(){let e=[];for(let s of this.sort){let a=this.columns.find((n)=>n.key===s.key);if(a)e.push({keys:this.keysFor(a),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:a}=e[0];t.sort((n,o)=>{let i=s[n],r=s[o];if(i<r)return-a;if(i>r)return a;if(i===r)return n-o;let c=i!==i;return c===(r!==r)?n-o:c?1:-1})}else if(e.length>1)t.sort((s,a)=>{for(let n=0;n<e.length;n++){let o=e[n].keys[s],i=e[n].keys[a];if(o<i)return-e[n].sign;if(o>i)return e[n].sign;if(o===i)continue;let r=o!==o;if(r!==(i!==i))return r?1:-1}return s-a});this.view=t}}var oi="./DataGrid-7rt7v865.stx";var ii=120,qe=new Intl.NumberFormat("en-US");function re(e,t){return e.querySelector(`[data-dg="${t}"]`)}function ri(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 a=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),a?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class li{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 a=re(e,"scroller"),n=re(e,"content"),o=re(e,"header"),i=re(e,"body");if(!a||!n||!o||!i)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=a,this.content=n,this.header=o,this.body=i,this.status=re(e,"status"),this.filterInput=re(e,"filter"),this.prefix=a.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 Tt(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",(l)=>this.onKeyDown(l)),this.listen(this.body,"click",(l)=>this.onBodyClick(l)),this.listen(this.body,"dblclick",(l)=>this.onBodyDoubleClick(l)),this.listen(this.body,"contextmenu",(l)=>this.onContextMenu(l)),this.listen(this.header,"click",(l)=>this.onHeaderClick(l)),this.listen(this.header,"dblclick",(l)=>this.onHeaderDoubleClick(l)),this.listen(this.header,"pointerdown",(l)=>this.onResizeStart(l)),this.listen(this.header,"pointermove",(l)=>this.onResizeMove(l)),this.listen(this.header,"pointerup",(l)=>this.onResizeEnd(l)),this.listen(this.header,"pointercancel",(l)=>this.onResizeEnd(l)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let r=re(e,"export-csv"),c=re(e,"export-json");if(r)this.listen(r,"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"}),a=URL.createObjectURL(s),n=document.createElement("a");return n.href=a,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(a),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=Ts(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),a=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||a.start!==this.cols.start||a.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=a,n)this.renderHeader();for(let[o,i]of this.slots)if(o<s.start||o>=s.end)this.slots.delete(o),i.index=-1,i.el.style.display="none",this.pool.push(i);for(let o=s.start;o<s.end;o++){let i=this.slots.get(o);if(i){if(n)this.fill(i);continue}i=this.pool.pop()??this.createSlot(),i.index=o,i.el.style.display="",this.slots.set(o,i),this.fill(i)}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,a=t.rowAt(s),n=this.selectable&&t.isSelected(s),o=e.el;if(o.__dgRow=s,o.style.transform=`translateY(${s*this.rowHeight}px)`,o.setAttribute("aria-rowindex",String(s+2)),this.selectable)o.setAttribute("aria-selected",n?"true":"false");let i=this.cols.end-this.cols.start;while(e.cells.length<i){let r=document.createElement("div");r.className="stx-dg-cell",r.setAttribute("role","gridcell"),r.appendChild(document.createTextNode("")),o.appendChild(r),e.cells.push(r)}while(e.cells.length>i)e.cells.pop().remove();for(let r=0;r<i;r++){let c=this.cols.start+r,l=t.columns[c],d=e.cells[r],h=a===void 0?void 0:ne(a,l),p=ys(h);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${l.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",l.type),d.setAttribute("data-align",l.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 h==="string"?h:Ie(h,l.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 a=document.createElement("span");a.className="stx-dg-head-label",a.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let o=document.createElement("span");o.className="stx-dg-resize",o.setAttribute("aria-hidden","true"),s.append(a,n,o),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 a=this.cols.start+s,n=e.columns[a],o=this.headerCells[s],i=e.sortOf(n.key);if(o.__dgColumn=a,o.id=`${this.prefix}-h-c${a}`,o.style.left=`${e.offsetOf(a)}px`,o.style.width=`${n.width}px`,o.setAttribute("aria-colindex",String(a+1)),o.setAttribute("data-align",n.align),o.toggleAttribute("data-sortable",n.sortable),n.sortable)o.setAttribute("aria-sort",i?i.direction==="asc"?"ascending":"descending":"none");else o.removeAttribute("aria-sort");o.children[0].firstChild.data=n.label,o.children[1].firstChild.data=i?`${i.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?i.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 a of t.cells)a.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${qe.format(t)} ${t===1?"row":"rows"}`:`${qe.format(e.count)} of ${qe.format(t)} rows`;if(e.selected.size>0)s+=`, ${qe.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,a=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+a)t.scrollTop=s+this.rowHeight-a}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),a=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(a>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,a-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,a={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=a,a.row>=0)this.revealRow(a.row);if(this.revealColumn(a.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(a))}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 a=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...a])}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"?Cs(t,this.model.columns):ks(this.model.valueAt(this.active.row,this.active.column));ri(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"),a=s?.parentElement;if(!s||!a||s.__dgColumn===void 0||a.__dgRow===void 0)return null;return{row:a.__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 a=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(a),handle:a}}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:"")},ii)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,a=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(a)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(a&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let r=t.columns[this.active.column];if(r)this.setColumnWidth(this.active.column,r.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),a){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 r=t.rowAt(this.active.row);if(r!==void 0)this.callbacks.onActivate?.({row:r,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let o=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),i=$s(this.active,n,{rows:t.count,columns:t.columns.length,page:o,mod:s});if(i===this.active)return;if(e.preventDefault(),i.row===this.active.row&&i.column===this.active.column)return;if(e.shiftKey&&this.selectable&&i.row>=0&&i.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(i.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(i)}}var di="./Dialog-wm7zjqnb.stx";var hi="./DialogBackdrop-de5m5m4w.stx";var fi="./DialogDescription-yd2jgt2m.stx";var gi="./DialogPanel-v972ztcc.stx";var bi="./DialogTitle-nw0pw114.stx";var wi="./Drawer-d78cdr6d.stx";var ki="./Dropdown-hb8ks69x.stx";var Ci="./DropdownButton-wxc25hsy.stx";var $i="./DropdownItem-af0vzc8a.stx";var Ii="./DropdownItems-bkz7jkyz.stx";var Pi="./Form-cybgg9ym.stx";var Mi={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},lg=ae("Form",Mi);var Ni="./FileDrop-p9wqdx75.stx";var Es=(e)=>Math.round(e*100)/100,Q=(e)=>`${Es(e.x)} ${Es(e.y)}`;function Is(e,t,s){let a=s.x-e.x,n=s.y-e.y;if(a===0&&n===0)return{x:e.x,y:e.y};let o=a===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(a),i=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),r=Math.min(o,i);return{x:e.x+a*r,y:e.y+n*r}}function As(e,t,s){let a=e.x-t.x,n=e.y-t.y,o=Math.sqrt(a*a+n*n);if(s<=0||o<=s)return e;return{x:e.x-a/o*s,y:e.y-n/o*s}}function Li(e,t,s=0){let a=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},o={x:e.x+t.width/2,y:e.y-t.height/4},i={x:n.x,y:n.y-a},r={x:o.x+a,y:o.y};return{d:`M ${Q(n)} C ${Q(i)}, ${Q(r)}, ${Q(o)}`,start:n,end:o,label:Ps(n,i,r,o,0.5),angle:Math.atan2(o.y-r.y,o.x-r.x)}}function Ps(e,t,s,a,n){let o=1-n;return{x:o*o*o*e.x+3*o*o*n*t.x+3*o*n*n*s.x+n*n*n*a.x,y:o*o*o*e.y+3*o*o*n*t.y+3*o*n*n*s.y+n*n*n*a.y}}function Ms(e,t={}){let{source:s,sourceSize:a,target:n,targetSize:o}=e,i=t.offset??0,r=t.inset??0;if(s.x===n.x&&s.y===n.y)return Li(s,a,i);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*a.width/2,y:s.y}:{x:s.x,y:s.y+y*a.height/2},b=w?{x:n.x-y*o.width/2,y:n.y}:{x:n.x,y:n.y-y*o.height/2},C=Math.abs(w?b.x-v.x:b.y-v.y),P=Math.max(C/2,24)*y,T=w?{x:b.x-y*r,y:b.y}:{x:b.x,y:b.y-y*r},F=w?{x:v.x+P,y:v.y+i}:{x:v.x+i,y:v.y+P},V=w?{x:T.x-P,y:T.y+i}:{x:T.x+i,y:T.y-P};return{d:`M ${Q(v)} C ${Q(F)}, ${Q(V)}, ${Q(T)}`,start:v,end:T,label:Ps(v,F,V,T,0.5),angle:Math.atan2(T.y-V.y,T.x-V.x)}}let c=Is(s,a,n),l=Is(n,o,s);if(i===0){let w=As(l,c,r);return{d:`M ${Q(c)} L ${Q(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,h=(n.x-s.x)*d,p=(n.y-s.y)*d,u=Math.sqrt(h*h+p*p)||1,g={x:(c.x+l.x)/2+-p/u*i*2,y:(c.y+l.y)/2+h/u*i*2},m=As(l,g,r);return{d:`M ${Q(c)} Q ${Q(g)}, ${Q(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 Rs(e,t=14){let s=new Map;for(let n of e){let o=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,i=s.get(o);if(i)i.push(n);else s.set(o,[n])}let a=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((o,i)=>{let r=(i-(n.length-1)/2)*t;a.set(o.id,o.source===o.target?i*t:r)})}return a}var $t={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function oe(e){return e.label==null||e.label===""?e.id:String(e.label)}function Ns(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Ls(e,t=$t){let s=Math.max(oe(e).length,e.detail?e.detail.length*0.85:0),a=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+a)),height:t.height+(e.detail?t.detailHeight:0)}}function Ds(e=$t){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function We(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class Ge{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=$t){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,Ls(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 a=Ns({...e,source:t,target:s});if(this.edgeMap.has(a))return!1;return this.edgeMap.set(a,{...e,id:a,source:t,target:s}),this.incident.get(t).add(a),this.incident.get(s).add(a),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let a={...s,...t,id:e};return this.nodeMap.set(e,a),this.sizes.set(e,Ls(a,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 a of e)if(this.addNode(a))s.nodes.push(String(a.id));for(let a of t)if(this.addEdge(a))s.edges.push(Ns({...a,source:String(a.source),target:String(a.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 a=s.source===e?s.target:s.source;if(a!==e)t.add(a)}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:a,NEGATIVE_INFINITY:n}=Number;for(let[o,i]of e){if(!this.nodeMap.has(o))continue;let r=this.size(o);t=Math.min(t,i.x-r.width/2),a=Math.max(a,i.x+r.width/2),s=Math.min(s,i.y-r.height/2),n=Math.max(n,i.y+r.height/2)}return Number.isFinite(t)?{x:t,y:s,width:a-t,height:n-s}:null}}function Os(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 Di=0.15,zs=0.06;function Hs(e,t={}){let s=e.nodes,a=s.length,n=new Map;if(a===0)return n;let o=t.linkDistance??90,i=t.padding??16,r=Os(t.seed??1),c=t.positions??null,l=new Set(t.pinned??[]),d=new Map(s.map((R,N)=>[R.id,N])),h=new Float64Array(a),p=new Float64Array(a),u=new Float64Array(a),g=new Float64Array(a),m=new Uint8Array(a),w=new Uint8Array(a),y=new Float64Array(a).fill(1),v=0;s.forEach((R,N)=>{let E=e.size(R.id);u[N]=E.width/2,g[N]=E.height/2;let M=c?.get(R.id);if(M&&Number.isFinite(M.x)&&Number.isFinite(M.y))h[N]=M.x,p[N]=M.y,w[N]=1,m[N]=l.has(R.id)?1:0,y[N]=0,v++});let b=o*Math.sqrt(a)*0.6;s.forEach((R,N)=>{if(w[N])return;let E=e.neighbours(R.id).map((k)=>d.get(k)).find((k)=>w[k]),M=r()*Math.PI*2;if(E!==void 0)h[N]=h[E]+Math.cos(M)*o*0.5,p[N]=p[E]+Math.sin(M)*o*0.5;else{let k=Math.sqrt(r())*b;h[N]=Math.cos(M)*k,p[N]=Math.sin(M)*k}});let C=Uint8Array.from(w),P=v>0,T=Math.max(0,t.iterations??(P?80:300)),F=[],V=new Set;for(let R of e.edges){let N=d.get(R.source),E=d.get(R.target);if(N===E)continue;let M=N<E?N*a+E:E*a+N;if(!V.has(M))V.add(M),F.push(N,E)}let j=new Float64Array(a),x=new Float64Array(a),S=o,L=P?S*0.5:S*1.5;for(let R=0;R<T;R++){let N=L*(1-R/T);j.fill(0),x.fill(0);for(let E=0;E<a;E++)for(let M=E+1;M<a;M++){if(C[E]&&C[M])continue;let k=h[E]-h[M],O=p[E]-p[M],D=Math.sqrt(k*k+O*O);if(D<0.01){let K=(E*31+M*17)%360*Math.PI/180;k=Math.cos(K)*0.01,O=Math.sin(K)*0.01,D=0.01}let Y=Math.max(1,D-(u[E]+u[M])*0.5),H=S*S*Di/Y/D;j[E]+=k*H,x[E]+=O*H,j[M]-=k*H,x[M]-=O*H}for(let E=0;E<F.length;E+=2){let M=F[E],k=F[E+1];if(C[M]&&C[k])continue;let O=h[M]-h[k],D=p[M]-p[k],Y=Math.sqrt(O*O+D*D)||0.01,H=(u[M]+u[k])*0.5,K=Math.max(0,Y-H),te=K*K/S/Y;j[M]-=O*te,x[M]-=D*te,j[k]+=O*te,x[k]+=D*te}for(let E=0;E<a;E++){if(m[E])continue;if(!C[E])j[E]-=h[E]*zs,x[E]-=p[E]*zs;let M=Math.sqrt(j[E]*j[E]+x[E]*x[E]);if(M>0){let k=Math.min(M,N)/M*y[E];h[E]+=j[E]*k,p[E]+=x[E]*k}}}return Oi(h,p,u,g,m,i),s.forEach((R,N)=>{n.set(R.id,{x:Math.round(h[N]*100)/100,y:Math.round(p[N]*100)/100})}),n}function Oi(e,t,s,a,n,o){let i=e.length;for(let r=0;r<40;r++){let c=!1;for(let l=0;l<i;l++)for(let d=l+1;d<i;d++){let h=s[l]+s[d]+o-Math.abs(e[l]-e[d]);if(h<=0)continue;let p=a[l]+a[d]+o-Math.abs(t[l]-t[d]);if(p<=0)continue;if(n[l]&&n[d])continue;c=!0;let u=n[l]?0:n[d]?1:0.5,g=1-u;if(h<p){let m=e[l]<e[d]||e[l]===e[d]&&l<d?-1:1;e[l]+=m*h*u,e[d]-=m*h*g}else{let m=t[l]<t[d]||t[l]===t[d]&&l<d?-1:1;t[l]+=m*p*u,t[d]-=m*p*g}}if(!c)break}}function zi(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let o=[],i=[n.id];t.add(n.id);while(i.length){let r=i.shift();o.push(r);for(let c of e.neighbours(r))if(!t.has(c))t.add(c),i.push(c)}s.push(o)}let a=new Map(e.nodes.map((n,o)=>[n.id,o]));for(let n of s)n.sort((o,i)=>a.get(o)-a.get(i));return s}function Hi(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,a=new Map;for(let n of e.nodes){if(a.has(n.id))continue;let o=[{id:n.id,next:0}];a.set(n.id,1);while(o.length){let i=o[o.length-1],r=t.get(i.id);if(i.next>=r.length){a.set(i.id,2),o.pop();continue}let c=r[i.next++],l=a.get(c.to);if(l===1)s.add(c.id);else if(l===void 0)a.set(c.to,1),o.push({id:c.to,next:0})}}return s}function Fs(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,o)=>n[0]-o[0]||n[1]-o[1]),a=0;for(let n=0;n<s.length;n++)for(let o=n+1;o<s.length;o++)if(s[n][0]<s[o][0]&&s[n][1]>s[o][1])a++;return a}function Vs(e,t={}){let s=t.direction==="TB"?"TB":"LR",a=t.nodeGap??24,n=t.layerGap??80,o=t.componentGap??48,i=t.sweeps??4,r=s==="LR",c=Hi(e),l=[],d=new Set;for(let b of e.edges){if(b.source===b.target)continue;let C=c.has(b.id)?b.target:b.source,P=c.has(b.id)?b.source:b.target,T=`${C}\x00${P}`;if(!d.has(T))d.add(T),l.push({from:C,to:P})}let h=new Map,p=new Map;for(let b of e.nodes)h.set(b.id,[]),p.set(b.id,[]);for(let b of l)h.get(b.from).push(b.to),p.get(b.to).push(b.from);let u=new Map,g=new Map,m=[];for(let b of e.nodes)if(g.set(b.id,p.get(b.id).length),p.get(b.id).length===0)m.push(b.id),u.set(b.id,0);for(let b=0;b<m.length;b++){let C=m[b];for(let P of h.get(C)){u.set(P,Math.max(u.get(P)??0,u.get(C)+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 b of zi(e)){let C=[];for(let k of b){let O=u.get(k)??0;while(C.length<=O)C.push([]);C[O].push(k)}let P=new Set(b),T=l.filter((k)=>P.has(k.from)&&u.get(k.to)-u.get(k.from)===1),F=new Map,V=()=>{for(let k of C)k.forEach((O,D)=>F.set(O,k.length>1?D/(k.length-1):0.5))},j=(k,O)=>{let D=new Map;k.forEach((H,K)=>{let te=O.get(H),De=k.length>1?K/(k.length-1):0.5;D.set(H,te.length?te.reduce((mt,Oe)=>mt+F.get(Oe),0)/te.length:De)});let Y=new Map(k.map((H,K)=>[H,K]));k.sort((H,K)=>D.get(H)-D.get(K)||Y.get(H)-Y.get(K)),k.forEach((H,K)=>F.set(H,k.length>1?K/(k.length-1):0.5))};V();let x=C.map((k)=>[...k]),S=Fs(T,F);for(let k=0;k<i&&S>0;k++){for(let D=1;D<C.length;D++)j(C[D],p);for(let D=C.length-2;D>=0;D--)j(C[D],h);let O=Fs(T,F);if(O<S)S=O,x=C.map((D)=>[...D])}let L=(k)=>r?e.size(k).width:e.size(k).height,R=(k)=>r?e.size(k).height:e.size(k).width,N=x.map((k)=>k.reduce((O,D)=>O+R(D),0)+a*Math.max(0,k.length-1)),E=Math.max(0,...N),M=0;x.forEach((k,O)=>{let D=Math.max(0,...k.map(L)),Y=v+(E-N[O])/2;for(let H of k){let K=Y+R(H)/2;w.set(H,r?{x:M+D/2,y:K}:{x:K,y:M+D/2}),Y+=R(H)+a}M+=D+n}),y.push(x),v+=E+o}return{positions:w,layerOf:u,reversed:c,components:y,bounds:e.bounds(w)}}var Fi={x:0,y:0,k:1};function js(e,t,s){return Math.min(Math.max(e,t),s)}function vg(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Et(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function Ue(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function Bs(e,t,s,a=0.1,n=4){let o=js(e.k*s,a,n),i=o/e.k;return{x:t.x-(t.x-e.x)*i,y:t.y-(t.y-e.y)*i,k:o}}function _s(e,t,s=24,a=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...Fi};let o=Math.max(1,t.width-s*2),i=Math.max(1,t.height-s*2),r=js(Math.min(o/Math.max(1,e.width),i/Math.max(1,e.height)),a,n);return{x:t.width/2-(e.x+e.width/2)*r,y:t.height/2-(e.y+e.height/2)*r,k:r}}function Ks(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function qs(e,t,s,a=16){let n=t.x*e.k+e.x,o=t.y*e.k+e.y,i=n+t.width*e.k,r=o+t.height*e.k,c=0,l=0;if(n<a)c=a-n;else if(i>s.width-a)c=s.width-a-i;if(o<a)l=a-o;else if(r>s.height-a)l=s.height-a-r;return c===0&&l===0?e:Ue(e,c,l)}function Ws(e,t,s){let a=e.get(t);if(!a)return null;let n=s==="left"?-1:s==="right"?1:0,o=s==="up"?-1:s==="down"?1:0,i=null,r=Number.POSITIVE_INFINITY;for(let[c,l]of e){if(c===t)continue;let d=l.x-a.x,h=l.y-a.y,p=d*n+h*o;if(p<=0.5)continue;let u=Math.abs(d*o)+Math.abs(h*n);if(u>p*2)continue;let g=p+u*2;if(g<r)r=g,i=c}return i}function Gs(e,t){let s=null,a=Number.POSITIVE_INFINITY;for(let[n,o]of e){let i=(o.x-t.x)**2+(o.y-t.y)**2;if(i<a)a=i,s=n}return s}function wg(e,t,s){let a=null;for(let[n,o]of t){let i=e.size(n);if(Math.abs(s.x-o.x)<=i.width/2&&Math.abs(s.y-o.y)<=i.height/2)a=n}return a}var ji="./GraphView-0t3t9mec.stx";var Bi="http://www.w3.org/2000/svg",Us=3,Js=350,_i=240,Ki=6.2;function q(e,t={}){let s=document.createElementNS(Bi,e);for(let a in t)s.setAttribute(a,String(t[a]));return s}var qi=0;class Wi{root;callbacks;timings={layout:0,render:0};model=new Ge;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"}-${++qi}`,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 a=q("defs");for(let n of["arrow","arrow-active"]){let o=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}`});o.append(q("path",{d:"M 0 0 L 10 5 L 0 10 z"})),a.append(o)}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(a,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 Ge(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 a=this.model.merge(t??[],s??[]);if(a.nodes.length===0&&a.edges.length===0)return a;let n=this.shown.get(e)??this.positions.get(e)??Et(this.view,{x:this.size.width/2,y:this.size.height/2});for(let o of a.nodes)this.shown.set(o,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),a.nodes.length)this.announce(`${a.nodes.length} ${a.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${oe(this.model.node(e))}`:""}`);return a}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(Ks(this.view,t,this.size))}fit(){this.measure(),this.setView(_s(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(Bs(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(Ue(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=Vs(this.model,{direction:this.direction}).positions;else this.positions=Hs(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=Ds(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 a=this.model.degree(t.id);s.setAttribute("aria-label",`${oe(t)}, ${a} ${a===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=Rs(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),a=q("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)a.setAttribute("data-kind",e.kind);if(e.expandable===!0)a.setAttribute("data-expandable","");let n=q("title");n.textContent=e.detail?`${oe(e)}: ${e.detail}`:oe(e);let o=q("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),i=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,r=q("text",{class:"stx-gv-node-label",x:-i,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(r.textContent=We(oe(e),t),a.append(n,o,r),e.detail){let c=q("text",{class:"stx-gv-node-detail",x:-i,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=We(e.detail,Math.floor(t/0.85)),a.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="+",a.append(c)}return a}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 a=null;if(e.label){let n=We(String(e.label),32),o=Math.ceil(n.length*Ki)+8;a=q("g",{class:"stx-gv-edge-label","data-edge":e.id});let i=q("rect",{x:-o/2,y:-8,width:o,height:16,rx:3,ry:3}),r=q("text",{"text-anchor":"middle","dominant-baseline":"central"});r.textContent=n,a.append(i,r),this.labelLayer.append(a)}return{group:t,path:s,label:a}}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 Ms({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,o]of this.positions)t.set(n,this.shown.get(n)??o);let s=performance.now(),a=(n)=>{let o=Math.min(1,(n-s)/_i),i=1-(1-o)**3;for(let[r,c]of this.positions){let l=t.get(r);this.shown.set(r,{x:l.x+(c.x-l.x)*i,y:l.y+(c.y-l.y)*i})}if(this.draw(),this.frame=o<1?requestAnimationFrame(a):0,o>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(a)}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[a,n]of this.nodeEls)if(n.toggleAttribute("data-selected",a===e),n.toggleAttribute("data-neighbour",t.has(a)),a===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let a of this.model.edges){let n=this.edgeEls.get(a.id);if(!n)continue;let o=e!=null&&(a.source===e||a.target===e);if(n.group.toggleAttribute("data-active",o),n.label?.toggleAttribute("data-active",o),a.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${o?"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((o)=>oe(this.model.node(o))),a=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${oe(t)}, no connections`:`${oe(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${a}${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,a,n)=>{this.surface.addEventListener(s,a,n),this.disposers.push(()=>this.surface.removeEventListener(s,a,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 a=this.nodeUnder(s.target);if(a&&performance.now()-this.lastExpand>Js)this.expand(a,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 a=this.nodeUnder(s.target);if(a)this.select(a);this.callbacks.onContext?.({node:a?this.model.node(a):null,x:s.clientX,y:s.clientY})});let t=(s,a)=>{this.surface.addEventListener(s,a),this.disposers.push(()=>this.surface.removeEventListener(s,a))};t("gesturestart",(s)=>{s.preventDefault();let a=this.local(s);this.pinch={k:this.view.k,x:a.x,y:a.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,a=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<Us&&Math.abs(a)<Us)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+a/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 o of this.model.edgesOf(t.node))this.drawEdge(o)}else this.autoFit=!1,this.setView(Ue(t.view,s,a))}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(),a=this.lastClick.id===t.node&&s-this.lastClick.at<Js;if(this.lastClick=a?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),a)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?Ws(this.positions,this.selected,s):Gs(this.positions,Et(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let a=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,a)}else if(a||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),a=qs(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(a!==this.view)this.autoFit=!1,this.setView(a)}}var Ui="./GroupedList-j3sxv5pb.stx";var Yi="./GroupedListRow-dnqc6j85.stx";var Zi="./Image-6x38ddd7.stx";var er="./EmailInput-sf9jfrgz.stx";var sr="./NumberInput-e2afxyh3.stx";var nr="./PasswordInput-d78bk8r0.stx";var ir="./SearchInput-w15r5t95.stx";var lr="./TextInput-fge1b7tk.stx";var cr={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},dr={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},pr={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},hr={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},ur={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},_g=ae("TextInput",dr),Kg=ae("EmailInput",cr),qg=ae("PasswordInput",hr),Wg=ae("NumberInput",pr),Gg=ae("SearchInput",ur);var fr=new Set(["array","set"]),mr=/^[A-Z_$][\w$]*$/i;function Pt(e){return fr.has(e.kind)}function It(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Mt(e,t="$"){let s=t;for(let a of e)if(typeof a==="number")s+=`[${a}]`;else if(mr.test(a))s+=`.${a}`;else s+=`[${JSON.stringify(a)}]`;return s}function At(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Pt(e))return e.children.map((s)=>At(s));let t={};return e.children.forEach((s,a)=>{t[s.key!==void 0?String(s.key):s.label??String(a)]=At(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 Xs(e,t=2){let s=At(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var Ys=80;function Rt(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(Pt(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>Ys?`${t.slice(0,Ys)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function ex(e,t,s={}){let a=s.maxItems??1000,n=s.maxDepth??32,o=new Map,i=1,r=(l,d)=>{if(d!==void 0)l.label=d;return l},c=(l,d,h)=>{if(l===null)return r({kind:"null",value:null,preview:"null"},d);switch(typeof l){case"undefined":return r({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return r({kind:typeof l,value:l},d);case"symbol":return r({kind:"symbol",preview:l.toString()},d);case"function":return r({kind:"function",preview:`\u0192 ${l.name||"(anonymous)"}()`},d)}let p=l,u=o.get(p);if(u!==void 0)return r({kind:"ref",ref:u},d);if(p instanceof Date)return r({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 r({kind:"regexp",value:p.toString(),preview:p.toString()},d);let g=`v${i++}`;o.set(p,g);let m=Array.isArray(p),w=p instanceof Set,y=p instanceof Map,v=r({id:g,kind:m?"array":w?"set":y?"map":"object",children:[]},d);if(h>=n)return v.preview=m?"Array":"Object",delete v.children,v;let b=v.children,C=0;if(m||w)for(let P of p){if(C<a)b.push(c(P,String(C),h+1));C++}else if(y)for(let[P,T]of p){if(C<a)b.push(c(T,typeof P==="string"?P:Rt(c(P,void 0,n)),h+1));C++}else{for(let T of Object.keys(p)){if(C<a)b.push(c(p[T],T,h+1));C++}let P=p.constructor?.name;if(P&&P!=="Object")v.preview=`${P} {${C}}`}if(C>b.length)v.more=C-b.length;if(y)v.preview=`Map(${C})`;return v};return c(e,t,0)}class Nt{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 a=this.rows[s];if(a.isMore)continue;if(a.parent!==-1||this.roots.length>1)t.push(a.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,a,n)=>{if(!It(s))return;if(n>=this.depth)this.opened.add(a);this.closed.delete(a),s.children?.forEach((o,i)=>t(o,o.id??`${a}.${i}`,n+1))};if(e===void 0)this.roots.forEach((s,a)=>t(s,s.id??String(a),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,a)=>{if(a>=this.depth||!It(t))return;this.closed.add(s),t.children?.forEach((n,o)=>e(n,n.id??`${s}.${o}`,a+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,a)=>{if(this.closed.delete(s),a>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let a=this.find(e);if(!a)return!1;let n=a.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 a=this.rows.length-1;if(a<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),a),o=this.rows[n],i=(r)=>({index:Math.min(Math.max(r,0),a),changed:!1});switch(t){case"ArrowDown":return i(e<0?0:n+1);case"ArrowUp":return i(n-1);case"Home":return i(0);case"End":return i(a);case"PageDown":return i(n+s);case"PageUp":return i(n-s);case"ArrowRight":if(!o.expandable||o.isMore)return i(n);if(!o.expanded)return{index:n,changed:this.expand(o.id)};return i(n+1);case"ArrowLeft":if(o.expanded&&!o.isMore)return{index:n,changed:this.collapse(o.id)};return i(o.parent===-1?n:o.parent);case"*":{let r=!1,c=o.parent,l=this.rows.filter((d)=>d.parent===c&&d.depth===o.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of l)this.mark(d.id,d.depth,!0),r=!0;if(r)this.flatten();return{index:this.indexOf(o.id),changed:r}}}return i(n)}typeahead(e,t){let s=t.toLowerCase(),a=this.rows.length;if(s===""||a===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let o=0;o<a;o++){let i=(n+o+a)%a,r=this.rows[i];if(!r.isMore&&(r.node.label??"").toLowerCase().startsWith(s))return i}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let a=this.rows[s];if(!a.expandable||a.isMore||a.expanded===t)return!1;return this.mark(e,a.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 a=s.node.children;if(!a||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let o=a.length-1;o>=0;o--)t.push({node:a[o],id:a[o].id??`${s.id}.${o}`,ancestors:n})}return null}flatten(){let e=[],t=(s,a,n,o,i,r,c)=>{let l=It(s),d=l&&this.isExpanded(a,n),h=e.length;if(e.push({id:a,node:s,depth:n,key:i,parent:o,expandable:l,expanded:d,posInSet:r,setSize:c,isMore:!1}),!d)return;let p=s.children??[],u=s.more??0,g=Pt(s),m=p.length+(u>0?1:0);for(let w=0;w<p.length;w++){let y=p[w];t(y,y.id??`${a}.${w}`,n+1,h,y.key??(g?w:y.label??w),w+1,m)}if(u>0)e.push({id:`${a}.+`,node:s,depth:n+1,key:"",parent:h,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,a)=>t(s,s.id??String(a),0,-1,s.key??a,a+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var xr="./JsonTree-satc4010.stx";var ea=new Set(["array","object","map","set","model","error"]);function br(e){return e.t==="object"||e.t==="model"}function Zs(e){return e.length>0&&e.slice(0,20).every(br)}function Qs(e){return e.some((t)=>ea.has(t.t))}function Lt(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 vr(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function ax(e,t,s={}){let a=s.idPrefix??"t",n=(l)=>`${a}${l}`,o=(l,d)=>{if(d!==void 0)l.label=d;return l},i=(l)=>c(l,void 0).preview??l.t,r=(l,d)=>{if(d.length>0)l.openable=d.length===1?d[0]:d;return l};function c(l,d){switch(l.t){case"undefined":return o({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return o({kind:"null",value:null,preview:"null"},d);case"boolean":return o({kind:"boolean",value:l.v,preview:String(l.v)},d);case"number":{let h=typeof l.v==="number"?l.v:l.v==="-0"?-0:Number(l.v);return o({kind:"number",value:h,preview:String(l.v)},d)}case"bigint":return o({kind:"bigint",value:l.v,preview:`${l.v}n`},d);case"string":return o({kind:"string",value:l.v,preview:Lt(l.v,l.truncated)},d);case"symbol":return o({kind:"symbol",preview:`Symbol(${l.v})`},d);case"function":{let h=l.kind==="class"?`class ${l.name}`:`${l.kind==="async"?"async ":""}\u0192${l.kind==="generator"?"*":""} ${l.name}()`;return o({kind:"function",preview:h},d)}case"date":return o({kind:"date",value:l.v,preview:l.v??"Invalid Date"},d);case"regexp":return o({kind:"regexp",value:l.v,preview:l.v},d);case"url":return o({kind:"url",value:l.v,preview:l.v},d);case"promise":return o({kind:"promise",preview:"Promise"},d);case"bytes":{let h=l.length*2>l.hex.length;return o({kind:"bytes",value:l.hex,preview:`${l.ctor}(${l.length}) <${l.hex}${h?"\u2026":""}>`},d)}case"ref":return o({kind:"ref",ref:n(l.id),preview:"[Circular]"},d);case"cut":return o({kind:"cut",preview:`${l.ctor??"Object"} \u2026 (${l.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let h={id:n(l.id),kind:"array",preview:`${l.ctor??"Array"}(${l.length})`,children:l.items.map((p,u)=>c(p,String(u)))};if(l.more)h.more=l.more;return o(r(h,Zs(l.items)?["table"]:[]),d)}case"set":{let h={id:n(l.id),kind:"set",preview:`Set(${l.size})`,children:l.items.map((p,u)=>c(p,String(u)))};if(l.more)h.more=l.more;return o(r(h,Zs(l.items)?["table"]:[]),d)}case"object":{let h=l.entries.slice(0,5).map(([m])=>m).join(", "),p=l.entries.length+(l.more??0),u=p===0?"{}":`{${h}${p>5?", \u2026":""}}`,g={id:n(l.id),kind:"object",preview:l.ctor&&l.ctor!=="Object"?`${l.ctor} ${u}`:u,children:l.entries.map(([m,w])=>c(w,m))};if(l.more)g.more=l.more;return o(r(g,Qs(l.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let h={id:n(l.id),kind:"map",preview:`Map(${l.size})`,children:l.entries.map(([p,u],g)=>{if(!ea.has(p.t)){let m=c(u,i(p));return m.key=p.t==="string"?p.v:i(p),m}return{kind:"entry",label:String(g),key:g,preview:`${i(p)} => ${i(u)}`,children:[c(p,"key"),c(u,"value")]}})};if(l.more)h.more=l.more;return o(r(h,Qs(l.entries.map((p)=>p[1]))?["graph"]:[]),d)}case"model":{let h=l.attributes.map(([g,m])=>c(m,g));for(let[g,m]of l.loaded??[]){let w=c(m,g);w.meta=w.meta??{relation:!0},h.push(w)}if(l.hidden?.length)h.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:l.hidden.join(", "),children:l.hidden.map((g,m)=>({kind:"hidden",label:String(m),value:g,preview:g}))});if(l.relations?.length)h.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${l.relations.length} declared`,children:l.relations.map((g)=>({kind:"relation",label:g.name??g.model,value:g,preview:`${g.kind} ${g.model}`}))});let p={model:l.model,hidden:l.hidden??[],relations:l.relations??[]};if(l.table)p.table=l.table;if(l.primaryKey)p.primaryKey=l.primaryKey;let u={id:n(l.id),kind:"model",preview:l.key?`${l.model} #${i(l.key).replace(/^"|"$/g,"")}`:l.model,children:h,meta:p};if(l.more)u.more=l.more;return o(r(u,["graph"]),d)}case"html":{let h={kind:l.kind};if(l.title)h.title=l.title;if(l.text)h.text=l.text;if(l.truncated)h.truncated=l.truncated;let p=l.truncated?`, ${l.truncated} more cut`:"",u=l.title?`: ${l.title}`:"";return o(r({kind:"html",value:l.html,preview:`${l.kind}${u} (${l.html.length} characters${p})`,meta:h},["preview"]),d)}case"error":{let h=[{kind:"string",label:"message",value:l.message,preview:Lt(l.message)}];if(l.frames?.length)h.push({kind:"stack",label:"stack",preview:`${l.frames.length} frames`,value:l.stack,children:l.frames.map((p,u)=>({kind:"frame",label:String(u),value:p,preview:[p.function,vr(p)].filter(Boolean).join(" at ")||"(unknown)",meta:p}))});else if(l.stack)h.push({kind:"string",label:"stack",value:l.stack,preview:Lt(l.stack)});if(l.cause)h.push(c(l.cause,"cause"));for(let[p,u]of l.entries??[])h.push(c(u,p));return o({kind:"error",preview:l.message?`${l.name}: ${l.message}`:l.name,children:h},d)}}return o({kind:"unknown",preview:String(l.t??"unknown")},d)}return c(e,t)}var wr=600,ta=400,sa={table:"Table",graph:"Graph",preview:"Preview"};function aa(e){return e.length>ta?`${e.slice(0,ta)}\u2026`:e}function na(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class yr{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 a=(o)=>e.querySelector(`[data-jt="${o}"]`);this.scroller=a("scroller")??e,this.content=a("content")??this.scroller,this.rowsEl=a("rows")??this.content,this.status=a("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 Nt(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(o,i,r,c)=>{o.addEventListener(i,r,c),this.disposers.push(()=>o.removeEventListener(i,r,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(o)=>this.onKeyDown(o)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(o)=>{if(o.target.closest("[data-jt-action]"))o.preventDefault()}),n(this.rowsEl,"click",(o)=>this.onClick(o)),n(this.rowsEl,"dblclick",(o)=>this.onDoubleClick(o)),n(this.rowsEl,"contextmenu",(o)=>this.onContextMenu(o)),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 a=this.model.appendChildren(e,t,s);if(a)this.afterChange();return a}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:Mt(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=(a,n)=>{let o=document.createElement("span");if(o.className=a,n)o.setAttribute("aria-hidden","true");return e.appendChild(o),o},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,a){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),a)n.setAttribute("data-jt-as",a);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 na(s)}return na(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 a=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(a/this.rowHeight)-this.overscan),o=Math.min(t,Math.ceil((a+s)/this.rowHeight)+this.overscan),i=Math.max(0,o-n);while(this.pool.length<i)this.pool.push(this.createRow());let r=this.pool.length,c=new Uint8Array(r);for(let d=n;d<o;d++){let h=d%r;c[h]=1,this.paint(this.pool[h],e[d],d)}for(let d=0;d<r;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<o)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let a=this.model.version,n=s===this.active,o=e.__jt;if(!o||o.index!==s||o.version!==a){let i=this.parts.get(e),r=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"),i.twisty.textContent="",i.label.textContent="",i.separator.style.display="none",i.preview.textContent=`\u2026 ${r.more} more`,i.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",r.kind),i.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=r.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");i.label.textContent=aa(d),i.separator.style.display=d===""?"none":"",i.preview.textContent=aa(Rt(r)),i.preview.setAttribute("data-kind",r.kind)}let c=this.opensOf(t,s),l=t.isMore?"+":c.join("|");if(!o||o.opens!==l)if(i.actions.textContent="",t.isMore)i.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)i.actions.appendChild(this.button("open",sa[d]??d,`Open as ${sa[d]?.toLowerCase()??d}`,d));i.actions.appendChild(this.button("copy-value","Copy","Copy value")),i.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:a,opens:l}}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 a=this.model.indexOf(s);if(a!==-1)this.callbacks.onToggle?.({...this.detail(a),expanded:this.model.rows[a].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 a=s.isMore?s.parent:e,n=this.model.pathOf(a),o=this.model.rows[a].node,i=t==="path"?Mt(n):Xs(o);try{navigator.clipboard?.writeText(i)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${i}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:i,path:n,node:o})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let a=t??this.opensOf(s,e)[0];if(a===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:a})}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 a=this.model.rows[t];if(a.expandable||a.isMore||a.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,a=e.key;if(s&&(a==="c"||a==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(a==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=wr;if(a==="Enter"||a===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(a==="ArrowDown"||a==="ArrowUp"||a==="ArrowLeft"||a==="ArrowRight"||a==="Home"||a==="End"||a==="PageDown"||a==="PageUp"||a==="*"){e.preventDefault(),this.typed="";let o=this.active===-1?null:t[this.active],i=o?.expanded,r=this.model.move(this.active,a,this.pageSize());if(r.changed){if(this.active=r.index,this.activeId=this.model.rows[r.index]?.id??"",this.scrollToRow(r.index),this.render(),o&&a!=="*"){let c=this.model.indexOf(o.id);if(c!==-1&&this.model.rows[c].expanded!==i)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(r.index,!0);return}if(a.length===1){let o=Date.now();if(!n)this.typed="";this.typedAt=o,this.typed+=a;let i=this.model.typeahead(this.active,this.typed);if(i!==-1)e.preventDefault(),this.setActive(i,!0)}}}var Sr="./List-5ey6k813.stx";var Tr="./SwipeRow-az09d4tb.stx";var Er="./Listbox-83j2q4x6.stx";var Ar="./ListboxButton-gan8e3nw.stx";var Mr="./ListboxLabel-ka0hfm7b.stx";var Nr="./ListboxOption-gpaqvk3s.stx";var Dr="./ListboxOptions-2928864k.stx";var zr="./FilterChip-bynt5maa.stx";var Fr="./FilterChips-xg7pgkk2.stx";var jr="./ListRow-1qvkjt4v.stx";var _r="./NavBar-ky8tedjb.stx";var qr="./SectionCard-8b5fyrjd.stx";var Gr="./TabBar-6m1ajm1d.stx";var Jr="./TabBarItem-kddfnhk3.stx";var Xr="./Navigator-1yk1c3pp.stx";var Qr="./Notification-b3cz24f0.stx";var tl="./Pager-w4eb64na.stx";var al="./PagerDots-076w890y.stx";var ol="./Pagination-8bhbkpcp.stx";var rl="./Checkout-crbegxyv.stx";var cl="./DefaultPaymentMethod-ss3x61tr.stx";var pl="./PaymentMethods-z4hhr0kv.stx";var ul="./SubscriptionCheckout-rdcv32n1.stx";var ml="./Popover-jjt7p7sn.stx";var xl="./PopoverButton-ks3cttd9.stx";var vl="./PopoverPanel-ddgj4gz3.stx";var yl="./Portal-m73vz879.stx";var ia=[{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 oa(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function Dt(e,t={}){let s=oa(t.width),a=oa(t.height),n=Boolean(t.landscape);if(s&&a)return{name:"custom",size:{width:s,height:a},landscape:!1};let o=ia.find((r)=>r.name===e);if(!o)return{name:"fill",size:null,landscape:!1};let i=n&&o.height>o.width;return{name:o.name,size:i?{width:o.height,height:o.width}:{width:o.width,height:o.height},landscape:i}}function ra(e,t,s=0){let a=t.width-s*2,n=t.height-s*2;if(a<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,a/e.width,n/e.height)}function la(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 kl=["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 ca(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function kb(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>kl.includes(s))}var Sl=/<!doctype\s|<html[\s>]/i,Je=/<head(?:\s[^>]*)?>/i,Ye=/<html(?:\s[^>]*)?>/i,Cl=/<base[\s>]/i,Tl=/<meta[^>]+name\s*=\s*["']?color-scheme/i,$l=/\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)/gi,El=/(<(style|script)\b[^>]*>)([\s\S]*?)(<\/\2\s*>)/gi,Il=/(\smedia\s*=\s*)("[^"]*"|'[^']*')/gi,Al="(min-width: 0px)",Pl="(max-width: 0px)";function Ml(e,t){let s=(o)=>o.replace($l,(i,r)=>r.toLowerCase()===t?Al:Pl),a=e.replace(El,(o,i,r,c,l)=>i+s(c)+l).replace(Il,(o,i,r)=>i+s(r)),n=`<style data-stx-preview-scheme>:root{color-scheme:${t} !important}</style>`;if(Je.test(a))return a.replace(Je,(o)=>o+n);if(Ye.test(a))return a.replace(Ye,(o)=>`${o}<head>${n}</head>`);return n+a}function Rl(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function da(e,t={}){let s=Nl(e,t);return t.forceScheme?Ml(s,t.forceScheme):s}function Nl(e,t){let s=e==null?"":String(e),a='<base target="_blank">';if(!Sl.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>${Rl(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(Cl.test(s))return s;if(Je.test(s))return s.replace(Je,(n)=>n+'<base target="_blank">');if(Ye.test(s))return s.replace(Ye,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function Sb(e){return Tl.test(e)}function pa(e,t){let s=["fill",...ia.map((n)=>n.name)],a=s.indexOf(e);return s[((a<0?0:a)+t+s.length)%s.length]}var Dl="./PreviewFrame-erbgvzj8.stx";var Ol=16,ha="(prefers-color-scheme: dark)",Pe;function zl(){if(Pe!==void 0)return Pe;try{if(typeof matchMedia!=="function"||!document.body)return!0;let e=matchMedia(ha).matches,t=document.createElement("iframe");t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.style.cssText=`position:absolute;width:1px;height:1px;border:0;opacity:0;pointer-events:none;color-scheme:${e?"light":"dark"}`,document.body.appendChild(t),t.offsetWidth;let s=t.contentWindow?.matchMedia?.(ha).matches;t.remove(),Pe=typeof s==="boolean"?s!==e:!0}catch{Pe=!0}return Pe}class Hl{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;written;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 a=(o)=>this.onToolbarClick(o),n=(o)=>this.onToolbarKey(o);if(this.root.addEventListener("click",a),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",a),()=>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;if(this.scheme=t,this.schemeToWrite()!==this.written)this.load();else 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 Dt(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"}schemeToWrite(){if(zl())return;if(this.scheme==="auto"&&!this.root.closest(".dark, .light"))return;return this.effectiveScheme()}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",ca({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())}),this.written=this.schemeToWrite(),e.srcdoc=da(this.html,{title:this.title,forceScheme:this.written}),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 a=this.stage.getBoundingClientRect();this.scale=ra(t,{width:a.width,height:a.height},Ol),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=la(this.viewport,this.scale)}reflect(){for(let a of this.root.querySelectorAll("[data-pf-viewport]")){let n=a.getAttribute("data-pf-viewport")===this.viewport.name;a.setAttribute("aria-checked",String(n)),a.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 a=t.querySelector('[data-pf="scheme-text"]');if(a)a.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let a=Dt(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!a||this.viewport.name==="custom"||a.height<=a.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 a=t.getAttribute("data-pf-viewport")||"fill",n=pa(a,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var Vl="./Progress-2qzb77kc.stx";var Bl="./Radio-8153x74w.stx";var Kl="./RadioGroup-ps9kn22f.stx";var Wl="./RadioGroupDescription-z34r9avr.stx";var Ul="./RadioGroupLabel-ka0hfm7b.stx";var Yl="./RadioGroupOption-6hyy1bvb.stx";var Zl="./RenderSurface-z9zr4d75.stx";var Ql=8192,ve=globalThis;function ec(){return ve.__stxRenderSurfaces??=new Map,ve.__stxRenderSurfaces}function ua(e,t){return Object.assign(Error(t),{code:e})}function fa(){return Boolean(ve.stx?._host?.isNative)}function tc(){if(fa())return typeof ve.craft?.renderSurface?.present==="function"&&ve.craft?.capabilities?.renderSurface===!0?"native":"none";if(typeof document>"u")return"none";return"canvas"}function sc(e,t,s,a){if(typeof e!=="string"||!e)throw TypeError("presentFrame needs the surface's name");if(!(t instanceof Uint32Array))throw TypeError("presentFrame takes a Uint32Array of 0xAARRGGBB words");for(let[n,o]of[["width",s],["height",a]])if(!Number.isInteger(o)||o<1||o>8192)throw TypeError(`presentFrame's ${n} must be a whole number from 1 to 8192, not ${o}`);if(t.length!==s*a)throw TypeError(`presentFrame was given ${t.length} words for a ${s} x ${a} frame (${s*a})`)}function ma(e,t,s,a){if(fa()){let o=ve.craft?.renderSurface;if(!o||typeof o.present!=="function")throw ua("UNAVAILABLE","This device cannot draw a RenderSurface");return o.present(e,t,s,a)}sc(e,t,s,a);let n=ec().get(e);if(!n)throw ua("NOT_FOUND",`No RenderSurface named "${e}" is on the page`);return ac(n,t,s,a),!0}function ac(e,t,s,a){let{canvas:n,context:o,opaque:i}=e;if(n.width!==s)n.width=s;if(n.height!==a)n.height=a;if(!e.image||e.image.width!==s||e.image.height!==a)e.image=o.createImageData(s,a);let r=e.image.data;for(let c=0,l=0;c<t.length;c++,l+=4){let d=t[c],h=d>>>24,p=d>>>16&255,u=d>>>8&255,g=d&255;if(i)h=255;else if(h>0&&h<255)p=Math.min(255,Math.round(p*255/h)),u=Math.min(255,Math.round(u*255/h)),g=Math.min(255,Math.round(g*255/h));r[l]=p,r[l+1]=u,r[l+2]=g,r[l+3]=h}o.putImageData(e.image,0,0)}function nc(e,t,s={}){let a=typeof requestAnimationFrame==="function"?requestAnimationFrame:(r)=>setTimeout(()=>r(Date.now()),16),n=!1,o=!1,i=(r)=>{if(n)return;if(!o)try{let c=t(r);if(c&&!ma(e,c.pixels,c.width,c.height))o=!0}catch(c){if(n=!0,c?.code==="NOT_FOUND")return;if(s.onError)s.onError(c);else throw c;return}a(i)};return a(i),{stop:()=>{n=!0},wake:()=>{o=!1},get waiting(){return o},get ended(){return n}}}var ic="./SegmentedControl-b93n9n2v.stx";var lc="./Select-p8mgxthn.stx";var Z={NONE:0,KEYWORD:1,SUBSTRING:2,WORD_PREFIX:3,PREFIX:4},nv=700,Xe=1600;function we(e){return`stx:settings:${e}`}function U(e,t){if(!t)return null;return e.find((s)=>s.id===t)??null}function cc(e){return(e.find((s)=>!s.parent)??e[0])?.id??""}function Ze(e,...t){for(let s of t)if(U(e,s))return s;return cc(e)}function Qe(e,t){let s=new Set,a=U(e,t);while(a&&a.parent&&!s.has(a.id)){s.add(a.id);let n=U(e,a.parent);if(!n)break;a=n}return a?.id??""}function he(e,t){let s=U(e,t);if(!s?.parent||s.parent===t)return"";return U(e,s.parent)?s.parent:""}function et(){return{trail:[],cursor:-1}}function ue(e){return e.trail[e.cursor]??""}function Me(e,t){if(!t||ue(e)===t)return e;let s=[...e.trail.slice(0,e.cursor+1),t];return{trail:s,cursor:s.length-1}}function Re(e){return e.cursor<e.trail.length-1}function tt(e,t=[]){if(e.cursor>0)return!0;return e.cursor===0&&he(t,ue(e))!==""}function st(e,t=[]){if(e.cursor>0)return{trail:e.trail,cursor:e.cursor-1};if(e.cursor===0){let s=he(t,ue(e));if(s)return{trail:[s,...e.trail],cursor:0}}return e}function at(e){return Re(e)?{trail:e.trail,cursor:e.cursor+1}:e}function pe(e){return String(e??"").normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function ga(e,t){let s=e.indexOf(t);while(s!==-1){if(s===0||!/[\p{L}\p{N}]/u.test(e.charAt(s-1)))return!0;s=e.indexOf(t,s+1)}return!1}function xa(e,t,s){if(t.startsWith(e))return Z.PREFIX;if(ga(t,e))return Z.WORD_PREFIX;if(t.includes(e))return Z.SUBSTRING;if(ga(s,e))return Z.KEYWORD;return Z.NONE}function ba(e,t,s=""){let a=pe(e);if(a==="")return Z.NONE;let n=pe(t),o=pe(s),i=xa(a,n,o),r=a.split(" ");if(i!==Z.NONE||r.length===1)return i;let c=Z.PREFIX;for(let l of r){let d=xa(l,n,o);if(d===Z.NONE)return Z.NONE;c=Math.min(c,d===Z.PREFIX&&l!==r[0]?Z.WORD_PREFIX:d)}return c}function nt(e,t){let s=pe(e);if(s==="")return{query:"",panes:[],settings:[]};let a=[];for(let o of t.items){let i=U(t.panes,o.id),r=`${o.keywords??""} ${i?.keywords??""} ${i&&i.title!==o.label?i.title:""}`;if(ba(s,o.label,r)!==Z.NONE)a.push(o.id)}let n=[];return t.rows.forEach((o,i)=>{if(!o.label)return;let c=U(t.panes,o.pane)?.title??"",l=ba(s,o.label,`${o.keywords??""} ${c}`);if(l!==Z.NONE)n.push({id:o.id,label:o.label,pane:o.pane,paneTitle:c,row:i,rank:l})}),n.sort((o,i)=>i.rank-o.rank||o.row-i.row),{query:s,panes:a,settings:n}}function va(e){if(e<=0)return"No results";return e===1?"1 result":`${e} results`}function zt(e,t,s){if(s<=0)return-1;if(e==="ArrowDown")return Math.min(s-1,t+1);if(e==="ArrowUp")return t<0?s-1:Math.max(0,t-1);if(e==="Home")return 0;if(e==="End")return s-1;return-1}function wa(e,t,s,a=700){return{buffer:(!e||s-e.at>a?"":e.buffer)+pe(t),at:s}}function ya(e,t,s){let a=e.length,n=pe(t);if(a===0||n==="")return-1;let o=n.split("").every((c)=>c===n.charAt(0)),i=o?n.charAt(0):n,r=o?s+1:Math.max(0,s);for(let c=0;c<a;c++){let l=((r+c)%a+a)%a;if(pe(e[l]).startsWith(i))return l}return-1}var pc="./SettingsGroup-g1hnxp1p.stx";var uc="./SettingsPane-9svk1w3e.stx";var mc="./SettingsPaneHeader-am42srhp.stx";var xc="./SettingsRow-kgda3nv1.stx";var vc="./SettingsSidebarGroup-4ag5qjpw.stx";var yc="./SettingsSidebarItem-ga2jxq53.stx";var Sc="./SettingsUpdateRow-ajpnqx8a.stx";var Tc="./SettingsWindow-v7jepxem.stx";var $c="data-stx-settings",ye="data-settings-item",ke="data-settings-pane",Ec="data-settings-row";class Ic{tree;root;options;callbacks;history=et();current="";query="";hits=[];highlighted=null;highlightTimer=null;pressed=new Map;visible=new Map;disposers=[];destroyed=!1;constructor(e,t,s={},a={}){this.tree=e;this.root=t;this.options=s;this.callbacks=a;this.hear(),this.disposers.push(e.observeChildren(t,()=>{if(this.destroyed)return;this.hear(),this.show(!1),this.applySearch(!1)}));let n=this.panes(),o=this.paneNodes().find((i)=>this.tree.getAttribute(i,"data-active")!=null);this.history=Me(this.history,Ze(n,this.stored(),s.pane,o?this.attribute(o,ke):"")),this.show(!0),this.applySearch(!1)}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.rowNodes().find((a)=>this.attribute(a,"data-setting")===e),s=t?this.paneOf(t):"";if(!t||!s)return!1;return this.open(s),this.reveal(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}search(e){this.query=String(e??""),this.applySearch(!0)}chooseResult(e){let t=this.hits[e];if(!t||this.tree.parent(t.row)===null)return;this.open(t.hit.pane),this.reveal(t.row)}destroy(){this.destroyed=!0;for(let e of this.disposers)e();this.disposers.length=0;for(let e of this.pressed.values())e();this.pressed.clear(),this.visible.clear(),this.clearHighlight()}attribute(e,t){return this.tree.getAttribute(e,t)??""}toggle(e,t){let s=this.attribute(e,"class").split(/\s+/).filter(Boolean),a=this.visible.has(e)?this.visible.get(e):!s.includes("hidden");if(this.visible.set(e,t),a===t)return;let n=s.filter((o)=>o!=="hidden");this.tree.setAttribute(e,"class",(t?n:[...n,"hidden"]).join(" "))}has(e,t){return this.tree.getAttribute(e,t)!=null}closest(e,t){for(let s=e;s;s=this.tree.parent(s))if(this.has(s,t))return s;return null}all(e,t=this.root){return this.tree.descendants(t).filter((s)=>this.has(s,e)&&this.closest(this.tree.parent(s),$c)===this.root)}paneNodes(){return this.all(ke)}panes(){return this.paneNodes().map((e)=>{let t=this.attribute(e,ke);return{id:t,title:this.attribute(e,"data-title")||t,keywords:this.attribute(e,"data-keywords"),parent:this.attribute(e,"data-parent")}})}itemNodes(){return this.all(ye)}items(){return this.itemNodes().map((e)=>({id:this.attribute(e,ye),label:this.attribute(e,"data-label").trim(),keywords:this.attribute(e,"data-keywords")}))}rowNodes(){return this.all(Ec).filter((e)=>this.paneOf(e)!=="")}paneOf(e){let t=this.closest(e,ke);return t?this.attribute(t,ke):""}stored(){if(!this.options.storageKey||!this.options.storage)return"";try{return this.options.storage.get(we(this.options.storageKey))||""}catch{return""}}store(){if(!this.options.storageKey||!this.options.storage||!this.current)return;try{this.options.storage.set(we(this.options.storageKey),this.current)}catch{}}hear(){let e=new Set;for(let t of this.itemNodes())if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.open(this.attribute(t,ye))));for(let t of this.rowNodes()){if(!this.has(t,"data-navigate"))continue;if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.navigate(t)))}for(let[t,s]of this.pressed){if(e.has(t))continue;s(),this.pressed.delete(t)}}navigate(e){if(this.attribute(e,"aria-disabled")==="true")return;let t=this.attribute(e,"data-navigate");if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:this.attribute(e,"data-setting")})}open(e){if(!e)return;this.history=Me(this.history,e),this.show(!0)}travel(e){if(e===this.history)return;this.history=e,this.show(!0)}show(e){let t=this.panes(),s=ue(this.history),a=U(t,s);if(!a)return;for(let i of this.paneNodes())this.toggle(i,this.attribute(i,ke)===s);let n=Qe(t,s);for(let i of this.itemNodes()){let r=this.attribute(i,ye)===n;for(let c of[i,...this.tree.descendants(i)])this.tree.setAttribute(c,"aria-selected",r?"true":"false")}let o=this.current!==s;if(this.current=s,this.report(),o){if(this.store(),e)this.callbacks.onPane?.({id:s,title:a.title,parent:he(t,s)})}}report(){let e=this.panes(),t=U(e,this.current),s=this.query.trim()!=="";this.callbacks.onState?.({pane:this.current,title:t?.title??"",canGoBack:tt(this.history,e),canGoForward:Re(this.history),query:this.query,searching:s,results:this.hits.map(({hit:a},n)=>({position:n,label:a.label,pane:a.paneTitle})),empty:s&&this.shownItems===0&&this.hits.length===0})}shownItems=0;applySearch(e){let t=this.rowNodes(),s=t.map((r)=>({id:this.attribute(r,"data-setting"),label:this.attribute(r,"data-label").trim(),keywords:this.attribute(r,"data-keywords"),pane:this.paneOf(r)})),a=nt(this.query,{panes:this.panes(),items:this.items(),rows:s}),n=a.query!=="",o=new Set;for(let r of this.itemNodes()){let c=!n||a.panes.includes(this.attribute(r,ye));if(c)o.add(r);this.toggle(r,c)}this.shownItems=n?a.panes.length:o.size;let i=!0;for(let r of this.all("data-settings-group")){let c=this.all(ye,r).some((l)=>o.has(l));this.toggle(r,c);for(let l of this.all("data-settings-group-gap",r))this.toggle(l,c&&!i);if(c)i=!1}for(let r of this.all("data-settings-account"))this.toggle(r,!n);if(this.hits=a.settings.map((r)=>({hit:r,row:t[r.row]})),this.report(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:a.panes,settings:a.settings.map((r)=>({id:r.id,label:r.label,pane:r.pane}))})}reveal(e){this.clearHighlight(),this.tree.setAttribute(e,"data-highlight","");let t=this.options.wash?.();if(t)this.tree.setStyle(e,{backgroundColor:t});this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);if(this.highlightTimer=null,this.highlighted)this.tree.removeAttribute(this.highlighted,"data-highlight"),this.tree.setStyle(this.highlighted,{backgroundColor:"transparent"});this.highlighted=null}}var gv={grey:"bg-[#8e8e93] dark:bg-[#8e8e93]",blue:"bg-[#007aff] dark:bg-[#0a84ff]",red:"bg-[#ff3b30] dark:bg-[#ff453a]",orange:"bg-[#ff9500] dark:bg-[#ff9f0a]",yellow:"bg-[#ffcc00] dark:bg-[#ffd60a]",green:"bg-[#34c759] dark:bg-[#30d158]",indigo:"bg-[#5856d6] dark:bg-[#5e5ce6]",purple:"bg-[#af52de] dark:bg-[#bf5af2]",pink:"bg-[#ff2d55] dark:bg-[#ff375f]",ink:"bg-[#1d1d1f] dark:bg-[#dcdce0]"};function xv(e){return e==="ink"?"text-[#ffffff] dark:text-[#1d1d1f]":"text-[#ffffff]"}var le="text-[#000000]/85 dark:text-[#ffffff]/85",ee="text-[#000000]/50 dark:text-[#ffffff]/55",ka="text-[#000000]/26 dark:text-[#ffffff]/25",Ht="text-[#ff3b30] dark:text-[#ff453a]",Ac="text-[#007aff] dark:text-[#0a84ff]",Pc="aria-selected:bg-[#007aff] dark:aria-selected:bg-[#0a84ff]",Sa="aria-selected:text-[#ffffff] dark:aria-selected:text-[#ffffff]",Mc="bg-[#000000]/10 dark:bg-[#ffffff]/10",Ca="bg-[#000000]/4 dark:bg-[#ffffff]/5",bv={shell:"flex-1 flex-row",sidebar:"flex-col bg-[#f2f1f0] dark:bg-[#2a2a2a]",sidebarWidth:226,sidebarMaterial:"sidebar",sidebarTop:"pt-[38px] px-[9px] pb-[6px]",search:"h-[28px] text-[13px]",nav:"flex-1 flex-col px-[9px] pb-[12px]",account:"mt-[7px]",list:"flex-col pt-[7px]",results:"flex-col gap-[2px] pt-[7px]",result:"flex-col justify-center min-h-[38px] px-[8px] py-[4px] rounded-[8px] hover:bg-[#000000]/5 dark:hover:bg-[#ffffff]/6",resultLabel:`text-[13px] ${le}`,resultPane:`text-[11px] ${ee}`,empty:`py-[24px] px-[8px] text-[13px] text-center ${ee}`,group:"flex-col gap-[2px]",groupGap:"h-[11px]",groupLabel:`px-[8px] pb-[3px] text-[11px] font-semibold ${ee}`,item:`flex-row items-center gap-[8px] h-[30px] px-[8px] rounded-[8px] ${Pc}`,itemTile:"h-[20px] w-[20px] rounded-[5.5px] items-center justify-center",itemGlyph:"h-[13px] w-[13px]",itemLabel:`flex-1 text-[13px] ${le} ${Sa}`,itemBadge:`text-[11px] ${ee} ${Sa}`,detail:"flex-1 flex-col bg-[#ffffff] dark:bg-[#1e1e1e]",toolbar:"flex-row items-center gap-[12px] h-[52px] pl-[8px] pr-[16px]",history:"flex-row items-center",historyButton:`text-[15px] ${ee}`,title:`flex-1 text-[20px] font-semibold ${le}`,body:"flex-1 flex-col",pane:"flex-1",paneContent:"flex-col px-[20px] pt-[11px] pb-[20px]",hero:`flex-col items-center mb-[10px] p-[22px] rounded-[12px] ${Ca}`,heroTile:"h-[48px] w-[48px] rounded-[12px] items-center justify-center",heroGlyph:"h-[30px] w-[30px]",heroTitle:`mt-[10px] text-[17px] font-semibold text-center ${le}`,heroDescription:`mt-[4px] text-[13px] text-center ${ee}`,heroExtra:"mt-[8px] flex-col items-center",section:"flex-col mb-[10px]",sectionHeader:`pt-[18px] px-[10px] pb-[8px] text-[13px] font-bold ${le}`,card:`flex-col rounded-[12px] ${Ca}`,sectionFooter:`pt-[6px] px-[10px] text-[11px] ${ee}`,rowRule:`mx-[10px] h-[0.5px] ${Mc}`,row:"flex-row items-center gap-[10px] min-h-[38px] px-[10px]",rowTall:"min-h-[44px]",rowMultiline:"items-start",rowStacked:"flex-col items-stretch gap-[4px] min-h-[38px] px-[10px]",rowPressed:"active:bg-[#000000]/5 dark:active:bg-[#ffffff]/6",rowWash:{light:"#007aff33",dark:"#0a84ff33"},rowTile:"h-[24px] w-[24px] rounded-[6px] items-center justify-center",rowTileMultiline:"mt-[10px]",rowGlyph:"h-[15px] w-[15px]",rowText:"flex-1 flex-col justify-center py-[7px]",rowTextMultiline:"flex-1 flex-col py-[10px]",rowTextStacked:"flex-col pt-[10px]",rowLabel:`text-[13px] ${le}`,rowLabelDestructive:`text-[13px] ${Ht}`,rowDescription:`mt-[1px] text-[11px] ${ee}`,rowControl:"flex-row items-center justify-end gap-[8px]",rowControlMultiline:"flex-row items-center justify-end gap-[8px] py-[10px]",rowControlStacked:"flex-col items-stretch pb-[7px]",rowValue:`text-[13px] ${ee}`,rowChevron:`h-[11px] w-[11px] ${ka}`,rowDisabled:"opacity-50",appearance:"flex-row gap-[14px]",appearanceOption:"flex-col items-center gap-[5px]",appearanceFrame:"p-[3px] rounded-[9px] border-2 border-transparent aria-checked:border-[#007aff] dark:aria-checked:border-[#0a84ff]",appearanceThumb:"h-[44px] w-[67px] flex-row rounded-[6px] overflow-hidden",appearanceLight:"flex-1 bg-[#e9e9eb]",appearanceDark:"flex-1 bg-[#2c2c2e]",appearanceCaption:`text-[11px] ${le}`,updateStatus:`mt-[1px] text-[11px] ${ee}`,updateError:`mt-[1px] text-[11px] ${Ht}`,updateProgress:`text-[11px] ${ee}`,ink:le,inkSecondary:ee,inkTertiary:ka,danger:Ht,accentText:Ac},vv={back:"chevron.left",forward:"chevron.right",disclosure:"chevron.right"};var Rc={check:"Check Now",install:"Download and Install",relaunch:"Restart to Update"};function Nc(e){let t=Number(e);if(!Number.isFinite(t))return"";return`${Math.round(Math.min(1,Math.max(0,t))*100)}%`}function yv(e,t=""){let s=String(t||"").trim(),a=String(e?.currentVersion||"").trim(),n=[s,a].filter(Boolean).join(" "),o=(h,p,u={})=>({title:n,sentence:h,action:p,actionLabel:p?Rc[p]:"",busy:!1,progress:"",failed:!1,...u});if(!e||typeof e.state!=="string")return o("",null);let i=s||"This app",r=String(e.version||"").trim(),c=r?`Version ${r}`:"An update",l=e.selfUpdating!==!1,d=String(e.reason||"").trim();switch(e.state){case"unavailable":return o(d||`${i} cannot update itself.`,null);case"idle":return o("Check for a newer version.","check");case"checking":return o("Checking for updates...","check",{busy:!0});case"current":return o(`${i} is up to date.`,"check");case"available":return l?o(`${c} is available.`,"install"):o(`${c} is available. ${d||`${i} cannot update itself.`}`,"check");case"downloading":return o(`Downloading ${r?`version ${r}`:"the update"}...`,"install",{busy:!0,progress:Nc(e.progress)});case"installing":return o(`Installing ${r?`version ${r}`:"the update"}...`,"install",{busy:!0});case"installed":return o(`${c} is installed. Restart ${i} to finish updating.`,"relaunch");case"error":return o(String(e.error||"").trim()||"The update could not be completed.","check",{failed:!0});default:return o("",null)}}var Ft="[data-stx-settings]",ot="[data-settings-item]",Ta="[data-settings-pane]",Lc="[data-settings-row]",Vt="[data-settings-result]",Dc='button, a[href], input, select, textarea, label, [role="switch"], [role="checkbox"], [role="radio"], [role="slider"], [role="button"], [contenteditable]';function $a(e){return e.replace(/[^\w-]+/g,"-")}class Oc{root;callbacks;history=et();current="";query="";storageKey;storage;typed=null;hits=[];highlighted=null;highlightTimer=null;disposers=[];list;account;input;field;results;empty;live;backButton;forwardButton;title;body;constructor(e,t={},s={}){this.root=e;this.callbacks=s;if(this.storageKey=t.storageKey||"",this.storage=t.storage??null,!e.id)e.id=`settings-${Math.random().toString(36).slice(2,8)}`;this.list=this.own("[data-settings-list]"),this.account=this.own("[data-settings-account]"),this.input=this.own("[data-settings-search-input]"),this.field=this.own("[data-settings-search]"),this.results=this.own("[data-settings-results]"),this.empty=this.own("[data-settings-empty]"),this.live=this.own("[data-settings-live]"),this.backButton=this.own("[data-settings-back]"),this.forwardButton=this.own("[data-settings-forward]"),this.title=this.own("[data-settings-title]"),this.body=this.own("[data-settings-body]");for(let o of[this.results,this.live,this.title])if(o)o.__stx_inert_content=!0;if(this.listen(e,"click",(o)=>this.onClick(o)),this.listen(t.globalKeys?document:e,"keydown",(o)=>this.onKeyDown(o)),this.input)this.listen(this.input,"input",()=>this.search(this.input.value));if(this.body)this.listen(this.body,"scroll",()=>this.syncScrolled(),{passive:!0});this.listen(window,"focus",()=>e.setAttribute("data-stx-window-active","true")),this.listen(window,"blur",()=>e.setAttribute("data-stx-window-active","false")),this.describe();let a=this.panes(),n=this.paneElements().find((o)=>!o.hidden)?.getAttribute("data-settings-pane");this.open(Ze(a,this.stored(),t.pane,n)),e.setAttribute("data-settings-ready","")}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.rowElements().find((a)=>a.getAttribute("data-setting")===e),s=t?this.paneOf(t):"";if(!t||!s)return!1;return this.open(s),this.reveal(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}focusSearch(){if(!this.input)return;this.input.focus(),this.input.select()}search(e){if(this.query=e,this.input&&this.input.value!==e)this.input.value=e;this.applySearch(!0)}destroy(){for(let e of this.disposers)e();this.disposers.length=0,this.clearHighlight(),this.root.removeAttribute("data-settings-ready")}own(e){return this.all(e)[0]??null}all(e,t=this.root){return Array.from(t.querySelectorAll(e)).filter((s)=>s.closest(Ft)===this.root)}listen(e,t,s,a){e.addEventListener(t,s,a),this.disposers.push(()=>e.removeEventListener(t,s,a))}paneElements(){return this.all(Ta)}paneElement(e){return this.paneElements().find((t)=>t.getAttribute("data-settings-pane")===e)??null}panes(){return this.paneElements().map((e)=>({id:e.getAttribute("data-settings-pane")||"",title:e.getAttribute("data-title")||e.getAttribute("data-settings-pane")||"",keywords:e.getAttribute("data-keywords")||"",parent:e.getAttribute("data-parent")||""})).filter((e)=>e.id!=="")}itemElements(){return this.list?this.all(ot,this.list):[]}visibleItems(){return this.itemElements().filter((e)=>!e.hidden&&!e.disabled)}labelOf(e){return(e.querySelector(".stx-settings-item-label")?.textContent||e.getAttribute("aria-label")||e.textContent||"").trim()}items(){return this.itemElements().map((e)=>({id:e.getAttribute("data-settings-item")||"",label:this.labelOf(e),keywords:e.getAttribute("data-keywords")||""}))}rowElements(){return this.all(Lc).filter((e)=>this.paneOf(e)!=="")}paneOf(e){return e.closest(Ta)?.getAttribute("data-settings-pane")||""}stored(){if(!this.storageKey)return"";try{let e=we(this.storageKey);return(this.storage?this.storage.get(e):localStorage.getItem(e))||""}catch{return""}}store(){if(!this.storageKey||!this.current)return;try{let e=we(this.storageKey);if(this.storage)this.storage.set(e,this.current);else localStorage.setItem(e,this.current)}catch{}}describe(){let e=this.root.id,t=new Map;for(let s of this.itemElements()){let a=s.getAttribute("data-settings-item")||"";if(!s.id)s.id=`${e}-item-${$a(a)}`;s.setAttribute("role","tab"),t.set(a,s);for(let n=s.parentElement;n&&n!==this.list;n=n.parentElement)if(!n.hasAttribute("role"))n.setAttribute("role","presentation")}for(let s of this.paneElements()){let a=s.getAttribute("data-settings-pane")||"";if(!s.id)s.id=`${e}-pane-${$a(a)}`;let n=t.get(a);if(n)n.setAttribute("aria-controls",s.id),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",n.id),s.removeAttribute("aria-label");else if(this.title?.id){if(s.setAttribute("role","region"),!s.hasAttribute("aria-label"))s.setAttribute("aria-label",s.getAttribute("data-title")||a)}}}open(e){if(!e)return;this.history=Me(this.history,e),this.show()}travel(e){if(e===this.history)return;this.history=e,this.show()}show(){this.describe();let e=this.panes(),t=ue(this.history),s=U(e,t),a=this.paneElement(t);if(!s||!a)return;let n=document.activeElement,o=n instanceof HTMLElement&&this.paneElements().some((c)=>c!==a&&c.contains(n));for(let c of this.paneElements())c.hidden=c!==a,c.toggleAttribute("data-active",c===a);let i=Qe(e,t);for(let c of this.itemElements()){let l=c.getAttribute("data-settings-item")===i;c.setAttribute("aria-selected",l?"true":"false"),c.toggleAttribute("data-active",l)}if(this.syncTabStops(),this.title)this.title.textContent=s.title;this.root.setAttribute("data-pane",t),this.root.toggleAttribute("data-subpane",he(e,t)!==""),this.syncHistoryButtons(e);let r=t!==this.current;if(this.current=t,r){if(this.clearHighlight(),this.body)this.body.scrollTop=0;if(this.syncScrolled(),o){if(!a.hasAttribute("tabindex"))a.setAttribute("tabindex","-1");a.focus({preventScroll:!0})}this.store(),this.callbacks.onPane?.({id:t,title:s.title,parent:he(e,t)})}}syncTabStops(){let e=this.visibleItems(),t=e.find((s)=>s.getAttribute("aria-selected")==="true")??e[0];for(let s of this.itemElements())s.setAttribute("tabindex",s===t?"0":"-1")}syncHistoryButtons(e){let t=(n,o,i)=>{if(!n)return;let r=document.activeElement===n;if(n.disabled=!o,r&&!o&&i&&!i.disabled)i.focus()},s=tt(this.history,e),a=Re(this.history);if(s)t(this.backButton,!0,null),t(this.forwardButton,a,this.backButton);else t(this.forwardButton,a,null),t(this.backButton,!1,this.forwardButton)}syncScrolled(){this.root.toggleAttribute("data-scrolled",Boolean(this.body&&this.body.scrollTop>0))}applySearch(e){let t=this.rowElements(),s=t.map((i)=>({id:i.getAttribute("data-setting")||"",label:(i.getAttribute("data-label")||"").trim(),keywords:i.getAttribute("data-keywords")||"",pane:this.paneOf(i)})),a=nt(this.query,{panes:this.panes(),items:this.items(),rows:s}),n=a.query!=="";this.root.toggleAttribute("data-searching",n),this.field?.toggleAttribute("data-filled",this.query!=="");for(let i of this.itemElements())i.hidden=n&&!a.panes.includes(i.getAttribute("data-settings-item")||"");if(this.list){for(let i of this.all("[data-settings-group]",this.list))i.hidden=n&&this.all(ot,i).every((r)=>r.hidden);this.list.hidden=n&&a.panes.length===0}if(this.account)this.account.hidden=n;this.hits=a.settings.map((i)=>({hit:i,row:t[i.row]})),this.drawResults();let o=a.panes.length+a.settings.length;if(this.empty)this.empty.hidden=!n||o>0;if(this.live)this.live.textContent=n?va(o):"";if(this.syncTabStops(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:a.panes,settings:a.settings.map((i)=>({id:i.id,label:i.label,pane:i.pane}))})}drawResults(){let e=this.results;if(!e)return;e.replaceChildren(),e.hidden=this.hits.length===0,this.hits.forEach(({hit:t},s)=>{let a=document.createElement("button");a.type="button",a.className="stx-settings-result",a.setAttribute("data-settings-result",String(s)),a.setAttribute("tabindex","-1");let n=document.createElement("span");n.className="stx-settings-result-label",n.textContent=t.label;let o=document.createElement("span");o.className="stx-settings-result-pane",o.textContent=t.paneTitle,a.append(n,o),e.append(a)})}chooseResult(e){let t=this.hits[e];if(!t||!t.row.isConnected)return;this.open(t.hit.pane),this.reveal(t.row)}clearSearch(){if(this.query===""&&(!this.input||this.input.value===""))return;this.search("")}reveal(e){if(this.body){let t=this.body.getBoundingClientRect(),s=e.getBoundingClientRect();this.body.scrollTop+=s.top-t.top-(t.height-s.height)/2,this.syncScrolled()}this.clearHighlight(),e.setAttribute("data-highlight",""),this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);this.highlightTimer=null,this.highlighted?.removeAttribute("data-highlight"),this.highlighted=null}inside(e){return e instanceof Element&&e.closest(Ft)===this.root}navigationRow(e){let t=e.closest("[data-navigate]");if(!t||t.closest(Ft)!==this.root||t.getAttribute("aria-disabled")==="true")return null;let s=e.closest(Dc);if(s&&s!==t&&t.contains(s))return null;return t}navigate(e){let t=e.getAttribute("data-navigate")||"";if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:e.getAttribute("data-setting")||""})}onClick(e){let t=e.target;if(!this.inside(t))return;let s=t.closest(ot);if(s&&this.list?.contains(s)){this.open(s.getAttribute("data-settings-item")||"");return}let a=t.closest(Vt);if(a){this.chooseResult(Number(a.getAttribute("data-settings-result")));return}if(t.closest("[data-settings-back]")){this.back();return}if(t.closest("[data-settings-forward]")){this.forward();return}if(t.closest("[data-settings-search-clear]")){this.clearSearch(),this.input?.focus();return}let n=this.navigationRow(t);if(n)this.navigate(n)}onKeyDown(e){if(e.defaultPrevented)return;let t=(e.metaKey||e.ctrlKey)&&!e.altKey;if(t&&!e.shiftKey){let o=e.key.toLowerCase();if(o==="f"&&this.input){e.preventDefault(),this.focusSearch();return}if(o==="["){e.preventDefault(),this.back();return}if(o==="]"){e.preventDefault(),this.forward();return}}let s=e.target;if(!this.inside(s))return;if(e.key==="Escape"&&this.query!==""){e.preventDefault(),this.clearSearch(),this.visibleItems().find((o)=>o.getAttribute("tabindex")==="0")?.focus();return}if(s===this.input){this.onSearchKey(e);return}let a=s.closest(Vt);if(a){this.onResultKey(e,a);return}let n=s.closest(ot);if(n&&this.list?.contains(n)){this.onItemKey(e,n);return}if((e.key==="Enter"||e.key===" ")&&!t&&!e.altKey){let o=s.closest("[data-navigate]");if(o&&o===s&&this.navigationRow(s))e.preventDefault(),this.navigate(o)}}resultButtons(){return this.results?Array.from(this.results.querySelectorAll(Vt)):[]}onSearchKey(e){if(e.key==="ArrowDown"){let t=this.visibleItems()[0]??this.resultButtons()[0];if(t)e.preventDefault(),t.focus()}else if(e.key==="Enter"&&this.query.trim()!==""){e.preventDefault();let t=this.visibleItems()[0];if(t)this.open(t.getAttribute("data-settings-item")||"");else this.chooseResult(0)}}onResultKey(e,t){let s=this.resultButtons(),a=s.indexOf(t);if(e.key==="ArrowUp"&&a===0){let o=this.visibleItems(),i=o[o.length-1]??this.input;if(i)e.preventDefault(),i.focus();return}let n=zt(e.key,a,s.length);if(n===-1)return;e.preventDefault(),s[n].focus()}onItemKey(e,t){if(e.metaKey||e.ctrlKey||e.altKey)return;let s=this.visibleItems(),a=s.indexOf(t);if(e.key==="ArrowDown"&&a===s.length-1){let o=this.resultButtons()[0];if(o){e.preventDefault(),o.focus();return}}let n=zt(e.key,a,s.length);if(n===-1&&e.key.length===1&&(e.key!==" "||this.typed!==null)){let o=wa(this.typed,e.key,Date.now());if(e.key===" "&&o.buffer.trim()===""){this.typed=null;return}if(this.typed=o,n=ya(s.map((i)=>this.labelOf(i)),o.buffer,a),n===-1){e.preventDefault();return}}if(n===-1)return;e.preventDefault(),s[n].focus(),this.open(s[n].getAttribute("data-settings-item")||"")}}var Hc="./Sidebar-7rya9gcp.stx";var Vc="./SidebarFooter-s7skj92y.stx";var Bc="./SidebarHeader-x7jdhmyr.stx";var Kc="./SidebarItem-64sjb2fe.stx";var Wc="./SidebarPinned-48kyk193.stx";var Uc="./SidebarSection-vx5bahsk.stx";var Yc="./SidebarSpace-aac0byam.stx";var Zc="./SidebarSpaces-mdtrynr2.stx";var ed="./SidebarSpaceSwitcher-1mycft2g.stx";var it={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},fe={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}},td={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}},sd={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}},ad={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}},nd={...fe,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},od={...fe,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},id={...fe,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ea={macos:fe,tahoe:fe,"macos-tahoe":fe,"macos-latest":fe,arc:ad,workspace:td,desktop:sd,solid:nd,transparent:od,vibrancy:id};function Uv(e){return Ea[e||"macos"]||Ea.macos}function Jv(e){if(!e)return;return it[e]||e}var rd=it.gray;function ce(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ia(e){return{light:{from:ce(e,35,"#ffffff"),to:ce(e,12.5,"#ffffff"),ink:ce(e,22,"#17171b"),accent:ce(e,88,"#2a2a30")},dark:{from:ce(e,27,"#101014"),to:ce(e,10,"#08080b"),ink:ce(e,12,"#f4f4f7"),accent:ce(e,74,"#ffffff")}}}function Zv(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function ld(e){if(!e)return Ia(rd);if(typeof e!=="string")return e;return Ia(it[e]||e)}function cd(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 Aa(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function dd(e){let t=ld(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Aa(e.action,e.id,"action","i-f7-plus"),clear:Aa(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:cd(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function Qv(e){return(e||[]).map(dd)}function ew(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function tw(e){return e.map((t)=>t.tint)}var hd="./Skeleton-m4p66zcs.stx";var vw=101;function Se(e,t){let s=typeof e==="number"?e:Number.parseFloat(String(e));return Number.isFinite(s)?s:t}function ww(e,t,s){let a=Se(e,0),n=Se(t,100),o=Se(s,1);return{min:Math.min(a,n),max:Math.max(a,n),step:o>0?o:0}}function Pa(e){if(!Number.isFinite(e))return 0;let t=String(e).toLowerCase(),s=t.indexOf("e-");if(s!==-1)return Number.parseInt(t.slice(s+2),10)+Math.max(0,t.slice(0,s).split(".")[1]?.length??0);return t.split(".")[1]?.length??0}function me(e,t){let{min:s,max:a,step:n}=t,o=Math.min(a,Math.max(s,Se(e,s)));if(n<=0)return o;let i=Math.round((o-s)/n),r=Math.floor((a-s)/n+0.0000001);if(i>r)i=r;let c=Math.max(Pa(n),Pa(s));return Number((s+i*n).toFixed(Math.min(c,20)))}function yw(e,t){let s=t.max-t.min;if(s<=0)return 0;return(Math.min(t.max,Math.max(t.min,Se(e,t.min)))-t.min)/s}function kw(e,t){let s=Math.min(1,Math.max(0,Number.isFinite(e)?e:0));return me(t.min+s*(t.max-t.min),t)}function Sw(e,t){let s=t.max-t.min;if(s<=0||e===!1||e==null||e===""||e==="false")return[];if(e===!0||e==="true"){if(t.step<=0)return[];let n=Math.floor(s/t.step+0.0000001)+1;if(n<2||n>101)return[];return Array.from({length:n},(o,i)=>Math.min(1,i*t.step/s))}let a=Math.floor(Se(e,0));if(a<2||a>101)return[];return Array.from({length:a},(n,o)=>o/(a-1))}function Cw(e,t,s,a=10){let n=s.step>0?s.step:(s.max-s.min)/100;if(e==="ArrowRight"||e==="ArrowUp")return me(t+n,s);if(e==="ArrowLeft"||e==="ArrowDown")return me(t-n,s);if(e==="PageUp")return me(t+n*a,s);if(e==="PageDown")return me(t-n*a,s);if(e==="Home")return me(s.min,s);if(e==="End")return me(s.max,s);return null}var fd="./Slider-j59dgw1c.stx";var gd="./Spinner-vhnc3y03.stx";function xd(e){return Array.from({length:e},()=>1/e)}function rt(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((a)=>typeof a!=="number"||!Number.isFinite(a)||a<=0))return xd(t);let s=e.reduce((a,n)=>a+n,0);return e.map((a)=>a/s)}function Ma(e){let t=e;if(typeof e==="string"){let a=e.trim();if(a==="")return null;if(a.charAt(0)==="[")try{t=JSON.parse(a)}catch{return null}else t=a.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((a)=>typeof a==="string"?Number.parseFloat(a):a);return s.every((a)=>typeof a==="number"&&Number.isFinite(a)&&a>0)?s:null}function jt(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 Ra(e,t,s){let a=e.length;if(a===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),o=n.reduce((c,l)=>c+l,0);if(o>=t)return o===0?[...e]:n.map((c)=>c/o);let i=e.map((c)=>c*t);for(let c=0;c<=a;c++){let l=0;for(let p=0;p<a;p++){let u=Math.min(Math.max(i[p],n[p]),s[p].max);l+=i[p]-u,i[p]=u}if(Math.abs(l)<0.000000001)break;let d=i.map((p,u)=>l>0?s[u].max-p:p-n[u]),h=d.reduce((p,u)=>p+(Number.isFinite(u)?u:t),0);if(h<0.000000001)break;for(let p=0;p<a;p++){let u=(Number.isFinite(d[p])?d[p]:t)/h;i[p]+=l*u}}let r=i.reduce((c,l)=>c+l,0);return i.map((c)=>c/r)}function Bt(e,t,s,a,n){let o=e.length;if(t<0||t>=o-1||a<=0||s===0)return[...e];let i=e.map((p)=>p*a),r=s>0,c=r?t:t+1,l=r?1:-1,d=Math.min(Math.abs(s),n[c].max-i[c]);if(d<=0)return[...e];let h=0;for(let p=r?t+1:t;p>=0&&p<o&&d>0.000000001;p+=l){let u=Math.min(d,Math.max(0,i[p]-Math.max(0,n[p].min)));i[p]-=u,h+=u,d-=u}return i[c]+=h,i.map((p)=>p/a)}function lt(e,t,s,a){let n=e.map((i)=>i*s),o=(i,r)=>{let c=0;for(let l=i;l<=r;l++)c+=Math.max(0,n[l]-Math.max(0,a[l].min));return c};return{back:Math.min(o(0,t),a[t+1].max-n[t+1]),forward:Math.min(o(t+1,e.length-1),a[t].max-n[t])}}function Na(e,t,s,a){let n=lt(e,t,s,a),o=e[t]*100,i=s>0?100/s:0;return{now:Math.round(o),min:Math.round(o-n.back*i),max:Math.round(o+n.forward*i)}}function _t(e){return`stx:split-pane:${e}`}function La(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var vd="./SplitPane-7sqfdwqa.stx";var Da="data-split-separator";class wd{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=rt(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=rt(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 a of this.separators){let n=a.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(Da)),this.limits=this.panes.map((e)=>({min:jt(e.getAttribute("data-min-size"),this.minSize),max:jt(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((a)=>Number.parseFloat(a.getAttribute("data-size")||"")),s=t.every((a)=>Number.isFinite(a)&&a>0)?t:null;return rt(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=Ma(localStorage.getItem(_t(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(_t(this.storageKey),La(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 a=document.createElement("div");a.setAttribute(Da,""),a.setAttribute("role","separator"),a.setAttribute("tabindex","0"),a.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),a.setAttribute("aria-controls",t.id),a.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),a.className="stx-split-separator",t.after(a),this.separators.push(a);let n=(o,i)=>{a.addEventListener(o,i),this.disposers.push(()=>a.removeEventListener(o,i))};n("pointerdown",(o)=>this.onPointerDown(o,s)),n("pointermove",(o)=>this.onPointerMove(o)),n("pointerup",(o)=>this.onPointerEnd(o)),n("pointercancel",(o)=>this.onPointerEnd(o)),n("dblclick",()=>this.reset(s)),n("keydown",(o)=>this.onKeyDown(o,s))})}apply(e){let t=this.available();if(t>0)this.sizes=Ra(this.sizes,t,this.limits);if(this.panes.forEach((s,a)=>{s.style.flex=`${(this.sizes[a]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,a)=>{let n=Na(this.sizes,a,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 a=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((o)=>Math.round(o*a)),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=Bt(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",a=this.available(),n=this.step*(e.shiftKey?5:1),o=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))o=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))o=n;else if(e.key==="Home")o=-lt(this.sizes,t,a,this.limits).back;else if(e.key==="End")o=lt(this.sizes,t,a,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=Bt(this.sizes,t,o,a,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var kd="./Stepper-68gxcmej.stx";var Cd="./StepperStep-zf4pq1s0.stx";class ct{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 a=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((o)=>o(n,a,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 a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],n="";for(let o=0;o<e.length;o++){let i=e.charAt(o),r=n+i;if(t[r]!==void 0)n=r;else a.push(n.length>1?t[n]:n.charCodeAt(0)),t[r]=s++,n=i}if(n!=="")a.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,n=String.fromCharCode(t[0]),o=n;for(let i=1;i<t.length;i++){let r=t[i],c;if(s[r]!==void 0)c=s[r];else if(r===a)c=n+n.charAt(0);else return e;o+=c,s[a++]=n+c.charAt(0),n=c}return o}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),n=this.get(e),o={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let i=JSON.stringify(o);if(s?.compress)i=this.compress(i);if(s?.encrypt)i=this.encrypt(i);this.storage.setItem(a,i),this.notifyWatchers(e,t,n)}catch(i){console.error("Storage set error:",i)}}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 a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.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 a=this.watchers.get(e);if(a)a.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 a=this.storage.key(s);if(a){let n=this.storage.getItem(a)||"";e+=a.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,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Ww={local:new ct("local"),session:new ct("session")};function Gw(e="local",t){return new ct(e,t)}var $d="./Switch-vd8k23sr.stx";var Id="./Table-0a4y46vd.stx";var Pd="./TableBody-y49bqb1p.stx";var Rd="./TableCell-jhvsxw8b.stx";var Ld="./TableHead-e9xvjx2j.stx";var Od="./TableHeader-krzcx4sv.stx";var Hd="./TableRow-dt8e11aj.stx";var Vd="./Tab-j9f4t166.stx";var Bd="./TabList-r1pc87xs.stx";var Kd="./TabPanel-5htevsq6.stx";var Wd="./Tabs-psm5wj7c.stx";var Ud="./Teleport-vqs75x36.stx";var Yd="./Textarea-bb63fsz0.stx";var Zd="./AiTextarea-bg6xq5wc.stx";var ep="./Tooltip-68ka4jw7.stx";var sp="./Transition-7m0mk45s.stx";var np="./Video-bqsx3wr8.stx";var ip="./VirtualList-fa7v5a3h.stx";var lp="./VirtualTable-kp7b3wyv.stx";var cp=0;function Oa(e="a11y"){return`${e}-${++cp}-${Date.now()}`}function _y(e,t,s={}){let{visible:a=!1,id:n=Oa("label")}=s,o=document.createElement(a?"label":"span");if(o.id=n,o.textContent=e,!a)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"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return n}function Ky(e,t){let s=Oa("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,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"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function qy(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 Kt(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 Wy(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:n=!0,clickOutsideDeactivates:o=!0,allowOutsideClick:i=!1,onActivate:r,onDeactivate:c}=t,l=!1,d=!1,h=null,p=(v)=>{if(d)return;if(n&&v.key==="Escape"){v.preventDefault(),m();return}if(v.key==="Tab"){let b=Kt(e);if(b.length===0){v.preventDefault();return}let C=b[0],P=b[b.length-1];if(v.shiftKey){if(document.activeElement===C)v.preventDefault(),P.focus()}else if(document.activeElement===P)v.preventDefault(),C.focus()}},u=(v)=>{if(d)return;if(!e.contains(v.target)){if(typeof i==="function"){if(!i(v)&&o)m()}else if(!i&&o)m()}};function g(){if(l)return;l=!0,h=document.activeElement;let v=s||Kt(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",p),document.addEventListener("click",u),r?.()}function m(){if(!l)return;l=!1;let v=a||h;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",p),document.removeEventListener("click",u),c?.()}function w(){d=!0}function y(){d=!1}return{activate:g,deactivate:m,pause:w,unpause:y}}function Gy(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:n="both",loop:o=!0,onFocusChange:i}=t,r=a,c=()=>Array.from(e.querySelectorAll(s)),l=(h)=>{let p=c();if(h<0||h>=p.length)return;p.forEach((u,g)=>{if(g===h){if(u.setAttribute("tabindex","0"),typeof u.focus==="function")u.focus()}else u.setAttribute("tabindex","-1")}),r=h,i?.(h,p[h])},d=(h)=>{let u=c().length-1,g=!1,m=r;switch(h.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=r+1,m>u)m=o?0:u;g=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=r-1,m<0)m=o?u:0;g=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=r+1,m>u)m=o?0:u;g=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=r-1,m<0)m=o?u:0;g=!0}break;case"Home":m=0,g=!0;break;case"End":m=u,g=!0;break}if(g)h.preventDefault(),l(m)};return l(a),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var Uy={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Jy(e){return document.activeElement===e}function Yy(e,t){let s=t||document.activeElement,a=Kt(document.body),n=a.indexOf(s);if(n===-1)return;let o=e==="next"?n+1:n-1,i=a[o];if(i)i.focus()}function Xy(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 Zy={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 Qy(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 e0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function t0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function s0(){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 a0(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 n0(e){let t=[],s=(a)=>{let n=e.getAttribute(a);if(n){let o=n.split(" ");for(let i of o)if(!document.getElementById(i))t.push(`${a} references non-existent ID: ${i}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var dp=(e,t,s,a)=>s*e/a+t,pp=(e,t,s,a)=>(e/=a,s*e*e+t),hp=(e,t,s,a)=>(e/=a,-s*e*(e-2)+t),up=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},fp=(e,t,s,a)=>(e/=a,s*e*e*e+t),mp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e+1)+t),gp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},xp=(e,t,s,a)=>(e/=a,s*e*e*e*e+t),bp=(e,t,s,a)=>(e/=a,e--,-s*(e*e*e*e-1)+t),vp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},wp=(e,t,s,a)=>(e/=a,s*e*e*e*e*e+t),yp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e*e*e+1)+t),kp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Sp=(e,t,s,a)=>-s*Math.cos(e/a*(Math.PI/2))+s+t,Cp=(e,t,s,a)=>s*Math.sin(e/a*(Math.PI/2))+t,Tp=(e,t,s,a)=>-s/2*(Math.cos(Math.PI*e/a)-1)+t,$p=(e,t,s,a)=>e===0?t:s*2**(10*(e/a-1))+t,Ep=(e,t,s,a)=>e===a?t+s:s*(-(2**(-10*e/a))+1)+t,Ip=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Ap=(e,t,s,a)=>(e/=a,-s*(Math.sqrt(1-e*e)-1)+t),Pp=(e,t,s,a)=>(e/=a,e--,s*Math.sqrt(1-e*e)+t),Mp=(e,t,s,a)=>{if(e/=a/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},Rp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return e-=1,-(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t},Np=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)+s+t},Lp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!o)o=a*0.44999999999999996;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);if(e<1)return e-=1,-0.5*(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t;return e-=1,i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)*0.5+s+t},Dp=(e,t,s,a)=>(e/=a,s*e*e*(2.70158*e-1.70158)+t),Op=(e,t,s,a)=>(e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),zp=(e,t,s,a)=>{let n=1.70158;if(e/=a/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},qt=(e,t,s,a)=>{if(e/=a,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},za=(e,t,s,a)=>s-qt(a-e,0,s,a)+t,Hp=(e,t,s,a)=>{if(e<a/2)return za(e*2,0,s,a)*0.5+t;return qt(e*2-a,0,s,a)*0.5+s*0.5+t},i0={linear:dp,easeInQuad:pp,easeOutQuad:hp,easeInOutQuad:up,easeInCubic:fp,easeOutCubic:mp,easeInOutCubic:gp,easeInQuart:xp,easeOutQuart:bp,easeInOutQuart:vp,easeInQuint:wp,easeOutQuint:yp,easeInOutQuint:kp,easeInSine:Sp,easeOutSine:Cp,easeInOutSine:Tp,easeInExpo:$p,easeOutExpo:Ep,easeInOutExpo:Ip,easeInCirc:Ap,easeOutCirc:Pp,easeInOutCirc:Mp,easeInElastic:Rp,easeOutElastic:Np,easeInOutElastic:Lp,easeInBack:Dp,easeOutBack:Op,easeInOutBack:zp,easeInBounce:za,easeOutBounce:qt,easeInOutBounce:Hp};function Fp(e,t={}){let{duration:s="1s",timing:a="ease",delay:n="0s",iteration:o="1",direction:i="normal",fill:r="both",playState:c="running"}=t;return`${e} ${s} ${a} ${n} ${o} ${i} ${r} ${c}`}function Ha(e,t,s={}){e.style.animation=Fp(t,s)}function l0(e){e.style.animation=""}function Vp(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function c0(e,t,s={}){let{stagger:a=100,...n}=s;e.forEach((o,i)=>{let r=`${i*a}ms`;Ha(o,t,{...n,delay:r})})}async function d0(e,t){for(let s of t)Ha(e,s.name,s.options),await Vp(e)}var p0={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 h0(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function u0(e,t){let s=`
13
+ `}function $s(e,t,s,a,n=0){if(a<=0||s<=0)return{start:0,end:0};let o=Math.floor(Math.max(0,e)/s),i=Math.ceil((Math.max(0,e)+Math.max(0,t))/s),r=Math.min(a,Math.max(0,o-n));return{start:r,end:Math.max(r,Math.min(a,i+n))}}function Ts(e,t,s){let a=s.rows-1,n=Math.max(0,s.columns-1),o=Math.max(1,s.page),{row:i,column:r}=e;switch(t){case"ArrowUp":i=Math.max(-1,i-1);break;case"ArrowDown":i=Math.min(a,i+1);break;case"ArrowLeft":r-=1;break;case"ArrowRight":r+=1;break;case"PageUp":i=i<=0?i:Math.max(0,i-o);break;case"PageDown":i=Math.min(a,Math.max(0,i)+(i<0?0:o));break;case"Home":if(r=0,s.mod)i=Math.min(0,a);break;case"End":if(r=n,s.mod)i=a;break;default:return e}return{row:Math.max(-1,Math.min(a,i)),column:Math.max(0,Math.min(n,r))}}function ai(e,t,s=!1){let a=e.find((o)=>o.key===t),n=!a?{key:t,direction:"asc"}:a.direction==="asc"?{key:t,direction:"desc"}:null;if(!s)return n?[n]:[];if(!a)return[...e,n];return n?e.map((o)=>o.key===t?n:o):e.filter((o)=>o.key!==t)}var ws=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});class $t{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((a)=>a.key===e);if(!s||!s.sortable)return this.sort;return this.sort=ai(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],a=this.rowAt(e);return s&&a!==void 0?ne(a,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 si(this.viewRows(),this.columns)}toJson(){return ti(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 a=Math.min(this.anchor,e),n=Math.max(this.anchor,e);this.selected.clear();for(let o=a;o<=n&&o<this.view.length;o++)this.selected.add(this.view[o]);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,a=t-1;while(s<a){let n=s+a+1>>1;if(this.offsets[n]<=e)s=n;else a=n-1}return s}columnRange(e,t,s=0){let a=this.columns.length;if(a===0)return{start:0,end:0};let n=this.columnAt(Math.max(0,e)),o=this.columnAt(Math.max(0,e)+Math.max(0,t));return{start:Math.max(0,n-s),end:Math.min(a,o+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 a=s.label.length+3,n=Math.min(this.view.length,t);for(let i=0;i<n;i++){let r=Ie(ne(this.rows[this.view[i]],s),s.type).length;if(r>a)a=r}let o=Math.ceil(a*this.charWidth+this.cellPadding);return Math.max(s.minWidth,Math.min(s.maxWidth,420,o))}forget(){this.searchText=null,this.sortKeys.clear()}resolveColumns(){let e=this.given??ei(this.rows),t=Math.min(this.rows.length,200),s=this.view;this.view=new Uint32Array(t);for(let a=0;a<t;a++)this.view[a]=a;this.columns=e.map((a)=>{let n=a.type;if(!n){let o=[];for(let i=0;i<t;i++)o.push(ne(this.rows[i],a));n=Qo(o)}return{...a,label:a.label??a.key,type:n,width:a.width??0,minWidth:a.minWidth??48,maxWidth:a.maxWidth??2000,align:a.align??(n==="number"?"right":"left"),sortable:a.sortable!==!1}}),this.columns.forEach((a,n)=>{if(!a.width)a.width=this.autoWidth(n);a.width=Math.max(a.minWidth,Math.min(a.maxWidth,a.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 a=0;a<e.length;a++){let n=e[a],o="";for(let i=0;i<t.length;i++){let r=ne(n,t[i]);if(r===null||r===void 0)continue;o+=typeof r==="string"?r:Ie(r,t[i].type),o+="\x01"}s[a]=o.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 a=0;a<e;a++)s[a]=a;this.filtered=s}else{let s=this.searchable(),a=new Uint32Array(e),n=0,o=t.length===1?t[0]:null;for(let i=0;i<e;i++){let r=s[i];if(o!==null){if(r.includes(o))a[n++]=i;continue}let c=!0;for(let l=0;l<t.length;l++)if(!r.includes(t[l])){c=!1;break}if(c)a[n++]=i}this.filtered=a.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,a=new Float64Array(s.length);if(e.type==="number"||e.type==="date"||e.type==="boolean")for(let n=0;n<s.length;n++){let o=ne(s[n],e),i=Number.NaN;if(o===null||o===void 0||o==="")i=Number.NaN;else if(typeof o==="number")i=o;else if(typeof o==="boolean")i=o?1:0;else if(o instanceof Date)i=o.getTime();else if(e.type==="date")i=Date.parse(String(o));else if(e.type==="boolean")i=String(o).toLowerCase()==="true"?1:0;else i=Number(o);a[n]=i}else{let n=Array.from({length:s.length}),o=new Map;for(let c=0;c<s.length;c++){let l=ne(s[c],e);if(l===null||l===void 0){n[c]=null;continue}let d=typeof l==="string"?l:Ie(l,e.type);if(n[c]=d,!o.has(d))o.set(d,0)}let i=[...o.keys()].sort(ws.compare),r=0;for(let c=0;c<i.length;c++){if(c>0&&ws.compare(i[c-1],i[c])!==0)r++;o.set(i[c],r)}for(let c=0;c<s.length;c++){let l=n[c];a[c]=l===null?Number.NaN:o.get(l)}}return this.sortKeys.set(e.key,a),a}resort(){let e=[];for(let s of this.sort){let a=this.columns.find((n)=>n.key===s.key);if(a)e.push({keys:this.keysFor(a),sign:s.direction==="desc"?-1:1})}let t=this.filtered.slice();if(e.length===1){let{keys:s,sign:a}=e[0];t.sort((n,o)=>{let i=s[n],r=s[o];if(i<r)return-a;if(i>r)return a;if(i===r)return n-o;let c=i!==i;return c===(r!==r)?n-o:c?1:-1})}else if(e.length>1)t.sort((s,a)=>{for(let n=0;n<e.length;n++){let o=e[n].keys[s],i=e[n].keys[a];if(o<i)return-e[n].sign;if(o>i)return e[n].sign;if(o===i)continue;let r=o!==o;if(r!==(i!==i))return r?1:-1}return s-a});this.view=t}}var oi="./DataGrid-7rt7v865.stx";var ii=120,Ke=new Intl.NumberFormat("en-US");function re(e,t){return e.querySelector(`[data-dg="${t}"]`)}function ri(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 a=document.activeElement;s.select();try{document.execCommand("copy")}catch{}s.remove(),a?.focus({preventScroll:!0})};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")navigator.clipboard.writeText(e).catch(t);else t()}class li{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 a=re(e,"scroller"),n=re(e,"content"),o=re(e,"header"),i=re(e,"body");if(!a||!n||!o||!i)throw Error("DataGridView: the root is missing its scroller, content, header or body");if(this.scroller=a,this.content=n,this.header=o,this.body=i,this.status=re(e,"status"),this.filterInput=re(e,"filter"),this.prefix=a.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 $t(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",(l)=>this.onKeyDown(l)),this.listen(this.body,"click",(l)=>this.onBodyClick(l)),this.listen(this.body,"dblclick",(l)=>this.onBodyDoubleClick(l)),this.listen(this.body,"contextmenu",(l)=>this.onContextMenu(l)),this.listen(this.header,"click",(l)=>this.onHeaderClick(l)),this.listen(this.header,"dblclick",(l)=>this.onHeaderDoubleClick(l)),this.listen(this.header,"pointerdown",(l)=>this.onResizeStart(l)),this.listen(this.header,"pointermove",(l)=>this.onResizeMove(l)),this.listen(this.header,"pointerup",(l)=>this.onResizeEnd(l)),this.listen(this.header,"pointercancel",(l)=>this.onResizeEnd(l)),this.filterInput)this.listen(this.filterInput,"input",()=>this.onFilterInput());let r=re(e,"export-csv"),c=re(e,"export-json");if(r)this.listen(r,"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"}),a=URL.createObjectURL(s),n=document.createElement("a");return n.href=a,n.download=`${this.fileName}.${e}`,n.style.display="none",this.root.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(a),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=$s(t.scrollTop,Math.max(0,t.clientHeight-this.headerHeight),this.rowHeight,e.count,this.overscan),a=e.columnRange(t.scrollLeft,t.clientWidth,this.columnOverscan),n=this.stale||a.start!==this.cols.start||a.end!==this.cols.end;if(!n&&s.start===this.rows.start&&s.end===this.rows.end)return;if(this.rows=s,this.cols=a,n)this.renderHeader();for(let[o,i]of this.slots)if(o<s.start||o>=s.end)this.slots.delete(o),i.index=-1,i.el.style.display="none",this.pool.push(i);for(let o=s.start;o<s.end;o++){let i=this.slots.get(o);if(i){if(n)this.fill(i);continue}i=this.pool.pop()??this.createSlot(),i.index=o,i.el.style.display="",this.slots.set(o,i),this.fill(i)}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,a=t.rowAt(s),n=this.selectable&&t.isSelected(s),o=e.el;if(o.__dgRow=s,o.style.transform=`translateY(${s*this.rowHeight}px)`,o.setAttribute("aria-rowindex",String(s+2)),this.selectable)o.setAttribute("aria-selected",n?"true":"false");let i=this.cols.end-this.cols.start;while(e.cells.length<i){let r=document.createElement("div");r.className="stx-dg-cell",r.setAttribute("role","gridcell"),r.appendChild(document.createTextNode("")),o.appendChild(r),e.cells.push(r)}while(e.cells.length>i)e.cells.pop().remove();for(let r=0;r<i;r++){let c=this.cols.start+r,l=t.columns[c],d=e.cells[r],u=a===void 0?void 0:ne(a,l),p=ys(u);if(d.__dgColumn=c,d.id=`${this.prefix}-r${s}-c${c}`,d.style.left=`${t.offsetOf(c)}px`,d.style.width=`${l.width}px`,d.setAttribute("aria-colindex",String(c+1)),d.setAttribute("data-type",l.type),d.setAttribute("data-align",l.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:Ie(u,l.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 a=document.createElement("span");a.className="stx-dg-head-label",a.appendChild(document.createTextNode(""));let n=document.createElement("span");n.className="stx-dg-sort",n.setAttribute("aria-hidden","true"),n.appendChild(document.createTextNode(""));let o=document.createElement("span");o.className="stx-dg-resize",o.setAttribute("aria-hidden","true"),s.append(a,n,o),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 a=this.cols.start+s,n=e.columns[a],o=this.headerCells[s],i=e.sortOf(n.key);if(o.__dgColumn=a,o.id=`${this.prefix}-h-c${a}`,o.style.left=`${e.offsetOf(a)}px`,o.style.width=`${n.width}px`,o.setAttribute("aria-colindex",String(a+1)),o.setAttribute("data-align",n.align),o.toggleAttribute("data-sortable",n.sortable),n.sortable)o.setAttribute("aria-sort",i?i.direction==="asc"?"ascending":"descending":"none");else o.removeAttribute("aria-sort");o.children[0].firstChild.data=n.label,o.children[1].firstChild.data=i?`${i.direction==="asc"?"\u25B2":"\u25BC"}${e.sort.length>1?i.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 a of t.cells)a.setAttribute("aria-selected",s)}this.paintStatus()}paintStatus(){if(!this.status)return;let e=this.model,t=e.rows.length,s=e.count===t?`${Ke.format(t)} ${t===1?"row":"rows"}`:`${Ke.format(e.count)} of ${Ke.format(t)} rows`;if(e.selected.size>0)s+=`, ${Ke.format(e.selected.size)} selected`;if(this.status.textContent!==s)this.status.textContent=s}revealRow(e){let t=this.scroller,s=e*this.rowHeight,a=t.clientHeight-this.headerHeight;if(s<t.scrollTop)t.scrollTop=s;else if(s+this.rowHeight>t.scrollTop+a)t.scrollTop=s+this.rowHeight-a}revealColumn(e){let t=this.scroller,s=this.model.offsetOf(e),a=this.model.offsetOf(e+1);if(s<t.scrollLeft)t.scrollLeft=s;else if(a>t.scrollLeft+t.clientWidth)t.scrollLeft=Math.min(s,a-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,a={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=a,a.row>=0)this.revealRow(a.row);if(this.revealColumn(a.column),this.render(),this.paintActive(),t)this.callbacks.onCell?.(this.detail(a))}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 a=this.model.toggleSort(s.key,t);this.refresh(),this.callbacks.onSort?.([...a])}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"?Cs(t,this.model.columns):ks(this.model.valueAt(this.active.row,this.active.column));ri(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"),a=s?.parentElement;if(!s||!a||s.__dgColumn===void 0||a.__dgRow===void 0)return null;return{row:a.__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 a=t.closest(".stx-dg-resize");return{column:s.__dgColumn,onHandle:Boolean(a),handle:a}}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:"")},ii)}onKeyDown(e){if(e.target!==this.scroller)return;let t=this.model,s=e.metaKey||e.ctrlKey,a=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(a)return;e.preventDefault(),this.copy(e.shiftKey?"row":"cell");return}if(a&&e.altKey&&(n==="ArrowLeft"||n==="ArrowRight")){e.preventDefault();let r=t.columns[this.active.column];if(r)this.setColumnWidth(this.active.column,r.width+(n==="ArrowRight"?this.resizeStep:-this.resizeStep));this.paintActive();return}if(n==="Enter"||n===" "){if(e.preventDefault(),a){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 r=t.rowAt(this.active.row);if(r!==void 0)this.callbacks.onActivate?.({row:r,rowIndex:this.active.row});return}if(n==="Escape"&&this.selectable&&t.selected.size>0){e.preventDefault(),this.clearSelection();return}let o=Math.max(1,Math.floor((this.scroller.clientHeight-this.headerHeight)/this.rowHeight)-1),i=Ts(this.active,n,{rows:t.count,columns:t.columns.length,page:o,mod:s});if(i===this.active)return;if(e.preventDefault(),i.row===this.active.row&&i.column===this.active.column)return;if(e.shiftKey&&this.selectable&&i.row>=0&&i.row!==this.active.row){if(t.selected.size===0&&this.active.row>=0)t.select(this.active.row,"replace");t.select(i.row,"range"),this.paintSelection(),this.reportSelection()}this.moveTo(i)}}var di="./Dialog-wm7zjqnb.stx";var ui="./DialogBackdrop-de5m5m4w.stx";var fi="./DialogDescription-yd2jgt2m.stx";var gi="./DialogPanel-v972ztcc.stx";var bi="./DialogTitle-nw0pw114.stx";var wi="./Drawer-d78cdr6d.stx";var ki="./Dropdown-hb8ks69x.stx";var Ci="./DropdownButton-wxc25hsy.stx";var Ti="./DropdownItem-af0vzc8a.stx";var Ii="./DropdownItems-bkz7jkyz.stx";var Pi="./Form-cybgg9ym.stx";var Mi={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},cg=ae("Form",Mi);var Ni="./FileDrop-p9wqdx75.stx";var Es=(e)=>Math.round(e*100)/100,Q=(e)=>`${Es(e.x)} ${Es(e.y)}`;function Is(e,t,s){let a=s.x-e.x,n=s.y-e.y;if(a===0&&n===0)return{x:e.x,y:e.y};let o=a===0?Number.POSITIVE_INFINITY:t.width/2/Math.abs(a),i=n===0?Number.POSITIVE_INFINITY:t.height/2/Math.abs(n),r=Math.min(o,i);return{x:e.x+a*r,y:e.y+n*r}}function As(e,t,s){let a=e.x-t.x,n=e.y-t.y,o=Math.sqrt(a*a+n*n);if(s<=0||o<=s)return e;return{x:e.x-a/o*s,y:e.y-n/o*s}}function Li(e,t,s=0){let a=26+Math.abs(s),n={x:e.x+t.width/4,y:e.y-t.height/2},o={x:e.x+t.width/2,y:e.y-t.height/4},i={x:n.x,y:n.y-a},r={x:o.x+a,y:o.y};return{d:`M ${Q(n)} C ${Q(i)}, ${Q(r)}, ${Q(o)}`,start:n,end:o,label:Ps(n,i,r,o,0.5),angle:Math.atan2(o.y-r.y,o.x-r.x)}}function Ps(e,t,s,a,n){let o=1-n;return{x:o*o*o*e.x+3*o*o*n*t.x+3*o*n*n*s.x+n*n*n*a.x,y:o*o*o*e.y+3*o*o*n*t.y+3*o*n*n*s.y+n*n*n*a.y}}function Ms(e,t={}){let{source:s,sourceSize:a,target:n,targetSize:o}=e,i=t.offset??0,r=t.inset??0;if(s.x===n.x&&s.y===n.y)return Li(s,a,i);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*a.width/2,y:s.y}:{x:s.x,y:s.y+y*a.height/2},b=w?{x:n.x-y*o.width/2,y:n.y}:{x:n.x,y:n.y-y*o.height/2},C=Math.abs(w?b.x-v.x:b.y-v.y),P=Math.max(C/2,24)*y,T=w?{x:b.x-y*r,y:b.y}:{x:b.x,y:b.y-y*r},F=w?{x:v.x+P,y:v.y+i}:{x:v.x+i,y:v.y+P},V=w?{x:T.x-P,y:T.y+i}:{x:T.x+i,y:T.y-P};return{d:`M ${Q(v)} C ${Q(F)}, ${Q(V)}, ${Q(T)}`,start:v,end:T,label:Ps(v,F,V,T,0.5),angle:Math.atan2(T.y-V.y,T.x-V.x)}}let c=Is(s,a,n),l=Is(n,o,s);if(i===0){let w=As(l,c,r);return{d:`M ${Q(c)} L ${Q(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+l.x)/2+-p/h*i*2,y:(c.y+l.y)/2+u/h*i*2},m=As(l,g,r);return{d:`M ${Q(c)} Q ${Q(g)}, ${Q(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 Rs(e,t=14){let s=new Map;for(let n of e){let o=n.source<n.target?`${n.source}\x00${n.target}`:`${n.target}\x00${n.source}`,i=s.get(o);if(i)i.push(n);else s.set(o,[n])}let a=new Map;for(let n of s.values()){if(n.length<2)continue;n.forEach((o,i)=>{let r=(i-(n.length-1)/2)*t;a.set(o.id,o.source===o.target?i*t:r)})}return a}var Tt={charWidth:7,paddingX:12,minWidth:48,maxWidth:220,height:32,detailHeight:14};function oe(e){return e.label==null||e.label===""?e.id:String(e.label)}function Ns(e){return e.id!=null&&e.id!==""?String(e.id):`${e.source}->${e.target}${e.label?`:${e.label}`:""}`}function Ls(e,t=Tt){let s=Math.max(oe(e).length,e.detail?e.detail.length*0.85:0),a=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+a)),height:t.height+(e.detail?t.detailHeight:0)}}function Ds(e=Tt){return Math.floor((e.maxWidth-e.paddingX*2)/e.charWidth)}function We(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}class Ge{metrics;nodeMap=new Map;edgeMap=new Map;incident=new Map;sizes=new Map;constructor(e=[],t=[],s=Tt){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,Ls(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 a=Ns({...e,source:t,target:s});if(this.edgeMap.has(a))return!1;return this.edgeMap.set(a,{...e,id:a,source:t,target:s}),this.incident.get(t).add(a),this.incident.get(s).add(a),!0}updateNode(e,t){let s=this.nodeMap.get(e);if(!s)return!1;let a={...s,...t,id:e};return this.nodeMap.set(e,a),this.sizes.set(e,Ls(a,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 a of e)if(this.addNode(a))s.nodes.push(String(a.id));for(let a of t)if(this.addEdge(a))s.edges.push(Ns({...a,source:String(a.source),target:String(a.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 a=s.source===e?s.target:s.source;if(a!==e)t.add(a)}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:a,NEGATIVE_INFINITY:n}=Number;for(let[o,i]of e){if(!this.nodeMap.has(o))continue;let r=this.size(o);t=Math.min(t,i.x-r.width/2),a=Math.max(a,i.x+r.width/2),s=Math.min(s,i.y-r.height/2),n=Math.max(n,i.y+r.height/2)}return Number.isFinite(t)?{x:t,y:s,width:a-t,height:n-s}:null}}function Os(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 Di=0.15,zs=0.06;function Hs(e,t={}){let s=e.nodes,a=s.length,n=new Map;if(a===0)return n;let o=t.linkDistance??90,i=t.padding??16,r=Os(t.seed??1),c=t.positions??null,l=new Set(t.pinned??[]),d=new Map(s.map((R,N)=>[R.id,N])),u=new Float64Array(a),p=new Float64Array(a),h=new Float64Array(a),g=new Float64Array(a),m=new Uint8Array(a),w=new Uint8Array(a),y=new Float64Array(a).fill(1),v=0;s.forEach((R,N)=>{let E=e.size(R.id);h[N]=E.width/2,g[N]=E.height/2;let M=c?.get(R.id);if(M&&Number.isFinite(M.x)&&Number.isFinite(M.y))u[N]=M.x,p[N]=M.y,w[N]=1,m[N]=l.has(R.id)?1:0,y[N]=0,v++});let b=o*Math.sqrt(a)*0.6;s.forEach((R,N)=>{if(w[N])return;let E=e.neighbours(R.id).map((k)=>d.get(k)).find((k)=>w[k]),M=r()*Math.PI*2;if(E!==void 0)u[N]=u[E]+Math.cos(M)*o*0.5,p[N]=p[E]+Math.sin(M)*o*0.5;else{let k=Math.sqrt(r())*b;u[N]=Math.cos(M)*k,p[N]=Math.sin(M)*k}});let C=Uint8Array.from(w),P=v>0,T=Math.max(0,t.iterations??(P?80:300)),F=[],V=new Set;for(let R of e.edges){let N=d.get(R.source),E=d.get(R.target);if(N===E)continue;let M=N<E?N*a+E:E*a+N;if(!V.has(M))V.add(M),F.push(N,E)}let j=new Float64Array(a),x=new Float64Array(a),S=o,L=P?S*0.5:S*1.5;for(let R=0;R<T;R++){let N=L*(1-R/T);j.fill(0),x.fill(0);for(let E=0;E<a;E++)for(let M=E+1;M<a;M++){if(C[E]&&C[M])continue;let k=u[E]-u[M],O=p[E]-p[M],D=Math.sqrt(k*k+O*O);if(D<0.01){let q=(E*31+M*17)%360*Math.PI/180;k=Math.cos(q)*0.01,O=Math.sin(q)*0.01,D=0.01}let Y=Math.max(1,D-(h[E]+h[M])*0.5),H=S*S*Di/Y/D;j[E]+=k*H,x[E]+=O*H,j[M]-=k*H,x[M]-=O*H}for(let E=0;E<F.length;E+=2){let M=F[E],k=F[E+1];if(C[M]&&C[k])continue;let O=u[M]-u[k],D=p[M]-p[k],Y=Math.sqrt(O*O+D*D)||0.01,H=(h[M]+h[k])*0.5,q=Math.max(0,Y-H),te=q*q/S/Y;j[M]-=O*te,x[M]-=D*te,j[k]+=O*te,x[k]+=D*te}for(let E=0;E<a;E++){if(m[E])continue;if(!C[E])j[E]-=u[E]*zs,x[E]-=p[E]*zs;let M=Math.sqrt(j[E]*j[E]+x[E]*x[E]);if(M>0){let k=Math.min(M,N)/M*y[E];u[E]+=j[E]*k,p[E]+=x[E]*k}}}return Oi(u,p,h,g,m,i),s.forEach((R,N)=>{n.set(R.id,{x:Math.round(u[N]*100)/100,y:Math.round(p[N]*100)/100})}),n}function Oi(e,t,s,a,n,o){let i=e.length;for(let r=0;r<40;r++){let c=!1;for(let l=0;l<i;l++)for(let d=l+1;d<i;d++){let u=s[l]+s[d]+o-Math.abs(e[l]-e[d]);if(u<=0)continue;let p=a[l]+a[d]+o-Math.abs(t[l]-t[d]);if(p<=0)continue;if(n[l]&&n[d])continue;c=!0;let h=n[l]?0:n[d]?1:0.5,g=1-h;if(u<p){let m=e[l]<e[d]||e[l]===e[d]&&l<d?-1:1;e[l]+=m*u*h,e[d]-=m*u*g}else{let m=t[l]<t[d]||t[l]===t[d]&&l<d?-1:1;t[l]+=m*p*h,t[d]-=m*p*g}}if(!c)break}}function zi(e){let t=new Set,s=[];for(let n of e.nodes){if(t.has(n.id))continue;let o=[],i=[n.id];t.add(n.id);while(i.length){let r=i.shift();o.push(r);for(let c of e.neighbours(r))if(!t.has(c))t.add(c),i.push(c)}s.push(o)}let a=new Map(e.nodes.map((n,o)=>[n.id,o]));for(let n of s)n.sort((o,i)=>a.get(o)-a.get(i));return s}function Hi(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,a=new Map;for(let n of e.nodes){if(a.has(n.id))continue;let o=[{id:n.id,next:0}];a.set(n.id,1);while(o.length){let i=o[o.length-1],r=t.get(i.id);if(i.next>=r.length){a.set(i.id,2),o.pop();continue}let c=r[i.next++],l=a.get(c.to);if(l===1)s.add(c.id);else if(l===void 0)a.set(c.to,1),o.push({id:c.to,next:0})}}return s}function Fs(e,t){let s=e.map((n)=>[t.get(n.from),t.get(n.to)]).sort((n,o)=>n[0]-o[0]||n[1]-o[1]),a=0;for(let n=0;n<s.length;n++)for(let o=n+1;o<s.length;o++)if(s[n][0]<s[o][0]&&s[n][1]>s[o][1])a++;return a}function Vs(e,t={}){let s=t.direction==="TB"?"TB":"LR",a=t.nodeGap??24,n=t.layerGap??80,o=t.componentGap??48,i=t.sweeps??4,r=s==="LR",c=Hi(e),l=[],d=new Set;for(let b of e.edges){if(b.source===b.target)continue;let C=c.has(b.id)?b.target:b.source,P=c.has(b.id)?b.source:b.target,T=`${C}\x00${P}`;if(!d.has(T))d.add(T),l.push({from:C,to:P})}let u=new Map,p=new Map;for(let b of e.nodes)u.set(b.id,[]),p.set(b.id,[]);for(let b of l)u.get(b.from).push(b.to),p.get(b.to).push(b.from);let h=new Map,g=new Map,m=[];for(let b of e.nodes)if(g.set(b.id,p.get(b.id).length),p.get(b.id).length===0)m.push(b.id),h.set(b.id,0);for(let b=0;b<m.length;b++){let C=m[b];for(let P of u.get(C)){h.set(P,Math.max(h.get(P)??0,h.get(C)+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 b of zi(e)){let C=[];for(let k of b){let O=h.get(k)??0;while(C.length<=O)C.push([]);C[O].push(k)}let P=new Set(b),T=l.filter((k)=>P.has(k.from)&&h.get(k.to)-h.get(k.from)===1),F=new Map,V=()=>{for(let k of C)k.forEach((O,D)=>F.set(O,k.length>1?D/(k.length-1):0.5))},j=(k,O)=>{let D=new Map;k.forEach((H,q)=>{let te=O.get(H),De=k.length>1?q/(k.length-1):0.5;D.set(H,te.length?te.reduce((mt,Oe)=>mt+F.get(Oe),0)/te.length:De)});let Y=new Map(k.map((H,q)=>[H,q]));k.sort((H,q)=>D.get(H)-D.get(q)||Y.get(H)-Y.get(q)),k.forEach((H,q)=>F.set(H,k.length>1?q/(k.length-1):0.5))};V();let x=C.map((k)=>[...k]),S=Fs(T,F);for(let k=0;k<i&&S>0;k++){for(let D=1;D<C.length;D++)j(C[D],p);for(let D=C.length-2;D>=0;D--)j(C[D],u);let O=Fs(T,F);if(O<S)S=O,x=C.map((D)=>[...D])}let L=(k)=>r?e.size(k).width:e.size(k).height,R=(k)=>r?e.size(k).height:e.size(k).width,N=x.map((k)=>k.reduce((O,D)=>O+R(D),0)+a*Math.max(0,k.length-1)),E=Math.max(0,...N),M=0;x.forEach((k,O)=>{let D=Math.max(0,...k.map(L)),Y=v+(E-N[O])/2;for(let H of k){let q=Y+R(H)/2;w.set(H,r?{x:M+D/2,y:q}:{x:q,y:M+D/2}),Y+=R(H)+a}M+=D+n}),y.push(x),v+=E+o}return{positions:w,layerOf:h,reversed:c,components:y,bounds:e.bounds(w)}}var Fi={x:0,y:0,k:1};function js(e,t,s){return Math.min(Math.max(e,t),s)}function wg(e,t){return{x:t.x*e.k+e.x,y:t.y*e.k+e.y}}function Et(e,t){return{x:(t.x-e.x)/e.k,y:(t.y-e.y)/e.k}}function Ue(e,t,s){return{x:e.x+t,y:e.y+s,k:e.k}}function Bs(e,t,s,a=0.1,n=4){let o=js(e.k*s,a,n),i=o/e.k;return{x:t.x-(t.x-e.x)*i,y:t.y-(t.y-e.y)*i,k:o}}function _s(e,t,s=24,a=0.1,n=1){if(!e||t.width<=0||t.height<=0)return{...Fi};let o=Math.max(1,t.width-s*2),i=Math.max(1,t.height-s*2),r=js(Math.min(o/Math.max(1,e.width),i/Math.max(1,e.height)),a,n);return{x:t.width/2-(e.x+e.width/2)*r,y:t.height/2-(e.y+e.height/2)*r,k:r}}function qs(e,t,s){return{x:s.width/2-t.x*e.k,y:s.height/2-t.y*e.k,k:e.k}}function Ks(e,t,s,a=16){let n=t.x*e.k+e.x,o=t.y*e.k+e.y,i=n+t.width*e.k,r=o+t.height*e.k,c=0,l=0;if(n<a)c=a-n;else if(i>s.width-a)c=s.width-a-i;if(o<a)l=a-o;else if(r>s.height-a)l=s.height-a-r;return c===0&&l===0?e:Ue(e,c,l)}function Ws(e,t,s){let a=e.get(t);if(!a)return null;let n=s==="left"?-1:s==="right"?1:0,o=s==="up"?-1:s==="down"?1:0,i=null,r=Number.POSITIVE_INFINITY;for(let[c,l]of e){if(c===t)continue;let d=l.x-a.x,u=l.y-a.y,p=d*n+u*o;if(p<=0.5)continue;let h=Math.abs(d*o)+Math.abs(u*n);if(h>p*2)continue;let g=p+h*2;if(g<r)r=g,i=c}return i}function Gs(e,t){let s=null,a=Number.POSITIVE_INFINITY;for(let[n,o]of e){let i=(o.x-t.x)**2+(o.y-t.y)**2;if(i<a)a=i,s=n}return s}function yg(e,t,s){let a=null;for(let[n,o]of t){let i=e.size(n);if(Math.abs(s.x-o.x)<=i.width/2&&Math.abs(s.y-o.y)<=i.height/2)a=n}return a}var ji="./GraphView-0t3t9mec.stx";var Bi="http://www.w3.org/2000/svg",Us=3,Js=350,_i=240,qi=6.2;function K(e,t={}){let s=document.createElementNS(Bi,e);for(let a in t)s.setAttribute(a,String(t[a]));return s}var Ki=0;class Wi{root;callbacks;timings={layout:0,render:0};model=new Ge;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"}-${++Ki}`,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=K("svg",{class:"stx-gv-svg","aria-hidden":"false",focusable:"false"}),this.svg.__stx_inert_content=!0;let a=K("defs");for(let n of["arrow","arrow-active"]){let o=K("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}`});o.append(K("path",{d:"M 0 0 L 10 5 L 0 10 z"})),a.append(o)}if(this.stage=K("g",{class:"stx-gv-stage"}),this.edgeLayer=K("g",{class:"stx-gv-edges"}),this.nodeLayer=K("g",{class:"stx-gv-nodes"}),this.labelLayer=K("g",{class:"stx-gv-edge-labels"}),this.stage.append(this.edgeLayer,this.nodeLayer,this.labelLayer),this.svg.append(a,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 Ge(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 a=this.model.merge(t??[],s??[]);if(a.nodes.length===0&&a.edges.length===0)return a;let n=this.shown.get(e)??this.positions.get(e)??Et(this.view,{x:this.size.width/2,y:this.size.height/2});for(let o of a.nodes)this.shown.set(o,{...n});if(this.layout(!0),this.sync(),this.moveToPlace(),this.mark(),a.nodes.length)this.announce(`${a.nodes.length} ${a.nodes.length===1?"node":"nodes"} added${this.model.has(e)?` to ${oe(this.model.node(e))}`:""}`);return a}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(qs(this.view,t,this.size))}fit(){this.measure(),this.setView(_s(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(Bs(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(Ue(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=Vs(this.model,{direction:this.direction}).positions;else this.positions=Hs(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=Ds(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 a=this.model.degree(t.id);s.setAttribute("aria-label",`${oe(t)}, ${a} ${a===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=Rs(this.model.edges)}buildNode(e,t){let s=this.model.size(e.id),a=K("g",{class:"stx-gv-node",id:`${this.prefix}-node-${this.serial++}`,role:"group","data-node":e.id});if(e.kind)a.setAttribute("data-kind",e.kind);if(e.expandable===!0)a.setAttribute("data-expandable","");let n=K("title");n.textContent=e.detail?`${oe(e)}: ${e.detail}`:oe(e);let o=K("rect",{x:-s.width/2,y:-s.height/2,width:s.width,height:s.height,rx:6,ry:6}),i=e.expandable===!0?(this.model.metrics.charWidth+4)/2:0,r=K("text",{class:"stx-gv-node-label",x:-i,y:e.detail?-6:0,"text-anchor":"middle","dominant-baseline":"central"});if(r.textContent=We(oe(e),t),a.append(n,o,r),e.detail){let c=K("text",{class:"stx-gv-node-detail",x:-i,y:9,"text-anchor":"middle","dominant-baseline":"central"});c.textContent=We(e.detail,Math.floor(t/0.85)),a.append(c)}if(e.expandable===!0){let c=K("text",{class:"stx-gv-node-mark",x:s.width/2-10,y:0,"text-anchor":"middle","dominant-baseline":"central","aria-hidden":"true"});c.textContent="+",a.append(c)}return a}buildEdge(e){let t=K("g",{class:"stx-gv-edge","data-edge":e.id}),s=K("path",{fill:"none"});if(e.directed!==!1)s.setAttribute("marker-end",`url(#${this.prefix}-arrow)`);t.append(s),this.edgeLayer.append(t);let a=null;if(e.label){let n=We(String(e.label),32),o=Math.ceil(n.length*qi)+8;a=K("g",{class:"stx-gv-edge-label","data-edge":e.id});let i=K("rect",{x:-o/2,y:-8,width:o,height:16,rx:3,ry:3}),r=K("text",{"text-anchor":"middle","dominant-baseline":"central"});r.textContent=n,a.append(i,r),this.labelLayer.append(a)}return{group:t,path:s,label:a}}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 Ms({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,o]of this.positions)t.set(n,this.shown.get(n)??o);let s=performance.now(),a=(n)=>{let o=Math.min(1,(n-s)/_i),i=1-(1-o)**3;for(let[r,c]of this.positions){let l=t.get(r);this.shown.set(r,{x:l.x+(c.x-l.x)*i,y:l.y+(c.y-l.y)*i})}if(this.draw(),this.frame=o<1?requestAnimationFrame(a):0,o>=1)this.shown=new Map(this.positions)};this.frame=requestAnimationFrame(a)}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[a,n]of this.nodeEls)if(n.toggleAttribute("data-selected",a===e),n.toggleAttribute("data-neighbour",t.has(a)),a===e)n.setAttribute("aria-current","true");else n.removeAttribute("aria-current");for(let a of this.model.edges){let n=this.edgeEls.get(a.id);if(!n)continue;let o=e!=null&&(a.source===e||a.target===e);if(n.group.toggleAttribute("data-active",o),n.label?.toggleAttribute("data-active",o),a.directed!==!1)n.path.setAttribute("marker-end",`url(#${this.prefix}-${o?"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((o)=>oe(this.model.node(o))),a=s.slice(0,5).join(", "),n=s.length>5?` and ${s.length-5} more`:"";this.announce(s.length===0?`${oe(t)}, no connections`:`${oe(t)}, ${s.length} ${s.length===1?"connection":"connections"}: ${a}${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,a,n)=>{this.surface.addEventListener(s,a,n),this.disposers.push(()=>this.surface.removeEventListener(s,a,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 a=this.nodeUnder(s.target);if(a&&performance.now()-this.lastExpand>Js)this.expand(a,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 a=this.nodeUnder(s.target);if(a)this.select(a);this.callbacks.onContext?.({node:a?this.model.node(a):null,x:s.clientX,y:s.clientY})});let t=(s,a)=>{this.surface.addEventListener(s,a),this.disposers.push(()=>this.surface.removeEventListener(s,a))};t("gesturestart",(s)=>{s.preventDefault();let a=this.local(s);this.pinch={k:this.view.k,x:a.x,y:a.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,a=e.clientY-t.startY;if(!t.moved){if(Math.abs(s)<Us&&Math.abs(a)<Us)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+a/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 o of this.model.edgesOf(t.node))this.drawEdge(o)}else this.autoFit=!1,this.setView(Ue(t.view,s,a))}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(),a=this.lastClick.id===t.node&&s-this.lastClick.at<Js;if(this.lastClick=a?{id:"",at:0}:{id:t.node,at:s},this.select(t.node),a)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?Ws(this.positions,this.selected,s):Gs(this.positions,Et(this.view,{x:this.size.width/2,y:this.size.height/2}));if(n)this.select(n),this.bringIntoView(n);return}let a=e.metaKey||e.ctrlKey;if(e.key==="Enter"||e.key===" "){if(!this.selected)return;e.preventDefault(),this.expand(this.selected,a)}else if(a||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),a=Ks(this.view,{x:t.x-s.width/2,y:t.y-s.height/2,width:s.width,height:s.height},this.size);if(a!==this.view)this.autoFit=!1,this.setView(a)}}var Ui="./GroupedList-j3sxv5pb.stx";var Yi="./GroupedListRow-dnqc6j85.stx";var Zi="./Image-6x38ddd7.stx";var er="./EmailInput-sf9jfrgz.stx";var sr="./NumberInput-nqqen5a6.stx";var nr="./PasswordInput-j38f2n01.stx";var ir="./SearchInput-w15r5t95.stx";var lr="./TextInput-4v09vw1r.stx";var cr={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},dr={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},pr={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},ur={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},hr={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},qg=ae("TextInput",dr),Kg=ae("EmailInput",cr),Wg=ae("PasswordInput",ur),Gg=ae("NumberInput",pr),Ug=ae("SearchInput",hr);var fr=new Set(["array","set"]),mr=/^[A-Z_$][\w$]*$/i;function Pt(e){return fr.has(e.kind)}function It(e){return e.ref===void 0&&(e.children!==void 0&&e.children.length>0||(e.more??0)>0)}function Mt(e,t="$"){let s=t;for(let a of e)if(typeof a==="number")s+=`[${a}]`;else if(mr.test(a))s+=`.${a}`;else s+=`[${JSON.stringify(a)}]`;return s}function At(e){if(e.ref!==void 0)return"[Circular]";if(e.children){if(Pt(e))return e.children.map((s)=>At(s));let t={};return e.children.forEach((s,a)=>{t[s.key!==void 0?String(s.key):s.label??String(a)]=At(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 Xs(e,t=2){let s=At(e);return s===void 0?"undefined":JSON.stringify(s,null,t)}var Ys=80;function Rt(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(Pt(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>Ys?`${t.slice(0,Ys)}\u2026`:t);if(typeof t==="bigint")return`${t}n`;return String(t)}return e.kind}function tx(e,t,s={}){let a=s.maxItems??1000,n=s.maxDepth??32,o=new Map,i=1,r=(l,d)=>{if(d!==void 0)l.label=d;return l},c=(l,d,u)=>{if(l===null)return r({kind:"null",value:null,preview:"null"},d);switch(typeof l){case"undefined":return r({kind:"undefined",value:void 0,preview:"undefined"},d);case"string":case"number":case"boolean":case"bigint":return r({kind:typeof l,value:l},d);case"symbol":return r({kind:"symbol",preview:l.toString()},d);case"function":return r({kind:"function",preview:`\u0192 ${l.name||"(anonymous)"}()`},d)}let p=l,h=o.get(p);if(h!==void 0)return r({kind:"ref",ref:h},d);if(p instanceof Date)return r({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 r({kind:"regexp",value:p.toString(),preview:p.toString()},d);let g=`v${i++}`;o.set(p,g);let m=Array.isArray(p),w=p instanceof Set,y=p instanceof Map,v=r({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 b=v.children,C=0;if(m||w)for(let P of p){if(C<a)b.push(c(P,String(C),u+1));C++}else if(y)for(let[P,T]of p){if(C<a)b.push(c(T,typeof P==="string"?P:Rt(c(P,void 0,n)),u+1));C++}else{for(let T of Object.keys(p)){if(C<a)b.push(c(p[T],T,u+1));C++}let P=p.constructor?.name;if(P&&P!=="Object")v.preview=`${P} {${C}}`}if(C>b.length)v.more=C-b.length;if(y)v.preview=`Map(${C})`;return v};return c(e,t,0)}class Nt{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 a=this.rows[s];if(a.isMore)continue;if(a.parent!==-1||this.roots.length>1)t.push(a.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,a,n)=>{if(!It(s))return;if(n>=this.depth)this.opened.add(a);this.closed.delete(a),s.children?.forEach((o,i)=>t(o,o.id??`${a}.${i}`,n+1))};if(e===void 0)this.roots.forEach((s,a)=>t(s,s.id??String(a),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,a)=>{if(a>=this.depth||!It(t))return;this.closed.add(s),t.children?.forEach((n,o)=>e(n,n.id??`${s}.${o}`,a+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,a)=>{if(this.closed.delete(s),a>=this.depth)this.opened.add(s)}),this.flatten(),this.indexOf(e)}appendChildren(e,t,s=0){let a=this.find(e);if(!a)return!1;let n=a.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 a=this.rows.length-1;if(a<0)return{index:-1,changed:!1};let n=Math.min(Math.max(e,0),a),o=this.rows[n],i=(r)=>({index:Math.min(Math.max(r,0),a),changed:!1});switch(t){case"ArrowDown":return i(e<0?0:n+1);case"ArrowUp":return i(n-1);case"Home":return i(0);case"End":return i(a);case"PageDown":return i(n+s);case"PageUp":return i(n-s);case"ArrowRight":if(!o.expandable||o.isMore)return i(n);if(!o.expanded)return{index:n,changed:this.expand(o.id)};return i(n+1);case"ArrowLeft":if(o.expanded&&!o.isMore)return{index:n,changed:this.collapse(o.id)};return i(o.parent===-1?n:o.parent);case"*":{let r=!1,c=o.parent,l=this.rows.filter((d)=>d.parent===c&&d.depth===o.depth&&d.expandable&&!d.expanded&&!d.isMore);for(let d of l)this.mark(d.id,d.depth,!0),r=!0;if(r)this.flatten();return{index:this.indexOf(o.id),changed:r}}}return i(n)}typeahead(e,t){let s=t.toLowerCase(),a=this.rows.length;if(s===""||a===0)return-1;let n=s.length===1?e+1:Math.max(e,0);for(let o=0;o<a;o++){let i=(n+o+a)%a,r=this.rows[i];if(!r.isMore&&(r.node.label??"").toLowerCase().startsWith(s))return i}return-1}set(e,t){let s=this.indexOf(e);if(s===-1)return!1;let a=this.rows[s];if(!a.expandable||a.isMore||a.expanded===t)return!1;return this.mark(e,a.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 a=s.node.children;if(!a||s.node.ref!==void 0)continue;let n=[...s.ancestors,s.id];for(let o=a.length-1;o>=0;o--)t.push({node:a[o],id:a[o].id??`${s.id}.${o}`,ancestors:n})}return null}flatten(){let e=[],t=(s,a,n,o,i,r,c)=>{let l=It(s),d=l&&this.isExpanded(a,n),u=e.length;if(e.push({id:a,node:s,depth:n,key:i,parent:o,expandable:l,expanded:d,posInSet:r,setSize:c,isMore:!1}),!d)return;let p=s.children??[],h=s.more??0,g=Pt(s),m=p.length+(h>0?1:0);for(let w=0;w<p.length;w++){let y=p[w];t(y,y.id??`${a}.${w}`,n+1,u,y.key??(g?w:y.label??w),w+1,m)}if(h>0)e.push({id:`${a}.+`,node:s,depth:n+1,key:"",parent:u,expandable:!1,expanded:!1,posInSet:m,setSize:m,isMore:!0})};this.roots.forEach((s,a)=>t(s,s.id??String(a),0,-1,s.key??a,a+1,this.roots.length)),this.rows=e,this.index=null,this.version++}}var xr="./JsonTree-satc4010.stx";var ea=new Set(["array","object","map","set","model","error"]);function br(e){return e.t==="object"||e.t==="model"}function Zs(e){return e.length>0&&e.slice(0,20).every(br)}function Qs(e){return e.some((t)=>ea.has(t.t))}function Lt(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 vr(e){if(!e.file)return"";return[e.file,e.line,e.column].filter((t)=>t!==void 0).join(":")}function nx(e,t,s={}){let a=s.idPrefix??"t",n=(l)=>`${a}${l}`,o=(l,d)=>{if(d!==void 0)l.label=d;return l},i=(l)=>c(l,void 0).preview??l.t,r=(l,d)=>{if(d.length>0)l.openable=d.length===1?d[0]:d;return l};function c(l,d){switch(l.t){case"undefined":return o({kind:"undefined",value:void 0,preview:"undefined"},d);case"null":return o({kind:"null",value:null,preview:"null"},d);case"boolean":return o({kind:"boolean",value:l.v,preview:String(l.v)},d);case"number":{let u=typeof l.v==="number"?l.v:l.v==="-0"?-0:Number(l.v);return o({kind:"number",value:u,preview:String(l.v)},d)}case"bigint":return o({kind:"bigint",value:l.v,preview:`${l.v}n`},d);case"string":return o({kind:"string",value:l.v,preview:Lt(l.v,l.truncated)},d);case"symbol":return o({kind:"symbol",preview:`Symbol(${l.v})`},d);case"function":{let u=l.kind==="class"?`class ${l.name}`:`${l.kind==="async"?"async ":""}\u0192${l.kind==="generator"?"*":""} ${l.name}()`;return o({kind:"function",preview:u},d)}case"date":return o({kind:"date",value:l.v,preview:l.v??"Invalid Date"},d);case"regexp":return o({kind:"regexp",value:l.v,preview:l.v},d);case"url":return o({kind:"url",value:l.v,preview:l.v},d);case"promise":return o({kind:"promise",preview:"Promise"},d);case"bytes":{let u=l.length*2>l.hex.length;return o({kind:"bytes",value:l.hex,preview:`${l.ctor}(${l.length}) <${l.hex}${u?"\u2026":""}>`},d)}case"ref":return o({kind:"ref",ref:n(l.id),preview:"[Circular]"},d);case"cut":return o({kind:"cut",preview:`${l.ctor??"Object"} \u2026 (${l.reason==="depth"?"too deep to show":"result too large to show"})`},d);case"array":{let u={id:n(l.id),kind:"array",preview:`${l.ctor??"Array"}(${l.length})`,children:l.items.map((p,h)=>c(p,String(h)))};if(l.more)u.more=l.more;return o(r(u,Zs(l.items)?["table"]:[]),d)}case"set":{let u={id:n(l.id),kind:"set",preview:`Set(${l.size})`,children:l.items.map((p,h)=>c(p,String(h)))};if(l.more)u.more=l.more;return o(r(u,Zs(l.items)?["table"]:[]),d)}case"object":{let u=l.entries.slice(0,5).map(([m])=>m).join(", "),p=l.entries.length+(l.more??0),h=p===0?"{}":`{${u}${p>5?", \u2026":""}}`,g={id:n(l.id),kind:"object",preview:l.ctor&&l.ctor!=="Object"?`${l.ctor} ${h}`:h,children:l.entries.map(([m,w])=>c(w,m))};if(l.more)g.more=l.more;return o(r(g,Qs(l.entries.map((m)=>m[1]))?["graph"]:[]),d)}case"map":{let u={id:n(l.id),kind:"map",preview:`Map(${l.size})`,children:l.entries.map(([p,h],g)=>{if(!ea.has(p.t)){let m=c(h,i(p));return m.key=p.t==="string"?p.v:i(p),m}return{kind:"entry",label:String(g),key:g,preview:`${i(p)} => ${i(h)}`,children:[c(p,"key"),c(h,"value")]}})};if(l.more)u.more=l.more;return o(r(u,Qs(l.entries.map((p)=>p[1]))?["graph"]:[]),d)}case"model":{let u=l.attributes.map(([g,m])=>c(m,g));for(let[g,m]of l.loaded??[]){let w=c(m,g);w.meta=w.meta??{relation:!0},u.push(w)}if(l.hidden?.length)u.push({kind:"hidden",label:"[hidden]",key:"[hidden]",preview:l.hidden.join(", "),children:l.hidden.map((g,m)=>({kind:"hidden",label:String(m),value:g,preview:g}))});if(l.relations?.length)u.push({kind:"relations",label:"[relations]",key:"[relations]",preview:`${l.relations.length} declared`,children:l.relations.map((g)=>({kind:"relation",label:g.name??g.model,value:g,preview:`${g.kind} ${g.model}`}))});let p={model:l.model,hidden:l.hidden??[],relations:l.relations??[]};if(l.table)p.table=l.table;if(l.primaryKey)p.primaryKey=l.primaryKey;let h={id:n(l.id),kind:"model",preview:l.key?`${l.model} #${i(l.key).replace(/^"|"$/g,"")}`:l.model,children:u,meta:p};if(l.more)h.more=l.more;return o(r(h,["graph"]),d)}case"html":{let u={kind:l.kind};if(l.title)u.title=l.title;if(l.text)u.text=l.text;if(l.truncated)u.truncated=l.truncated;let p=l.truncated?`, ${l.truncated} more cut`:"",h=l.title?`: ${l.title}`:"";return o(r({kind:"html",value:l.html,preview:`${l.kind}${h} (${l.html.length} characters${p})`,meta:u},["preview"]),d)}case"error":{let u=[{kind:"string",label:"message",value:l.message,preview:Lt(l.message)}];if(l.frames?.length)u.push({kind:"stack",label:"stack",preview:`${l.frames.length} frames`,value:l.stack,children:l.frames.map((p,h)=>({kind:"frame",label:String(h),value:p,preview:[p.function,vr(p)].filter(Boolean).join(" at ")||"(unknown)",meta:p}))});else if(l.stack)u.push({kind:"string",label:"stack",value:l.stack,preview:Lt(l.stack)});if(l.cause)u.push(c(l.cause,"cause"));for(let[p,h]of l.entries??[])u.push(c(h,p));return o({kind:"error",preview:l.message?`${l.name}: ${l.message}`:l.name,children:u},d)}}return o({kind:"unknown",preview:String(l.t??"unknown")},d)}return c(e,t)}var wr=600,ta=400,sa={table:"Table",graph:"Graph",preview:"Preview"};function aa(e){return e.length>ta?`${e.slice(0,ta)}\u2026`:e}function na(e){if(e==null||e==="")return[];return Array.isArray(e)?e:[e]}class yr{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 a=(o)=>e.querySelector(`[data-jt="${o}"]`);this.scroller=a("scroller")??e,this.content=a("content")??this.scroller,this.rowsEl=a("rows")??this.content,this.status=a("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 Nt(t.value,{depth:t.depth??1}),this.rowsEl.__stx_inert_content=!0,e.style.setProperty("--stx-tree-row-height",`${this.rowHeight}px`);let n=(o,i,r,c)=>{o.addEventListener(i,r,c),this.disposers.push(()=>o.removeEventListener(i,r,c))};if(n(this.scroller,"scroll",()=>this.render(),{passive:!0}),n(this.scroller,"keydown",(o)=>this.onKeyDown(o)),n(this.scroller,"focus",()=>{if(this.active===-1&&this.model.rows.length>0)this.setActive(0,!1)}),n(this.rowsEl,"mousedown",(o)=>{if(o.target.closest("[data-jt-action]"))o.preventDefault()}),n(this.rowsEl,"click",(o)=>this.onClick(o)),n(this.rowsEl,"dblclick",(o)=>this.onDoubleClick(o)),n(this.rowsEl,"contextmenu",(o)=>this.onContextMenu(o)),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 a=this.model.appendChildren(e,t,s);if(a)this.afterChange();return a}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:Mt(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=(a,n)=>{let o=document.createElement("span");if(o.className=a,n)o.setAttribute("aria-hidden","true");return e.appendChild(o),o},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,a){let n=document.createElement("button");if(n.type="button",n.tabIndex=-1,n.className="stx-jt-action",n.setAttribute("data-jt-action",e),a)n.setAttribute("data-jt-as",a);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 na(s)}return na(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 a=Math.max(0,Math.min(this.scroller.scrollTop,t*this.rowHeight-s)),n=Math.max(0,Math.floor(a/this.rowHeight)-this.overscan),o=Math.min(t,Math.ceil((a+s)/this.rowHeight)+this.overscan),i=Math.max(0,o-n);while(this.pool.length<i)this.pool.push(this.createRow());let r=this.pool.length,c=new Uint8Array(r);for(let d=n;d<o;d++){let u=d%r;c[u]=1,this.paint(this.pool[u],e[d],d)}for(let d=0;d<r;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<o)this.scroller.setAttribute("aria-activedescendant",this.prefix+this.active);else this.scroller.removeAttribute("aria-activedescendant")}paint(e,t,s){let a=this.model.version,n=s===this.active,o=e.__jt;if(!o||o.index!==s||o.version!==a){let i=this.parts.get(e),r=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"),i.twisty.textContent="",i.label.textContent="",i.separator.style.display="none",i.preview.textContent=`\u2026 ${r.more} more`,i.preview.setAttribute("data-kind","more");else{e.setAttribute("data-kind",r.kind),i.twisty.textContent=t.expandable?t.expanded?"\u25BE":"\u25B8":"";let d=r.label??(typeof t.key==="number"&&t.parent!==-1?String(t.key):"");i.label.textContent=aa(d),i.separator.style.display=d===""?"none":"",i.preview.textContent=aa(Rt(r)),i.preview.setAttribute("data-kind",r.kind)}let c=this.opensOf(t,s),l=t.isMore?"+":c.join("|");if(!o||o.opens!==l)if(i.actions.textContent="",t.isMore)i.actions.appendChild(this.button("more","Load","Load more"));else{for(let d of c)i.actions.appendChild(this.button("open",sa[d]??d,`Open as ${sa[d]?.toLowerCase()??d}`,d));i.actions.appendChild(this.button("copy-value","Copy","Copy value")),i.actions.appendChild(this.button("copy-path","Path","Copy path"))}e.__jt={index:s,version:a,opens:l}}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 a=this.model.indexOf(s);if(a!==-1)this.callbacks.onToggle?.({...this.detail(a),expanded:this.model.rows[a].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 a=s.isMore?s.parent:e,n=this.model.pathOf(a),o=this.model.rows[a].node,i=t==="path"?Mt(n):Xs(o);try{navigator.clipboard?.writeText(i)?.catch(()=>{})}catch{}this.say(t==="path"?`Copied path ${i}`:"Copied value"),this.callbacks.onCopy?.({what:t,text:i,path:n,node:o})}open(e,t){let s=this.model.rows[e];if(!s||s.isMore)return;let a=t??this.opensOf(s,e)[0];if(a===void 0)return;this.callbacks.onOpen?.({...this.detail(e),as:a})}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 a=this.model.rows[t];if(a.expandable||a.isMore||a.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,a=e.key;if(s&&(a==="c"||a==="C")){if(this.active===-1)return;e.preventDefault(),this.copy(this.active,e.shiftKey?"path":"value");return}if(s||e.altKey)return;if(a==="Enter"&&e.shiftKey){if(e.preventDefault(),this.active!==-1)this.open(this.active);return}let n=this.typed!==""&&Date.now()-this.typedAt<=wr;if(a==="Enter"||a===" "&&!n){if(e.preventDefault(),this.active!==-1)this.toggleRow(this.active);return}if(a==="ArrowDown"||a==="ArrowUp"||a==="ArrowLeft"||a==="ArrowRight"||a==="Home"||a==="End"||a==="PageDown"||a==="PageUp"||a==="*"){e.preventDefault(),this.typed="";let o=this.active===-1?null:t[this.active],i=o?.expanded,r=this.model.move(this.active,a,this.pageSize());if(r.changed){if(this.active=r.index,this.activeId=this.model.rows[r.index]?.id??"",this.scrollToRow(r.index),this.render(),o&&a!=="*"){let c=this.model.indexOf(o.id);if(c!==-1&&this.model.rows[c].expanded!==i)this.callbacks.onToggle?.({...this.detail(c),expanded:this.model.rows[c].expanded})}}else this.setActive(r.index,!0);return}if(a.length===1){let o=Date.now();if(!n)this.typed="";this.typedAt=o,this.typed+=a;let i=this.model.typeahead(this.active,this.typed);if(i!==-1)e.preventDefault(),this.setActive(i,!0)}}}var Sr="./List-5ey6k813.stx";var $r="./SwipeRow-az09d4tb.stx";var Er="./Listbox-83j2q4x6.stx";var Ar="./ListboxButton-gan8e3nw.stx";var Mr="./ListboxLabel-ka0hfm7b.stx";var Nr="./ListboxOption-gpaqvk3s.stx";var Dr="./ListboxOptions-2928864k.stx";var zr="./FilterChip-bynt5maa.stx";var Fr="./FilterChips-xg7pgkk2.stx";var jr="./ListRow-1qvkjt4v.stx";var _r="./NavBar-ky8tedjb.stx";var Kr="./SectionCard-8b5fyrjd.stx";var Gr="./TabBar-6m1ajm1d.stx";var Jr="./TabBarItem-kddfnhk3.stx";var Xr="./Navigator-1yk1c3pp.stx";var Qr="./Notification-b3cz24f0.stx";var tl="./Pager-w4eb64na.stx";var al="./PagerDots-076w890y.stx";var ol="./Pagination-8bhbkpcp.stx";var rl="./Checkout-crbegxyv.stx";var cl="./DefaultPaymentMethod-ss3x61tr.stx";var pl="./PaymentMethods-z4hhr0kv.stx";var hl="./SubscriptionCheckout-rdcv32n1.stx";var ml="./Popover-jjt7p7sn.stx";var xl="./PopoverButton-ks3cttd9.stx";var vl="./PopoverPanel-ddgj4gz3.stx";var yl="./Portal-m73vz879.stx";var ia=[{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 oa(e){let t=typeof e==="string"?Number.parseFloat(e):e;return typeof t==="number"&&Number.isFinite(t)&&t>0?Math.round(t):null}function Dt(e,t={}){let s=oa(t.width),a=oa(t.height),n=Boolean(t.landscape);if(s&&a)return{name:"custom",size:{width:s,height:a},landscape:!1};let o=ia.find((r)=>r.name===e);if(!o)return{name:"fill",size:null,landscape:!1};let i=n&&o.height>o.width;return{name:o.name,size:i?{width:o.height,height:o.width}:{width:o.width,height:o.height},landscape:i}}function ra(e,t,s=0){let a=t.width-s*2,n=t.height-s*2;if(a<=0||n<=0||e.width<=0||e.height<=0)return 1;return Math.min(1,a/e.width,n/e.height)}function la(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 kl=["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 ca(e={}){let t=[];if(e.scripts)t.push("allow-scripts");if(e.forms)t.push("allow-forms");return t.join(" ")}function Sb(e){return!e.toLowerCase().split(/\s+/).filter(Boolean).some((s)=>kl.includes(s))}var Sl=/<!doctype\s|<html[\s>]/i,Je=/<head(?:\s[^>]*)?>/i,Ye=/<html(?:\s[^>]*)?>/i,Cl=/<base[\s>]/i,$l=/<meta[^>]+name\s*=\s*["']?color-scheme/i,Tl=/\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)/gi,El=/(<(style|script)\b[^>]*>)([\s\S]*?)(<\/\2\s*>)/gi,Il=/(\smedia\s*=\s*)("[^"]*"|'[^']*')/gi,Al="(min-width: 0px)",Pl="(max-width: 0px)";function Ml(e,t){let s=(o)=>o.replace(Tl,(i,r)=>r.toLowerCase()===t?Al:Pl),a=e.replace(El,(o,i,r,c,l)=>i+s(c)+l).replace(Il,(o,i,r)=>i+s(r)),n=`<style data-stx-preview-scheme>:root{color-scheme:${t} !important}</style>`;if(Je.test(a))return a.replace(Je,(o)=>o+n);if(Ye.test(a))return a.replace(Ye,(o)=>`${o}<head>${n}</head>`);return n+a}function Rl(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function da(e,t={}){let s=Nl(e,t);return t.forceScheme?Ml(s,t.forceScheme):s}function Nl(e,t){let s=e==null?"":String(e),a='<base target="_blank">';if(!Sl.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>${Rl(t.title)}</title>`:""}</head><body>${s}</body></html>`;if(Cl.test(s))return s;if(Je.test(s))return s.replace(Je,(n)=>n+'<base target="_blank">');if(Ye.test(s))return s.replace(Ye,(n)=>`${n}<head><base target="_blank"></head>`);return'<base target="_blank">'+s}function Cb(e){return $l.test(e)}function pa(e,t){let s=["fill",...ia.map((n)=>n.name)],a=s.indexOf(e);return s[((a<0?0:a)+t+s.length)%s.length]}var Dl="./PreviewFrame-erbgvzj8.stx";var Ol=16,ua="(prefers-color-scheme: dark)",Pe;function zl(){if(Pe!==void 0)return Pe;try{if(typeof matchMedia!=="function"||!document.body)return!0;let e=matchMedia(ua).matches,t=document.createElement("iframe");t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.style.cssText=`position:absolute;width:1px;height:1px;border:0;opacity:0;pointer-events:none;color-scheme:${e?"light":"dark"}`,document.body.appendChild(t),t.offsetWidth;let s=t.contentWindow?.matchMedia?.(ua).matches;t.remove(),Pe=typeof s==="boolean"?s!==e:!0}catch{Pe=!0}return Pe}class Hl{root;callbacks;html;viewportName;frameWidth;frameHeight;landscape;scheme;scripts;forms;title;viewport;scale=1;frame=null;written;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 a=(o)=>this.onToolbarClick(o),n=(o)=>this.onToolbarKey(o);if(this.root.addEventListener("click",a),this.root.addEventListener("keydown",n),this.disposers.push(()=>this.root.removeEventListener("click",a),()=>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;if(this.scheme=t,this.schemeToWrite()!==this.written)this.load();else 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 Dt(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"}schemeToWrite(){if(zl())return;if(this.scheme==="auto"&&!this.root.closest(".dark, .light"))return;return this.effectiveScheme()}load(){let e=document.createElement("iframe");e.setAttribute("sandbox",ca({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())}),this.written=this.schemeToWrite(),e.srcdoc=da(this.html,{title:this.title,forceScheme:this.written}),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 a=this.stage.getBoundingClientRect();this.scale=ra(t,{width:a.width,height:a.height},Ol),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=la(this.viewport,this.scale)}reflect(){for(let a of this.root.querySelectorAll("[data-pf-viewport]")){let n=a.getAttribute("data-pf-viewport")===this.viewport.name;a.setAttribute("aria-checked",String(n)),a.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 a=t.querySelector('[data-pf="scheme-text"]');if(a)a.textContent=e?"Dark":"Light"}let s=this.root.querySelector('[data-pf-action="rotate"]');if(s){let a=Dt(this.viewportName,{width:this.frameWidth,height:this.frameHeight}).size;s.disabled=!a||this.viewport.name==="custom"||a.height<=a.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 a=t.getAttribute("data-pf-viewport")||"fill",n=pa(a,s);this.setViewport(n,{width:null,height:null}),this.root.querySelector(`[data-pf-viewport="${n}"]`)?.focus()}}var Vl="./Progress-2qzb77kc.stx";var Bl="./Radio-8153x74w.stx";var ql="./RadioGroup-mz3pv7he.stx";var Wl="./RadioGroupDescription-z34r9avr.stx";var Ul="./RadioGroupLabel-ka0hfm7b.stx";var Yl="./RadioGroupOption-mk98taz5.stx";var Zl="./RenderSurface-z9zr4d75.stx";var Ql=8192,ve=globalThis;function ec(){return ve.__stxRenderSurfaces??=new Map,ve.__stxRenderSurfaces}function ha(e,t){return Object.assign(Error(t),{code:e})}function fa(){return Boolean(ve.stx?._host?.isNative)}function tc(){if(fa())return typeof ve.craft?.renderSurface?.present==="function"&&ve.craft?.capabilities?.renderSurface===!0?"native":"none";if(typeof document>"u")return"none";return"canvas"}function sc(e,t,s,a){if(typeof e!=="string"||!e)throw TypeError("presentFrame needs the surface's name");if(!(t instanceof Uint32Array))throw TypeError("presentFrame takes a Uint32Array of 0xAARRGGBB words");for(let[n,o]of[["width",s],["height",a]])if(!Number.isInteger(o)||o<1||o>8192)throw TypeError(`presentFrame's ${n} must be a whole number from 1 to 8192, not ${o}`);if(t.length!==s*a)throw TypeError(`presentFrame was given ${t.length} words for a ${s} x ${a} frame (${s*a})`)}function ma(e,t,s,a){if(fa()){let o=ve.craft?.renderSurface;if(!o||typeof o.present!=="function")throw ha("UNAVAILABLE","This device cannot draw a RenderSurface");return o.present(e,t,s,a)}sc(e,t,s,a);let n=ec().get(e);if(!n)throw ha("NOT_FOUND",`No RenderSurface named "${e}" is on the page`);return ac(n,t,s,a),!0}function ac(e,t,s,a){let{canvas:n,context:o,opaque:i}=e;if(n.width!==s)n.width=s;if(n.height!==a)n.height=a;if(!e.image||e.image.width!==s||e.image.height!==a)e.image=o.createImageData(s,a);let r=e.image.data;for(let c=0,l=0;c<t.length;c++,l+=4){let d=t[c],u=d>>>24,p=d>>>16&255,h=d>>>8&255,g=d&255;if(i)u=255;else if(u>0&&u<255)p=Math.min(255,Math.round(p*255/u)),h=Math.min(255,Math.round(h*255/u)),g=Math.min(255,Math.round(g*255/u));r[l]=p,r[l+1]=h,r[l+2]=g,r[l+3]=u}o.putImageData(e.image,0,0)}function nc(e,t,s={}){let a=typeof requestAnimationFrame==="function"?requestAnimationFrame:(r)=>setTimeout(()=>r(Date.now()),16),n=!1,o=!1,i=(r)=>{if(n)return;if(!o)try{let c=t(r);if(c&&!ma(e,c.pixels,c.width,c.height))o=!0}catch(c){if(n=!0,c?.code==="NOT_FOUND")return;if(s.onError)s.onError(c);else throw c;return}a(i)};return a(i),{stop:()=>{n=!0},wake:()=>{o=!1},get waiting(){return o},get ended(){return n}}}var ic="./SegmentedControl-jm6tb9f8.stx";var lc="./Select-36s22z6d.stx";var Z={NONE:0,KEYWORD:1,SUBSTRING:2,WORD_PREFIX:3,PREFIX:4},ov=700,Xe=1600;function we(e){return`stx:settings:${e}`}function U(e,t){if(!t)return null;return e.find((s)=>s.id===t)??null}function cc(e){return(e.find((s)=>!s.parent)??e[0])?.id??""}function Ze(e,...t){for(let s of t)if(U(e,s))return s;return cc(e)}function Qe(e,t){let s=new Set,a=U(e,t);while(a&&a.parent&&!s.has(a.id)){s.add(a.id);let n=U(e,a.parent);if(!n)break;a=n}return a?.id??""}function ue(e,t){let s=U(e,t);if(!s?.parent||s.parent===t)return"";return U(e,s.parent)?s.parent:""}function et(){return{trail:[],cursor:-1}}function he(e){return e.trail[e.cursor]??""}function Me(e,t){if(!t||he(e)===t)return e;let s=[...e.trail.slice(0,e.cursor+1),t];return{trail:s,cursor:s.length-1}}function Re(e){return e.cursor<e.trail.length-1}function tt(e,t=[]){if(e.cursor>0)return!0;return e.cursor===0&&ue(t,he(e))!==""}function st(e,t=[]){if(e.cursor>0)return{trail:e.trail,cursor:e.cursor-1};if(e.cursor===0){let s=ue(t,he(e));if(s)return{trail:[s,...e.trail],cursor:0}}return e}function at(e){return Re(e)?{trail:e.trail,cursor:e.cursor+1}:e}function pe(e){return String(e??"").normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function ga(e,t){let s=e.indexOf(t);while(s!==-1){if(s===0||!/[\p{L}\p{N}]/u.test(e.charAt(s-1)))return!0;s=e.indexOf(t,s+1)}return!1}function xa(e,t,s){if(t.startsWith(e))return Z.PREFIX;if(ga(t,e))return Z.WORD_PREFIX;if(t.includes(e))return Z.SUBSTRING;if(ga(s,e))return Z.KEYWORD;return Z.NONE}function ba(e,t,s=""){let a=pe(e);if(a==="")return Z.NONE;let n=pe(t),o=pe(s),i=xa(a,n,o),r=a.split(" ");if(i!==Z.NONE||r.length===1)return i;let c=Z.PREFIX;for(let l of r){let d=xa(l,n,o);if(d===Z.NONE)return Z.NONE;c=Math.min(c,d===Z.PREFIX&&l!==r[0]?Z.WORD_PREFIX:d)}return c}function nt(e,t){let s=pe(e);if(s==="")return{query:"",panes:[],settings:[]};let a=[];for(let o of t.items){let i=U(t.panes,o.id),r=`${o.keywords??""} ${i?.keywords??""} ${i&&i.title!==o.label?i.title:""}`;if(ba(s,o.label,r)!==Z.NONE)a.push(o.id)}let n=[];return t.rows.forEach((o,i)=>{if(!o.label)return;let c=U(t.panes,o.pane)?.title??"",l=ba(s,o.label,`${o.keywords??""} ${c}`);if(l!==Z.NONE)n.push({id:o.id,label:o.label,pane:o.pane,paneTitle:c,row:i,rank:l})}),n.sort((o,i)=>i.rank-o.rank||o.row-i.row),{query:s,panes:a,settings:n}}function va(e){if(e<=0)return"No results";return e===1?"1 result":`${e} results`}function zt(e,t,s){if(s<=0)return-1;if(e==="ArrowDown")return Math.min(s-1,t+1);if(e==="ArrowUp")return t<0?s-1:Math.max(0,t-1);if(e==="Home")return 0;if(e==="End")return s-1;return-1}function wa(e,t,s,a=700){return{buffer:(!e||s-e.at>a?"":e.buffer)+pe(t),at:s}}function ya(e,t,s){let a=e.length,n=pe(t);if(a===0||n==="")return-1;let o=n.split("").every((c)=>c===n.charAt(0)),i=o?n.charAt(0):n,r=o?s+1:Math.max(0,s);for(let c=0;c<a;c++){let l=((r+c)%a+a)%a;if(pe(e[l]).startsWith(i))return l}return-1}var pc="./SettingsGroup-t3emsgk2.stx";var hc="./SettingsPane-tqe8q5cw.stx";var mc="./SettingsPaneHeader-wznh6dss.stx";var xc="./SettingsRow-5jgay5ae.stx";var vc="./SettingsSidebarGroup-p5h359bn.stx";var yc="./SettingsSidebarItem-69zs4b55.stx";var Sc="./SettingsUpdateRow-92mmxvpd.stx";var $c="./SettingsWindow-q0x86xqb.stx";var Tc="data-stx-settings",ye="data-settings-item",ke="data-settings-pane",Ec="data-settings-row";class Ic{tree;root;options;callbacks;history=et();current="";query="";hits=[];highlighted=null;highlightTimer=null;pressed=new Map;visible=new Map;disposers=[];destroyed=!1;constructor(e,t,s={},a={}){this.tree=e;this.root=t;this.options=s;this.callbacks=a;this.hear(),this.disposers.push(e.observeChildren(t,()=>{if(this.destroyed)return;this.hear(),this.show(!1),this.applySearch(!1)}));let n=this.panes(),o=this.paneNodes().find((i)=>this.tree.getAttribute(i,"data-active")!=null);this.history=Me(this.history,Ze(n,this.stored(),s.pane,o?this.attribute(o,ke):"")),this.show(!0),this.applySearch(!1)}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.rowNodes().find((a)=>this.attribute(a,"data-setting")===e),s=t?this.paneOf(t):"";if(!t||!s)return!1;return this.open(s),this.reveal(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}search(e){this.query=String(e??""),this.applySearch(!0)}chooseResult(e){let t=this.hits[e];if(!t||this.tree.parent(t.row)===null)return;this.open(t.hit.pane),this.reveal(t.row)}destroy(){this.destroyed=!0;for(let e of this.disposers)e();this.disposers.length=0;for(let e of this.pressed.values())e();this.pressed.clear(),this.visible.clear(),this.clearHighlight()}attribute(e,t){return this.tree.getAttribute(e,t)??""}toggle(e,t){let s=this.attribute(e,"class").split(/\s+/).filter(Boolean),a=this.visible.has(e)?this.visible.get(e):!s.includes("hidden");if(this.visible.set(e,t),a===t)return;let n=s.filter((o)=>o!=="hidden");this.tree.setAttribute(e,"class",(t?n:[...n,"hidden"]).join(" "))}has(e,t){return this.tree.getAttribute(e,t)!=null}closest(e,t){for(let s=e;s;s=this.tree.parent(s))if(this.has(s,t))return s;return null}all(e,t=this.root){return this.tree.descendants(t).filter((s)=>this.has(s,e)&&this.closest(this.tree.parent(s),Tc)===this.root)}paneNodes(){return this.all(ke)}panes(){return this.paneNodes().map((e)=>{let t=this.attribute(e,ke);return{id:t,title:this.attribute(e,"data-title")||t,keywords:this.attribute(e,"data-keywords"),parent:this.attribute(e,"data-parent")}})}itemNodes(){return this.all(ye)}items(){return this.itemNodes().map((e)=>({id:this.attribute(e,ye),label:this.attribute(e,"data-label").trim(),keywords:this.attribute(e,"data-keywords")}))}rowNodes(){return this.all(Ec).filter((e)=>this.paneOf(e)!=="")}paneOf(e){let t=this.closest(e,ke);return t?this.attribute(t,ke):""}stored(){if(!this.options.storageKey||!this.options.storage)return"";try{return this.options.storage.get(we(this.options.storageKey))||""}catch{return""}}store(){if(!this.options.storageKey||!this.options.storage||!this.current)return;try{this.options.storage.set(we(this.options.storageKey),this.current)}catch{}}hear(){let e=new Set;for(let t of this.itemNodes())if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.open(this.attribute(t,ye))));for(let t of this.rowNodes()){if(!this.has(t,"data-navigate"))continue;if(e.add(t),!this.pressed.has(t))this.pressed.set(t,this.tree.listen(t,"click",()=>this.navigate(t)))}for(let[t,s]of this.pressed){if(e.has(t))continue;s(),this.pressed.delete(t)}}navigate(e){if(this.attribute(e,"aria-disabled")==="true")return;let t=this.attribute(e,"data-navigate");if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:this.attribute(e,"data-setting")})}open(e){if(!e)return;this.history=Me(this.history,e),this.show(!0)}travel(e){if(e===this.history)return;this.history=e,this.show(!0)}show(e){let t=this.panes(),s=he(this.history),a=U(t,s);if(!a)return;for(let i of this.paneNodes())this.toggle(i,this.attribute(i,ke)===s);let n=Qe(t,s);for(let i of this.itemNodes()){let r=this.attribute(i,ye)===n;for(let c of[i,...this.tree.descendants(i)])this.tree.setAttribute(c,"aria-selected",r?"true":"false")}let o=this.current!==s;if(this.current=s,this.report(),o){if(this.store(),e)this.callbacks.onPane?.({id:s,title:a.title,parent:ue(t,s)})}}report(){let e=this.panes(),t=U(e,this.current),s=this.query.trim()!=="";this.callbacks.onState?.({pane:this.current,title:t?.title??"",canGoBack:tt(this.history,e),canGoForward:Re(this.history),query:this.query,searching:s,results:this.hits.map(({hit:a},n)=>({position:n,label:a.label,pane:a.paneTitle})),empty:s&&this.shownItems===0&&this.hits.length===0})}shownItems=0;applySearch(e){let t=this.rowNodes(),s=t.map((r)=>({id:this.attribute(r,"data-setting"),label:this.attribute(r,"data-label").trim(),keywords:this.attribute(r,"data-keywords"),pane:this.paneOf(r)})),a=nt(this.query,{panes:this.panes(),items:this.items(),rows:s}),n=a.query!=="",o=new Set;for(let r of this.itemNodes()){let c=!n||a.panes.includes(this.attribute(r,ye));if(c)o.add(r);this.toggle(r,c)}this.shownItems=n?a.panes.length:o.size;let i=!0;for(let r of this.all("data-settings-group")){let c=this.all(ye,r).some((l)=>o.has(l));this.toggle(r,c);for(let l of this.all("data-settings-group-gap",r))this.toggle(l,c&&!i);if(c)i=!1}for(let r of this.all("data-settings-account"))this.toggle(r,!n);if(this.hits=a.settings.map((r)=>({hit:r,row:t[r.row]})),this.report(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:a.panes,settings:a.settings.map((r)=>({id:r.id,label:r.label,pane:r.pane}))})}reveal(e){this.clearHighlight(),this.tree.setAttribute(e,"data-highlight","");let t=this.options.wash?.();if(t)this.tree.setStyle(e,{backgroundColor:t});this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);if(this.highlightTimer=null,this.highlighted)this.tree.removeAttribute(this.highlighted,"data-highlight"),this.tree.setStyle(this.highlighted,{backgroundColor:"transparent"});this.highlighted=null}}var xv={grey:"bg-[#8e8e93] dark:bg-[#8e8e93]",blue:"bg-[#007aff] dark:bg-[#0a84ff]",red:"bg-[#ff3b30] dark:bg-[#ff453a]",orange:"bg-[#ff9500] dark:bg-[#ff9f0a]",yellow:"bg-[#ffcc00] dark:bg-[#ffd60a]",green:"bg-[#34c759] dark:bg-[#30d158]",indigo:"bg-[#5856d6] dark:bg-[#5e5ce6]",purple:"bg-[#af52de] dark:bg-[#bf5af2]",pink:"bg-[#ff2d55] dark:bg-[#ff375f]",ink:"bg-[#1d1d1f] dark:bg-[#dcdce0]"};function bv(e){return e==="ink"?"text-[#ffffff] dark:text-[#1d1d1f]":"text-[#ffffff]"}var le="text-[#000000]/85 dark:text-[#ffffff]/85",ee="text-[#000000]/50 dark:text-[#ffffff]/55",ka="text-[#000000]/26 dark:text-[#ffffff]/25",Ht="text-[#ff3b30] dark:text-[#ff453a]",Ac="text-[#007aff] dark:text-[#0a84ff]",Pc="aria-selected:bg-[#007aff] dark:aria-selected:bg-[#0a84ff]",Sa="aria-selected:text-[#ffffff] dark:aria-selected:text-[#ffffff]",Mc="bg-[#000000]/10 dark:bg-[#ffffff]/10",Ca="bg-[#000000]/4 dark:bg-[#ffffff]/5",vv={shell:"flex-1 flex-row",sidebar:"flex-col bg-[#f2f1f0] dark:bg-[#2a2a2a]",sidebarWidth:226,sidebarMaterial:"sidebar",sidebarTop:"pt-[38px] px-[9px] pb-[6px]",search:"h-[28px] text-[13px]",nav:"flex-1 flex-col px-[9px] pb-[12px]",account:"mt-[7px]",list:"flex-col pt-[7px]",results:"flex-col gap-[2px] pt-[7px]",result:"flex-col justify-center min-h-[38px] px-[8px] py-[4px] rounded-[8px] hover:bg-[#000000]/5 dark:hover:bg-[#ffffff]/6",resultLabel:`text-[13px] ${le}`,resultPane:`text-[11px] ${ee}`,empty:`py-[24px] px-[8px] text-[13px] text-center ${ee}`,group:"flex-col gap-[2px]",groupGap:"h-[11px]",groupLabel:`px-[8px] pb-[3px] text-[11px] font-semibold ${ee}`,item:`flex-row items-center gap-[8px] h-[30px] px-[8px] rounded-[8px] ${Pc}`,itemTile:"h-[20px] w-[20px] rounded-[5.5px] items-center justify-center",itemGlyph:"h-[13px] w-[13px]",itemLabel:`flex-1 text-[13px] ${le} ${Sa}`,itemBadge:`text-[11px] ${ee} ${Sa}`,detail:"flex-1 flex-col bg-[#ffffff] dark:bg-[#1e1e1e]",toolbar:"flex-row items-center gap-[12px] h-[52px] pl-[8px] pr-[16px]",history:"flex-row items-center",historyButton:`text-[15px] ${ee}`,title:`flex-1 text-[20px] font-semibold ${le}`,body:"flex-1 flex-col",pane:"flex-1",paneContent:"flex-col px-[20px] pt-[11px] pb-[20px]",hero:`flex-col items-center mb-[10px] p-[22px] rounded-[12px] ${Ca}`,heroTile:"h-[48px] w-[48px] rounded-[12px] items-center justify-center",heroGlyph:"h-[30px] w-[30px]",heroTitle:`mt-[10px] text-[17px] font-semibold text-center ${le}`,heroDescription:`mt-[4px] text-[13px] text-center ${ee}`,heroExtra:"mt-[8px] flex-col items-center",section:"flex-col mb-[10px]",sectionHeader:`pt-[18px] px-[10px] pb-[8px] text-[13px] font-bold ${le}`,card:`flex-col rounded-[12px] ${Ca}`,sectionFooter:`pt-[6px] px-[10px] text-[11px] ${ee}`,rowRule:`mx-[10px] h-[0.5px] ${Mc}`,row:"flex-row items-center gap-[10px] min-h-[38px] px-[10px]",rowTall:"min-h-[44px]",rowMultiline:"items-start",rowStacked:"flex-col items-stretch gap-[4px] min-h-[38px] px-[10px]",rowPressed:"active:bg-[#000000]/5 dark:active:bg-[#ffffff]/6",rowWash:{light:"#007aff33",dark:"#0a84ff33"},rowTile:"h-[24px] w-[24px] rounded-[6px] items-center justify-center",rowTileMultiline:"mt-[10px]",rowGlyph:"h-[15px] w-[15px]",rowText:"flex-1 flex-col justify-center py-[7px]",rowTextMultiline:"flex-1 flex-col py-[10px]",rowTextStacked:"flex-col pt-[10px]",rowLabel:`text-[13px] ${le}`,rowLabelDestructive:`text-[13px] ${Ht}`,rowDescription:`mt-[1px] text-[11px] ${ee}`,rowControl:"flex-row items-center justify-end gap-[8px]",rowControlMultiline:"flex-row items-center justify-end gap-[8px] py-[10px]",rowControlStacked:"flex-col items-stretch pb-[7px]",rowValue:`text-[13px] ${ee}`,rowChevron:`h-[11px] w-[11px] ${ka}`,rowDisabled:"opacity-50",appearance:"flex-row gap-[14px]",appearanceOption:"flex-col items-center gap-[5px]",appearanceFrame:"p-[3px] rounded-[9px] border-2 border-transparent aria-checked:border-[#007aff] dark:aria-checked:border-[#0a84ff]",appearanceThumb:"h-[44px] w-[67px] flex-row rounded-[6px] overflow-hidden",appearanceLight:"flex-1 bg-[#e9e9eb]",appearanceDark:"flex-1 bg-[#2c2c2e]",appearanceCaption:`text-[11px] ${le}`,updateStatus:`mt-[1px] text-[11px] ${ee}`,updateError:`mt-[1px] text-[11px] ${Ht}`,updateProgress:`text-[11px] ${ee}`,ink:le,inkSecondary:ee,inkTertiary:ka,danger:Ht,accentText:Ac},wv={back:"chevron.left",forward:"chevron.right",disclosure:"chevron.right"};var Rc={check:"Check Now",install:"Download and Install",relaunch:"Restart to Update"};function Nc(e){let t=Number(e);if(!Number.isFinite(t))return"";return`${Math.round(Math.min(1,Math.max(0,t))*100)}%`}function kv(e,t=""){let s=String(t||"").trim(),a=String(e?.currentVersion||"").trim(),n=[s,a].filter(Boolean).join(" "),o=(u,p,h={})=>({title:n,sentence:u,action:p,actionLabel:p?Rc[p]:"",busy:!1,progress:"",failed:!1,...h});if(!e||typeof e.state!=="string")return o("",null);let i=s||"This app",r=String(e.version||"").trim(),c=r?`Version ${r}`:"An update",l=e.selfUpdating!==!1,d=String(e.reason||"").trim();switch(e.state){case"unavailable":return o(d||`${i} cannot update itself.`,null);case"idle":return o("Check for a newer version.","check");case"checking":return o("Checking for updates...","check",{busy:!0});case"current":return o(`${i} is up to date.`,"check");case"available":return l?o(`${c} is available.`,"install"):o(`${c} is available. ${d||`${i} cannot update itself.`}`,"check");case"downloading":return o(`Downloading ${r?`version ${r}`:"the update"}...`,"install",{busy:!0,progress:Nc(e.progress)});case"installing":return o(`Installing ${r?`version ${r}`:"the update"}...`,"install",{busy:!0});case"installed":return o(`${c} is installed. Restart ${i} to finish updating.`,"relaunch");case"error":return o(String(e.error||"").trim()||"The update could not be completed.","check",{failed:!0});default:return o("",null)}}import{loadStaticFragment as Lc}from"@stacksjs/stx/static-fragment-client";var Ft="[data-stx-settings]",ot="[data-settings-item]",$a="[data-settings-pane]",Dc="[data-settings-row]",Vt="[data-settings-result]",Oc='button, a[href], input, select, textarea, label, [role="switch"], [role="checkbox"], [role="radio"], [role="slider"], [role="button"], [contenteditable]';function Ta(e){return e.replace(/[^\w-]+/g,"-")}class zc{root;options;callbacks;history=et();current="";query="";storageKey;storage;typed=null;hits=[];queuedReveal=null;fragmentDownloads=new AbortController;highlighted=null;highlightTimer=null;disposers=[];list;account;input;field;results;empty;live;backButton;forwardButton;title;body;constructor(e,t={},s={}){this.root=e;this.options=t;this.callbacks=s;if(this.storageKey=t.storageKey||"",this.storage=t.storage??null,!e.id)e.id=`settings-${Math.random().toString(36).slice(2,8)}`;this.list=this.own("[data-settings-list]"),this.account=this.own("[data-settings-account]"),this.input=this.own("[data-settings-search-input]"),this.field=this.own("[data-settings-search]"),this.results=this.own("[data-settings-results]"),this.empty=this.own("[data-settings-empty]"),this.live=this.own("[data-settings-live]"),this.backButton=this.own("[data-settings-back]"),this.forwardButton=this.own("[data-settings-forward]"),this.title=this.own("[data-settings-title]"),this.body=this.own("[data-settings-body]");for(let o of[this.results,this.live,this.title])if(o)o.__stx_inert_content=!0;if(this.listen(e,"click",(o)=>this.onClick(o)),this.listen(t.globalKeys?document:e,"keydown",(o)=>this.onKeyDown(o)),this.input)this.listen(this.input,"input",()=>this.search(this.input.value));if(this.body)this.listen(this.body,"scroll",()=>this.syncScrolled(),{passive:!0});this.listen(window,"focus",()=>e.setAttribute("data-stx-window-active","true")),this.listen(window,"blur",()=>e.setAttribute("data-stx-window-active","false")),this.describe();let a=this.panes(),n=this.paneElements().find((o)=>!o.hidden)?.getAttribute("data-settings-pane");this.open(Ze(a,this.stored(),t.pane,n)),e.setAttribute("data-settings-ready","")}getPane(){return this.current}showPane(e){if(!U(this.panes(),e))return!1;return this.open(e),!0}revealSetting(e){if(!e)return!1;let t=this.searchableRows().find((s)=>s.id===e);if(!t)return!1;return this.open(t.pane),this.revealRow(t),!0}back(){this.travel(st(this.history,this.panes()))}forward(){this.travel(at(this.history))}focusSearch(){if(!this.input)return;this.input.focus(),this.input.select()}search(e){if(this.query=e,this.input&&this.input.value!==e)this.input.value=e;this.applySearch(!0)}destroy(){this.fragmentDownloads.abort();for(let e of this.disposers)e();this.disposers.length=0,this.clearHighlight(),this.root.removeAttribute("data-settings-ready")}own(e){return this.all(e)[0]??null}all(e,t=this.root){return Array.from(t.querySelectorAll(e)).filter((s)=>s.closest(Ft)===this.root)}listen(e,t,s,a){e.addEventListener(t,s,a),this.disposers.push(()=>e.removeEventListener(t,s,a))}paneElements(){return this.all($a)}paneElement(e){return this.paneElements().find((t)=>t.getAttribute("data-settings-pane")===e)??null}panes(){return this.paneElements().map((e)=>({id:e.getAttribute("data-settings-pane")||"",title:e.getAttribute("data-title")||e.getAttribute("data-settings-pane")||"",keywords:e.getAttribute("data-keywords")||"",parent:e.getAttribute("data-parent")||""})).filter((e)=>e.id!=="")}itemElements(){return this.list?this.all(ot,this.list):[]}visibleItems(){return this.itemElements().filter((e)=>!e.hidden&&!e.disabled)}labelOf(e){return(e.querySelector(".stx-settings-item-label")?.textContent||e.getAttribute("aria-label")||e.textContent||"").trim()}items(){return this.itemElements().map((e)=>({id:e.getAttribute("data-settings-item")||"",label:this.labelOf(e),keywords:e.getAttribute("data-keywords")||""}))}rowElements(e){return this.all(Dc,e).filter((t)=>t.closest($a)===e)}searchableRows(){return this.paneElements().flatMap((e)=>{let t=e.getAttribute("data-settings-pane")||"";if(!t)return[];if(e.hasAttribute("data-stx-fragment"))return JSON.parse(e.getAttribute("data-stx-fragment-metadata")||"[]").map(([a,n,o],i)=>({id:a,label:n.trim(),keywords:o,pane:t,position:i}));return this.rowElements(e).map((s,a)=>({id:s.getAttribute("data-setting")||"",label:(s.getAttribute("data-label")||"").trim(),keywords:s.getAttribute("data-keywords")||"",pane:t,position:a}))})}stored(){if(!this.storageKey)return"";try{let e=we(this.storageKey);return(this.storage?this.storage.get(e):localStorage.getItem(e))||""}catch{return""}}store(){if(!this.storageKey||!this.current)return;try{let e=we(this.storageKey);if(this.storage)this.storage.set(e,this.current);else localStorage.setItem(e,this.current)}catch{}}describe(){let e=this.root.id,t=new Map;for(let s of this.itemElements()){let a=s.getAttribute("data-settings-item")||"";if(!s.id)s.id=`${e}-item-${Ta(a)}`;s.setAttribute("role","tab"),t.set(a,s);for(let n=s.parentElement;n&&n!==this.list;n=n.parentElement)if(!n.hasAttribute("role"))n.setAttribute("role","presentation")}for(let s of this.paneElements()){let a=s.getAttribute("data-settings-pane")||"";if(!s.id)s.id=`${e}-pane-${Ta(a)}`;let n=t.get(a);if(n)n.setAttribute("aria-controls",s.id),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",n.id),s.removeAttribute("aria-label");else if(this.title?.id){if(s.setAttribute("role","region"),!s.hasAttribute("aria-label"))s.setAttribute("aria-label",s.getAttribute("data-title")||a)}}}open(e){if(!e)return;this.history=Me(this.history,e),this.show()}travel(e){if(e===this.history)return;this.history=e,this.show()}show(){this.describe();let e=this.panes(),t=he(this.history),s=U(e,t),a=this.paneElement(t);if(!s||!a)return;let n=document.activeElement,o=n instanceof HTMLElement&&this.paneElements().some((c)=>c!==a&&c.contains(n));for(let c of this.paneElements())c.hidden=c!==a,c.toggleAttribute("data-active",c===a);let i=Qe(e,t);for(let c of this.itemElements()){let l=c.getAttribute("data-settings-item")===i;c.setAttribute("aria-selected",l?"true":"false"),c.toggleAttribute("data-active",l)}if(this.syncTabStops(),this.title)this.title.textContent=s.title;this.root.setAttribute("data-pane",t),this.root.toggleAttribute("data-subpane",ue(e,t)!==""),this.syncHistoryButtons(e);let r=t!==this.current;if(this.current=t,r){if(this.queuedReveal=null,this.clearHighlight(),this.body)this.body.scrollTop=0;if(this.syncScrolled(),o){if(!a.hasAttribute("tabindex"))a.setAttribute("tabindex","-1");a.focus({preventScroll:!0})}this.store(),this.callbacks.onPane?.({id:t,title:s.title,parent:ue(e,t)})}if(a.hasAttribute("data-stx-fragment")&&!a.hasChildNodes())this.loadPane(a)}async loadPane(e){let t=document.createElement("p");if(t.setAttribute("role","status"),t.textContent=this.options.loadingPane??"Loading settings\u2026",e.contains(document.activeElement))e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0});e.replaceChildren(t),e.setAttribute("aria-busy","true");let s=this.fragmentDownloads.signal;try{await Lc(e,s);let a=this.queuedReveal;if(a&&this.current===a.pane&&this.paneElement(a.pane)===e)this.queuedReveal=null,this.revealRow(a)}catch{if(s.aborted||!e.isConnected)return;t.textContent=this.options.failedPane??"Could not load this pane.";let a=document.createElement("button");a.type="button",a.textContent=this.options.retryPane??"Try again",a.addEventListener("click",()=>void this.loadPane(e),{once:!0}),e.replaceChildren(t,a)}finally{e.removeAttribute("aria-busy")}}syncTabStops(){let e=this.visibleItems(),t=e.find((s)=>s.getAttribute("aria-selected")==="true")??e[0];for(let s of this.itemElements())s.setAttribute("tabindex",s===t?"0":"-1")}syncHistoryButtons(e){let t=(n,o,i)=>{if(!n)return;let r=document.activeElement===n;if(n.disabled=!o,r&&!o&&i&&!i.disabled)i.focus()},s=tt(this.history,e),a=Re(this.history);if(s)t(this.backButton,!0,null),t(this.forwardButton,a,this.backButton);else t(this.forwardButton,a,null),t(this.backButton,!1,this.forwardButton)}syncScrolled(){this.root.toggleAttribute("data-scrolled",Boolean(this.body&&this.body.scrollTop>0))}applySearch(e){let t=this.searchableRows(),s=nt(this.query,{panes:this.panes(),items:this.items(),rows:t}),a=s.query!=="";this.root.toggleAttribute("data-searching",a),this.field?.toggleAttribute("data-filled",this.query!=="");for(let o of this.itemElements())o.hidden=a&&!s.panes.includes(o.getAttribute("data-settings-item")||"");if(this.list){for(let o of this.all("[data-settings-group]",this.list))o.hidden=a&&this.all(ot,o).every((i)=>i.hidden);this.list.hidden=a&&s.panes.length===0}if(this.account)this.account.hidden=a;this.hits=s.settings.map((o)=>({hit:o,row:t[o.row]})),this.drawResults();let n=s.panes.length+s.settings.length;if(this.empty)this.empty.hidden=!a||n>0;if(this.live)this.live.textContent=a?va(n):"";if(this.syncTabStops(),e)this.callbacks.onSearch?.({query:this.query.trim(),panes:s.panes,settings:s.settings.map((o)=>({id:o.id,label:o.label,pane:o.pane}))})}drawResults(){let e=this.results;if(!e)return;e.replaceChildren(),e.hidden=this.hits.length===0,this.hits.forEach(({hit:t},s)=>{let a=document.createElement("button");a.type="button",a.className="stx-settings-result",a.setAttribute("data-settings-result",String(s)),a.setAttribute("tabindex","-1");let n=document.createElement("span");n.className="stx-settings-result-label",n.textContent=t.label;let o=document.createElement("span");o.className="stx-settings-result-pane",o.textContent=t.paneTitle,a.append(n,o),e.append(a)})}chooseResult(e){let t=this.hits[e];if(!t)return;this.open(t.hit.pane),this.revealRow(t.row)}clearSearch(){if(this.query===""&&(!this.input||this.input.value===""))return;this.search("")}revealRow(e){let t=this.paneElement(e.pane);if(!t)return;if(t.hasAttribute("data-stx-fragment")){this.queuedReveal=e;return}let s=this.rowElements(t),a=e.id?s.find((n)=>n.getAttribute("data-setting")===e.id):s[e.position];if(a)this.reveal(a)}reveal(e){if(this.body){let t=this.body.getBoundingClientRect(),s=e.getBoundingClientRect();this.body.scrollTop+=s.top-t.top-(t.height-s.height)/2,this.syncScrolled()}this.clearHighlight(),e.setAttribute("data-highlight",""),this.highlighted=e,this.highlightTimer=setTimeout(()=>this.clearHighlight(),Xe)}clearHighlight(){if(this.highlightTimer)clearTimeout(this.highlightTimer);this.highlightTimer=null,this.highlighted?.removeAttribute("data-highlight"),this.highlighted=null}inside(e){return e instanceof Element&&e.closest(Ft)===this.root}navigationRow(e){let t=e.closest("[data-navigate]");if(!t||t.closest(Ft)!==this.root||t.getAttribute("aria-disabled")==="true")return null;let s=e.closest(Oc);if(s&&s!==t&&t.contains(s))return null;return t}navigate(e){let t=e.getAttribute("data-navigate")||"";if(!U(this.panes(),t))return;let s=this.current;this.open(t),this.callbacks.onNavigate?.({id:t,from:s,setting:e.getAttribute("data-setting")||""})}onClick(e){let t=e.target;if(!this.inside(t))return;let s=t.closest(ot);if(s&&this.list?.contains(s)){this.open(s.getAttribute("data-settings-item")||"");return}let a=t.closest(Vt);if(a){this.chooseResult(Number(a.getAttribute("data-settings-result")));return}if(t.closest("[data-settings-back]")){this.back();return}if(t.closest("[data-settings-forward]")){this.forward();return}if(t.closest("[data-settings-search-clear]")){this.clearSearch(),this.input?.focus();return}let n=this.navigationRow(t);if(n)this.navigate(n)}onKeyDown(e){if(e.defaultPrevented)return;let t=(e.metaKey||e.ctrlKey)&&!e.altKey;if(t&&!e.shiftKey){let o=e.key.toLowerCase();if(o==="f"&&this.input){e.preventDefault(),this.focusSearch();return}if(o==="["){e.preventDefault(),this.back();return}if(o==="]"){e.preventDefault(),this.forward();return}}let s=e.target;if(!this.inside(s))return;if(e.key==="Escape"&&this.query!==""){e.preventDefault(),this.clearSearch(),this.visibleItems().find((o)=>o.getAttribute("tabindex")==="0")?.focus();return}if(s===this.input){this.onSearchKey(e);return}let a=s.closest(Vt);if(a){this.onResultKey(e,a);return}let n=s.closest(ot);if(n&&this.list?.contains(n)){this.onItemKey(e,n);return}if((e.key==="Enter"||e.key===" ")&&!t&&!e.altKey){let o=s.closest("[data-navigate]");if(o&&o===s&&this.navigationRow(s))e.preventDefault(),this.navigate(o)}}resultButtons(){return this.results?Array.from(this.results.querySelectorAll(Vt)):[]}onSearchKey(e){if(e.key==="ArrowDown"){let t=this.visibleItems()[0]??this.resultButtons()[0];if(t)e.preventDefault(),t.focus()}else if(e.key==="Enter"&&this.query.trim()!==""){e.preventDefault();let t=this.visibleItems()[0];if(t)this.open(t.getAttribute("data-settings-item")||"");else this.chooseResult(0)}}onResultKey(e,t){let s=this.resultButtons(),a=s.indexOf(t);if(e.key==="ArrowUp"&&a===0){let o=this.visibleItems(),i=o[o.length-1]??this.input;if(i)e.preventDefault(),i.focus();return}let n=zt(e.key,a,s.length);if(n===-1)return;e.preventDefault(),s[n].focus()}onItemKey(e,t){if(e.metaKey||e.ctrlKey||e.altKey)return;let s=this.visibleItems(),a=s.indexOf(t);if(e.key==="ArrowDown"&&a===s.length-1){let o=this.resultButtons()[0];if(o){e.preventDefault(),o.focus();return}}let n=zt(e.key,a,s.length);if(n===-1&&e.key.length===1&&(e.key!==" "||this.typed!==null)){let o=wa(this.typed,e.key,Date.now());if(e.key===" "&&o.buffer.trim()===""){this.typed=null;return}if(this.typed=o,n=ya(s.map((i)=>this.labelOf(i)),o.buffer,a),n===-1){e.preventDefault();return}}if(n===-1)return;e.preventDefault(),s[n].focus(),this.open(s[n].getAttribute("data-settings-item")||"")}}var Fc="./Sidebar-7rya9gcp.stx";var jc="./SidebarFooter-s7skj92y.stx";var _c="./SidebarHeader-x7jdhmyr.stx";var Kc="./SidebarItem-64sjb2fe.stx";var Gc="./SidebarPinned-48kyk193.stx";var Jc="./SidebarSection-vx5bahsk.stx";var Xc="./SidebarSpace-3w1cfnzj.stx";var Qc="./SidebarSpaces-mdtrynr2.stx";var td="./SidebarSpaceSwitcher-1mycft2g.stx";var it={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},fe={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}},sd={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}},ad={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}},nd={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}},od={...fe,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},id={...fe,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},rd={...fe,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ea={macos:fe,tahoe:fe,"macos-tahoe":fe,"macos-latest":fe,arc:nd,workspace:sd,desktop:ad,solid:od,transparent:id,vibrancy:rd};function Yv(e){return Ea[e||"macos"]||Ea.macos}function Xv(e){if(!e)return;return it[e]||e}var ld=it.gray;function ce(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ia(e){return{light:{from:ce(e,35,"#ffffff"),to:ce(e,12.5,"#ffffff"),ink:ce(e,22,"#17171b"),accent:ce(e,88,"#2a2a30")},dark:{from:ce(e,27,"#101014"),to:ce(e,10,"#08080b"),ink:ce(e,12,"#f4f4f7"),accent:ce(e,74,"#ffffff")}}}function ew(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function cd(e){if(!e)return Ia(ld);if(typeof e!=="string")return e;return Ia(it[e]||e)}function dd(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 Aa(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function pd(e){let t=cd(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Aa(e.action,e.id,"action","i-f7-plus"),clear:Aa(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:dd(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function tw(e){return(e||[]).map(pd)}function sw(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function aw(e){return e.map((t)=>t.tint)}var hd="./Skeleton-m4p66zcs.stx";var yw=101;function Se(e,t){let s=typeof e==="number"?e:Number.parseFloat(String(e));return Number.isFinite(s)?s:t}function kw(e,t,s){let a=Se(e,0),n=Se(t,100),o=Se(s,1);return{min:Math.min(a,n),max:Math.max(a,n),step:o>0?o:0}}function Pa(e){if(!Number.isFinite(e))return 0;let t=String(e).toLowerCase(),s=t.indexOf("e-");if(s!==-1)return Number.parseInt(t.slice(s+2),10)+Math.max(0,t.slice(0,s).split(".")[1]?.length??0);return t.split(".")[1]?.length??0}function me(e,t){let{min:s,max:a,step:n}=t,o=Math.min(a,Math.max(s,Se(e,s)));if(n<=0)return o;let i=Math.round((o-s)/n),r=Math.floor((a-s)/n+0.0000001);if(i>r)i=r;let c=Math.max(Pa(n),Pa(s));return Number((s+i*n).toFixed(Math.min(c,20)))}function Sw(e,t){let s=t.max-t.min;if(s<=0)return 0;return(Math.min(t.max,Math.max(t.min,Se(e,t.min)))-t.min)/s}function Cw(e,t){let s=Math.min(1,Math.max(0,Number.isFinite(e)?e:0));return me(t.min+s*(t.max-t.min),t)}function $w(e,t){let s=t.max-t.min;if(s<=0||e===!1||e==null||e===""||e==="false")return[];if(e===!0||e==="true"){if(t.step<=0)return[];let n=Math.floor(s/t.step+0.0000001)+1;if(n<2||n>101)return[];return Array.from({length:n},(o,i)=>Math.min(1,i*t.step/s))}let a=Math.floor(Se(e,0));if(a<2||a>101)return[];return Array.from({length:a},(n,o)=>o/(a-1))}function Tw(e,t,s,a=10){let n=s.step>0?s.step:(s.max-s.min)/100;if(e==="ArrowRight"||e==="ArrowUp")return me(t+n,s);if(e==="ArrowLeft"||e==="ArrowDown")return me(t-n,s);if(e==="PageUp")return me(t+n*a,s);if(e==="PageDown")return me(t-n*a,s);if(e==="Home")return me(s.min,s);if(e==="End")return me(s.max,s);return null}var md="./Slider-cebse060.stx";var xd="./Spinner-vhnc3y03.stx";function bd(e){return Array.from({length:e},()=>1/e)}function rt(e,t){if(t<=0)return[];if(!e||e.length!==t||e.some((a)=>typeof a!=="number"||!Number.isFinite(a)||a<=0))return bd(t);let s=e.reduce((a,n)=>a+n,0);return e.map((a)=>a/s)}function Ma(e){let t=e;if(typeof e==="string"){let a=e.trim();if(a==="")return null;if(a.charAt(0)==="[")try{t=JSON.parse(a)}catch{return null}else t=a.split(/[\s,]+/).map((n)=>Number.parseFloat(n))}if(!Array.isArray(t)||t.length===0)return null;let s=t.map((a)=>typeof a==="string"?Number.parseFloat(a):a);return s.every((a)=>typeof a==="number"&&Number.isFinite(a)&&a>0)?s:null}function jt(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 Ra(e,t,s){let a=e.length;if(a===0||t<=0)return[...e];let n=s.map((c)=>Math.max(0,c.min)),o=n.reduce((c,l)=>c+l,0);if(o>=t)return o===0?[...e]:n.map((c)=>c/o);let i=e.map((c)=>c*t);for(let c=0;c<=a;c++){let l=0;for(let p=0;p<a;p++){let h=Math.min(Math.max(i[p],n[p]),s[p].max);l+=i[p]-h,i[p]=h}if(Math.abs(l)<0.000000001)break;let d=i.map((p,h)=>l>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<a;p++){let h=(Number.isFinite(d[p])?d[p]:t)/u;i[p]+=l*h}}let r=i.reduce((c,l)=>c+l,0);return i.map((c)=>c/r)}function Bt(e,t,s,a,n){let o=e.length;if(t<0||t>=o-1||a<=0||s===0)return[...e];let i=e.map((p)=>p*a),r=s>0,c=r?t:t+1,l=r?1:-1,d=Math.min(Math.abs(s),n[c].max-i[c]);if(d<=0)return[...e];let u=0;for(let p=r?t+1:t;p>=0&&p<o&&d>0.000000001;p+=l){let h=Math.min(d,Math.max(0,i[p]-Math.max(0,n[p].min)));i[p]-=h,u+=h,d-=h}return i[c]+=u,i.map((p)=>p/a)}function lt(e,t,s,a){let n=e.map((i)=>i*s),o=(i,r)=>{let c=0;for(let l=i;l<=r;l++)c+=Math.max(0,n[l]-Math.max(0,a[l].min));return c};return{back:Math.min(o(0,t),a[t+1].max-n[t+1]),forward:Math.min(o(t+1,e.length-1),a[t].max-n[t])}}function Na(e,t,s,a){let n=lt(e,t,s,a),o=e[t]*100,i=s>0?100/s:0;return{now:Math.round(o),min:Math.round(o-n.back*i),max:Math.round(o+n.forward*i)}}function _t(e){return`stx:split-pane:${e}`}function La(e){return JSON.stringify(e.map((t)=>Math.round(t*1e4)/1e4))}var wd="./SplitPane-7sqfdwqa.stx";var Da="data-split-separator";class yd{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=rt(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=rt(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 a of this.separators){let n=a.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(Da)),this.limits=this.panes.map((e)=>({min:jt(e.getAttribute("data-min-size"),this.minSize),max:jt(e.getAttribute("data-max-size"),Number.POSITIVE_INFINITY)}))}startingSizes(e){let t=this.panes.map((a)=>Number.parseFloat(a.getAttribute("data-size")||"")),s=t.every((a)=>Number.isFinite(a)&&a>0)?t:null;return rt(e&&e.length===this.panes.length?e:s,this.panes.length)}stored(){if(!this.storageKey)return null;try{let e=Ma(localStorage.getItem(_t(this.storageKey)));return e&&e.length===this.panes.length?e:null}catch{return null}}store(){if(!this.storageKey)return;try{localStorage.setItem(_t(this.storageKey),La(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 a=document.createElement("div");a.setAttribute(Da,""),a.setAttribute("role","separator"),a.setAttribute("tabindex","0"),a.setAttribute("aria-orientation",this.direction==="horizontal"?"vertical":"horizontal"),a.setAttribute("aria-controls",t.id),a.setAttribute("aria-label",this.panes.length>2?`${this.label} ${s+1} and ${s+2}`:this.label),a.className="stx-split-separator",t.after(a),this.separators.push(a);let n=(o,i)=>{a.addEventListener(o,i),this.disposers.push(()=>a.removeEventListener(o,i))};n("pointerdown",(o)=>this.onPointerDown(o,s)),n("pointermove",(o)=>this.onPointerMove(o)),n("pointerup",(o)=>this.onPointerEnd(o)),n("pointercancel",(o)=>this.onPointerEnd(o)),n("dblclick",()=>this.reset(s)),n("keydown",(o)=>this.onKeyDown(o,s))})}apply(e){let t=this.available();if(t>0)this.sizes=Ra(this.sizes,t,this.limits);if(this.panes.forEach((s,a)=>{s.style.flex=`${(this.sizes[a]*1000).toFixed(3)} 1 0px`}),this.separators.forEach((s,a)=>{let n=Na(this.sizes,a,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 a=this.available(),n={sizes:[...this.sizes],pixels:this.sizes.map((o)=>Math.round(o*a)),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=Bt(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",a=this.available(),n=this.step*(e.shiftKey?5:1),o=0;if(e.key===(s?"ArrowLeft":"ArrowUp"))o=-n;else if(e.key===(s?"ArrowRight":"ArrowDown"))o=n;else if(e.key==="Home")o=-lt(this.sizes,t,a,this.limits).back;else if(e.key==="End")o=lt(this.sizes,t,a,this.limits).forward;else if(e.key==="Enter"){e.preventDefault(),this.reset(t);return}else return;e.preventDefault(),this.sizes=Bt(this.sizes,t,o,a,this.limits),this.apply(!0),this.report(t,"keyboard",!0)}}var Sd="./Stepper-68gxcmej.stx";var $d="./StepperStep-zf4pq1s0.stx";class ct{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 a=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((o)=>o(n,a,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 a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],n="";for(let o=0;o<e.length;o++){let i=e.charAt(o),r=n+i;if(t[r]!==void 0)n=r;else a.push(n.length>1?t[n]:n.charCodeAt(0)),t[r]=s++,n=i}if(n!=="")a.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,n=String.fromCharCode(t[0]),o=n;for(let i=1;i<t.length;i++){let r=t[i],c;if(s[r]!==void 0)c=s[r];else if(r===a)c=n+n.charAt(0);else return e;o+=c,s[a++]=n+c.charAt(0),n=c}return o}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),n=this.get(e),o={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let i=JSON.stringify(o);if(s?.compress)i=this.compress(i);if(s?.encrypt)i=this.encrypt(i);this.storage.setItem(a,i),this.notifyWatchers(e,t,n)}catch(i){console.error("Storage set error:",i)}}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 a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.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 a=this.watchers.get(e);if(a)a.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 a=this.storage.key(s);if(a){let n=this.storage.getItem(a)||"";e+=a.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,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Uw={local:new ct("local"),session:new ct("session")};function Jw(e="local",t){return new ct(e,t)}var Ed="./Switch-7s3bhjg4.stx";var Ad="./Table-0a4y46vd.stx";var Md="./TableBody-y49bqb1p.stx";var Nd="./TableCell-jhvsxw8b.stx";var Dd="./TableHead-e9xvjx2j.stx";var zd="./TableHeader-krzcx4sv.stx";var Fd="./TableRow-dt8e11aj.stx";var jd="./Tab-j9f4t166.stx";var _d="./TabList-r1pc87xs.stx";var Kd="./TabPanel-5htevsq6.stx";var Gd="./Tabs-psm5wj7c.stx";var Jd="./Teleport-vqs75x36.stx";var Xd="./Textarea-bb63fsz0.stx";var Qd="./AiTextarea-bg6xq5wc.stx";var tp="./Tooltip-68ka4jw7.stx";var ap="./Transition-7m0mk45s.stx";var op="./Video-bqsx3wr8.stx";var rp="./VirtualList-fa7v5a3h.stx";var cp="./VirtualTable-kp7b3wyv.stx";var dp=0;function Oa(e="a11y"){return`${e}-${++dp}-${Date.now()}`}function Ky(e,t,s={}){let{visible:a=!1,id:n=Oa("label")}=s,o=document.createElement(a?"label":"span");if(o.id=n,o.textContent=e,!a)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"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return n}function Wy(e,t){let s=Oa("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,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"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function Gy(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 qt(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 Uy(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:n=!0,clickOutsideDeactivates:o=!0,allowOutsideClick:i=!1,onActivate:r,onDeactivate:c}=t,l=!1,d=!1,u=null,p=(v)=>{if(d)return;if(n&&v.key==="Escape"){v.preventDefault(),m();return}if(v.key==="Tab"){let b=qt(e);if(b.length===0){v.preventDefault();return}let C=b[0],P=b[b.length-1];if(v.shiftKey){if(document.activeElement===C)v.preventDefault(),P.focus()}else if(document.activeElement===P)v.preventDefault(),C.focus()}},h=(v)=>{if(d)return;if(!e.contains(v.target)){if(typeof i==="function"){if(!i(v)&&o)m()}else if(!i&&o)m()}};function g(){if(l)return;l=!0,u=document.activeElement;let v=s||qt(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",p),document.addEventListener("click",h),r?.()}function m(){if(!l)return;l=!1;let v=a||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 Jy(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:n="both",loop:o=!0,onFocusChange:i}=t,r=a,c=()=>Array.from(e.querySelectorAll(s)),l=(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")}),r=u,i?.(u,p[u])},d=(u)=>{let h=c().length-1,g=!1,m=r;switch(u.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(m=r+1,m>h)m=o?0:h;g=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(m=r-1,m<0)m=o?h:0;g=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(m=r+1,m>h)m=o?0:h;g=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(m=r-1,m<0)m=o?h:0;g=!0}break;case"Home":m=0,g=!0;break;case"End":m=h,g=!0;break}if(g)u.preventDefault(),l(m)};return l(a),e.addEventListener("keydown",d),()=>{e.removeEventListener("keydown",d)}}var Yy={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Xy(e){return document.activeElement===e}function Zy(e,t){let s=t||document.activeElement,a=qt(document.body),n=a.indexOf(s);if(n===-1)return;let o=e==="next"?n+1:n-1,i=a[o];if(i)i.focus()}function Qy(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 e0={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 t0(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 s0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function a0(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function n0(){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 o0(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 i0(e){let t=[],s=(a)=>{let n=e.getAttribute(a);if(n){let o=n.split(" ");for(let i of o)if(!document.getElementById(i))t.push(`${a} references non-existent ID: ${i}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var pp=(e,t,s,a)=>s*e/a+t,up=(e,t,s,a)=>(e/=a,s*e*e+t),hp=(e,t,s,a)=>(e/=a,-s*e*(e-2)+t),fp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},mp=(e,t,s,a)=>(e/=a,s*e*e*e+t),gp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e+1)+t),xp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},bp=(e,t,s,a)=>(e/=a,s*e*e*e*e+t),vp=(e,t,s,a)=>(e/=a,e--,-s*(e*e*e*e-1)+t),wp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},yp=(e,t,s,a)=>(e/=a,s*e*e*e*e*e+t),kp=(e,t,s,a)=>(e/=a,e--,s*(e*e*e*e*e+1)+t),Sp=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Cp=(e,t,s,a)=>-s*Math.cos(e/a*(Math.PI/2))+s+t,$p=(e,t,s,a)=>s*Math.sin(e/a*(Math.PI/2))+t,Tp=(e,t,s,a)=>-s/2*(Math.cos(Math.PI*e/a)-1)+t,Ep=(e,t,s,a)=>e===0?t:s*2**(10*(e/a-1))+t,Ip=(e,t,s,a)=>e===a?t+s:s*(-(2**(-10*e/a))+1)+t,Ap=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Pp=(e,t,s,a)=>(e/=a,-s*(Math.sqrt(1-e*e)-1)+t),Mp=(e,t,s,a)=>(e/=a,e--,s*Math.sqrt(1-e*e)+t),Rp=(e,t,s,a)=>{if(e/=a/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},Np=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return e-=1,-(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t},Lp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!o)o=a*0.3;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);return i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)+s+t},Dp=(e,t,s,a)=>{let n=1.70158,o=0,i=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!o)o=a*0.44999999999999996;if(i<Math.abs(s))i=s,n=o/4;else n=o/(2*Math.PI)*Math.asin(s/i);if(e<1)return e-=1,-0.5*(i*2**(10*e)*Math.sin((e*a-n)*(2*Math.PI)/o))+t;return e-=1,i*2**(-10*e)*Math.sin((e*a-n)*(2*Math.PI)/o)*0.5+s+t},Op=(e,t,s,a)=>(e/=a,s*e*e*(2.70158*e-1.70158)+t),zp=(e,t,s,a)=>(e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Hp=(e,t,s,a)=>{let n=1.70158;if(e/=a/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},Kt=(e,t,s,a)=>{if(e/=a,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},za=(e,t,s,a)=>s-Kt(a-e,0,s,a)+t,Fp=(e,t,s,a)=>{if(e<a/2)return za(e*2,0,s,a)*0.5+t;return Kt(e*2-a,0,s,a)*0.5+s*0.5+t},l0={linear:pp,easeInQuad:up,easeOutQuad:hp,easeInOutQuad:fp,easeInCubic:mp,easeOutCubic:gp,easeInOutCubic:xp,easeInQuart:bp,easeOutQuart:vp,easeInOutQuart:wp,easeInQuint:yp,easeOutQuint:kp,easeInOutQuint:Sp,easeInSine:Cp,easeOutSine:$p,easeInOutSine:Tp,easeInExpo:Ep,easeOutExpo:Ip,easeInOutExpo:Ap,easeInCirc:Pp,easeOutCirc:Mp,easeInOutCirc:Rp,easeInElastic:Np,easeOutElastic:Lp,easeInOutElastic:Dp,easeInBack:Op,easeOutBack:zp,easeInOutBack:Hp,easeInBounce:za,easeOutBounce:Kt,easeInOutBounce:Fp};function Vp(e,t={}){let{duration:s="1s",timing:a="ease",delay:n="0s",iteration:o="1",direction:i="normal",fill:r="both",playState:c="running"}=t;return`${e} ${s} ${a} ${n} ${o} ${i} ${r} ${c}`}function Ha(e,t,s={}){e.style.animation=Vp(t,s)}function d0(e){e.style.animation=""}function jp(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function p0(e,t,s={}){let{stagger:a=100,...n}=s;e.forEach((o,i)=>{let r=`${i*a}ms`;Ha(o,t,{...n,delay:r})})}async function u0(e,t){for(let s of t)Ha(e,s.name,s.options),await jp(e)}var h0={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 f0(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function m0(e,t){let s=`
14
14
  @keyframes ${e} {
15
15
  ${Object.entries(t).map(([n,o])=>{let i=Object.entries(o).map(([r,c])=>`${r}: ${c};`).join(" ");return`${n} { ${i} }`}).join(`
16
16
  `)}
17
17
  }
18
- `,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function jp(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:n="ease",delay:o=0,iterations:i=1,direction:r="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:n,delay:o,iterations:i,direction:r,fill:c})}var Bp={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 m0(e,t,s={}){return jp(e,Bp[t],s)}function _p(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}}var Fa="__stxComponentApis";function Wt(){let e=globalThis;return e[Fa]??(e[Fa]=Object.create(null))}function x0(e,t){if(!e)return()=>{};let s=Wt();return s[e]=t,()=>{if(s[e]===t)delete s[e]}}function b0(e){let t=_p(e);if(!t||typeof t.closest!=="function"){let a=typeof e==="string"?e.replace(/^#/,""):"";return a&&a in Wt()?Wt()[a]: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 a of Array.from(t.querySelectorAll("[data-stx-scope]")))if(a.__stx_exposed)return a.__stx_exposed;return null}var Va=["keyword","string","comment","numeric","constant","function","operator","punctuation","type","variable","tag","attribute"],Gt={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"},Ut={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"},Kp=["background","foreground",...Va];function dt(e,t=" "){return Kp.map((s)=>`${t}--stx-syntax-${s}: ${e[s]};`).join(`
18
+ `,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function Bp(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:n="ease",delay:o=0,iterations:i=1,direction:r="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:n,delay:o,iterations:i,direction:r,fill:c})}var _p={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 x0(e,t,s={}){return Bp(e,_p[t],s)}function qp(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}}var Fa="__stxComponentApis";function Wt(){let e=globalThis;return e[Fa]??(e[Fa]=Object.create(null))}function v0(e,t){if(!e)return()=>{};let s=Wt();return s[e]=t,()=>{if(s[e]===t)delete s[e]}}function w0(e){let t=qp(e);if(!t||typeof t.closest!=="function"){let a=typeof e==="string"?e.replace(/^#/,""):"";return a&&a in Wt()?Wt()[a]: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 a of Array.from(t.querySelectorAll("[data-stx-scope]")))if(a.__stx_exposed)return a.__stx_exposed;return null}var Va=["keyword","string","comment","numeric","constant","function","operator","punctuation","type","variable","tag","attribute"],Gt={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"},Ut={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"},Kp=["background","foreground",...Va];function dt(e,t=" "){return Kp.map((s)=>`${t}--stx-syntax-${s}: ${e[s]};`).join(`
19
19
  `)}function Jt(){return Va.map((e)=>`.tok-${e} { color: var(--stx-syntax-${e}); }`).concat(".tok-comment { font-style: italic; }").join(`
20
- `)}function qp(){let e=dt(Gt),t=dt(Ut);return[`:where(:root) {
20
+ `)}function Wp(){let e=dt(Gt),t=dt(Ut);return[`:where(:root) {
21
21
  ${e}
22
22
  }`,`@media (prefers-color-scheme: dark) {
23
23
  :where(:root:not(.light)) {
@@ -31,25 +31,25 @@ ${e}
31
31
  ${t}
32
32
  }`,Jt()].join(`
33
33
  `)}function Yt(){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 ja(){return`${qp()}
35
- ${Yt()}`}var Ba=null;function Wp(){return Ba??=import("ts-syntax-highlighter/browser").catch(()=>null),Ba}var Xt=null,_a="github-light",Ka="github-dark";function Zt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Gp(e){return`<pre class="syntax"><code>${Zt(e)}</code></pre>`}async function k0(){if(!Xt){let{createHighlighter:e}=await import("ts-syntax-highlighter");Xt=await e({theme:"github-light"})}return Xt}async function Up(e,t={}){let s=await Wp();if(!s)return null;let a;try{let i=await s.resolveGrammar(t.language??"typescript");if(!i)return null;a=new s.Tokenizer(i).tokenizeLinesFrom(e.replace(/\r\n?/g,`
34
+ `)}function ja(){return`${Wp()}
35
+ ${Yt()}`}var Ba=null;function Gp(){return Ba??=import("ts-syntax-highlighter/browser").catch(()=>null),Ba}var Xt=null,_a="github-light",qa="github-dark";function Zt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Up(e){return`<pre class="syntax"><code>${Zt(e)}</code></pre>`}async function C0(){if(!Xt){let{createHighlighter:e}=await import("ts-syntax-highlighter");Xt=await e({theme:"github-light"})}return Xt}async function Jp(e,t={}){let s=await Gp();if(!s)return null;let a;try{let i=await s.resolveGrammar(t.language??"typescript");if(!i)return null;a=new s.Tokenizer(i).tokenizeLinesFrom(e.replace(/\r\n?/g,`
36
36
  `).split(`
37
- `)).lines}catch{return null}let n=a.map((i)=>{let r="",c="",l="",d=()=>{if(c!=="")r+=l===""?Zt(c):`<span class="tok-${l}">${Zt(c)}</span>`;c=""};for(let h of i.tokens){let p=s.tokenClass(h.type);if(p!==l)d(),l=p;c+=h.content}return d(),`<span class="line">${r}</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 Jp(e){if(e==="auto")return ja();return[`[data-syntax-theme="${e}"] {
37
+ `)).lines}catch{return null}let n=a.map((i)=>{let r="",c="",l="",d=()=>{if(c!=="")r+=l===""?Zt(c):`<span class="tok-${l}">${Zt(c)}</span>`;c=""};for(let u of i.tokens){let p=s.tokenClass(u.type);if(p!==l)d(),l=p;c+=u.content}return d(),`<span class="line">${r}</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 Yp(e){if(e==="auto")return ja();return[`[data-syntax-theme="${e}"] {
39
39
  ${dt(e==="dark"?Ut:Gt)}
40
40
  }`,Jt(),Yt()].join(`
41
- `)}async function S0(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:n=!1}=t,o=await Up(e,{language:a,theme:s,lineNumbers:n});if(o===null)return{html:Gp(e),css:"",language:a,theme:s==="dark"?Ka:_a};return{html:o,css:Jp(s),language:a,theme:s==="auto"?"auto":s==="dark"?Ka:_a}}function C0(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 T0(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 ie=null,Yp=(e)=>e===1?0:1;function pt(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function Qt(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>t[a]!==void 0?String(t[a]):s)}function E0(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:n={},dateTimeFormats:o={},numberFormats:i={},missing:r,warnMissing:c=!0}=e;function l(y,v={}){let b=pt(a[t],y);if(b===void 0&&s)b=pt(a[s],y);if(b===void 0){if(r){let C=r(t,y);if(C)return Qt(C,v)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${y}" in locale "${t}"`);return y}if(typeof b==="string")return Qt(b,v);return String(b)}function d(y,v,b={}){let C=l(y,{...b,count:v});if(C.includes("|")){let P=C.split("|").map((j)=>j.trim()),F=(n[t]||Yp)(v,t),V=P[F]||P[P.length-1];return Qt(V,{...b,count:v})}return C}function h(y,v="default"){let b=typeof y==="number"?new Date(y):y,C=o[v]||o.default||{};return new Intl.DateTimeFormat(t,C).format(b)}function p(y,v="default"){let b=i[v]||i.default||{};return new Intl.NumberFormat(t,b).format(y)}function u(y){if(pt(a[t],y)!==void 0)return!0;if(s)return pt(a[s],y)!==void 0;return!1}function g(y){if(!a[y]){console.warn(`[i18n] Locale "${y}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=y}function m(y,v){if(!a[y])a[y]={};a[y]={...a[y],...v}}function w(y){delete a[y]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:g,t:l,tc:d,d:h,n:p,te:u,addMessages:m,removeLocale:w}}function I0(e){ie=e}function A0(){return ie}function P0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.t(e,t)}function M0(e,t,s){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.tc(e,t,s)}function R0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.d(e,t)}function N0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.n(e,t)}var L0={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},D0={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"}},O0={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function z0(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function H0(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var F0={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 j0(e={}){let{max:t=10,ttl:s=0,include:a,exclude:n,hooks:o,debug:i=!1}=e,r=new Map,c=0,l=0;function d(...x){if(i)console.log("[KeepAlive]",...x)}function h(x){if(n){if(n instanceof RegExp&&n.test(x))return!1;if(Array.isArray(n)&&n.includes(x))return!1}if(a){if(a instanceof RegExp&&!a.test(x))return!1;if(Array.isArray(a)&&!a.includes(x))return!1}return!0}function p(x){if(!s||!x.expiresAt)return!1;return Date.now()>x.expiresAt}function u(x){let S=r.get(x);if(S)S.lastAccessedAt=Date.now(),S.accessCount++,S.instance.lastAccessedAt=S.lastAccessedAt,r.delete(x),r.set(x,S),d(`Touched: ${x} (access count: ${S.accessCount})`)}function g(){if(r.size===0)return!1;let x=r.keys().next().value;if(!x)return!1;let S=r.get(x);if(S){d(`Evicting LRU: ${x}`);let L=S.instance.hooks;if(L?.onDeactivate)L.onDeactivate(S.instance);if(o?.onDeactivate)o.onDeactivate(S.instance);return r.delete(x),!0}return!1}function m(x,S,L){if(!h(S.type))return d(`Type not cacheable: ${S.type}`),S;if(r.size>=t)g();let R=Date.now(),N={instance:{...S,hooks:L||S.hooks,createdAt:S.createdAt||R,lastAccessedAt:R},accessCount:0,createdAt:R,lastAccessedAt:R,expiresAt:s?R+s:void 0};if(r.set(x,N),d(`Cached: ${x} (size: ${r.size}/${t})`),L?.onMount)L.onMount(N.instance);if(o?.onMount)o.onMount(N.instance);return N.instance}function w(x){let S=r.get(x);if(!S)return l++,d(`Miss: ${x}`),null;if(p(S))return d(`Expired: ${x}`),r.delete(x),l++,null;return c++,u(x),d(`Hit: ${x}`),S.instance}function y(x){let S=r.get(x);if(!S)return!1;if(p(S))return r.delete(x),!1;return!0}function v(x){let S=r.get(x);if(!S)return!1;d(`Removing: ${x}`);let L=S.instance.hooks;if(L?.onUnmount)L.onUnmount(S.instance);if(o?.onUnmount)o.onUnmount(S.instance);return r.delete(x)}function b(){d("Clearing cache"),r.forEach((x)=>{let S=x.instance.hooks;if(S?.onUnmount)S.onUnmount(x.instance);if(o?.onUnmount)o.onUnmount(x.instance)}),r.clear(),c=0,l=0}function C(){let x=0,S=Date.now();for(let[L,R]of r.entries())if(p(R))d(`Pruning expired: ${L}`),v(L),x++;while(r.size>t)if(g())x++;else break;if(x>0)d(`Pruned ${x} entries`);return x}function P(x){let S=w(x);if(!S)return null;d(`Activating: ${x}`);let L=S.hooks;if(L?.onActivate)L.onActivate(S);if(o?.onActivate)o.onActivate(S);if(S.state&&L?.onRestore)L.onRestore(S,S.state);return S}function T(x){let S=r.get(x);if(!S)return!1;d(`Deactivating: ${x}`);let L=S.instance,R=L.hooks;if(R?.onSave)L.state=R.onSave(L);if(R?.onDeactivate)R.onDeactivate(L);if(o?.onDeactivate)o.onDeactivate(L);return!0}function F(){let x=c+l;return{hits:c,misses:l,size:r.size,max:t,hitRate:x>0?c/x:0,keys:Array.from(r.keys())}}function V(){return Array.from(r.keys())}function j(){return r.size}return{cache:m,get:w,has:y,remove:v,clear:b,prune:C,activate:P,deactivate:T,getStats:F,keys:V,size:j}}function B0(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},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 _0(){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 K0(e,t={}){let{maxSize:s=100,reset:a}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(o){if(n.length<s){if(a)a(o);n.push(o)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var de=new Map;async function ht(e,t){let s=t||e.toString();if(de.has(s))return de.get(s);let a=e();de.set(s,a);try{return await a}catch(n){throw de.delete(s),n}}function W0(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:n,onLoaded:o,onError:i}=t,r="idle",c,l,d=async(h=0)=>{try{if(r==="loading"||r==="loaded"){if(c)return c}r="loading",n?.();let p=await ht(e);return c=p,r="loaded",o?.(p),p}catch(p){let u=p;if(h<s)return await new Promise((g)=>setTimeout(g,a*(h+1))),d(h+1);throw r="error",l=u,i?.(u),u}};return{get state(){return r},get module(){return c},get error(){return l},load:()=>d(),preload:()=>d()}}function Xp(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:n="0px",threshold:o=0.01,placeholder:i,errorContent:r,onLoading:c,onLoaded:l,onError:d}=s,h=!1,p=null;if(i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);return p=new IntersectionObserver(async(g)=>{for(let m of g)if(m.isIntersecting&&!h){h=!0,p?.disconnect();try{c?.();let w=await ht(t);if(l?.(w),w&&typeof w.default?.render==="function"){let y=await w.default.render();e.innerHTML=y}}catch(w){let y=w;if(d?.(y),r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);else e.innerHTML=`<div style="color: red;">Failed to load component: ${y.message}</div>`}}},{root:a,rootMargin:n,threshold:o}),p.observe(e),()=>{p?.disconnect(),p=null}}function G0(e,t,s={}){let a=[],n=Array.from(e);for(let o of n){let i=typeof t==="function"&&t.length>0?()=>t(o):t,r=Xp(o,i,s);a.push(r)}return()=>{a.forEach((o)=>o())}}function Zp(e){return ht(e)}function U0(e){return Promise.all(e.map((t)=>Zp(t)))}function J0(e){if(e)de.delete(e);else de.clear()}function Y0(){return{size:de.size,keys:Array.from(de.keys())}}function X0(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ht(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Qp(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:n="50px",threshold:o=0.01,placeholder:i,onLoading:r,onLoaded:c,onError:l}=s;if(i&&typeof i==="string")e.src=i;let d=!1,h=null;return h=new IntersectionObserver((u)=>{for(let g of u)if(g.isIntersecting&&!d)d=!0,h?.disconnect(),r?.(),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}`);l?.(w),e.classList.add("error")},{once:!0})},{root:a,rootMargin:n,threshold:o}),h.observe(e),()=>{h?.disconnect(),h=null}}function Z0(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((n)=>{let o=n.getAttribute("data-lazy-src");if(o){let i=Qp(n,o,t);a.push(i)}}),()=>{a.forEach((n)=>n())}}var eh={accent:"var(--stx-accent, rgb(0, 122, 255))","accent-ink":"#ffffff",ink:"rgba(0, 0, 0, 0.85)","ink-secondary":"rgba(0, 0, 0, 0.5)","ink-tertiary":"rgba(0, 0, 0, 0.26)",window:"#ffffff",sidebar:"#f2f1f0",card:"rgba(0, 0, 0, 0.04)",separator:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)","selection-inactive":"rgba(0, 0, 0, 0.08)",well:"rgba(0, 0, 0, 0.07)",control:"#ffffff","control-line":"rgba(0, 0, 0, 0.12)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08)","switch-on":"#34c759",knob:"#ffffff",danger:"#ff3b30"},th={accent:"var(--stx-accent, #0a84ff)","accent-ink":"#ffffff",ink:"rgba(255, 255, 255, 0.85)","ink-secondary":"rgba(255, 255, 255, 0.55)","ink-tertiary":"rgba(255, 255, 255, 0.25)",window:"#1e1e1e",sidebar:"#2a2a2a",card:"rgba(255, 255, 255, 0.05)",separator:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.06)","selection-inactive":"rgba(255, 255, 255, 0.1)",well:"rgba(255, 255, 255, 0.1)",control:"rgba(255, 255, 255, 0.14)","control-line":"rgba(255, 255, 255, 0.06)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12)","switch-on":"#30d158",knob:"#ffffff",danger:"#ff453a"},sh={font:"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif","font-size":"13px","font-size-small":"11px",hairline:"0.5px","focus-ring":"0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent)","card-radius":"12px","control-radius":"6px","row-height":"38px","row-inset":"10px","sidebar-width":"226px"};function ut(e,t){let s=Object.entries(t).map(([a,n])=>` --stx-mac-${a}: ${n};`);return`${e} {
41
+ `)}async function $0(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:n=!1}=t,o=await Jp(e,{language:a,theme:s,lineNumbers:n});if(o===null)return{html:Up(e),css:"",language:a,theme:s==="dark"?qa:_a};return{html:o,css:Yp(s),language:a,theme:s==="auto"?"auto":s==="dark"?qa:_a}}function T0(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 E0(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 ie=null,Xp=(e)=>e===1?0:1;function pt(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function Qt(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>t[a]!==void 0?String(t[a]):s)}function A0(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:n={},dateTimeFormats:o={},numberFormats:i={},missing:r,warnMissing:c=!0}=e;function l(y,v={}){let b=pt(a[t],y);if(b===void 0&&s)b=pt(a[s],y);if(b===void 0){if(r){let C=r(t,y);if(C)return Qt(C,v)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${y}" in locale "${t}"`);return y}if(typeof b==="string")return Qt(b,v);return String(b)}function d(y,v,b={}){let C=l(y,{...b,count:v});if(C.includes("|")){let P=C.split("|").map((j)=>j.trim()),F=(n[t]||Xp)(v,t),V=P[F]||P[P.length-1];return Qt(V,{...b,count:v})}return C}function u(y,v="default"){let b=typeof y==="number"?new Date(y):y,C=o[v]||o.default||{};return new Intl.DateTimeFormat(t,C).format(b)}function p(y,v="default"){let b=i[v]||i.default||{};return new Intl.NumberFormat(t,b).format(y)}function h(y){if(pt(a[t],y)!==void 0)return!0;if(s)return pt(a[s],y)!==void 0;return!1}function g(y){if(!a[y]){console.warn(`[i18n] Locale "${y}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=y}function m(y,v){if(!a[y])a[y]={};a[y]={...a[y],...v}}function w(y){delete a[y]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:g,t:l,tc:d,d:u,n:p,te:h,addMessages:m,removeLocale:w}}function P0(e){ie=e}function M0(){return ie}function R0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.t(e,t)}function N0(e,t,s){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return ie.tc(e,t,s)}function L0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.d(e,t)}function D0(e,t){if(!ie)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return ie.n(e,t)}var O0={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},z0={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"}},H0={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function F0(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function V0(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var j0={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 _0(e={}){let{max:t=10,ttl:s=0,include:a,exclude:n,hooks:o,debug:i=!1}=e,r=new Map,c=0,l=0;function d(...x){if(i)console.log("[KeepAlive]",...x)}function u(x){if(n){if(n instanceof RegExp&&n.test(x))return!1;if(Array.isArray(n)&&n.includes(x))return!1}if(a){if(a instanceof RegExp&&!a.test(x))return!1;if(Array.isArray(a)&&!a.includes(x))return!1}return!0}function p(x){if(!s||!x.expiresAt)return!1;return Date.now()>x.expiresAt}function h(x){let S=r.get(x);if(S)S.lastAccessedAt=Date.now(),S.accessCount++,S.instance.lastAccessedAt=S.lastAccessedAt,r.delete(x),r.set(x,S),d(`Touched: ${x} (access count: ${S.accessCount})`)}function g(){if(r.size===0)return!1;let x=r.keys().next().value;if(!x)return!1;let S=r.get(x);if(S){d(`Evicting LRU: ${x}`);let L=S.instance.hooks;if(L?.onDeactivate)L.onDeactivate(S.instance);if(o?.onDeactivate)o.onDeactivate(S.instance);return r.delete(x),!0}return!1}function m(x,S,L){if(!u(S.type))return d(`Type not cacheable: ${S.type}`),S;if(r.size>=t)g();let R=Date.now(),N={instance:{...S,hooks:L||S.hooks,createdAt:S.createdAt||R,lastAccessedAt:R},accessCount:0,createdAt:R,lastAccessedAt:R,expiresAt:s?R+s:void 0};if(r.set(x,N),d(`Cached: ${x} (size: ${r.size}/${t})`),L?.onMount)L.onMount(N.instance);if(o?.onMount)o.onMount(N.instance);return N.instance}function w(x){let S=r.get(x);if(!S)return l++,d(`Miss: ${x}`),null;if(p(S))return d(`Expired: ${x}`),r.delete(x),l++,null;return c++,h(x),d(`Hit: ${x}`),S.instance}function y(x){let S=r.get(x);if(!S)return!1;if(p(S))return r.delete(x),!1;return!0}function v(x){let S=r.get(x);if(!S)return!1;d(`Removing: ${x}`);let L=S.instance.hooks;if(L?.onUnmount)L.onUnmount(S.instance);if(o?.onUnmount)o.onUnmount(S.instance);return r.delete(x)}function b(){d("Clearing cache"),r.forEach((x)=>{let S=x.instance.hooks;if(S?.onUnmount)S.onUnmount(x.instance);if(o?.onUnmount)o.onUnmount(x.instance)}),r.clear(),c=0,l=0}function C(){let x=0,S=Date.now();for(let[L,R]of r.entries())if(p(R))d(`Pruning expired: ${L}`),v(L),x++;while(r.size>t)if(g())x++;else break;if(x>0)d(`Pruned ${x} entries`);return x}function P(x){let S=w(x);if(!S)return null;d(`Activating: ${x}`);let L=S.hooks;if(L?.onActivate)L.onActivate(S);if(o?.onActivate)o.onActivate(S);if(S.state&&L?.onRestore)L.onRestore(S,S.state);return S}function T(x){let S=r.get(x);if(!S)return!1;d(`Deactivating: ${x}`);let L=S.instance,R=L.hooks;if(R?.onSave)L.state=R.onSave(L);if(R?.onDeactivate)R.onDeactivate(L);if(o?.onDeactivate)o.onDeactivate(L);return!0}function F(){let x=c+l;return{hits:c,misses:l,size:r.size,max:t,hitRate:x>0?c/x:0,keys:Array.from(r.keys())}}function V(){return Array.from(r.keys())}function j(){return r.size}return{cache:m,get:w,has:y,remove:v,clear:b,prune:C,activate:P,deactivate:T,getStats:F,keys:V,size:j}}function q0(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},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 K0(){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 W0(e,t={}){let{maxSize:s=100,reset:a}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(o){if(n.length<s){if(a)a(o);n.push(o)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var de=new Map;async function ut(e,t){let s=t||e.toString();if(de.has(s))return de.get(s);let a=e();de.set(s,a);try{return await a}catch(n){throw de.delete(s),n}}function U0(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:n,onLoaded:o,onError:i}=t,r="idle",c,l,d=async(u=0)=>{try{if(r==="loading"||r==="loaded"){if(c)return c}r="loading",n?.();let p=await ut(e);return c=p,r="loaded",o?.(p),p}catch(p){let h=p;if(u<s)return await new Promise((g)=>setTimeout(g,a*(u+1))),d(u+1);throw r="error",l=h,i?.(h),h}};return{get state(){return r},get module(){return c},get error(){return l},load:()=>d(),preload:()=>d()}}function Zp(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:n="0px",threshold:o=0.01,placeholder:i,errorContent:r,onLoading:c,onLoaded:l,onError:d}=s,u=!1,p=null;if(i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);return p=new IntersectionObserver(async(g)=>{for(let m of g)if(m.isIntersecting&&!u){u=!0,p?.disconnect();try{c?.();let w=await ut(t);if(l?.(w),w&&typeof w.default?.render==="function"){let y=await w.default.render();e.innerHTML=y}}catch(w){let y=w;if(d?.(y),r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);else e.innerHTML=`<div style="color: red;">Failed to load component: ${y.message}</div>`}}},{root:a,rootMargin:n,threshold:o}),p.observe(e),()=>{p?.disconnect(),p=null}}function J0(e,t,s={}){let a=[],n=Array.from(e);for(let o of n){let i=typeof t==="function"&&t.length>0?()=>t(o):t,r=Zp(o,i,s);a.push(r)}return()=>{a.forEach((o)=>o())}}function Qp(e){return ut(e)}function Y0(e){return Promise.all(e.map((t)=>Qp(t)))}function X0(e){if(e)de.delete(e);else de.clear()}function Z0(){return{size:de.size,keys:Array.from(de.keys())}}function Q0(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ut(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function eu(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:n="50px",threshold:o=0.01,placeholder:i,onLoading:r,onLoaded:c,onError:l}=s;if(i&&typeof i==="string")e.src=i;let d=!1,u=null;return u=new IntersectionObserver((h)=>{for(let g of h)if(g.isIntersecting&&!d)d=!0,u?.disconnect(),r?.(),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}`);l?.(w),e.classList.add("error")},{once:!0})},{root:a,rootMargin:n,threshold:o}),u.observe(e),()=>{u?.disconnect(),u=null}}function ek(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((n)=>{let o=n.getAttribute("data-lazy-src");if(o){let i=eu(n,o,t);a.push(i)}}),()=>{a.forEach((n)=>n())}}var tu={accent:"var(--stx-accent, rgb(0, 122, 255))","accent-ink":"#ffffff",ink:"rgba(0, 0, 0, 0.85)","ink-secondary":"rgba(0, 0, 0, 0.5)","ink-tertiary":"rgba(0, 0, 0, 0.26)",window:"#ffffff",sidebar:"#f2f1f0",card:"rgba(0, 0, 0, 0.04)",separator:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)","selection-inactive":"rgba(0, 0, 0, 0.08)",well:"rgba(0, 0, 0, 0.07)",control:"#ffffff","control-line":"rgba(0, 0, 0, 0.12)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.08)","switch-on":"#34c759",knob:"#ffffff",danger:"#ff3b30"},su={accent:"var(--stx-accent, #0a84ff)","accent-ink":"#ffffff",ink:"rgba(255, 255, 255, 0.85)","ink-secondary":"rgba(255, 255, 255, 0.55)","ink-tertiary":"rgba(255, 255, 255, 0.25)",window:"#1e1e1e",sidebar:"#2a2a2a",card:"rgba(255, 255, 255, 0.05)",separator:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.06)","selection-inactive":"rgba(255, 255, 255, 0.1)",well:"rgba(255, 255, 255, 0.1)",control:"rgba(255, 255, 255, 0.14)","control-line":"rgba(255, 255, 255, 0.06)","control-shadow":"0 0.5px 1.5px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.12)","switch-on":"#30d158",knob:"#ffffff",danger:"#ff453a"},au={font:"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif","font-size":"13px","font-size-small":"11px",hairline:"0.5px","focus-ring":"0 0 0 3px color-mix(in srgb, var(--stx-mac-accent) 35%, transparent)","card-radius":"12px","control-radius":"6px","row-height":"38px","row-inset":"10px","sidebar-width":"226px"};function ht(e,t){let s=Object.entries(t).map(([a,n])=>` --stx-mac-${a}: ${n};`);return`${e} {
42
42
  ${s.join(`
43
43
  `)}
44
- }`}function ek(){return[ut(":where(:root)",{...sh,...eh}),ut(":where(.dark)",th),`@media (max-resolution: 1.5dppx) {
44
+ }`}function sk(){return[ht(":where(:root)",{...au,...tu}),ht(":where(.dark)",su),`@media (max-resolution: 1.5dppx) {
45
45
  :where(:root) {
46
46
  --stx-mac-hairline: 1px;
47
47
  }
48
48
  }`,`@media (prefers-contrast: more) {
49
- ${ut(":where(:root)",{separator:"rgba(0, 0, 0, 0.4)","control-line":"rgba(0, 0, 0, 0.5)","ink-secondary":"rgba(0, 0, 0, 0.75)",hairline:"1px"})}
50
- ${ut(":where(.dark)",{separator:"rgba(255, 255, 255, 0.45)","control-line":"rgba(255, 255, 255, 0.5)","ink-secondary":"rgba(255, 255, 255, 0.8)"})}
49
+ ${ht(":where(:root)",{separator:"rgba(0, 0, 0, 0.4)","control-line":"rgba(0, 0, 0, 0.5)","ink-secondary":"rgba(0, 0, 0, 0.75)",hairline:"1px"})}
50
+ ${ht(":where(.dark)",{separator:"rgba(255, 255, 255, 0.45)","control-line":"rgba(255, 255, 255, 0.5)","ink-secondary":"rgba(255, 255, 255, 0.8)"})}
51
51
  }`].join(`
52
- `)}var es={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 qa(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=qa(e[a],t[a]);else s[a]=t[a];return s}function Ne(e){return qa(es,e)}var ft=es;function sk(){return ft}function ah(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
52
+ `)}var es={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 Ka(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=Ka(e[a],t[a]);else s[a]=t[a];return s}function Ne(e){return Ka(es,e)}var ft=es;function nk(){return ft}function nu(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
53
53
  ${t.join(`
54
54
  `)}
55
- }`}function ak(e,t){if(ft=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,n])=>{if(n)s.style.setProperty(`--color-${a}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-${a}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,n])=>{if(n)s.style.setProperty(`--text-${a}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-weight-${a}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--leading-${a}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([a,n])=>{if(n)s.style.setProperty(`--spacing-${a}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,n])=>{if(n)s.style.setProperty(`--radius-${a}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([a,n])=>{if(n)s.style.setProperty(`--shadow-${a}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,n])=>{if(n)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,n])=>{if(n)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,n])=>{if(n)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function nk(){return ft}function ok(e){let t=e.split("."),s=ft;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var ik={default:es,purple:Ne({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Ne({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Ne({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Ne({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Ne({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 rk(e){return ah(e)}var oh="./ChatInbox-swjc2p6x.stx";var rh="./ChatMessage-rj37tdgn.stx";var ch="./ConversationListItem-fjha2cgq.stx";var ph="./MessageBubble-v5m96g43.stx";function uk(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let a=!1,n=t.replace(/\{(\w+)\}/g,(o,i)=>{let r=s[i];if(r==null||r==="")return a=!0,"";return encodeURIComponent(String(r))});return a?"":n}import{derived as Le,effect as hh,sharedRequest as uh,state as J}from"@stacksjs/stx";import{useBroadcastStream as fh}from"@stacksjs/stx/composables/use-broadcast-stream";var mh=1500;function xk(e){let t=e.endpoint??"/messages",s=Le(e.scopeKey),a=J([]),n=J([]),o=J(null),i=J(""),r=J([]),c=J(!1),l=J(!1),d=J(!1),h=J(""),p=J(""),u=J(""),g=J(!1),m=J(!1),w=J(4000),y=J(!1),v=new Set,b=null,C=null,P="",T=0,F=new Map,V=null,j=!1,x=0;function S(){T++,a.set([]),n.set([]),o.set(null),i.set(""),r.set([]),p.set(""),h.set(""),c.set(!1),l.set(!1),d.set(!1),F=new Map,V=null,x=0,m.set(!1),b?.close(),b=null}function L(){let A=e.scopeKey();if(A!==P)S(),P=A;return Ua(),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 N=Le(()=>{let A=u().toLowerCase().trim();return a().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=Le(()=>n().reduce((A,I)=>A+I.unread,0)),M=Le(()=>!!i()&&!!p().trim()&&p().trim().length<=w()&&!d()&&!l()),k=Le(e.selfId);function O(A){h.set(A instanceof Error?A.message:"Could not load messages. Try again.")}async function D(A,I,z=!0){let B=await R(`/conversations/${I}`);if(A!==T||I!==i()||e.scopeKey()!==P)return;let se=B.messages[0]?.id;if(r.set([...r().filter((vt)=>se&&vt.id<se),...B.messages]),r().length===B.messages.length)m.set(B.has_more);let ze=B.messages.at(-1);if(z&&ze){if(await R(`/conversations/${I}/read`,{method:"POST",body:JSON.stringify({through_id:ze.id})}),A===T&&I===i())n.update((vt)=>vt.map((wt)=>wt.id===I?{...wt,unread:0}:wt))}}let Y=uh(),H=new Set;function K(){if(!e.broadcastEndpoint||!e.selfId()||y())return Promise.resolve();return new Promise((A)=>{let I=()=>{clearTimeout(z),H.delete(I),A()},z=setTimeout(I,mh);H.add(I)})}function te(){if(!H.size)return!1;for(let A of[...H])A();return!0}function De(){return L(),Y.run(T,()=>K().then(Oe)).finally(ge)}async function mt(){L(),await Y.fresh(T,()=>Oe()).finally(ge)}async function Oe(){let A=L();c.set(!0),h.set("");try{let I=await R("");if(A!==T||e.scopeKey()!==P)return;a.set(I.contacts),n.set(I.conversations),w.set(I.max_length),c.set(!1);let z=o()?I.contacts.find((se)=>se.id===o().id):null;if(o()&&!z){let se=o().id;ts(),F.delete(se),p.set(""),V=null}else if(z)o.set(z);let B=e.initialRecipient?.()??0;if(B>0&&B!==x){let se=I.contacts.find((ze)=>ze.id===B);if(se)x=B,await gt(se)}}catch(I){if(A===T)O(I)}finally{if(A===T)c.set(!1)}}async function gt(A){if(L(),o())F.set(o().id,p());let I=++T;d.set(!1),o.set(A),p.set(F.get(A.id)??""),i.set(""),r.set([]),m.set(!1),h.set(""),l.set(!0);try{let z=await R("/conversations",{method:"POST",body:JSON.stringify({recipient_id:A.id})});if(I!==T||e.scopeKey()!==P)return;i.set(z.id),await D(I,z.id)}catch(z){if(I===T)O(z)}finally{if(I===T)l.set(!1);ge()}}function ts(){if(o())F.set(o().id,p());T++,d.set(!1),l.set(!1),o.set(null),i.set(""),r.set([]),h.set("")}async function Wa(){if(L(),!M())return;let A=i(),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),h.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("");F.delete(o().id),V=null,await D(z,A),await mt()}catch(se){if(z===T)O(se)}finally{if(z===T)d.set(!1);ge()}}async function Ga(){let A=i(),I=r()[0]?.id,z=T;if(!A||!I||l())return;l.set(!0);try{let B=await R(`/conversations/${A}?before=${I}`);if(z===T&&A===i())r.set([...B.messages,...r()]),m.set(B.has_more)}catch(B){if(z===T)O(B)}finally{if(z===T)l.set(!1);ge()}}async function ss(A=!1){if(j||d()||l())return;j=!0;try{if(await De(),A&&o()&&!i())await gt(o());else if(A&&i())await D(T,i())}catch(I){O(I)}finally{j=!1,ge()}}let xt=!1;async function bt(){if(j||Y.busy||d()||l()){xt=!0;return}await ss([...v].some((A)=>A()))}function Ua(){if(b||!v.size||!e.selfId()||!e.broadcastEndpoint)return;let A=P;b=fh({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(I)=>{if(y.set(I),!I)te()},onConnected:()=>{if(!te()&&A===e.scopeKey())bt()},onMessage:(I)=>{if(A===e.scopeKey()&&I.event.startsWith("messaging."))bt()}})}function Ja(A=()=>!1){if(v.add(A),L(),!C)C=hh(()=>{L()});return()=>{if(v.delete(A),!v.size)b?.close(),b=null,C?.(),C=null}}function ge(){if(xt)xt=!1,bt()}return{contacts:a,conversations:n,selected:o,threadId:i,messages:r,loading:c,threadLoading:l,sending:d,error:h,draft:p,search:u,unreadOnly:g,hasMore:m,maxLength:w,rows:N,unread:E,canSend:M,selfId:k,scopeKey:s,load:De,open:gt,back:ts,send:Wa,older:Ga,refresh:ss,reset:S,observe:Ja,connected:y}}var xh="./ChatUnreadBadge-3vq0t8d2.stx";var vh="./ChatLauncher-3zph4trh.stx";export{on as Accordion,ln as AccordionItem,dn as AddressField,Zd as AiTextarea,p0 as AnimationClasses,$n as AppearancePicker,In as Audio,Bn as Avatar,Lu as BIOMETRIC_DEFAULT_KEY,Kn as Badge,Pn as BiometricSignIn,Wn as Breadcrumb,Te as Breakpoints,Xn as Button,eo as Calendar,fo as Card,oh as ChatInbox,vh as ChatLauncher,rh as ChatMessage,xh as ChatUnreadBadge,go as Checkbox,rl as Checkout,bo as ChoiceChips,Ya as CodeBlock,wo as CodeEditor,ko as ColorSwatches,Co as Combobox,$o as ComboboxButton,Io as ComboboxInput,Po as ComboboxOption,Ro as ComboboxOptions,hn as CommandBar,Lo as CommandPalette,Oo as CommandPaletteItem,X as ComponentError,fn as ContentCard,Ho as ContextMenu,Yo as ContextMenuView,ch as ConversationListItem,$m as DEFAULT_MAX_WIDTH,Tm as DEFAULT_MIN_WIDTH,oi as DataGrid,li as DataGridView,so as DateRangePicker,no as DateTimePicker,cl as DefaultPaymentMethod,di as Dialog,hi as DialogBackdrop,fi as DialogDescription,gi as DialogPanel,bi as DialogTitle,wi as Drawer,ki as Dropdown,Ci as DropdownButton,$i as DropdownItem,Ii as DropdownItems,i0 as Easing,er as EmailInput,ro as EmptyState,co as ErrorState,xe as ErrorTypes,Em as FIT_MAX_WIDTH,kl as FORBIDDEN_SANDBOX_TOKENS,Ni as FileDrop,zr as FilterChip,Fr as FilterChips,gn as FloatingPanel,Xa as Footer,Pi as Form,Wi as GraphCanvas,Ge as GraphModel,ji as GraphView,Tt as GridModel,Ui as GroupedList,Yi as GroupedListRow,Za as Hero,Zi as Image,Qa as Installation,Im as JSON_PREVIEW_LENGTH,xr as JsonTree,yr as JsonTreeView,Uy as KeyboardKeys,zh as KeyboardShortcuts,Bp as KeyframeAnimations,Sr as List,jr as ListRow,Er as Listbox,Ar as ListboxButton,Mr as ListboxLabel,Nr as ListboxOption,Dr as ListboxOptions,Rn as Login,th as MAC_DARK,eh as MAC_LIGHT,sh as MAC_METRICS,ph as MessageBubble,_r as NavBar,Xr as Navigator,Qr as Notification,sr as NumberInput,tl as Pager,al as PagerDots,ol as Pagination,nr as PasswordInput,pl as PaymentMethods,ml as Popover,xl as PopoverButton,vl as PopoverPanel,yl as Portal,Dl as PreviewFrame,Hl as PreviewFrameView,Vl as Progress,f as PropTypes,Ql as RENDER_SURFACE_MAX_SIDE,Bl as Radio,Kl as RadioGroup,Wl as RadioGroupDescription,Ul as RadioGroupLabel,Yl as RadioGroupOption,Zl as RenderSurface,Xe as SETTINGS_HIGHLIGHT_MS,bv as SETTINGS_NATIVE,vv as SETTINGS_NATIVE_SYMBOLS,gv as SETTINGS_NATIVE_TONES,Z as SETTINGS_RANK,nv as SETTINGS_TYPE_AHEAD_MS,Rc as SETTINGS_UPDATE_LABELS,Zh as SHADE_VAR_PREFIX,vw as SLIDER_MAX_TICKS,Ut as SYNTAX_DARK,Gt as SYNTAX_LIGHT,Kp as SYNTAX_PROPERTIES,Va as SYNTAX_TOKENS,ir as SearchInput,qr as SectionCard,ic as SegmentedControl,lc as Select,pc as SettingsGroup,uc as SettingsPane,mc as SettingsPaneHeader,xc as SettingsRow,vc as SettingsSidebarGroup,yc as SettingsSidebarItem,Sc as SettingsUpdateRow,Tc as SettingsWindow,Ic as SettingsWindowTree,Oc as SettingsWindowView,Hc as Sidebar,bn as SidebarDivider,Vc as SidebarFooter,Bc as SidebarHeader,Kc as SidebarItem,Wc as SidebarPinned,wn as SidebarRow,Uc as SidebarSection,Yc as SidebarSpace,ed as SidebarSpaceSwitcher,Zc as SidebarSpaces,Ln as Signup,hd as Skeleton,fd as Slider,kn as SpaceSwitcher,gd as Spinner,vd as SplitPane,wd as SplitPaneView,kd as Stepper,Cd as StepperStep,ct as StorageManager,ul as SubscriptionCheckout,Tr as SwipeRow,$d as Switch,as as THEMED_FAMILIES,Vd as Tab,Gr as TabBar,Jr as TabBarItem,Bd as TabList,Kd as TabPanel,Id as Table,Pd as TableBody,Rd as TableCell,Ld as TableHead,Od as TableHeader,Hd as TableRow,Wd as Tabs,Ud as Teleport,lr as TextInput,Yd as Textarea,ho as ThemeToggle,Cn as TileGrid,ep as Tooltip,sp as Transition,Nt as TreeModel,On as TwoFactorChallenge,ia as VIEWPORT_PRESETS,np as Video,ip as VirtualList,lp as VirtualTable,m0 as animate,h0 as animateWithClass,qy as announceToScreenReader,Ha as applyAnimation,T0 as applyHeadwindClasses,ak as applyTheme,Zy as aria,xs as ariaShortcut,Gn as assert,of as assertProp,Hn as biometricHost,ns as biometricLabel,Du as biometricSignInLabel,da as buildDocument,Zn as buttonPropSchema,ks as cellJson,ys as cellKind,ne as cellValue,Ks as centreOn,js as clampZoom,ef as clearErrorHandler,J0 as clearModuleCache,Is as clipToRect,Uh as closeOverlay,ja as codeBlockCss,b0 as componentApi,F0 as componentMessages,zi as connectedComponents,uk as contactLink,Th as copyToClipboard,Ky as createAriaDescription,_y as createAriaLabel,Ou as createBiometricSignIn,xk as createChat,K0 as createComponentPool,sf as createDebugger,Wy as createFocusTrap,E0 as createI18n,j0 as createKeepAlive,jp as createKeyframeAnimation,u0 as createKeyframes,B0 as createLRUCache,ae as createPropValidator,X0 as createRouteLoader,Gy as createRovingTabindex,uf as createSafeClickHandler,Qy as createScreenReaderText,a0 as createSkipLink,_0 as createStateManager,Gw as createStorage,Ne as createTheme,Fp as cssAnimation,ai as cycleSort,R0 as d,kt as dateTimeFields,D0 as dateTimeFormats,St as dateTimeInstant,$f as dateTimePreset,oo as dateTimeToIso,Sb as declaresColorScheme,$t as defaultNodeMetrics,es as defaultTheme,Ia as deriveSpaceTint,la as describeViewport,C0 as detectLanguage,tf as devAssert,lt as dividerRange,Dp as easeInBack,za as easeInBounce,Ap as easeInCirc,fp as easeInCubic,Rp as easeInElastic,$p as easeInExpo,zp as easeInOutBack,Hp as easeInOutBounce,Mp as easeInOutCirc,gp as easeInOutCubic,Lp as easeInOutElastic,Ip as easeInOutExpo,up as easeInOutQuad,vp as easeInOutQuart,kp as easeInOutQuint,Tp as easeInOutSine,pp as easeInQuad,xp as easeInQuart,wp as easeInQuint,Sp as easeInSine,Op as easeOutBack,qt as easeOutBounce,Pp as easeOutCirc,mp as easeOutCubic,Np as easeOutElastic,Ep as easeOutExpo,hp as easeOutQuad,bp as easeOutQuart,yp as easeOutQuint,Cp as easeOutSine,Ns as edgeIdOf,Ms as edgeShape,et as emptySettingsHistory,xd as equalSizes,af as errorBoundary,Hi as findBackEdges,Fo as findItem,U as findSettingsPane,Ee as firstIndex,cc as firstSettingsPane,_s as fit,We as fitLabel,ra as fitScale,Ra as fitSizes,Ml as forceColorScheme,Hs as forceLayout,Mi as formPropSchema,Ie as formatCell,Tf as formatDateTime,Mt as formatPath,gs as formatShortcut,zl as framePassesColorScheme,ax as fromTinkerValue,ex as fromValue,Oa as generateId,Ph as generateSEOTags,rk as generateThemeCSS,Y0 as getCacheStats,s0 as getColorSchemePreference,yt as getEffectiveTheme,Kt as getFocusableElements,k0 as getHighlighter,A0 as getI18n,en as getSystemTheme,sk as getTheme,ok as getThemeValue,je as handleError,Jy as hasFocus,be as hasSubmenu,S0 as highlight,Up as highlightToHtml,Fi as identityViewport,ei as inferColumns,Qo as inferType,cs as isActionable,It as isExpandable,ls as isFocusable,Pt as isIndexed,kb as isIsolatingSandbox,z0 as isRTL,Jh as isTopOverlay,Xy as isVisibleToScreenReader,oe as labelOf,ds as lastIndex,Vs as layeredLayout,Xp as lazyLoad,G0 as lazyLoadAll,W0 as lazyLoadComponent,Qp as lazyLoadImage,Z0 as lazyLoadImages,ht as lazyLoadModule,dp as linear,H0 as loadLocaleMessages,ek as macThemeCss,it as macosColors,Ds as maxLabelLength,$s as moveCell,Yy as moveFocus,N0 as n,Ws as nearestInDirection,Gs as nearestTo,wg as nodeAt,Ls as nodeSize,Xs as nodeToJson,At as nodeToPlain,Ot as normalizeScheme,pe as normalizeSettingsText,rt as normalizeSizes,dd as normalizeSpace,Qv as normalizeSpaces,O0 as numberFormats,pr as numberInputPropSchema,Gh as openOverlay,Yh as openOverlays,Ue as pan,Rs as parallelOffsets,jt as parseLength,Ma as parseSizes,us as placeAtBox,hs as placeAtPoint,fs as placeSubmenu,L0 as pluralRules,t0 as prefersHighContrast,e0 as prefersReducedMotion,Zp as preloadModule,U0 as preloadModules,ma as presentFrame,Rt as previewOf,Ss as projectRow,x0 as registerComponentApi,l0 as removeAnimation,tc as renderSurfaceHost,Bt as resizeAt,Jv as resolveIconColor,Ct as resolveItems,Ze as resolveSettingsPane,Uv as resolveSidebarTheme,ld as resolveSpaceTint,Dt as resolveViewport,qs as reveal,Cs as rowJson,Ts as rowRange,ca as sandboxValue,nt as searchSettings,Os as seededRandom,Li as selfLoopShape,Na as separatorValue,d0 as sequenceAnimations,La as serializeSizes,Qu as setErrorHandler,I0 as setI18n,sn as setLink,W as setMeta,tn as setTitle,tt as settingsCanGoBack,Re as settingsCanGoForward,st as settingsHistoryBack,ue as settingsHistoryCurrent,at as settingsHistoryForward,Me as settingsHistoryVisit,ba as settingsMatchRank,xv as settingsNativeGlyph,he as settingsParentPane,va as settingsResultsAnnouncement,zt as settingsRovingIndex,Qe as settingsSidebarPane,we as settingsStorageName,wa as settingsTypeAheadAdd,ya as settingsTypeAheadMatch,yv as settingsUpdateView,Ea as sidebarThemes,Pa as sliderDecimals,yw as sliderFraction,Cw as sliderKeyValue,ww as sliderRange,me as sliderSnap,Sw as sliderTicks,kw as sliderValueAt,ew as spaceIndexOf,tw as spaceTintPayload,cd as spaceTintVars,Zv as spaceWashGradient,c0 as staggerAnimation,nc as startRenderLoop,$e as stepIndex,pa as stepViewport,Ww as storage,_t as storageName,Qh as stxThemePreset,Yt as syntaxPanelCss,qp as syntaxThemeCss,Jt as syntaxTokenRules,dt as syntaxVariables,P0 as t,M0 as tc,dr as textInputPropSchema,ik as themePresets,ah as themeToCSSProperties,eu as themeVariableNames,si as toCsv,Et as toGraph,ti as toJson,vg as toScreen,ps as typeAheadIndex,jh as useBreakpoint,Rh as useClickOutside,Ch as useCopyCode,Eh as useDarkMode,Lh as useFocusTrap,Kh as useIsDarkMode,_h as useIsDesktop,Bh as useIsMobile,Oh as useKeyboard,Fh as useLocalStorage,Ce as useMediaQuery,qh as usePrefersReducedMotion,Ah as useSEO,nk as useTheme,rs as validTimeZone,n0 as validateAriaRelationships,hf as validateButtonProps,Kg as validateEmailInputProps,lg as validateFormProps,Wg as validateNumberInputProps,qg as validatePasswordInputProps,Jn as validateProps,Gg as validateSearchInputProps,mf as validateSize,_g as validateTextInputProps,ff as validateVariant,Vp as waitForAnimation,Un as warn,rf as warnProp,os as wrapErrorHandler,Bs as zoomAt};
55
+ }`}function ok(e,t){if(ft=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,n])=>{if(n)s.style.setProperty(`--color-${a}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-${a}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,n])=>{if(n)s.style.setProperty(`--text-${a}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--font-weight-${a}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,n])=>{if(n)s.style.setProperty(`--leading-${a}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([a,n])=>{if(n)s.style.setProperty(`--spacing-${a}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,n])=>{if(n)s.style.setProperty(`--radius-${a}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([a,n])=>{if(n)s.style.setProperty(`--shadow-${a}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,n])=>{if(n)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,n])=>{if(n)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,n])=>{if(n)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function ik(){return ft}function rk(e){let t=e.split("."),s=ft;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var lk={default:es,purple:Ne({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Ne({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Ne({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Ne({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Ne({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 ck(e){return nu(e)}var iu="./ChatInbox-swjc2p6x.stx";var lu="./ChatMessage-rj37tdgn.stx";var du="./ConversationListItem-fjha2cgq.stx";var uu="./MessageBubble-v5m96g43.stx";function mk(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let a=!1,n=t.replace(/\{(\w+)\}/g,(o,i)=>{let r=s[i];if(r==null||r==="")return a=!0,"";return encodeURIComponent(String(r))});return a?"":n}import{derived as Le,effect as hu,sharedRequest as fu,state as J}from"@stacksjs/stx";import{useBroadcastStream as mu}from"@stacksjs/stx/composables/use-broadcast-stream";var gu=1500;function vk(e){let t=e.endpoint??"/messages",s=Le(e.scopeKey),a=J([]),n=J([]),o=J(null),i=J(""),r=J([]),c=J(!1),l=J(!1),d=J(!1),u=J(""),p=J(""),h=J(""),g=J(!1),m=J(!1),w=J(4000),y=J(!1),v=new Set,b=null,C=null,P="",T=0,F=new Map,V=null,j=!1,x=0;function S(){T++,a.set([]),n.set([]),o.set(null),i.set(""),r.set([]),p.set(""),u.set(""),c.set(!1),l.set(!1),d.set(!1),F=new Map,V=null,x=0,m.set(!1),b?.close(),b=null}function L(){let A=e.scopeKey();if(A!==P)S(),P=A;return Ua(),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 N=Le(()=>{let A=h().toLowerCase().trim();return a().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=Le(()=>n().reduce((A,I)=>A+I.unread,0)),M=Le(()=>!!i()&&!!p().trim()&&p().trim().length<=w()&&!d()&&!l()),k=Le(e.selfId);function O(A){u.set(A instanceof Error?A.message:"Could not load messages. Try again.")}async function D(A,I,z=!0){let B=await R(`/conversations/${I}`);if(A!==T||I!==i()||e.scopeKey()!==P)return;let se=B.messages[0]?.id;if(r.set([...r().filter((vt)=>se&&vt.id<se),...B.messages]),r().length===B.messages.length)m.set(B.has_more);let ze=B.messages.at(-1);if(z&&ze){if(await R(`/conversations/${I}/read`,{method:"POST",body:JSON.stringify({through_id:ze.id})}),A===T&&I===i())n.update((vt)=>vt.map((wt)=>wt.id===I?{...wt,unread:0}:wt))}}let Y=fu(),H=new Set;function q(){if(!e.broadcastEndpoint||!e.selfId()||y())return Promise.resolve();return new Promise((A)=>{let I=()=>{clearTimeout(z),H.delete(I),A()},z=setTimeout(I,gu);H.add(I)})}function te(){if(!H.size)return!1;for(let A of[...H])A();return!0}function De(){return L(),Y.run(T,()=>q().then(Oe)).finally(ge)}async function mt(){L(),await Y.fresh(T,()=>Oe()).finally(ge)}async function Oe(){let A=L();c.set(!0),u.set("");try{let I=await R("");if(A!==T||e.scopeKey()!==P)return;a.set(I.contacts),n.set(I.conversations),w.set(I.max_length),c.set(!1);let z=o()?I.contacts.find((se)=>se.id===o().id):null;if(o()&&!z){let se=o().id;ts(),F.delete(se),p.set(""),V=null}else if(z)o.set(z);let B=e.initialRecipient?.()??0;if(B>0&&B!==x){let se=I.contacts.find((ze)=>ze.id===B);if(se)x=B,await gt(se)}}catch(I){if(A===T)O(I)}finally{if(A===T)c.set(!1)}}async function gt(A){if(L(),o())F.set(o().id,p());let I=++T;d.set(!1),o.set(A),p.set(F.get(A.id)??""),i.set(""),r.set([]),m.set(!1),u.set(""),l.set(!0);try{let z=await R("/conversations",{method:"POST",body:JSON.stringify({recipient_id:A.id})});if(I!==T||e.scopeKey()!==P)return;i.set(z.id),await D(I,z.id)}catch(z){if(I===T)O(z)}finally{if(I===T)l.set(!1);ge()}}function ts(){if(o())F.set(o().id,p());T++,d.set(!1),l.set(!1),o.set(null),i.set(""),r.set([]),u.set("")}async function Wa(){if(L(),!M())return;let A=i(),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("");F.delete(o().id),V=null,await D(z,A),await mt()}catch(se){if(z===T)O(se)}finally{if(z===T)d.set(!1);ge()}}async function Ga(){let A=i(),I=r()[0]?.id,z=T;if(!A||!I||l())return;l.set(!0);try{let B=await R(`/conversations/${A}?before=${I}`);if(z===T&&A===i())r.set([...B.messages,...r()]),m.set(B.has_more)}catch(B){if(z===T)O(B)}finally{if(z===T)l.set(!1);ge()}}async function ss(A=!1){if(j||d()||l())return;j=!0;try{if(await De(),A&&o()&&!i())await gt(o());else if(A&&i())await D(T,i())}catch(I){O(I)}finally{j=!1,ge()}}let xt=!1;async function bt(){if(j||Y.busy||d()||l()){xt=!0;return}await ss([...v].some((A)=>A()))}function Ua(){if(b||!v.size||!e.selfId()||!e.broadcastEndpoint)return;let A=P;b=mu({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(I)=>{if(y.set(I),!I)te()},onConnected:()=>{if(!te()&&A===e.scopeKey())bt()},onMessage:(I)=>{if(A===e.scopeKey()&&I.event.startsWith("messaging."))bt()}})}function Ja(A=()=>!1){if(v.add(A),L(),!C)C=hu(()=>{L()});return()=>{if(v.delete(A),!v.size)b?.close(),b=null,C?.(),C=null}}function ge(){if(xt)xt=!1,bt()}return{contacts:a,conversations:n,selected:o,threadId:i,messages:r,loading:c,threadLoading:l,sending:d,error:u,draft:p,search:h,unreadOnly:g,hasMore:m,maxLength:w,rows:N,unread:E,canSend:M,selfId:k,scopeKey:s,load:De,open:gt,back:ts,send:Wa,older:Ga,refresh:ss,reset:S,observe:Ja,connected:y}}var bu="./ChatUnreadBadge-3vq0t8d2.stx";var wu="./ChatLauncher-3zph4trh.stx";export{on as Accordion,ln as AccordionItem,dn as AddressField,Qd as AiTextarea,h0 as AnimationClasses,Tn as AppearancePicker,In as Audio,Bn as Avatar,Dh as BIOMETRIC_DEFAULT_KEY,qn as Badge,Pn as BiometricSignIn,Wn as Breadcrumb,$e as Breakpoints,Xn as Button,eo as Calendar,fo as Card,iu as ChatInbox,wu as ChatLauncher,lu as ChatMessage,bu as ChatUnreadBadge,go as Checkbox,rl as Checkout,bo as ChoiceChips,Ya as CodeBlock,wo as CodeEditor,ko as ColorSwatches,Co as Combobox,To as ComboboxButton,Io as ComboboxInput,Po as ComboboxOption,Ro as ComboboxOptions,un as CommandBar,Lo as CommandPalette,Oo as CommandPaletteItem,X as ComponentError,fn as ContentCard,Ho as ContextMenu,Yo as ContextMenuView,du as ConversationListItem,Em as DEFAULT_MAX_WIDTH,Tm as DEFAULT_MIN_WIDTH,oi as DataGrid,li as DataGridView,so as DateRangePicker,no as DateTimePicker,cl as DefaultPaymentMethod,di as Dialog,ui as DialogBackdrop,fi as DialogDescription,gi as DialogPanel,bi as DialogTitle,wi as Drawer,ki as Dropdown,Ci as DropdownButton,Ti as DropdownItem,Ii as DropdownItems,l0 as Easing,er as EmailInput,ro as EmptyState,co as ErrorState,xe as ErrorTypes,Im as FIT_MAX_WIDTH,kl as FORBIDDEN_SANDBOX_TOKENS,Ni as FileDrop,zr as FilterChip,Fr as FilterChips,gn as FloatingPanel,Xa as Footer,Pi as Form,Wi as GraphCanvas,Ge as GraphModel,ji as GraphView,$t as GridModel,Ui as GroupedList,Yi as GroupedListRow,Za as Hero,Zi as Image,Qa as Installation,Am as JSON_PREVIEW_LENGTH,xr as JsonTree,yr as JsonTreeView,Yy as KeyboardKeys,Hu as KeyboardShortcuts,_p as KeyframeAnimations,Sr as List,jr as ListRow,Er as Listbox,Ar as ListboxButton,Mr as ListboxLabel,Nr as ListboxOption,Dr as ListboxOptions,Rn as Login,su as MAC_DARK,tu as MAC_LIGHT,au as MAC_METRICS,uu as MessageBubble,_r as NavBar,Xr as Navigator,Qr as Notification,sr as NumberInput,tl as Pager,al as PagerDots,ol as Pagination,nr as PasswordInput,pl as PaymentMethods,ml as Popover,xl as PopoverButton,vl as PopoverPanel,yl as Portal,Dl as PreviewFrame,Hl as PreviewFrameView,Vl as Progress,f as PropTypes,Ql as RENDER_SURFACE_MAX_SIDE,Bl as Radio,ql as RadioGroup,Wl as RadioGroupDescription,Ul as RadioGroupLabel,Yl as RadioGroupOption,Zl as RenderSurface,Xe as SETTINGS_HIGHLIGHT_MS,vv as SETTINGS_NATIVE,wv as SETTINGS_NATIVE_SYMBOLS,xv as SETTINGS_NATIVE_TONES,Z as SETTINGS_RANK,ov as SETTINGS_TYPE_AHEAD_MS,Rc as SETTINGS_UPDATE_LABELS,Qu as SHADE_VAR_PREFIX,yw as SLIDER_MAX_TICKS,Ut as SYNTAX_DARK,Gt as SYNTAX_LIGHT,Kp as SYNTAX_PROPERTIES,Va as SYNTAX_TOKENS,ir as SearchInput,Kr as SectionCard,ic as SegmentedControl,lc as Select,pc as SettingsGroup,hc as SettingsPane,mc as SettingsPaneHeader,xc as SettingsRow,vc as SettingsSidebarGroup,yc as SettingsSidebarItem,Sc as SettingsUpdateRow,$c as SettingsWindow,Ic as SettingsWindowTree,zc as SettingsWindowView,Fc as Sidebar,bn as SidebarDivider,jc as SidebarFooter,_c as SidebarHeader,Kc as SidebarItem,Gc as SidebarPinned,wn as SidebarRow,Jc as SidebarSection,Xc as SidebarSpace,td as SidebarSpaceSwitcher,Qc as SidebarSpaces,Ln as Signup,hd as Skeleton,md as Slider,kn as SpaceSwitcher,xd as Spinner,wd as SplitPane,yd as SplitPaneView,Sd as Stepper,$d as StepperStep,ct as StorageManager,hl as SubscriptionCheckout,$r as SwipeRow,Ed as Switch,as as THEMED_FAMILIES,jd as Tab,Gr as TabBar,Jr as TabBarItem,_d as TabList,Kd as TabPanel,Ad as Table,Md as TableBody,Nd as TableCell,Dd as TableHead,zd as TableHeader,Fd as TableRow,Gd as Tabs,Jd as Teleport,lr as TextInput,Xd as Textarea,uo as ThemeToggle,Cn as TileGrid,tp as Tooltip,ap as Transition,Nt as TreeModel,On as TwoFactorChallenge,ia as VIEWPORT_PRESETS,op as Video,rp as VirtualList,cp as VirtualTable,x0 as animate,f0 as animateWithClass,Gy as announceToScreenReader,Ha as applyAnimation,E0 as applyHeadwindClasses,ok as applyTheme,e0 as aria,xs as ariaShortcut,Gn as assert,rf as assertProp,Hn as biometricHost,ns as biometricLabel,Oh as biometricSignInLabel,da as buildDocument,Zn as buttonPropSchema,ks as cellJson,ys as cellKind,ne as cellValue,qs as centreOn,js as clampZoom,tf as clearErrorHandler,X0 as clearModuleCache,Is as clipToRect,Ju as closeOverlay,ja as codeBlockCss,w0 as componentApi,j0 as componentMessages,zi as connectedComponents,mk as contactLink,Tu as copyToClipboard,Wy as createAriaDescription,Ky as createAriaLabel,zh as createBiometricSignIn,vk as createChat,W0 as createComponentPool,af as createDebugger,Uy as createFocusTrap,A0 as createI18n,_0 as createKeepAlive,Bp as createKeyframeAnimation,m0 as createKeyframes,q0 as createLRUCache,ae as createPropValidator,Q0 as createRouteLoader,Jy as createRovingTabindex,ff as createSafeClickHandler,t0 as createScreenReaderText,o0 as createSkipLink,K0 as createStateManager,Jw as createStorage,Ne as createTheme,Vp as cssAnimation,ai as cycleSort,L0 as d,kt as dateTimeFields,z0 as dateTimeFormats,St as dateTimeInstant,Ef as dateTimePreset,oo as dateTimeToIso,Cb as declaresColorScheme,Tt as defaultNodeMetrics,es as defaultTheme,Ia as deriveSpaceTint,la as describeViewport,T0 as detectLanguage,sf as devAssert,lt as dividerRange,Op as easeInBack,za as easeInBounce,Pp as easeInCirc,mp as easeInCubic,Np as easeInElastic,Ep as easeInExpo,Hp as easeInOutBack,Fp as easeInOutBounce,Rp as easeInOutCirc,xp as easeInOutCubic,Dp as easeInOutElastic,Ap as easeInOutExpo,fp as easeInOutQuad,wp as easeInOutQuart,Sp as easeInOutQuint,Tp as easeInOutSine,up as easeInQuad,bp as easeInQuart,yp as easeInQuint,Cp as easeInSine,zp as easeOutBack,Kt as easeOutBounce,Mp as easeOutCirc,gp as easeOutCubic,Lp as easeOutElastic,Ip as easeOutExpo,hp as easeOutQuad,vp as easeOutQuart,kp as easeOutQuint,$p as easeOutSine,Ns as edgeIdOf,Ms as edgeShape,et as emptySettingsHistory,bd as equalSizes,nf as errorBoundary,Hi as findBackEdges,Fo as findItem,U as findSettingsPane,Ee as firstIndex,cc as firstSettingsPane,_s as fit,We as fitLabel,ra as fitScale,Ra as fitSizes,Ml as forceColorScheme,Hs as forceLayout,Mi as formPropSchema,Ie as formatCell,Tf as formatDateTime,Mt as formatPath,gs as formatShortcut,zl as framePassesColorScheme,nx as fromTinkerValue,tx as fromValue,Oa as generateId,Mu as generateSEOTags,ck as generateThemeCSS,Z0 as getCacheStats,n0 as getColorSchemePreference,yt as getEffectiveTheme,qt as getFocusableElements,C0 as getHighlighter,M0 as getI18n,en as getSystemTheme,nk as getTheme,rk as getThemeValue,je as handleError,Xy as hasFocus,be as hasSubmenu,$0 as highlight,Jp as highlightToHtml,Fi as identityViewport,ei as inferColumns,Qo as inferType,cs as isActionable,It as isExpandable,ls as isFocusable,Pt as isIndexed,Sb as isIsolatingSandbox,F0 as isRTL,Yu as isTopOverlay,Qy as isVisibleToScreenReader,oe as labelOf,ds as lastIndex,Vs as layeredLayout,Zp as lazyLoad,J0 as lazyLoadAll,U0 as lazyLoadComponent,eu as lazyLoadImage,ek as lazyLoadImages,ut as lazyLoadModule,pp as linear,V0 as loadLocaleMessages,sk as macThemeCss,it as macosColors,Ds as maxLabelLength,Ts as moveCell,Zy as moveFocus,D0 as n,Ws as nearestInDirection,Gs as nearestTo,yg as nodeAt,Ls as nodeSize,Xs as nodeToJson,At as nodeToPlain,Ot as normalizeScheme,pe as normalizeSettingsText,rt as normalizeSizes,pd as normalizeSpace,tw as normalizeSpaces,H0 as numberFormats,pr as numberInputPropSchema,Uu as openOverlay,Xu as openOverlays,Ue as pan,Rs as parallelOffsets,jt as parseLength,Ma as parseSizes,hs as placeAtBox,us as placeAtPoint,fs as placeSubmenu,O0 as pluralRules,a0 as prefersHighContrast,s0 as prefersReducedMotion,Qp as preloadModule,Y0 as preloadModules,ma as presentFrame,Rt as previewOf,Ss as projectRow,v0 as registerComponentApi,d0 as removeAnimation,tc as renderSurfaceHost,Bt as resizeAt,Xv as resolveIconColor,Ct as resolveItems,Ze as resolveSettingsPane,Yv as resolveSidebarTheme,cd as resolveSpaceTint,Dt as resolveViewport,Ks as reveal,Cs as rowJson,$s as rowRange,ca as sandboxValue,nt as searchSettings,Os as seededRandom,Li as selfLoopShape,Na as separatorValue,u0 as sequenceAnimations,La as serializeSizes,ef as setErrorHandler,P0 as setI18n,sn as setLink,W as setMeta,tn as setTitle,tt as settingsCanGoBack,Re as settingsCanGoForward,st as settingsHistoryBack,he as settingsHistoryCurrent,at as settingsHistoryForward,Me as settingsHistoryVisit,ba as settingsMatchRank,bv as settingsNativeGlyph,ue as settingsParentPane,va as settingsResultsAnnouncement,zt as settingsRovingIndex,Qe as settingsSidebarPane,we as settingsStorageName,wa as settingsTypeAheadAdd,ya as settingsTypeAheadMatch,kv as settingsUpdateView,Ea as sidebarThemes,Pa as sliderDecimals,Sw as sliderFraction,Tw as sliderKeyValue,kw as sliderRange,me as sliderSnap,$w as sliderTicks,Cw as sliderValueAt,sw as spaceIndexOf,aw as spaceTintPayload,dd as spaceTintVars,ew as spaceWashGradient,p0 as staggerAnimation,nc as startRenderLoop,Te as stepIndex,pa as stepViewport,Uw as storage,_t as storageName,eh as stxThemePreset,Yt as syntaxPanelCss,Wp as syntaxThemeCss,Jt as syntaxTokenRules,dt as syntaxVariables,R0 as t,N0 as tc,dr as textInputPropSchema,lk as themePresets,nu as themeToCSSProperties,th as themeVariableNames,si as toCsv,Et as toGraph,ti as toJson,wg as toScreen,ps as typeAheadIndex,Bu as useBreakpoint,Nu as useClickOutside,$u as useCopyCode,Iu as useDarkMode,Du as useFocusTrap,Ku as useIsDarkMode,qu as useIsDesktop,_u as useIsMobile,zu as useKeyboard,Vu as useLocalStorage,Ce as useMediaQuery,Wu as usePrefersReducedMotion,Pu as useSEO,ik as useTheme,rs as validTimeZone,i0 as validateAriaRelationships,hf as validateButtonProps,Kg as validateEmailInputProps,cg as validateFormProps,Gg as validateNumberInputProps,Wg as validatePasswordInputProps,Jn as validateProps,Ug as validateSearchInputProps,gf as validateSize,qg as validateTextInputProps,mf as validateVariant,jp as waitForAnimation,Un as warn,lf as warnProp,os as wrapErrorHandler,Bs as zoomAt};