pine2profit 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +243 -2
- package/build/.gitkeep +0 -0
- package/build/index.cjs +1152 -0
- package/build/index.mjs +1142 -0
- package/build/modules/frontend/build/.nojekyll +0 -0
- package/build/modules/frontend/build/404/index.html +1 -0
- package/build/modules/frontend/build/404.html +1 -0
- package/build/modules/frontend/build/_next/static/_d4V5OqT091alEqu95MT1/_buildManifest.js +1 -0
- package/build/modules/frontend/build/_next/static/_d4V5OqT091alEqu95MT1/_ssgManifest.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/11.78c5bec5897e1148.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/195.64632be71175c993.js +63 -0
- package/build/modules/frontend/build/_next/static/chunks/204.008bcbcf48844ee2.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/255-da04dc9178303a31.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/2738385b.306f7750ad5b8be4.js +372 -0
- package/build/modules/frontend/build/_next/static/chunks/338-31711140cb6d61e5.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/4bd1b696-c023c6e3521b1417.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/50e49f97.75feacc2b3cc7709.js +433 -0
- package/build/modules/frontend/build/_next/static/chunks/554.dd4ac9a0aff9b782.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/570-33c81efca66c4bc9.js +3 -0
- package/build/modules/frontend/build/_next/static/chunks/5957d0c3.7b96612772854e2d.js +2 -0
- package/build/modules/frontend/build/_next/static/chunks/619-f09bc47e24909021.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/7589b812.60f2b16513f3aa42.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/771.5c62ba94f930669e.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/796.4b04b2b64c066b03.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/897-b727cc7229802490.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/app/_not-found/page-b6d9300903c2ab41.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/app/layout-0da8bd54f47c9e1b.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/app/page-7ab911a70ef48cfe.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/app/run/page-42836fc705c46a59.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/c525c9ef.018edb9552a70fc2.js +143 -0
- package/build/modules/frontend/build/_next/static/chunks/e1865c21-8d63eb0f5b25cb0c.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/framework-28b60818f5cffd83.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/main-45ecedd1f28e3a74.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/main-app-4ff0bbe1b367fcb5.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/pages/_app-7d307437aca18ad4.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/build/modules/frontend/build/_next/static/chunks/webpack-bb5ccf34ea47f1d7.js +1 -0
- package/build/modules/frontend/build/_next/static/css/91363587ff8467b5.css +1 -0
- package/build/modules/frontend/build/_next/static/media/29b98dbfba401fa9-s.p.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/313510e2713fb214-s.p.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/558ca1a6aa3cb55e-s.p.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/64d784ea54a4acde-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/6d831b18ae5b01dc-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/8048a25e80cc4179-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/851c4691abdf3def-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/87bc17f7c8b98e48-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/982ceffe7b733b3b-s.p.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/a6c19694cd327cd4-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/a8a8dd7277bab4cf-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/ac0e76ddaeeb7981-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/b8bfb68ab9ab617c-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/d76fe899475ae4d7-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/e546cf32c9d4702c-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/edc640959b0c7826-s.woff2 +0 -0
- package/build/modules/frontend/build/_next/static/media/ff71da380fbe67dd-s.woff2 +0 -0
- package/build/modules/frontend/build/icon.svg +1 -0
- package/build/modules/frontend/build/index.html +1 -0
- package/build/modules/frontend/build/index.txt +23 -0
- package/build/modules/frontend/build/run/index.html +1 -0
- package/build/modules/frontend/build/run/index.txt +23 -0
- package/package.json +93 -4
- package/types.d.ts +124 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[195],{187:(e,t,i)=>{i.d(t,{$5:()=>n});function n(e,t,i,r=null){let o=e.ownerDocument.defaultView;o&&e.dispatchEvent(new o.CustomEvent(t?"vela:surface-open":"vela:surface-close",{bubbles:!0,composed:!0,detail:{kind:i,trigger:r}}))}},333:(e,t,i)=>{i.d(t,{$h:()=>o,eC:()=>r});var n=i(3998);function r(e,t){var i,r;if(!e)return n.lQ;let o=Object.keys(t).reduce((t,i)=>(t[i]=e.style.getPropertyValue(i),t),{});return(i=o,r=t,Object.keys(i).every(e=>i[e]===r[e]))?n.lQ:(Object.assign(e.style,t),()=>{Object.assign(e.style,o),0===e.style.length&&e.removeAttribute("style")})}function o(e,t,i){if(!e)return n.lQ;let r=e.style.getPropertyValue(t);return r===i?n.lQ:(e.style.setProperty(t,i),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}},479:(e,t,i)=>{i.d(t,{Tf:()=>v});var n=i(7042),r=i(6806),o=i(4561),a=i(542),s=(0,o.I)({name:"kbd",parts:["root"],settings:{radius:"5px",shadow:`inset 0 -1px 0 ${r.t.border}`}}),l=(0,a.Il)("vela-ui-kbd",(0,a.AH)`@layer vela.ui{[data-slot=kbd]{border-radius:${s.vars.radius};border:1px solid ${r.t.border};border-bottom-color:color-mix(in srgb, ${r.t.fg.muted} 35%, transparent);background:${r.t.hover};min-width:18px;height:18px;color:${r.t.fg.bright};font:inherit;box-shadow:${s.vars.shadow};padding:0 4px;font-size:10px;font-weight:500;line-height:1}[data-slot=kbd]:where(:not([hidden])){justify-content:center;align-items:center;display:inline-flex}}`),d=i(4897),u=i(730),c=(0,o.I)({name:"button",parts:["root","icon","keys"],settings:{radius:r.t.radius.md,height:"34px","height-xs":"26px","height-sm":"30px","height-lg":"40px","font-size":"14px","font-size-xs":"12px","font-size-sm":"13px"}}),h=(0,u.H)({variant:["default","outline","secondary","ghost","destructive","link","up","down","favorite"],size:["default","xs","sm","lg","icon","icon-xs","icon-sm","icon-lg"]}),p=(0,a.AH)`@layer vela.ui{[data-slot=button]{cursor:pointer;height:${c.vars.height};border-radius:${c.vars.radius};border:1px solid ${r.t.border.strong};color:${r.t.fg};font-weight:400;font-size:${c.vars["font-size"]};white-space:nowrap;transition:background ${r.t.dur.fast} ease, color ${r.t.dur.fast} ease, opacity ${r.t.dur.fast} ease, border-color ${r.t.dur.fast} ease;background:0 0;padding:0 11px;font-family:inherit}[data-slot=button]:where(:not([hidden])){justify-content:center;align-items:center;gap:6px;display:inline-flex}[data-slot=button]>[data-icon]{flex:none;width:1em;height:1em;font-size:16px}[data-slot=button]>[data-icon]>svg{width:100%;height:100%}[data-slot=button][data-size=xs]>[data-icon],[data-slot=button][data-size=icon-xs]>[data-icon]{font-size:12px}[data-slot=button]>[data-keys]{flex:none;gap:2px}[data-slot=button]>[data-keys]:where(:not([hidden])){display:inline-flex}[data-slot=button]>[data-keys]>[data-slot=kbd]{border-color:${r.t.border};color:inherit;box-shadow:none;background:0 0}[data-slot=button][data-size=sm],[data-slot=button][data-size=icon-sm]{height:${c.vars["height-sm"]};font-size:${c.vars["font-size-sm"]}}[data-slot=button][data-size=xs],[data-slot=button][data-size=icon-xs]{height:${c.vars["height-xs"]};font-size:${c.vars["font-size-xs"]};border-radius:${r.t.radius.sm};padding:0 8px}[data-slot=button][data-size=lg],[data-slot=button][data-size=icon-lg]{height:${c.vars["height-lg"]};padding:0 14px}[data-slot=button][data-size=icon]{width:${c.vars.height};padding:0}[data-slot=button][data-size=icon-sm]{width:${c.vars["height-sm"]};padding:0}[data-slot=button][data-size=icon-xs]{width:${c.vars["height-xs"]};padding:0}[data-slot=button][data-size=icon-lg]{width:${c.vars["height-lg"]};padding:0}[data-slot=button]:disabled{cursor:default;opacity:.5}[data-slot=button]:focus-visible{outline:2px solid ${r.t.focus};outline-offset:1px}[data-slot=button]:not(:disabled):hover,[data-slot=button][aria-expanded=true]{background:${r.t.hover};color:${r.t.fg.bright};border-color:${r.t.fg.muted}}[data-slot=button][data-variant=default]{border-color:${r.t.selected.bg};background:${r.t.selected.bg};color:${r.t.selected.fg}}[data-slot=button][data-variant=default]:not(:disabled):hover,[data-slot=button][data-variant=default][aria-expanded=true]{background:${r.t.selected.bg};color:${r.t.selected.fg};opacity:.85;border-color:${r.t.selected.bg}}[data-slot=button][data-variant=secondary]{background:${r.t.surface.sunken};border-color:${r.t.border}}[data-slot=button][data-variant=secondary]:not(:disabled):hover,[data-slot=button][data-variant=secondary][aria-expanded=true]{border-color:${r.t.border.strong}}[data-slot=button][data-variant=ghost]{color:${r.t.fg.muted};border-color:#0000}[data-slot=button][data-variant=ghost]:not(:disabled):hover,[data-slot=button][data-variant=ghost][aria-expanded=true]{border-color:#0000}[data-slot=button][data-variant=destructive]{background:color-mix(in srgb, ${r.t.danger} 14%, transparent);color:${r.t.danger};border-color:#0000}[data-slot=button][data-variant=destructive]:not(:disabled):hover{background:color-mix(in srgb, ${r.t.danger} 24%, transparent);color:${r.t.danger};border-color:#0000}[data-slot=button][data-variant=link]{color:${r.t.accent};text-underline-offset:4px;background:0 0;border-color:#0000;padding-inline:0}[data-slot=button][data-variant=link]:not(:disabled):hover{color:${r.t.accent};background:0 0;border-color:#0000;text-decoration:underline}[data-slot=button][data-variant=up],[data-slot=button][data-variant=up]:not(:disabled):hover{background:${r.t.up};color:${r.t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=down],[data-slot=button][data-variant=down]:not(:disabled):hover{background:${r.t.down};color:${r.t.fg.onFill};border-color:#0000}[data-slot=button][data-variant=up]:not(:disabled):hover,[data-slot=button][data-variant=down]:not(:disabled):hover{opacity:.88}[data-slot=button][data-pressed]{background:${r.t.active};color:${r.t.fg.bright}}[data-slot=button][data-variant=favorite]{color:${r.t.fg.muted};border-color:#0000}[data-slot=button][data-variant=favorite]:not(:disabled):hover{border-color:#0000}[data-slot=button][data-variant=favorite][data-pressed]{color:${r.t.highlight};background:0 0}[data-slot=button][data-variant=favorite][data-pressed]:where(:not(:disabled)):hover{background:${r.t.hover};color:${r.t.highlight}}}`,g=(0,a.Il)("vela-ui-button",p),f=(e,t)=>{let i=(0,d.x_)(e,document);return i.dataset.slot=c.slot("icon"),i.dataset.icon=t,i},m=(e,t)=>e?.length?(0,n.h)("span",{slot:c.slot("keys"),data:{keys:t}},...e.map(e=>(function(e){l(document);let t=(0,n.h)("kbd",{className:e.className,slot:s.slot("root"),text:e.text});return{el:t,destroy:()=>t.remove()}})({text:e}).el)):null,b=class{constructor(e){g(document);let{variant:t,size:i}=h.resolve(e),r="favorite"===t;this.iconOnly=i.startsWith("icon"),this.label=e.label??e.text,this.controlled=void 0!==e.pressed,this.toggle=this.controlled||void 0!==e.defaultPressed||void 0!==e.onPressedChange,this.pressedState=e.pressed??e.defaultPressed??(!this.toggle&&void 0),this.icon=e.icon??(r?"star":void 0),this.iconPressed=e.iconPressed??(r?"star-filled":void 0),this.iconStart=this.icon?f(this.icon,"inline-start"):null,this.shownIcon=this.icon,this.textNode=this.iconOnly||void 0===e.text?null:document.createTextNode(e.text);let o=t=>{if(this.toggle){let t=!this.pressedState;this.controlled||this.setPressed(t),e.onPressedChange?.(t)}e.onClick?.(t)};this.el=(0,n.h)("button",{className:e.className?`vela-btn ${e.className}`:"vela-btn",slot:c.slot("root"),attrs:{type:"button",...h({variant:t,size:i})},on:this.toggle||e.onClick?{click:o}:void 0},this.iconStart,this.iconOnly?null:m(e.keys,"inline-start"),this.textNode,this.iconOnly?null:m(e.keysEnd,"inline-end"),e.iconEnd&&!this.iconOnly?f(e.iconEnd,"inline-end"):null),this.el.disabled=e.disabled??!1,this.paint()}get pressed(){return this.pressedState}setPressed(e){this.pressedState=e,this.paint()}setDisabled(e){this.el.disabled=e}setText(e){this.label=e,this.textNode&&(this.textNode.data=e),this.paint()}destroy(){}paint(){let e=this.el;if(this.iconStart&&this.iconPressed){let e=this.pressedState?this.iconPressed:this.icon;if(e!==this.shownIcon){let t=f(e,"inline-start");this.iconStart.replaceWith(t),this.iconStart=t,this.shownIcon=e}}e.toggleAttribute("data-pressed",!0===this.pressedState),void 0===this.pressedState?e.removeAttribute("aria-pressed"):e.setAttribute("aria-pressed",String(this.pressedState)),this.iconOnly&&void 0!==this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label")}};function v(e={}){return new b(e)}},648:(e,t,i)=>{i.d(t,{AO:()=>h,i7:()=>d,j9:()=>c,tp:()=>u,yF:()=>p,yT:()=>g});var n=i(3457);let r=e=>(0,n.sb)(e)&&"IFRAME"===e.tagName,o=/^(audio|video|details)$/;function a(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function s(e,t,i){let n=[...e],r=[...e],o=new Set,a=new Map;e.forEach((e,t)=>a.set(e,t));let s=0;for(;s<r.length;){let e=r[s++];if(!e||o.has(e))continue;o.add(e);let d=function(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;let i=t(e);return(!0===i?e.shadowRoot:i)||null}(e,t);if(d){let t=Array.from(d.querySelectorAll(l)).filter(i),o=a.get(e);if(void 0!==o){let e=o+1;n.splice(e,0,...t),t.forEach((t,i)=>{a.set(t,e+i)});for(let i=e+t.length;i<n.length;i++)a.set(n[i],i)}else{let e=n.length;n.push(...t),t.forEach((t,i)=>{a.set(t,e+i)})}r.push(...t)}}return n}let l="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",d=(e,t={})=>{if(!e)return[];let{includeContainer:i=!1,getShadowRoot:o}=t,a=Array.from(e.querySelectorAll(l));(!0==i||"if-empty"==i&&0===a.length)&&(0,n.sb)(e)&&u(e)&&a.unshift(e);let c=[];for(let e of a)if(u(e)){if(r(e)&&e.contentDocument){let t=e.contentDocument.body;c.push(...d(t,{getShadowRoot:o}));continue}c.push(e)}return o?s(c,o,u):c};function u(e){return!(!(0,n.sb)(e)||e.closest("[inert]"))&&e.matches(l)&&(0,n.J9)(e)}function c(e,t={}){if(!e)return[];let{includeContainer:i,getShadowRoot:n}=t,o=Array.from(e.querySelectorAll(l));i&&h(e)&&o.unshift(e);let a=[];for(let e of o)if(h(e)){if(r(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...c(t,{getShadowRoot:n}));continue}a.push(e)}if(n){let e=s(a,n,h);return!e.length&&i?o:e}return!a.length&&i?o:a}function h(e){if((0,n.sb)(e)&&e.tabIndex>0)return!0;if(!u(e)||0>a(e))return!1;if(!(0,n.B6)(e)||"radio"!==e.type||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,i=Array.from((e.form??e.ownerDocument).querySelectorAll(t)).filter(t=>t.form===e.form&&u(t)),r=i.find(e=>e.checked);return r?r===e:i[0]===e}function p(e,t={}){let i=c(e,t);return[i[0]||null,i[i.length-1]||null]}function g(e){return e.tabIndex<0&&(o.test(e.localName)||(0,n.fg)(e))&&Number.isNaN(a(e))?0:e.tabIndex}},730:(e,t,i)=>{i.d(t,{H:()=>n});function n(e){let t=Object.keys(e),i=t.map(e=>`data-${e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`);return Object.assign((n={})=>{let r={};for(let o=0;o<t.length;o+=1)r[i[o]]=n[t[o]]??e[t[o]][0];return r},{spec:e,resolve:(i={})=>{let n={};for(let r of t)n[r]=i[r]??e[r][0];return n}})}},853:(e,t,i)=>{i.d(t,{n:()=>r});let n=e=>e?.constructor.name==="Array",r=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof e?.isEqual&&"function"==typeof t?.isEqual)return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(n(e)&&n(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;let i=Object.keys(t??Object.create(null)),o=i.length;if(Object.keys(e).length!==o)return!1;for(let t=0;t<o;t++)if(!Reflect.has(e,i[t]))return!1;for(let n=0;n<o;n++){let o=i[n];if(!r(e[o],t[o]))return!1}return!0}},1381:(e,t,i)=>{i.d(t,{Sc:()=>R});var n=i(5788),r=i(7148),o=i(3754),a=i(4897),s=i(730),l=i(7042),d=i(6806),u=i(4561),c=i(542),h=i(6581),p=i(5089),g=i(3457),f=i(3998),m=i(9095),b=i(4591),v=i(1711);let y=e=>e.ids?.root??`switch:${e.id}`,x=e=>e.ids?.label??`switch:${e.id}:label`,w=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,E=e=>e.getById(y(e)),k=e=>e.getById(w(e)),{not:T}=(0,h.b6)(),O=(0,h.Op)({props:({props:e})=>({defaultChecked:!1,label:"switch",value:"on",...e}),initialState:()=>"ready",context:({prop:e,bindable:t})=>({checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(t){e("onCheckedChange")?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1})),rendered:t(()=>({defaultValue:{label:!0}}))}),computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:i,action:n}){e([()=>t("disabled")],()=>{n(["removeFocusIfNeeded"])}),e([()=>i.get("checked")],()=>{n(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible","trackRenderedElements"],on:{"CHECKED.TOGGLE":[{guard:T("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:T("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:i}){if(!e("isDisabled"))return function(e){let{pointerNode:t,keyboardNode:i=t,onPress:n,onPressStart:r,onPressEnd:o,isValidKey:a=e=>"Enter"===e.key}=e;if(!t)return f.lQ;let s=(0,g.zk)(t),l=f.lQ,d=f.lQ,u=f.lQ,c=e=>({point:(0,p.TH)(e),event:e});function h(e){o?.(c(e))}let m=(0,p.kn)(t,"pointerdown",e=>{d();let a=(0,p.kn)(s,"pointerup",e=>{let i=(0,p.wt)(e);(0,g.gR)(t,i)?n?.(c(e)):o?.(c(e))},{passive:!n,once:!0}),l=(0,p.kn)(s,"pointercancel",h,{passive:!o,once:!0});d=(0,f.Fs)(a,l),(0,g.X7)(i)&&"mouse"===e.pointerType&&e.preventDefault(),r?.(c(e))},{passive:!r}),b=(0,p.kn)(i,"focus",function(){let e=(0,p.kn)(i,"keydown",e=>{var t;a(e)&&(d(),d=(0,p.kn)(i,"keyup",e=>{if(!a(e))return;let t=c(new s.PointerEvent("pointerup"));n?.(t),o?.(t)}),t=new s.PointerEvent("pointerdown"),r?.(c(t)))}),t=(0,p.kn)(i,"blur",()=>{h(new s.PointerEvent("pointercancel"))});u=(0,f.Fs)(e,t)});return l=(0,f.Fs)(m,b),()=>{l(),d(),u()}}({pointerNode:E(t),keyboardNode:k(t),isValidKey:e=>" "===e.key,onPress:()=>i.set("active",!1),onPressStart:()=>i.set("active",!0),onPressEnd:()=>i.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return(0,v.Yy)({root:t.getRootNode()})},trackFormControlState:({context:e,send:t,scope:i})=>(0,m.$S)(k(i),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){t({type:"CHECKED.SET",checked:!!e.initial("checked"),src:"form-reset"})}}),trackRenderedElements:({context:e,scope:t})=>(0,b.l)({getContainerEl:()=>E(t),getRootNode:()=>t.getRootNode(),parts:{label:()=>(e=>e.getById(x(e)))(t)},onChange:t=>e.set("rendered",t)})},actions:{setContext({context:e,event:t}){for(let i in t.context)e.set(i,t.context[i])},syncInputElement({context:e,scope:t}){let i=k(t);i&&(0,m._T)(i,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{let i=k(t);(0,m.uf)(i,{checked:e.get("checked")})})}}}});var C=i(4792);let I={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},S=(0,i(5397).y)("switch").parts("root","label","control","thumb").build();function P(e,t){let{context:i,send:n,prop:r,scope:o}=e,a=i.get("rendered"),s=!!r("disabled"),l=!!r("readOnly"),d=!!r("required"),u=!!i.get("checked"),c=!s&&i.get("focused"),h=!s&&i.get("focusVisible"),g=!s&&i.get("active"),m={"data-active":(0,f.sE)(g),"data-focus":(0,f.sE)(c),"data-focus-visible":(0,f.sE)(h),"data-readonly":(0,f.sE)(l),"data-hover":(0,f.sE)(i.get("hovered")),"data-disabled":(0,f.sE)(s),"data-state":u?"checked":"unchecked","data-invalid":(0,f.sE)(r("invalid")),"data-required":(0,f.sE)(d)};return{checked:u,disabled:s,focused:c,setChecked(e){n({type:"CHECKED.SET",checked:e,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:u,isTrusted:!1})},getRootProps:()=>t.label({...S.root.attrs,...m,dir:r("dir"),id:y(o),htmlFor:w(o),onPointerMove(){s||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(e){!s&&((0,p.wt)(e)===k(o)&&e.stopPropagation(),(0,C.nr)()&&k(o)?.focus())}}),getLabelProps:()=>t.element({...S.label.attrs,...m,dir:r("dir"),id:x(o)}),getThumbProps:()=>t.element({...S.thumb.attrs,...m,dir:r("dir"),id:o.ids?.thumb??`switch:${o.id}:thumb`,"aria-hidden":!0}),getControlProps:()=>t.element({...S.control.attrs,...m,dir:r("dir"),id:o.ids?.control??`switch:${o.id}:control`,"aria-hidden":!0}),getHiddenInputProps:()=>t.input({id:w(o),type:"checkbox",required:r("required"),defaultChecked:u,disabled:s,"aria-labelledby":a.label?x(o):void 0,"aria-invalid":r("invalid"),name:r("name"),form:r("form"),value:r("value"),style:I,onFocus(){n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:(0,v.pP)()}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(e){if(l)return void e.preventDefault();n({type:"CHECKED.SET",checked:e.currentTarget.checked,isTrusted:!0})}})}}var $=(0,u.I)({name:"checkbox",parts:["root","icon"],settings:{radius:"5px"}}),N=(0,s.H)({size:["md","sm"],tone:["bright","selected"]}),A=(0,c.Il)("vela-ui-checkbox",(0,c.AH)`@layer vela.ui{[data-slot=checkbox]{border:1px solid ${d.t.border};border-radius:${$.vars.radius};color:#0000;cursor:pointer;width:20px;height:20px;transition:background ${d.t.dur.fast} ease, border-color ${d.t.dur.fast} ease, color ${d.t.dur.fast} ease;background:0 0;flex:none;justify-content:center;align-items:center;padding:0;line-height:0;position:relative}[data-slot=checkbox]:where(:not([hidden])){display:inline-flex}[data-slot=checkbox] [data-slot=checkbox-icon],[data-slot=checkbox] svg{width:12px;height:12px;display:block}[data-slot=checkbox][data-size=sm] [data-slot=checkbox-icon],[data-slot=checkbox][data-size=sm] svg{width:11px;height:11px}[data-slot=checkbox]:hover{border-color:${d.t.fg.muted}}[data-slot=checkbox][data-focus-visible]{outline:2px solid ${d.t.focus};outline-offset:1px}[data-slot=checkbox][data-state=checked]{background:${d.t.fg.bright};border-color:${d.t.fg.bright};color:${d.t.bg}}[data-slot=checkbox][data-size=sm]{border-color:${d.t.border.strong};width:18px;height:18px}[data-slot=checkbox][data-size=sm]:hover{border-color:${d.t.fg.muted}}[data-slot=checkbox][data-size=sm][data-state=checked]{background:${d.t.selected.bg};border-color:${d.t.selected.bg};color:${d.t.selected.fg}}[data-slot=checkbox][data-tone=selected][data-state=checked]{background:${d.t.selected.bg};border-color:${d.t.selected.bg};color:${d.t.selected.fg}}[data-slot=checkbox][data-disabled]{opacity:.4;cursor:default}}`),R=class{constructor(e={}){A(document),this.mid=(0,r.Ao)("vela-checkbox"),this.current=e.checked??e.defaultChecked??!1;let t=(0,a.x_)("check",document);t.dataset.slot=$.slot("icon"),this.input=(0,l.h)("input",{}),this.el=(0,l.h)("label",{className:"vela-switch",slot:$.slot("root"),attrs:N({size:e.size??"md",tone:e.tone??"bright"})},this.input,t),this.machine=(0,r.xl)(O,{id:this.mid,...e.id?{ids:{hiddenInput:e.id}}:{},defaultChecked:this.current,disabled:e.disabled??!1,...void 0!==e.name?{name:e.name}:{},...void 0!==e.required?{required:e.required}:{}},e=>this.render(e)),this.release=(0,n.j)(this.el,()=>this.machine.stop()),this.input.addEventListener("change",()=>{this.current=this.input.checked,e.onCheckedChange?.(this.current),e.onChange?.(this.current)}),this.el.addEventListener("pointerdown",t=>{e.disabled||(t.preventDefault(),this.input.focus({preventScroll:!0}))})}get checked(){return this.current}setChecked(e){e!==this.current&&(this.current=e,this.api().setChecked(e))}destroy(){this.release()}api(){return P(this.machine.service,o._B)}render(e){let t=P(e,o._B);(0,r.iU)(this.el,t.getRootProps(),this.mid),(0,r.iU)(this.input,t.getHiddenInputProps(),this.mid)}}},1404:(e,t,i)=>{function n(e,t){return Object.freeze({id:e,defaultMessage:t})}function r(e,t){return e?e.t(t):"string"==typeof t?t:t.defaultMessage}i.d(t,{a:()=>n,b:()=>r})},1471:(e,t,i)=>{i.d(t,{M2:()=>h,zx:()=>p});var n=i(3825),r=i(4897),o=i(7042),a=i(6806),s=i(4561),l=i(542),d=(0,s.I)({name:"callout-bubble",parts:["root","panel","title","text","actions","button"],settings:{"panel-radius":a.t.radius.md,"button-radius":"5px"}}),u=(0,l.AH)`@layer vela.ui{[data-slot=callout-bubble]{box-sizing:border-box;cursor:default;-webkit-user-select:none;user-select:none;border-radius:50%;flex:none;place-items:center;line-height:0}[data-slot=callout-bubble]:where(:not([hidden])){display:inline-grid}[data-slot=callout-bubble][role=button]{cursor:pointer}[data-slot=callout-bubble] svg{display:block}[data-slot=callout-bubble-panel]{box-sizing:border-box;background:${a.t.surface.elev};border:1px solid ${a.t.border.strong};border-radius:${d.vars["panel-radius"]};max-width:280px;box-shadow:${a.t.shadow};color:${a.t.fg};font:${a.t.fontSize.md} ${a.t.font};flex-direction:column;gap:8px;padding:10px 12px;display:flex}[data-slot=callout-bubble-title]{color:${a.t.fg.bright};font-weight:600}[data-slot=callout-bubble-text]{color:${a.t.fg.muted};white-space:pre-line;line-height:1.45}[data-slot=callout-bubble-actions]{flex-wrap:wrap;gap:8px;display:flex}[data-slot=callout-bubble-button]{cursor:pointer;border-radius:${d.vars["button-radius"]};border:1px solid ${a.t.border};height:26px;color:${a.t.fg};font-size:${a.t.fontSize.md};transition:background ${a.t.dur.fast} ease, color ${a.t.dur.fast} ease, opacity ${a.t.dur.fast} ease, border-color ${a.t.dur.fast} ease;background:0 0;padding:0 10px;font-family:inherit}[data-slot=callout-bubble-button]:where([data-primary]){border-color:${a.t.selected.bg};background:${a.t.selected.bg};color:${a.t.selected.fg}}[data-slot=callout-bubble-button]:hover{background:${a.t.hover};color:${a.t.fg.bright};border-color:${a.t.fg.muted}}[data-slot=callout-bubble-button]:where([data-primary]):hover{background:${a.t.selected.bg};color:${a.t.selected.fg};opacity:.85;border-color:${a.t.selected.bg}}}`,c=(0,l.Il)("vela-ui-callout-bubble",u);function h(e,t){return c(e.ownerDocument),(0,o.U)(e,d.slot(t)),e}var p=class{constructor(e){this.pop=null,this.spec={icon:e.icon,background:e.background,label:e.label},void 0!==e.color&&(this.spec.color=e.color),void 0!==e.panel&&(this.spec.panel=e.panel),this.size=e.size??16,this.host=e.host,this.theme=e.theme,this.placement={...e,collisionBoundary:e.collisionBoundary??e.boundary};let t=(e.host??document.body).ownerDocument;c(t),this.el=t.createElement("span"),this.el.className="vela-callout",this.el.dataset.slot=d.slot("root"),this.el.style.width=`${this.size}px`,this.el.style.height=`${this.size}px`,this.el.addEventListener("click",e=>{this.spec.panel&&(e.stopPropagation(),this.toggle())}),this.el.addEventListener("dblclick",e=>{this.spec.panel&&e.stopPropagation()}),this.el.addEventListener("keydown",e=>{this.spec.panel&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.toggle())}),this.dress()}set(e){this.spec={...this.spec,...e},"panel"in e&&this.pop?.hide(),this.dress()}get open(){return this.pop?.open??!1}hidePanel(){this.pop?.hide()}destroy(){this.pop?.destroy(),this.pop=null,this.el.remove()}dress(){let e=void 0!==this.spec.panel;this.el.style.background=this.spec.background,this.el.style.color=this.spec.color??"",this.el.innerHTML=(0,r.N0)(this.spec.icon,this.size-4),this.el.setAttribute("aria-label",this.spec.label),e?(this.el.setAttribute("role","button"),this.el.tabIndex=0):(this.el.removeAttribute("role"),this.el.removeAttribute("tabindex"))}toggle(){if(this.pop?.open)return void this.pop.hide();let e=this.spec.panel;e&&(this.pop?.destroy(),this.pop=new n.AM({trigger:this.el,side:this.placement.side,align:this.placement.align,sideOffset:this.placement.sideOffset??6,alignOffset:this.placement.alignOffset,avoidCollisions:this.placement.avoidCollisions,collisionPadding:this.placement.collisionPadding,content:t=>this.buildPanel(t,e),...this.host?{host:this.host}:{},...this.theme?{theme:this.theme()}:{},...this.placement.collisionBoundary?{collisionBoundary:this.placement.collisionBoundary}:{}}),this.pop.show())}buildPanel(e,t){let i=e.ownerDocument,n=(e,t,n)=>{let r=i.createElement(e);return r.className=t,h(r,n)},r=n("div","vela-callout-panel","panel");if(t.title){let e=n("div","vela-callout-title","title");e.textContent=t.title,r.appendChild(e)}for(let e of function(e){let t=[];for(let i of e){if("text"===i.type){t.push({type:"text",text:i.text});continue}let e=t[t.length-1];e&&"buttons"===e.type?e.buttons.push(i):t.push({type:"buttons",buttons:[i]})}return t}(t.items)){if("text"===e.type){let t=n("div","vela-callout-text","text");t.textContent=e.text,r.appendChild(t);continue}let t=n("div","vela-callout-actions","actions");for(let i of e.buttons){let e=n("button","vela-callout-btn"+(i.primary?" vela-callout-btn-primary":""),"button");e.type="button",i.primary&&(e.dataset.primary=""),e.textContent=i.label,e.addEventListener("click",()=>{i.run(),!1!==i.close&&this.pop?.hide()}),t.appendChild(e)}r.appendChild(t)}e.appendChild(r)}}},1542:(e,t,i)=>{function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t,i){var r;return(r=function(e,t){if("object"!=n(e)||!e)return e;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var i,r=i.call(e,t||"default");if("object"!=n(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==n(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{KP:()=>o,dY:()=>s,nz:()=>l,er:()=>a});var o=class e{constructor(){r(this,"id",null),r(this,"fn_cleanup",void 0),r(this,"cleanup",()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function a(e){let t=o.create();return t.request(e),t.cleanup}function s(e){let t=new Set;function i(e){let i=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(i))}return i(()=>i(e)),function(){t.forEach(e=>e())}}function l(e,t,i){let n=a(()=>{e.removeEventListener(t,r,!0),i()}),r=()=>{n(),i()};return e.addEventListener(t,r,{once:!0,capture:!0}),n}},1689:(e,t,i)=>{function n(e){let t=e.trim(),i=/^#([0-9a-f]{3})$/i.exec(t);if(i){let e=i[1];return{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)}}if(i=/^#([0-9a-f]{6})[0-9a-f]{0,2}$/i.exec(t)){let e=i[1];return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}}let n=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(t);return n?{r:parseFloat(n[1]),g:parseFloat(n[2]),b:parseFloat(n[3])}:null}function r(e,t){let i=n(e);return i?`rgba(${i.r},${i.g},${i.b},${t})`:e}function o(e,t,i){let r=n(e),o=n(t);if(!r||!o)return e;let a=(e,t)=>Math.round(e+(t-e)*i);return`rgb(${a(r.r,o.r)},${a(r.g,o.g)},${a(r.b,o.b)})`}function a(e,t="#888888"){let i=n(e);if(!i)return t;let r=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");return`#${r(i.r)}${r(i.g)}${r(i.b)}`}function s(e){let t=n(e);return!t||.2126*t.r+.7152*t.g+.0722*t.b<128}function l({r:e,g:t,b:i}){let n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*n(e)+.7152*n(t)+.0722*n(i)}function d(e,t){let i=n(e),r=n(t);if(!i||!r)return null;let[o,a]=[l(i),l(r)].sort((e,t)=>t-e);return(o+.05)/(a+.05)}i.d(t,{cP:()=>s,fu:()=>r,hS:()=>a,jh:()=>o,x5:()=>n,yN:()=>d})},1711:(e,t,i)=>{i.d(t,{Cl:()=>E,ME:()=>w,Yy:()=>T,pP:()=>k});var n=i(4792),r=i(5089),o=i(3457);let a=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),s=null,l=new Set,d=new Map,u=!1,c=null,h=!1,p=null,g={Tab:!0,Escape:!0};function f(e,t){for(let i of l)i(e,t)}function m(e){c=null,u=!0,e.metaKey||!(0,n.cX)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(s="keyboard",f("keyboard",e))}function b(e){("pointermove"===e.type||"mousemove"===e.type)&&e.isTrusted&&p?.x===e.clientX&&p?.y===e.clientY||(p={x:e.clientX,y:e.clientY},s="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(c=null,u=!0,f("pointer",e)))}function v(e){if((0,r.YF)(e)){c=null,u=!0,s="virtual";return}c=null;let t=(0,r.wt)(e),i=t?.closest("label"),n=i?.control;if(!i||!n||n.matches(":disabled"))return;let a=t?.closest("a[href],audio[controls],button,details,embed,iframe,img[controls],img[usemap],input,select,textarea,video[controls]");a&&i.contains(a)&&a!==n||n!==(0,o.bq)(i.ownerDocument)&&(c=n)}function y(e){let t=(0,r.wt)(e),i=t===c;t!==(0,o.zk)(t)&&t!==(0,o.YE)(t)&&e.isTrusted&&(u||i||h||(s="virtual",f("virtual",e)),u=!1,c=null,h=!1)}function x(){u=!1,c=null,h=!0}function w(){return s}function E(e){s=e,f(e,null)}function k(){return"keyboard"===s||"virtual"===s}function T(e={}){let{isTextInput:t,autoFocus:i,onChange:n,root:c}=e;!function(e){if("undefined"==typeof window||d.get((0,o.zk)(e)))return;let t=(0,o.zk)(e),i=(0,o.YE)(e),n=function(e){let t=e.HTMLElement.prototype;try{let i=function(e){try{return e.focus}catch{return}}(t),n=i?void 0:Object.getOwnPropertyDescriptor(t,"focus"),r=n?.get;if(!i&&!r)return{focus:void 0};return Object.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){u=!0,(i??r.call(this)).apply(this,arguments)}}),{focus:i,descriptor:n}}catch{return{focus:void 0}}}(t);i.addEventListener("keydown",m,!0),i.addEventListener("keyup",m,!0),i.addEventListener("click",v,!0),t.addEventListener("focus",y,!0),t.addEventListener("blur",x,!1),void 0!==t.PointerEvent?(i.addEventListener("pointerdown",b,!0),i.addEventListener("pointermove",b,!0),i.addEventListener("pointerup",b,!0)):(i.addEventListener("mousedown",b,!0),i.addEventListener("mousemove",b,!0),i.addEventListener("mouseup",b,!0)),t.addEventListener("beforeunload",()=>{((e,t)=>{let i=(0,o.zk)(e),n=(0,o.YE)(e);t&&n.removeEventListener("DOMContentLoaded",t);let r=d.get(i);if(r){if(r.focus||r.descriptor)try{Object.defineProperty(i.HTMLElement.prototype,"focus",r.descriptor??{configurable:!0,writable:!0,value:r.focus})}catch{}n.removeEventListener("keydown",m,!0),n.removeEventListener("keyup",m,!0),n.removeEventListener("click",v,!0),i.removeEventListener("focus",y,!0),i.removeEventListener("blur",x,!1),void 0!==i.PointerEvent?(n.removeEventListener("pointerdown",b,!0),n.removeEventListener("pointermove",b,!0),n.removeEventListener("pointerup",b,!0)):(n.removeEventListener("mousedown",b,!0),n.removeEventListener("mousemove",b,!0),n.removeEventListener("mouseup",b,!0)),d.delete(i)}})(e)},{once:!0}),d.set(t,n)}(c),n?.({isFocusVisible:i||k(),modality:s});let h=(e,i)=>{(function(e,t,i){let n=i?(0,r.wt)(i):null,s=(0,o.YE)(n),l=(0,o.zk)(n),d=(0,o.bq)(s);return!((e=e||d instanceof l.HTMLInputElement&&!a.has(d?.type)||d instanceof l.HTMLTextAreaElement||d instanceof l.HTMLElement&&d.isContentEditable)&&"keyboard"===t&&i instanceof l.KeyboardEvent&&!Reflect.has(g,i.key))})(!!t,e,i)&&n?.({isFocusVisible:k(),modality:e})};return l.add(h),()=>{l.delete(h)}}},1953:(e,t,i)=>{i.d(t,{Q7:()=>ep});var n=i(9748),r=i(1404),o=i(5788),a=i(7148),s=i(3754),l=i(4897),d=i(730),u=i(7042),c=i(6806),h=i(4561),p=i(542),g=i(6581),f=i(8571),m=i(1542),b=i(9095),v=i(8065),y=i(5089),x=i(4792),w=i(2498),E=i(2828),k=i(5034);function T(e,t){if(e&&t.isActiveElement(e))try{let{selectionStart:t,selectionEnd:i,value:n}=e;if(null==t||null==i)return;return{start:t,end:i,value:n}}catch{return}}function O(e,t,i){let n=e.slice(0,i),r=e.slice(i),o=0,a=Math.min(n.length,t.length);for(let e=0;e<a;e++)if(n[e]===t[e])o=e+1;else break;let s=0,l=Math.min(r.length,t.length-o);for(let e=0;e<l;e++){let i=r.length-1-e,n=t.length-1-e;if(r[i]===t[n])s=e+1;else break}return n.length>0&&o>=n.length?o:s>=r.length?t.length-s:o>0?o:s>0?t.length-s:0===i&&0===o&&0===s?t.length:e.length>0?Math.round(i/e.length*t.length):t.length}var C=i(3998);let I=e=>e.ids?.input??`number-input:${e.id}:input`,S=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,P=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,$=e=>`number-input:${e.id}:cursor`,N=e=>e.getById(I(e)),A=e=>e.getDoc().getElementById($(e)),R={incrementLabel:"increment value",decrementLabel:"decrease value"},L=new Map,V=!1;try{V="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}class F{constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:i}=t;i&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${i}`);let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(L.has(n))return L.get(n);let r=new Intl.NumberFormat(e,t);return L.set(n,r),r}(e,t),this.options=t}format(e){return V||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,i){if("auto"===t)return e.format(i);{if("never"===t)return e.format(Math.abs(i));let n=!1;if("always"===t?n=i>0||Object.is(i,0):"exceptZero"===t&&(Object.is(i,-0)||Object.is(i,0)?i=Math.abs(i):n=i>0),!n)return e.format(i);{let t=e.format(-i),n=e.format(i),r=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...r].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(r,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e)}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let i=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...i.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return V||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),e}}let D=RegExp("^.*\\(.*\\).*$"),M=["latn","arab","hanidec","deva","beng","fullwide"];class z{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return B(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return B(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return B(this.locale,this.options,e).options.numberingSystem}}let H=new Map;function B(e,t,i){let n=_(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(i)){for(let r of M)if(r!==n.options.numberingSystem){let n=_(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(n.isValidPartialNumber(i))return n}}return n}function _(e,t){let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),n=H.get(i);return n||(n=new U(e,t),H.set(i,n)),n}class U{constructor(e,t={}){this.locale=e,1!==t.roundingIncrement&&null!=t.roundingIncrement&&(null==t.maximumFractionDigits&&null==t.minimumFractionDigits?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):null==t.maximumFractionDigits?t.maximumFractionDigits=t.minimumFractionDigits:null==t.minimumFractionDigits&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,i,n){let r=new Intl.NumberFormat(e,{...i,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:!0}),o=r.formatToParts(-10000.111),a=r.formatToParts(10000.111),s=j.map(e=>r.formatToParts(e)),l=s.map((e,t)=>{let i=e.find(e=>"unit"===e.type);return i&&!e.some(e=>"integer"===e.type||"fraction"===e.type)?{unit:i.value,value:j[t]}:null}).filter(e=>!!e),d=o.find(e=>"minusSign"===e.type)?.value??"-",u=a.find(e=>"plusSign"===e.type)?.value;u||n?.signDisplay!=="exceptZero"&&n?.signDisplay!=="always"||(u="+");let c=new Intl.NumberFormat(e,{...i,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),h=c.find(e=>"decimal"===e.type)?.value,p=o.find(e=>"group"===e.type)?.value,g=[...new Set([...o.filter(e=>!G.has(e.type)).map(e=>K(e.value)),...s.flatMap(e=>e.filter(e=>!G.has(e.type)).map(e=>K(e.value)))])].sort((e,t)=>t.length-e.length),f=0===g.length?RegExp("\\p{White_Space}|\\p{Cf}","gu"):RegExp(`${g.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),m=[...new Intl.NumberFormat(i.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),b=new Map(m.map((e,t)=>[e,t]));return{minusSign:d,plusSign:u,decimal:h,group:p,literals:f,numeral:RegExp(`[${m.join("")}]`,"g"),numerals:m,index:e=>String(b.get(e)),noNumeralUnits:l}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}parse(e){let t=this.formatter.resolvedOptions().useGrouping,i=this.sanitize(e);if(!t&&this.symbols.group&&i.includes(this.symbols.group))return NaN;if(this.symbols.group&&(i=i.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(i=i.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(i=i.replace(this.symbols.minusSign,"-")),i=i.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=i.indexOf("-"),t=(i=(i=i.replace("-","")).replace("+","")).indexOf(".");-1===t&&(t=i.length),i=i.replace(".",""),i=t-2==0?`0.${i}`:t-2==-1?`0.0${i}`:t-2==-2?"0.00":`${i.slice(0,t-2)}.${i.slice(t-2)}`,e>-1&&(i=`-${i}`)}let n=i?+i:NaN;if(isNaN(n))return NaN;if("percent"===this.options.style){let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new z(this.locale,e).parse(new F(this.locale,e).format(n))}return"accounting"===this.options.currencySign&&D.test(e)&&(n*=-1),n}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=W(e,",",this.symbols.decimal),e=W(e,String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&t&&(e=W(e,".",this.symbols.group))),"’"===this.symbols.group&&e.includes("'")&&t&&(e=W(e,"'",this.symbols.group)),"'"===this.symbols.group&&e.includes("’")&&t&&(e=W(e,"’",this.symbols.group)),"fr-FR"===this.options.locale&&this.symbols.group&&t&&(e=W(e," ",this.symbols.group),e=W(e,/\u00A0/g,this.symbols.group)),e)}isValidPartialNumber(e,t=-1/0,i=1/0){let n=this.formatter.resolvedOptions().useGrouping;return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&i>0&&(e=e.slice(this.symbols.plusSign.length)),(!(this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1)||0!==this.options.maximumFractionDigits)&&(this.symbols.group&&n&&(e=W(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}}let G=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),j=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function W(e,t,i){return e.replaceAll?e.replaceAll(t,i):e.split(t).join(i)}function K(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let q=(e,t)=>{let{prop:i,computed:n}=t;return i("formatOptions")?""===e?NaN:n("parser").parse(e):parseFloat(e)},Y=(e,t)=>{let{prop:i,computed:n}=t;return Number.isNaN(e)?"":i("formatOptions")?n("formatter").format(e):e.toString()},{choose:X,guards:J,createMachine:Q}=(0,g.mj)(),{not:Z,and:ee}=J,et=Q({props({props:e}){var t,i;let n,r=(t=e.step,i=e.formatOptions,n=void 0===t||Number.isNaN(t)?1:t,i?.style==="percent"&&(void 0===t||Number.isNaN(t))&&(n=.01),n);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:r,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,largeStep:e.largeStep??10*r,smallStep:e.smallStep??r/10}},initialState:()=>"idle",context:({prop:e,bindable:t,getComputed:i})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){let n=q(t,{computed:i(),prop:e});e("onValueChange")?.({value:t,valueAsNumber:n})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash:e=>e?`x:${e.x}, y:${e.y}`:""})),fieldsetDisabled:t(()=>({defaultValue:!1}))}),refs:()=>({syncFrame:m.KP.create()}),computed:{isRtl:({prop:e})=>"rtl"===e("dir"),valueAsNumber:({context:e,computed:t,prop:i})=>q(e.get("value"),{computed:t,prop:i}),formattedValue:({computed:e,prop:t})=>Y(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>(0,w.pY)(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>(0,w.H_)(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!(0,w.s)(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>""===e.get("value"),isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>(0,E.QL)(R,e("translations")).valueText?.(t.get("value")),formatter:(0,f.p)(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>((e,t={})=>new Intl.NumberFormat(e,t))(e,t)),parser:(0,f.p)(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>((e,t={})=>new z(e,t))(e,t))},watch({track:e,action:t,context:i,computed:n,prop:r}){e([()=>i.get("value"),()=>r("locale"),()=>JSON.stringify(r("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>n("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>i.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],exit:["cancelSyncFrame"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:ee("clampValueOnBlur",Z("isValueEmpty"),Z("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:Z("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:X([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:ee("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isValueEmpty:({computed:e})=>e("isValueEmpty"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>"touch"===e.pointerType},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let i=N(t);return(0,b.$S)(i,{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let i=e.get("scrubberCursorPoint");return(0,x.nr)()?void 0:(((e,t)=>{let i=e.getDoc(),n=i.createElement("div");n.className="scrubber--cursor",n.id=$(e),Object.assign(n.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:C.hx,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),n.innerHTML=`
|
|
2
|
+
<svg width="46" height="15" style="left: -15.5px; position: absolute; top: 0; filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 1px 1.1px);">
|
|
3
|
+
<g transform="translate(2 3)">
|
|
4
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z" style="stroke-width: 2px; stroke: white;"></path>
|
|
5
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z"></path>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>`,i.body.appendChild(n)})(t,i),()=>{A(t)?.remove()})},preventTextSelection:({scope:e})=>(e=>{let t=e.getDoc(),i=t.documentElement,n=t.body;return n.style.pointerEvents="none",i.style.userSelect="none",i.style.cursor="ew-resize",()=>{n.style.pointerEvents="",i.style.userSelect="",i.style.cursor="",i.style.length||i.removeAttribute("style"),n.style.length||n.removeAttribute("style")}})(e),trackButtonDisabled({context:e,scope:t,send:i}){let n,r,o,a=e.get("hint"),s=(n=null,"increment"===a&&(n=(r=t).getById(S(r))),"decrement"===a&&(n=(o=t).getById(P(o))),n);return(0,v.mx)(s,{attributes:["disabled"],callback(){i({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:i}){let n=N(e);if(n&&e.isActiveElement(n)&&i("allowMouseWheel"))return(0,y.kn)(n,"wheel",function(e){e.preventDefault();let i=-1*Math.sign(e.deltaY);1===i?t({type:"VALUE.INCREMENT"}):-1===i&&t({type:"VALUE.DECREMENT"})},{passive:!1})},activatePointerLock({scope:e}){if(!(0,x.nr)())return function(e,t){let i=e.body;if(!("pointerLockElement"in e||"mozPointerLockElement"in e))return;try{i.requestPointerLock()}catch{}let n=[(0,y.kn)(e,"pointerlockchange",function(){},!1),(0,y.kn)(e,"pointerlockerror",function(t){e.pointerLockElement,console.error("PointerLock error occurred:",t),e.exitPointerLock()},!1)];return()=>{n.forEach(e=>e()),e.exitPointerLock()}}(e.getDoc())},trackMousemove({scope:e,send:t,context:i,computed:n}){let r=e.getDoc();return(0,k.OK)((0,y.kn)(r,"mousemove",function(r){let o=((e,t)=>{let{point:i,isRtl:n,event:r}=t,o=e.getWin(),a=(0,w.Gy)(r.movementX,o.devicePixelRatio),s=(0,w.Gy)(r.movementY,o.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;n&&l&&(l="increment"===l?"decrement":"increment");let d={x:i.x+a,y:i.y+s},u=o.innerWidth,c=(0,w.Gy)(7.5,o.devicePixelRatio);return d.x=(0,w.LV)(d.x+c,u)-c,{hint:l,point:d}})(e,{point:i.get("scrubberCursorPoint"),isRtl:n("isRtl"),event:r});o.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:o.hint,point:o.point})},!1),(0,y.kn)(r,"mouseup",function(){t({type:"SCRUBBER.POINTER_UP"})},!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let i=N(e);e.isActiveElement(i)||(0,m.er)(()=>i?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:i,computed:n}){let r=(0,w.tp)(n("valueAsNumber"),t.step??i("step"));i("allowOverflow")||(r=(0,w.L3)(r,i("min"),i("max"))),e.set("value",Y(r,{computed:n,prop:i}))},decrement({context:e,event:t,prop:i,computed:n}){let r=(0,w.VJ)(n("valueAsNumber"),t.step??i("step"));i("allowOverflow")||(r=(0,w.L3)(r,i("min"),i("max"))),e.set("value",Y(r,{computed:n,prop:i}))},setClampedValue({context:e,prop:t,computed:i}){let n=(0,w.L3)(i("valueAsNumber"),t("min"),t("max"));e.set("value",Y(n,{computed:i,prop:t}))},setRawValue({context:e,event:t,prop:i,computed:n}){let r="number"==typeof t.value?t.value:q(t.value,{computed:n,prop:i});i("allowOverflow")||(r=(0,w.L3)(r,i("min"),i("max"))),e.set("value",Y(r,{computed:n,prop:i}))},setValue({context:e,event:t}){let i=t.target?.value??t.value;e.set("value",i)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:i}){let n=Y(t("max"),{computed:i,prop:t});e.set("value",n)},decrementToMin({context:e,prop:t,computed:i}){let n=Y(t("min"),{computed:i,prop:t});e.set("value",n)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){t("onFocusChange")?.({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){t("onFocusChange")?.({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:i}){if("INPUT.CHANGE"===i.type)return;let n=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";t("onValueInvalid")?.({reason:n,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){t("onValueCommit")?.({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:i,scope:n,refs:r}){let o=t.type.endsWith("CHANGE")?e.get("value"):i("formattedValue"),a=N(n),s=t.selection??T(a,n),l=a?.value;r.get("syncFrame").request(()=>{a&&a.value!==l||((0,b.U4)(a,o),function(e,t,i){if(e&&i.isActiveElement(e)){if(!t){let t=e.value.length;e.setSelectionRange(t,t);return}try{let i=e.value,{start:n,end:r,value:o}=t;if(i===o)return void e.setSelectionRange(n,r);let a=O(o,i,n),s=n===r?a:O(o,i,r),l=Math.max(0,Math.min(a,i.length)),d=Math.max(l,Math.min(s,i.length));e.setSelectionRange(l,d)}catch{let t=e.value.length;e.setSelectionRange(t,t)}}}(a,s,n))})},cancelSyncFrame({refs:e}){e.get("syncFrame").cancel()},setFormattedValue({context:e,computed:t,action:i}){e.set("value",t("formattedValue")),i(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let i=A(t),n=e.get("scrubberCursorPoint");i&&n&&(i.style.transform=`translate3d(${n.x}px, ${n.y}px, 0px)`)}}}});function ei(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var en=i(3457);let er=(0,i(5397).y)("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber").build();function eo(e,t){let{state:i,send:n,prop:r,scope:o,computed:a}=e,s=i.hasTag("focus"),l=a("isDisabled"),d=!!r("readOnly"),u=!!r("required"),c=i.matches("scrubbing"),h=a("isValueEmpty"),p=void 0!==r("invalid")?!!r("invalid"):a("isOutOfRange"),g=l||!a("canIncrement")||d,f=l||!a("canDecrement")||d,b=(0,E.QL)(R,r("translations"));return{focused:s,invalid:p,empty:h,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(e){n({type:"VALUE.SET",value:e})},clearValue(){n({type:"VALUE.CLEAR"})},increment(){n({type:"VALUE.INCREMENT"})},decrement(){n({type:"VALUE.DECREMENT"})},setToMax(){n({type:"VALUE.SET",value:r("max")})},setToMin(){n({type:"VALUE.SET",value:r("min")})},focus(){N(o)?.focus()},getRootProps:()=>t.element({id:o.ids?.root??`number-input:${o.id}`,...er.root.attrs,dir:r("dir"),"data-disabled":(0,C.sE)(l),"data-focus":(0,C.sE)(s),"data-invalid":(0,C.sE)(p),"data-scrubbing":(0,C.sE)(c)}),getLabelProps:()=>t.label({...er.label.attrs,dir:r("dir"),"data-disabled":(0,C.sE)(l),"data-focus":(0,C.sE)(s),"data-invalid":(0,C.sE)(p),"data-required":(0,C.sE)(u),"data-scrubbing":(0,C.sE)(c),id:o.ids?.label??`number-input:${o.id}:label`,htmlFor:I(o),onClick(){(0,m.er)(()=>{ei(N(o))})}}),getControlProps:()=>t.element({...er.control.attrs,dir:r("dir"),role:"group","aria-disabled":l,"data-focus":(0,C.sE)(s),"data-disabled":(0,C.sE)(l),"data-invalid":(0,C.sE)(p),"data-scrubbing":(0,C.sE)(c),"aria-invalid":(0,C.rq)(p)}),getValueTextProps:()=>t.element({...er.valueText.attrs,dir:r("dir"),"data-disabled":(0,C.sE)(l),"data-invalid":(0,C.sE)(p),"data-focus":(0,C.sE)(s),"data-scrubbing":(0,C.sE)(c)}),getInputProps:()=>t.input({...er.input.attrs,dir:r("dir"),name:r("name"),form:r("form"),id:I(o),role:"spinbutton",defaultValue:a("formattedValue"),pattern:r("formatOptions")?void 0:r("pattern"),inputMode:r("inputMode"),"aria-invalid":(0,C.rq)(p),"data-invalid":(0,C.sE)(p),disabled:l,"data-disabled":(0,C.sE)(l),readOnly:d,required:r("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":r("min"),"aria-valuemax":r("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":(0,C.sE)(c),onFocus(){n({type:"INPUT.FOCUS"})},onBlur(){n({type:"INPUT.BLUR"})},onInput(e){let t=T(e.currentTarget,o);n({type:"INPUT.CHANGE",target:e.currentTarget,hint:"set",selection:t})},onBeforeInput(e){try{let{selectionStart:t,selectionEnd:i,value:n}=e.currentTarget,r=n.slice(0,t)+(e.data??"")+n.slice(i);a("parser").isValidPartialNumber(r)||e.preventDefault()}catch{}},onKeyDown(e){if(e.defaultPrevented||d||(0,y.q_)(e))return;let t=(0,y.IF)(e,{step:r("step"),largeStep:r("largeStep"),smallStep:r("smallStep")});(0,({ArrowUp(){n({type:"INPUT.ARROW_UP",step:t}),e.preventDefault()},ArrowDown(){n({type:"INPUT.ARROW_DOWN",step:t}),e.preventDefault()},Home(){(0,y.VL)(e)||(n({type:"INPUT.HOME"}),e.preventDefault())},End(){(0,y.VL)(e)||(n({type:"INPUT.END"}),e.preventDefault())},Enter(e){n({type:"INPUT.ENTER",selection:T(e.currentTarget,o)})}})[e.key])?.(e)}}),getDecrementTriggerProps:()=>t.button({...er.decrementTrigger.attrs,dir:r("dir"),id:P(o),disabled:f,"data-disabled":(0,C.sE)(f),"aria-label":b.decrementLabel,type:"button",tabIndex:-1,"aria-controls":I(o),"data-scrubbing":(0,C.sE)(c),onPointerDown(e){!f&&(0,y.Ml)(e)&&(n({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:e.pointerType}),"mouse"===e.pointerType&&e.preventDefault(),"touch"===e.pointerType&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){n({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:e.pointerType})},onPointerLeave(){f||n({type:"TRIGGER.PRESS_UP",hint:"decrement"})}}),getIncrementTriggerProps:()=>t.button({...er.incrementTrigger.attrs,dir:r("dir"),id:S(o),disabled:g,"data-disabled":(0,C.sE)(g),"aria-label":b.incrementLabel,type:"button",tabIndex:-1,"aria-controls":I(o),"data-scrubbing":(0,C.sE)(c),onPointerDown(e){!g&&(0,y.Ml)(e)&&(n({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:e.pointerType}),"mouse"===e.pointerType&&e.preventDefault(),"touch"===e.pointerType&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){n({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:e.pointerType})},onPointerLeave(e){n({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:e.pointerType})}}),getScrubberProps:()=>t.element({...er.scrubber.attrs,dir:r("dir"),"data-disabled":(0,C.sE)(l),id:o.ids?.scrubber??`number-input:${o.id}:scrubber`,role:"presentation","data-scrubbing":(0,C.sE)(c),onMouseDown(e){if(l||!(0,y.Ml)(e))return;let t=(0,y.TH)(e),i=(0,en.zk)(e.currentTarget).devicePixelRatio;t.x=t.x-(0,w.Gy)(7.5,i),t.y=t.y-(0,w.Gy)(7.5,i),n({type:"SCRUBBER.PRESS_DOWN",point:t}),e.preventDefault(),(0,m.er)(()=>{ei(N(o))})},style:{cursor:l?void 0:"ew-resize"}})}}function ea(e){let t=String(e),i=t.search(/[eE]/);return i>=0?Math.max(0,Math.min(20,(t.slice(0,i).split(".")[1]?.length??0)-Number(t.slice(i+1)))):t.split(".")[1]?.length??0}var es=(0,h.I)({name:"number-input",parts:["root","input","steps","step"],settings:{radius:c.t.radius.md,"step-radius":"3px","focus-ring":`0 0 0 3px ${c.t.focus.soft}`}}),el=(0,d.H)({size:["md","sm"]}),ed={increase:(0,r.a)("ui.numberInput.increase","Increase"),decrease:(0,r.a)("ui.numberInput.decrease","Decrease")},eu=new Intl.NumberFormat("en-US",{useGrouping:!1,maximumFractionDigits:20}),ec=(0,p.AH)`@layer vela.ui{[data-slot=number-input-input]{box-sizing:border-box;border:1px solid ${c.t.border.strong};border-radius:${es.vars.radius};width:100%;height:34px;color:${c.t.fg.bright};transition:border-color ${c.t.dur.fast} ease, box-shadow ${c.t.dur.fast} ease;appearance:textfield;-webkit-user-select:text;user-select:text;background:0 0;outline:2px solid #0000;padding:0 8px;font-family:inherit;font-size:14px}[data-slot=number-input-input]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[data-slot=number-input-input]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[data-slot=number-input-input]:hover{border-color:${c.t.fg.muted}}[data-slot=number-input-input]:focus{border-color:${c.t.focus};box-shadow:${es.vars["focus-ring"]}}[data-slot=number-input-steps]{inset-inline-end:0;box-sizing:border-box;flex-direction:column;justify-content:center;width:22px;padding-block:2px;padding-inline:0 6px;line-height:0;display:none;position:absolute;top:0;bottom:0}[data-slot=number-input-step]{width:100%;min-height:0;color:${c.t.fg.muted};border-radius:${es.vars["step-radius"]};cursor:pointer;background:0 0;border:none;flex:1;justify-content:center;align-items:center;padding:0;display:flex}[data-slot=number-input-step]:hover{background:${c.t.hover};color:${c.t.fg.bright}}[data-slot=number-input-step]>span,[data-slot=number-input-step] svg{width:12px;height:12px;display:block}[data-slot=number-input]{min-width:0;position:relative}[data-slot=number-input]:where(:not([hidden])){display:inline-block}[data-slot=number-input][data-fill]{width:100%}[data-slot=number-input]:not([data-fill]){flex:none;justify-self:start;width:100px}[data-slot=number-input]:not([data-fill])[data-compact]{width:80px}[data-slot=number-input][data-size=sm]{flex:none;width:64px}[data-slot=number-input][data-size=sm][data-compact]{width:56px}[data-slot=number-input][data-size=sm] [data-slot=number-input-input]{background:${c.t.surface.elev};border-radius:${c.t.radius.sm};height:28px;color:${c.t.fg};box-shadow:none;font-size:13px}[data-slot=number-input][data-size=sm] [data-slot=number-input-input]:focus{box-shadow:none}[data-slot=number-input][data-steppers]:hover [data-slot=number-input-input]{padding-inline-end:26px}[data-slot=number-input][data-steppers]:hover [data-slot=number-input-steps]{display:flex}}`,eh=(0,p.Il)("vela-ui-number-3",ec),ep=class{constructor(e){this.typing=!1,this.up=null,this.down=null,eh(document),this.i18n=e.i18n??(0,n.N)(),this.ctrl=function(e){let t=e.value,i=e.integer??!1,n=e.commit??"blur",r=e.clamp??"blur"===n,o=e.step??(i?1:.1),a=e.onChange,s=t=>{var n;let o;return r?(n={min:e.min,max:e.max,integer:i},o=t,void 0!==n.min&&(o=Math.max(n.min,o)),void 0!==n.max&&(o=Math.min(n.max,o)),n.integer&&(o=Math.round(o)),o):t},l=e=>{if(!Number.isFinite(e))return null;let i=s(e);return i!==t&&(t=i,a?.(i)),i};return{get value(){return t},min:e.min,max:e.max,step:o,integer:i,size:e.size??"md",commit:n,steppers:e.steppers??"blur"===n,clamp:r,disabled:e.disabled??!1,apply:l,sync(e){let i=Number.isFinite(e)?s(e):t;return t=i,i},nudge:e=>l(function(e,t,i){let n=Math.min(20,Math.max(ea(t),ea(i)));return Number(e.toFixed(n))}(t+e*o,t,o))}}(e),this.placeholderMode=void 0!==e.placeholder,this.emptyValue=e.emptyValue??e.value,this.mid=(0,a.Ao)("vela-number-input");let t=(0,u.h)("input",{slot:es.slot("input"),attrs:{title:e.title}});this.placeholderMode&&(t.placeholder=e.placeholder??""),this.input=t;let i=e=>{this.typing=!1;let t=this.ctrl.apply(e);this.show(null===t?this.ctrl.value:t)};t.addEventListener("input",()=>{if("live"!==this.ctrl.commit||this.placeholderMode)this.typing=!0;else{let e=Number(t.value);""!==t.value.trim()&&Number.isFinite(e)&&this.ctrl.apply(e)}}),this.placeholderMode?t.addEventListener("change",()=>{let e=""===t.value.trim()?this.emptyValue:Number(t.value);i(Number.isFinite(e)?e:this.emptyValue)}):"live"!==this.ctrl.commit&&(t.addEventListener("blur",()=>i(Number(t.value))),t.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),t.blur())})),t.addEventListener("keydown",e=>{("ArrowUp"===e.key||"ArrowDown"===e.key||"PageUp"===e.key||"PageDown"===e.key)&&(this.typing=!1)});let s=this.ctrl.steppers?this.buildSteppers(document):null;this.el=(0,u.h)("div",{className:"vela-num",slot:es.slot("root"),attrs:el({size:this.ctrl.size}),data:{fill:e.fill??"sm"!==this.ctrl.size,compact:!0===e.compact,steppers:this.ctrl.steppers}},t,s);let l=this.ctrl.clamp;this.machine=(0,a.xl)(et,{id:this.mid,...e.id?{ids:{input:e.id}}:{},defaultValue:this.placeholderMode&&e.value===this.emptyValue?"":String(e.value),step:this.ctrl.step,...l&&void 0!==this.ctrl.min?{min:this.ctrl.min}:{},...l&&void 0!==this.ctrl.max?{max:this.ctrl.max}:{},clampValueOnBlur:l,allowOverflow:!l,disabled:this.ctrl.disabled,...void 0!==e.name?{name:e.name}:{},...void 0!==e.required?{required:e.required}:{},locale:"en-US",formatOptions:{useGrouping:!1,maximumFractionDigits:20},focusInputOnChange:!1,spinOnPress:!0,translations:{incrementLabel:(0,r.b)(this.i18n,ed.increase),decrementLabel:(0,r.b)(this.i18n,ed.decrease)},onValueChange:({valueAsNumber:e})=>{!this.typing&&Number.isFinite(e)&&e!==this.ctrl.value&&i(e)}},e=>this.render(e)),this.release=(0,o.j)(this.el,()=>this.machine.stop())}get value(){return this.ctrl.value}setValue(e){this.typing=!1,this.show(this.ctrl.sync(e))}destroy(){this.release()}show(e){let t=eo(this.machine.service,s._B);this.placeholderMode&&e===this.emptyValue?(t.empty||t.clearValue(),this.input.value=""):(t.valueAsNumber!==e&&t.setValue(e),this.input.value=eu.format(e))}render(e){let t=eo(e,s._B);(0,a.iU)(this.el,t.getRootProps(),this.mid),(0,a.iU)(this.input,t.getInputProps(),this.mid),this.up&&(0,a.iU)(this.up,t.getIncrementTriggerProps(),this.mid),this.down&&(0,a.iU)(this.down,t.getDecrementTriggerProps(),this.mid)}buildSteppers(e){let t=t=>{let i=(0,u.h)("button",{slot:es.slot("step"),attrs:{type:"button",tabindex:-1}},(0,l.x_)(t,e));return i.addEventListener("pointerdown",e=>e.stopPropagation()),i};return this.up=t("chevron-up"),this.down=t("chevron-down"),(0,u.h)("div",{className:"vela-num-step",slot:es.slot("steps")},this.up,this.down)}}},2190:(e,t,i)=>{i.d(t,{u:()=>S});var n=i(5089),r=i(3457),o=i(8065),a=i(1542),s=i(3998);let l=(0,o.Tl)({childList:!0,subtree:!0});var d=i(648),u=i(9285),c=i(6291),h=i(4792),p=i(5034);let g="pointerdown.outside",f="focus.outside";function m(e,t){var i,n;if(!t||!("clientY"in e))return!1;let r=t.scrollHeight>t.clientHeight,o=r&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,s=a&&e.clientY>t.offsetTop+t.clientHeight;return i={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+16*!!r,height:t.clientHeight+16*!!a},n={x:e.clientX,y:e.clientY},i.y<=n.y&&n.y<=i.y+i.height&&i.x<=n.x&&n.x<=i.x+i.width&&(o||s)}function b(e,t,i){let n=new(e.ownerDocument.defaultView||window).CustomEvent(t,i);return e.dispatchEvent(n)}var v=i(4965),y=i(7776);let x="layer:request-dismiss",w={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){let t=new Set([e]);return this.layers.slice(this.indexOf(e)+1).filter(e=>!!e.parent&&!!t.has(e.parent)&&(t.add(e.node),!0))},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){return -1===this.indexOf(e)?[]:this.getNestedLayers(e).filter(e=>e.type===t)},getParentLayerOfType(e,t){let i=this.layers[this.indexOf(e)]?.parent;for(;i;){let e=this.layers[this.indexOf(i)];if(e?.type===t)return e;i=e?.parent}},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some(e=>(0,r.gR)(e.node,t))||!!(this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>(0,r.gR)(t,e))},add(e){let t=this.indexOf(e.node);-1!==t?(e.parent=this.layers[t].parent,this.layers[t]=e):(e.parent=this.getParentNode(e),this.layers.push(e)),this.syncLayers()},getParentNode(e){let t=e.origins?.filter(e=>e?.isConnected);return t?.length?[...this.layers].reverse().find(({node:e})=>t.some(t=>(0,r.gR)(e,t)))?.node:this.layers[this.count()-1]?.node},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);if(t<0)return;let i=this.layers[t];i.styleTargets?.forEach(e=>{var t;let i=e();i&&((t=i).style.removeProperty("--layer-index"),t.style.removeProperty("--nested-layer-count"),t.removeAttribute("data-nested"),t.removeAttribute("data-has-nested"))}),this.recentlyRemoved.add(e),(0,a.dY)(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>w.dismiss(t.node,e)),this.layers.forEach(t=>{t.parent===e&&(t.parent=i.parent)}),this.layers.splice(t,1),this.syncLayers()},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{E(e,t,e.node),e.styleTargets?.forEach(i=>{let n=i();if(!n||n===e.node)return;E(e,t,n);let{zIndex:r}=(0,y.L)(e.node);n.style.setProperty("--z-index",r)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){var i,n,r;let o=this.indexOf(e);if(-1===o)return;let a=this.layers[o];i=e,n=x,r=e=>{a.requestDismiss?.(e),e.defaultPrevented||a?.dismiss()},i.addEventListener(n,r,{once:!0}),function(e,t,i){let n=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:i});e.dispatchEvent(n)}(e,x,{originalLayer:e,targetLayer:t,originalIndex:o,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function E(e,t,i){i.style.setProperty("--layer-index",`${t}`),i.removeAttribute("data-nested"),i.removeAttribute("data-has-nested"),w.getParentLayerOfType(e.node,e.type)&&i.setAttribute("data-nested",e.type);let n=w.countNestedLayersOfType(e.node,e.type);n>0&&i.setAttribute("data-has-nested",e.type),i.style.setProperty("--nested-layer-count",`${n}`)}var k=i(333);let T=new WeakMap,O=new WeakMap;function C(e){let t=w.isBelowPointerBlockingLayer(e)?"none":"auto";e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function I(){w.layers.forEach(({node:e})=>{C(e),function(e){if(O.has(e))return;let t=(0,r.zk)(e);if(void 0===t.MutationObserver)return;let i=new t.MutationObserver(()=>{O.has(e)&&C(e)});i.observe(e,{attributes:!0,attributeFilter:["style"]}),O.set(e,i)}(e)})}function S(e,t){let{warnOnMissingNode:i=!0}=t;return function(e,t,i={}){let{defer:n,onMissing:r,getRootNode:o}=i,d=()=>"function"==typeof e?e():e,u=[],c=e=>{if(!e)return r?.();u.push(t(e))};if(n){let e=!1;u.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=d();if(t)return void c(t);let i=!1,n=t=>{e||i||(i=!0,h(),p(),c(t))},r=o?.(),h=r?l.observe(r,()=>{let e=d();e&&n(e)}):s.lQ,p=(0,a.er)(()=>n(d()));u.push(h,p)})}else c(d());return()=>{u.forEach(e=>e?.())}}(e,e=>(function(e,t){var i;let{onDismiss:o,onRequestDismiss:s,pointerBlocking:l,exclude:v,debug:y,type:x="dialog",layerStyleTargets:E}=t,C=()=>{let e="function"==typeof v?v():v;return Array.isArray(e)?e:[e]},S=C().filter(Boolean),P={dismiss:o,origins:S.length?[e,...S]:void 0,node:e,type:x,pointerBlocking:l,requestDismiss:s,styleTargets:E};w.add(P),I();let $=[l?function(e,t){let i=(0,r.YE)(e),n=[];return w.hasPointerBlockingLayer()&&!i.body.hasAttribute("data-inert")&&(T.set(i.body,i.body.style.pointerEvents),queueMicrotask(()=>{let e=i.body;e&&(e.style.pointerEvents="none",e.setAttribute("data-inert",""))})),t?.forEach(e=>{let[t,i]=function(e,t){let i,{timeout:n,rootNode:o}=t,a=(0,r.zk)(o),s=(0,r.YE)(o),l=new a.AbortController,d=function(e,t,i){let{signal:n}=t;return[new Promise((t,r)=>{let o=setTimeout(()=>{r(Error(`Timeout of ${i}ms exceeded`))},i);n.addEventListener("abort",()=>{clearTimeout(o),r(new DOMException("Promise aborted","AbortError"))}),e.then(e=>{n.aborted||(clearTimeout(o),t(e))}).catch(e=>{n.aborted||(clearTimeout(o),r(e))})}),()=>t.abort()]}(new Promise(t=>{let n=e();if(n)return void t(n);(i=new a.MutationObserver(()=>{let n=e();n&&n.isConnected&&(i?.disconnect(),t(n))})).observe(s.body,{childList:!0,subtree:!0})}),l,n),u=()=>i?.disconnect();return d[0].then(u,u),d}(()=>{let t=e();return(0,r.sb)(t)?t:null},{timeout:1e3});t.then(e=>n.push((0,k.eC)(e,{pointerEvents:"auto"}))),n.push(i)}),()=>{w.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=i.body;if(!e)return;let t=T.get(e);void 0!==t&&(e.style.pointerEvents=t,T.delete(e)),e.removeAttribute("data-inert"),0===e.style.length&&e.removeAttribute("style")}),n.forEach(e=>e()))}}(e,t.persistentElements):void 0,(i=function(i){w.isTopMost(e)&&(t.onEscapeKeyDown?.(i),!i.defaultPrevented&&o&&(i.preventDefault(),o(i)))},(0,n.kn)((0,r.YE)(e),"keydown",e=>{"Escape"===e.key&&(e.isComposing||i?.(e))},{capture:!0})),function(e,t){let{defer:i}=t,o=i?a.er:e=>e(),s=[];return s.push(o(()=>{let i="function"==typeof e?e():e;s.push(function(e,t){let{exclude:i,onFocusOutside:o,onPointerDownOutside:s,onInteractOutside:l,defer:v,followControlledElements:y=!0}=t;if(!e)return;let x=(0,r.YE)(e),w=(0,r.zk)(e),E=function(e){let t={each(t){for(let i=0;i<e.frames?.length;i+=1){let n=e.frames[i];n&&t(n)}},addEventListener:(e,i,n)=>(t.each(t=>{try{t.document.addEventListener(e,i,n)}catch{}}),()=>{try{t.removeEventListener(e,i,n)}catch{}}),removeEventListener(e,i,n){t.each(t=>{try{t.document.removeEventListener(e,i,n)}catch{}})}};return t}(w),k=function(e){let t=null!=e.frameElement?e.parent.document:null;return{addEventListener:(e,i,n)=>{try{t?.addEventListener(e,i,n)}catch{}return()=>{try{t?.removeEventListener(e,i,n)}catch{}}},removeEventListener:(e,i,n)=>{try{t?.removeEventListener(e,i,n)}catch{}}}}(w);function T(t,n){if(!(0,r.sb)(n)||!n.isConnected||(0,r.gR)(e,n)||function(e,t){if(!("clientY"in t)||!e)return!1;let i=e.getBoundingClientRect();return 0!==i.width&&0!==i.height&&i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width}(e,t)||y&&(0,u.$5)(e,n))return!1;let o=x.querySelector(`[aria-controls="${e.id}"]`);return!(o&&m(t,(0,c.ob)(o))||m(t,(0,c.ob)(e)))&&!i?.(n)}let O=new Set,C=(0,r.Ng)(e?.getRootNode()),I=!1;function S(t){I=!0;let i=()=>{I=!1};function o(i){let o=v&&!(0,h.CN)()?a.er:e=>e(),u=i??t,c=u?.composedPath?.()??[u?.target];o(()=>{let i=C?c[0]:(0,n.wt)(t);if(e&&T(t,i)){if(s||l){let t=(0,p.OK)(s,l);e.addEventListener(g,t,{once:!0})}b(e,g,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,contextmenu:(0,n.fv)(u),focusable:function(e){for(let t of e)if((0,r.sb)(t)&&(0,d.tp)(t))return!0;return!1}(c),target:i}})}})}x.addEventListener("pointerup",i,{once:!0}),w.addEventListener("pointerup",i,{once:!0}),"touch"===t.pointerType?(O.forEach(e=>e()),O.add((0,n.kn)(x,"click",o,{once:!0})),O.add(k.addEventListener("click",o,{once:!0})),O.add(E.addEventListener("click",o,{once:!0}))):o()}let P=new Set,$=setTimeout(()=>{P.add((0,n.kn)(x,"pointerdown",S,!0)),P.add(k.addEventListener("pointerdown",S,!0)),P.add(E.addEventListener("pointerdown",S,!0))},0),N=a.KP.create();function A(t){I||(v?e=>N.request(e):e=>e())(()=>{let i=t?.composedPath?.()??[t?.target],r=C?i[0]:(0,n.wt)(t);if(e&&T(t,r)){if(o||l){let t=(0,p.OK)(o,l);e.addEventListener(f,t,{once:!0})}b(e,f,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:(0,d.tp)(r),target:r}})}})}return(0,h.CN)()||(P.add((0,n.kn)(x,"focusin",A,!0)),P.add(k.addEventListener("focusin",A,!0)),P.add(E.addEventListener("focusin",A,!0))),()=>{clearTimeout($),N.cancel(),O.forEach(e=>e()),P.forEach(e=>e())}}(i,t))})),()=>{s.forEach(e=>e?.())}}(e,{exclude:function(i){let n=C(),o=t.persistentElements?.map(e=>e()).filter(r.sb);return o&&n.push(...o),n.some(e=>(0,r.gR)(e,i))||w.isInNestedLayer(e,i)},onFocusOutside:function(e){let i=(0,n.wt)(e.detail.originalEvent);!w.isInBranch(i)&&(t.onFocusOutside?.(e),t.onInteractOutside?.(e),e.defaultPrevented||(y&&console.log("onFocusOutside:",e.detail.originalEvent),o?.(e)))},onPointerDownOutside:function(i){let r=(0,n.wt)(i.detail.originalEvent);!(w.isBelowPointerBlockingLayer(e)||w.isInBranch(r))&&(t.onPointerDownOutside?.(i),t.onInteractOutside?.(i),i.defaultPrevented||(y&&console.log("onPointerDownOutside:",i.detail.originalEvent),o?.(i)))},defer:t.defer})];return()=>{w.remove(e),I();let t=O.get(e);t&&(t.disconnect(),O.delete(e)),e.style.pointerEvents="",$.forEach(e=>e?.())}})(e,t),{defer:t.defer,getRootNode:t.getRootNode,onMissing:i?()=>(0,v.R8)("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}},2271:(e,t,i)=>{i.d(t,{Rq:()=>w,yF:()=>F,lb:()=>S,ix:()=>E,h0:()=>V,uJ:()=>P,Qs:()=>$});var n=i(4209),r=i(1953),o=i(8621),a=i(9138),s=i(730),l=i(7042),d=i(6806),u=i(4561),c=i(542),h=(0,u.I)({name:"input",parts:["root","control"],settings:{radius:d.t.radius.md,"focus-ring":`0 0 0 3px ${d.t.focus.soft}`}}),p=(0,s.H)({size:["md","sm"]}),g=(0,c.AH)`@layer vela.ui{[data-slot=input-control]{box-sizing:border-box;border:1px solid ${d.t.border.strong};border-radius:${h.vars.radius};width:100%;min-width:0;height:34px;color:${d.t.fg.bright};text-overflow:ellipsis;transition:border-color ${d.t.dur.fast} ease, box-shadow ${d.t.dur.fast} ease;-webkit-user-select:text;user-select:text;background:0 0;outline:2px solid #0000;padding:0 8px;font-family:inherit;font-size:14px;overflow:hidden}[data-slot=input-control]:hover{border-color:${d.t.fg.muted}}[data-slot=input-control]:focus{border-color:${d.t.focus};box-shadow:${h.vars["focus-ring"]}}[data-slot=input-control]::placeholder{color:currentColor;opacity:.4}[data-slot=input]{min-width:0}[data-slot=input]:where(:not([hidden])){display:inline-block}[data-slot=input][data-fill]{width:100%}[data-slot=input]:not([data-fill]){flex:none;justify-self:start;width:100px}[data-slot=input][data-size=sm] [data-slot=input-control]{background:${d.t.surface.elev};border-radius:${d.t.radius.sm};height:28px;color:${d.t.fg};font-size:13px}}`,f=(0,c.Il)("vela-ui-text-2",g),m=class{constructor(e={}){f(document),this.ctrl=function(e={}){let t=e.value??e.defaultValue??"",i=e.size??"md";return{get value(){return t},size:i,fill:e.fill??"sm"!==i,disabled:e.disabled??!1,commit:i=>i===t?null:(t=i,e.onChange?.(i),i),sync(e){t=e}}}(e);let t=(0,l.h)("input",{className:"vela-text-field",slot:h.slot("control"),attrs:{type:e.type??"text",size:1,id:e.id,placeholder:e.placeholder,name:e.name}});t.required=!0===e.required,t.value=this.ctrl.value,t.disabled=this.ctrl.disabled,t.addEventListener("blur",()=>{this.ctrl.commit(t.value)}),t.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),t.blur())}),this.el=(0,l.h)("div",{className:"vela-text",slot:h.slot("root"),attrs:p({size:this.ctrl.size}),data:{fill:this.ctrl.fill}},t),this.input=t}get value(){return this.ctrl.value}setValue(e){this.ctrl.sync(e),this.input.value=e}destroy(){}},b=i(9900),v=i(1381),y=i(5788),x=i(1849),w=16;function E(e,t){return"inputs"===e?t?"minmax(0,1fr) auto":"max-content 1fr":t?"minmax(0,1fr) max-content":"max-content max-content"}var k=(0,u.I)({name:"field",parts:["grid","row","span","label","cell","bool","stacked","stacked-head","inline","inline-item","toggle-label","section","sep"]}),T=`${w}px`,O=(0,c.Il)("vela-ui-field",(0,c.AH)`@layer vela.ui{[data-slot~=field-grid]{align-content:start;align-items:center;column-gap:${T};row-gap:${T}}[data-slot~=field-grid]:where(:not([hidden])){display:grid}[data-slot~=field-grid][data-variant=inputs]{grid-template-columns:max-content 1fr}[data-slot~=field-grid][data-variant=inputs][data-mobile]{grid-template-columns:minmax(0,1fr) auto}[data-slot~=field-grid][data-variant=settings]{grid-template-columns:max-content max-content;column-gap:12px}[data-slot~=field-grid][data-variant=settings][data-mobile]{grid-template-columns:minmax(0,1fr) max-content}[data-slot~=field-row]:where(:not([hidden])){display:contents}[data-slot~=field-span]{grid-column:1/-1}[data-slot~=field-label]{opacity:.9;white-space:nowrap;text-overflow:ellipsis;font-size:14px;overflow:hidden}[data-slot~=field-label][data-size=sm]{font-size:inherit;opacity:.85}[data-slot~=field-cell]{justify-self:start;align-items:center;gap:8px;display:flex}[data-slot~=field-bool]:where(:not([hidden])){align-items:center;gap:8px;min-height:22px;display:flex}[data-slot~=field-stacked]:where(:not([hidden])){flex-direction:column;gap:8px;display:flex}[data-slot~=field-stacked-head]{justify-content:center;align-items:center;gap:8px;display:flex}[data-slot~=field-inline]:where(:not([hidden])){flex-wrap:wrap;align-items:center;gap:12px;display:flex}[data-slot~=field-inline-item],[data-slot~=field-toggle-label]{align-items:center;gap:8px;display:flex}[data-slot~=field-section]{font-size:${d.t.fontSize.sm};letter-spacing:.05em;text-transform:uppercase;color:${d.t.fg.muted};grid-column:1/-1;margin:24px 0 0;padding-bottom:8px;font-weight:700}[data-slot~=field-section][data-variant=inputs]{margin:0;padding:20px 0 8px;font-size:11px;font-weight:600}[data-slot~=field-section][data-variant=inputs][data-first]{padding-top:4px}[data-slot~=field-section][data-info]:where(:not([hidden])){align-items:center;gap:6px;display:flex}[data-slot~=field-sep]{grid-column:1/-1;height:14px}}`);function C(e){O(e),(0,x.QG)("vela-ui-field-dim",".vela-field-dim { opacity: 0.4 !important; pointer-events: none !important; }",e)}function I(e,...t){e.className=t.map(e=>`vela-field-${e}`).join(" "),e.setAttribute("data-slot",t.map(e=>k.slot(e)).join(" "))}function S(e={}){C(document);let t=document.createElement("div");I(t,"grid");let i=e.variant??"inputs";return t.dataset.variant=i,e.mobile&&(t.dataset.mobile=""),t.style.gridTemplateColumns=E(i,!0===e.mobile),t}function P(e,t={}){C(document);let i=document.createElement("div");return I(i,"section"),t.variant&&(i.dataset.variant=t.variant),t.first&&(i.dataset.first=""),i.textContent=e,t.info&&(i.dataset.info="",i.appendChild(t.info)),i}function $(){C(document);let e=document.createElement("div");return I(e,"sep"),e}function N(e,t){let i=document.createElement("span");I(i,"label"),t.size&&(i.dataset.size=t.size),i.textContent=e;let n=t.id;return n&&(i.id=`${n}--title`,queueMicrotask(()=>{i.ownerDocument.getElementById(n)?.setAttribute("aria-labelledby",i.id)})),i}function A(e){return e?Array.isArray(e)?e:[e]:[]}function R(e,t){if(t)for(let i of t.split(/\s+/))i&&e.classList.add(i)}function L(e,t){for(let i of e)"1"!==i.dataset.sdSelfGated&&i.classList.toggle("vela-field-dim",!t)}function V(e){C(document);let t=e.labelSize;if(e.inline){let i=document.createElement("div");for(let n of(I(i,"span","inline"),e.inline)){let e=document.createElement("div");if(I(e,"inline-item"),n.toggleFirst&&(e.style.flexDirection="row-reverse"),n.label&&e.appendChild(N(n.label,{id:n.id,size:t})),n.fit)e.appendChild(n.control);else{let t=document.createElement("div");t.style.width="100px",t.appendChild(n.control),e.appendChild(t)}i.appendChild(e)}return e.info&&i.appendChild(e.info),R(i,e.className),i}if(e.bool){let i=document.createElement("div");I(i,"span","bool");let n=new v.Sc({id:e.toggle?.id??e.id,checked:e.toggle?.checked??!1,size:"md",tone:"bright",onCheckedChange:t=>e.toggle?.onChange(t)});if(i.append(n.el,N(e.label,{id:e.toggle?.id??e.id,size:t})),e.info&&i.appendChild(e.info),e.toggle?.get){let t=e.toggle.get;i.addEventListener("vela-sync",()=>{n.setChecked(t())})}return R(i,e.className),i}if(e.stacked){let i=document.createElement("div");I(i,"span","stacked");let n=document.createElement("div");for(let r of(I(n,"stacked-head"),n.appendChild(N(e.label,{id:e.id,size:t})),e.info&&n.appendChild(e.info),i.appendChild(n),A(e.control)))i.appendChild(r);return R(i,e.className),i}let i=document.createElement("div");I(i,"row");let n=A(e.control);if(e.toggle){let r=document.createElement("div");I(r,"toggle-label");let o=new v.Sc({id:e.toggle.id??e.id,checked:e.toggle.checked,size:"md",tone:"bright",onCheckedChange:t=>{e.toggle.onChange(t),n.length>0&&L(n,t)}});if(r.append(o.el,N(e.label,{id:e.toggle.id??e.id,size:t})),i.appendChild(r),n.length>0&&L(n,e.toggle.checked),e.toggle.get){let t=e.toggle.get;i.addEventListener("vela-sync",()=>{let e=t();o.setChecked(e),n.length>0&&L(n,e)})}}else i.appendChild(N(e.label,{id:e.id,size:t}));let r=document.createElement("div");if(I(r,"cell"),null==e.controlWidth||1!==n.length||e.fit)for(let e of n)r.appendChild(e);else{let t=document.createElement("div");t.style.width=`${e.controlWidth}px`,t.appendChild(n[0]),r.appendChild(t)}return e.info&&r.appendChild(e.info),i.appendChild(r),R(i,e.className),i}function F(e){if("number"===e.kind){let t=new r.Q7({id:e.id,value:e.value,min:e.min,max:e.max,step:e.step,integer:e.integer,size:"md",fill:e.fill,compact:e.compact,commit:e.commit,steppers:e.steppers,clamp:e.clamp,placeholder:e.placeholder,emptyValue:e.emptyValue,title:e.title,onChange:e.onChange});if(e.sync){let i=e.sync;t.el.addEventListener("vela-sync",()=>{t.setValue(i())})}return{el:t.el,setValue:e=>t.setValue(Number(e)),destroy:()=>t.destroy()}}if("select"===e.kind){let t=new o.l6({id:e.id,options:e.options,value:e.value,size:"md",fill:e.fill,theme:e.theme,list:e.list,onValueChange:e.onChange});if(e.title&&(t.el.title=e.title),e.sync){let i=e.sync;t.el.addEventListener("vela-sync",()=>{t.setValue(i())})}return{el:t.el,setValue:e=>t.setValue(String(e)),destroy:()=>t.destroy()}}if("switch"===e.kind){let t=new v.Sc({id:e.id,checked:e.checked,size:"md",tone:"bright",onCheckedChange:e.onChange});if(e.sync){let i=e.sync;t.el.addEventListener("vela-sync",()=>{t.setChecked(i())})}return{el:t.el,setValue:e=>t.setChecked(!!e),destroy:()=>t.destroy()}}if("color"===e.kind){let t=new b.SG({theme:e.theme,getVal:e.get,onVal:e.onChange,shape:"circle",id:e.id,popover:e.popover,commit:e.commit});return e.title&&(t.el.title=e.title),{el:t.el,destroy:()=>t.destroy()}}if("text"===e.kind){let t=new m({id:e.id,value:e.value,size:"md",fill:e.fill,onChange:e.onChange});if(e.placeholder&&(t.input.placeholder=e.placeholder),e.sync){let i=e.sync;t.el.addEventListener("vela-sync",()=>{t.setValue(i())})}return{el:t.el,setValue:e=>t.setValue(String(e)),destroy:()=>t.destroy()}}if("textarea"===e.kind){let t=new n.fs({id:e.id,value:e.value,rows:e.rows,autoGrow:e.autoGrow,maxLines:e.maxLines,placeholder:e.placeholder,onChange:e.onChange});if(e.sync){let i=e.sync;t.el.addEventListener("vela-sync",()=>{t.setValue(i())})}return{el:t.el,setValue:e=>t.setValue(String(e)),destroy:()=>t.destroy()}}let t=(0,a.vv)(e.theme,e.get,e.onChange);return e.title&&(t.title=e.title),{el:t,destroy:()=>(0,y.X)(t)}}},2498:(e,t,i)=>{i.d(t,{BU:()=>E,F4:()=>y,Gy:()=>w,H_:()=>p,JT:()=>k,L3:()=>m,LV:()=>h,N8:()=>b,VJ:()=>A,Yi:()=>I,cl:()=>R,jv:()=>O,kn:()=>C,pY:()=>g,s:()=>f,tp:()=>N,vV:()=>v,xX:()=>S});let{floor:n,abs:r,round:o,min:a,max:s,pow:l,sign:d}=Math,u=e=>Number.isNaN(e),c=e=>u(e)?0:e,h=(e,t)=>(e%t+t)%t,p=(e,t)=>c(e)>=t,g=(e,t)=>c(e)<=t,f=(e,t,i)=>{let n=c(e);return(null==t||n>=t)&&(null==i||n<=i)},m=(e,t,i)=>a(s(c(e),t),i),b=e=>m(e,0,1),v=(e,t,i)=>(c(e)-t)/(i-t),y=(e,t,i,n)=>m(((e,t,i)=>o((c(e)-t)/i)*i+t)(e*(i-t)+t,t,n),t,i),x=(e,t)=>{let i=e,n=t.toString(),r=n.indexOf("."),a=r>=0?n.length-r:0;if(a>0){let e=l(10,a);i=o(i*e)/e}return i},w=(e,t)=>"number"==typeof t?n(e*t+.5)/t:o(e),E=(e,t,i,a)=>{let s=null!=t?Number(t):0,c=Number(i),h=(e-s)%a,p=2*r(h)>=a?e+d(h)*(a-r(h)):e-h;if(p=x(p,a),!u(s)&&p<s)p=s;else if(!u(c)&&p>c){let e=l(10,Math.max(P(s),P(c),P(a))),t=n((o(c*e)-o(s*e))/o(a*e)),i=s+t*a;p=t<=0||i<s?c:i}return x(p,a)},k=(e,t,i)=>e[t]===i?e:[...e.slice(0,t),i,...e.slice(t+1)];function T(e,t){let i,n,r,o,a=(i=t.values,n=t.min,0===e?n:i[e-1]),s=(r=t.values,o=t.max,e===r.length-1?o:r[e+1]),l=t.values.slice();return function(i){let n=E(i,a,s,t.step);return(l=k(l,e,i))[e]=n,l}}function O(e,t){let i=t.values[e]+t.step;return T(e,t)(i)}function C(e,t){let i=t.values[e]-t.step;return T(e,t)(i)}let I=(e,t,i,n)=>e.map((r,o)=>({min:0===o?t:e[o-1]+n,max:o===e.length-1?i:e[o+1]-n,value:r})),S=(e,t)=>{let[i,n]=e,[r,o]=t;return e=>i===n||r===o?r:r+(o-r)/(n-i)*(e-i)},P=e=>{if(!Number.isFinite(e))return 0;let t=1,i=0;for(;Math.round(e*t)/t!==e;)t*=10,i+=1;return i},$=(e,t,i)=>{let n="+"===t?e+i:e-i;if(e%1!=0||i%1!=0){let r=10**Math.max(P(e),P(i));e=Math.round(e*r),i=Math.round(i*r),n=("+"===t?e+i:e-i)/r}return n},N=(e,t)=>$(c(e),"+",t),A=(e,t)=>$(c(e),"-",t),R=e=>"number"==typeof e?`${e}px`:e},2577:(e,t,i)=>{function n(e,t){return Array.from(e?.querySelectorAll(t)??[])}i.d(t,{I5:()=>l,Ut:()=>s,YG:()=>n,aX:()=>o,hJ:()=>a,p_:()=>r});let r=e=>e.id;function o(e,t,i=r){return e.find(e=>i(e)===t)}function a(e,t,i=r){let n=o(e,t,i);return n?e.indexOf(n):-1}function s(e,t,i=!0){let n=a(e,t);return n=i?(n+1)%e.length:Math.min(n+1,e.length-1),e[n]}function l(e,t,i=!0){let n=a(e,t);return -1===n?i?e[e.length-1]:null:(n=i?(n-1+e.length)%e.length:Math.max(0,n-1),e[n])}},2828:(e,t,i)=>{i.d(t,{QL:()=>o,Up:()=>r,oE:()=>function e(t){if(!(0,n.Qd)(t)||void 0===t)return t;let i=Reflect.ownKeys(t).filter(e=>"string"==typeof e),r={};for(let n of i){let i=t[n];void 0!==i&&(r[n]=e(i))}return r}});var n=i(3542);function r(e,t){let i={};for(let n of t){let t=e[n];void 0!==t&&(i[n]=t)}return i}function o(e,t){if(!t)return e;let i={...e};for(let e in t){let n=t[e];void 0!==n&&(i[e]=n)}return i}},3457:(e,t,i)=>{i.d(t,{$4:()=>w,B6:()=>c,IR:()=>h,J9:()=>p,Ng:()=>u,X7:()=>g,YE:()=>v,bq:()=>y,fg:()=>m,gR:()=>b,gU:()=>x,sb:()=>o,tZ:()=>l,vq:()=>r,wz:()=>a,zk:()=>function e(t){return u(t)?e(t.host):a(t)?t.defaultView??window:o(t)?t.ownerDocument?.defaultView??window:window},zm:()=>E});var n=i(3998);let r=e=>(0,n.Gv)(e)&&1===e.nodeType&&"string"==typeof e.nodeName,o=e=>(0,n.Gv)(e)&&1===e.nodeType&&"string"==typeof e.nodeName,a=e=>(0,n.Gv)(e)&&9===e.nodeType,s=e=>o(e)?e.localName||"":"#document";function l(e){return["html","body","#document"].includes(s(e))}let d=e=>(0,n.Gv)(e)&&void 0!==e.nodeType,u=e=>d(e)&&11===e.nodeType&&"host"in e,c=e=>o(e)&&"input"===e.localName,h=e=>!!e?.matches("a[href]"),p=e=>!!o(e)&&(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0);function g(e){return!!e&&y(e.getRootNode())===e}let f=/(textarea|select)/;function m(e){if(null==e||!o(e))return!1;try{return c(e)&&null!=e.selectionStart||f.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}function b(e,t){if(!e||!t||!o(e)||!d(t))return!1;if(o(t)&&e===t||e.contains(t))return!0;let i=t.getRootNode?.();if(i&&u(i)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}let n=t.ownerDocument?.defaultView?.frameElement;return!!n&&t.ownerDocument!==e.ownerDocument&&b(e,n)}function v(e){return a(e)?e:(0,n.Gv)(e)&&e===e.window?e.document:e?.ownerDocument??document}function y(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e&&e!==t)t=e;else break}return t}function x(e,t){return!!e&&e!==v(e).body&&!t.some(t=>b(t,e))}function w(e){if("html"===s(e))return e;let t=e.assignedSlot||e.parentNode||u(e)&&e.host||v(e).documentElement;return u(t)?t.host:t}function E(e){let t;try{if(t=e.getRootNode({composed:!0}),a(t)||u(t))return t}catch{}return e.ownerDocument??document}},3542:(e,t,i)=>{i.d(t,{Gv:()=>r,Kg:()=>o,Qd:()=>c,Tn:()=>a,cK:()=>l,kZ:()=>s});let n=e=>null!=e&&"object"==typeof e,r=e=>n(e)&&!Array.isArray(e),o=e=>"string"==typeof e,a=e=>"function"==typeof e,s=e=>null==e,l=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d=Function.prototype.toString,u=d.call(Object),c=e=>{if(!n(e)||"[object Object]"!=Object.prototype.toString.call(e)||h(e))return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let i=l(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&d.call(i)==u},h=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e)},3754:(e,t,i)=>{i.d(t,{_B:()=>o});let n={onFocus:"onFocusin",onBlur:"onFocusout",onChange:"onInput",onDoubleClick:"onDblclick",htmlFor:"for",className:"class",defaultValue:"value",defaultChecked:"checked"},r=new Set(["viewBox","preserveAspectRatio"]),o=function(e){return new Proxy({},{get:(t,i)=>"style"===i?t=>e({style:t}).style:e})}(e=>Object.entries(e).reduce((e,[t,i])=>(void 0===i||(t in n&&(t=n[t]),e[r.has(t)?t:t.toLowerCase()]=i),e),{}))},3825:(e,t,i)=>{i.d(t,{$b:()=>v,AM:()=>T,KJ:()=>y,fH:()=>E,s0:()=>x});var n=i(187),r=i(6262),o=i(7062),a=i(3875),s=i(5788),l=i(7042),d=i(6806),u=i(4561),c=i(542),h=i(2489),p=(0,u.I)({name:"popover",parts:["content"]}),g=(0,c.AH)`@layer vela.ui{[data-slot~=popover-content]{z-index:${d.t.z.popover};box-sizing:border-box;overflow-anchor:none;position:fixed}[data-slot~=popover-content][data-position=absolute]{position:absolute}}`,f=(0,c.Il)("vela-ui-popover",g),m=(0,h.B)("open-popover@1",()=>({popover:null})),b=new Set;function v(){m.popover?.hide()}function y(){return null!==m.popover}function x(){return m.popover?.trigger??null}var w="__velaPopoverDismiss";function E(e){return!0===e[w]}function k(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}var T=class{constructor(e){this.onOutside=null,this.onKey=null,this.onReflow=null,this.shown=!1,this.leaveTimer=null,this.exit=null;let t=e.trigger.ownerDocument;f(t),this.trigger=e.trigger,this.host=e.host??(0,o.oU)(e.trigger,t.body),this.inheritsTokens=!e.host&&this.host!==t.body,this.ctrl=function(e={}){return{side:e.side??"bottom",gap:e.sideOffset??e.gap??4,align:e.align??"start",alignOffset:e.alignOffset??0,avoidCollisions:e.avoidCollisions??!0,matchWidth:e.matchWidth??!1,position:e.position??"fixed",boundaryInset:e.collisionPadding??e.boundaryInset??0,viewportInset:e.collisionPadding??e.viewportInset??6,onClose:e.onClose}}(e),this.boundary=e.collisionBoundary??e.boundary??"viewport",this.theme=e.theme,this.fadeMs=Math.max(0,e.fadeMs??0),this.el=(0,l.h)("div",{className:"vela-popover vela-ui-layer"+(e.className?` ${e.className}`:""),slot:e.slot?`${p.slot("content")} ${e.slot}`:p.slot("content"),data:{position:this.ctrl.position}}),void 0!==e.zIndex&&(this.el.style.zIndex=String(e.zIndex)),this.el.addEventListener("pointerdown",e=>e.stopPropagation()),e.content instanceof Node?this.el.appendChild(e.content):"function"==typeof e.content&&e.content(this.el)}get open(){return this.shown}get position(){return this.ctrl.position}get align(){return this.ctrl.align}show(){if(this.shown)return void this.place();let e=m.popover;for(let t of(e&&e!==this&&e.hide(),null!==this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.exit?.cancel(),this.exit=null,b.delete(this),[...b]))t.trigger===this.trigger&&t.exit?.finish();(0,o.FX)(this.el,this.inheritsTokens?void 0:this.theme),this.fadeMs>0&&(this.el.style.transition=`opacity ${this.fadeMs}ms ease`,this.el.style.opacity="0",this.el.style.pointerEvents=""),this.host.appendChild(this.el),this.shown=!0,m.popover=this,this.place(),this.fadeMs>0&&(this.el.style.opacity="1");let t=e=>{let t=e.target;this.el.contains(t)||this.trigger.contains(t)||(e[w]=!0,this.hide())},i=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.hide())},r=()=>this.place();setTimeout(()=>{this.onOutside===t&&document.addEventListener("pointerdown",t,!0)},0),document.addEventListener("keydown",i,!0),window.addEventListener("resize",r,!0),document.addEventListener("scroll",r,!0),this.onOutside=t,this.onKey=i,this.onReflow=r,(0,n.$5)(this.el,!0,"popover",this.trigger)}hide(){this.shown&&(this.shown=!1,(0,n.$5)(this.el,!1,"popover",this.trigger),this.onOutside&&document.removeEventListener("pointerdown",this.onOutside,!0),this.onKey&&document.removeEventListener("keydown",this.onKey,!0),this.onReflow&&(window.removeEventListener("resize",this.onReflow,!0),document.removeEventListener("scroll",this.onReflow,!0)),this.onOutside=null,this.onKey=null,this.onReflow=null,this.fadeMs>0?(this.el.style.opacity="0",this.el.style.pointerEvents="none",this.leaveTimer=setTimeout(()=>{this.leaveTimer=null,this.el.remove()},this.fadeMs)):(this.exit=(0,r.O)(this.el,()=>{this.exit=null,b.delete(this),this.el.remove()}),this.exit&&b.add(this)),m.popover===this&&(m.popover=null),this.ctrl.onClose?.())}toggle(){this.shown?this.hide():this.show()}destroy(){this.hide(),this.exit?.finish(),(0,s.X)(this.el)}reposition(){this.shown&&this.place()}clampRect(){let e=(0,a.xm)(window.innerWidth,window.innerHeight,this.ctrl.viewportInset),t=this.readBoundary();if(!t)return e;let i=(0,a.CO)(t,this.ctrl.boundaryInset);return(0,a.B_)(e,i)}readBoundary(){let e=this.boundary;if("viewport"===e)return null;let t="function"==typeof e?e():e.getBoundingClientRect();return t?k(t):null}place(){let e=this.trigger.getBoundingClientRect();this.ctrl.matchWidth&&(this.el.style.minWidth=`${Math.round(Math.max(this.el.offsetWidth,e.width))}px`);let t="absolute"===this.ctrl.position?this.host.getBoundingClientRect():{left:0,top:0},i=(0,a.Lf)({trigger:k(e),pop:{width:this.el.offsetWidth,height:this.el.offsetHeight},gap:this.ctrl.gap,align:this.ctrl.align,side:this.ctrl.side,alignOffset:this.ctrl.alignOffset,avoidCollisions:this.ctrl.avoidCollisions,clamp:this.clampRect(),originX:t.left,originY:t.top});this.el.style.left=`${i.left}px`,this.el.style.top=`${i.top}px`,this.el.dataset.side=i.side,this.el.dataset.align=this.ctrl.align}}},3875:(e,t,i)=>{function n(e,t){return{left:e.left+t,top:e.top+t,right:e.right-t,bottom:e.bottom-t,width:e.width-2*t,height:e.height-2*t}}function r(e,t,i){return{left:i,top:i,right:e-i,bottom:t-i,width:e-2*i,height:t-2*i}}function o(e,t){let i=Math.max(e.left,t.left),n=Math.max(e.top,t.top),r=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return{left:i,top:n,right:r,bottom:o,width:r-i,height:o-n}}function a(e){let t=e.side??"bottom",i=e.avoidCollisions??!0,n=e.alignOffset??0,r="top"===t||"bottom"===t,o=r?{start:e.trigger.top,end:e.trigger.bottom,crossStart:e.trigger.left,crossEnd:e.trigger.right,crossSize:e.trigger.width}:{start:e.trigger.left,end:e.trigger.right,crossStart:e.trigger.top,crossEnd:e.trigger.bottom,crossSize:e.trigger.height},a=r?e.pop.height:e.pop.width,s=r?e.pop.width:e.pop.height,l=r?{start:e.clamp.top,end:e.clamp.bottom,crossStart:e.clamp.left,crossEnd:e.clamp.right}:{start:e.clamp.left,end:e.clamp.right,crossStart:e.clamp.top,crossEnd:e.clamp.bottom},d="end"===e.align?o.crossEnd-s-n:"center"===e.align?o.crossStart+o.crossSize/2-s/2+n:o.crossStart+n,u=o.end+e.gap,c=o.start-a-e.gap,h="bottom"===t||"right"===t;if(i){let e=u+a<=l.end,t=c>=l.start,i=o.start-l.start,n=l.end-o.end;h&&!e&&(t||i>n)?h=!1:!h&&!t&&(e||n>i)&&(h=!0)}let p=h?u:c;i&&(d+s>l.crossEnd&&(d=l.crossEnd-s),d<l.crossStart&&(d=l.crossStart),p+a>l.end&&(p=l.end-a),p<l.start&&(p=l.start));let g=r?d:p,f=r?p:d;return{left:Math.round(g-e.originX),top:Math.round(f-e.originY),side:r?h?"bottom":"top":h?"right":"left"}}function s(e){let[t,i]=e.split("-");return{side:t,align:i??"center"}}function l(e,t){let i=e.side??t.side,n=e.align??t.align,r="center"===n?i:`${i}-${n}`,o=e.collisionBoundary;return{placement:r,...void 0!==e.sideOffset?{gutter:e.sideOffset}:{},...void 0!==e.alignOffset?{shift:"end"===n?-e.alignOffset:e.alignOffset}:{},...!1===e.avoidCollisions?{flip:!1,slide:!1}:{},...void 0!==e.collisionPadding?{overflowPadding:e.collisionPadding}:{},...o&&"object"==typeof o?{boundary:()=>o}:{}}}i.d(t,{B_:()=>o,CO:()=>n,Lf:()=>a,_h:()=>s,i1:()=>l,xm:()=>r})},3926:(e,t,i)=>{function n(e){return null==e?[]:Array.isArray(e)?e:[e]}i.d(t,{$1:()=>r,$r:()=>n,HV:()=>o,K2:()=>s,YL:()=>d,Yp:()=>a,aU:()=>l,iv:()=>u});let r=e=>e[0],o=e=>e[e.length-1];function a(e,t,i={}){let{step:n=1,loop:r=!0}=i,o=t+n,s=e.length,l=s-1;return -1===t?n>0?0:l:o<0?r?l:0:o>=s?r?0:t>s?s:t:o}function s(e,t,i={}){return e[a(e,t,i)]}function l(e,t,i={}){let{step:n=1,loop:r=!0}=i;return a(e,t,{step:-n,loop:r})}function d(e,t,i={}){return e[l(e,t,i)]}function u(e,t){return e.reduce((e,i,n)=>(n%t==0?e.push([i]):o(e)?.push(i),e),[])}},3998:(e,t,i)=>{i.d(t,{Fs:()=>r,Gv:()=>a,LV:()=>n,hx:()=>s,iG:()=>h,lQ:()=>o,rq:()=>d,sE:()=>l});let n=(e,t)=>e.map((i,n)=>e[(Math.max(t,0)+n)%e.length]),r=(...e)=>t=>e.reduce((e,t)=>t(e),t),o=()=>void 0,a=e=>"object"==typeof e&&null!==e,s=0x7fffffff,l=e=>e?"":void 0,d=e=>e?"true":void 0,u=/\\/g,c=/"/g,h=e=>`[data-ownedby~="${(e=>globalThis.CSS?.escape?.(e)??e.replace(u,"\\\\").replace(c,'\\"'))(String(e))}"]`},4030:(e,t,i)=>{i.d(t,{HK:()=>m,Jc:()=>f,KC:()=>d,L5:()=>g,lk:()=>p,ti:()=>b});var n=i(4965);let r=new WeakMap,o=new WeakMap;function a(e){return e.join(".")}function s(e){return e.startsWith("#")}function l(e,t){return e?`${e}.${t}`:t}function d(e){let t=r.get(e);if(t)return t;let{index:i,idIndex:a}=function(e){let t=new Map,i=new Map,r=(e,o)=>{t.set(e,o);let a=o.id;a&&(i.has(a)&&(0,n.V1)(`[zag-js] Duplicate state id: "${a}"`),i.set(a,e));let s=o.states;if(s)for(let[t,i]of((0,n.D8)(o.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),o.initial in s||(0,n.V1)(`[zag-js] Compound state "${e}" has initial "${String(o.initial)}" which is not a child state`),Object.entries(s)))i&&r(l(e,t),i)};for(let[t,i]of Object.entries(e.states))i&&r(t,i);return{index:t,idIndex:i}}(e);return r.set(e,i),o.set(e,a),i}function u(e){return e?String(e).split(".").filter(Boolean):[]}function c(e,t){if(!t)return[];let i=d(e),n=u(t),r=[],o=[];for(let e of n){o.push(e);let t=a(o),n=i.get(t);if(!n)break;r.push({path:t,state:n})}return r}function h(e,t){let i=d(e),n=u(t);if(!n.length)return t;let r=[];for(let e of n){r.push(e);let n=a(r);if(!i.has(n))return t}let o=a(r),s=i.get(o);for(;s?.initial;){let e=`${o}.${s.initial}`,t=i.get(e);if(!t)break;o=e,s=t}return o}function p(e,t,i){let r=String(t);if(s(r)){let t=s(r)?r.slice(1):r,i=(d(e),o.get(e)?.get(t));return(0,n.D8)(i,()=>`[zag-js] Unknown state id: "${t}"`),h(e,i)}if(r.startsWith(".")&&i)return h(e,l(i,r.slice(1)));if(!r.includes(".")&&i){let t=u(i);for(let i=t.length-1;i>=1;i--){let n=l(t.slice(0,i).join("."),r);if(d(e).has(n))return h(e,n)}d(e).has(r)}return h(e,r)}function g(e,t,i){let n=c(e,t);for(let e=n.length-1;e>=0;e--){let t=n[e]?.state.on?.[i];if(t)return{transitions:t,source:n[e]?.path}}return{transitions:e.on?.[i],source:void 0}}function f(e,t,i,n){let r=t?c(e,t):[],o=c(e,i),a=0;for(;a<r.length&&a<o.length&&r[a]?.path===o[a]?.path;)a+=1;let s=r.slice(a).reverse(),l=o.slice(a),d=r[r.length-1]?.path===o[o.length-1]?.path;return n&&d&&(s=r.slice().reverse(),l=o),{exiting:s,entering:l}}function m(e,t){return!!e&&(e===t||e.startsWith(`${t}.`))}function b(e,t,i){return c(e,t).some(e=>e.state.tags?.includes(i))}},4209:(e,t,i)=>{i.d(t,{fs:()=>c});var n=i(730),r=i(7042),o=i(6806),a=i(4561),s=i(542),l=(0,a.I)({name:"text-area",parts:["root","input"],settings:{radius:o.t.radius.md,"focus-ring":`0 0 0 3px ${o.t.focus.soft}`}}),d=(0,n.H)({size:["md","sm"]}),u=(0,s.Il)("vela-ui-textarea",(0,s.AH)`@layer vela.ui{[data-slot=text-area-input]{box-sizing:border-box;border:1px solid ${o.t.border.strong};border-radius:${l.vars.radius};width:100%;min-height:64px;color:${o.t.fg.bright};resize:vertical;transition:border-color ${o.t.dur.fast} ease, box-shadow ${o.t.dur.fast} ease;-webkit-user-select:text;user-select:text;background:0 0;outline:2px solid #0000;padding:8px;font-family:inherit;font-size:14px;line-height:1.4;display:block}[data-slot=text-area-input]:hover{border-color:${o.t.fg.muted}}[data-slot=text-area-input]:focus{border-color:${o.t.focus};box-shadow:${l.vars["focus-ring"]}}[data-slot=text-area-input]::placeholder{color:currentColor;opacity:.4}[data-slot=text-area]{width:100%;min-width:0}[data-slot=text-area]:where(:not([hidden])){display:block}[data-slot=text-area][data-autogrow] [data-slot=text-area-input]{resize:none;min-height:46px;overflow-y:hidden}[data-slot=text-area][data-size=sm] [data-slot=text-area-input]{min-height:46px;padding:6px 9px;font-size:13px;line-height:18px}}`),c=class{constructor(e={}){u(document),this.ctrl=function(e={}){let t=e.value??e.defaultValue??"";return{get value(){return t},size:e.size??"md",rows:e.rows??3,disabled:e.disabled??!1,commit:i=>i===t?null:(t=i,e.onChange?.(i),i),sync(e){t=e}}}(e),this.autoGrow=!0===e.autoGrow,this.maxLines=e.maxLines??4;let t=(0,r.h)("textarea",{className:"vela-textarea-field",slot:l.slot("input"),attrs:{id:e.id,placeholder:e.placeholder,name:e.name}});t.required=!0===e.required,t.rows=this.ctrl.rows,t.value=this.ctrl.value,t.disabled=this.ctrl.disabled,t.addEventListener("blur",()=>{this.ctrl.commit(t.value)}),this.autoGrow&&t.addEventListener("input",()=>this.grow()),this.el=(0,r.h)("div",{className:"vela-textarea",slot:l.slot("root"),attrs:d({size:this.ctrl.size}),data:{autogrow:this.autoGrow}},t),this.input=t,this.autoGrow&&this.grow()}get value(){return this.ctrl.value}setValue(e){this.ctrl.sync(e),this.input.value=e,this.autoGrow&&this.grow()}destroy(){}grow(){let e=this.input,t=parseFloat(getComputedStyle(e).lineHeight)||18,i=e.clientHeight-(e.offsetHeight?t*(e.rows||1):0),n=t*this.maxLines+(Number.isFinite(i)&&i>0?i:12);e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,n)}px`,e.style.overflowY=e.scrollHeight>n?"auto":"hidden"}}},4561:(e,t,i)=>{i.d(t,{I:()=>a,p:()=>o});var n=i(2489),r=()=>(0,n.B)("component-defs@1",()=>new Map);function o(){return r()}function a(e){let t={};for(let[i,n]of Object.entries(e.settings??{}))t[i]=`var(--vela-${e.name}-${i}, ${String(n)})`;return r().set(e.name,{parts:e.parts,settings:Object.keys(t)}),{name:e.name,parts:e.parts,slot:t=>"root"===t?e.name:`${e.name}-${t}`,vars:t}}},4591:(e,t,i)=>{i.d(t,{l:()=>a});var n=i(8065),r=i(1542);let o=(0,n.Tl)({childList:!0,subtree:!0});function a(e){let t,i,{getContainerEl:n,getRootNode:a,parts:s,onChange:l}=e,d=Object.keys(s),u=()=>{let e={};for(let t of d)e[t]=!!s[t]();t&&d.every(i=>t[i]===e[i])||(t=e,l(e))},c=()=>{let e=n();return!!e&&(i?.(),u(),i=o.observe(e,u),!0)},h=(0,r.er)(()=>{if(c())return;u();let e=a?.();e&&(i=o.observe(e,c))});return()=>{h(),i?.()}}},4730:(e,t,i)=>{i.d(t,{rx:()=>r});var n=i(3457);function r(e,t){let{rootEl:i}=t||{},r=function(e,t){let{rootEl:i}=t||{};if(!e||!i||!i.contains(e))return null;let r=(0,n.zk)(i),a=i.getBoundingClientRect(),d=e.getBoundingClientRect(),u=r.getComputedStyle(i),c=r.getComputedStyle(e),h=i.offsetWidth?a.width/i.offsetWidth:1,p=i.offsetHeight?a.height/i.offsetHeight:1,{clientTop:g,clientLeft:f,clientWidth:m,clientHeight:b}=i,v=o(g+l(u.scrollPaddingTop,b),g+b-l(u.scrollPaddingBottom,b),(d.top-a.top)/p-s(c.scrollMarginTop),(d.bottom-a.top)/p+s(c.scrollMarginBottom)),y=o(f+l(u.scrollPaddingLeft,m),f+m-l(u.scrollPaddingRight,m),(d.left-a.left)/h-s(c.scrollMarginLeft),(d.right-a.left)/h+s(c.scrollMarginRight));return 0===y&&0===v?null:{top:i.scrollTop+v,left:i.scrollLeft+y}}(e,{rootEl:i});if(!i||!r)return!1;let d=t?.behavior;return"smooth"===d&&a(i)&&(d="instant"),i.scrollTo({...r,...d&&{behavior:d}}),!0}function o(e,t,i,n){if(i<e&&n>t)return 0;let r=n-i>t-e;return i<e?r?n-t:i-e:n>t?r?i-e:n-t:0}let a=e=>!!(0,n.zk)(e).matchMedia?.("(prefers-reduced-motion: reduce)").matches,s=e=>{let t=Number.parseFloat(e);return Number.isNaN(t)?0:t},l=(e,t)=>{let i=s(e);return e.trim().endsWith("%")?i*t/100:i}},4792:(e,t,i)=>{i.d(t,{CN:()=>p,Tc:()=>y,aR:()=>f,bh:()=>g,cX:()=>m,gm:()=>v,m0:()=>x,nr:()=>b});let n=e=>"undefined"!=typeof document&&e.test(navigator.userAgentData?.platform??navigator.platform),r=e=>"undefined"!=typeof document&&e.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}()),o=/^iPhone/i,a=/^iPad/i,s=/^Mac/i,l=/apple/i,d=/Firefox/i,u=/Chrome/i,c=/AppleWebKit/i,h=/Android/i,p=()=>"undefined"!=typeof document&&!!navigator.maxTouchPoints,g=()=>n(a)||m()&&navigator.maxTouchPoints>1,f=()=>n(o)||g(),m=()=>n(s),b=()=>(m()||f())&&"undefined"!=typeof document&&l.test(navigator.vendor),v=()=>r(d),y=()=>r(c)&&!r(u),x=()=>r(h)},4965:(e,t,i)=>{function n(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function r(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function o(e,t){if(null==e)throw Error(t())}i.d(t,{D8:()=>o,R8:()=>n,V1:()=>r})},5010:(e,t,i)=>{i.d(t,{oC:()=>o});var n=i(3457),r=i(3998);let o=function(e){let t,i=new WeakMap,o=new WeakMap,a=e=>t||(t=new e.ResizeObserver(e=>{for(let t of e){o.set(t.target,t);let e=i.get(t.target);if(e)for(let i of e)i(t)}}));return{observe:(t,o)=>{let s=(0,n.zk)(t);if("function"!=typeof s.ResizeObserver)return r.lQ;let l=i.get(t)||new Set;return l.add(o),i.set(t,l),a(s).observe(t,e),()=>{let e=i.get(t);e&&(e.delete(o),0===e.size&&(i.delete(t),a(s).unobserve(t)))}},unobserve:e=>{i.delete(e),t?.unobserve(e)}}}({box:"border-box"})},5034:(e,t,i)=>{i.d(t,{D_:()=>o,Jg:()=>n,OK:()=>s,lQ:()=>a,wg:()=>r});let n=(e,...t)=>("function"==typeof e?e(...t):e)??void 0,r=e=>e,o=e=>e(),a=()=>{},s=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})}},5089:(e,t,i)=>{i.d(t,{$b:()=>o,IF:()=>x,K:()=>m,Ml:()=>c,TH:()=>w,TW:()=>d,VL:()=>p,YF:()=>u,b9:()=>a,f2:()=>l,fv:()=>h,kn:()=>E,mK:()=>b,q_:()=>s,wt:()=>r});var n=i(4792);function r(e){return(e.composedPath?.()??e.nativeEvent?.composedPath?.())?.[0]??e.target}function o(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let i=1===e.button,n=l(e);return i||n}function a(e){let t=e.currentTarget;if(!t)return!1;let i=t.localName;return!!e.altKey&&("a"===i||"button"===i&&"submit"===t.type||"input"===i&&"submit"===t.type)}function s(e){return b(e).isComposing||229===e.keyCode}function l(e){return(0,n.cX)()?e.metaKey:e.ctrlKey}function d(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}function u(e){return""===e.pointerType&&!!e.isTrusted||((0,n.m0)()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}let c=e=>0===e.button,h=e=>2===e.button||(0,n.cX)()&&e.ctrlKey&&0===e.button,p=e=>e.ctrlKey||e.altKey||e.metaKey,g={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},f={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function m(e,t={}){let{dir:i="ltr",orientation:n="horizontal"}=t,r=e.key;return r=g[r]??r,"rtl"===i&&"horizontal"===n&&r in f&&(r=f[r]),r}function b(e){return e.nativeEvent??e}let v=new Set(["PageUp","PageDown"]),y=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function x(e,t){let{step:i,largeStep:n,smallStep:r}=t,o=y.has(e.key);return null!=r&&e.altKey&&o?r:v.has(e.key)||e.shiftKey&&o?n:i}function w(e,t="client"){let i="touches"in e&&e.touches.length>0?e.touches[0]||e.changedTouches[0]:e;return{x:i[`${t}X`],y:i[`${t}Y`]}}let E=(e,t,i,n)=>{let r="function"==typeof e?e():e;return r?.addEventListener(t,i,n),()=>{r?.removeEventListener(t,i,n)}}},5397:(e,t,i)=>{i.d(t,{y:()=>n});let n=(e,t=[])=>({parts:(...i)=>{if(o(t))return n(e,i);throw Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...i)=>n(e,[...t,...i]),omit:(...i)=>n(e,t.filter(e=>!i.includes(e))),rename:e=>n(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,i)=>Object.assign(t,{[i]:{selector:`&[data-scope="${r(e)}"][data-part="${r(i)}"], & [data-scope="${r(e)}"][data-part="${r(i)}"]`,attrs:{"data-scope":r(e),"data-part":r(i)}}}),{})}),r=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),o=e=>0===e.length},5788:(e,t,i)=>{i.d(t,{X:()=>a,j:()=>r});var n=(0,i(2489).B)("teardowns@1",()=>new WeakMap);function r(e,t){let i=n.get(e);i||n.set(e,i=new Set);let r=i,o=()=>{r.delete(o)&&t()};return r.add(o),o}var o=e=>{let t=n.get(e);if(t)for(let e of[...t])e()};function a(e){if(e)for(let t of(1===e.nodeType&&o(e),e.querySelectorAll("*")))o(t)}},6262:(e,t,i)=>{i.d(t,{O:()=>o});var n="data-closing";function r(e){return e.flatMap(e=>e.getAnimations({subtree:!0}))}function o(e,t,i={}){let a=Array.isArray(e)?e:[e];if(0===a.length||!a.every(e=>"function"==typeof e.getAnimations))return t(),null;let s=new Set(r(a));for(let e of a)e.setAttribute(n,"");let l=r(a).filter(e=>!s.has(e)&&Number.isFinite(e.effect?.getComputedTiming().endTime??1/0));if(0===l.length){for(let e of a)e.removeAttribute(n);return t(),null}let d=[...a,...i.inert??[]],u=d.map(e=>e.inert);for(let e of d)e.inert=!0;let c=!1,h=e=>{if(!c){for(let e of(c=!0,clearTimeout(p),a))e.removeAttribute(n);d.forEach((e,t)=>{e.inert=u[t]}),e&&t()}},p=setTimeout(()=>h(!0),1e3),g=l.length,f=()=>{0==--g&&h(!0)};for(let e of l)e.finished.then(f,f);return{cancel:()=>h(!1),finish:()=>h(!0)}}},6291:(e,t,i)=>{i.d(t,{ZU:()=>a,ob:()=>function e(t){let i=(0,n.$4)(t);return(0,n.tZ)(i)?(0,n.YE)(i).body:(0,n.sb)(i)&&a(i)?i:e(i)}});var n=i(3457);let r=/auto|scroll|overlay|hidden|clip/,o=new Set(["inline","contents"]);function a(e){let{overflow:t,overflowX:i,overflowY:a,display:s}=(0,n.zk)(e).getComputedStyle(e);return r.test(t+a+i)&&!o.has(s)}},6581:(e,t,i)=>{i.d(t,{Op:()=>o,b6:()=>r,mj:()=>a});var n=i(4030);function r(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function o(e){return(0,n.KC)(e),e}function a(){return{guards:r(),createMachine:e=>o(e),choose:e=>function({choose:t}){return t(e)?.actions}}}},7042:(e,t,i)=>{function n(e,t={},...i){let r=document.createElement(e);if(t.className&&(r.className=t.className),t.slot&&r.setAttribute("data-slot",t.slot),t.data)for(let[e,i]of Object.entries(t.data))o(r,`data-${e}`,i);if(t.attrs)for(let[e,i]of Object.entries(t.attrs))o(r,e,i);if(t.style&&(r.style.cssText=t.style),void 0!==t.text&&(r.textContent=t.text),t.on)for(let[e,i]of Object.entries(t.on))r.addEventListener(e,i);return function e(t,i){for(let n of i)null!=n&&!1!==n&&(Array.isArray(n)?e(t,n):"string"==typeof n||"number"==typeof n?t.appendChild(document.createTextNode(String(n))):t.appendChild(n))}(r,i),r}function r(e,t){let i=(e.getAttribute("data-slot")??"").split(" ").filter(Boolean);i.includes(t)||e.setAttribute("data-slot",[...i,t].join(" "))}function o(e,t,i){null==i||!1===i?e.removeAttribute(t):e.setAttribute(t,!0===i?"":String(i))}i.d(t,{U:()=>r,h:()=>n})},7062:(e,t,i)=>{i.d(t,{Wj:()=>u,CY:()=>c,AZ:()=>S,aC:()=>v,an:()=>x,FX:()=>A,oU:()=>N});var n=i(3678),r=i(1689),o={"--vela-space-1":"4px","--vela-space-2":"8px","--vela-space-3":"12px","--vela-space-4":"16px","--vela-radius-sm":"4px","--vela-radius-md":"6px","--vela-radius-lg":"10px","--vela-z-tooltip":"60","--vela-z-menu":"50","--vela-z-dialog":"40","--vela-z-popover":"6000","--vela-ease":"cubic-bezier(0.22, 1, 0.36, 1)","--vela-dur-fast":"90ms","--vela-dur-med":"160ms","--vela-font-size-sm":"11px","--vela-font-size-md":"12px","--vela-font-size-lg":"14px","--vela-scroll-size":"5px"},a=i(4561),s=i(542),l=i(1849),d={badge:{parts:["root"],settings:["radius"]},"bar-chart":{parts:["root","grid","label","bar","marker","tip"],settings:["tip-radius","tip-shadow","tip-z","tip-bg"]},button:{parts:["root","icon","keys"],settings:["radius","height","height-xs","height-sm","height-lg","font-size","font-size-xs","font-size-sm"]},"callout-bubble":{parts:["root","panel","title","text","actions","button"],settings:["panel-radius","button-radius"]},card:{parts:["root","header","heading","eyebrow","title","trigger","description","action","content","footer"],settings:["radius","padding","padding-sm","gap","gap-sm","background","border","inset-background"]},checkbox:{parts:["root","icon"],settings:["radius"]},collapsible:{parts:["root","trigger","icon","title","count","chevron","content"],settings:["trigger-height","radius"]},"color-picker":{parts:["root","trigger","swatch","content"],settings:["swatch-ring","circle-swatch-radius","content-radius"]},"data-table":{parts:["root","table","head","sort","row","cell","actions","empty"],settings:["row-height","head-height","head-z"]},"date-picker":{parts:["root","head","title","switch","nav","week","grid","cells","blank","day","cell"],settings:["radius","today-ring"]},dialog:{parts:["backdrop","positioner","content","header","title","close","body","footer"],settings:["radius"]},donut:{parts:["root","ring","track","segment","figure","caption","legend","item","swatch","label","value"],settings:["swatch-radius"]},drawer:{parts:["backdrop","positioner","content","grab","title","body"],settings:["radius","edge-radius","side-width","grab-radius"]},"dropdown-menu":{parts:["content","item","icon","label","hint","mark","badge","star","switch","arrow","separator"],settings:["radius","switch-radius"]},empty:{parts:["root","icon","title","description"],settings:["icon-radius"]},field:{parts:["grid","row","span","label","cell","bool","stacked","stacked-head","inline","inline-item","toggle-label","section","sep"],settings:[]},figure:{parts:["root","label","value","sub"],settings:[]},"glyph-select":{parts:["root","value","icon","content","item"],settings:["radius","content-radius","focus-ring"]},"hover-card":{parts:["root","heading","icon","title","description","body","hint"],settings:["radius","width","wide-width","icon-radius","shadow"]},input:{parts:["root","control"],settings:["radius","focus-ring"]},"input-group":{parts:["root","control","addon","text"],settings:["radius","height","height-sm","focus-ring"]},item:{parts:["root","media","content","title","description","meta","actions","group"],settings:["radius","gap"]},kbd:{parts:["root"],settings:["radius","shadow"]},"line-chart":{parts:["root","label","area","line","dot","tip"],settings:["tip-radius","tip-shadow","tip-z","tip-bg","stroke-width"]},"month-grid":{parts:["root","weekday","day","date","value","detail","blank"],settings:["radius","day-height","gap","selected-ring"]},"number-input":{parts:["root","input","steps","step"],settings:["radius","step-radius","focus-ring"]},popover:{parts:["content"],settings:[]},"scatter-chart":{parts:["root","grid","label","point","trend","focus","tip"],settings:["tip-radius","tip-shadow","tip-z","tip-bg"]},select:{parts:["root","trigger","value","icon","sizer","native","content","viewport","item","rail","thumb"],settings:["radius","content-radius","thumb-radius","focus-ring"]},slider:{parts:["root","control","track","range","thumb"],settings:["track-height","thumb-size","radius","focus-ring"]},"sort-button":{parts:["root","icon","state"],settings:["radius"]},sparkline:{parts:["root","area","baseline","line"],settings:["stroke-width"]},switch:{parts:["root","control","thumb"],settings:["width","height","thumb-size","width-sm","height-sm","thumb-size-sm"]},tabs:{parts:["list","trigger","icon","count","label","description","content"],settings:["track-radius","trigger-radius","filled-radius","soft-radius","count-radius"]},"text-area":{parts:["root","input"],settings:["radius","focus-ring"]},toast:{parts:["root","list","item","close","icon","content","title","description","cancel","action"],settings:["width","radius","background","border","foreground","description-color","shadow","success","info","warning","error"]},"toggle-group":{parts:["root","item","icon"],settings:["radius","radius-sm","item-radius","item-radius-sm"]},tooltip:{parts:["positioner","content"],settings:["radius"]},treemap:{parts:["root","crumbs","crumb","map","group","group-name","group-value","tile","tile-label","tile-value","legend","legend-bar","tip"],settings:["radius","up","down","tile-bg","tint-min","tint-max","hover-z","tip-radius","tip-bg","tip-shadow","tip-z"]}},u={background:"#151619",textColor:"#b2b5be",gridColor:"#20222c",borderColor:"#2a2b30",upColor:n.cr,downColor:n.TV,fontFamily:"sans-serif"},c={background:"#ffffff",textColor:"#1e293b",gridColor:"#cccccc",borderColor:"#d4dae3",upColor:n.cr,downColor:n.TV,fontFamily:"sans-serif"},h=["space-1","space-2","space-3","space-4","radius-sm","radius-md","radius-lg","z-tooltip","z-menu","z-dialog","z-popover","ease","dur-fast","dur-med","font-size-sm","font-size-md","font-size-lg","scroll-size","font","bg","fg","fg-muted","fg-faint","fg-bright","surface","surface-elev","surface-overlay","surface-sunken","border","border-strong","border-soft","border-faint","hover","active","hover-strong","focus","focus-soft","separator-hover-band","separator-hover-line","scroll","accent","accent-bright","highlight","selected-bg","selected-fg","fg-on-fill","up","down","profit","loss","danger","shadow","shadow-dialog","backdrop"],p={none:0,sm:.5,md:1,lg:1.5};function g(e,t){let i=function(e){let t="light"===e.base?c:void 0===e.base||"dark"===e.base?u:e.base,i=e.colors,n=e.font??t.fontFamily;if(!i)return{...t,fontFamily:n};let o=i.background??t.background,a=i.text??(i.background?(0,r.cP)(o)?u.textColor:c.textColor:t.textColor),s=void 0!==i.background||void 0!==i.text;return{background:o,textColor:a,gridColor:i.grid??(s?(0,r.jh)(o,a,.08):t.gridColor),borderColor:i.border??(s?(0,r.jh)(o,a,.14):t.borderColor),upColor:i.up??t.upColor,downColor:i.down??t.downColor,fontFamily:n}}(e),a={...o,...function(e){let t=(0,r.cP)(e.background),i=i=>t?`rgba(255,255,255,${i})`:(0,r.fu)(e.textColor,i+.02),o=(0,r.jh)(e.background,t?"#ffffff":e.textColor,t?.03:.05);return{"--vela-font":e.fontFamily,"--vela-bg":e.background,"--vela-fg":t?"#d1d4dc":e.textColor,"--vela-fg-muted":t?"#868a96":(0,r.fu)(e.textColor,.62),"--vela-fg-faint":(0,r.fu)(e.textColor,.35),"--vela-fg-bright":t?"#f0f3fa":"#000000","--vela-surface":e.background,"--vela-surface-elev":o,"--vela-surface-overlay":o,"--vela-surface-sunken":e.background,"--vela-border":e.borderColor,"--vela-border-strong":t?"#34353b":(0,r.fu)(e.textColor,.28),"--vela-border-soft":e.borderColor,"--vela-border-faint":(0,r.fu)(e.textColor,.08),"--vela-hover":i(.06),"--vela-active":i(.1),"--vela-hover-strong":i(.16),"--vela-focus":(0,r.fu)(e.textColor,.5),"--vela-focus-soft":(0,r.fu)(e.textColor,.12),"--vela-separator-hover-band":(0,r.fu)(e.textColor,.1),"--vela-separator-hover-line":(0,r.fu)(e.textColor,.55),"--vela-scroll":e.borderColor,"--vela-accent":n.bg,"--vela-accent-bright":n.SO,"--vela-highlight":n.jY,"--vela-selected-bg":t?"#f0f3fa":e.textColor,"--vela-selected-fg":t?e.background:"#ffffff","--vela-fg-on-fill":"#ffffff","--vela-up":e.upColor,"--vela-down":e.downColor,"--vela-profit":e.upColor,"--vela-loss":e.downColor,"--vela-danger":e.downColor,"--vela-shadow":"0 8px 30px rgba(0,0,0,0.5)","--vela-shadow-dialog":"0 20px 60px rgba(0,0,0,0.5)","--vela-backdrop":"rgba(0,0,0,0.45)"}}(i)};if(e.radius){let t=p[e.radius];for(let e of["radius-sm","radius-md","radius-lg"])a[`--vela-${e}`]=`${Math.round(parseFloat(o[`--vela-${e}`])*t)}px`}let l=e.accent??e.colors?.accent;l&&(a["--vela-accent"]=l,a["--vela-accent-bright"]=l,a["--vela-fg-on-fill"]=((0,r.yN)(l,"#ffffff")??21)>=((0,r.yN)(l,"#000000")??0)?"#ffffff":"#000000");for(let[t,i]of Object.entries(e.tokens??{}))void 0!==i&&(a[`--vela-${t}`]=i);let d={},h={},g=[];for(let[i,n]of Object.entries(e.components??{})){let e={};for(let[t,i]of Object.entries(n))"css"!==t&&"string"==typeof i&&(e[t]=i);Object.keys(e).length&&(d[i]=e);let r={};for(let[e,o]of Object.entries(n.css??{}))"string"==typeof o&&(t.allowCss&&(0,s.ey)(o),(0,s.JR)(o)?r[e]=o:g.push(`components.${i}.css.${e}`));Object.keys(r).length&&(h[i]=r)}let f={};l&&(f.accent=l),e.radius&&(f.radius=e.radius),e.font&&(f.font=e.font),e.tokens&&(f.tokens={...e.tokens});let m=new Set([...Object.keys(d),...Object.keys(h)]);if(m.size){let e={};for(let t of m)e[t]={...d[t],...h[t]?{css:{...h[t]}}:{}};f.components=e}return{theme:{id:function(e){let t=5381;for(let i=0;i<e.length;i+=1)t=(t<<5)+t+e.charCodeAt(i)|0;return(t>>>0).toString(36)}(JSON.stringify([a,d,h])),chart:i,tokens:a,components:d,css:h,settings:f},dropped:g}}var f=e=>e.trim().startsWith("var(");function m(e,t){let i=[],n=new Set(h);for(let t of Object.keys(e.tokens??{}))n.has(t)||i.push(`"${t}" is not a token`);i.push(...function(e){let t=[];for(let[i,n]of Object.entries(e.components??{})){let e=(0,a.p)().get(i)??(Object.prototype.hasOwnProperty.call(d,i)?d[i]:void 0);if(!e){t.push(`components.${i}: no component has that name (declare a component of your own with defineComponent before creating the theme)`);continue}for(let r of Object.keys(n??{}))"css"===r||e.settings.includes(r)||t.push(`components.${i}.${r} is not a setting of ${i} (${e.settings.length?`its settings: ${e.settings.join(", ")}`:"it has none"})`);for(let r of Object.keys(n?.css??{}))e.parts.includes(r)||t.push(`components.${i}.css.${r} is not a part of ${i} (its parts: ${e.parts.join(", ")})`)}return t}(e));let o=[["accent",e.accent]];for(let[t,i]of Object.entries(e.colors??{}))o.push([`colors.${t}`,i]);if("object"==typeof e.base)for(let t of w)"fontFamily"!==t&&o.push([`base.${t}`,e.base[t]]);for(let[e,t]of o)void 0===t||f(t)||(0,r.x5)(t)||i.push(`${e} "${t}" is not a color the theme can derive from (use #rrggbb or rgb())`);for(let[e,n,o]of[["fg","bg",4.5],["fg-on-fill","accent",3]]){let a=(0,r.yN)(t.tokens[`--vela-${e}`]??"",t.tokens[`--vela-${n}`]??"");null!==a&&a<o&&i.push(`${e} on ${n} has a contrast of ${a.toFixed(1)}:1 (at least ${o}:1 reads well)`)}for(let[e,n]of Object.entries(t.css))for(let[t,r]of Object.entries(n)){let n=`components.${e}.css.${t}`;for(let e of(/!important/i.test(r)&&i.push(`${n} uses !important, which the custom layer does not need`),/(^|[\s,>+~(&])\.[a-z_-][\w-]*[^{};]*\{/im.test(r)&&i.push(`${n} targets a class name, which is not part of the component's contract (use its parts and data attributes)`),r.match(/@[a-z-]+/gi)??[]))O.test(e)||i.push(`${n} declares ${e}, which is left out (declare it in the page's stylesheet and use it from the part)`)}return i}var b=e=>`${e} was not written with the css tag and is left out (pass { allowCss: true } to apply CSS loaded from data)`;function v(e={},t={}){let{theme:i,dropped:n}=g(e,t);return[...n.map(b),...m(e,i)]}var y=new Set;function x(e={},t={}){let{theme:i,dropped:n}=g(e,t);for(let t of[...n.map(b),...m(e,i)])y.has(t)||(y.add(t),console.warn(`[vela-ui] theme: ${t}`));return i}var w=["background","textColor","gridColor","borderColor","upColor","downColor","fontFamily"],E=e=>w.map(t=>e[t]).join("|");function k(e){let t=e.getRootNode();return t instanceof Document||"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot?t:e.ownerDocument}function T(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,""),i="",n=[],r="",o=0;for(;o<t.length;){let e=t[o];if('"'===e||"'"===e){let i=t.indexOf(e,o+1),n=i<0?t.length:i+1;r+=t.slice(o,n),o=n;continue}if(";"===e)i+=`${r.trim()}; `,r="";else if("{"===e){let e=1,i=o+1;for(;i<t.length&&e>0;)"{"===t[i]?e+=1:"}"===t[i]&&(e-=1),i+=1;n.push([r.trim(),t.slice(o+1,i-1).trim()]),r="",o=i;continue}else r+=e;o+=1}return r.trim()&&(i+=`${r.trim()}; `),{decls:i.trim(),blocks:n}}var O=/^@(media|supports|container)\b/i,C=new Map,I=new WeakMap;function S(e,t){let i="tokens"in t&&"id"in t?t:function(e){let t={background:e.background,textColor:e.textColor,gridColor:e.gridColor,borderColor:e.borderColor,upColor:e.upColor,downColor:e.downColor,fontFamily:e.fontFamily},i=e.ui?`${E(t)}|${JSON.stringify(e.ui)}`:E(t),n=C.get(i);return n||(C.size>=32&&C.clear(),n=x({...e.ui,base:t}),C.set(i,n)),n}(t),n=k(e);for(let t in(0,l.DA)(n),"undefined"!=typeof document&&function(e,t){let i=I.get(t);i||I.set(t,i=new Map);let n=`vela-theme-${e.id}`;if(i.get(n)?.isConnected)return;let r=(0,l.QG)(n,function(e,t=`[data-vela-theme="${e.id}"]`){let i=Object.entries(e.tokens).map(([e,t])=>`${e}: ${t};`);for(let[t,n]of Object.entries(e.components))for(let[e,r]of Object.entries(n))i.push(`--vela-${t}-${e}: ${r};`);let n=[`@layer vela.theme { ${t} { ${i.join(" ")} } }`],r=[];for(let[i,n]of Object.entries(e.css))for(let[e,o]of Object.entries(n)){let n="root"===e?i:`${i}-${e}`;r.push(function e(t,i){let{decls:n,blocks:r}=T(i),o=n?[`${t} { ${n} }`]:[];for(let[i,n]of r){if(i.startsWith("@")){O.test(i)&&o.push(`${i} { ${e(t,n)} }`);continue}let r=(function(e){let t=[],i=0,n=0;for(let r=0;r<e.length;r+=1){let o=e[r];"("===o||"["===o?i+=1:")"===o||"]"===o?i-=1:","===o&&0===i&&(t.push(e.slice(n,r).trim()),n=r+1)}return t.push(e.slice(n).trim()),t.filter(Boolean)})(i).map(e=>e.includes("&")?e.split("&").join(t):`${t} ${e}`),a=T(n);a.decls&&o.push(`${r.join(", ")} { ${a.decls} }`)}return o.join(" ")}(`:where(${t}, ${t} *):is([data-slot~="${n}"]):where(:not([hidden]))`,o))}return r.length&&n.push(`@layer vela.custom { ${r.join(" ")} }`),n.join("\n")}(e),t);if(r&&i.set(n,r),!(i.size<=32))for(let[e,r]of i)e===n||t.querySelector(`[data-vela-theme="${e.slice(11)}"]`)||(r.remove(),i.delete(e))}(i,n),e.setAttribute("data-vela-theme",i.id),i.tokens)e.style.removeProperty(t);return i}var P=Object.entries(o).map(([e,t])=>` ${e}: ${t};`).join("\n"),$=`
|
|
8
|
+
/* Theme-independent tokens on every kit host, at no specificity in the theme layer: a theme's
|
|
9
|
+
own rule (radius scaling) and a host's CSS both override them. */
|
|
10
|
+
@layer vela.theme {
|
|
11
|
+
:where(.vela-ui, .vela-ui-layer) {
|
|
12
|
+
${P}
|
|
13
|
+
}
|
|
14
|
+
/* One scrollbar on every kit surface: thin, a rounded thumb, no track and no arrows, sized and
|
|
15
|
+
colored by the scroll tokens. Chromium and Safari draw it from the ::-webkit-scrollbar parts,
|
|
16
|
+
and setting scrollbar-width or scrollbar-color on an element switches them back to the native
|
|
17
|
+
bar, so those two are for the browsers without the parts. */
|
|
18
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *)::-webkit-scrollbar { width: var(--vela-scroll-size); height: var(--vela-scroll-size); }
|
|
19
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *)::-webkit-scrollbar-track { background: transparent; }
|
|
20
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *)::-webkit-scrollbar-corner { background: transparent; }
|
|
21
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *)::-webkit-scrollbar-thumb { background: var(--vela-scroll); border-radius: var(--vela-scroll-size); }
|
|
22
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *)::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
|
|
23
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
24
|
+
:where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *) { scrollbar-width: thin; scrollbar-color: var(--vela-scroll) transparent; }
|
|
25
|
+
}
|
|
26
|
+
/* A search field's clear cross in the theme's ink: Chromium and Safari otherwise draw their own,
|
|
27
|
+
blue on some systems. */
|
|
28
|
+
:where(.vela-ui, .vela-ui-layer) :where(input[type='search'])::-webkit-search-cancel-button {
|
|
29
|
+
-webkit-appearance: none;
|
|
30
|
+
appearance: none;
|
|
31
|
+
flex: none;
|
|
32
|
+
width: 12px;
|
|
33
|
+
height: 12px;
|
|
34
|
+
margin-inline-start: 4px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
background-color: var(--vela-fg-bright);
|
|
37
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
38
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.vela-ui, .vela-ui-layer {
|
|
42
|
+
font-family: var(--vela-font, -apple-system, system-ui, sans-serif);
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
/* Chrome text (titles, buttons, menus, readouts) is UI, not copy \u2014 never selectable. */
|
|
45
|
+
user-select: none;
|
|
46
|
+
-webkit-user-select: none;
|
|
47
|
+
}
|
|
48
|
+
/* Unlayered, as the chrome's own controls rely on it; a kit component never declares a
|
|
49
|
+
box-sizing of its own, which this reset would override. */
|
|
50
|
+
.vela-ui *, .vela-ui-layer * { box-sizing: border-box; }
|
|
51
|
+
/* Text ENTRY is the one exception: selection is part of editing. */
|
|
52
|
+
.vela-ui :is(input, textarea), .vela-ui-layer :is(input, textarea) { user-select: text; -webkit-user-select: text; }
|
|
53
|
+
/* iOS Safari zooms the page when a focused field is under 16px, and often
|
|
54
|
+
keeps that zoom after the field blurs or a dialog closes. The shell's
|
|
55
|
+
mobile size class is the honest gate \u2014 not a media query \u2014 so an embedded
|
|
56
|
+
chart on a wide desktop still gets the rule when it is in the phone layout.
|
|
57
|
+
Scoped to the kit root so a host page's own [data-layout] is never touched. */
|
|
58
|
+
.vela-ui[data-layout='mobile'] :is(input, textarea, select) { font-size: 16px; }
|
|
59
|
+
@layer vela.ui {
|
|
60
|
+
.vela-icon { display: inline-flex; align-items: center; flex: none; }
|
|
61
|
+
.vela-icon svg { display: block; }
|
|
62
|
+
}
|
|
63
|
+
`;function N(e,t){return e.closest(".vela-ui")??t??e}function A(e,t){let i=k(e);(0,l.DA)(i),(0,l.QG)("vela-ui-tokens",$,i),e.classList.add("vela-ui"),t&&S(e,t)}},7148:(e,t,i)=>{i.d(t,{Ao:()=>q,xl:()=>K,iU:()=>W});var n=i(2489);let r=new WeakMap,o=new Set(["value","checked","selected"]),a=new Set(["viewBox","preserveAspectRatio","clipPath","clipRule","fillRule","strokeWidth","strokeLinecap","strokeLinejoin","strokeDasharray","strokeDashoffset","strokeMiterlimit"]),s=(e,t)=>(e=>"svg"===e.tagName||"http://www.w3.org/2000/svg"===e.namespaceURI)(e)&&a.has(t)?t:t.toLowerCase(),l=e=>e.startsWith("--")?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),d=(e,t,i)=>{if("string"==typeof i)return void e.setAttribute("style",i);if(null==i&&"string"==typeof t)return void e.removeAttribute("style");let n=e.style;if(null!=n){for(let e in t)i?.[e]==null&&n.removeProperty(l(e));for(let e in i){let t=i[e];null==t?n.removeProperty(l(e)):n.setProperty(l(e),String(t))}}};function u(e,t,i){let n=i||"default",a=r.get(e);a||(a=new Map,r.set(e,a));let l=a.get(n)||{},u=Object.keys(t),c=(t,i)=>{e.removeEventListener(t.toLowerCase(),i)},h=e=>e.startsWith("on"),p=e=>c(e.substring(2),t[e]);for(let i in l)null==t[i]&&("class"===i?e.className="":"style"===i?d(e,l[i],void 0):o.has(i)?e[i]="":e.removeAttribute(s(e,i)));return Object.keys(l).filter(h).forEach(e=>{c(e.substring(2),l[e])}),u.filter(h).forEach(i=>{var n,r;return n=i.substring(2),r=t[i],void e.addEventListener(n.toLowerCase(),r)}),u.filter(e=>!e.startsWith("on")).forEach(i=>{let n=t[i],r=l[i];if(n!==r){if("class"===i){e.className=n??"";return}if("style"===i)return void d(e,r,n);if(o.has(i)){e[i]=n??"";return}if("boolean"==typeof n&&!i.includes("aria-"))return void e.toggleAttribute(s(e,i),n);if("children"===i){e.innerHTML=n;return}if(null!=n)return void e.setAttribute(s(e,i),n);e.removeAttribute(s(e,i))}}),a.set(n,t),function(){u.filter(h).forEach(p);let t=r.get(e);t&&(t.delete(n),0===t.size&&r.delete(e))}}var c=i(4030);let h=function(e){return e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e}({}),p="__init__";var g=i(3457);let f=Symbol(),m=Symbol(),b=Object.getPrototypeOf,v=new WeakMap,y=e=>e&&(v.has(e)?v.get(e):b(e)===Object.prototype||b(e)===Array.prototype),x=e=>y(e)&&e[m]||null,w=(e,t=!0)=>{v.set(e,t)};function E(e,t){let i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;return i?(i[e]||(i[e]=t()),i[e]):t()}let k=E("__zag__refSet",()=>new WeakSet),T=e=>null!==e&&"object"==typeof e,O=e=>T(e)&&!k.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e)||(e=>"object"==typeof e&&null!==e&&"nodeType"in e&&"string"==typeof e.nodeName)(e))(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),C=()=>!1,I=E("__zag__proxyStateMap",()=>new WeakMap),[S]=((e=Object.is,t=(e,t)=>new Proxy(e,t),i=new WeakMap,n=(e,t)=>{let n=i.get(e);if(n?.[0]===t)return n[1];let r=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return w(r,!0),i.set(e,[t,r]),Reflect.ownKeys(e).forEach(t=>{let i=Reflect.get(e,t);k.has(i)?(w(i,!1),r[t]=i):I.has(i)?r[t]=N(i):r[t]=i}),Object.freeze(r)},r=new WeakMap,o=[1,1],a=i=>{if(!T(i))throw Error("object required");let a=r.get(i);if(a)return a;let s=o[0],l=new Set,d=(e,t=++o[0])=>{s!==t&&(s=t,l.forEach(i=>i(e,t)))},u=o[1],c=(e=++o[1])=>(u===e||l.size||(u=e,p.forEach(([t])=>{let i=t[1](e);i>s&&(s=i)})),s),h=e=>(t,i)=>{let n=[...t];n[1]=[e,...n[1]],d(n,i)},p=new Map,g=(e,t)=>{if(C()&&p.has(e))throw Error("prop listener already exists");if(l.size){let i=t[3](h(e));p.set(e,[t,i])}else p.set(e,[t])},f=e=>{let t=p.get(e);t&&(p.delete(e),t[1]?.())},m=e=>{l.add(e),1===l.size&&p.forEach(([e,t],i)=>{if(C()&&t)throw Error("remove already exists");let n=e[3](h(i));p.set(i,[e,n])});let t=()=>{l.delete(e),0===l.size&&p.forEach(([e,t],i)=>{t&&(t(),p.set(i,[e]))})};return t},b=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),v=t(b,{deleteProperty(e,t){let i=Reflect.get(e,t);f(t);let n=Reflect.deleteProperty(e,t);return n&&d(["delete",[t],i]),n},set(t,i,n,o){let a=Reflect.has(t,i),s=Reflect.get(t,i,o);if(a&&(e(s,n)||r.has(n)&&e(s,r.get(n))))return!0;f(i),T(n)&&(n=x(n)||n);let l=n;if(Object.getOwnPropertyDescriptor(t,i)?.set);else{!I.has(n)&&O(n)&&(l=P(n));let e=!k.has(l)&&I.get(l);e&&g(i,e)}return Reflect.set(t,i,l,o),d(["set",[i],n,s]),!0}});r.set(i,v);let y=[b,c,n,m];return I.set(v,y),Reflect.ownKeys(i).forEach(e=>{let t=Object.getOwnPropertyDescriptor(i,e);t.get||t.set?Object.defineProperty(b,e,t):v[e]=i[e]}),v})=>[a,I,k,e,t,O,i,n,r,o])();function P(e={}){return S(e)}function $(e,t,i){let n,r=I.get(e);C()&&!r&&console.warn("Please use proxy object");let o=[],a=r[3],s=!1,l=a(e=>{if(o.push(e),i)return void t(o.splice(0));n||(n=Promise.resolve().then(()=>{n=void 0,s&&t(o.splice(0))}))});return s=!0,()=>{s=!1,l()}}function N(e){let t=I.get(e);C()&&!t&&console.warn("Please use proxy object");let[i,n,r]=t;return r(i,n())}var A=i(5034),R=i(3542),L=i(4965),V=i(3926),F=i(853),D=i(2828);function M(e){let t=e().value??e().defaultValue;e().debug&&console.log(`[bindable > ${e().debug}] initial`,t);let i=e().isEqual??Object.is,n=P({value:t}),r=()=>void 0!==e().value;return{initial:t,ref:n,get:()=>r()?e().value:n.value,set(t){let o=r()?e().value:n.value,a=(0,R.Tn)(t)?t(o):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:a,prev:o}),r()||(n.value=a),i(a,o)||e().onChange?.(a,o)},invoke(t,i){e().onChange?.(t,i)},hash:t=>e().hash?.(t)??String(t)}}M.cleanup=e=>{},M.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};let{defineProperty:z,getOwnPropertyDescriptor:H,getOwnPropertyDescriptors:B}=Object;function _(e,t){if(Object.is(e,t))return e;if(!(0,R.Qd)(e)||!(0,R.Qd)(t))return void 0===t?e:t;let i=e,n=(t,n)=>{i===e&&(i=Object.defineProperties({},B(e))),z(i,t,n)};for(let[i,r]of Object.entries(B(t))){if(!r.enumerable)continue;if(r.get){n(i,r);continue}let t=r.value;if(void 0===t)continue;let o=!!H(e,i)?.get,a=e[i],s=(0,R.Qd)(a)&&(0,R.Qd)(t)?_(a,t):t;!o&&Object.is(a,s)||n(i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return i}function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G(e,t,i){var n;return(n=function(e,t){if("object"!=U(e)||!e)return e;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var i,n=i.call(e,t||"default");if("object"!=U(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==U(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var j=class{constructor(e,t={}){this.machine=e,G(this,"scope",void 0),G(this,"context",void 0),G(this,"prop",void 0),G(this,"state",void 0),G(this,"refs",void 0),G(this,"computed",void 0),G(this,"event",{type:""}),G(this,"previousEvent",{type:""}),G(this,"effects",new Map),G(this,"replaceTracker",function(){let e=new Map;return{claim(t){let i=Symbol(t);return e.set(t,i),i},isReplaced:(t,i)=>e.get(t)!==i}}()),G(this,"transition",null),G(this,"cleanups",[]),G(this,"subscriptions",[]),G(this,"userProps",void 0),G(this,"userPropsSources",[]),G(this,"getUserProps",()=>{let e=this.userProps;for(let t of this.userPropsSources){let i=(0,A.Jg)(t);e=e?_(e,i):i}return e}),G(this,"getEvent",()=>({...this.event,current:()=>this.event,previous:()=>this.previousEvent})),G(this,"getState",()=>({...this.state,matches:(...e)=>e.some(e=>(0,c.HK)(this.state.get(),e)),hasTag:e=>(0,c.ti)(this.machine,this.state.get(),e)})),G(this,"debug",(...e)=>{this.machine.debug&&console.log(...e)}),G(this,"notify",()=>{this.publish()}),G(this,"send",e=>{if(this.status!==h.Started)return;let t=e?.replaces,i=t?this.replaceTracker.claim(t):void 0;queueMicrotask(()=>{if(!e||t&&i&&this.replaceTracker.isReplaced(t,i))return;this.previousEvent=this.event,this.event=e,this.debug("send",e);let n=this.state.get(),r=e.type,{transitions:o,source:a}=(0,c.L5)(this.machine,n,r),s=this.choose(o);if(!s)return;this.transition=s;let l=(0,c.lk)(this.machine,s.target??n,a);this.debug("transition",s),l!==n?this.state.set(l):s.reenter?this.state.invoke(n,n):this.action(s.actions)})}),G(this,"action",e=>{let t=(0,R.Tn)(e)?e(this.getParams()):e;if(t)for(let e of t.map(e=>{let t=this.machine.implementations?.actions?.[e];return t||(0,L.R8)(`[zag-js] No implementation found for action "${JSON.stringify(e)}"`),t}))e?.(this.getParams())}),G(this,"guard",e=>{if((0,R.Tn)(e))return e(this.getParams());let t=this.machine.implementations?.guards?.[e];return t||(0,L.R8)(`[zag-js] No implementation found for guard "${JSON.stringify(e)}"`),t?.(this.getParams())}),G(this,"effect",e=>{let t=(0,R.Tn)(e)?e(this.getParams()):e;if(!t)return;let i=t.map(e=>{let t=this.machine.implementations?.effects?.[e];return t||(0,L.R8)(`[zag-js] No implementation found for effect "${JSON.stringify(e)}"`),t}),n=[];for(let e of i){let t=e?.(this.getParams());t&&n.push(t)}return()=>n.forEach(e=>e?.())}),G(this,"choose",e=>(0,V.$r)(e).find(e=>{let t=!e.guard;return(0,R.Kg)(e.guard)?t=!!this.guard(e.guard):(0,R.Tn)(e.guard)&&(t=e.guard(this.getParams())),t})),G(this,"subscribe",e=>(this.subscriptions.push(e),()=>{let t=this.subscriptions.indexOf(e);t>-1&&this.subscriptions.splice(t,1)})),G(this,"status",h.NotStarted),G(this,"publish",()=>{this.callTrackers(),this.subscriptions.forEach(e=>e(this.service))}),G(this,"trackers",[]),G(this,"setupTrackers",()=>{this.machine.watch?.(this.getParams())}),G(this,"callTrackers",()=>{this.trackers.forEach(({deps:e,fn:t})=>{let i=e.map(e=>e());(0,F.n)(t.prev,i)||(t(),t.prev=i)})}),G(this,"getParams",()=>({state:this.getState(),context:this.context,event:this.getEvent(),prop:this.prop,send:this.send,action:this.action,guard:this.guard,track:(e,t)=>{t.prev=e.map(e=>e()),this.trackers.push({deps:e,fn:t})},refs:this.refs,computed:this.computed,flush:A.D_,scope:this.scope,choose:this.choose})),(0,R.Tn)(t)?this.userPropsSources.push(t):this.userProps=t;let{id:i,ids:n,getRootNode:r}=(0,A.Jg)(t);this.scope=function(e){let t=()=>e.getRootNode?.()??document,i=()=>(0,g.YE)(t());return{...e,getRootNode:t,getDoc:i,getWin:()=>i().defaultView??window,getActiveElement:()=>(0,g.bq)(t()),isActiveElement:g.X7,getById:e=>t().getElementById(e)}}({id:i,ids:n,getRootNode:r});let o=t=>{let i=this.getUserProps();return(e.props?.({props:(0,D.oE)(i),scope:this.scope})??i)[t]};this.prop=o;let a=e.context?.({prop:o,bindable:M,scope:this.scope,flush(e){queueMicrotask(e)},getContext:()=>s,getComputed:()=>l,getRefs:()=>d,getEvent:this.getEvent.bind(this)});a&&Object.values(a).forEach(e=>{let t=$(e.ref,()=>this.notify());this.cleanups.push(t)});let s={get:e=>a?.[e].get(),set(e,t){a?.[e].set(t)},initial:e=>a?.[e].initial,hash(e){let t=a?.[e].get();return a?.[e].hash(t)}};this.context=s;let l=t=>((0,L.D8)(e.computed,()=>"[zag-js] No computed object found on machine"),e.computed[t]({context:s,event:this.getEvent(),prop:o,refs:this.refs,scope:this.scope,computed:l}));this.computed=l;let d=function(e){return{get:t=>e[t],set(t,i){e[t]=i}}}(e.refs?.({prop:o,context:s})??{});this.refs=d;let u=M(()=>({defaultValue:(0,c.lk)(e,e.initialState({prop:o})),onChange:(t,i)=>{let{exiting:n,entering:r}=(0,c.Jc)(this.machine,i,t,this.transition?.reenter);if(n.forEach(e=>{this.effects.get(e.path)?.(),this.effects.delete(e.path)}),n.forEach(e=>{this.action(e.state?.exit)}),this.action(this.transition?.actions),r.forEach(e=>{let t=this.effect(e.state?.effects);if(t){let i=this.effects.get(e.path);this.effects.set(e.path,i?(0,A.OK)(i,t):t)}}),i===p){this.action(e.entry);let t=this.effect(e.effects);if(t){let e=this.effects.get(p);this.effects.set(p,e?(0,A.OK)(e,t):t)}}r.forEach(e=>{this.action(e.state?.entry)})}}));this.state=u,this.cleanups.push($(this.state.ref,()=>this.notify()))}updateProps(e){let t=this.userPropsSources;if((0,R.Tn)(e))t.push(e);else if(0===t.length)this.userProps=_(this.userProps,e);else{let i=t.length-1,n=t[i];if((0,R.Tn)(n)){let i=_({},e);i&&Object.keys(i).length>0&&t.push(i)}else t[i]=_(n,e)}this.notify()}start(){this.status=h.Started,this.debug("initializing..."),this.state.invoke(this.state.initial,p),this.setupTrackers()}stop(){this.effects.forEach(e=>e?.()),this.effects.clear(),this.transition=null,this.action(this.machine.exit),this.cleanups.forEach(e=>e()),this.cleanups=[],this.subscriptions=[],this.status=h.Stopped,this.debug("unmounting...")}get service(){return{state:this.getState(),send:this.send,context:this.context,prop:this.prop,scope:this.scope,refs:this.refs,computed:this.computed,event:this.getEvent(),getStatus:()=>this.status}}};function W(...[e,t,i]){let n=t.style;if(null===n||"object"!=typeof n)return u(e,t,i);let r={};for(let[e,t]of Object.entries(n))null!=t&&(r[e]=t);return u(e,{...t,style:r},i)}function K(e,t,i){let n=new j(e,t),r=n.subscribe(i);return n.start(),i(n.service),{service:n.service,flush:()=>i(n.service),stop:()=>{r(),n.stop()}}}function q(e){return(0,n.e)(e)}},7657:(e,t,i)=>{i.d(t,{lG:()=>ew});var n=i(9748),r=i(1404),o=i(3825),a=i(187),s=i(6262),l=i(5788),d=i(7148),u=i(3754),c=i(4897),h=i(6806),p=i(4561),g=i(542),f=i(1849),m=i(3457),b=i(9285);let v=new WeakMap,y=new WeakMap,x={},w=0,E=e=>e&&(e.host||E(e.parentNode)),k=new Set(["script","output","status","next-route-announcer"]),T=new WeakMap,O=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body;var C=i(6581),I=i(2190),S=i(4591),P=i(9358),$=i(1542),N=i(5089),A=i(648);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t,i){var n;return(n=function(e,t){if("object"!=R(e)||!e)return e;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var i,n=i.call(e,t||"default");if("object"!=R(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==R(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let V={activateTrap(e,t){if(e.length>0){let i=e[e.length-1];i!==t&&i.pause()}let i=e.indexOf(t);-1===i||e.splice(i,1),e.push(t)},deactivateTrap(e,t){let i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}},F=[];var D=class{addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{(0,b.sV)(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}constructor(e,t){L(this,"trapStack",void 0),L(this,"config",void 0),L(this,"doc",void 0),L(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),L(this,"lastInteractionType","keyboard"),L(this,"portalContainers",new Set),L(this,"listenerCleanups",[]),L(this,"handleFocus",e=>{let t=(0,N.wt)(e),i=this.findContainerIndex(t,e)>=0;if(i||(0,m.wz)(t))i&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let i=!0;if(this.state.mostRecentlyFocusedNode)if((0,A.yT)(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:n}=this.state.containerGroups[e];if(n.length>0){let e=n.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<n.length&&(t=n[e+1],i=!1):e-1>=0&&(t=n[e-1],i=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>(0,A.yT)(e)>0))||(i=!1);else i=!1;i&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),L(this,"handlePointerDown",e=>{this.lastInteractionType="pointer";let t=(0,N.wt)(e);if(!(this.findContainerIndex(t,e)>=0)){if(_(this.config.clickOutsideDeactivates,e))return void this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});_(this.config.allowOutsideClick,e)||e.preventDefault()}}),L(this,"handleClick",e=>{let t=(0,N.wt)(e);!(this.findContainerIndex(t,e)>=0||_(this.config.clickOutsideDeactivates,e))&&(_(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation()))}),L(this,"handleTabKey",e=>{if(this.lastInteractionType="keyboard",this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),i=this.findNextNavNode({event:e,isBackward:t});i&&(z(e)&&e.preventDefault(),this.tryFocus(i))}}),L(this,"handleEscapeKey",e=>{U(e)&&!1!==_(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())}),L(this,"_mutationObserver",void 0),L(this,"setupMutationObserver",()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>e.nodeType===Node.ELEMENT_NODE&&(!!(0,b.mX)(e)||!(!e.id||this.state.containers.some(t=>t.contains(e)))&&(0,b.PS)(e))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),L(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),L(this,"getInitialFocusNode",()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!(0,A.tp)(e)){let t=(0,m.bq)(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e||(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected))throw Error("Your focus-trap needs to have at least one focusable element");return e}),L(this,"tryFocus",(e,t)=>{if(!1!==e&&e!==(0,m.bq)(this.doc)){if(!e||!e.focus)return void this.tryFocus(this.getInitialFocusNode());e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,j(e)&&e.select()}}),L(this,"deactivate",e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),V.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let i=this.getOption(t,"onDeactivate"),n=this.getOption(t,"onPostDeactivate"),r=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");i?.();let a=()=>{G(()=>{if(o&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t="keyboard"===this.lastInteractionType?{focusVisible:!0}:void 0;this.tryFocus(e,t)}n?.()})};return o&&r?r(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(a,a):a(),this}),L(this,"pause",e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,"onPause"),i=this.getOption(e,"onPostPause");return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),i?.(),this}),L(this,"unpause",e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,"onUnpause"),i=this.getOption(e,"onPostUnpause");this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),i?.(),this}),L(this,"updateContainerElements",e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),L(this,"getReturnFocusNode",e=>{let t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e}),L(this,"getOption",(e,t,i)=>e&&void 0!==e[t]?e[t]:this.config[i||t]),L(this,"getNodeForOption",(e,{hasFallback:t=!1,params:i=[]}={})=>{let n=this.config[e];if("function"==typeof n&&(n=n(...i)),!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let r=n;if("string"==typeof n){try{r=this.doc.querySelector(n)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!r&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return r}),L(this,"findNextNavNode",e=>{let{event:t,isBackward:i=!1}=e,n=e.target||(0,N.wt)(t);this.updateTabbableNodes();let r=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(n,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)r=i?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(i){let i=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>n===e);if(i<0&&(o?.container===n||(0,A.tp)(n)&&!(0,A.AO)(n)&&!o?.nextTabbableNode(n,!1))&&(i=e),i>=0){let e=0===i?this.state.tabbableGroups.length-1:i-1,t=this.state.tabbableGroups[e];r=(0,A.yT)(n)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else z(t)||(r=o?.nextTabbableNode(n,!1))}else{let i=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>n===e);if(i<0&&(o?.container===n||(0,A.tp)(n)&&!(0,A.AO)(n)&&!o?.nextTabbableNode(n))&&(i=e),i>=0){let e=i===this.state.tabbableGroups.length-1?0:i+1,t=this.state.tabbableGroups[e];r=(0,A.yT)(n)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else z(t)||(r=o?.nextTabbableNode(n))}}else r=this.getNodeForOption("fallbackFocus");return r}),this.trapStack=t.trapStack||F;let i={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:H,isKeyBackward:B,...t};this.doc=i.document||(0,m.YE)(Array.isArray(e)?e[0]:e),this.config=i,this.updateContainerElements(e),this.setupMutationObserver()}findContainerIndex(e,t){let i="function"==typeof t?.composedPath?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:n,tabbableNodes:r})=>n.contains(e)||i?.includes(n)||r.find(t=>t===e)||this.isControlledElement(n,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return!!this.config.followControlledElements&&(0,b.$5)(e,t)}isPersistentElement(e,t){let i=this.config.persistentElements;if(!i||0===i.length)return!1;let n="function"==typeof t?.composedPath?t.composedPath():void 0;return i.some(t=>{let i=t();return(0,m.gR)(i,e)||null!=i&&n?.includes(i)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=(0,A.j9)(e,{getShadowRoot:this.config.getShadowRoot}),i=(0,A.i7)(e,{getShadowRoot:this.config.getShadowRoot}),n=t[0],r=t[t.length-1],o=!1;for(let e=0;e<t.length;e++)if((0,A.yT)(t[e])>0){o=!0;break}return{container:e,tabbableNodes:t,focusableNodes:i,posTabIndexesFound:o,firstTabbableNode:n,lastTabbableNode:r,firstDomTabbableNode:n,lastDomTabbableNode:r,nextTabbableNode:function(e,n=!0){let r=t.indexOf(e);if(r>=0)return t[r+(n?1:-1)];let o=i.indexOf(e);if(!(o<0)){if(n){for(let e=o+1;e<i.length;e++)if((0,A.AO)(i[e]))return i[e]}else for(let e=o-1;e>=0;e--)if((0,A.AO)(i[e]))return i[e]}}}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}attachListeners(){if(this.state.active)return V.activateTrap(this.trapStack,this),this.listenerCleanups.push((0,N.kn)(this.doc,"focusin",this.handleFocus,!0),(0,N.kn)(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),(0,N.kn)(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),(0,N.kn)(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),(0,N.kn)(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),(0,N.kn)(this.doc,"keydown",this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?G(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>(0,m.gR)(t,e))}isSafeToOverrideFocus(){let e=(0,m.bq)(this.doc);return!!(!e||e===this.doc.body||this.containsElement(e))||this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),i=this.getOption(e,"onPostActivate"),n=this.getOption(e,"checkCanFocusTrap");n||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=(0,m.bq)(this.doc),t?.();let r=()=>{n&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),i?.()};return n?n(this.state.containers.concat()).then(r,r):r(),this}};let M=e=>e?.type==="keydown",z=e=>M(e)&&e?.key==="Tab",H=e=>M(e)&&"Tab"===e.key&&!e?.shiftKey,B=e=>M(e)&&"Tab"===e.key&&e?.shiftKey,_=(e,...t)=>"function"==typeof e?e(...t):e,U=e=>!e.isComposing&&"Escape"===e.key,G=e=>setTimeout(e,0),j=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var W=i(7776),K=i(6291),q=i(333),Y=i(4792);let X="data-scroll-lock",J=new WeakMap;function Q(e){let t=(0,W.L)(e)?.scrollbarGutter;return"stable"===t||t?.startsWith("stable ")===!0}var Z=i(2577),ee=i(3998),et=i(3542);let ei=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,en=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,er=e=>e.ids?.content??`dialog:${e.id}:content`,eo=(e,t)=>{let i=e.ids?.trigger;return null!=i?(0,et.Tn)(i)?i(t):i:t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`},ea=e=>e.ids?.title??`dialog:${e.id}:title`,es=e=>e.ids?.description??`dialog:${e.id}:description`,el=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,ed=e=>e.getById(er(e)),eu=e=>e.getById(eo(e)),ec=e=>(0,Z.YG)(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${(0,ee.iG)(e.id)}`),eh=(e,t)=>null==t?eu(e)??ec(e)[0]:e.getById(eo(e,t)),ep=(e,t)=>{let i=t.finalFocusEl?.();if(i)return i;if(t.triggerValue){let i=eh(e,t.triggerValue);if(i)return i}return ec(e)[0]??null},eg=(0,C.Op)({props({props:e,scope:t}){let i="alertdialog"===e.role,n=i?()=>t.getById(el(t)):void 0,r="boolean"!=typeof e.modal||e.modal;return{role:"dialog",modal:r,trapFocus:r,preventScroll:r,closeOnInteractOutside:r&&!i,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n,...e}},initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",context:({bindable:e,prop:t,scope:i})=>({rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t("defaultTriggerValue")??null,value:t("triggerValue"),onChange(e){let n=t("onTriggerValueChange");n&&n({value:e,triggerElement:eh(i,e)})}}))}),refs:()=>({returnFocusEl:null}),watch({track:e,action:t,prop:i}){e([()=>i("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["setReturnFocusEl","setInitialFocus"],effects:["trackRenderedElements","trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER_VALUE.SET":{actions:["setTriggerValue"]}}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],"TRIGGER_VALUE.SET":{actions:["setTriggerValue"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>void 0!=e("open")},effects:{trackRenderedElements:({context:e,scope:t})=>(0,S.l)({getContainerEl:()=>ed(t),getRootNode:()=>t.getRootNode(),parts:{title:()=>(e=>e.getById(ea(e)))(t),description:()=>(e=>e.getById(es(e)))(t)},onChange:t=>e.set("rendered",t)}),trackDismissableElement({scope:e,send:t,prop:i}){let n=!0;return(0,I.u)(()=>ed(e),{type:"dialog",defer:!0,getRootNode:e.getRootNode,pointerBlocking:i("modal"),layerStyleTargets:[()=>e.getById(en(e)),()=>e.getById(ei(e))],exclude:[eu(e),...ec(e)].filter(Boolean),onInteractOutside(e){i("onInteractOutside")?.(e),i("closeOnInteractOutside")||e.preventDefault(),n=!(e.detail.focusable||e.detail.contextmenu)},persistentElements:i("persistentElements"),onFocusOutside:i("onFocusOutside"),onPointerDownOutside:i("onPointerDownOutside"),onRequestDismiss:i("onRequestDismiss"),onEscapeKeyDown(e){i("onEscapeKeyDown")?.(e),i("closeOnEscape")||e.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:n})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return function(e){let t=e??document,i=J.get(t);i||(i={count:0,cleanup:function(e){let t=e.defaultView??window,{documentElement:i,body:n}=e,r=function(e){let{documentElement:t,body:i}=e;return(0,K.ZU)(t)?t:i}(e),o=Q(i)||Q(n),a=t.innerWidth-i.clientWidth;n.setAttribute(X,"");let s=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",l=[(0,q.$h)(i,"--scrollbar-width",`${a}px`),(0,Y.aR)()?(()=>{let{scrollX:e,scrollY:i,visualViewport:r}=t,l=r?.offsetLeft??0,d=r?.offsetTop??0,u={position:"fixed",overflow:"hidden",top:`${-(i-Math.floor(d))}px`,left:`${-(e-Math.floor(l))}px`,right:"0"};!o&&a>0&&(u[s]=`${a}px`);let c=(0,q.eC)(n,u);return()=>{c?.(),t.scrollTo({left:e,top:i,behavior:"instant"})}})():(()=>{let e={overflow:"hidden"};return!o&&a>0&&(e[s]=`${a}px`),(0,q.eC)(r,e)})()];return()=>{l.forEach(e=>e?.()),n.removeAttribute(X)}}(t)},J.set(t,i)),i.count++;let n=i,r=!1;return()=>{r||(r=!0,n.count--,0===n.count&&(n.cleanup(),J.delete(t)))}}(e.getDoc())},trapFocus({scope:e,prop:t,context:i}){if(t("trapFocus"))return function(e,t={}){let i,n=(0,$.er)(()=>{let n=(Array.isArray(e)?e:[e]).map(e=>"function"==typeof e?e():e).filter(e=>null!=e);if(0===n.length)return;let r=n[0];i=new D(n,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:r,...t,document:(0,m.YE)(r)});try{i.activate()}catch{}});return function(){i?.deactivate(),n()}}(()=>ed(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:()=>(0,P.R)({root:ed(e),getInitialEl:t("initialFocusEl")}),setReturnFocus:n=>ep(e,{finalFocusEl:t("finalFocusEl"),triggerValue:i.get("triggerValue")})??n,getShadowRoot:!0})},hideContentBelow({scope:e,prop:t}){if(t("modal"))return function(e,t={}){let{defer:i=!0}=t,n=[];return n.push((i?e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)}:e=>e())(()=>{let t=("function"==typeof e?e():e).filter(Boolean);0!==t.length&&n.push(((e,t=O(e),i="data-aria-hidden",n=!0)=>{if(t)return((e,t)=>{var i;let n,r,o,a,{parentNode:s,attribute:l,followControlledElements:d=!0}=t,u=(o=s,(Array.isArray(e)?e:[e]).map(e=>{if(o.contains(e))return e;let t=E(e);return t&&o.contains(t)?t:(console.error("[zag-js > ariaHidden] target",e,"in not contained inside",o,". Doing nothing"),null)}).filter(e=>!!e));if(!u.length)return()=>{};let c="aria-hidden"===l?'[aria-hidden="true"]':"[inert]",h=()=>{let e=n;n=((e,t)=>{var i;let{parentNode:n,markerName:r,attribute:o,followControlledElements:a=!0}=t,s="aria-hidden"===o?"true":"",l=e.filter(e=>n.contains(e));if(!l.length)return()=>{};(i=x)[r]||(i[r]=new WeakMap);let d=x[r],u=[],c=new Set,h=new Set(l),p=e=>{!e||c.has(e)||(c.add(e),p(e.parentNode))};l.forEach(e=>{p(e),a&&(0,m.sb)(e)&&(0,b.d)(e,e=>{p(e),h.add(e)})});let g=e=>{!e||h.has(e)||Array.prototype.forEach.call(e.children,e=>{if(c.has(e))g(e);else try{let t;if(t=e,k.has(t.localName)||"status"===t.role||t.hasAttribute("aria-live")||t.matches("[data-live-announcer]"))return;let i="aria-hidden"===o?"true"===e.getAttribute(o):e.hasAttribute(o),n=(v.get(e)||0)+1,a=(d.get(e)||0)+1;v.set(e,n),d.set(e,a),u.push(e),1===n&&i&&y.set(e,!0),1===a&&e.setAttribute(r,""),i||e.setAttribute(o,s)}catch(t){console.error("[zag-js > ariaHidden] cannot operate on ",e,t)}})};return g(n),c.clear(),w++,()=>{u.forEach(e=>{let t=v.get(e)-1,i=d.get(e)-1;v.set(e,t),d.set(e,i),t||(y.has(e)||e.removeAttribute(o),y.delete(e)),i||e.removeAttribute(r)}),--w||(v=new WeakMap,y=new WeakMap,x={})}})(u,t),e?.()},p={pause(){r?.disconnect(),r=void 0,n?.(),n=void 0},resume(){h(),d&&(r=new((0,m.zk)(s)).MutationObserver(e=>{e.some(({target:e})=>(0,m.vq)(e)&&!e.closest(c))&&h()})).observe(s,{attributes:!0,attributeFilter:["aria-expanded"],subtree:!0})}},g=(i=s.ownerDocument,(a=T.get(i))||(a=function(){let e=[];return{add(t){e[e.length-1]?.pause(),e.push(t),t.resume()},remove(t){let i=e.indexOf(t);if(-1===i)return;let n=i===e.length-1;e.splice(i,1),n&&(t.pause(),e[e.length-1]?.resume())}}}(),T.set(i,a)),a);return g.add(p),()=>g.remove(p)})(e,{parentNode:t,markerName:i,attribute:"aria-hidden",followControlledElements:n})})(t))})),()=>{n.forEach(e=>e?.())}}(()=>[ed(e)],{defer:!0})}},actions:{setReturnFocusEl({refs:e,scope:t}){(0,$.er)(()=>e.set("returnFocusEl",t.getActiveElement()))},setFinalFocus({event:e,prop:t,refs:i,scope:n,context:r}){if(t("trapFocus")||!t("restoreFocus")||(e.restoreFocus??e.previousEvent?.restoreFocus)===!1)return;let o=ed(n),a=ep(n,{finalFocusEl:t("finalFocusEl"),triggerValue:r.get("triggerValue")})??i.get("returnFocusEl");(0,$.er)(()=>{(0,m.gU)(n.getActiveElement(),[o])||a?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e("trapFocus")||(0,$.er)(()=>{let i=(0,P.R)({root:ed(t),getInitialEl:e("initialFocusEl")});i&&i.focus({preventScroll:!0})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},setTriggerValue({context:e,event:t}){void 0!==t.value&&e.set("triggerValue",t.value)},toggleVisibility({prop:e,send:t,event:i}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:i})}}}});var ef=i(2828);let em=(0,i(5397).y)("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger").build();var eb=(0,p.I)({name:"dialog",parts:["backdrop","positioner","content","header","title","close","body","footer"],settings:{radius:h.t.radius.lg}}),ev=(0,r.a)("ui.dialog.close","Close"),ey=(0,g.Il)("vela-ui-dialog-5",(0,g.AH)`@layer vela.ui{[data-slot=dialog-backdrop]{background:${h.t.backdrop};z-index:${h.t.z.dialog};position:fixed;inset:0}[data-slot=dialog-backdrop][data-clear]{background:0 0}[data-slot=dialog-backdrop][data-contained],[data-slot=dialog-backdrop]:is([data-layout=mobile] *){position:absolute}[data-slot=dialog-positioner]{z-index:${h.t.z.dialog};justify-content:center;align-items:flex-start;padding-top:10vh;display:flex;position:fixed;inset:0}[data-slot=dialog-positioner][data-contained]{position:absolute}[data-slot=dialog-positioner][data-align=center]{align-items:center;padding-top:0}[data-slot=dialog-positioner]:is([data-layout=mobile] *){align-items:stretch;padding:0;position:absolute}[data-slot=dialog-header]{border-bottom:1px solid ${h.t.border};-webkit-user-select:none;user-select:none;align-items:center;padding-block:9px;padding-inline:16px 9px;display:flex}[data-slot=dialog-title]{letter-spacing:.2px;color:${h.t.fg.bright};flex:1;font-size:17px;font-weight:600}[data-slot=dialog-close]{all:unset;cursor:pointer;border-radius:${h.t.radius.sm};width:30px;height:30px;color:${h.t.fg.muted};justify-content:center;align-items:center;font-size:15px;line-height:1;display:flex}[data-slot=dialog-close]:hover{background:${h.t.hover};color:${h.t.fg.bright}}[data-slot=dialog-close]:is([data-layout=mobile] *){width:40px;height:40px}[data-slot=dialog-body]{padding:${h.t.space[4]};flex:auto;min-height:0;overflow:auto}[data-slot=dialog-body][data-flush]{flex-direction:column;padding:0;display:flex;overflow:hidden}[data-slot=dialog-body]:is([data-layout=mobile] *){padding-bottom:calc(${h.t.space[4]} + env(safe-area-inset-bottom,0px))}[data-slot=dialog-footer]{flex:none}[data-slot=dialog-content]{background:${h.t.surface};color:${h.t.fg};border:1px solid ${h.t.border.strong};border-radius:${eb.vars.radius};box-shadow:${h.t.shadow.dialog};outline:2px solid #0000;flex-direction:column;min-width:300px;max-width:min(92vw,560px);max-height:70vh;font-size:13px;display:flex;overflow:hidden}[data-slot=dialog-content][data-state=open]{animation:vela-dialog-in ${h.t.dur.med} ${h.t.ease}}[data-slot=dialog-content][data-variant=default] [data-slot=dialog-footer]{justify-content:flex-end;gap:${h.t.space[2]};padding:0 ${h.t.space[4]} ${h.t.space[4]};display:flex}[data-slot=dialog-content][data-variant=settings]{cursor:default;width:fit-content;min-width:min(560px,94vw);max-width:min(720px,94vw);max-height:70vh;font-size:13px}[data-slot=dialog-content][data-variant=form]{width:fit-content;min-width:min(380px,90%);max-width:min(640px,94%);max-height:82%;font-size:14px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-header]{border-bottom:none;align-items:flex-start;padding:16px 20px 20px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-title]{font-size:20px;line-height:28px}[data-slot=dialog-content][data-variant=form] [data-slot=dialog-footer]{border-top:1px solid ${h.t.border};justify-content:flex-end;gap:12px;padding:16px 20px;display:flex}[data-slot=dialog-content]:is([data-layout=mobile] *){border:none;border-radius:0;flex:auto;width:100%;min-width:0;max-width:none;max-height:none}@keyframes vela-dialog-in{0%{opacity:0;transform:translateY(6px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}}`),ex={"vela-dialog--settings":"settings","vela-dialog--form":"form"},ew=class{constructor(e={}){this.opener=null,this.wasOpen=!1,this.exit=null,this.destroyed=!1;let t=(e.host??document.body).ownerDocument;ey(t),(0,f.QG)("vela-ui-dialog-mobile","[data-layout='mobile'] .vela-dialog { transform: none !important; }",t);let i=e.host??t.body,r=(e,t)=>(e.dataset.slot=eb.slot(t),e);this.backdrop=r(t.createElement("div"),"backdrop"),this.backdrop.className="vela-dialog-backdrop vela-ui-layer",!0!==e.dimBackdrop&&(this.backdrop.classList.add("vela-dialog-backdrop--clear"),this.backdrop.dataset.clear=""),this.positioner=r(t.createElement("div"),"positioner"),this.positioner.className="vela-dialog-positioner vela-ui-layer",e.contained&&(this.backdrop.dataset.contained="",this.positioner.dataset.contained=""),this.positioner.dataset.align=e.align??"top",this.panel=r(t.createElement("div"),"content"),this.panel.className="vela-dialog";let a=(e.className??"").split(/\s+/).filter(Boolean),s=e.variant??a.map(e=>ex[e]).find(e=>void 0!==e)??"default";for(let e of(this.panel.dataset.variant=s,"default"!==s&&this.panel.classList.add(`vela-dialog--${s}`),a))this.panel.classList.add(e);this.panel.tabIndex=-1,this.panel.addEventListener("keydown",e=>{"Escape"!==e.key&&e.stopPropagation()});let l=r(t.createElement("div"),"header");if(l.className="vela-dialog-header",e.draggable){l.style.cursor="move";let e=0,t=0,i=0,n=0,r=!1;l.addEventListener("pointerdown",o=>{o.target.closest(".vela-dialog-close")||(r=!0,e=o.clientX-i,t=o.clientY-n,l.setPointerCapture(o.pointerId))}),l.addEventListener("pointermove",o=>{r&&(i=o.clientX-e,n=o.clientY-t,this.panel.style.transform=`translate(${i}px, ${n}px)`)}),l.addEventListener("pointerup",()=>r=!1)}e.headerStart&&l.appendChild(e.headerStart);let h=r(t.createElement("div"),"title");h.className="vela-dialog-title",h.textContent=e.title??"",this.titleEl=h;let p=r(t.createElement("button"),"close");if(p.className="vela-dialog-close",this.closeButton=p,this.setI18n(e.i18n??(0,n.N)()),p.appendChild((0,c.x_)("close",t)),l.append(h,p),this.body=r(t.createElement("div"),"body"),this.body.className="vela-dialog-body",e.flush&&(this.body.dataset.flush=""),e.content instanceof Node?this.body.appendChild(e.content):"function"==typeof e.content&&e.content(this.body),this.panel.append(l,this.body),e.footer){let i=r(t.createElement("div"),"footer");i.className="vela-dialog-footer",e.footer instanceof Node?i.appendChild(e.footer):e.footer(i),this.panel.appendChild(i),this.footer=i}else this.footer=null;if(this.positioner.appendChild(this.panel),i.append(this.backdrop,this.positioner),e.closeOnBackdrop){let e=e=>{if(e.target===this.backdrop||e.target===this.positioner){if((0,o.KJ)()||(0,o.fH)(e))return void(0,o.$b)();this.hide()}};this.backdrop.addEventListener("pointerdown",e),this.positioner.addEventListener("pointerdown",e)}this.ctrl=function(e={}){return{machine:eg,props:{id:(0,d.Ao)("vela-dialog"),modal:e.modal??!0,closeOnEscape:e.closeOnEscape??!0,closeOnInteractOutside:e.closeOnInteractOutside??!1,initialFocusEl:e.initialFocusEl,onOpenChange:t=>e.onOpenChange?.(t.open)},connect:e=>(function(e,t){let{state:i,send:n,context:r,prop:o,scope:a}=e,s=o("aria-label"),l=i.matches("open"),d=r.get("triggerValue");return{open:l,modal:!!o("modal"),setOpen(e){n({type:e?"OPEN":"CLOSE",replaces:"open"})},triggerValue:d,setTriggerValue(e){n({type:"TRIGGER_VALUE.SET",value:e})},getTriggerProps(e={}){let{value:i}=e,r=null!=i&&d===i;return t.button({...em.trigger.attrs,dir:o("dir"),id:eo(a,i),"data-ownedby":a.id,"data-value":i,"aria-haspopup":"dialog",type:"button","aria-expanded":null==i?l:l&&r,"data-state":l?"open":"closed","aria-controls":er(a),"data-current":(0,ee.sE)(r),onClick(e){e.defaultPrevented||n({type:l&&null!=i&&!r?"TRIGGER_VALUE.SET":"TOGGLE",value:i})}})},getBackdropProps:()=>t.element({...em.backdrop.attrs,dir:o("dir"),hidden:!l,id:en(a),"data-state":l?"open":"closed"}),getPositionerProps:()=>t.element({...em.positioner.attrs,dir:o("dir"),id:ei(a),style:(0,ef.oE)({pointerEvents:l&&o("modal")?void 0:"none"})}),getContentProps(){let e=r.get("rendered");return t.element({...em.content.attrs,dir:o("dir"),role:o("role"),hidden:!l,id:er(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":o("modal"),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:ea(a),"aria-describedby":e.description?es(a):void 0,style:(0,ef.oE)({pointerEvents:o("modal")?void 0:"auto"})})},getTitleProps:()=>t.element({...em.title.attrs,dir:o("dir"),id:ea(a)}),getDescriptionProps:()=>t.element({...em.description.attrs,dir:o("dir"),id:es(a)}),getCloseTriggerProps:()=>t.button({...em.closeTrigger.attrs,dir:o("dir"),id:el(a),type:"button",onClick(e){e.defaultPrevented||(e.stopPropagation(),n({type:"CLOSE"}))}})}})(e,u._B)}}({...e,initialFocusEl:()=>this.positioner.closest('[data-layout="mobile"]')?this.panel:e.initialFocusEl?.()??null});let g=String(this.ctrl.props.id);this.handle=(0,d.xl)(this.ctrl.machine,this.ctrl.props,e=>{let t=this.ctrl.connect(e),n=this.wasOpen&&!t.open;n&&this.announce(!1),(0,d.iU)(this.backdrop,t.getBackdropProps(),g),(0,d.iU)(this.positioner,t.getPositionerProps(),g),(0,d.iU)(this.panel,t.getContentProps(),g),(0,d.iU)(h,t.getTitleProps(),g),(0,d.iU)(p,t.getCloseTriggerProps(),g),t.open?(this.exit?.cancel(),this.exit=null,this.wasOpen||this.positioner.parentNode!==i||i.lastElementChild===this.positioner||i.append(this.backdrop,this.positioner),this.setShown(!0)):n?this.holdExit():this.exit||this.setShown(!1),t.open&&!this.wasOpen&&this.announce(!0),this.wasOpen&&!t.open&&this.restoreOpener(),this.wasOpen=t.open})}setShown(e){this.backdrop.style.display=e?"":"none",this.positioner.style.display=e?"":"none"}holdExit(){let e=[this.panel,this.backdrop];for(let t of e)t.hidden=!1;this.exit=(0,s.O)(e,()=>{if(this.exit=null,this.destroyed)this.detach();else if(!this.open){for(let t of e)t.hidden=!0;this.setShown(!1)}},{inert:[this.positioner]})}detach(){this.backdrop.remove(),this.positioner.remove()}restoreOpener(){let e=this.opener;this.opener=null,e?.isConnected&&e.focus({preventScroll:!0})}announce(e){let t=this.opener===this.panel.ownerDocument.body?null:this.opener;(0,a.$5)(this.panel,e,"dialog",t)}setI18n(e){this.closeButton.setAttribute("aria-label",(0,r.b)(e,ev))}get open(){return this.ctrl.connect(this.handle.service).open}show(){this.opener=this.panel.ownerDocument.activeElement,this.ctrl.connect(this.handle.service).setOpen(!0)}hide(){this.ctrl.connect(this.handle.service).setOpen(!1)}contains(e){if(null==e)return!1;if(this.panel.contains(e)||this.backdrop.contains(e)||this.positioner.contains(e))return!0;let t=e instanceof Element?e:e.parentElement;return t?.closest(".vela-popover, .vela-menu")!=null}destroy(){this.wasOpen&&!this.open&&this.handle.flush(),this.open&&this.hide(),this.handle.stop(),this.destroyed=!0,this.wasOpen&&(this.wasOpen=!1,this.announce(!1)),this.restoreOpener(),(0,l.X)(this.panel),this.exit||this.detach()}}},7660:(e,t,i)=>{let n;i.d(t,{rI:()=>tH});var r=i(9748),o=i(1404),a=i(187),s=i(6262),l=i(7062),d=i(3875),u=i(7148),c=i(3754),h=i(4897),p=i(7042),g=i(6806),f=i(4561),m=i(542),b=i(6581),v=i(2190),y=i(3457),x=i(4792),w=i(1542);function E(e){return{metaKey:!!e?.metaKey,ctrlKey:!!e?.ctrlKey,shiftKey:!!e?.shiftKey,altKey:!!e?.altKey}}var k=i(7756),T=i(5089),O=i(4730),C=i(8065),I=i(9358),S=i(1711);let P=["top","right","bottom","left"],$=Math.min,N=Math.max,A=Math.round,R=Math.floor,L=e=>({x:e,y:e}),V={left:"right",right:"left",bottom:"top",top:"bottom"};function F(e,t){return"function"==typeof e?e(t):e}function D(e){return e.split("-")[0]}function M(e){return e.split("-")[1]}function z(e){return"x"===e?"y":"x"}function H(e){return"y"===e?"height":"width"}function B(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function _(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let U=["left","right"],G=["right","left"],j=["top","bottom"],W=["bottom","top"];function K(e){let t=D(e);return V[t]+e.slice(t.length)}function q(e){var t,i,n,r;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(i=e.right)?i:0,bottom:null!=(n=e.bottom)?n:0,left:null!=(r=e.left)?r:0}:{top:e,right:e,bottom:e,left:e}}function Y(e){let{x:t,y:i,width:n,height:r}=e;return{width:n,height:r,top:i,left:t,right:t+n,bottom:i+r,x:t,y:i}}function X(e,t,i){let n,{reference:r,floating:o}=e,a=B(t),s=z(B(t)),l=H(s),d=D(t),u=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;switch(d){case"top":n={x:u,y:r.y-o.height};break;case"bottom":n={x:u,y:r.y+r.height};break;case"right":n={x:r.x+r.width,y:c};break;case"left":n={x:r.x-o.width,y:c};break;default:n={x:r.x,y:r.y}}let p=M(t);return p&&(n[s]+=h*("end"===p?1:-1)*(i&&"y"===a?-1:1)),n}async function J(e,t){var i;void 0===t&&(t={});let{x:n,y:r,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=F(t,e),g=q(p),f=s[h?"floating"===c?"reference":"floating":c],m=Y(await o.getClippingRect({element:null==(i=await (null==o.isElement?void 0:o.isElement(f)))||i?f:f.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:d,rootBoundary:u,strategy:l})),b="floating"===c?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=Y(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:l}):b);return{top:(m.top-x.top+g.top)/y.y,bottom:(x.bottom-m.bottom+g.bottom)/y.y,left:(m.left-x.left+g.left)/y.x,right:(x.right-m.right+g.right)/y.x}}let Q=async(e,t,i)=>{let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:a}=i,s=a.detectOverflow?a:{...a,detectOverflow:J},l=await (null==a.isRTL?void 0:a.isRTL(t)),d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:c}=X(d,n,l),h=n,p=0,g={};for(let i=0;i<o.length;i++){let f=o[i];if(!f)continue;let{name:m,fn:b}=f,{x:v,y:y,data:x,reset:w}=await b({x:u,y:c,initialPlacement:n,placement:h,strategy:r,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,c=null!=y?y:c,g[m]={...g[m],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(d=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):w.rects),{x:u,y:c}=X(d,h,l)),i=-1)}return{x:u,y:c,placement:h,strategy:r,middlewareData:g}};function Z(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ee(e){return P.some(t=>e[t]>=0)}let et=new Set(["left","top"]);async function ei(e,t){let{placement:i,platform:n,elements:r}=e,o=await (null==n.isRTL?void 0:n.isRTL(r.floating)),a=D(i),s=M(i),l="y"===B(i),d=et.has(a)?-1:1,u=o&&l?-1:1,c=F(t,e),{mainAxis:h,crossAxis:p,alignmentAxis:g}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&"number"==typeof g&&(p="end"===s?-1*g:g),l?{x:p*u,y:h*d}:{x:h*d,y:p*u}}function en(){return"undefined"!=typeof window}function er(e){return es(e)?(e.nodeName||"").toLowerCase():"#document"}function eo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ea(e){var t;return null==(t=(es(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function es(e){return!!en()&&(e instanceof Node||e instanceof eo(e).Node)}function el(e){return!!en()&&(e instanceof Element||e instanceof eo(e).Element)}function ed(e){return!!en()&&(e instanceof HTMLElement||e instanceof eo(e).HTMLElement)}function eu(e){return!!en()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof eo(e).ShadowRoot)}function ec(e){let{overflow:t,overflowX:i,overflowY:n,display:r}=ey(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&"inline"!==r&&"contents"!==r}function eh(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let ep=/transform|translate|scale|rotate|perspective|filter/,eg=/paint|layout|strict|content/,ef=e=>!!e&&"none"!==e;function em(e){let t=el(e)?ey(e):e;return ef(t.transform)||ef(t.translate)||ef(t.scale)||ef(t.rotate)||ef(t.perspective)||!eb()&&(ef(t.backdropFilter)||ef(t.filter))||ep.test(t.willChange||"")||eg.test(t.contain||"")}function eb(){return null==n&&(n="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),n}function ev(e){return/^(html|body|#document)$/.test(er(e))}function ey(e){return eo(e).getComputedStyle(e)}function ex(e){return el(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ew(e){if("html"===er(e))return e;let t=e.assignedSlot||e.parentNode||eu(e)&&e.host||ea(e);return eu(t)?t.host:t}function eE(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);let r=function e(t){let i=ew(t);return ev(i)?(t.ownerDocument||t).body:ed(i)&&ec(i)?i:e(i)}(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=eo(r);if(!o)return t.concat(r,eE(r,[],i));{let e=ek(a);return t.concat(a,a.visualViewport||[],ec(r)?r:[],e&&i?eE(e):[])}}function ek(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eT(e){let t=ey(e),i=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=ed(e),o=r?e.offsetWidth:i,a=r?e.offsetHeight:n,s=A(i)!==o||A(n)!==a;return s&&(i=o,n=a),{width:i,height:n,$:s}}function eO(e){return el(e)?e:e.contextElement}function eC(e){let t=eO(e);if(!ed(t))return L(1);let i=t.getBoundingClientRect(),{width:n,height:r,$:o}=eT(t),a=(o?A(i.width):i.width)/n,s=(o?A(i.height):i.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let eI=L(0);function eS(e){let t=eo(e);return eb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eI}function eP(e,t,i,n){var r;void 0===t&&(t=!1),void 0===i&&(i=!1);let o=e.getBoundingClientRect(),a=eO(e),s=L(1);t&&(n?el(n)&&(s=eC(n)):s=eC(e));let l=(void 0===(r=i)&&(r=!1),n&&r&&n===eo(a))?eS(a):L(0),d=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,c=o.width/s.x,h=o.height/s.y;if(a&&n){let e=eo(a),t=el(n)?eo(n):n,i=e,r=ek(i);for(;r&&t!==i;){let e=eC(r),t=r.getBoundingClientRect(),n=ey(r),o=t.left+(r.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(n.paddingTop))*e.y;d*=e.x,u*=e.y,c*=e.x,h*=e.y,d+=o,u+=a,r=ek(i=eo(r))}}return Y({width:c,height:h,x:d,y:u})}function e$(e,t){let i=ex(e).scrollLeft;return t?t.left+i:eP(ea(e)).left+i}function eN(e,t){let i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-e$(e,i),y:i.top+t.scrollTop}}function eA(e,t,i){let n;if("viewport"===t||"layoutViewport"===t)n=function(e,t,i){void 0===i&&(i="viewport");let n="layoutViewport"===i,r=eo(e),o=ea(e),a=r.visualViewport,s=o.clientWidth,l=o.clientHeight,d=0,u=0;if(a){let e=!eb()||"fixed"===t;n?e||(d=-a.offsetLeft,u=-a.offsetTop):(s=a.width,l=a.height,e&&(d=a.offsetLeft,u=a.offsetTop))}if(0>=e$(o)){let e=o.ownerDocument,t=e.body,i=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(o.clientWidth-t.clientWidth-n),a="stable both-edges"===getComputedStyle(o).scrollbarGutter?r/2:r;a<=25&&(s-=a)}return{width:s,height:l,x:d,y:u}}(e,i,t);else if("document"===t)n=function(e){let t=ex(e),i=e.ownerDocument.body,n=N(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=N(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),o=-t.scrollLeft+e$(e),a=-t.scrollTop;return"rtl"===ey(i).direction&&(o+=N(e.clientWidth,i.clientWidth)-n),{width:n,height:r,x:o,y:a}}(ea(e));else if(el(t))n=function(e,t){let i=eP(e,!0,"fixed"===t),n=i.top+e.clientTop,r=i.left+e.clientLeft,o=eC(e),a=e.clientWidth*o.x,s=e.clientHeight*o.y;return{width:a,height:s,x:r*o.x,y:n*o.y}}(t,i);else{let i=eS(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Y(n)}function eR(e){return"static"===ey(e).position}function eL(e,t){if(!ed(e)||"fixed"===ey(e).position)return null;if(t)return t(e);let i=e.offsetParent;return ea(e)===i&&(i=i.ownerDocument.body),i}function eV(e,t){var i;let n=eo(e);if(eh(e))return n;if(!ed(e)){let t=ew(e);for(;t&&!ev(t);){if(el(t)&&!eR(t))return t;t=ew(t)}return n}let r=eL(e,t);for(;r&&(i=r,/^(table|td|th)$/.test(er(i)))&&eR(r);)r=eL(r,t);return r&&ev(r)&&eR(r)&&!em(r)?n:r||function(e){let t=ew(e);for(;ed(t)&&!ev(t);){if(em(t))return t;if(eh(t))break;t=ew(t)}return null}(e)||n}let eF=async function(e){let t=this.getOffsetParent||eV,i=this.getDimensions,n=await i(e.floating);return{reference:function(e,t,i){let n=ed(t),r=ea(t),o="fixed"===i,a=eP(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=L(0);if((n||!o)&&(("body"!==er(t)||ec(r))&&(s=ex(t)),n)){let e=eP(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}!n&&r&&(l.x=e$(r));let d=!r||n||o?L(0):eN(r,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eD={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:r}=e,o="fixed"===r,a=ea(n),s=!!t&&eh(t.floating);if(n===a||s&&o)return i;let l={scrollLeft:0,scrollTop:0},d=L(1),u=L(0),c=ed(n);if((c||!o)&&(("body"!==er(n)||ec(a))&&(l=ex(n)),c)){let e=eP(n);d=eC(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}let h=!a||c||o?L(0):eN(a,l);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+u.x+h.x,y:i.y*d.y-l.scrollTop*d.y+u.y+h.y}},getDocumentElement:ea,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:r}=e,o=[..."clippingAncestors"===i?eh(t)?[]:function(e,t){let i=t.get(e);if(i)return i;let n=eE(e,[],!1).filter(e=>el(e)&&"body"!==er(e)),r=null,o="fixed"===ey(e).position,a=o?ew(e):e;for(;el(a)&&!ev(a);){let e=ey(a),t=em(a),i=r?r.position:o?"fixed":"";t||"fixed"!==i&&("absolute"!==i||"static"!==e.position)?r=e:n=n.filter(e=>e!==a),a=ew(a)}return t.set(e,n),n}(t,this._c):[].concat(i),n],a=eA(t,o[0],r),s=a.top,l=a.right,d=a.bottom,u=a.left;for(let e=1;e<o.length;e++){let i=eA(t,o[e],r);s=N(i.top,s),l=$(i.right,l),d=$(i.bottom,d),u=N(i.left,u)}return{width:l-u,height:d-s,x:u,y:s}},getOffsetParent:eV,getElementRects:eF,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:i}=eT(e);return{width:t,height:i}},getScale:eC,isElement:el,isRTL:function(e){return"rtl"===ey(e).direction}};function eM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var ez=i(7776),eH=i(3542),eB=i(2828),e_=i(5034);function eU(e=0,t=0,i=0,n=0){if("function"==typeof DOMRect)return new DOMRect(e,t,i,n);let r={x:e,y:t,width:i,height:n,top:t,right:e+i,bottom:t+n,left:e};return{...r,toJSON:()=>r}}let eG=e=>({variable:e,reference:`var(${e})`}),ej={arrowSize:eG("--arrow-size"),arrowSizeHalf:eG("--arrow-size-half"),arrowBg:eG("--arrow-background"),transformOrigin:eG("--transform-origin"),arrowOffset:eG("--arrow-offset")},eW={name:"rects",fn:({rects:e})=>({data:e})};function eK(e){return e.split("-")[0]}let eq={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function eY(e,t){let i=e.devicePixelRatio||1;return Math.round(t*i)/i}function eX(e,t){return null!=e&&.5>Math.abs(e-t)}function eJ(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}let eQ=["transform","visibility","pointer-events","--x","--y","--z-index","z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],eZ=["top","right","bottom","left"],e0=new WeakSet;function e1(e,t){if(!e)return e_.lQ;let i=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{i.forEach((t,i)=>{t?e.style.setProperty(i,t):e.style.removeProperty(i)}),0===e.style.length&&e.removeAttribute("style")}}function e2(e){return null==e?null:(0,y.sb)(e)?e:"object"==typeof e&&e&&"contextElement"in e&&e.contextElement?e.contextElement:e}function e5(e,t,i={}){let{defer:n,...r}=i,o=n?w.er:e=>e(),a=[];return a.push(o(()=>{a.push(function(e,t,i={}){var n;let r,o,a,s,l,d,u=()=>("function"==typeof t?t():t)??null,c=()=>{let t="function"==typeof e?e():e;return i.getAnchorElement?.()??t},h=()=>{var e;let t=c();return t||i.getAnchorRect?(e=i.getAnchorRect,{contextElement:(0,y.sb)(t)?t:t?.contextElement,getBoundingClientRect:()=>{let i=e?.(t);if(i||!t){if(!i)return eU();let{x:e,y:t,width:n,height:r}=i;return eU(e,t,n,r)}return t.getBoundingClientRect()}}):null},p=Object.assign({},eq,i),g=[],f=null,{placement:m,strategy:b,onComplete:v,onPositioned:x}=p,w=!1,E=e_.lQ,k=(n=p.listeners)?!0===n?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:n:{};async function T(){!function(){if(!p.listeners)return;let e=c(),t=h(),i=u();t&&i&&(e2(e)!==e2(l)||i!==d)&&(E(),l=e,d=i,E=function(e,t,i,n){let r;void 0===n&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,u=eO(e),c=o||a?[...u?eE(u):[],...t?eE(t):[]]:[];c.forEach(e=>{o&&e.addEventListener("scroll",i),a&&e.addEventListener("resize",i)});let h=u&&l?function(e,t,i){let n,r=null,o=ea(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}function s(i,l){void 0===i&&(i=!1),void 0===l&&(l=1),a();let d=e.getBoundingClientRect(),{left:u,top:c,width:h,height:p}=d;if(i||t(),!h||!p)return;let g=R(c),f=R(o.clientWidth-(u+h)),m={rootMargin:-g+"px "+-f+"px "+-R(o.clientHeight-(c+p))+"px "+-R(u)+"px",threshold:N(0,$(1,l))||1},b=!0;function v(t){let i=t[0].intersectionRatio;if(!eM(d,e.getBoundingClientRect()))return s();if(i!==l){if(!b)return s();i?s(!1,i):n=setTimeout(()=>{s(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}let l=eo(e),d=()=>s(i);return l.addEventListener("resize",d),s(!0),()=>{l.removeEventListener("resize",d),a()}}(u,i,a):null,p=-1,g=null;s&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),i()}),u&&!d&&g.observe(u),t&&g.observe(t));let f=d?eP(e):null;return d&&function t(){let n=eP(e);f&&!eM(f,n)&&i(),f=n,r=requestAnimationFrame(t)}(),i(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",i),a&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,d&&cancelAnimationFrame(r)}}(t,i,O,k))}();let e=u();if(!e)return;e!==f&&(!function(e){var t,i;let n;if(r?.(),o?.(),f=e,p.restoreStyles){let t=e1(e,eQ);r=()=>{t(),e0.delete(e)}}else r=void 0;let a=e.querySelector("[data-part=arrow]");o=p.restoreStyles?e1(a,eZ):void 0,g=[function(e,t){if(!(0,eH.kZ)(t.offset??t.gutter)){var i;return void 0===(i=({placement:i})=>{let n=(e?.clientHeight||0)/2,r=t.offset?.mainAxis??t.gutter,{hasAlign:o}=function(e){let[t,i]=e.split("-");return{side:t,align:i,hasAlign:null!=i}}(i),a=o?void 0:t.shift,s=t.offset?.crossAxis??a;return(0,eB.oE)({crossAxis:s,mainAxis:"number"==typeof r?r+n:r??n,alignmentAxis:t.shift})})&&(i=0),{name:"offset",options:i,async fn(e){var t,n;let{x:r,y:o,placement:a,middlewareData:s}=e,l=await ei(e,i);return a===(null==(t=s.offset)?void 0:t.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:a}}}}}}(a,p),function(e){if(e.flip){var t;return void 0===(t=()=>{let t=eJ(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip}})&&(t={}),{name:"flip",options:t,async fn(e){var i,n,r,o,a;let{placement:s,middlewareData:l,rects:d,initialPlacement:u,platform:c,elements:h}=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=F(t,e);if(null!=(i=l.arrow)&&i.alignmentOffset)return{};let x=D(s),w=B(u),E=D(u)===u,k=await (null==c.isRTL?void 0:c.isRTL(h.floating)),T=f||(E||!v?[K(u)]:function(e){let t=K(e);return[_(e),t,_(t)]}(u)),O="none"!==b;!f&&O&&T.push(...function(e,t,i,n){let r=M(e),o=function(e,t,i){switch(e){case"top":case"bottom":if(i)return t?G:U;return t?U:G;case"left":case"right":return t?j:W;default:return[]}}(D(e),"start"===i,n);return r&&(o=o.map(e=>e+"-"+r),t&&(o=o.concat(o.map(_)))),o}(u,v,b,k));let C=[u,...T],I=await c.detectOverflow(e,y),S=[],P=(null==(n=l.flip)?void 0:n.overflows)||[];if(p&&S.push(I[x]),g){let e=function(e,t,i){void 0===i&&(i=!1);let n=M(e),r=z(B(e)),o=H(r),a="x"===r?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=K(a)),[a,K(a)]}(s,d,k);S.push(I[e[0]],I[e[1]])}if(P=[...P,{placement:s,overflows:S}],!S.every(e=>e<=0)){let e=((null==(r=l.flip)?void 0:r.index)||0)+1,t=C[e];if(t&&("alignment"!==g||w===B(t)||P.every(e=>B(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:P},reset:{placement:t}};let i=null==(o=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!i)switch(m){case"bestFit":{let e=null==(a=P.filter(e=>{if(O){let t=B(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(i=e);break}case"initialPlacement":i=u}if(s!==i)return{reset:{placement:i}}}return{}}}}}(p),function(e){if(e.slide||e.overlap){var t;return void 0===(t=()=>{var t;let i=eJ(e.boundary);return{...i?{boundary:i}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:(void 0===t&&(t={}),{options:t,fn(e){var i,n,r,o;let{x:a,y:s,placement:l,rects:d,middlewareData:u}=e,{offset:c=0,mainAxis:h=!0,crossAxis:p=!0}=F(t,e),g={x:a,y:s},f=B(l),m=z(f),b=g[m],v=g[f],y=F(c,e),x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:null!=(i=y.mainAxis)?i:0,crossAxis:null!=(n=y.crossAxis)?n:0};if(h){let e="y"===m?"height":"width",t=d.reference[m]-d.floating[e]+x.mainAxis,i=d.reference[m]+d.reference[e]-x.mainAxis;b<t?b=t:b>i&&(b=i)}if(p){let e="y"===m?"width":"height",t=et.has(D(l)),i=d.reference[f]-d.floating[e]+(t&&(null==(r=u.offset)?void 0:r[f])||0)+(t?0:x.crossAxis),n=d.reference[f]+d.reference[e]+(t?0:(null==(o=u.offset)?void 0:o[f])||0)-(t?x.crossAxis:0);v<i?v=i:v>n&&(v=n)}return{[m]:b,[f]:v}}})}})&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:n,placement:r,platform:o}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...d}=F(t,e),u={x:i,y:n},c=await o.detectOverflow(e,d),h=B(r),p=z(h),g=u[p],f=u[h],m=(e,t)=>N(t+c["y"===e?"top":"left"],$(t,t-c["y"===e?"bottom":"right"]));a&&(g=m(p,g)),s&&(f=m(h,f));let b=l.fn({...e,[p]:g,[h]:f});return{...b,data:{x:b.x-i,y:b.y-n,enabled:{[p]:a,[h]:s}}}}}}}(p),(t=e.ownerDocument,{name:"arrow",options:n={element:a||t.createElement("div"),padding:p.arrowPadding},async fn(e){let{x:t,y:i,placement:r,rects:o,platform:a,elements:s,middlewareData:l}=e,{element:d,padding:u=0}=F(n,e)||{};if(null==d)return{};let c=q(u),h={x:t,y:i},p=z(B(r)),g=H(p),f=await a.getDimensions(d),m="y"===p,b=m?"clientHeight":"clientWidth",v=o.reference[g]+o.reference[p]-h[p]-o.floating[g],y=h[p]-o.reference[p],x=await (null==a.getOffsetParent?void 0:a.getOffsetParent(d)),w=x?x[b]:0;w&&await (null==a.isElement?void 0:a.isElement(x))||(w=s.floating[b]||o.floating[g]);let E=w/2-f[g]/2-1,k=$(c[m?"top":"left"],E),T=$(c[m?"bottom":"right"],E),O=w-f[g]-T,C=w/2-f[g]/2+(v/2-y/2),I=N(k,$(C,O)),S=!l.arrow&&null!=M(r)&&C!==I&&o.reference[g]/2-(C<k?k:T)-f[g]/2<0,P=S?C<k?C-k:C-O:0;return{[p]:h[p]+P,data:{[p]:I,centerOffset:C-I-P,...S&&{alignmentOffset:P}},reset:S}}}),(e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:i}){if(!i.arrow)return{};let{x:n,y:r}=i.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=n?`${n}px`:"",top:null!=r?`${r}px`:"",[o]:`calc(100% + ${ej.arrowOffset.reference})`}),{}}}})(a),(i={gutter:p.gutter,offset:p.offset,overlap:p.overlap},{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:s}=e,l=r.split("-")[0],d=n.arrow?.x||0,u=n.arrow?.y||0,c=a?.clientWidth||0,h=a?.clientHeight||0,p=d+c/2,g=u+h/2,f=Math.abs(n.shift?.y||0),m=o.reference.height/2,b=h/2,v=i.offset?.mainAxis??i.gutter,y="number"==typeof v?v+b:v??b,x=f>y,w={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[l],E=`${p}px ${o.reference.y+m-s}px`,k=!!i.overlap&&"y"==("top"===l||"bottom"===l?"y":"x")&&x;return t.floating.style.setProperty(ej.transformOrigin.variable,k?E:w),{data:{transformOrigin:k?E:w}}}}),function(e){let t,i,n,r;if(!1!==e.sizeMiddleware||e.sameWidth||e.fitViewport){var o;return void 0===(o=()=>{let o=eJ(e.boundary);return{padding:e.overflowPadding,...o?{boundary:o}:void 0,apply({elements:e,rects:o,availableHeight:a,availableWidth:s}){let l=e.floating,d=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),a=Math.floor(a),eX(t,d)||(l.style.setProperty("--reference-width",`${d}px`),t=d),eX(i,u)||(l.style.setProperty("--reference-height",`${u}px`),i=u),eX(n,s)||(l.style.setProperty("--available-width",`${s}px`),n=s),eX(r,a)||(l.style.setProperty("--available-height",`${a}px`),r=a)}}})&&(o={}),{name:"size",options:o,async fn(e){let t,i,{placement:n,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...d}=F(o,e),u=await a.detectOverflow(e,d),c=D(n),h=M(n),p="y"===B(n),{width:g,height:f}=r.floating;"top"===c||"bottom"===c?(t=c,i=h===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(i=c,t="end"===h?"top":"bottom");let m=f-u.top-u.bottom,b=g-u.left-u.right,v=$(f-u[t],m),y=$(g-u[i],b),x=e.middlewareData.shift,w=!x,E=v,k=y;null!=x&&x.enabled.x&&(k=b),null!=x&&x.enabled.y&&(E=m),w&&!h&&(p?k=g-2*N(u.left,u.right):E=f-2*N(u.top,u.bottom)),await l({...e,availableWidth:k,availableHeight:E});let T=await a.getDimensions(s.floating);return g!==T.width||f!==T.height?{reset:{rects:!0}}:{}}}}}(p),function(e){if(e.hideWhenDetached){var t;return void 0===(t=()=>({strategy:"referenceHidden",boundary:eJ(e.boundary)??"clippingAncestors"}))&&(t={}),{name:"hide",options:t,async fn(e){let{rects:i,platform:n}=e,{strategy:r="referenceHidden",...o}=F(t,e);switch(r){case"referenceHidden":{let t=Z(await n.detectOverflow(e,{...o,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:ee(t)}}}case"escaped":{let t=Z(await n.detectOverflow(e,{...o,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:ee(t)}}}default:return{}}}}}}(p),eW]}(e),w=!1);let t=h();if(!t)return;let i=await ((e,t,i)=>{let n=new Map,r=null!=i?i:{},o={...eD,...r.platform,_c:n};return Q(e,t,{...r,platform:o})})(t,e,{placement:m,middleware:g,strategy:b}),n=(0,y.zk)(e),x=eY(n,i.x),T=eY(n,i.y);if(v?.({...i,x,y:T}),!1!==p.applyStyles&&(eX(a,x)||(e.style.setProperty("--x",`${x}px`),a=x),eX(s,T)||(e.style.setProperty("--y",`${T}px`),s=T),p.hideWhenDetached&&(i.middlewareData.hide?.referenceHidden?(e.style.setProperty("visibility","hidden"),e.style.setProperty("pointer-events","none")):(e.style.removeProperty("visibility"),e.style.removeProperty("pointer-events"))),!w)){let t=e.firstElementChild;t&&(!function(e,t){let i=e.style.getPropertyValue("z-index"),n=e0.has(e),r=n&&"var(--z-index)"===i;n&&!r&&e0.delete(e);let o=(0,ez.L)(t).zIndex;if("auto"===o){r&&(e.style.removeProperty("z-index"),e0.delete(e));return}(!i||r)&&(e.style.setProperty("--z-index",o),e.style.setProperty("z-index","var(--z-index)"),e0.add(e))}(e,t),w=!0)}}async function O(){i.updatePosition?(await i.updatePosition({updatePosition:T,floatingElement:u()}),x?.({placed:!0})):await T()}return O(),()=>{E(),o?.(),r?.(),x?.({placed:!1})}}(e,t,r))})),()=>{a.forEach(e=>e?.())}}let e4=(e,t)=>({x:e,y:t});function e8(e,t){let{x:i,y:n}=t,r=!1;for(let t=0,o=e.length-1;t<e.length;o=t++){let a=e[t].x,s=e[t].y,l=e[o].x,d=e[o].y;s>n!=d>n&&i<(l-a)*(n-s)/(d-s)+a&&(r=!r)}return r}var e3=i(853),e6=i(2577),e7=i(3998),e9=i(3926);let te=(e,t)=>{let i=e.ids?.trigger;return null!=i?(0,eH.Tn)(i)?i(t):i:t?`menu:${e.id}:trigger:${t}`:`menu:${e.id}:trigger`},tt=(e,t)=>{let i=e.ids?.contextTrigger;return null!=i?(0,eH.Tn)(i)?i(t):i:t?`menu:${e.id}:ctx-trigger:${t}`:`menu:${e.id}:ctx-trigger`},ti=e=>e.ids?.content??`menu:${e.id}:content`,tn=e=>e.ids?.positioner??`menu:${e.id}:popper`,tr=(e,t)=>`${e.id}/${t}`,to=e=>e?.dataset.value??null,ta=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,ts=e=>e.getById(ti(e)),tl=e=>e.getById(tn(e)),td=e=>e.getById(te(e)),tu=e=>(0,e6.YG)(e.getRootNode(),`[data-scope="menu"][data-part="trigger"]${(0,e7.iG)(e.id)}`),tc=e=>(0,e6.YG)(e.getRootNode(),`[data-scope="menu"][data-part="context-trigger"]${(0,e7.iG)(e.id)}`),th=(e,t)=>null==t?td(e)??tu(e)[0]:e.getById(te(e,t)),tp=e=>{let t=`[role^="menuitem"]${(0,e7.iG)(ti(e))}:not([data-disabled])`;return(0,e6.YG)(ts(e),t)},tg=(e,t)=>!!t&&(e.id===t||e.dataset.value===t),tf=e=>(0,y.sb)(e)&&(""===e.dataset.disabled||e.hasAttribute("disabled")),tm=e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("data-controls"),tb="menu:select";function tv(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function ty(e,t){e&&(e.refs.set("pointerRoutingLocked",t),e.context.set("pointerRoutingMode",t?"locked":"interactive"))}function tx(e){let t=e.context.get("highlightedValue");if(!t)return!1;let i=e.refs.get("children");for(let e in i){let n=i[e];if(n.state.hasTag("open")&&te(n.scope)===t)return!0}return!1}let{not:tw,and:tE,or:tk}=(0,b.b6)(),tT=[{guard:"isOpenControlled",actions:["setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setTriggerValue","invokeOnOpen"]}],tO=[{guard:"isOpenControlled",actions:["invokeOnClose","releaseParentRoutingLock"]},{target:"closed",actions:["invokeOnClose","releaseParentRoutingLock","focusTrigger"]}],tC={target:"closed",actions:["invokeOnClose","releaseParentRoutingLock","focusTrigger"]},tI=(0,b.Op)({props:({props:e})=>({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(e){!function(e,t){let i=E(t),n=i.metaKey||i.ctrlKey||i.shiftKey||i.altKey,r=()=>{let t=(0,y.zk)(e);n&&(0,x.Tc)()&&(0,x.cX)()&&!(0,x.bh)()?e.dispatchEvent(new t.KeyboardEvent("keydown",{keyIdentifier:"Enter",...i})):e.dispatchEvent(new t.MouseEvent("click",i))};(0,x.gm)()?(0,w.nz)(e,"keyup",r):queueMicrotask(r)}(e.node,e.modifiers)},...e,positioning:{placement:"bottom-start",gutter:8,...e.positioning}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"idle",context:({bindable:e,prop:t,scope:i})=>({highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(e){t("onHighlightChange")?.({highlightedValue:e})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash:e=>`x: ${e?.x}, y: ${e?.y}`})),isSubmenu:e(()=>({defaultValue:!1})),triggerValue:e(()=>({defaultValue:t("defaultTriggerValue")??null,value:t("triggerValue"),onChange(e){let n=t("onTriggerValueChange");n&&n({value:e,triggerElement:th(i,e)})}})),pointerRoutingMode:e(()=>({defaultValue:"interactive"}))}),refs:()=>({parent:null,children:{},pointerRoutingLocked:!1,typeaheadState:{...k.t.defaultOptions},positioningOverride:{},focusMenuFrame:w.KP.create(),returnFocusFrame:w.KP.create(),returnFocusEl:null}),exit:["cancelFocusMenu","cancelReturnFocus"],computed:{isRtl:({prop:e})=>"rtl"===e("dir"),isTypingAhead:({refs:e})=>""!==e.get("typeaheadState").keysSoFar,highlightedId:({context:e,scope:t,refs:i})=>(function(e,t,i){let n=Object.keys(e).length>0;if(!t)return null;if(!n)return tr(i,t);for(let i in e){let n=te(e[i].scope);if(n===t)return n}return tr(i,t)})(i.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:i,prop:n}){e([()=>i.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>i.hash("anchorPoint")],()=>{i.get("anchorPoint")&&t(["reposition"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},on:{"TRIGGER_VALUE.SET":{actions:["setTriggerValue","setAnchorPoint","reposition","focusMenu"]},"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setTriggerValue","highlightFirstItem","invokeOnOpen"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED.SUGGEST":{actions:["suggestHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},OPEN:tT,CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],TRIGGER_FOCUS:{guard:tw("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{OPEN:tT,CLOSE:tC,"CONTROLLED.OPEN":{target:"open",actions:["reposition"]},"CONTROLLED.CLOSE":{target:"closed",actions:["focusTrigger"]},CONTEXT_MENU_CANCEL:tC,"LONG_PRESS.OPEN":[{guard:"isOpenControlled",target:"opening:requested",actions:["setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setTriggerValue","invokeOnOpen","reposition"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{OPEN:tT,CLOSE:tC,"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusTrigger"]},BLUR:tC,TRIGGER_POINTERLEAVE:tC,"DELAY.OPEN":[{guard:"isOpenControlled",target:"opening:requested",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},"opening:requested":{tags:["closed"],on:{CLOSE:tC,"CONTROLLED.OPEN":{target:"open",actions:["reposition"]},"CONTROLLED.CLOSE":{target:"closed",actions:["focusTrigger"]}}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{OPEN:tT,CLOSE:tO,"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose","releaseParentRoutingLock"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose","releaseParentRoutingLock"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose","releaseParentRoutingLock"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","unlockParentOnClose","clearAnchorPoint","clearReturnFocusEl"],exit:["cancelReturnFocus"],on:{OPEN:tT,"CONTROLLED.OPEN":[{guard:tk("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","setReturnFocusEl","setTriggerValue","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setTriggerValue","highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["setTriggerValue","invokeOnOpen"]},{target:"open",actions:["setTriggerValue","highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackFocusVisible","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","unlockParentOnOpen"],exit:["cancelFocusMenu"],on:{CLOSE:tO,"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed",actions:["focusTrigger"]}],TRIGGER_CLICK:[{guard:tE(tw("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose","releaseParentRoutingLock"]},{guard:tw("isTriggerItem"),target:"closed",actions:["invokeOnClose","releaseParentRoutingLock","focusTrigger"]}],CONTEXT_MENU:{actions:["setAnchorPoint","setTriggerValue","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:tE("isSubmenu","isOpenControlled"),actions:["invokeOnClose","releaseParentRoutingLock"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose","releaseParentRoutingLock"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:tw("isPointerRoutingLocked"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:tE(tw("isPointerRoutingLocked"),tw("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:tE(tw("isTriggerItemHighlighted"),tw("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose","releaseParentRoutingLock"]},{guard:tE(tw("isTriggerItemHighlighted"),tw("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose","releaseParentRoutingLock","focusTrigger"]},{guard:tE(tw("isTriggerItemHighlighted"),tw("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e("closeOnSelect")),isTriggerItem:({event:e})=>tm(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:i})=>!!(e.target??t.getById(i("highlightedId")))?.hasAttribute("data-controls"),isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerRoutingLocked:({refs:e})=>e.get("pointerRoutingLocked"),isHighlightedItemEditable:({scope:e,computed:t})=>(0,y.fg)(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>void 0!==e("open"),isArrowLeftEvent:({event:e})=>e.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:({event:e})=>e.previousEvent?.type==="ARROW_UP",isArrowDownEvent:({event:e})=>e.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type==="OPEN_AUTOFOCUS"},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackFocusVisible:({scope:e})=>(0,S.Yy)({root:e.getRootNode?.()}),trackPositioning({context:e,prop:t,scope:i,refs:n}){if(i.getById(tt(i))||tc(i).length>0)return;let r={...t("positioning"),...n.get("positioningOverride")};return e.set("currentPlacement",r.placement),e5(()=>th(i,e.get("triggerValue")),()=>tl(i),{...r,defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})},trackInteractOutside({refs:e,scope:t,prop:i,context:n,send:r}){let o=!0,a=e=>tc(t).some(t=>(0,y.gR)(t,e));return(0,v.u)(()=>ts(t),{type:"menu",defer:!0,getRootNode:t.getRootNode,layerStyleTargets:[()=>tl(t)],exclude:[td(t),...tu(t)].filter(Boolean),onInteractOutside:i("onInteractOutside"),onRequestDismiss:i("onRequestDismiss"),onFocusOutside(t){i("onFocusOutside")?.(t);let n=(0,T.wt)(t.detail.originalEvent);if(a(n)||function e(t,i){if(!(0,y.sb)(t))return!1;for(let n in i){let r=i[n],o=function(e){let t=ti(e);return ts(e)??e.getDoc().getElementById(t)}(r.scope);if(o&&(0,y.gR)(o,t))return!0;let a=r.refs.get("children");if(Object.keys(a).length>0&&e(t,a))return!0}return!1}(n,e.get("children")))return void t.preventDefault()},onEscapeKeyDown(t){i("onEscapeKeyDown")?.(t),n.get("isSubmenu")&&t.preventDefault(),tv({parent:e.get("parent")})},onPointerDownOutside(e){if(i("onPointerDownOutside")?.(e),a((0,T.wt)(e.detail.originalEvent))&&e.detail.contextmenu)return void e.preventDefault();o=!e.detail.focusable},onDismiss(){r({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},trackPointerMove({context:e,scope:t,send:i,refs:n}){let r=n.get("parent");if(!r)return;ty(r,!0);let o=t.getDoc();return(0,T.kn)(o,"pointermove",t=>{var n,o;n=e.get("intentPolygon"),o={x:t.clientX,y:t.clientY},n&&e8(n,o)||(i({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),ty(r,!1))})},scrollToHighlightedItem({scope:e,computed:t}){let i=()=>{if("pointer"===(0,S.ME)())return;let i=e.getById(t("highlightedId")),n=ts(e);(0,O.rx)(i,{rootEl:n})},n=(0,w.er)(()=>{(0,S.Cl)("virtual"),i()}),r=(0,C.mx)(()=>ts(e),{defer:!0,attributes:["aria-activedescendant"],callback:i});return()=>{n(),r()}}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",e=>(0,e3.n)(e,t.point)?e:t.point)},setReturnFocusEl({scope:e,refs:t}){t.set("returnFocusEl",e.getActiveElement())},clearReturnFocusEl({refs:e}){e.set("returnFocusEl",null)},setSubmenuPlacement({context:e,computed:t,refs:i}){if(!e.get("isSubmenu"))return;let n=t("isRtl")?"left-start":"right-start";i.set("positioningOverride",{placement:n,gutter:0})},reposition({context:e,scope:t,prop:i,event:n,refs:r}){let o=n.point??e.get("anchorPoint"),a={...i("positioning"),...r.get("positioningOverride")},s=n.value??e.get("triggerValue");e5(()=>th(t,s),()=>tl(t),{...a,defer:!0,getAnchorRect:o?()=>({width:0,height:0,...o}):void 0,...n.options??{},listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:i,type:n}=e.option;"radio"===n?i?.(!0):"checkbox"===n&&i?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:i,context:n,event:r,send:o}){let a=e.getById(t("highlightedId"));if(!a||a.dataset.disabled)return;let s=n.get("highlightedValue");if((0,y.IR)(a)){let e=E(r.modifiers);i("navigate")?.({value:s,node:a,href:a.href,modifiers:e});let t={currentTarget:a,button:0,...e};if((0,T.$b)(t)||(0,T.b9)(t))return;o({type:"ITEM_CLICK",target:a,id:a.id,value:s,closeOnSelect:(e=>{let t=e.dataset.closeOnSelect;return null==t?void 0:"true"===t})(a),modifiers:e})}else{let e=(0,y.zk)(a),t={bubbles:!0,cancelable:!0,composed:!0,...E(r.modifiers)};queueMicrotask(()=>a.dispatchEvent(new e.MouseEvent("click",t)))}},setIntentPolygon({context:e,scope:t,event:i}){let n=ts(t),r=e.get("currentPlacement");if(!n||!r)return;let o=function(e,t){let i=function(e){let{x:t,y:i,width:n,height:r}=e,o=t+n/2,a=i+r/2;return{x:t,y:i,width:n,height:r,minX:t,minY:i,maxX:t+n,maxY:i+r,midX:o,midY:a,center:e4(o,a)}}(e),{top:n,right:r,left:o,bottom:a}={top:e4(i.minX,i.minY),right:e4(i.maxX,i.minY),bottom:e4(i.maxX,i.maxY),left:e4(i.minX,i.maxY)},[s]=t.split("-");return({top:[o,n,r,a],right:[n,r,a,o],bottom:[n,o,a,r],left:[r,n,o,a]})[s]}(n.getBoundingClientRect(),r);if(!o)return;let a="right"===eK(r)?-5:5;e.set("intentPolygon",[{...i.point,x:i.point.x+a},...o])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},unlockParentOnOpen({refs:e,context:t,scope:i}){let n=e.get("parent");if(t.get("isSubmenu")){let e=te(i);n?.send({type:"HIGHLIGHTED.SUGGEST",value:e})}ty(n,!1)},unlockParentOnClose({refs:e,context:t}){var i,n;i=e.get("parent"),n=t.get("isSubmenu"),!(!i||i.refs.get("pointerRoutingLocked"))&&(n&&tx(i)||ty(i,!1))},setHighlightedItem({context:e,event:t}){let i=t.value||to(t.target);e.set("highlightedValue",i)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e,refs:t,prop:i}){t.get("focusMenuFrame").request(()=>{let t=ts(e),n=(0,I.R)({root:t,getInitialEl:i("initialFocusEl"),enabled:!(0,y.gR)(t,e.getActiveElement()),filter:e=>!e.role?.startsWith("menuitem")});n&&n.focus({preventScroll:!0})})},cancelFocusMenu({refs:e}){e.get("focusMenuFrame").cancel()},highlightFirstItem({context:e,scope:t}){(ts(t)?queueMicrotask:w.er)(()=>{let i=(0,e9.$1)(tp(t));i&&e.set("highlightedValue",to(i))})},highlightLastItem({context:e,scope:t}){(ts(t)?queueMicrotask:w.er)(()=>{let i=(0,e9.HV)(tp(t));i&&e.set("highlightedValue",to(i))})},highlightNextItem({context:e,scope:t,event:i,prop:n}){let r=((e,t)=>{let i=tp(e),n=i.findIndex(e=>tg(e,t.value));return(0,e9.K2)(i,n,{loop:t.loop??t.loopFocus})})(t,{loop:i.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")});e.set("highlightedValue",to(r))},highlightPrevItem({context:e,scope:t,event:i,prop:n}){let r=((e,t)=>{let i=tp(e),n=i.findIndex(e=>tg(e,t.value));return(0,e9.YL)(i,n,{loop:t.loop??t.loopFocus})})(t,{loop:i.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")});e.set("highlightedValue",to(r))},invokeOnSelect({context:e,prop:t,scope:i,event:n}){let r=n.value||to(n.target)||e.get("highlightedValue");null!=r&&(!function(e,t){if(!e)return;let i=new((0,y.zk)(e)).CustomEvent(tb,{detail:{value:t}});e.dispatchEvent(i)}(r?i.getById(tr(i,r)):null,r),t("onSelect")?.({value:r,modifiers:E(n.modifiers)}))},focusTrigger({scope:e,context:t,event:i,refs:n,prop:r}){let o=i.restoreFocus??i.previousEvent?.restoreFocus;if(t.get("isSubmenu")||!1===o)return;let a=()=>r("finalFocusEl")?.();if(t.get("anchorPoint")){let e=n.get("returnFocusEl");n.get("returnFocusFrame").request(()=>{(a()||e)?.focus({preventScroll:!0})});return}queueMicrotask(()=>{(a()||th(e,t.get("triggerValue")))?.focus({preventScroll:!0})})},cancelReturnFocus({refs:e}){e.get("returnFocusFrame").cancel()},highlightMatchedItem({scope:e,context:t,event:i,refs:n}){let r=((e,t)=>{let i=tp(e),n=i.find(e=>tg(e,t.value));return(0,k.t)(i,{state:t.typeaheadState,key:t.key,activeId:n?.id??null})})(e,{key:i.key,value:t.get("highlightedValue"),typeaheadState:n.get("typeaheadState")});r&&t.set("highlightedValue",to(r))},setParentMenu({refs:e,event:t,context:i}){e.set("parent",t.value),i.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let i=e.get("children");i[t.id]=t.value,e.set("children",i)},closeSiblingMenus({refs:e,event:t,scope:i}){let n=t.target;if(!tm(n))return;let r=n?.getAttribute("data-uid"),o=e.get("children");for(let e in o){if(e===r)continue;let n=o[e],a=n.context.get("intentPolygon");a&&t.point&&e8(a,t.point)||(ts(i)?.focus({preventScroll:!0}),n.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){tv({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:i}){let n=t.getById(i("highlightedId"))?.getAttribute("data-uid"),r=e.get("children");(n?r[n]:null)?.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){e.get("parent")?.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",to(t.target))},suggestHighlightedItem({context:e,event:t}){let i=t.value;if(i){if(null!=e.get("highlightedValue"))return void e.set("lastHighlightedValue",i);e.set("highlightedValue",i)}},restoreHighlightedItem({context:e}){let t=e.get("lastHighlightedValue");e.set("lastHighlightedValue",null),t&&e.set("highlightedValue",t)},restoreParentHighlightedItem({refs:e}){e.get("parent")?.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},releaseParentRoutingLock({refs:e,context:t}){if(t.get("isSubmenu")){var i;(i=e.get("parent"))&&(tx(i)||ty(i,!1))}},toggleVisibility({prop:e,event:t,send:i}){i({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})},setTriggerValue({context:e,event:t}){void 0!==t.value&&e.set("triggerValue",t.value)}}}}),tS=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(" "),tP=(...e)=>Array.from(new Set(tS(...e).split(/\s+/).filter(Boolean))).join(" "),t$=/((?:--)?(?:\w+-?)+)\s*:\s*([\s\S]*)/,tN=e=>{let t={},i=e=>{let i=t$.exec(e);i&&(t[i[1]]=i[2])},n=0,r=0,o="",a=!1;for(let t=0;t<e.length;t++){let s=e[t];a?"*"===s&&"/"===e[t+1]&&(a=!1,t++):o?("\\"===s&&t++,s===o&&(o="")):"\\"===s?t++:"/"===s&&"*"===e[t+1]?(a=!0,t++):'"'===s||"'"===s?o=s:"("===s?r++:")"===s&&r?r--:";"!==s||r||(i(e.slice(n,t)),n=t+1)}return i(e.slice(n)),t},tA=(e,t)=>{if((0,eH.Kg)(e)){if((0,eH.Kg)(t))return`${e};${t}`;e=tN(e)}else(0,eH.Kg)(t)&&(t=tN(t));return Object.assign({},e??{},t??{})},tR={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"},tL=(0,i(5397).y)("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem").build();var tV=(0,f.I)({name:"dropdown-menu",parts:["content","item","icon","label","hint","mark","badge","star","switch","arrow","separator"],settings:{radius:g.t.radius.md,"switch-radius":"9px"}}),tF=(0,m.Il)("vela-ui-menu",(0,m.AH)`@layer vela.ui{[data-slot~=dropdown-menu-content]{background:${g.t.surface};color:${g.t.fg};border:1px solid ${g.t.border.strong};border-radius:${tV.vars.radius};box-shadow:${g.t.shadow};min-width:180px;max-height:min(60vh, var(--available-height,60vh));z-index:${g.t.z.menu};outline:2px solid #0000;margin:0;padding:6px;font-size:13px;list-style:none;overflow-y:auto}[data-slot~=dropdown-menu-content][data-state=open]{animation:vela-menu-in ${g.t.dur.fast} ${g.t.ease}}@keyframes vela-menu-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}[data-slot~=dropdown-menu-item]{border-radius:${g.t.radius.sm};cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;align-items:center;gap:10px;padding:7px 10px;display:flex}[data-slot~=dropdown-menu-item][data-highlighted]{background:${g.t.hover}}[data-slot~=dropdown-menu-item][data-disabled]{opacity:.4;cursor:default}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-icon]{width:16px;height:16px;color:${g.t.fg.muted};justify-content:center;font-size:16px}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-label]{flex:auto}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-hint]{color:${g.t.fg.faint};font-size:${g.t.fontSize.sm}}[data-slot~=dropdown-menu-item][data-checked]{background:${g.t.hover.strong};color:${g.t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark]{flex:none;justify-content:center;align-items:center;width:14px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-mark] [data-slot~=dropdown-menu-icon]{width:14px;height:14px;color:${g.t.fg.bright};font-size:14px}[data-slot~=dropdown-menu-item][data-checkmark]{color:${g.t.fg.bright}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]{box-sizing:border-box;border-radius:${g.t.radius.md};background:${g.t.hover};border:1px solid ${g.t.border};width:24px;height:24px;color:${g.t.fg.muted};transition:background ${g.t.dur.fast} ${g.t.ease}, border-color ${g.t.dur.fast} ${g.t.ease}, color ${g.t.dur.fast} ${g.t.ease};flex:none;justify-content:center;align-items:center;padding:3px;display:inline-flex}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge]:empty{background:0 0;border-color:#0000}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-badge] [data-slot~=dropdown-menu-icon]{color:inherit}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-badge]:not(:empty){color:${g.t.fg.bright}}[data-slot~=dropdown-menu-item][data-checked] [data-slot~=dropdown-menu-badge]:not(:empty),[data-slot~=dropdown-menu-item][data-checkmark] [data-slot~=dropdown-menu-badge]:not(:empty){background:color-mix(in srgb, ${g.t.fg.bright} 83%, ${g.t.surface});border-color:color-mix(in srgb, ${g.t.fg.bright} 40%, transparent);color:${g.t.surface}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]{border-radius:${g.t.radius.sm};opacity:0;width:26px;height:22px;transition:opacity ${g.t.dur.fast} ease, background ${g.t.dur.fast} ease;order:98;margin-block:-3px;margin-inline:0 -5px;padding:3px 5px}[data-slot~=dropdown-menu-item][data-highlighted] [data-slot~=dropdown-menu-star]{opacity:.55}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star]:hover{opacity:1;background:${g.t.hover.strong}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-star][data-fav]{opacity:.95;color:${g.t.highlight}}[data-slot~=dropdown-menu-item] [data-slot~=dropdown-menu-arrow]{width:12px;color:${g.t.fg.faint};flex:none;order:99;margin-inline-start:auto;font-size:11px}[data-slot~=dropdown-menu-item][data-state=open]{background:${g.t.hover}}[data-slot~=dropdown-menu-content][data-badges]>[data-slot~=dropdown-menu-item]{padding-block:5px;padding-inline:6px 10px}[data-slot~=dropdown-menu-switch]{border-radius:${tV.vars["switch-radius"]};background:${g.t.surface.overlay};border:1px solid ${g.t.border.soft};width:34px;height:18px;transition:background ${g.t.dur.med} ease, border-color ${g.t.dur.med} ease;flex:none;order:99;margin-inline-start:auto;position:relative}[data-slot~=dropdown-menu-switch]:after{content:"";top:2px;background:${g.t.fg.muted};width:12px;height:12px;transition:transform ${g.t.dur.med} ease, background ${g.t.dur.med} ease;border-radius:50%;position:absolute;inset-inline-start:2px}[data-slot~=dropdown-menu-switch][data-on]{background:${g.t.selected.bg};border-color:${g.t.selected.bg}}[data-slot~=dropdown-menu-switch][data-on]:after{background:${g.t.selected.fg};transform:translate(16px)}[data-slot~=dropdown-menu-separator]{background:${g.t.border};height:1px;margin:4px 6px}}`);function tD(e,t){let i=(0,h.x_)(e,t);return i.dataset.slot=tV.slot("icon"),i}var tM={addFavorite:(0,o.a)("ui.menu.addFavorite","Add to favorites"),removeFavorite:(0,o.a)("ui.menu.removeFavorite","Remove from favorites")},tz=class e{constructor(e,t){this.items=[],this.subs=new Map,this.pinnedAnchor=null,this.shown=!1,this.exit=null,this.doc=e,this.host=t.host,this.onSelect=t.onSelect,this.onFavorite=t.onFavorite,this.i18n=t.i18n,this.checkmarks=!0===t.checkmarks,this.iconBadges=!0===t.iconBadges,this.positioner=e.createElement("div"),this.positioner.className="vela-ui-layer",this.list=e.createElement("ul"),this.list.className="vela-menu",this.list.dataset.slot=tV.slot("content"),t.minWidth&&(this.list.style.minWidth=t.minWidth),this.positioner.appendChild(this.list),this.host.appendChild(this.positioner);let i=t.trigger;this.opener=i??t.opener??null,this.ctrl=function(e){return{machine:tI,props:{id:e.id??(0,u.Ao)("vela-menu"),ids:e.triggerId?{trigger:e.triggerId}:void 0,positioning:{...(0,d.i1)(e,e.placement?(0,d._h)(e.placement):{side:"bottom",align:"start"}),...e.getAnchorRect?{getAnchorRect:()=>e.getAnchorRect()}:{}},onSelect:t=>e.onSelect?.(t.value),onOpenChange:t=>e.onOpenChange?.(t.open)},connect:e=>(function(e,t){let{context:i,send:n,state:r,computed:o,prop:a,scope:s}=e,l=r.hasTag("open"),d=i.get("isSubmenu"),u=o("isTypingAhead"),c=a("composite"),h=i.get("currentPlacement"),p=h?eK(h):void 0,g=i.get("anchorPoint"),f=i.get("highlightedValue"),m=i.get("triggerValue"),b=function(e={}){let{placement:t,sameWidth:i,fitViewport:n,strategy:r="absolute",applyStyles:o=!0}=e;return{arrow:{position:"absolute",width:ej.arrowSize.reference,height:ej.arrowSize.reference,[ej.arrowSizeHalf.variable]:`calc(${ej.arrowSize.reference} / 2)`,[ej.arrowOffset.variable]:`calc(${ej.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?tR[t.split("-")[0]]:void 0,background:ej.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:r,isolation:"isolate",minWidth:i?void 0:"max-content",width:i?"var(--reference-width)":void 0,maxWidth:n?"var(--available-width)":void 0,maxHeight:n?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x, 0), var(--y, -100vh), 0)":"translate3d(0, -100vh, 0)",zIndex:!1===o?"var(--z-index)":void 0}}}({...a("positioning"),placement:h});function v(e){return{id:tr(s,e.value),disabled:!!e.disabled,highlighted:f===e.value}}function x(e){let t=e.valueText??e.value;return{...e,id:e.value,valueText:t}}function w(e){return{...v(x(e)),checked:!!e.checked}}function k(e){let{closeOnSelect:i,valueText:r,value:o}=e,a=v(e),l=tr(s,o);return t.element({...tL.item.attrs,id:l,role:"menuitem","aria-disabled":(0,e7.rq)(a.disabled),"data-disabled":(0,e7.sE)(a.disabled),"data-ownedby":ti(s),"data-highlighted":(0,e7.sE)(a.highlighted),"data-value":o,"data-valuetext":r,"data-close-on-select":null==i?void 0:String(i),onDragStart(e){e.currentTarget.matches("a[href]")&&e.preventDefault()},onPointerMove(e){if(a.disabled||"mouse"!==e.pointerType||"pointer"!==(0,S.ME)())return;let t=e.currentTarget;a.highlighted||n({type:"ITEM_POINTERMOVE",id:l,target:t,closeOnSelect:i,point:(0,T.TH)(e)})},onPointerLeave(e){a.disabled||"mouse"!==e.pointerType||"pointer"!==(0,S.ME)()||n({type:"ITEM_POINTERLEAVE",id:l,target:e.currentTarget,closeOnSelect:i})},onPointerDown(e){a.disabled||n({type:"ITEM_POINTERDOWN",target:e.currentTarget,id:l,closeOnSelect:i})},onClick(e){(0,T.b9)(e)||(0,T.$b)(e)||a.disabled||n({type:"ITEM_CLICK",target:e.currentTarget,id:l,value:o,closeOnSelect:i,modifiers:E(e)})}})}return{highlightedValue:f,open:l,setOpen(e){n({type:e?"OPEN":"CLOSE",replaces:"open"})},triggerValue:m,setTriggerValue(e){n({type:"TRIGGER_VALUE.SET",value:e})},setHighlightedValue(e){n({type:"HIGHLIGHTED.SET",value:e})},setParent(e){n({type:"PARENT.SET",value:e,id:e.prop("id")})},setChild(e){n({type:"CHILD.SET",value:e,id:e.prop("id")})},reposition(e={}){n({type:"POSITIONING.SET",options:e})},addItemListener(e){let t=s.getById(e.id);if(!t)return;let i=()=>e.onSelect?.();return t.addEventListener(tb,i),()=>t.removeEventListener(tb,i)},getContextTriggerProps(e={}){let{value:i}=e,r=null!=i&&m===i,o=tt(s,i);return t.element({...tL.contextTrigger.attrs,dir:a("dir"),id:o,"data-ownedby":s.id,"data-value":i,"data-current":(0,e7.sE)(r),"data-state":l?"open":"closed",onPointerDown(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_START",point:(0,T.TH)(e),value:i})},onPointerCancel(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(e){n({type:l&&null!=i&&!r?"TRIGGER_VALUE.SET":"CONTEXT_MENU",point:(0,T.TH)(e),value:i}),e.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(e){let t=e.getTriggerProps();return function(...e){let t={};for(let i of e)if(i){for(let e in t){if(e.startsWith("on")&&"function"==typeof t[e]&&"function"==typeof i[e]){t[e]=(0,e_.OK)(i[e],t[e]);continue}if("className"===e||"class"===e){t[e]=tS(t[e],i[e]);continue}if("style"===e){t[e]=tA(t[e],i[e]);continue}if("data-ownedby"===e){t[e]=tP(t[e],i[e]);continue}t[e]=void 0!==i[e]?i[e]:t[e]}for(let e in i)void 0===t[e]&&(t[e]=i[e]);for(let e of Object.getOwnPropertySymbols(i))t[e]=i[e]}return t}(k({value:t.id}),t)},getTriggerProps(i={}){let{value:r}=i,o=null!=r&&m===r,u=te(s,r);return t.button({...d?tL.triggerItem.attrs:tL.trigger.attrs,"data-placement":h,"data-side":p,type:"button",dir:a("dir"),id:u,...null!=r&&{"data-ownedby":s.id,"data-value":r,"data-current":(0,e7.sE)(o)},"data-uid":a("id"),"aria-haspopup":c?"menu":"dialog","aria-controls":ti(s),"data-controls":ti(s),"aria-expanded":null==r?l:l&&o,"data-state":l?"open":"closed",onPointerMove(e){if("mouse"!==e.pointerType||tf(e.currentTarget)||!d)return;let t=(0,T.TH)(e);n({type:"TRIGGER_POINTERMOVE",target:e.currentTarget,point:t})},onPointerLeave(t){if(tf(t.currentTarget)||"mouse"!==t.pointerType||!d)return;ty(e.refs.get("parent"),!0);let i=(0,T.TH)(t);n({type:"TRIGGER_POINTERLEAVE",target:t.currentTarget,point:i})},onPointerDown(e){!tf(e.currentTarget)&&((0,T.fv)(e)||e.preventDefault())},onClick(e){!e.defaultPrevented&&(tf(e.currentTarget)||n({type:l&&null!=r&&!o?"TRIGGER_VALUE.SET":"TRIGGER_CLICK",target:e.currentTarget,value:r}))},onBlur(){n({type:"TRIGGER_BLUR"})},onFocus(){n({type:"TRIGGER_FOCUS"})},onKeyDown(e){if(e.defaultPrevented)return;let t={ArrowDown(){n({type:"ARROW_DOWN",value:r})},ArrowUp(){n({type:"ARROW_UP",value:r})},Enter(){n({type:"ARROW_DOWN",src:"enter",value:r})},Space(){n({type:"ARROW_DOWN",src:"space",value:r})}}[(0,T.K)(e,{orientation:"vertical",dir:a("dir")})];t&&(e.preventDefault(),t(e))}})},getIndicatorProps:()=>t.element({...tL.indicator.attrs,dir:a("dir"),"data-state":l?"open":"closed"}),getPositionerProps:()=>t.element({...tL.positioner.attrs,dir:a("dir"),id:tn(s),style:b.floating}),getArrowProps:()=>t.element({id:s.ids?.arrow??`menu:${s.id}:arrow`,...tL.arrow.attrs,dir:a("dir"),style:b.arrow}),getArrowTipProps:()=>t.element({...tL.arrowTip.attrs,dir:a("dir"),style:b.arrowTip}),getContentProps:()=>t.element({...tL.content.attrs,id:ti(s),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:c?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":o("highlightedId")||void 0,"aria-labelledby":a("aria-label")?void 0:g?tt(s,m??void 0):te(s,m??void 0),"data-placement":h,"data-side":p,onPointerEnter(e){"mouse"===e.pointerType&&n({type:"MENU_POINTERENTER"})},onKeyDown(e){if(e.defaultPrevented||!(0,y.gR)(e.currentTarget,(0,T.wt)(e)))return;let t=(0,T.wt)(e);if(t?.closest("[role=menu]")!==e.currentTarget&&t!==e.currentTarget)return;if("Tab"===e.key&&!(0,I.K)(e))return void e.preventDefault();let i={ArrowDown(){n({type:"ARROW_DOWN"})},ArrowUp(){n({type:"ARROW_UP"})},ArrowLeft(){n({type:"ARROW_LEFT"})},ArrowRight(){n({type:"ARROW_RIGHT"})},Enter(e){n({type:"ENTER",modifiers:E(e)})},Space(e){u?n({type:"TYPEAHEAD",key:e.key}):i.Enter?.(e)},Home(){n({type:"HOME"})},End(){n({type:"END"})}},r=i[(0,T.K)(e,{dir:a("dir")})];if(r){r(e),e.stopPropagation(),e.preventDefault();return}!(!a("typeahead")||!(0,T.TW)(e)||(0,T.VL)(e))&&((0,y.fg)(t)||(n({type:"TYPEAHEAD",key:e.key}),e.preventDefault()))}}),getSeparatorProps:()=>t.element({...tL.separator.attrs,role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}),getItemState:v,getItemProps:k,getOptionItemState:w,getOptionItemProps(e){let{type:i,disabled:r,closeOnSelect:o}=e,s=x(e),l=w(e);return{...k(s),...t.element({"data-type":i,...tL.item.attrs,dir:a("dir"),"data-value":s.value,role:`menuitem${i}`,"aria-checked":!!l.checked,"data-state":l.checked?"checked":"unchecked",onClick(e){r||(0,T.b9)(e)||(0,T.$b)(e)||n({type:"ITEM_CLICK",target:e.currentTarget,option:s,value:s.value,closeOnSelect:o,modifiers:E(e)})}})}},getItemIndicatorProps(e){let i=w((0,e_.wg)(e)),n=i.checked?"checked":"unchecked";return t.element({...tL.itemIndicator.attrs,dir:a("dir"),"data-disabled":(0,e7.sE)(i.disabled),"data-highlighted":(0,e7.sE)(i.highlighted),"data-state":(0,eH.cK)(e,"checked")?n:void 0,hidden:(0,eH.cK)(e,"checked")?!i.checked:void 0})},getItemTextProps(e){let i=w((0,e_.wg)(e)),n=i.checked?"checked":"unchecked";return t.element({...tL.itemText.attrs,dir:a("dir"),"data-disabled":(0,e7.sE)(i.disabled),"data-highlighted":(0,e7.sE)(i.highlighted),"data-state":(0,eH.cK)(e,"checked")?n:void 0})},getItemGroupLabelProps:e=>t.element({...tL.itemGroupLabel.attrs,id:ta(s,e.htmlFor),dir:a("dir")}),getItemGroupProps:e=>{let i;return t.element({id:(i=e.id,s.ids?.group?.(i)??`menu:${s.id}:group:${i}`),...tL.itemGroup.attrs,dir:a("dir"),"aria-labelledby":ta(s,e.id),role:"group"})}}})(e,c._B)}}({items:[],id:t.id,...t.placement,onSelect:e=>this.onSelect(e),getAnchorRect:()=>this.anchorRect(),onOpenChange:e=>{e?i&&!this.pinnedAnchor&&this.pin(i.getBoundingClientRect()):this.pinnedAnchor=null,t.onOpenChange?.(e)},triggerId:t.triggerId}),t.submenu&&(this.ctrl.props.positioning={...this.ctrl.props.positioning,offset:{mainAxis:11},shift:-7}),this.mid=String(this.ctrl.props.id),t.triggerId&&i&&(i.id=t.triggerId),this.handle=(0,u.xl)(this.ctrl.machine,this.ctrl.props,e=>{let t=this.ctrl.connect(e),n=this.shown&&!t.open;n&&this.announce(!1),t.open&&this.exit&&(this.exit.cancel(),this.exit=null),i&&(0,u.iU)(i,t.getTriggerProps(),this.mid),(0,u.iU)(this.positioner,t.getPositionerProps(),this.mid),(0,u.iU)(this.list,t.getContentProps(),this.mid),this.project(t),n&&this.holdExit(),t.open&&!this.shown&&this.announce(!0)})}holdExit(){this.list.hidden=!1,this.exit=(0,s.O)(this.list,()=>{this.exit=null,this.shown||(this.list.hidden=!0)})}get api(){return this.ctrl.connect(this.handle.service)}pin(e){let t=this.host.getBoundingClientRect();this.pinnedAnchor={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}anchorRect(){let e=this.pinnedAnchor;if(!e)return null;let t=this.host.getBoundingClientRect();return{x:t.x+e.x,y:t.y+e.y,width:e.width,height:e.height}}announce(e){this.shown=e,(0,a.$5)(this.list,e,"menu",this.opener)}setItems(e){for(let t of(this.items=e,this.subs.values()))t.destroy();this.subs.clear(),this.build();let t=this.api;for(let e of this.subs.values())t.setChild(e.handle.service),e.api.setParent(this.handle.service);this.handle.flush(),this.subs.size>0&&queueMicrotask(()=>this.handle.flush())}destroy(){for(let e of this.subs.values())e.destroy();this.subs.clear(),this.exit?.finish(),this.handle.stop(),this.shown&&this.announce(!1),this.positioner.remove()}byId(e){return this.items.find(t=>t.id===e)}project(e){for(let t of this.list.children){let i=t.dataset.veiId;if(!i)continue;let n=this.subs.get(i);if(n){(0,u.iU)(t,e.getTriggerItemProps(n.api),this.mid);continue}let r=this.byId(i);(0,u.iU)(t,e.getItemProps({value:i,disabled:r?.disabled,closeOnSelect:!r?.toggle&&void 0}),this.mid)}}build(){let t=this.doc;this.list.replaceChildren();let i=this.checkmarks&&this.items.some(e=>!(e.submenu&&e.submenu.length>0)&&!e.toggle&&void 0!==e.checked),n=this.items.some(e=>!!e.icon),r=this.iconBadges&&n;for(let a of(r?this.list.dataset.badges="1":delete this.list.dataset.badges,this.items)){if(a.separatorBefore){let e=t.createElement("li");e.className="vela-menu-sep",e.dataset.slot=tV.slot("separator"),e.setAttribute("role","separator"),this.list.appendChild(e)}let s=void 0!==a.submenu&&a.submenu.length>0,l=t.createElement("li");if(l.className="vela-menu-item",l.dataset.slot=tV.slot("item"),l.dataset.veiId=a.id,a.title&&(l.title=a.title),a.toggle&&(l.dataset.toggle="1"),i){let e=t.createElement("span");e.className="vela-menu-mark",e.dataset.slot=tV.slot("mark"),s||a.toggle||!a.checked||(e.appendChild(tD("check",t)),l.dataset.checkmark="1"),l.appendChild(e)}else s||a.toggle||!a.checked||(l.dataset.checked="1");if(r){let e=t.createElement("span");e.className="vela-menu-badge",e.dataset.slot=tV.slot("badge"),a.icon&&e.appendChild(tD(a.icon,t)),l.appendChild(e)}else a.icon?l.appendChild(tD(a.icon,t)):n&&l.appendChild(tD("",t));let d=t.createElement("span");if(d.className="vela-menu-label",d.dataset.slot=tV.slot("label"),d.textContent=a.label,l.appendChild(d),a.hint){let e=t.createElement("span");e.className="vela-menu-hint",e.dataset.slot=tV.slot("hint"),e.textContent=a.hint,l.appendChild(e)}if(void 0!==a.favorite&&this.onFavorite){let e=a.favorite,i=tD(e?"star-filled":"star",t);for(let t of(i.classList.add("vela-menu-star"),(0,p.U)(i,tV.slot("star")),e&&(i.classList.add("vela-fav"),i.dataset.fav=""),i.removeAttribute("aria-hidden"),i.setAttribute("role","button"),i.setAttribute("aria-label",(0,o.b)(this.i18n,e?tM.removeFavorite:tM.addFavorite)),i.setAttribute("aria-pressed",e?"true":"false"),["pointerdown","pointerup","mousedown","mouseup"]))i.addEventListener(t,e=>e.stopPropagation());i.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),this.onFavorite?.(a.id,!e)}),l.appendChild(i)}if(a.toggle){let e=t.createElement("span");e.className="vela-menu-switch"+(a.checked?" on":""),e.dataset.slot=tV.slot("switch"),a.checked&&(e.dataset.on=""),e.setAttribute("aria-hidden","true"),l.appendChild(e)}if(s){l.dataset.branch="1";let i=tD("chevron-right",t);i.classList.add("vela-menu-arrow"),(0,p.U)(i,tV.slot("arrow")),l.appendChild(i);let n=new e(t,{host:this.host,placement:{placement:"right-start"},submenu:!0,opener:l,onSelect:this.onSelect,onFavorite:this.onFavorite,i18n:this.i18n,checkmarks:this.checkmarks,iconBadges:this.iconBadges,id:`${this.mid}--${a.id}`});n.setItems(a.submenu??[]),this.subs.set(a.id,n)}this.list.appendChild(l)}}},tH=class{constructor(e){let t=e.trigger??e.host??document.body,i=t.ownerDocument;tF(i);let n=(0,l.oU)(e.host??t,i.body);this.root=new tz(i,{host:n,placement:{placement:e.placement,side:e.side,align:e.align,sideOffset:e.sideOffset,alignOffset:e.alignOffset,avoidCollisions:e.avoidCollisions,collisionPadding:e.collisionPadding,collisionBoundary:e.collisionBoundary},onSelect:t=>e.onSelect?.(t),onOpenChange:e.onOpenChange,trigger:e.trigger,triggerId:e.triggerId,id:e.id,minWidth:e.minWidth,onFavorite:e.onFavorite,i18n:e.i18n??(0,r.N)(),checkmarks:e.checkmarks,iconBadges:e.iconBadges}),this.root.setItems(e.items)}get api(){return this.root.api}open(){this.api.setOpen(!0)}openAt(e,t=0){let i="number"==typeof e?{x:e,y:t,width:0,height:0}:{x:e.x,y:e.y,width:e.width,height:e.height},n=this.api;queueMicrotask(()=>this.root.pin(i)),n.setOpen(!0),n.reposition({getAnchorRect:()=>this.root.anchorRect()})}close(){this.api.setOpen(!1)}setItems(e){this.root.setItems(e)}destroy(){this.root.destroy()}}},7756:(e,t,i)=>{let n;i.d(t,{t:()=>a});var r=i(2577),o=i(3998);let a=Object.assign(function(e,t){let{state:i,activeId:a,key:s,timeout:l=350,itemToId:d}=t,u=i.keysSoFar+s,c=u.length>1&&Array.from(u).every(e=>e===u[0])?u[0]:u,h=function(e,t,i,a=r.p_){let s=i?(0,r.hJ)(e,i,a):-1,l=i?(0,o.LV)(e,s):e;return 1===t.length&&(l=l.filter(e=>a(e)!==i)),l.find(e=>{let i;return((e,t)=>{let i=t.normalize("NFC");return 0===(n??(n=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}))).compare(e.slice(0,i.length),i)})((i=e,(i.dataset?.valuetext??i.textContent??"").normalize("NFC").trim()),t)})}(e.slice(),c,a,d);function p(){clearTimeout(i.timer),i.timer=-1}return!function e(t){i.keysSoFar=t,p(),""!==t&&(i.timer=+setTimeout(()=>{e(""),p()},l))}(u),h},{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:function(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}})},7776:(e,t,i)=>{i.d(t,{L:()=>o});var n=i(3457);let r=new WeakMap;function o(e){return r.has(e)||r.set(e,(0,n.zk)(e).getComputedStyle(e)),r.get(e)}},8065:(e,t,i)=>{i.d(t,{Tl:()=>s,mx:()=>l});var n=i(3457),r=i(1542),o=i(3998);let a=new WeakMap;function s(e){let t=function(e){let t={childList:!!e.childList,subtree:!!e.subtree,attributes:e.attributes??(void 0!==e.attributeOldValue||void 0!==e.attributeFilter),characterData:e.characterData??void 0!==e.characterDataOldValue,attributeOldValue:!!e.attributeOldValue,characterDataOldValue:!!e.characterDataOldValue};return void 0!==e.attributeFilter&&(t.attributeFilter=[...new Set(e.attributeFilter)].sort()),t}(e),i=JSON.stringify(t);return{observe(e,r){let s=(0,n.zk)(e);if("function"!=typeof s.MutationObserver)return o.lQ;let l=a.get(e)??new Map,d=l.get(i);if(!d){let n=new Set,r=new s.MutationObserver(e=>{for(let t of[...n])if(n.has(t))try{t(e)}catch(e){s.queueMicrotask(()=>{throw e})}});r.observe(e,t),d={observer:r,listeners:n},l.set(i,d),a.set(e,l)}let u=e=>r(e);return d.listeners.add(u),()=>{d.listeners.delete(u)&&!(d.listeners.size>0)&&(d.observer.disconnect(),l.delete(i),0===l.size&&a.delete(e))}}}}function l(e,t){let{defer:i}=t,n=i?r.er:e=>e(),o=[];return o.push(n(()=>{let i="function"==typeof e?e():e;o.push(function(e,t){if(!e)return;let{attributes:i,callback:n}=t,r=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)"attributes"===t.type&&t.attributeName&&i.includes(t.attributeName)&&n(t)});return r.observe(e,{attributes:!0,attributeFilter:i}),()=>r.disconnect()}(i,t))})),()=>{o.forEach(e=>e?.())}}},8161:(e,t,i)=>{i.d(t,{fF:()=>W});var n=i(5788),r=i(7148),o=i(3754),a=i(4897),s=i(730),l=i(7042),d=i(6806),u=i(4561),c=i(542),h=i(6581),p=i(1542),g=i(3457),f=i(648),m=i(5010),b=i(853),v=i(5034),y=i(3998),x=i(2577),w=i(3926);let E=e=>e.ids?.list??`tabs:${e.id}:list`,k=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,T=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,O=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,C=e=>e.getById(E(e)),I=(e,t)=>null!=t?e.getById(T(e,t)):null,S=e=>e.getById(O(e)),P=e=>{let t=`[role=tab]${(0,y.iG)(E(e))}:not([disabled])`;return(0,x.YG)(C(e),t)},$=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),{createMachine:N}=(0,h.mj)(),A=N({props:({props:e})=>({dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,defaultValue:null,...e}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){e("onValueChange")?.({value:t})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(t){e("onFocusChange")?.({focusedValue:t})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1}))}),refs:()=>({indicatorCleanup:null,prevValue:null,focusFrame:p.KP.create()}),watch({context:e,prop:t,track:i,action:n}){i([()=>e.get("value")],()=>{n(["syncIndicatorAnimation","syncIndicatorRect","syncTabIndex"])}),i([()=>t("dir"),()=>t("orientation")],()=>{n(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]},INDICATOR_TRANSITION_END:{actions:["clearIndicatorAnimation"]}},entry:["syncPrevValue","syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver","cancelFocusFrame"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue","requestNavigation"]}}},focused:{exit:["cancelFocusFrame"],on:{TAB_CLICK:{actions:["setFocusedValue","setValue","requestNavigation"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>"automatic"===e("activationMode")},actions:{selectFocusedTab({context:e,prop:t,event:i,scope:n}){(0,p.er)(()=>{let r=e.get("focusedValue");if(!r)return;let o=t("deselectable")&&e.get("value")===r?null:r;if(e.get("value")!==o){if("keyboard"===i.src){let e=I(n,r);if((0,g.IR)(e)&&null!==t("navigate"))return void e.click()}e.set("value",o)}})},setFocusedValue({context:e,event:t,flush:i}){null!=t.value&&i(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:i}){let n=i("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",n?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e,refs:t}){t.get("focusFrame").request(()=>{(0,w.$1)(P(e))?.focus()})},focusLastTab({scope:e,refs:t}){t.get("focusFrame").request(()=>{(0,w.HV)(P(e))?.focus()})},focusNextTab({context:e,prop:t,scope:i,event:n,refs:r}){let o,a=n.value??e.get("focusedValue");if(!a)return;let s=(o={value:a,loopFocus:t("loopFocus")},(0,x.Ut)(P(i),T(i,o.value),o.loopFocus));r.get("focusFrame").request(()=>{t("composite")?s?.focus():s?.dataset.value!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:i,event:n,refs:r}){let o,a=n.value??e.get("focusedValue");if(!a)return;let s=(o={value:a,loopFocus:t("loopFocus")},(0,x.I5)(P(i),T(i,o.value),o.loopFocus));r.get("focusFrame").request(()=>{t("composite")?s?.focus():s?.dataset.value!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){(0,p.er)(()=>{let i=e.get("value");if(!i)return;let n=t.getById(k(t,i));n&&((0,f.i7)(n).length>0?n.removeAttribute("tabindex"):n.setAttribute("tabindex","0"))})},cancelFocusFrame({refs:e}){e.get("focusFrame").cancel()},cleanupObserver({refs:e}){let t=e.get("indicatorCleanup");t&&t()},setIndicatorRect({context:e,event:t,scope:i}){let n=t.id??e.get("value");S(i)&&n&&I(i,n)&&e.set("indicatorRect",$((0,x.aX)(P(i),T(i,n))))},syncSsr({context:e}){e.set("ssr",!1)},syncPrevValue({context:e,refs:t}){t.set("prevValue",e.get("value"))},syncIndicatorAnimation({context:e,refs:t}){let i=t.get("prevValue"),n=e.get("value");e.set("animateIndicator",null!=i&&null!=n&&i!==n),t.set("prevValue",n)},clearIndicatorAnimation({context:e}){e.set("animateIndicator",!1)},syncIndicatorRect({context:e,refs:t,scope:i}){let n=t.get("indicatorCleanup");if(n&&n(),!S(i))return;let r=()=>{let t=I(i,e.get("value"));if(!t)return;let n=$(t);e.set("indicatorRect",e=>(0,b.n)(e,n)?e:n)};r();let o=P(i),a=C(i),s=(0,v.OK)(...o.map(e=>m.oC.observe(e,r)),...a?[m.oC.observe(a,r)]:[]);t.set("indicatorCleanup",s)},requestNavigation({event:e,prop:t,scope:i}){let n=t("navigate");if(!n||null==e.value)return;let r=I(i,e.value);(0,g.IR)(r)&&n({value:e.value,node:r,href:r.href})}}}});var R=i(5089),L=i(4792),V=i(2498);let F=(0,i(5397).y)("tabs").parts("root","list","trigger","content","indicator").build();function D(e,t){let{state:i,send:n,context:r,prop:o,scope:a}=e,s=o("translations"),l=i.matches("focused"),d="vertical"===o("orientation"),u="horizontal"===o("orientation"),c=o("composite");function h(e,t){n({type:e,key:t,src:"keyboard"})}function p(e){return{selected:r.get("value")===e.value,focused:r.get("focusedValue")===e.value,disabled:!!e.disabled}}return{value:r.get("value"),focusedValue:r.get("focusedValue"),setValue(e){n({type:"SET_VALUE",value:e})},clearValue(){n({type:"CLEAR_VALUE"})},setIndicatorRect(e){n({type:"SET_INDICATOR_RECT",id:T(a,e)})},syncTabIndex(){n({type:"SYNC_TAB_INDEX"})},selectNext(e){n({type:"TAB_FOCUS",value:e,src:"selectNext"}),n({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(e){n({type:"TAB_FOCUS",value:e,src:"selectPrev"}),n({type:"ARROW_PREV",src:"selectPrev"})},focus(){let e=r.get("value");e&&I(a,e)?.focus()},getRootProps:()=>t.element({...F.root.attrs,id:a.ids?.root??`tabs:${a.id}`,"data-orientation":o("orientation"),"data-focus":(0,y.sE)(l),dir:o("dir")}),getListProps:()=>t.element({...F.list.attrs,id:E(a),role:"tablist",dir:o("dir"),"data-focus":(0,y.sE)(l),"aria-orientation":o("orientation"),"data-orientation":o("orientation"),"aria-label":s?.listLabel,onKeyDown(e){if(e.defaultPrevented||(0,R.q_)(e)||!(0,g.gR)(e.currentTarget,(0,R.wt)(e)))return;let t={ArrowDown(){u||h("ARROW_NEXT","ArrowDown")},ArrowUp(){u||h("ARROW_PREV","ArrowUp")},ArrowLeft(){d||h("ARROW_PREV","ArrowLeft")},ArrowRight(){d||h("ARROW_NEXT","ArrowRight")},Home(){h("HOME")},End(){h("END")}}[(0,R.K)(e,{dir:o("dir"),orientation:o("orientation")})];if(t){e.preventDefault(),t(e);return}}}),getTriggerState:p,getTriggerProps(e){let{value:i,disabled:s}=e,l=p(e);return t.button({...F.trigger.attrs,role:"tab",type:"button",disabled:s,dir:o("dir"),"data-orientation":o("orientation"),"data-disabled":(0,y.sE)(s),"aria-disabled":s,"data-value":i,"aria-selected":l.selected,"data-selected":(0,y.sE)(l.selected),"data-focus":(0,y.sE)(l.focused),"aria-controls":l.selected?k(a,i):void 0,"data-ownedby":E(a),"data-ssr":(0,y.sE)(r.get("ssr")),id:T(a,i),tabIndex:l.selected&&c?0:-1,onFocus(){n({type:"TAB_FOCUS",value:i})},onBlur(e){e.relatedTarget?.getAttribute("role")!=="tab"&&n({type:"TAB_BLUR"})},onClick(e){if(e.defaultPrevented||(0,R.b9)(e)||(0,R.$b)(e)||e.shiftKey&&(0,g.IR)(e.currentTarget)||s)return;(0,L.nr)()&&e.currentTarget.focus();let t=e.currentTarget;null!=o("navigate")&&(0,g.IR)(t)&&e.preventDefault(),n({type:"TAB_CLICK",value:i})}})},getContentProps(e){let{value:i}=e,n=r.get("value")===i;return t.element({...F.content.attrs,dir:o("dir"),id:k(a,i),tabIndex:c?0:-1,"aria-labelledby":T(a,i),role:"tabpanel","data-ownedby":E(a),"data-selected":(0,y.sE)(n),"data-orientation":o("orientation"),hidden:!n})},getIndicatorProps(){let e=r.get("indicatorRect"),i=r.get("animateIndicator");return t.element({id:O(a),...F.indicator.attrs,dir:o("dir"),"data-orientation":o("orientation"),hidden:M(e),onTransitionEnd(e){(0,R.wt)(e)===e.currentTarget&&n({type:"INDICATOR_TRANSITION_END"})},style:{"--transition-property":"left, right, top, bottom, width, height","--left":(0,V.cl)(e?.x),"--top":(0,V.cl)(e?.y),"--width":(0,V.cl)(e?.width),"--height":(0,V.cl)(e?.height),position:"absolute",willChange:i?"var(--transition-property)":"auto",transitionProperty:i?"var(--transition-property)":"none",transitionDuration:i?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[u?"left":"top"]:u?"var(--left)":"var(--top)"}})}}}let M=e=>null==e||0===e.width&&0===e.height&&0===e.x&&0===e.y;var z=(0,u.I)({name:"tabs",parts:["list","trigger","icon","count","label","description","content"],settings:{"track-radius":"8px","trigger-radius":d.t.radius.md,"filled-radius":"5px","soft-radius":"8px","count-radius":"8px"}}),H=(0,s.H)({variant:["default","line","filled","soft","nav"]}),B=e=>!e.disabled&&!e.hidden,_=e=>null==e?null:(0,l.h)("span",{slot:z.slot("count"),text:String(e)}),U=(0,c.AH)`@layer vela.ui{[data-slot=tabs-icon]{margin-inline-end:6px}[data-slot=tabs-count]{border-radius:${z.vars["count-radius"]};background:${d.t.hover};min-width:16px;height:16px;color:${d.t.fg.muted};font-variant-numeric:tabular-nums;margin-inline-start:6px;padding:0 5px;font-size:10px;font-weight:600}[data-slot=tabs-count]:where(:not([hidden])){justify-content:center;align-items:center;display:inline-flex}[data-slot=tabs-list]{display:flex}[data-slot=tabs-list][data-orientation=vertical]{flex-direction:column}[data-slot=tabs-list][data-variant=default]{box-sizing:border-box;border-radius:${z.vars["track-radius"]};background:color-mix(in srgb, ${d.t.fg.bright} 6%, transparent);gap:2px;padding:3px;display:inline-flex}[data-slot=tabs-list][data-variant=default][data-orientation=horizontal]{align-items:stretch;height:32px}[data-slot=tabs-list][data-variant=line]{border-bottom:1px solid ${d.t.border};gap:12px}[data-slot=tabs-list][data-variant=nav]{gap:2px}[data-slot=tabs-trigger]:where(:not([hidden])){all:unset;cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}[data-slot=tabs-trigger]:where(:not([hidden]))[data-disabled]{cursor:default;opacity:.45}[data-slot=tabs-trigger]:where(:not([hidden])):focus-visible{outline:2px solid ${d.t.focus};outline-offset:-2px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]{border-radius:${z.vars["trigger-radius"]};color:${d.t.fg.muted};transition:background ${d.t.dur.fast} ease, color ${d.t.dur.fast} ease;justify-content:center;align-items:center;padding:0 10px;font-size:13px;font-weight:500;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-orientation=vertical]{justify-content:flex-start;padding:6px 10px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default]:not([data-selected],[data-disabled]):hover{color:${d.t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=default][data-selected]{background:color-mix(in srgb, ${d.t.fg.bright} 12%, transparent);color:${d.t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]{color:${d.t.fg.muted};transition:color ${d.t.dur.fast} ease, border-color ${d.t.dur.fast} ease;border-bottom:2px solid #0000;margin-bottom:-1px;padding-bottom:8px;font-size:13px;font-weight:600;line-height:20px}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line]:not([data-selected],[data-disabled]):hover{color:${d.t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=line][data-selected]{color:${d.t.fg};border-bottom-color:${d.t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]{border-radius:${z.vars["filled-radius"]};color:${d.t.fg.muted};padding:3px 10px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled]:not([data-selected],[data-disabled]):hover{color:${d.t.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=filled][data-selected]{background:${d.t.selected.bg};color:${d.t.selected.fg}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft]{border-radius:${z.vars["soft-radius"]};min-height:36px;color:${d.t.fg.muted};flex:none;align-items:center;padding:0 12px;font-size:13px;font-weight:600;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=soft][data-selected]{color:${d.t.fg.bright};background:${d.t.hover}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]{border-radius:${d.t.radius.md};color:${d.t.fg.muted};transition:background ${d.t.dur.fast} ease, color ${d.t.dur.fast} ease;padding:9px 12px;font-size:13px;font-weight:600}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav]:not([data-selected],[data-disabled]):hover{background:${d.t.hover};color:${d.t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-variant=nav][data-selected]{background:${d.t.active};color:${d.t.fg.bright}}[data-slot=tabs-trigger]:where(:not([hidden]))[data-description]{flex-direction:column;justify-content:center;align-items:center;gap:2px;display:inline-flex}[data-slot=tabs-trigger]:where(:not([hidden]))[data-description]:not([data-variant=line]){padding-block:6px}[data-slot=tabs-list][data-variant=default]:has(>[data-description]){height:auto}[data-slot=tabs-label]{align-items:center;line-height:16px;display:inline-flex}[data-slot=tabs-description]{opacity:.85;font-size:11px;font-weight:400;line-height:14px}}`,G=(0,c.Il)("vela-ui-tabs",U),j=class{constructor(e){this.triggers=new Map,this.panels=new Map,G(document),this.variant=H.resolve(e).variant,this.triggerClassName=e.triggerClassName,this.items=[...e.items],this.current=e.defaultValue??this.items.find(B)?.value??null,this.mid=(0,r.Ao)("vela-tabs"),this.el=(0,l.h)("div",{className:e.className?`vela-tabs ${e.className}`:"vela-tabs",slot:z.slot("list"),data:{variant:this.variant}}),this.build(),this.machine=(0,r.xl)(A,{id:this.mid,defaultValue:this.current,orientation:e.orientation??"horizontal",activationMode:e.activationMode??"automatic",dir:e.dir??"ltr",loopFocus:!0,onValueChange:({value:t})=>{if(null!=t){if(this.current=t,this.silentNext===t){this.silentNext=void 0;return}e.onValueChange?.(t)}}},e=>this.render(e)),this.release=(0,n.j)(this.el,()=>this.machine.stop())}get value(){return this.current}setValue(e){if(e!==this.current){if(this.current=e,null===e)return void this.api().clearValue();this.silentNext=e,this.api().setValue(e)}}setItems(e){this.items=[...e],this.build(),null!==this.current&&this.items.some(e=>e.value===this.current)||this.setValue(this.items.find(B)?.value??null),this.machine.flush()}setHidden(e,t){if(this.items=this.items.map(i=>i.value===e?{...i,hidden:t}:i),t&&this.current===e){let e=this.items.find(B)?.value;void 0!==e&&(this.current=e,this.api().setValue(e))}this.machine.flush()}setCount(e,t){let i=this.triggers.get(e);if(!i)return;this.items=this.items.map(i=>i.value===e?{...i,count:t}:i),i.querySelector(`[data-slot="${z.slot("count")}"]`)?.remove();let n=_(t);n&&(i.querySelector(`[data-slot="${z.slot("label")}"]`)??i).appendChild(n)}trigger(e){return this.triggers.get(e)??null}panel(e,t){t.dataset.slot=z.slot("content"),this.panels.set(e,t),this.machine.flush()}destroy(){this.release()}api(){return D(this.machine.service,o._B)}build(){this.triggers.clear();let e=this.triggerClassName?`vela-tab ${this.triggerClassName}`:"vela-tab";this.el.replaceChildren(...this.items.map(t=>{let i=null;t.icon&&((i=(0,a.x_)(t.icon,document)).dataset.slot=z.slot("icon"));let n=t.description?(0,l.h)("button",{className:e,slot:z.slot("trigger"),data:{variant:this.variant,description:!0}},(0,l.h)("span",{slot:z.slot("label")},i,t.label,_(t.count)),(0,l.h)("span",{slot:z.slot("description"),text:t.description})):(0,l.h)("button",{className:e,slot:z.slot("trigger"),data:{variant:this.variant}},i,t.label,_(t.count));return this.triggers.set(t.value,n),n}))}render(e){let t=D(e,o._B);for(let e of((0,r.iU)(this.el,t.getListProps(),this.mid),this.items)){let i=this.triggers.get(e.value);if(!i)continue;let n=t.getTriggerProps({value:e.value,disabled:!B(e)});this.panels.has(e.value)||delete n["aria-controls"],(0,r.iU)(i,n,this.mid),i.hidden=!0===e.hidden}for(let[e,i]of this.panels)(0,r.iU)(i,t.getContentProps({value:e}),this.mid)}};function W(e){return new j(e)}},8571:(e,t,i)=>{i.d(t,{p:()=>r});var n=i(853);function r(e,t,i){let r,o=[];return a=>{let s=e(a);return(s.length!==o.length||s.some((e,t)=>!(0,n.n)(o[t],e)))&&(o=s,r=t(s,a),i?.onChange?.(r)),r}}},8621:(e,t,i)=>{let n;i.d(t,{l6:()=>er,Zm:()=>en});var r=i(3825),o=i(5788),a=i(7148),s=i(3754),l=i(4897),d=i(730),u=i(7042),c=i(6806),h=i(4561),p=i(542);function g({values:e,collection:t,selectedItemMap:i}){let n=[];for(let r of e){let e=t.find(r)??i.get(r);null!=e&&n.push(e)}return n}function f({selectedItemMap:e,values:t,selectedItems:i,collection:n}){let r=new Map(e);for(let e of i){let t=n.getItemValue(e);null!=t&&r.set(t,e)}let o=new Set(t);for(let e of r.keys())o.has(e)||r.delete(e);return r}function m({values:e,collection:t,selectedItemMap:i}){let n=g({values:e,collection:t,selectedItemMap:i});return{selectedItems:n,nextSelectedItemMap:f({selectedItemMap:i,values:e,selectedItems:n,collection:t})}}var b=i(853);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t,i){var n;return(n=function(e,t){if("object"!=v(e)||!e)return e;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var i,n=i.call(e,t||"default");if("object"!=v(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==v(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var x=class e extends Set{constructor(t=[]){super(t),y(this,"selectionMode","single"),y(this,"deselectable",!0),y(this,"copy",()=>{let t=new e([...this]);return this.sync(t)}),y(this,"sync",e=>(e.selectionMode=this.selectionMode,e.deselectable=this.deselectable,e)),y(this,"isEmpty",()=>0===this.size),y(this,"isSelected",e=>"none"!==this.selectionMode&&null!=e&&this.has(e)),y(this,"canSelect",(e,t)=>"none"!==this.selectionMode||!e.getItemDisabled(e.find(t))),y(this,"firstSelectedValue",e=>{let t=null;for(let i of this)(!t||0>e.compareValue(i,t))&&(t=i);return t}),y(this,"lastSelectedValue",e=>{let t=null;for(let i of this)(!t||e.compareValue(i,t)>0)&&(t=i);return t}),y(this,"extendSelection",(e,t,i,n)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode)return this.replaceSelection(e,i);let r=this.copy(),o=n??Array.from(this).pop();for(let n of e.getValueRange(t,o??i))r.delete(n);for(let n of e.getValueRange(i,t))this.canSelect(e,n)&&r.add(n);return r}),y(this,"toggleSelection",(e,t)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode&&!this.isSelected(t))return this.replaceSelection(e,t);let i=this.copy();return i.has(t)?i.delete(t):i.canSelect(e,t)&&i.add(t),i}),y(this,"replaceSelection",(t,i)=>{if("none"===this.selectionMode||null==i||!this.canSelect(t,i))return this;let n=new e([i]);return this.sync(n)}),y(this,"setSelection",t=>{if("none"===this.selectionMode)return this;let i=new e;for(let e of t)if(null!=e&&(i.add(e),"single"===this.selectionMode))break;return this.sync(i)}),y(this,"clearSelection",()=>{let e=this.copy();return e.deselectable&&e.size>0&&e.clear(),e}),y(this,"select",(e,t,i)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode)if(this.isSelected(t)&&this.deselectable)return this.toggleSelection(e,t);else return this.replaceSelection(e,t);return"multiple"===this.selectionMode||i?this.toggleSelection(e,t):this.replaceSelection(e,t)}),y(this,"deselect",e=>{let t=this.copy();return t.delete(e),t}),y(this,"isEqual",e=>(0,b.n)(Array.from(this),Array.from(e)))}},w=i(3926),E=i(3542);let k={itemToValue:e=>"string"==typeof e?e:(0,E.Gv)(e)&&(0,E.cK)(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:(0,E.Gv)(e)&&(0,E.cK)(e,"label")?e.label:k.itemToValue(e),isItemDisabled:e=>!!((0,E.Gv)(e)&&(0,E.cK)(e,"disabled"))&&!!e.disabled};n=Symbol.iterator;var T=class e{constructor(e){this.options=e,y(this,"items",void 0),y(this,"indexMap",null),y(this,"orderedItems",null),y(this,"cacheSource",null),y(this,"scannedCount",0),y(this,"copy",e=>this.createCollection(e??[...this.items])),y(this,"isEqual",e=>(0,b.n)(this.items,e.items)),y(this,"setItems",e=>this.copy(e)),y(this,"getValues",(e=this.items)=>{let t=[];for(let i of e){let e=this.getItemValue(i);null!=e&&t.push(e)}return t}),y(this,"find",e=>{if(null==e)return null;let t=this.indexOf(e);return -1!==t?this.at(t):null}),y(this,"findMany",e=>{let t=[];for(let i of e){let e=this.find(i);null!=e&&t.push(e)}return t}),y(this,"at",e=>this.isGrouped()?this.getOrderedItems()[e]??null:this.items[e]??null),y(this,"sortFn",(e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0)),y(this,"sort",e=>[...e].sort(this.sortFn.bind(this))),y(this,"getItemValue",e=>null==e?null:this.options.itemToValue?.(e)??k.itemToValue(e)),y(this,"getItemDisabled",e=>null!=e&&(this.options.isItemDisabled?.(e)??k.isItemDisabled(e))),y(this,"stringifyItem",e=>null==e?null:this.options.itemToString?.(e)??k.itemToString(e)),y(this,"stringify",e=>null==e?null:this.stringifyItem(this.find(e))),y(this,"stringifyItems",(e,t=", ")=>{let i=[];for(let t of e){let e=this.stringifyItem(t);null!=e&&i.push(e)}return i.join(t)}),y(this,"stringifyMany",(e,t)=>this.stringifyItems(this.findMany(e),t)),y(this,"has",e=>-1!==this.indexOf(e)),y(this,"hasItem",e=>null!=e&&this.has(this.getItemValue(e))),y(this,"group",()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];let i=new Map;this.items.forEach((t,n)=>{let r=e(t,n);i.has(r)||i.set(r,[]),i.get(r).push(t)});let n=Array.from(i.entries());return t&&n.sort(([e],[i])=>{if("function"==typeof t)return t(e,i);if(Array.isArray(t)){let n=t.indexOf(e),r=t.indexOf(i);return -1===n?1:-1===r?-1:n-r}return"asc"===t?e.localeCompare(i):"desc"===t?i.localeCompare(e):0}),n}),y(this,"getNextValue",(e,t=1,i=!1)=>{let n=this.indexOf(e);if(-1===n)return null;for(n=i?Math.min(n+t,this.size-1):n+t;n<=this.size&&this.getItemDisabled(this.at(n));)n++;return this.getItemValue(this.at(n))}),y(this,"getPreviousValue",(e,t=1,i=!1)=>{let n=this.indexOf(e);if(-1===n)return null;for(n=i?Math.max(n-t,0):n-t;n>=0&&this.getItemDisabled(this.at(n));)n--;return this.getItemValue(this.at(n))}),y(this,"indexOf",e=>{if(null==e)return -1;if(this.syncCache(),!this.indexMap&&!this.isGrouped()&&this.scannedCount<2*this.items.length){let t=this.getItemIndex(e);return this.scannedCount+=-1===t?this.items.length:t+1,t}if(!this.indexMap){let e=new Map,t=this.getOrderedItems();for(let i=0;i<t.length;i++){let n=this.getItemValue(t[i]);null==n||e.has(n)||e.set(n,i)}this.indexMap=e}return this.indexMap.get(e)??-1}),y(this,"getByText",(e,t)=>{let i=null!=t?this.indexOf(t):-1,n=1===e.length,r=this.getOrderedItems();for(let o=0;o<r.length;o++){let a=r[(i+o+1)%r.length];if((!n||this.getItemValue(a)!==t)&&!this.getItemDisabled(a)&&O(this.stringifyItem(a),e))return a}}),y(this,"search",(e,t)=>{let{state:i,currentValue:n,timeout:r=350}=t,o=i.keysSoFar+e,a=o.length>1&&Array.from(o).every(e=>e===o[0])?o[0]:o,s=this.getByText(a,n),l=this.getItemValue(s);function d(){clearTimeout(i.timer),i.timer=-1}return!function e(t){i.keysSoFar=t,d(),""!==t&&(i.timer=+setTimeout(()=>{e(""),d()},r))}(o),l}),y(this,"update",(e,t)=>{let i=this.getItemIndex(e);return -1===i?this.unchanged():this.copy([...this.items.slice(0,i),t,...this.items.slice(i+1)])}),y(this,"upsert",(e,t,i="append")=>{let n=this.getItemIndex(e);return -1===n?("append"===i?this.append:this.prepend)(t):this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),y(this,"insert",(e,...t)=>this.copy(C(this.items,e,...t))),y(this,"insertBefore",(e,...t)=>{let i=this.getItemIndex(e);if(-1===i)if(0!==this.items.length)return this.unchanged();else i=0;return this.copy(C(this.items,i,...t))}),y(this,"insertAfter",(e,...t)=>{let i=this.getItemIndex(e);if(-1===i)if(0!==this.items.length)return this.unchanged();else i=0;return this.copy(C(this.items,i+1,...t))}),y(this,"prepend",(...e)=>this.copy(C(this.items,0,...e))),y(this,"append",(...e)=>this.copy(C(this.items,this.items.length,...e))),y(this,"filter",e=>{let t=this.items.filter((t,i)=>e(this.stringifyItem(t),i,t));return this.copy(t)}),y(this,"remove",(...e)=>{let t=e.map(e=>"string"==typeof e?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let i=this.getItemValue(e);return null!=i&&!t.includes(i)}))}),y(this,"move",(e,t)=>{let i=this.getItemIndex(e);return -1===i?this.unchanged():this.copy(I(this.items,[i],t))}),y(this,"moveBefore",(e,...t)=>{let i=this.getItemIndex(e);if(-1===i)return this.unchanged();let n=t.map(e=>this.getItemIndex(e)).sort((e,t)=>e-t);return this.copy(I(this.items,n,i))}),y(this,"moveAfter",(e,...t)=>{let i=this.getItemIndex(e);if(-1===i)return this.unchanged();let n=t.map(e=>this.getItemIndex(e)).sort((e,t)=>e-t);return this.copy(I(this.items,n,i+1))}),y(this,"reorder",(e,t)=>this.copy(I(this.items,[e],t))),y(this,"compareValue",(e,t)=>{let i=this.indexOf(e),n=this.indexOf(t);return i<n?-1:+(i>n)}),y(this,"range",(e,t)=>{let i=[],n=e;for(;null!=n;){if(this.find(n)&&i.push(n),n===t)return i;n=this.getNextValue(n)}return[]}),y(this,"getValueRange",(e,t)=>e&&t?0>=this.compareValue(e,t)?this.range(e,t):this.range(t,e):[]),y(this,"toString",()=>{let e="";for(let t of this.items)e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+",";return e}),y(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...e.items]}unchanged(){return this}createCollection(t){return new e({...this.options,items:t})}isGrouped(){return!!(this.options.groupBy||this.options.groupSort)}syncCache(){this.cacheSource!==this.items&&(this.cacheSource=this.items,this.indexMap=null,this.orderedItems=null,this.scannedCount=0)}getOrderedItems(){if(!this.isGrouped())return this.items;if(this.syncCache(),!this.orderedItems){let e=[];for(let[,t]of this.group())for(let i of t)e.push(i);this.orderedItems=e}return this.orderedItems}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}getItemIndex(e){return this.items.findIndex(t=>this.getItemValue(t)===e)}*[n](){yield*this.items}};let O=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function C(e,t,...i){return[...e.slice(0,t),...i,...e.slice(t)]}function I(e,t,i){let n=(t=[...t].sort((e,t)=>e-t)).map(t=>e[t]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return i=Math.max(0,i-t.filter(e=>e<i).length),[...e.slice(0,i),...n,...e.slice(i)]}function S(e){return(0,E.cK)(e,"columnCount")&&(0,E.cK)(e,"getRows")}var P=i(6581),$=i(7756),N=i(4730),A=i(1542),R=i(8065),L=i(1711);let V=e=>new T(e);V.empty=()=>new T({items:[]});let F=e=>e.ids?.content??`listbox:${e.id}:content`,D=e=>e.ids?.label??`listbox:${e.id}:label`,M=(e,t)=>e.ids?.item?.(t)??`listbox:${e.id}:item:${t}`,z=(e,t)=>e.ids?.itemGroupLabel?.(t)??`listbox:${e.id}:item-group-label:${t}`,H=e=>e.getById(F(e)),B=(e,t)=>e.getById(M(e,t)),{guards:_,createMachine:U}=(0,P.mj)(),{or:G}=_,j=U({props:({props:e})=>({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:V.empty(),orientation:"vertical",selectionMode:"single",...e}),context({prop:e,bindable:t,getContext:i}){let n=e("value")??e("defaultValue")??[],r=e("collection").findMany(n);return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:b.n,onChange(t){let n=i(),r=e("collection"),o=m({values:t,collection:r,selectedItemMap:n.get("selectedItemMap")}),a=e("value")??t,s=a===t?o:m({values:a,collection:r,selectedItemMap:o.nextSelectedItemMap});return n.set("selectedItemMap",s.nextSelectedItemMap),e("onValueChange")?.({value:t,items:o.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(t){e("onHighlightChange")?.({highlightedValue:t,highlightedItem:e("collection").find(t),highlightedIndex:e("collection").indexOf(t)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:function({selectedItems:e,collection:t}){return f({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}({selectedItems:r,collection:e("collection")})})),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs:()=>({typeahead:{...$.t.defaultOptions},focusVisible:!1,inputState:{autoHighlight:!1,focused:!1},anchorValue:null,currentValue:null}),computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>""!==e.get("typeahead").keysSoFar,isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let i=new x(e.get("value"));return i.selectionMode=t("selectionMode"),i.deselectable=!!t("deselectable"),i},multiple:({prop:e})=>"multiple"===e("selectionMode")||"extended"===e("selectionMode"),selectedItems:({context:e,prop:t})=>g({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems"))},initialState:()=>"idle",watch({context:e,prop:t,track:i,action:n}){i([()=>e.get("value").toString()],()=>{n(["syncSelectedItems"])}),i([()=>e.get("highlightedValue")],()=>{n(["syncHighlightedItem"])}),i([()=>t("collection").toString()],()=>{n(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems","clearRangeEnd"]},"VALUE.CLEAR":{actions:["clearSelectedItems","clearRangeEnd"]},"HIGHLIGHT.FIRST":{actions:["highlightFirstValue"]},"HIGHLIGHT.LAST":{actions:["highlightLastValue"]},"HIGHLIGHT.NEXT":{actions:["highlightNextValue"]},"HIGHLIGHT.PREV":{actions:["highlightPreviousValue"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:G("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>null!=e.get("highlightedValue")},effects:{trackFocusVisible:({scope:e,refs:t})=>(0,L.Yy)({root:e.getRootNode?.(),onChange(e){t.set("focusVisible",e.isFocusVisible)}}),scrollToHighlightedItem({context:e,prop:t,scope:i}){let n=n=>{let r=e.get("highlightedValue");if(null==r||"pointer"===(0,L.ME)())return;let o=H(i),a=t("scrollToIndexFn");if(a){let e=t("collection").indexOf(r);a?.({index:e,immediate:n,getElement:()=>B(i,r)});return}let s=B(i,r);(0,N.rx)(s,{rootEl:o})},r=(0,A.er)(()=>{(0,L.Cl)("virtual"),n(!0)}),o=(0,R.mx)(()=>H(i),{defer:!0,attributes:["data-activedescendant"],callback(){n(!1)}});return()=>{r(),o()}}},actions:{selectHighlightedItem({context:e,prop:t,event:i,computed:n,refs:r}){let o=i.value??e.get("highlightedValue"),a=t("collection");if(null==o||!a.has(o))return;let s=n("selection"),l=r.get("anchorValue");if(i.shiftKey&&n("multiple")&&null!=l){let i=s.extendSelection(a,l,o,r.get("currentValue"));W(s,i,t("onSelect")),e.set("value",Array.from(i)),r.set("currentValue",o)}else{let n=s.select(a,o,i.metaKey);W(s,n,t("onSelect")),e.set("value",Array.from(n)),r.set("anchorValue",o),r.set("currentValue",o)}},selectWithKeyboard({context:e,prop:t,event:i,computed:n,refs:r}){let o=n("selection"),a=t("collection"),s=r.get("anchorValue");if(i.shiftKey&&n("multiple")&&null!=s){let n=o.extendSelection(a,s,i.value,r.get("currentValue"));W(o,n,t("onSelect")),e.set("value",Array.from(n)),r.set("currentValue",i.value);return}if(r.set("anchorValue",i.value),r.set("currentValue",i.value),t("selectOnHighlight")){let n=o.replaceSelection(a,i.value);W(o,n,t("onSelect")),e.set("value",Array.from(n))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:i,refs:n}){let r=t("collection").search(i.key,{state:n.get("typeahead"),currentValue:e.get("highlightedValue")});null!=r&&e.set("highlightedValue",r)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightFirstValue({context:e,prop:t}){e.set("highlightedValue",t("collection").firstValue??null)},highlightLastValue({context:e,prop:t}){e.set("highlightedValue",t("collection").lastValue??null)},highlightNextValue({context:e,prop:t}){let i=t("collection"),n=e.get("highlightedValue"),r=null;S(i)&&n?r=i.getNextRowValue(n):n&&(r=i.getNextValue(n)),!r&&(t("loopFocus")||!n)&&(r=i.firstValue),r&&e.set("highlightedValue",r)},highlightPreviousValue({context:e,prop:t}){let i=t("collection"),n=e.get("highlightedValue"),r=null;S(i)&&n?r=i.getPreviousRowValue(n):n&&(r=i.getPreviousValue(n)),!r&&(t("loopFocus")||!n)&&(r=i.lastValue),r&&e.set("highlightedValue",r)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},clearRangeEnd({refs:e}){e.set("currentValue",null)},selectItem({context:e,prop:t,event:i,computed:n}){let r=t("collection"),o=n("selection"),a=o.select(r,i.value);W(o,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:i}){let n=i("selection").deselect(t.value);e.set("value",Array.from(n))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let i=m({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",i.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let i=t("collection"),n=e.get("highlightedValue"),r=n?i.find(n):null;e.set("highlightedItem",r)},syncHighlightedValue({context:e,prop:t,refs:i}){let n=t("collection"),r=e.get("highlightedValue"),{autoHighlight:o}=i.get("inputState"),a=i.get("anchorValue");if(null==a||n.has(a)||(i.set("anchorValue",null),i.set("currentValue",null)),o)return void queueMicrotask(()=>{e.set("highlightedValue",t("collection").firstValue??null)});null==r||n.has(r)||queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let i=t("collection").firstValue;null!=i&&e.set("highlightedValue",i)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}});function W(e,t,i){for(let n of((e,t)=>{let i=new Set(e);for(let e of t)i.delete(e);return i})(t,e))i?.({value:n})}var K=i(3998),q=i(5089),Y=i(3457),X=i(4965);let J=(0,i(5397).y)("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText").build();var Q=(0,h.I)({name:"select",parts:["root","trigger","value","icon","sizer","native","content","viewport","item","rail","thumb"],settings:{radius:c.t.radius.md,"content-radius":c.t.radius.md,"thumb-radius":"2px","focus-ring":`0 0 0 3px ${c.t.focus.soft}`}}),Z=(0,d.H)({size:["md","sm"]}),ee=(0,p.AH)`@layer vela.ui{[data-slot=select-trigger]{box-sizing:border-box;border:1px solid ${c.t.border.strong};border-radius:${Q.vars.radius};width:100%;min-width:0;height:34px;color:${c.t.fg.bright};cursor:pointer;text-align:start;transition:border-color ${c.t.dur.fast} ease, box-shadow ${c.t.dur.fast} ease;background:0 0;outline:2px solid #0000;align-items:center;padding-block:0;padding-inline:8px 26px;font-family:inherit;font-size:14px;display:flex}[data-slot=select-trigger]:hover{border-color:${c.t.fg.muted}}[data-slot=select-trigger]:focus{border-color:${c.t.focus};box-shadow:${Q.vars["focus-ring"]}}[data-slot=select-value]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}[data-slot=select-icon]{inset-inline-end:8px;pointer-events:none;opacity:.55;color:inherit;line-height:0;display:flex;position:absolute;top:50%;transform:translateY(-50%)}[data-slot=select-icon]>span,[data-slot=select-icon] svg{width:12px;height:12px;display:block}[data-slot=select-sizer]{visibility:hidden;height:0;font-size:13px;overflow:hidden}[data-slot=select-sizer] span{white-space:nowrap;border-inline:1px solid #0000;height:0;padding-block:0;padding-inline:8px 26px;display:block}[data-slot=select-viewport]{width:max-content;min-width:100%;max-height:none;overflow:hidden}[data-slot=select-rail]{pointer-events:none;flex:none;width:3px;margin-block:2px;margin-inline:0 1px;position:relative}[data-slot=select-thumb]{border-radius:${Q.vars["thumb-radius"]};background:${c.t.scroll};width:3px}[data-slot=select-item]{white-space:nowrap;text-align:start;border-radius:${c.t.radius.sm};width:auto;min-width:100%;color:inherit;cursor:pointer;font:inherit;background:0 0;border:none;padding:7px 10px;font-weight:400;display:block}[data-slot=select-item]:hover,[data-slot=select-item][data-highlighted]{background:${c.t.hover}}[data-slot=select-item][data-checked]{background:${c.t.hover.strong};color:${c.t.fg.bright}}[data-slot=select-item][data-checked]:hover,[data-slot=select-item][data-checked][data-highlighted]{background:${c.t.hover.strong}}[data-slot=select-item][data-disabled]{opacity:.4;cursor:default;background:0 0}[data-slot=select-viewport]:focus{outline:2px solid #0000}[data-slot=select-value][data-placeholder]{color:${c.t.fg.muted}}[data-slot=select-native]{clip-path:inset(50%);white-space:nowrap;pointer-events:none;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}[data-slot=select]{min-width:0;position:relative}[data-slot=select]:where(:not([hidden])){display:inline-block}[data-slot=select][data-fill]{width:100%}[data-slot=select]:not([data-fill]){flex:none;justify-self:start;width:100px}[data-slot=select][data-size=sm] [data-slot=select-trigger]{background:${c.t.surface.elev};border-radius:${c.t.radius.sm};height:28px;color:${c.t.fg};box-shadow:none;font-size:13px}[data-slot=select][data-size=sm] [data-slot=select-trigger]:focus{box-shadow:none;border-color:${c.t.fg.muted}}[data-slot=select][data-size=sm]:not([data-fill]){width:auto;max-width:200px}[data-slot~=select-content]{background:${c.t.bg};width:max-content;color:${c.t.fg};border-radius:${Q.vars["content-radius"]};box-shadow:${c.t.shadow};font:14px ${c.t.font};border:none;padding:4px;overflow:hidden}[data-slot~=select-content][data-size=sm]{background:${c.t.surface.overlay};font-size:13px}[data-slot~=select-content][data-scroll]{align-items:stretch;gap:2px;display:flex}[data-slot~=select-content][data-scroll] [data-slot=select-viewport]{scrollbar-width:none;flex:auto;min-width:min-content;max-height:240px;overflow-y:auto}[data-slot~=select-content][data-scroll] [data-slot=select-viewport]::-webkit-scrollbar{width:0;height:0;display:none}}`,et=(0,p.Il)("vela-ui-select-3",ee);function ei(e,t){let i=e.clientHeight,n=e.scrollHeight;if(n<=i){t.style.height="0";return}let r=Math.max(20,i/n*i),o=e.scrollTop/(n-i)*(i-r);t.style.height=`${Math.round(r)}px`,t.style.transform=`translateY(${Math.round(o)}px`}function en(e,t,i,n,o={}){return(0,r.s0)()===e?((0,r.$b)(),null):function(e,t,i,n,o={}){et(e.ownerDocument),(0,r.$b)();let l=null,d=new r.AM({trigger:e,theme:o.theme,matchWidth:o.matchWidth??!0,collisionBoundary:o.collisionBoundary??o.boundary,boundaryInset:o.boundaryInset,side:o.side,sideOffset:o.sideOffset??o.gap??4,align:o.align??"start",alignOffset:o.alignOffset,avoidCollisions:o.avoidCollisions,collisionPadding:o.collisionPadding,host:o.host,position:o.position,zIndex:o.zIndex,className:"vela-select-list",slot:Q.slot("content"),onClose:()=>{l?.(),l=null;let t=e.ownerDocument.activeElement;o.focusList&&(!t||t===e.ownerDocument.body||d.el.contains(t))&&e.focus({preventScroll:!0}),o.onClose?.()},content:e=>{o.size&&(e.dataset.size=o.size),l=function(e,t,i,n){et(e.ownerDocument),(0,u.U)(e,Q.slot("content"));let r=!1,o=e=>{let i=t.find(t=>t.value===e);r||!i||i.disabled||(r=!0,n(i.value,i.label))},l=t.map(e=>(0,u.h)("button",{className:"vela-select-item",slot:Q.slot("item"),attrs:{type:"button",tabindex:-1,title:e.title},data:{checked:e.value===i?"1":null},text:e.label,on:{click:t=>{t.stopPropagation(),o(e.value)}}})),d=(0,u.h)("div",{className:"vela-select-items",slot:Q.slot("viewport")},l);e.replaceChildren(d);let c=(0,a.Ao)("vela-select-list"),h=t.some(e=>e.value===i),p=(0,a.xl)(j,{id:c,collection:V({items:t,itemToValue:e=>e.value,itemToString:e=>e.label,isItemDisabled:e=>!0===e.disabled}),selectionMode:"single",defaultValue:h?[i]:[],defaultHighlightedValue:h?i:null,onSelect:({value:e})=>o(e)},e=>{let i=function(e,t){let{context:i,prop:n,scope:r,computed:o,send:a,refs:s}=e,l=n("disabled"),d=n("collection"),u=S(d)?"grid":"list",c=i.get("focused"),h=s.get("focusVisible")&&c,p=s.get("inputState"),g=i.get("value"),f=o("selectedItems"),m=i.get("highlightedValue"),b=i.get("highlightedItem"),v=o("isTypingAhead"),y=o("isInteractive"),x=m?M(r,m):void 0;function w(e){let t=d.getItemDisabled(e.item),n=d.getItemValue(e.item);(0,X.D8)(n,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`);let r=m===n;return{value:n,disabled:!!(l||t),focused:r&&c,focusVisible:r&&h,highlighted:r&&(p.focused?c:h),selected:i.get("value").includes(n)}}return{empty:0===g.length,highlightedItem:b,highlightedValue:m,clearHighlightedValue(){a({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:f,hasSelectedItems:o("hasSelectedItems"),value:g,valueAsString:o("valueAsString"),collection:d,disabled:!!l,selectValue(e){a({type:"ITEM.SELECT",value:e})},setValue(e){a({type:"VALUE.SET",value:e})},selectAll(){if(!o("multiple"))throw Error("[zag-js] Cannot select all items in a single-select listbox");a({type:"VALUE.SET",value:d.getValues()})},highlightValue(e){a({type:"HIGHLIGHTED_VALUE.SET",value:e})},highlightFirst(){a({type:"HIGHLIGHT.FIRST"})},highlightLast(){a({type:"HIGHLIGHT.LAST"})},highlightNext(){a({type:"HIGHLIGHT.NEXT"})},highlightPrevious(){a({type:"HIGHLIGHT.PREV"})},clearValue(e){e?a({type:"ITEM.CLEAR",value:e}):a({type:"VALUE.CLEAR"})},getItemState:w,getRootProps:()=>t.element({...J.root.attrs,dir:n("dir"),id:r.ids?.root??`listbox:${r.id}`,"data-orientation":n("orientation"),"data-disabled":(0,K.sE)(l)}),getInputProps(e={}){let i=e.keyboardPriority??"caret";return t.input({...J.input.attrs,dir:n("dir"),disabled:l,"data-disabled":(0,K.sE)(l),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":F(r),"aria-autocomplete":"list","aria-activedescendant":x,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{a({type:"INPUT.FOCUS",autoHighlight:!!e?.autoHighlight})})},onBlur(){a({type:"CONTENT.BLUR",src:"input"})},onInput(t){e?.autoHighlight&&(t.currentTarget.value.trim()||queueMicrotask(()=>{a({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(e){if(e.defaultPrevented||(0,q.q_)(e))return;let t=(0,q.mK)(e),n=()=>{e.preventDefault();let i=new(r.getWin()).KeyboardEvent(t.type,t);H(r)?.dispatchEvent(i)};switch(t.key){case"ArrowLeft":case"ArrowRight":if(!S(d)||e.ctrlKey||"navigate"!==i)return;n();break;case"Home":case"End":if("navigate"!==i||null==m&&e.shiftKey)return;n();break;case"ArrowDown":case"ArrowUp":n();break;case"Enter":null!=m&&(e.preventDefault(),a({type:"ITEM.CLICK",value:m}))}}})},getLabelProps:()=>t.element({dir:n("dir"),id:D(r),...J.label.attrs,"data-disabled":(0,K.sE)(l)}),getValueTextProps:()=>t.element({...J.valueText.attrs,dir:n("dir"),"data-disabled":(0,K.sE)(l)}),getItemProps(e){let i=w(e);return t.element({id:M(r,i.value),role:"option",...J.item.attrs,dir:n("dir"),"data-value":i.value,"aria-selected":i.selected,"data-selected":(0,K.sE)(i.selected),"data-layout":u,"data-state":i.selected?"checked":"unchecked","data-orientation":n("orientation"),"data-highlighted":(0,K.sE)(i.highlighted),"data-disabled":(0,K.sE)(i.disabled),"aria-disabled":(0,K.rq)(i.disabled),onPointerMove(t){e.highlightOnHover&&!i.disabled&&"mouse"===t.pointerType&&"pointer"===(0,L.ME)()&&(i.highlighted||a({type:"ITEM.POINTER_MOVE",value:i.value}))},onMouseDown(e){e.preventDefault(),H(r)?.focus()},onClick(e){!(e.defaultPrevented||(0,q.b9)(e)||(0,q.$b)(e)||(0,q.fv)(e))&&(i.disabled||a({type:"ITEM.CLICK",value:i.value,shiftKey:e.shiftKey,metaKey:(0,q.f2)(e)}))}})},getItemTextProps(e){let i=w(e);return t.element({...J.itemText.attrs,"data-state":i.selected?"checked":"unchecked","data-disabled":(0,K.sE)(i.disabled),"data-highlighted":(0,K.sE)(i.highlighted)})},getItemIndicatorProps(e){let i=w(e);return t.element({...J.itemIndicator.attrs,"aria-hidden":!0,"data-state":i.selected?"checked":"unchecked",hidden:!i.selected})},getItemGroupLabelProps(e){let{htmlFor:i}=e;return t.element({...J.itemGroupLabel.attrs,id:z(r,i),dir:n("dir"),role:"presentation"})},getItemGroupProps(e){let{id:i}=e;return t.element({...J.itemGroup.attrs,"data-disabled":(0,K.sE)(l),"data-orientation":n("orientation"),"data-empty":(0,K.sE)(0===d.size),id:r.ids?.itemGroup?.(i)??`listbox:${r.id}:item-group:${i}`,"aria-labelledby":z(r,i),role:"group",dir:n("dir")})},getContentProps:()=>t.element({dir:n("dir"),id:F(r),role:"listbox",...J.content.attrs,"data-activedescendant":x,"aria-activedescendant":x,"data-orientation":n("orientation"),"aria-multiselectable":!!o("multiple")||void 0,"aria-labelledby":D(r),tabIndex:0,"data-layout":u,"data-empty":(0,K.sE)(0===d.size),style:{"--column-count":S(d)?d.columnCount:1},onFocus(){a({type:"CONTENT.FOCUS"})},onBlur(){a({type:"CONTENT.BLUR"})},onKeyDown(e){if(!y)return;let t=(0,q.wt)(e);if(!(0,Y.gR)(e.currentTarget,(0,q.wt)(e)))return;let i=e.shiftKey,r={ArrowUp(e){let t=null;S(d)&&m?t=d.getPreviousRowValue(m):m&&(t=d.getPreviousValue(m)),!t&&(n("loopFocus")||!m)&&(t=d.lastValue),t&&(e.preventDefault(),a({type:"NAVIGATE",value:t,shiftKey:i}))},ArrowDown(e){let t=null;S(d)&&m?t=d.getNextRowValue(m):m&&(t=d.getNextValue(m)),!t&&(n("loopFocus")||!m)&&(t=d.firstValue),t&&(e.preventDefault(),a({type:"NAVIGATE",value:t,shiftKey:i}))},ArrowLeft(){if(!S(d)&&"vertical"===n("orientation"))return;let t=m?d.getPreviousValue(m):null;!t&&n("loopFocus")&&(t=d.lastValue),t&&(e.preventDefault(),a({type:"NAVIGATE",value:t,shiftKey:i}))},ArrowRight(){if(!S(d)&&"vertical"===n("orientation"))return;let t=m?d.getNextValue(m):null;!t&&n("loopFocus")&&(t=d.firstValue),t&&(e.preventDefault(),a({type:"NAVIGATE",value:t,shiftKey:i}))},Home(e){(0,Y.fg)(t)||(e.preventDefault(),a({type:"NAVIGATE",value:d.firstValue,shiftKey:i}))},End(e){(0,Y.fg)(t)||(e.preventDefault(),a({type:"NAVIGATE",value:d.lastValue,shiftKey:i}))},Enter(){a({type:"ITEM.CLICK",value:m})},a(e){(0,q.f2)(e)&&o("multiple")&&!n("disallowSelectAll")&&(e.preventDefault(),a({type:"VALUE.SET",value:d.getValues()}))},Space(e){v&&n("typeahead")?a({type:"CONTENT.TYPEAHEAD",key:e.key}):r.Enter?.(e)},Escape(e){n("deselectable")&&g.length>0&&(e.preventDefault(),e.stopPropagation(),a({type:"VALUE.CLEAR"}))}},s=(0,q.K)(e,{dir:n("dir")}),l="a"!==s||(0,q.f2)(e)?r[s]:void 0;if(l)return void l(e);!(0,Y.fg)(t)&&$.t.isValidEvent(e)&&n("typeahead")&&(a({type:"CONTENT.TYPEAHEAD",key:e.key}),e.preventDefault())}})}}(e,s._B);(0,a.iU)(d,i.getContentProps(),c),t.forEach((e,t)=>(0,a.iU)(l[t],i.getItemProps({item:e,highlightOnHover:!0}),c))});return d.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&e.preventDefault()}),()=>p.stop()}(e,t,i,(e,t)=>{d.hide(),n(e,t)})}});d.show();var c=d.el;let h=c.querySelector(`[data-slot='${Q.slot("viewport")}']`);if(h){if(h.scrollHeight>240){c.classList.add("is-scroll"),c.dataset.scroll="";let e=(0,u.h)("div",{className:"vela-select-thumb",slot:Q.slot("thumb")});c.appendChild((0,u.h)("div",{className:"vela-select-rail",slot:Q.slot("rail")},e)),h.addEventListener("scroll",()=>ei(h,e)),ei(h,e)}c.querySelector(`[data-slot='${Q.slot("item")}'][data-checked]`)?.scrollIntoView({block:"nearest"}),h.dispatchEvent(new Event("scroll"))}return d.reposition(),o.focusList&&d.el.querySelector(`[data-slot='${Q.slot("viewport")}']`)?.focus({preventScroll:!0}),d}(e,t,i,n,o)}var er=class{constructor(e){this.list=null;let t=e.list?.host?.ownerDocument??document;et(t),this.ctrl=function(e){let t=e.options,i=e.value??e.defaultValue??(void 0!==e.placeholder?"":t[0]?.value??""),n=e.size??"md";return{options:t,get value(){return i},size:n,fill:e.fill??"sm"!==n,disabled:e.disabled??!1,setValue(e){i=e},labelOf:e=>t.find(t=>t.value===e)?.label??e,pick(n){i=n;let r=t.find(e=>e.value===n)?.label??n;return e.onValueChange?.(n,r),e.onChange?.(n,r),{value:n,label:r}}}}(e);let i=Object.fromEntries(["side","align","sideOffset","alignOffset","avoidCollisions","collisionPadding","collisionBoundary"].filter(t=>void 0!==e[t]).map(t=>[t,e[t]]));this.listOpts={...e.list,...i,theme:e.theme??e.list?.theme,size:this.ctrl.size},this.placeholder=e.placeholder;let n=(0,u.h)("span",{className:"vela-select-label",slot:Q.slot("value")}),r=(0,u.h)("button",{className:"vela-select-trigger",slot:Q.slot("trigger"),attrs:{type:"button",id:e.id,"aria-haspopup":"listbox","aria-expanded":"false","aria-required":e.required?"true":void 0}},n,(0,u.h)("span",{className:"vela-select-chevron",slot:Q.slot("icon")},(0,l.x_)("chevron-down",t)));r.disabled=this.ctrl.disabled;let a="sm"===this.ctrl.size?(0,u.h)("div",{className:"vela-select-sizer",slot:Q.slot("sizer"),attrs:{"aria-hidden":"true"}},this.ctrl.options.map(e=>(0,u.h)("span",{text:e.label}))):null;this.native=void 0!==e.name?(0,u.h)("select",{slot:Q.slot("native"),attrs:{name:e.name,"aria-hidden":"true",tabindex:-1}},void 0!==e.placeholder?(0,u.h)("option",{attrs:{value:""}}):null,this.ctrl.options.map(e=>(0,u.h)("option",{attrs:{value:e.value,disabled:e.disabled},text:e.label}))):null,this.native&&(this.native.required=!0===e.required,this.native.disabled=this.ctrl.disabled),this.el=(0,u.h)("div",{className:"vela-select",slot:Q.slot("root"),attrs:Z({size:this.ctrl.size}),data:{fill:this.ctrl.fill}},r,a,this.native),r.addEventListener("pointerdown",e=>{e.preventDefault(),r.focus({preventScroll:!0})}),r.addEventListener("click",e=>{e.stopPropagation(),this.toggle()}),r.addEventListener("keydown",e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||this.list||(e.preventDefault(),this.toggle())}),this.trigger=r,this.labelEl=n,this.paint(),this.release=(0,o.j)(this.el,()=>{this.list?.hide(),this.list=null})}get value(){return this.ctrl.value}setValue(e){this.ctrl.setValue(e),this.paint()}paint(){let e=this.ctrl.value,t=void 0!==this.placeholder&&!this.ctrl.options.some(t=>t.value===e);this.labelEl.textContent=t?this.placeholder??"":this.ctrl.labelOf(e),this.labelEl.toggleAttribute("data-placeholder",t),this.native&&(this.native.value=t?"":e)}toggle(){this.list=en(this.trigger,this.ctrl.options,this.ctrl.value,e=>{this.ctrl.pick(e),this.paint(),this.list=null},{...this.listOpts,focusList:!0,onClose:()=>{this.list=null,this.trigger.setAttribute("aria-expanded","false"),this.listOpts.onClose?.()}}),this.trigger.setAttribute("aria-expanded",String(null!==this.list))}destroy(){this.release()}}},9095:(e,t,i)=>{i.d(t,{$S:()=>d,CF:()=>s,U4:()=>o,_T:()=>a,uf:()=>l});var n=i(3457);function r(e,t){let{type:i="HTMLInputElement",property:r="value"}=t;return Object.getOwnPropertyDescriptor((0,n.zk)(e)[i].prototype,r)??{}}function o(e,t,i="value"){if(!e)return;let n="input"===e.localName?"HTMLInputElement":"textarea"===e.localName?"HTMLTextAreaElement":"select"===e.localName?"HTMLSelectElement":void 0;n&&r(e,{type:n,property:i}).set?.call(e,t),e.setAttribute(i,t)}function a(e,t){e&&(r(e,{type:"HTMLInputElement",property:"checked"}).set?.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function s(e,t){let{value:i,bubbles:r=!0}=t;if(!e)return;let a=(0,n.zk)(e);if(!(e instanceof a.HTMLInputElement))return;o(e,`${i}`);let s=new a.Event("input",{bubbles:r});e.dispatchEvent(c(s))}function l(e,t){let{checked:i,bubbles:r=!0}=t;if(!e)return;let o=(0,n.zk)(e);if(!(e instanceof o.HTMLInputElement))return;a(e,i);let s=new o.Event("click",{bubbles:r});e.dispatchEvent(c(s))}function d(e,t){if(!e)return;let{onFieldsetDisabledChange:i,onFormReset:r}=t,o=[function(e,t){if(!e)return;let i=e.matches("textarea, input, select, button")?e.form:e.closest("form"),n=e=>{e.defaultPrevented||t()};return i?.addEventListener("reset",n,{passive:!0}),()=>i?.removeEventListener("reset",n)}(e,r),function(e,t){let i=e?.closest("fieldset");if(!i)return;t(i.disabled);let r=new((0,n.zk)(i)).MutationObserver(()=>t(i.disabled));return r.observe(i,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}(e,i)];return()=>o.forEach(e=>e?.())}let u=Symbol.for("zag.changeEvent");function c(e){return Object.prototype.hasOwnProperty.call(e,u)||Object.defineProperty(e,u,{value:!0}),e}},9138:(e,t,i)=>{i.d(t,{qD:()=>g,vv:()=>p});var n=i(3825),r=i(4897),o=i(7042),a=i(6806),s=i(4561),l=i(542),d=[1,2,3,4,5],u=(0,s.I)({name:"glyph-select",parts:["root","value","icon","content","item"],settings:{radius:a.t.radius.md,"content-radius":a.t.radius.md,"focus-ring":`0 0 0 3px ${a.t.focus.soft}`}}),c=(0,l.Il)("vela-ui-glyph-select",(0,l.AH)`@layer vela.ui{[data-slot=glyph-select]{border:1px solid ${a.t.border.strong};border-radius:${u.vars.radius};cursor:pointer;height:34px;color:${a.t.fg.bright};transition:border-color ${a.t.dur.fast} ease, box-shadow ${a.t.dur.fast} ease;background:0 0;outline:2px solid #0000;flex:none;justify-self:start;align-items:center;gap:8px;padding-block:0;padding-inline:8px 26px;font-family:inherit;font-size:14px;position:relative}[data-slot=glyph-select]:where(:not([hidden])){display:inline-flex}[data-slot=glyph-select]:hover{border-color:${a.t.fg.muted}}[data-slot=glyph-select]:focus{border-color:${a.t.focus};box-shadow:${u.vars["focus-ring"]}}[data-slot=glyph-select-icon]{inset-inline-end:8px;opacity:.55;color:inherit;pointer-events:none;line-height:0;display:flex;position:absolute;top:50%;transform:translateY(-50%)}[data-slot~=glyph-select-content]{background:${a.t.bg};border-radius:${u.vars["content-radius"]};box-shadow:${a.t.shadow};color:${a.t.fg};font:14px ${a.t.font};border:none;flex-direction:column;gap:1px;padding:4px;display:flex}[data-slot=glyph-select-item]{border-radius:${a.t.radius.sm};min-width:96px;color:inherit;cursor:pointer;text-align:start;font:inherit;background:0 0;border:none;align-items:center;gap:8px;padding:7px 10px;display:flex}[data-slot=glyph-select-item]:hover{background:${a.t.hover}}[data-slot=glyph-select-item][data-active="1"]{background:${a.t.hover.strong};color:${a.t.fg.bright}}}`),h=class{constructor(e){c(document),this.placement=e,this.ctrl=function(e){let t=e.value;return{options:e.options,get value(){return t},setValue(e){t=e},optionOf:t=>e.options.find(e=>e.value===t),pick:i=>(t=i,e.onChange?.(i),i)}}(e),this.theme=e.theme,this.get=e.get??(()=>this.ctrl.value);let t=(0,o.h)("button",{className:"vela-glyph-select",slot:u.slot("root"),attrs:{type:"button",title:e.title}});this.el=t,this.paint(),t.addEventListener("pointerdown",e=>{e.preventDefault(),t.focus({preventScroll:!0})}),t.addEventListener("click",e=>{e.stopPropagation(),this.toggle()}),t.addEventListener("vela-sync",()=>{this.ctrl.setValue(this.get()),this.paint()})}setValue(e){this.ctrl.setValue(e),this.paint()}destroy(){}paint(){let e=this.ctrl.optionOf(this.get()),t=(0,o.h)("span",{slot:u.slot("value"),style:"display:flex"});t.innerHTML=e?.glyph??"";let i=(0,o.h)("span",{className:"vela-glyph-select-caret",slot:u.slot("icon")},(0,r.x_)("chevron-down",this.el.ownerDocument));this.el.replaceChildren(t,i)}toggle(){if((0,n.s0)()===this.el)return void(0,n.$b)();let e=this.get(),t=new n.AM({trigger:this.el,theme:this.theme,side:this.placement.side,align:this.placement.align??"end",sideOffset:this.placement.sideOffset??6,alignOffset:this.placement.alignOffset,avoidCollisions:this.placement.avoidCollisions,collisionPadding:this.placement.collisionPadding,collisionBoundary:this.placement.collisionBoundary,className:"vela-glyph-select-pop",slot:u.slot("content"),content:i=>{for(let n of(i.style.font=`var(--vela-font-size-md) ${this.theme.fontFamily}`,this.ctrl.options)){let r=(0,o.h)("button",{className:"vela-glyph-select-item",slot:u.slot("item"),attrs:{type:"button"},data:{active:n.value===e?"1":"0"}});r.innerHTML=`<span style="display:flex;flex:none;">${n.glyph}</span><span style="flex:1;font-variant-numeric:tabular-nums;">${n.label}</span>`,r.addEventListener("click",e=>{e.stopPropagation(),t.hide(),this.ctrl.pick(n.value),this.paint()}),i.appendChild(r)}}});t.show()}};function p(e,t,i){return new h({theme:e,options:d.map(e=>({value:e,label:`${e}px`,glyph:`<svg width="22" height="14" viewBox="0 0 22 14" fill="none"><line x1="2" y1="7" x2="20" y2="7" stroke="currentColor" stroke-width="${e}" stroke-linecap="round"/></svg>`})),value:t(),get:t,onChange:i}).el}function g(){(0,n.$b)()}},9171:(e,t,i)=>{i.d(t,{t:()=>a});var n=i(7660),r=i(9748),o=i(5788),a=class{constructor(e){this.menu=null,this.press=null,this.pressOpened=!1,this.onContextMenu=e=>{if(e.defaultPrevented)return;if(this.pressOpened)return void e.preventDefault();let t=null!==this.press;this.cancelPress();let i=e.clientX,n=e.clientY,r=e.target;if(0===i&&0===n&&r&&"function"==typeof r.getBoundingClientRect){let e=r.getBoundingClientRect();i=e.left,n=e.bottom}this.openAt(i,n,e)&&(e.preventDefault(),t&&(this.pressOpened=!0))},this.onPointerDown=e=>{if(this.pressOpened=!1,"mouse"===e.pointerType||!e.isPrimary)return;this.cancelPress();let t=setTimeout(()=>{let e=this.press;this.press=null,e&&this.openAt(e.x,e.y,e.event)&&(this.pressOpened=!0)},500);this.press={x:e.clientX,y:e.clientY,pointer:e.pointerId,event:e,timer:t}},this.onPointerMove=e=>{let t=this.press;t&&e.pointerId===t.pointer&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>10&&this.cancelPress()},this.cancelPress=()=>{this.press&&clearTimeout(this.press.timer),this.press=null},this.onClick=e=>{this.pressOpened&&(this.pressOpened=!1,e.preventDefault(),e.stopPropagation())},this.props=e,this.target=e.target,this.items=e.items,this.i18n=e.i18n??(0,r.N)(),this.longPress=!1!==e.longPress;let t=this.target;t.addEventListener("contextmenu",this.onContextMenu),this.longPress&&(t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.cancelPress),t.addEventListener("pointercancel",this.cancelPress),t.addEventListener("click",this.onClick,!0),t.style.setProperty("-webkit-touch-callout","none")),this.release=(0,o.j)(t,()=>this.teardown())}get api(){return this.ensureMenu().api}get open(){return this.menu?.api.open??!1}openAt(e,t,i){let n="function"==typeof this.items?this.items(i??new MouseEvent("contextmenu",{clientX:e,clientY:t})):this.items;if(!n||0===n.length)return!1;let r=this.ensureMenu();return r.setItems(n),r.openAt(e,t),!0}close(){this.menu?.close()}setItems(e){this.items=e,this.menu&&this.open&&"function"!=typeof e&&this.menu.setItems(e)}destroy(){this.release()}ensureMenu(){if(this.menu)return this.menu;let e=this.props;return this.menu=new n.rI({host:e.host??this.target,items:[],side:"bottom",align:"start",checkmarks:e.checkmarks??!0,i18n:this.i18n,onSelect:t=>e.onSelect?.(t),...e.onOpenChange?{onOpenChange:e.onOpenChange}:{},...void 0!==e.iconBadges?{iconBadges:e.iconBadges}:{},...void 0!==e.minWidth?{minWidth:e.minWidth}:{},...e.onFavorite?{onFavorite:e.onFavorite}:{},...void 0!==e.collisionPadding?{collisionPadding:e.collisionPadding}:{},...void 0!==e.collisionBoundary?{collisionBoundary:e.collisionBoundary}:{}}),this.menu}teardown(){this.cancelPress();let e=this.target;e.removeEventListener("contextmenu",this.onContextMenu),this.longPress&&(e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.cancelPress),e.removeEventListener("pointercancel",this.cancelPress),e.removeEventListener("click",this.onClick,!0),e.style.removeProperty("-webkit-touch-callout")),this.menu?.destroy(),this.menu=null}}},9285:(e,t,i)=>{i.d(t,{$5:()=>s,PS:()=>c,d:()=>l,mX:()=>u,sV:()=>d});var n=i(3457);let r=new Set(["menu","listbox","dialog","grid","tree","region","application"]),o=e=>r.has(e),a=e=>e.getAttribute("aria-controls")?.split(" ")||[];function s(e,t){let i=new Set,r=(0,n.zm)(e),s=e=>{for(let n of e.querySelectorAll("[aria-controls]"))if("true"===n.getAttribute("aria-expanded"))for(let e of a(n)){if(!e||i.has(e))continue;i.add(e);let n=r.getElementById(e);if(n){let e=n.getAttribute("role"),i="true"===n.getAttribute("aria-modal");if(e&&o(e)&&!i&&(n===t||n.contains(t)||s(n)))return!0}}return!1};return s(e)}function l(e,t){let i=(0,n.zm)(e),o=new Set,s=e=>{for(let n of e.querySelectorAll("[aria-controls]"))if("true"===n.getAttribute("aria-expanded"))for(let e of a(n)){if(!e||o.has(e))continue;o.add(e);let n=i.getElementById(e);if(n){let e=n.getAttribute("role"),i="true"===n.getAttribute("aria-modal");e&&r.has(e)&&!i&&(t(n),s(n))}}};s(e)}function d(e){let t=new Set;return l(e,i=>{e.contains(i)||t.add(i)}),Array.from(t)}function u(e){return!!e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")||!!e.querySelector?.('[aria-controls][aria-expanded="true"]')}function c(e){if(!e.id)return!1;let t=(0,n.zm)(e),i=CSS.escape(e.id),o=`[aria-controls~="${i}"][aria-expanded="true"], [aria-controls="${i}"][aria-expanded="true"]`;return!!(t.querySelector(o)&&function(e){let t=e.getAttribute("role");return!!(t&&r.has(t))}(e))}},9358:(e,t,i)=>{i.d(t,{K:()=>a,R:()=>o});var n=i(3457),r=i(648);function o(e){let{root:t,getInitialEl:i,filter:n,enabled:o=!0}=e;if(!o)return!1;let a="function"==typeof i?i():i;return!1!==a&&(a||(a=t?.matches("[data-autofocus],[autofocus]")?t:t?.querySelector("[data-autofocus],[autofocus]")),a||(a=(0,r.j9)(t).filter(e=>!n||n(e)).find(e=>!e.hasAttribute("data-no-autofocus"))),a||t||void 0)}function a(e){let t=e.currentTarget;if(!t)return!1;let[i,o]=(0,r.yF)(t);return!((0,n.X7)(i)&&e.shiftKey||(0,n.X7)(o)&&!e.shiftKey)&&(!!i||!!o)}},9499:(e,t,i)=>{i.r(t),i.d(t,{ACCENT:()=>o.bg,ACCENT_BRIGHT:()=>o.SO,BEARISH:()=>o.TV,BULLISH:()=>o.cr,BarStore:()=>r.Rz,CATEGORICAL:()=>o.tv,CHIP_PLATE:()=>o.me,CONTEXT_MENU_BUILTIN_ORDER:()=>a.nPZ,CROSSHAIR:()=>o.tH,CachingDataFeed:()=>r.e1,ClockCorrection:()=>r.Bq,DARK_THEME:()=>r.n0,DEFAULT_PANEL_MAX_WIDTH:()=>a.tiQ,DEFAULT_PANEL_MIN_WIDTH:()=>a.VXZ,DEFAULT_PANEL_WIDTH:()=>a.a0W,DataControl:()=>r.cm,DataUnavailableError:()=>a.F8H,Drawing:()=>a.H1B,DrawingStore:()=>r.IK,DrawingToolbar:()=>r.g7,DrawingsControl:()=>r.RN,HIGHLIGHT:()=>o.jY,INFO:()=>o.rD,INVALID:()=>o.uY,LIGHT_THEME:()=>r.dA,MARKER:()=>o.tl,MarksControl:()=>r.IU,MultiProviderFeed:()=>r.dL,NEUTRAL:()=>o.qm,NativeRenderer:()=>r.xg,OVERRIDABLE_TOPBAR_IDS:()=>a.KL0,RendererControl:()=>r.FN,ReplayControl:()=>r.z6,SERIES_LINE:()=>o.NP,SESSION_OFF:()=>o.Tp,SESSION_POST:()=>o.cw,SESSION_PRE:()=>o.XR,SIDEBAR_DEFAULT_BOTTOM:()=>a.DJu,SIDEBAR_DEFAULT_TOP:()=>a.$bG,SLATE:()=>o.EA,SLATE_DEEP:()=>o.$J,SecondClock:()=>r.TR,TRADE_EXIT:()=>o.we,TRADE_LONG:()=>o.kh,TRADE_SHORT:()=>o.UT,TypedEventBus:()=>r.vZ,VALID:()=>o.dO,Vela:()=>r.HO,WARNING:()=>o.Nz,barsToTicks:()=>u,buildToolbar:()=>r.YE,categoricalColor:()=>o.w0,chartType:()=>a.V$N,chartTypes:()=>a.AHy,checkTheme:()=>l.aC,clampPanelWidth:()=>a.Iqz,clockCorrection:()=>r.dK,composeSidebar:()=>a.PTe,createDrawing:()=>a.vBD,createTheme:()=>l.an,createTranslator:()=>s.HM,defaultToolbar:()=>r.rP,deserializeDrawing:()=>a.erJ,drawingActions:()=>a.EnM,drawingTypes:()=>a.SRh,getDrawingType:()=>a.jOy,getNativeIndicator:()=>a.pSI,iconMarkup:()=>n.UT,inputDeltas:()=>a.cXX,inputVisible:()=>a.dxV,isDataUnavailableError:()=>a.DhR,isNewerBar:()=>a.vQt,isSameBar:()=>a.SyC,isTickTimeframe:()=>a.ung,isVariableDurationTimeframe:()=>a.jJY,legendActions:()=>a.XQY,legendCallouts:()=>a.FwO,lowerTimeframeTicks:()=>d,msg:()=>s.ab,nativeIndicatorDescriptors:()=>a.BVy,nativeIndicatorTypes:()=>a.kVo,normalizeSettingsRow:()=>a.ZNF,parseTickTimeframe:()=>a.lw4,priceStyleApplies:()=>a.hGA,registerChartType:()=>a.w$2,registerDefaultEngine:()=>a.HSS,registerDrawingAction:()=>a.SWQ,registerDrawingType:()=>a.yl4,registerIcon:()=>n.pU,registerLegendAction:()=>a.tX0,registerLegendCallout:()=>a.$uG,registerLocale:()=>s.E,registerNativeIndicator:()=>a.WG7,registerRendererDefaults:()=>a.fjB,registerRendererLayer:()=>a.__2,registerSeriesAdapter:()=>a.yce,registerShellDefaults:()=>a.kR9,registerSidePanel:()=>a.FF,registerStatePersistence:()=>a.kzO,registerSymbolRanking:()=>a.qJx,registerTheme:()=>r.bf,registerWidgetAction:()=>a.qxd,registerWidgetAttachment:()=>a.$jD,registeredLocales:()=>s.SE,registeredThemes:()=>r.$S,rendererDefaults:()=>a.gNA,rendererLayers:()=>a.Sw8,resolveEngines:()=>a.kw_,resolveTheme:()=>r.eW,seriesAdapters:()=>a.Kiu,seriesInScale:()=>a.JVt,seriesShownOn:()=>a.oBL,settingsRowValueKeys:()=>a.JwL,sharedBarStore:()=>r.i5,shellDefaults:()=>a.FNx,shownPriceStyle:()=>a.g7Z,sidePanels:()=>a.bXm,stableSeriesId:()=>a.uZt,statePersistenceHandlers:()=>a.o7m,symbolRanking:()=>a.lYm,tickerModifierIds:()=>a.sFz,timeframeToMs:()=>a.cle,topbarActionOverride:()=>a.Lo0,unregisterChartType:()=>a.NSW,unregisterDefaultEngine:()=>a.Cfw,unregisterDrawingAction:()=>a.b9G,unregisterLegendAction:()=>a.Yfg,unregisterLegendCallout:()=>a.Uah,unregisterNativeIndicator:()=>a.VEu,unregisterRendererDefaults:()=>a.Sb4,unregisterRendererLayer:()=>a.tKC,unregisterSeriesAdapter:()=>a.dmU,unregisterShellDefaults:()=>a.RO3,unregisterSidePanel:()=>a.owM,unregisterStatePersistence:()=>a.vUL,unregisterWidgetAction:()=>a.nzy,unregisterWidgetAttachment:()=>a.Ie5,widgetActions:()=>a.c3Y,widgetAttachments:()=>a.jhg,withValues:()=>s.tV});var n=i(4897),r=i(5854),o=i(3678),a=i(8592),s=i(7040),l=i(7062);function d(e,t){return async(i,{end:n,signal:r})=>{let{symbol:o,session:a}=e.market,s=o?e.data.resolve(o):null,l=s?e.data.providerInstance(s.provider):void 0;if(!s||!l)return[];let d=await l.getBars(s.ticker,t,{from:i.time,to:n-1,...a?{session:a}:{}});return r.aborted?[]:u(d.filter(e=>e.time>=i.time&&e.time<n))}}function u(e){return e.map(e=>({price:e.close,open:e.open,high:e.high,low:e.low,...void 0===e.volume?{}:{volume:e.volume}}))}},9508:(e,t,i)=>{i.d(t,{lr:()=>S,eq:()=>E});var n=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=["Su","Mo","Tu","We","Th","Fr","Sa"],a=/[\u200e\u200f\u061c]/g,s=e=>e.replace(a,""),l=new Map;function d(e,t){let i=`${e.locale}|${e.numberingSystem}|${JSON.stringify(t)}`,n=l.get(i);if(!n){try{n=new Intl.DateTimeFormat(e.locale,{...t,timeZone:"UTC",calendar:"gregory",numberingSystem:e.numberingSystem})}catch{n=new Intl.DateTimeFormat("en",{...t,timeZone:"UTC",calendar:"gregory"})}l.set(i,n)}return n}var u=new Map;function c(e,t){let i=`${t.locale}|${t.numberingSystem}`,n=u.get(i);if(void 0===n){let e;try{e=new Intl.NumberFormat(t.locale,{numberingSystem:t.numberingSystem,useGrouping:!1,maximumFractionDigits:0})}catch{e=new Intl.NumberFormat("en",{useGrouping:!1,maximumFractionDigits:0})}let r=Array.from({length:10},(t,i)=>s(e.format(i)));n=r.every((e,t)=>e===String(t))?null:r,u.set(i,n)}if(!n)return e;let r=n;return e.replace(/[0-9]/g,e=>r[Number(e)])}function h(e,t){if(e.english)return[..."long"===t?n:r];let i=d(e,{month:t});return Array.from({length:12},(e,t)=>s(i.format(Date.UTC(2e3,t,15))))}var p=new Map,g=i(1404),f=i(4897),m=i(7042),b=i(6806),v=i(4561),y=i(542),x={prevMonth:(0,g.a)("ui.datePicker.previousMonth","Previous month"),nextMonth:(0,g.a)("ui.datePicker.nextMonth","Next month"),prevYear:(0,g.a)("ui.datePicker.previousYear","Previous year"),nextYear:(0,g.a)("ui.datePicker.nextYear","Next year"),prevDecade:(0,g.a)("ui.datePicker.previousDecade","Previous decade"),nextDecade:(0,g.a)("ui.datePicker.nextDecade","Next decade")};function w(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function E(e){let t=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(e.trim());if(!t)return null;let i=Number(t[1]),n=Number(t[2]),r=Number(t[3]),o=new Date(i,n-1,r);return o.getFullYear()!==i||o.getMonth()!==n-1||o.getDate()!==r?null:w(o)}function k(e){let t=e?E(e):null;if(!t)return null;let[i,n,r]=t.split("-").map(Number);return new Date(i,n-1,r)}var T=(0,v.I)({name:"date-picker",parts:["root","head","title","switch","nav","week","grid","cells","blank","day","cell"],settings:{radius:b.t.radius.sm,"today-ring":`inset 0 0 0 1px ${b.t.border.strong}`}}),O=(0,g.a)("ui.datePicker.chooseMonth","Choose month"),C=(0,g.a)("ui.datePicker.chooseYear","Choose year"),I=(0,y.Il)("vela-date-picker-styles",(0,y.AH)`@layer vela.ui{[data-slot=date-picker]{color:${b.t.fg};font:14px ${b.t.font};-webkit-user-select:none;user-select:none}[data-slot=date-picker-head]{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}[data-slot=date-picker-title]{flex:1;justify-content:center;align-items:center;gap:2px;min-width:0;display:flex}[data-slot=date-picker-switch]{color:${b.t.fg.bright};font:inherit;border-radius:${T.vars.radius};cursor:pointer;background:0 0;border:none;padding:2px 6px;font-size:14px;font-weight:600}[data-slot=date-picker-switch]:disabled{cursor:default}[data-slot=date-picker-switch]:not(:disabled):hover{background:${b.t.hover}}[data-slot=date-picker-nav]{width:24px;height:24px;color:${b.t.fg.muted};border-radius:${T.vars.radius};cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;font-size:14px;display:inline-flex}[data-slot=date-picker-nav]:hover{background:${b.t.hover};color:${b.t.fg.bright}}[data-slot=date-picker-week],[data-slot=date-picker-grid]{grid-template-columns:repeat(7,28px);gap:2px}[data-slot=date-picker-week]:where(:not([hidden])),[data-slot=date-picker-grid]{display:grid}[data-slot=date-picker-week]{color:${b.t.fg.muted};text-align:center;margin-bottom:4px;font-size:11px}[data-slot=date-picker-week]>span{line-height:20px}[data-slot=date-picker-blank]{width:28px;height:28px}[data-slot=date-picker-day]{width:28px;height:28px;color:inherit;border-radius:${T.vars.radius};cursor:pointer;font:inherit;background:0 0;border:none;padding:0;font-size:14px}[data-slot=date-picker-day]:hover{background:${b.t.hover}}[data-slot=date-picker-day][data-checked]{background:${b.t.hover.strong};color:${b.t.fg.bright}}[data-slot=date-picker-day][data-today]:not([data-checked]){box-shadow:${T.vars["today-ring"]}}[data-slot=date-picker-cells]{grid-template-columns:repeat(3,1fr);gap:4px;width:208px;display:grid}[data-slot=date-picker-cell]{height:36px;color:inherit;border-radius:${T.vars.radius};cursor:pointer;font:inherit;background:0 0;border:none;padding:0 4px;font-size:14px}[data-slot=date-picker-cell]:hover{background:${b.t.hover}}[data-slot=date-picker-cell][data-checked]{background:${b.t.hover.strong};color:${b.t.fg.bright}}[data-slot=date-picker-cell][data-today]:not([data-checked]){box-shadow:${T.vars["today-ring"]}}[data-slot=date-picker-cell][data-outside]{opacity:.45}}`),S=class{constructor(e={}){this.opts=e;let t=document;I(t),this.ctrl=function(e={}){let t=e.today??new Date,i=k(e.value),n=i?.getFullYear()??t.getFullYear(),r=i?.getMonth()??t.getMonth(),a="date",l=e.i18n??null,u=function(e){let t=e?.locale??"en",i=t.split(/[-_]/)[0]??t;try{i=new Intl.Locale(t).language}catch{}return{locale:t,numberingSystem:e?.numberingSystem??"latn",english:"en"===i.toLowerCase()}}(l),f=e.i18n?.weekStart??0,m=h(u,"long"),b=h(u,"short"),v=e=>c(String(Math.trunc(e)),u),y=()=>10*Math.floor(n/10);return{get panel(){return a},get year(){return n},get month(){return r},get value(){return i?w(i):null},yearFirst:function(e){if(e.english)return!1;let t=`${e.locale}|${e.numberingSystem}`,i=p.get(t);if(void 0===i){let n=d(e,{year:"numeric",month:"long"}).formatToParts(Date.UTC(2026,8,15)).map(e=>e.type);i=n.indexOf("year")<n.indexOf("month"),p.set(t,i)}return i}(u),weekdays(){let e=function(e){if(e.english)return[...o];let t=d(e,{weekday:"short"});return Array.from({length:7},(e,i)=>s(t.format(Date.UTC(2e3,0,2+i))))}(u);return Array.from({length:7},(t,i)=>e[(f+i)%7])},header:()=>{var e;return{month:m[r]??"",monthVisible:"date"===a,year:"year"===a?`${v(y())}-${v(y()+9)}`:(e=n,u.english?c(String(e),u):s(d(u,{year:"numeric"}).format(Date.UTC(e,6,1)))),yearDisabled:"year"===a}},navLabels:()=>"date"===a?{prev:(0,g.b)(l,x.prevMonth),next:(0,g.b)(l,x.nextMonth)}:"month"===a?{prev:(0,g.b)(l,x.prevYear),next:(0,g.b)(l,x.nextYear)}:{prev:(0,g.b)(l,x.prevDecade),next:(0,g.b)(l,x.nextDecade)},cells(){let e=[];if("date"===a){let o=(new Date(n,r,1).getDay()-f+7)%7,a=new Date(n,r+1,0).getDate(),s=w(t),l=i?w(i):"";for(let t=0;t<o;t++)e.push({label:"",value:"",checked:!1,today:!1,blank:!0});for(let t=1;t<=a;t++){let i=`${n}-${String(r+1).padStart(2,"0")}-${String(t).padStart(2,"0")}`;e.push({label:v(t),value:i,checked:i===l,today:i===s})}return e}if("month"===a){for(let r=0;r<12;r++)e.push({label:b[r]??"",value:r,checked:i?.getFullYear()===n&&i.getMonth()===r,today:t.getFullYear()===n&&t.getMonth()===r});return e}let o=y();for(let n=o-1;n<=o+10;n++)e.push({label:v(n),value:n,checked:i?.getFullYear()===n,today:t.getFullYear()===n,outside:n<o||n>o+9});return e},step(e){"date"===a?((r+=e)<0&&(r=11,n-=1),r>11&&(r=0,n+=1)):n+="month"===a?e:10*e},showMonths(){a="month"},showYears(){a="year"},choose:e=>e.blank?null:"date"===a?(i=k(String(e.value)))?w(i):null:("month"===a?(r=Number(e.value),a="date"):(n=Number(e.value),a="month"),null),setValue(e){(i=k(e))&&(n=i.getFullYear(),r=i.getMonth()),a="date"}}}(e);let i=(e,t)=>(0,m.h)("button",{className:e,slot:t,attrs:{type:"button"}});this.prev=i("vela-date-picker-nav",T.slot("nav")),this.prev.append((0,f.x_)("chevron-left",t)),this.next=i("vela-date-picker-nav",T.slot("nav")),this.next.append((0,f.x_)("chevron-right",t));let n=e.i18n??null;this.monthBtn=i("vela-date-picker-switch",T.slot("switch")),this.monthBtn.setAttribute("aria-label",(0,g.b)(n,O)),this.yearBtn=i("vela-date-picker-switch",T.slot("switch")),this.yearBtn.setAttribute("aria-label",(0,g.b)(n,C));let r=(0,m.h)("div",{className:"vela-date-picker-title",slot:T.slot("title")},this.ctrl.yearFirst?[this.yearBtn,this.monthBtn]:[this.monthBtn,this.yearBtn]),a=(0,m.h)("div",{className:"vela-date-picker-head",slot:T.slot("head")},this.prev,r,this.next);this.week=(0,m.h)("div",{className:"vela-date-picker-week",slot:T.slot("week")},this.ctrl.weekdays().map(e=>(0,m.h)("span",{text:e}))),this.grid=(0,m.h)("div");let l=(e,t)=>e.addEventListener("click",e=>{e.stopPropagation(),t(),this.paint()});l(this.prev,()=>this.ctrl.step(-1)),l(this.next,()=>this.ctrl.step(1)),l(this.monthBtn,()=>this.ctrl.showMonths()),l(this.yearBtn,()=>this.ctrl.showYears()),this.el=(0,m.h)("div",{className:"vela-date-picker",slot:T.slot("root")},a,this.week,this.grid),this.paint()}get value(){return this.ctrl.value}setValue(e){this.ctrl.setValue(e),this.paint()}destroy(){}paint(){let e=this.el.ownerDocument,t=this.ctrl.header();this.monthBtn.hidden=!t.monthVisible,this.monthBtn.textContent=t.month,this.yearBtn.textContent=t.year,this.yearBtn.disabled=t.yearDisabled;let i=this.ctrl.navLabels();this.prev.setAttribute("aria-label",i.prev),this.next.setAttribute("aria-label",i.next);let n="date"===this.ctrl.panel;this.week.hidden=!n,this.grid.className=n?"vela-date-picker-grid":"vela-date-picker-cells",this.grid.setAttribute("data-slot",T.slot(n?"grid":"cells")),this.grid.replaceChildren(...this.ctrl.cells().map(t=>this.cellEl(e,t,n)))}cellEl(e,t,i){if(t.blank)return(0,m.h)("span",{className:"vela-date-picker-blank",slot:T.slot("blank")});let n=(0,m.h)("button",{className:i?"vela-date-picker-day":"vela-date-picker-cell",slot:T.slot(i?"day":"cell"),attrs:{type:"button"},data:{checked:t.checked?"1":null,today:t.today?"1":null,outside:t.outside?"1":null},text:t.label});return n.addEventListener("click",e=>{e.stopPropagation();let i=this.ctrl.choose(t);i?this.opts.onPick?.(i):this.paint()}),n}}},9748:(e,t,i)=>{i.d(t,{N:()=>o,z:()=>r});var n=(0,i(2489).B)("kit-text@1",()=>({current:null}));function r(e,t){let i=n.current;n.current=e??null;try{return t()}finally{n.current=i}}function o(){return n.current}},9900:(e,t,i)=>{i.d(t,{SG:()=>ec,a5:()=>ee,Yv:()=>eu,qz:()=>Z});var n=i(9748),r=i(1404),o=i(3825),a=i(3678),s=i(5788),l=i(3754),d=i(7148),u=i(7042),c=i(6806),h=i(4561),p=i(542),g=i(3998),f=i(5089),m=i(2498),b=i(3926);let v=(0,i(5397).y)("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator").build();var y=i(2577),x=i(9095);let w=e=>e.ids?.root??`slider:${e.id}`,E=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,k=(e,t)=>e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,T=e=>e.ids?.control??`slider:${e.id}:control`,O=e=>e.ids?.label??`slider:${e.id}:label`,C=e=>(0,y.YG)(S(e),"[role=slider]"),I=(e,t)=>e.getById(k(e,t)),S=e=>e.getById(T(e)),P=(e,t)=>{let{context:i,prop:n,scope:r,refs:o}=e,a=S(r);if(!a)return;let s=o.get("thumbDragOffset"),l=(function(e,t,i){let{left:n,top:r,width:o,height:a}=t.getBoundingClientRect(),s=o-2*i,l=a-2*i,d={x:e.x-(n+i),y:e.y-(r+i)},u={x:s>0?(0,m.N8)(d.x/s):0,y:l>0?(0,m.N8)(d.y/l):0};return{offset:d,percent:u,getPercentValue:function(e={}){let{dir:t="ltr",orientation:i="horizontal",inverted:n}=e,r="object"==typeof n?n.x:n,o="object"==typeof n?n.y:n;return"horizontal"===i?"rtl"===t||r?1-u.x:u.x:o?1-u.y:u.y}}})({x:t.x-(s?.x??0),y:t.y-(s?.y??0)},a,((e,t,i)=>"contain"===t?("vertical"===i?e?.height??0:e?.width??0)/2:0)(i.get("thumbSize"),n("thumbAlignment"),n("orientation"))).getPercentValue({orientation:n("orientation"),dir:n("dir"),inverted:{y:!0}});return(0,m.F4)(l,n("min"),n("max"),n("step"))};function $(e,t){let{prop:i}=e;var n=100*(0,m.vV)(t,i("min"),i("max"));let{computed:r,prop:o}=e;return"center"===o("thumbAlignment")?`${n}%`:`calc(${n}% - ${r("isVertical")?function(e,t){let{context:i,prop:n}=e,{height:r=0}=i.get("thumbSize")??{};return parseFloat((0,m.xX)([n("min"),n("max")],[-r/2,r/2])(t).toFixed(2))}(e,t):function(e,t){let{computed:i,context:n,prop:r}=e,{width:o=0}=n.get("thumbSize")??{};return i("isRtl")?-1*parseFloat((0,m.xX)([r("max"),r("min")],[-o/2,o/2])(t).toFixed(2)):parseFloat((0,m.xX)([r("min"),r("max")],[-o/2,o/2])(t).toFixed(2))}(e,t)}px)`}function N(e){let{computed:t,prop:i}=e,n="visible";return"contain"!==i("thumbAlignment")||t("hasMeasuredThumbSize")||(n="hidden"),n}function A(e,t){let{computed:i,context:n}=e,r=i("isVertical")?"bottom":"insetInlineStart",o=n.get("focusedIndex");return{visibility:N(e),position:"absolute",transform:"var(--slider-thumb-transform)",[r]:`var(--slider-thumb-offset-${t})`,zIndex:o===t?1:void 0}}function R(e){let{index:t,values:i,min:n,max:r,gap:o}=e,a=i[t-1],s=i[t+1];return{min:null!=a?a+o:n,max:null!=s?s-o:r}}function L(e){return Math.round(1e10*e)/1e10}function V(e){let{index:t,value:i,values:n}=e,r=R(e),o=n.slice();return o[t]=L((0,m.L3)(i,r.min,r.max)),{values:o,index:t,swapped:!1}}function F(e,t){let{context:i,prop:n}=e,r=n("step")*n("minStepsBetweenThumbs");return(0,m.Yi)(i.get("value"),n("min"),n("max"),r)[t]}function D(e,t,i){let{prop:n}=e,r=F(e,i),o=(0,m.BU)(t,n("min"),n("max"),n("step"));return(0,m.L3)(o,r.min,r.max)}function M(e,t){let{context:i,prop:n}=e,r=i.get("value"),o=n("max");if(r[t]===o){let e=t;for(;e>0&&r[e-1]===o;)e-=1;return e}return t}function z(e,t){let{state:i,send:n,context:r,prop:o,computed:a,scope:s}=e,l=o("aria-label"),d=o("aria-labelledby"),u=r.get("value"),c=r.get("focusedIndex"),h=i.matches("focus"),p=i.matches("dragging"),y=a("isDisabled"),x=o("invalid"),I=a("isInteractive"),S="horizontal"===o("orientation"),P="vertical"===o("orientation");function R(e){return(0,m.vV)(e,o("min"),o("max"))}function L(e){return(0,m.F4)(e,o("min"),o("max"),o("step"))}return{value:u,dragging:p,focused:h,setValue(e){n({type:"SET_VALUE",value:e})},getThumbValue:e=>u[e],setThumbValue(e,t){n({type:"SET_VALUE",index:e,value:t})},getValuePercent:R,getPercentValue:L,getThumbPercent:e=>R(u[e]),setThumbPercent(e,t){n({type:"SET_VALUE",index:e,value:L(t)})},getThumbMin:t=>F(e,t).min,getThumbMax:t=>F(e,t).max,increment(e){n({type:"INCREMENT",index:e})},decrement(e){n({type:"DECREMENT",index:e})},focus(){I&&n({type:"FOCUS",index:0})},getLabelProps:()=>t.label({...v.label.attrs,dir:o("dir"),"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),"data-invalid":(0,g.sE)(x),"data-dragging":(0,g.sE)(p),"data-focus":(0,g.sE)(h),id:O(s),htmlFor:k(s,0),onClick(e){I&&(e.preventDefault(),C(s)[0]?.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}}),getRootProps:()=>t.element({...v.root.attrs,"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),"data-dragging":(0,g.sE)(p),"data-invalid":(0,g.sE)(x),"data-focus":(0,g.sE)(h),id:w(s),dir:o("dir"),style:function(e){let{context:t,computed:i}=e,n=i("isVertical"),r=i("isRtl"),o=function(e){let{prop:t,computed:i}=e,n=i("valuePercent"),[r,o]=[n[0],n[n.length-1]];if(1===n.length){if("center"===t("origin")){let e=n[0]<50;return{start:e?`${n[0]}%`:"50%",end:e?"50%":`${100-n[0]}%`}}return"end"===t("origin")?{start:`${o}%`,end:"0%"}:{start:"0%",end:`${100-o}%`}}return{start:`${r}%`,end:`${100-o}%`}}(e),a=t.get("thumbSize");return{...t.get("value").reduce((t,i,n)=>{let r=$(e,i);return{...t,[`--slider-thumb-offset-${n}`]:r}},{}),"--slider-thumb-width":(0,m.cl)(a?.width),"--slider-thumb-height":(0,m.cl)(a?.height),"--slider-thumb-transform":n?"translateY(50%)":r?"translateX(50%)":"translateX(-50%)","--slider-range-start":o.start,"--slider-range-end":o.end}}(e)}),getValueTextProps:()=>t.element({...v.valueText.attrs,dir:o("dir"),"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),"data-invalid":(0,g.sE)(x),"data-focus":(0,g.sE)(h),id:s.ids?.valueText??`slider:${s.id}:value-text`}),getTrackProps:()=>t.element({...v.track.attrs,dir:o("dir"),id:s.ids?.track??`slider:${s.id}:track`,"data-disabled":(0,g.sE)(y),"data-invalid":(0,g.sE)(x),"data-dragging":(0,g.sE)(p),"data-orientation":o("orientation"),"data-focus":(0,g.sE)(h),style:{position:"relative"}}),getThumbProps(i){let{index:r=0,name:a}=i,m=u[r],b=F(e,r),x=o("getAriaValueText")?.({value:m,index:r}),w=Array.isArray(l)?l[r]:l,k=Array.isArray(d)?d[r]:d;return t.element({...v.thumb.attrs,dir:o("dir"),"data-index":r,"data-name":a,id:E(s,r),"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),"data-focus":(0,g.sE)(h&&c===r),"data-dragging":(0,g.sE)(p&&c===r),draggable:!1,"aria-disabled":(0,g.rq)(y),"aria-label":w,"aria-labelledby":k??O(s),"aria-orientation":o("orientation"),"aria-valuemax":b.max,"aria-valuemin":b.min,"aria-valuenow":u[r],"aria-valuetext":x,role:"slider",tabIndex:y?void 0:0,style:A(e,r),onPointerDown(e){if(!I||!(0,f.Ml)(e))return;let t=e.currentTarget.getBoundingClientRect(),i={x:t.left+t.width/2,y:t.top+t.height/2};n({type:"THUMB_POINTER_DOWN",index:r,offset:{x:e.clientX-i.x,y:e.clientY-i.y}}),e.stopPropagation()},onBlur(){I&&n({type:"BLUR"})},onFocus(){I&&n({type:"FOCUS",index:r})},onKeyDown(e){if(e.defaultPrevented||!I)return;let t=(0,f.IF)(e,{step:o("step"),largeStep:o("largeStep")}),i={ArrowUp(){S||n({type:"ARROW_INC",step:t,src:"ArrowUp"})},ArrowDown(){S||n({type:"ARROW_DEC",step:t,src:"ArrowDown"})},ArrowLeft(){P||n({type:"ARROW_DEC",step:t,src:"ArrowLeft"})},ArrowRight(){P||n({type:"ARROW_INC",step:t,src:"ArrowRight"})},PageUp(){n({type:"ARROW_INC",step:t,src:"PageUp"})},PageDown(){n({type:"ARROW_DEC",step:t,src:"PageDown"})},Home(){n({type:"HOME"})},End(){n({type:"END"})}}[(0,f.K)(e,{dir:o("dir"),orientation:o("orientation")})];i&&(i(e),e.preventDefault(),e.stopPropagation())}})},getHiddenInputProps(e){let{index:i=0,name:n}=e;return t.input({name:n??(o("name")?o("name")+(u.length>1?"[]":""):void 0),form:o("form"),type:"text",hidden:!0,defaultValue:u[i],id:k(s,i)})},getRangeProps:()=>t.element({id:s.ids?.range??`slider:${s.id}:range`,...v.range.attrs,dir:o("dir"),"data-dragging":(0,g.sE)(p),"data-focus":(0,g.sE)(h),"data-invalid":(0,g.sE)(x),"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),style:function(e){let{computed:t}=e,i=t("isVertical"),n=t("isRtl");return i?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[n?"right":"left"]:"var(--slider-range-start)",[n?"left":"right"]:"var(--slider-range-end)"}}(e)}),getControlProps:()=>t.element({...v.control.attrs,dir:o("dir"),id:T(s),"data-dragging":(0,g.sE)(p),"data-disabled":(0,g.sE)(y),"data-orientation":o("orientation"),"data-invalid":(0,g.sE)(x),"data-focus":(0,g.sE)(h),style:{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"},onPointerDown(e){!I||!(0,f.Ml)(e)||(0,f.VL)(e)||(n({type:"POINTER_DOWN",point:(0,f.TH)(e)}),e.preventDefault(),e.stopPropagation())}}),getMarkerGroupProps:()=>t.element({...v.markerGroup.attrs,role:"presentation",dir:o("dir"),"aria-hidden":!0,"data-orientation":o("orientation"),style:{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}),getMarkerProps(i){let n,r,a=function(e,t){let{computed:i}=e,n=i("isHorizontal"),r=i("isRtl");return{visibility:N(e),position:"absolute",pointerEvents:"none",[n?"insetInlineStart":"bottom"]:$(e,t),translate:"var(--translate-x) var(--translate-y)","--translate-x":n?r?"50%":"-50%":"0%","--translate-y":n?"0%":"50%"}}(e,i.value);return n=i.value<(0,b.$1)(u)?"under-value":i.value>(0,b.HV)(u)?"over-value":"at-value",t.element({...v.marker.attrs,id:(r=i.value,s.ids?.marker?.(r)??`slider:${s.id}:marker:${r}`),role:"presentation",dir:o("dir"),"data-orientation":o("orientation"),"data-value":i.value,"data-disabled":(0,g.sE)(y),"data-state":n,style:a})},getDraggingIndicatorProps(i){let{index:n=0}=i,r=n===c&&p;return t.element({...v.draggingIndicator.attrs,role:"presentation",dir:o("dir"),hidden:!r,"data-orientation":o("orientation"),"data-state":r?"open":"closed",style:A(e,n)})}}}var H=i(6581),B=i(8571),_=i(4792),U=i(1542);let G="default",j="",W=new WeakMap;var K=i(5010),q=i(853),Y=i(2828),X=i(5034);let J=(e,t,i,n,r)=>(0,m.Yi)(e,t,i,r*n).map(e=>{let r=(0,m.BU)(e.value,e.min,e.max,n),o=(0,m.L3)(r,e.min,e.max);if(!(0,m.s)(o,t,i))throw Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return o}),Q=(0,H.Op)({props({props:e}){let t=e.min??0,i=e.max??100,n=e.step??1,r=e.defaultValue??[t],o=e.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",thumbCollisionBehavior:"none",minStepsBetweenThumbs:o,...e,largeStep:e.largeStep??10*n,defaultValue:J(r,t,i,n,o),value:e.value?J(e.value,t,i,n,o):void 0,max:i,step:n,min:t}},initialState:()=>"idle",context:({prop:e,bindable:t,getContext:i})=>({thumbSize:t(()=>({defaultValue:e("thumbSize")||null})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:q.n,hash:e=>e.join(","),onChange(t){e("onValueChange")?.({value:t})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(t){let n=i();e("onFocusChange")?.({focusedIndex:t,value:n.get("value")})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}),refs:()=>({thumbDragOffset:null,thumbDragStartValue:null}),computed:{isHorizontal:({prop:e})=>"horizontal"===e("orientation"),isVertical:({prop:e})=>"vertical"===e("orientation"),isRtl:({prop:e})=>"horizontal"===e("orientation")&&"rtl"===e("dir"),isDisabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled"),isInteractive:({prop:e,computed:t})=>!(e("readOnly")||t("isDisabled")),hasMeasuredThumbSize:({context:e})=>null!=e.get("thumbSize"),valuePercent:(0,B.p)(({context:e,prop:t})=>[e.get("value"),t("min"),t("max")],([e,t,i])=>e.map(e=>100*(0,m.vV)(e,t,i)))},watch({track:e,action:t,context:i,computed:n,send:r}){e([()=>i.hash("value")],()=>{t(["syncInputElements","dispatchChangeEvent"])}),e([()=>n("isDisabled")],()=>{n("isDisabled")&&r({type:"POINTER_CANCEL"})})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex","invokeOnChangeEnd"]},{actions:["setValue","invokeOnChangeEnd"]}],INCREMENT:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},DECREMENT:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setThumbDragStartValue","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","setThumbDragOffset","setThumbDragStartValue","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setThumbDragStartValue","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","setThumbDragOffset","setThumbDragStartValue","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd","clearThumbDragOffset","clearThumbDragStartValue"]},POINTER_MOVE:{actions:["setPointerValue"]},POINTER_CANCEL:{target:"idle",actions:["clearFocusedIndex","clearThumbDragOffset","clearThumbDragStartValue"]}}}},implementations:{guards:{hasIndex:({event:e})=>null!=e.index},effects:{trackFormControlState:({context:e,scope:t})=>(0,x.$S)((e=>e.getById(w(e)))(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}}),trackPointerMove:({scope:e,send:t})=>(function(e,t){let{onPointerMove:i,onPointerUp:n}=t,r=e=>{n({point:(0,f.TH)(e),event:e})},o=[(0,f.kn)(e,"pointermove",e=>{let t=(0,f.TH)(e);if(!(Math.sqrt(t.x**2+t.y**2)<("touch"===e.pointerType?10:5))){if("mouse"===e.pointerType&&0===e.buttons)return void r(e);i({point:t,event:e})}},!1),(0,f.kn)(e,"pointerup",r,!1),(0,f.kn)(e,"pointercancel",r,!1),(0,f.kn)(e,"contextmenu",r,!1),function(e={}){let{defer:t,target:i,...n}=e,r=t?U.er:e=>e(),o=[];return o.push(r(()=>{let e="function"==typeof i?i():i;o.push(function(e={}){let{target:t,doc:i}=e,n=i??document,r=n.documentElement;return(0,_.aR)()?("default"===G&&(j=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),G="disabled"):t&&(W.set(t,t.style.userSelect),t.style.userSelect="none"),()=>(function(e={}){let{target:t,doc:i}=e,n=(i??document).documentElement;if((0,_.aR)()){if("disabled"!==G)return;G="restoring",setTimeout(()=>{(0,U.dY)(()=>{"restoring"===G&&("none"===n.style.webkitUserSelect&&(n.style.webkitUserSelect=j||""),j="",G="default")})},300)}else if(t&&W.has(t)){let e=W.get(t);"none"===t.style.userSelect&&(t.style.userSelect=e??""),""===t.getAttribute("style")&&t.removeAttribute("style"),W.delete(t)}})({target:t,doc:n})}({...n,target:e}))})),()=>{o.forEach(e=>e?.())}}({doc:e})];return()=>{o.forEach(e=>e())}})(e.getDoc(),{onPointerMove(e){t({type:"POINTER_MOVE",point:e.point})},onPointerUp(){t({type:"POINTER_UP"})}}),trackThumbSize({context:e,scope:t,prop:i}){if("contain"!==i("thumbAlignment")||i("thumbSize"))return;let n=t=>{let i,n={left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0},r=(0,Y.Up)(n,["width","height"]);i=e.get("thumbSize"),(i?.width!==r?.width||i?.height!==r?.height)&&e.set("thumbSize",r)},r=C(t);r.forEach(n);let o=r.map(e=>K.oC.observe(e,()=>n(e)));return(0,X.OK)(...o)}},actions:{dispatchChangeEvent({context:e,scope:t}){e.get("value").forEach((e,i)=>{let n=I(t,i);n&&(0,x.CF)(n,{value:e})})},syncInputElements({context:e,scope:t}){e.get("value").forEach((e,i)=>{let n=I(t,i);(0,x.U4)(n,e.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e("onValueChangeEnd")?.({value:t.get("value")})})},setClosestThumbIndex(e){let{context:t,event:i}=e,n=P(e,i.point);if(null==n)return;let r=function(e,t){let{context:i}=e,n=i.get("value"),r=0,o=Math.abs(n[0]-t);for(let e=1;e<n.length;e++){let i=Math.abs(n[e]-t);i<=o&&(r=e,o=i)}return M(e,r)}(e,n);t.set("focusedIndex",r)},setFocusedIndex(e){let{context:t,event:i}=e,n=M(e,i.index);t.set("focusedIndex",n)},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setThumbDragOffset(e){let{refs:t,event:i}=e;t.set("thumbDragOffset",i.offset??null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)},setThumbDragStartValue({refs:e,context:t}){e.set("thumbDragStartValue",t.get("value").slice())},clearThumbDragStartValue({refs:e}){e.set("thumbDragStartValue",null)},setPointerValue(e){queueMicrotask(()=>{let{context:t,event:i,prop:n,refs:r}=e,o=P(e,i.point);if(null==o)return;let a=t.get("focusedIndex"),s=r.get("thumbDragStartValue"),l=function(e,t,i,n,r,o,a,s,l){if(1===n.length)return{values:[L((0,m.L3)(i,r,o))],index:0,swapped:!1};let d={behavior:e,index:t,value:i,values:n,min:r,max:o,gap:a*s};switch(e){case"push":return function(e){let{index:t,value:i,values:n,min:r,max:o,gap:a}=e,s=n.slice(),l=o-(n.length-1-t)*a;s[t]=L((0,m.L3)(i,r+t*a,l));for(let e=t+1;e<n.length;e++){let t=s[e-1]+a;s[e]<t&&(s[e]=L(t))}for(let e=t-1;e>=0;e--){let t=s[e+1]-a;s[e]>t&&(s[e]=L(t))}return{values:s,index:t,swapped:!1}}(d);case"swap":return function(e,t){let{index:i,value:n,values:r,gap:o}=e,a=r[i-1],s=r[i+1],l=null!=s&&n>=s&&n>t,d=null!=a&&n<=a&&n<t;if(!l&&!d)return V(e);let u=l?i+1:i-1,c=r.slice(),h=R({...e,index:u});return c[u]=L((0,m.L3)(n,h.min,h.max)),c[i]=r[u],l&&c[i]>c[u]-o?c[i]=L(c[u]-o):d&&c[i]<c[u]+o&&(c[i]=L(c[u]+o)),{values:c,index:u,swapped:!0}}(d,l??n[t]);default:return V(d)}}(n("thumbCollisionBehavior"),a,o,t.get("value"),n("min"),n("max"),n("step"),n("minStepsBetweenThumbs"),s?.[a]);l.swapped&&t.set("focusedIndex",l.index),t.set("value",l.values)})},focusActiveThumb({scope:e,context:t}){(0,U.er)(()=>{let i;(i=t.get("focusedIndex"),e.getById(E(e,i)))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){let{context:t,event:i}=e,n=function(e,t,i){let{context:n,prop:r}=e,o=t??n.get("focusedIndex"),a=F(e,o),s=(0,m.kn)(o,{...a,step:i??r("step"),values:n.get("value")});return s[o]=(0,m.L3)(s[o],a.min,a.max),s}(e,i.index,i.step);t.set("value",n)},incrementThumbAtIndex(e){let{context:t,event:i}=e,n=function(e,t,i){let{context:n,prop:r}=e,o=t??n.get("focusedIndex"),a=F(e,o),s=(0,m.jv)(o,{...a,step:i??r("step"),values:n.get("value")});return s[o]=(0,m.L3)(s[o],a.min,a.max),s}(e,i.index,i.step);t.set("value",n)},setFocusedThumbToMin(e){let{context:t}=e,i=t.get("focusedIndex"),{min:n}=F(e,i);t.set("value",e=>(0,m.JT)(e,i,n))},setFocusedThumbToMax(e){let{context:t}=e,i=t.get("focusedIndex"),{max:n}=F(e,i);t.set("value",e=>(0,m.JT)(e,i,n))},setValueAtIndex(e){let{context:t,event:i}=e,n=D(e,i.value,i.index);t.set("value",e=>(0,m.JT)(e,i.index,n))},setValue(e){let{context:t,event:i}=e,n=i.value.map((t,i)=>D(e,t,i));t.set("value",n)}}}});function Z(e){let t=String(e??"").trim(),i=/^#([0-9a-f]{6})([0-9a-f]{2})?$/i.exec(t);if(i)return{hex6:`#${i[1].toLowerCase()}`,alpha:i[2]?parseInt(i[2],16)/255:1};if(i=/^#([0-9a-f]{3})$/i.exec(t)){let e=i[1].toLowerCase();return{hex6:`#${e[0]}${e[0]}${e[1]}${e[1]}${e[2]}${e[2]}`,alpha:1}}let n=/^rgba?\(([^)]+)\)/i.exec(t);if(n){let e=n[1].split(",").map(e=>e.trim()),t=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0"),i=null!=e[3]?Math.max(0,Math.min(1,parseFloat(e[3]))):1;return{hex6:`#${t(parseInt(e[0]??"0",10))}${t(parseInt(e[1]??"0",10))}${t(parseInt(e[2]??"0",10))}`,alpha:i}}return{hex6:a.SO,alpha:1}}function ee(e,t,i){let n=e=>{let t=parseInt(Z(e).hex6.slice(1),16);return[t>>16&255,t>>8&255,255&t]},[r,o,a]=n(e),[s,l,d]=n(t),u=Math.max(0,Math.min(1,i)),c=e=>Math.round(e).toString(16).padStart(2,"0");return`#${c(r*u+s*(1-u))}${c(o*u+l*(1-u))}${c(a*u+d*(1-u))}`}function et(e,t,i){let n=i/100,r=t=>(t+e/30)%12,o=t/100*Math.min(n,1-n),a=e=>n-o*Math.max(-1,Math.min(r(e)-3,Math.min(9-r(e),1))),s=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${s(a(0))}${s(a(8))}${s(a(4))}`}function ei(e){return`repeating-conic-gradient(#9aa0a6 0% 25%, #d3d6da 0% 50%) 0 0 / ${e}px ${e}px`}var en=(0,h.I)({name:"color-picker",parts:["root","trigger","swatch","content"],settings:{"swatch-ring":"inset 0 0 0 1px rgba(0, 0, 0, 0.25)","circle-swatch-radius":"2px","content-radius":c.t.radius.lg}}),er={opacity:(0,r.a)("ui.colorPicker.opacity","Opacity"),opacityPercent:(0,r.a)("ui.colorPicker.opacityPercent","Opacity (%)")},eo=function(){let e=[100,90,80,68,56,45,35,25,14,0].map(e=>et(0,0,e)),t=[4,28,50,96,140,174,200,224,270,322];return[e,...[[82,56],[58,84],[62,74],[66,62],[70,50],[64,39],[54,29]].map(([e,i])=>t.map(t=>et(t,e,i)))]}(),ea=ei(10),es=ei(8),el=[a.bg,a.cr,a.TV,a.Nz,a.qm],ed=(0,p.Il)("vela-ui-color",(0,p.AH)`@layer vela.ui{[data-slot=color-picker-swatch]{width:100%;height:100%;box-shadow:${en.vars["swatch-ring"]};border-radius:0;display:block}[data-slot=color-picker-trigger]{border:1px solid ${c.t.border};background:${c.t.surface.sunken};cursor:pointer;border-radius:0;flex:none;width:24px;height:24px;padding:2px}[data-slot=color-picker-trigger]:where(:not([hidden])){display:inline-flex}[data-slot=color-picker-trigger]:where([data-shape=circle]){border:1px solid ${c.t.border.strong};border-radius:${c.t.radius.sm};background:0 0;width:26px;height:26px;padding:3px;overflow:hidden}[data-slot=color-picker-trigger]:hover{border-color:${c.t.fg.muted}}[data-slot=color-picker-trigger]:where([data-shape=circle]) [data-slot=color-picker-swatch]{border-radius:${en.vars["circle-swatch-radius"]};box-shadow:none}[data-slot~=color-picker-content]{background:${c.t.surface.overlay};border:1px solid ${c.t.border};border-radius:${en.vars["content-radius"]};box-shadow:${c.t.shadow};padding:10px}}`);function eu(e,t,i,o={}){let a=o.commit??"live",u=o.i18n??(0,n.N)(),c=Z(e),h=c.hex6,p=c.alpha,g=document.createElement("div");g.dataset.slot=en.slot("root"),g.style.cssText="display:flex;flex-direction:column;gap:9px;width:236px;";let f=document.createElement("div");f.style.cssText="display:grid;grid-template-columns:repeat(10,1fr);gap:4px;";let m=[];for(let e of eo)for(let t of e){let e=document.createElement("button");e.type="button",e.dataset.c=t,e.setAttribute("aria-label",t),e.style.cssText=`width:100%;aspect-ratio:1;border-radius:4px;border:none;cursor:pointer;background:${t};padding:0;`,e.addEventListener("click",e=>{e.stopPropagation(),F(t)}),f.appendChild(e),m.push(e)}let b=()=>{for(let e of m){let i=(e.dataset.c??"").toLowerCase()===h.toLowerCase();e.setAttribute("aria-pressed",String(i)),e.style.outline=i?`2px solid ${t.textColor}`:"none",e.style.outlineOffset="2px",e.style.zIndex=i?"1":"",e.style.position=i?"relative":""}},v=document.createElement("div");v.style.cssText="display:flex;align-items:center;gap:5px;flex-wrap:wrap;border-top:1px solid var(--vela-border);padding-top:9px;";let y=document.createElement("div");y.style.cssText="display:contents;";let x=document.createElement("label");x.style.cssText=`width:17px;height:17px;border-radius:var(--vela-radius-sm);border:1px dashed var(--vela-border-strong);cursor:pointer;display:flex;align-items:center;justify-content:center;color:${t.textColor};font:14px ${t.fontFamily};position:relative;`,x.textContent="+";let w=document.createElement("input");w.type="color",w.value=h,w.style.cssText="position:absolute;inset:0;opacity:0;cursor:pointer;",w.addEventListener("input",()=>V(w.value)),w.addEventListener("change",()=>F(w.value,!0)),x.appendChild(w),v.append(y,x);let E=()=>{for(let e of(y.replaceChildren(),el)){let t=document.createElement("button");t.type="button",t.setAttribute("aria-label",e),t.style.cssText=`width:17px;height:17px;border-radius:var(--vela-radius-sm);border:1px solid var(--vela-border);cursor:pointer;background:${e};padding:0;`,t.addEventListener("click",t=>{t.stopPropagation(),F(e)}),y.appendChild(t)}},k=document.createElement("div");k.textContent=(0,r.b)(u,er.opacity),k.style.cssText=`font:11px ${t.fontFamily};color:var(--vela-fg-muted);`;let T=document.createElement("div");T.style.cssText="display:flex;align-items:center;gap:10px;";let O=document.createElement("div");O.style.cssText="flex:1;position:relative;height:13px;border-radius:7px;cursor:pointer;";let C=document.createElement("div");C.style.cssText="position:absolute;top:50%;width:15px;height:15px;border-radius:50%;background:var(--vela-selected-bg);box-shadow:0 1px 3px rgba(0,0,0,0.55);transform:translate(-50%,-50%);pointer-events:none;",O.appendChild(C);let I=document.createElement("input");I.type="text",I.inputMode="numeric",I.title=(0,r.b)(u,er.opacityPercent),I.style.cssText=`width:46px;box-sizing:border-box;text-align:center;font:var(--vela-font-size-md) ${t.fontFamily};color:var(--vela-fg);background:transparent;border:1px solid var(--vela-border);border-radius:5px;padding:3px 4px;outline:none;`,I.addEventListener("focus",()=>{I.style.borderColor="var(--vela-border-strong)",I.select()}),T.append(O,I);let S=()=>{O.style.background=`linear-gradient(to right, ${h}00, ${h}ff), ${ea}`,C.style.left=`${100*p}%`,I.value=`${Math.round(100*p)}%`},P=()=>{I.style.borderColor="var(--vela-border)";let e=parseFloat(I.value.replace("%",""));if(Number.isFinite(e)){let t=Math.max(0,Math.min(100,e))/100;if(Math.round(100*t)!==Math.round(100*p)){p=t,S(),L(),z(R.service,l._B).setValue([t]);return}}S()};I.addEventListener("change",P),I.addEventListener("blur",()=>{I.style.borderColor="var(--vela-border)",S()}),I.addEventListener("keydown",e=>{"Escape"!==e.key&&(e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),P(),I.blur()))});let $=e=>Math.round(100*e),N=(0,d.Ao)("vela-color-opacity"),A=!1,R=(0,d.xl)(Q,{id:N,min:0,max:1,step:.01,defaultValue:[p],thumbAlignment:"center","aria-label":[(0,r.b)(u,er.opacity)],getAriaValueText:({value:e})=>`${$(e)}%`,onValueChange:({value:[e]})=>{void 0!==e&&$(e)!==$(p)&&(p=e,S(),"live"===a&&L())},onValueChangeEnd:({value:[e]})=>{"release"===a&&A&&(A=!1,void 0!==e&&$(e)!==$(p)&&(p=e,S()),L())}},e=>{let t=z(e,l._B),i=e=>{let{style:t,...i}=e;return i};(0,d.iU)(T,i(t.getRootProps()),N),(0,d.iU)(O,i(t.getControlProps()),N),(0,d.iU)(C,i(t.getThumbProps({index:0})),N)});function L(){i(function(e,t){let i=Math.max(0,Math.min(1,t));return i>=.999?e:`${e}${Math.round(255*i).toString(16).padStart(2,"0")}`}(h,p))}function V(e){h=Z(e).hex6,b(),S(),L()}function F(e,t=!1){V(e);var i=h;let n=el.findIndex(e=>e.toLowerCase()===i.toLowerCase());n>=0&&el.splice(n,1),el.unshift(i),el.length>10&&(el.length=10),w.value=h,t&&E()}return(0,s.j)(g,()=>R.stop()),O.addEventListener("pointerdown",e=>{e.stopPropagation(),A=!0}),C.addEventListener("keydown",()=>{A=!0}),E(),b(),S(),g.append(f,v,k,T),g}var ec=class{constructor(e){ed(document),this.theme=e.theme,this.getVal=e.getVal,this.onVal=e.onVal,this.popoverOpts=e.popover,this.placement=e,this.commit=e.commit,this.i18n=e.i18n??(0,n.N)();let t="circle"===e.shape,i=(0,u.h)("span",{className:"vela-color-field-swatch",slot:en.slot("swatch")}),r=(0,u.h)("button",{className:t?"vela-color-field vela-color-field-circle":"vela-color-field",slot:en.slot("trigger"),attrs:{type:"button",id:e.id},data:{shape:e.shape??"square"}},i);this.el=r,this.swatch=i,this.paint(),r.addEventListener("vela-sync",()=>this.paint()),r.addEventListener("pointerdown",e=>{e.preventDefault(),r.focus({preventScroll:!0})}),r.addEventListener("click",e=>{e.stopPropagation(),this.toggle()}),this.release=(0,s.j)(r,()=>{(0,o.s0)()===r&&(0,o.$b)()})}destroy(){this.release()}paint(){let e=this.getVal();this.swatch.style.background=`linear-gradient(${e}, ${e}), ${es}`}toggle(){if((0,o.s0)()===this.el)return void(0,o.$b)();let e=eu(this.getVal(),this.theme,e=>{this.onVal(e),this.paint()},{commit:this.commit,i18n:this.i18n});new o.AM({trigger:this.el,theme:this.theme,side:this.placement.side,align:this.placement.align??this.popoverOpts?.align??"end",sideOffset:this.placement.sideOffset??this.popoverOpts?.gap??6,alignOffset:this.placement.alignOffset,avoidCollisions:this.placement.avoidCollisions,collisionPadding:this.placement.collisionPadding,host:this.popoverOpts?.host,position:this.popoverOpts?.position,collisionBoundary:this.placement.collisionBoundary??this.popoverOpts?.boundary,zIndex:this.popoverOpts?.zIndex,className:"vela-color-field-pop",slot:en.slot("content"),content:e,onClose:()=>(0,s.X)(e)}).show()}}}}]);
|