@atlanhq/app-playground 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/200.html +1 -1
- package/.output/public/404.html +1 -1
- package/.output/public/_fonts/HsvEuay0nMOs_2ObxMGaCaFlKdRnnDmfWeFTeRbjAVE-UeGuS_NHKiKleun7gcayWaUNaV2zWnEeGUxJVueLYm0.woff +0 -0
- package/.output/public/_fonts/Jtqhy44WKYEjGWTSusP5YJfJv7Wf74QqgkBOI9u_77s-Rl_Bht5SvmaotE20bkavBEAJEEGEa0hcz3d_8yOeXmw.woff +0 -0
- package/.output/public/_fonts/ZHaz3DhCHNWhsElqYfuM71rfBBDgjuU2sd34vaYJwQg-71NZaZSGjxzAGjCMnCc2zS5rS_EGA0xHKPGCggWuXik.woff +0 -0
- package/.output/public/_fonts/wMdBqIWtsuS5eTYXRFwACf6n6oW2h-j42f90vWIPIO8-vrVOc_lrScYZMKO0_R3igKLheJfV2qZ3c5qlWOY0LDQ.woff +0 -0
- package/.output/public/_nuxt/{DDms_zth.js → B0YH0Fym.js} +1 -1
- package/.output/public/_nuxt/Cmxe3Rk6.js +9 -0
- package/.output/public/_nuxt/{D2Qmo0ol.js → DtRtqV6M.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/9c766994-7e30-46e5-a7f1-f46e1c17bb09.json +1 -0
- package/.output/public/_nuxt/entry.7DdAkMUK.css +1 -0
- package/.output/public/_nuxt/jgrETd-j.js +91 -0
- package/.output/public/index.html +1 -1
- package/package.json +4 -6
- package/.output/public/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-4kZc4IwOXqryLeYzsaTvEKd54SPfeeGKPyDAZei18kw.woff +0 -0
- package/.output/public/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-H22fSgC3Z0EKcpOiAuIUCTWEf1pAo2gvhcxsxyU5X1U.woff +0 -0
- package/.output/public/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-RvZUU2X45U7WIDI083h9MozPZMSPdvOCkgsORsWvPOw.woff +0 -0
- package/.output/public/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-XiuBZ8wdWwKJPIRE0F6UTJCiPlG8G4BSFbYLIzThBlk.woff +0 -0
- package/.output/public/_nuxt/C4Uf7gf2.js +0 -9
- package/.output/public/_nuxt/DCLW_Qy0.js +0 -89
- package/.output/public/_nuxt/builds/meta/c9fff919-74b3-44f4-889a-61c81c84af15.json +0 -1
- package/.output/public/_nuxt/entry.dMNDAUBF.css +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{F as sb,G as ob,H as _m,I as lb,J as ub,K as cb,L as db,M as ge,N as fb,R as hb,S as pb,O as mb,T as dr,P as gb,Q as vb,U as yb,V as bb,W as xb,X as wb,Y as _b,Z as $b,$ as kb,a0 as fc,a1 as Sb,a2 as $m,a3 as Cb,k,a4 as Qs,a5 as D,a6 as H,y as O,A as T,a7 as Mb,a8 as Db,a9 as Ab,aa as Ob,ab as Eb,ac as Tb,E as xe,C as R,ad as km,ae as Fn,d as P,af as Pb,ag as Ib,ah as Lb,ai as qb,aj as Vb,ak as Fb,al as Bb,am as Rb,an as Nb,ao as jb,ap as hc,aq as Bn,ar as Ao,as as zb,at as Wb,au as Ae,h as Ke,av as Hb,aw as Ub,ax as Yb,ay as Kb,az as Gb,aA as Zb,aB as Jb,aC as Xb,aD as Qb,aE as tt,aF as e0,aG as t0,aH as n0,aI as a0,aJ as Tn,aK as r0,aL as i0,aM as s0,aN as Sm,aO as Cm,aP as ru,aQ as re,aR as qe,aS as L,aT as Oe,aU as Rt,aV as o0,aW as Mm,e as pc,aX as Dm,aY as l0,aZ as u0,o as Ie,a_ as c0,a$ as d0,b0 as Mi,b1 as f0,b2 as pn,b3 as Am,b4 as h0,z as _,b5 as p0,b6 as Di,b7 as m0,b8 as g0,b9 as Om,ba as fr,bb as Ai,r as V,bc as v0,bd as y0,be as ke,bf as F,g as b0,bg as x0,bh as Ne,bi as w0,bj as _0,bk as $0,bl as k0,bm as S0,bn as C0,bo as Wn,s as ea,bp as M0,bq as D0,br as A0,B as Q,bs as Em,bt as Tm,bu as Pm,bv as mc,bw as He,bx as ze,by as O0,bz as Im,bA as h,bB as E0,bC as T0,bD as P0,bE as I0,bF as Lm,bG as qm,bH as L0,bI as q0,bJ as gc,bK as vc,bL as V0,bM as F0,bN as Vm,bO as B0,bP as R0,bQ as Fm,bR as N0,bS as j0,bT as z0,bU as de,bV as ct,bW as yc,bX as W0,bY as Va,D as C,bZ as H0,b_ as bc,b$ as lt,c0 as U0,c1 as ye,c2 as Y0,a as K0,c3 as G0,c4 as Z0,c5 as J0,c6 as oa,_ as Oo,c7 as Bm,x as X0}from"./Cmxe3Rk6.js";const Q0=()=>{},e1=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:sb,BaseTransitionPropsValidators:ob,Comment:_m,DeprecationTypes:lb,EffectScope:ub,ErrorCodes:cb,ErrorTypeStrings:db,Fragment:ge,KeepAlive:fb,ReactiveEffect:hb,Static:pb,Suspense:mb,Teleport:dr,Text:gb,TrackOpTypes:vb,Transition:yb,TransitionGroup:bb,TriggerOpTypes:xb,VueElement:wb,assertNumber:_b,callWithAsyncErrorHandling:$b,callWithErrorHandling:kb,camelize:fc,capitalize:Sb,cloneVNode:$m,compatUtils:Cb,compile:Q0,computed:k,createApp:Qs,createBlock:D,createCommentVNode:H,createElementBlock:O,createElementVNode:T,createHydrationRenderer:Mb,createPropsRestProxy:Db,createRenderer:Ab,createSSRApp:Ob,createSlots:Eb,createStaticVNode:Tb,createTextVNode:xe,createVNode:R,customRef:km,defineAsyncComponent:Fn,defineComponent:P,defineCustomElement:Pb,defineEmits:Ib,defineExpose:Lb,defineModel:qb,defineOptions:Vb,defineProps:Fb,defineSSRCustomElement:Bb,defineSlots:Rb,devtools:Nb,effect:jb,effectScope:hc,getCurrentInstance:Bn,getCurrentScope:Ao,getCurrentWatcher:zb,getTransitionRawChildren:Wb,guardReactiveProps:Ae,h:Ke,handleError:Hb,hasInjectionContext:Ub,hydrate:Yb,hydrateOnIdle:Kb,hydrateOnInteraction:Gb,hydrateOnMediaQuery:Zb,hydrateOnVisible:Jb,initCustomFormatter:Xb,initDirectivesForSSR:Qb,inject:tt,isMemoSame:e0,isProxy:t0,isReactive:n0,isReadonly:a0,isRef:Tn,isRuntimeOnly:r0,isShallow:i0,isVNode:s0,markRaw:Sm,mergeDefaults:Cm,mergeModels:ru,mergeProps:re,nextTick:qe,normalizeClass:L,normalizeProps:Oe,normalizeStyle:Rt,onActivated:o0,onBeforeMount:Mm,onBeforeUnmount:pc,onBeforeUpdate:Dm,onDeactivated:l0,onErrorCaptured:u0,onMounted:Ie,onRenderTracked:c0,onRenderTriggered:d0,onScopeDispose:Mi,onServerPrefetch:f0,onUnmounted:pn,onUpdated:Am,onWatcherCleanup:h0,openBlock:_,popScopeId:p0,provide:Di,proxyRefs:m0,pushScopeId:g0,queuePostFlushCb:Om,reactive:fr,readonly:Ai,ref:V,registerRuntimeCompiler:v0,render:y0,renderList:ke,renderSlot:F,resolveComponent:b0,resolveDirective:x0,resolveDynamicComponent:Ne,resolveFilter:w0,resolveTransitionHooks:_0,setBlockTracking:$0,setDevtoolsHook:k0,setTransitionHooks:S0,shallowReactive:C0,shallowReadonly:Wn,shallowRef:ea,ssrContextKey:M0,ssrUtils:D0,stop:A0,toDisplayString:Q,toHandlerKey:Em,toHandlers:Tm,toRaw:Pm,toRef:mc,toRefs:He,toValue:ze,transformVNodeArgs:O0,triggerRef:Im,unref:h,useAttrs:E0,useCssModule:T0,useCssVars:P0,useHost:I0,useId:Lm,useModel:qm,useSSRContext:L0,useShadowRoot:q0,useSlots:gc,useTemplateRef:vc,useTransitionState:V0,vModelCheckbox:F0,vModelDynamic:Vm,vModelRadio:B0,vModelSelect:R0,vModelText:Fm,vShow:N0,version:j0,warn:z0,watch:de,watchEffect:ct,watchPostEffect:yc,watchSyncEffect:W0,withAsyncContext:Va,withCtx:C,withDefaults:H0,withDirectives:bc,withKeys:lt,withMemo:U0,withModifiers:ye,withScopeId:Y0},Symbol.toStringTag,{value:"Module"}));function Eo(t){const e=Bn(),n=e?.type.emits,a={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e?.type.__name}`),n?.forEach(r=>{a[Em(fc(r))]=(...i)=>t(r,...i)}),a}function Oi(t){const e=Bn(),n=Object.keys(e?.type.props??{}).reduce((r,i)=>{const s=(e?.type.props[i]).default;return s!==void 0&&(r[i]=s),r},{}),a=mc(t);return k(()=>{const r={},i=e?.vnode.props??{};return Object.keys(i).forEach(s=>{r[fc(s)]=i[s]}),Object.keys({...n,...r}).reduce((s,o)=>(a.value[o]!==void 0&&(s[o]=a.value[o]),s),{})})}function tn(t,e){const n=Oi(t),a=e?Eo(e):{};return k(()=>({...n.value,...a}))}function Ve(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,a=Symbol(n);return[r=>{const i=tt(a,r);if(i||i===null)return i;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},r=>(Di(a,r),r)]}const t1=["INPUT","TEXTAREA"];function Rm(t,e,n,a={}){if(!e||a.enableIgnoredElement&&t1.includes(e.nodeName))return null;const{arrowKeyOptions:r="both",attributeName:i="[data-reka-collection-item]",itemsArray:s=[],loop:o=!0,dir:l="ltr",preventScroll:u=!0,focus:c=!1}=a,[d,f,p,m,g,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],v=p||m,b=d||f;if(!g&&!y&&(!v&&!b||r==="vertical"&&b||r==="horizontal"&&v))return null;const x=n?Array.from(n.querySelectorAll(i)):s;if(!x.length)return null;u&&t.preventDefault();let w=null;return b||v?w=Nm(x,e,{goForward:v?m:l==="ltr"?d:f,loop:o}):g?w=x.at(0)||null:y&&(w=x.at(-1)||null),c&&w?.focus(),w}function Nm(t,e,n,a=t.includes(e)?t.length:t.length+1){if(--a===0)return null;const r=t.indexOf(e);let i;if(r===-1?i=n.goForward?0:t.length-1:i=n.goForward?r+1:r-1,!n.loop&&(i<0||i>=t.length))return null;const s=(i+t.length)%t.length,o=t[s];return o?o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"?Nm(t,o,n,a):o:null}function n1(t,e){var n;const a=ea();return ct(()=>{a.value=t()},{...e,flush:(n=void 0)!==null&&n!==void 0?n:"sync"}),Ai(a)}function Fa(t,e){return Ao()?(Mi(t,e),!0):!1}function jm(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const a=()=>e(n);return Fa(a),{off:a}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(a=>a(...n))),clear:()=>{t.clear()}}}function a1(t){let e=!1,n;const a=hc(!0);return(...r)=>(e||(n=a.run(()=>t(...r)),e=!0),n)}const zt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const r1=t=>typeof t<"u",i1=Object.prototype.toString,s1=t=>i1.call(t)==="[object Object]",o1=()=>{};function dl(t){return Array.isArray(t)?t:[t]}function l1(t){return Bn()}function u1(t){if(!zt)return t;let e=0,n,a;const r=()=>{e-=1,a&&e<=0&&(a.stop(),n=void 0,a=void 0)};return(...i)=>(e+=1,a||(a=hc(!0),n=a.run(()=>t(...i))),Fa(r),n)}function c1(t){return Tn(t)?fr(new Proxy({},{get(e,n,a){return h(Reflect.get(t.value,n,a))},set(e,n,a){return Tn(t.value[n])&&!Tn(a)?t.value[n].value=a:t.value[n]=a,!0},deleteProperty(e,n){return Reflect.deleteProperty(t.value,n)},has(e,n){return Reflect.has(t.value,n)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})):fr(t)}function xc(t){return c1(k(t))}function d1(t,...e){const n=e.flat(),a=n[0];return xc(()=>Object.fromEntries(typeof a=="function"?Object.entries(He(t)).filter(([r,i])=>!a(ze(i),r)):Object.entries(He(t)).filter(r=>!n.includes(r[0]))))}function zm(t,e=1e4){return km((n,a)=>{let r=ze(t),i;const s=()=>setTimeout(()=>{r=ze(t),a()},ze(e));return Fa(()=>{clearTimeout(i)}),{get(){return n(),r},set(o){r=o,a(),clearTimeout(i),i=s()}}})}function f1(t,e){l1()&&pc(t,e)}function wc(t,e,n={}){const{immediate:a=!0,immediateCallback:r=!1}=n,i=ea(!1);let s;function o(){s&&(clearTimeout(s),s=void 0)}function l(){i.value=!1,o()}function u(...c){r&&t(),o(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=void 0,t(...c)},ze(e))}return a&&(i.value=!0,zt&&u()),Fa(l),{isPending:Wn(i),start:u,stop:l}}function h1(t=1e3,e={}){const{controls:n=!1,callback:a}=e,r=wc(a??o1,t,e),i=k(()=>!r.isPending.value);return n?{ready:i,...r}:i}function p1(t,e,n){return de(t,e,{...n,immediate:!0})}const Ei=zt?window:void 0;function Tt(t){var e;const n=ze(t);return(e=n?.$el)!==null&&e!==void 0?e:n}function Ca(...t){const e=(a,r,i,s)=>(a.addEventListener(r,i,s),()=>a.removeEventListener(r,i,s)),n=k(()=>{const a=dl(ze(t[0])).filter(r=>r!=null);return a.every(r=>typeof r!="string")?a:void 0});return p1(()=>{var a,r;return[(a=(r=n.value)===null||r===void 0?void 0:r.map(i=>Tt(i)))!==null&&a!==void 0?a:[Ei].filter(i=>i!=null),dl(ze(n.value?t[1]:t[0])),dl(h(n.value?t[2]:t[1])),ze(n.value?t[3]:t[2])]},([a,r,i,s],o,l)=>{if(!(a!=null&&a.length)||!(r!=null&&r.length)||!(i!=null&&i.length))return;const u=s1(s)?{...s}:s,c=a.flatMap(d=>r.flatMap(f=>i.map(p=>e(d,f,p,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function Wm(){const t=ea(!1),e=Bn();return e&&Ie(()=>{t.value=!0},e),t}function m1(t){const e=Wm();return k(()=>(e.value,!!t()))}function g1(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function _c(...t){let e,n,a={};t.length===3?(e=t[0],n=t[1],a=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],a=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:r=Ei,eventName:i="keydown",passive:s=!1,dedupe:o=!1}=a,l=g1(e);return Ca(r,i,u=>{u.repeat&&ze(o)||l(u)&&n(u)},s)}function v1(t,e={}){const{immediate:n=!0,fpsLimit:a=null,window:r=Ei,once:i=!1}=e,s=ea(!1),o=k(()=>{const p=ze(a);return p?1e3/p:null});let l=0,u=null;function c(p){if(!s.value||!r)return;l||(l=p);const m=p-l;if(o.value&&m<o.value){u=r.requestAnimationFrame(c);return}if(l=p,t({delta:m,timestamp:p}),i){s.value=!1,u=null;return}u=r.requestAnimationFrame(c)}function d(){!s.value&&r&&(s.value=!0,l=0,u=r.requestAnimationFrame(c))}function f(){s.value=!1,u!=null&&r&&(r.cancelAnimationFrame(u),u=null)}return n&&d(),Fa(f),{isActive:Ai(s),pause:f,resume:d}}function y1(t){return JSON.parse(JSON.stringify(t))}function b1(t,e,n={}){const{window:a=Ei,...r}=n;let i;const s=m1(()=>a&&"ResizeObserver"in a),o=()=>{i&&(i.disconnect(),i=void 0)},l=de(k(()=>{const c=ze(t);return Array.isArray(c)?c.map(d=>Tt(d)):[Tt(c)]}),c=>{if(o(),s.value&&a){i=new ResizeObserver(e);for(const d of c)d&&i.observe(d,r)}},{immediate:!0,flush:"post"}),u=()=>{o(),l()};return Fa(u),{isSupported:s,stop:u}}function ut(t,e,n,a={}){var r,i;const{clone:s=!1,passive:o=!1,eventName:l,deep:u=!1,defaultValue:c,shouldEmit:d}=a,f=Bn(),p=n||f?.emit||(f==null||(r=f.$emit)===null||r===void 0?void 0:r.bind(f))||(f==null||(i=f.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(f?.proxy));let m=l;e||(e="modelValue"),m=m||`update:${e.toString()}`;const g=b=>s?typeof s=="function"?s(b):y1(b):b,y=()=>r1(t[e])?g(t[e]):c,v=b=>{d?d(b)&&p(m,b):p(m,b)};if(o){const b=V(y());let x=!1;return de(()=>t[e],w=>{x||(x=!0,b.value=g(w),qe(()=>x=!1))}),de(b,w=>{!x&&(w!==t[e]||u)&&v(w)},{deep:u}),b}else return k({get(){return y()},set(b){v(b)}})}function ce(){const t=Bn(),e=V(),n=k(()=>a());Am(()=>{n.value!==a()&&Im(e)});function a(){return e.value&&"$el"in e.value&&["#text","#comment"].includes(e.value.$el.nodeName)?e.value.$el.nextElementSibling:Tt(e)}const r=Object.assign({},t.exposed),i={};for(const o in t.props)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(r).length>0)for(const o in r)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>r[o]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(o){if(e.value=o,!!o&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),!(o instanceof Element)&&!Object.hasOwn(o,"$el"))){const l=o.$.exposed,u=Object.assign({},i);for(const c in l)Object.defineProperty(u,c,{enumerable:!0,configurable:!0,get:()=>l[c]});t.exposed=u}}return{forwardRef:s,currentRef:e,currentElement:n}}function $c(t){return t?t.flatMap(e=>e.type===ge?$c(e.children):[e]):[]}const iu=P({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var a;if(!n.default)return null;const r=$c(n.default()),i=r.findIndex(u=>u.type!==_m);if(i===-1)return r;const s=r[i];(a=s.props)==null||delete a.ref;const o=s.props?re(e,s.props):e,l=$m({...s,props:{}},o);return r.length===1?l:(r[i]=l,r)}}}),x1=["area","img","input"],oe=P({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const a=t.asChild?"template":t.as;return typeof a=="string"&&x1.includes(a)?()=>Ke(a,e):a!=="template"?()=>Ke(t.as,e,{default:n.default}):()=>Ke(iu,e,{default:n.default})}}),[Hm,w1]=Ve("CollapsibleRoot");var _1=P({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(t,{expose:e,emit:n}){const a=t,r=ut(a,"open",n,{defaultValue:a.defaultOpen,passive:a.open===void 0}),{disabled:i,unmountOnHide:s}=He(a);return w1({contentId:"",disabled:i,open:r,unmountOnHide:s,onOpenToggle:()=>{i.value||(r.value=!r.value)}}),e({open:r}),ce(),(o,l)=>(_(),D(h(oe),{as:o.as,"as-child":a.asChild,"data-state":h(r)?"open":"closed","data-disabled":h(i)?"":void 0},{default:C(()=>[F(o.$slots,"default",{open:h(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),$1=_1;const[To]=Ve("ConfigProvider");function Ti(t){const e=To({dir:V("ltr")});return k(()=>{var n;return t?.value||((n=e.dir)==null?void 0:n.value)||"ltr"})}function Pn(t){return t==null}var Um=t=>{throw TypeError(t)},k1=(t,e,n)=>e.has(t)||Um("Cannot "+n),Hi=(t,e,n)=>(k1(t,e,"read from private field"),n?n.call(t):e.get(t)),S1=(t,e,n)=>e.has(t)?Um("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);function Xd(t){return typeof t=="string"?`'${t}'`:new C1().serialize(t)}const C1=function(){var t;class e{constructor(){S1(this,t,new Map)}compare(a,r){const i=typeof a,s=typeof r;return i==="string"&&s==="string"?a.localeCompare(r):i==="number"&&s==="number"?a-r:String.prototype.localeCompare.call(this.serialize(a,!0),this.serialize(r,!0))}serialize(a,r){if(a===null)return"null";switch(typeof a){case"string":return r?a:`'${a}'`;case"bigint":return`${a}n`;case"object":return this.$object(a);case"function":return this.$function(a)}return String(a)}serializeObject(a){const r=Object.prototype.toString.call(a);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),a);const i=a.constructor,s=i===Object||i===void 0?"":i.name;if(s!==""&&globalThis[s]===i)return this.serializeBuiltInType(s,a);if(typeof a.toJSON=="function"){const o=a.toJSON();return s+(o!==null&&typeof o=="object"?this.$object(o):`(${this.serialize(o)})`)}return this.serializeObjectEntries(s,Object.entries(a))}serializeBuiltInType(a,r){const i=this["$"+a];if(i)return i.call(this,r);if(typeof r?.entries=="function")return this.serializeObjectEntries(a,r.entries());throw new Error(`Cannot serialize ${a}`)}serializeObjectEntries(a,r){const i=Array.from(r).sort((o,l)=>this.compare(o[0],l[0]));let s=`${a}{`;for(let o=0;o<i.length;o++){const[l,u]=i[o];s+=`${this.serialize(l,!0)}:${this.serialize(u)}`,o<i.length-1&&(s+=",")}return s+"}"}$object(a){let r=Hi(this,t).get(a);return r===void 0&&(Hi(this,t).set(a,`#${Hi(this,t).size}`),r=this.serializeObject(a),Hi(this,t).set(a,r)),r}$function(a){const r=Function.prototype.toString.call(a);return r.slice(-15)==="[native code] }"?`${a.name||""}()[native]`:`${a.name}(${a.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(a){let r="[";for(let i=0;i<a.length;i++)r+=this.serialize(a[i]),i<a.length-1&&(r+=",");return r+"]"}$Date(a){try{return`Date(${a.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(a){return`ArrayBuffer[${new Uint8Array(a).join(",")}]`}$Set(a){return`Set${this.$Array(Array.from(a).sort((r,i)=>this.compare(r,i)))}`}$Map(a){return this.serializeObjectEntries("Map",a.entries())}}t=new WeakMap;for(const n of["Error","RegExp","URL"])e.prototype["$"+n]=function(a){return`${n}(${a})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+n]=function(a){return`${n}[${a.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])e.prototype["$"+n]=function(a){return`${n}[${a.join("n,")}${a.length>0?"n":""}]`};return e}();function Aa(t,e){return t===e||Xd(t)===Xd(e)}function su(t,e){return Pn(t)?!1:Array.isArray(t)?t.some(n=>Aa(n,e)):Aa(t,e)}function M1({type:t,defaultValue:e,modelValue:n}){const a=n||e;return n!==void 0||e!==void 0?Array.isArray(a)?"multiple":"single":t??"single"}function D1({type:t,defaultValue:e,modelValue:n}){return t||M1({type:t,defaultValue:e,modelValue:n})}function A1({type:t,defaultValue:e}){return e!==void 0?e:t==="single"?void 0:[]}function O1(t,e){const n=k(()=>D1(t)),a=ut(t,"modelValue",e,{defaultValue:A1(t),passive:t.modelValue===void 0,deep:!0});function r(s){if(n.value==="single")a.value=Aa(s,a.value)?void 0:s;else{const o=Array.isArray(a.value)?[...a.value||[]]:[a.value].filter(Boolean);if(su(o,s)){const l=o.findIndex(u=>Aa(u,s));o.splice(l,1)}else o.push(s);a.value=o}}const i=k(()=>n.value==="single");return{modelValue:a,changeModelValue:r,isSingle:i}}const[Po,E1]=Ve("AccordionRoot");var T1=P({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,{dir:r,disabled:i,unmountOnHide:s}=He(n),o=Ti(r),{modelValue:l,changeModelValue:u,isSingle:c}=O1(n,a),{forwardRef:d,currentElement:f}=ce();return E1({disabled:i,direction:o,orientation:n.orientation,parentElement:f,isSingle:c,collapsible:n.collapsible,modelValue:l,changeModelValue:u,unmountOnHide:s}),(p,m)=>(_(),D(h(oe),{ref:h(d),"as-child":p.asChild,as:p.as},{default:C(()=>[F(p.$slots,"default",{modelValue:h(l)})]),_:3},8,["as-child","as"]))}}),P1=T1,ou=function(t){return t.Open="open",t.Closed="closed",t}(ou||{});const[kc,I1]=Ve("AccordionItem");var L1=P({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:e}){const n=t,a=Po(),r=k(()=>a.isSingle.value?n.value===a.modelValue.value:Array.isArray(a.modelValue.value)&&a.modelValue.value.includes(n.value)),i=k(()=>a.disabled.value||n.disabled),s=k(()=>i.value?"":void 0),o=k(()=>r.value?ou.Open:ou.Closed);e({open:r,dataDisabled:s});const{currentRef:l,currentElement:u}=ce();I1({open:r,dataState:o,disabled:i,dataDisabled:s,triggerId:"",currentRef:l,currentElement:u,value:k(()=>n.value)});function c(d){var f;const p=d.target;if(Array.from(((f=a.parentElement.value)==null?void 0:f.querySelectorAll("[data-reka-collection-item]"))??[]).findIndex(m=>m===p)===-1)return null;Rm(d,p,a.parentElement.value,{arrowKeyOptions:a.orientation,dir:a.direction.value,focus:!0})}return(d,f)=>(_(),D(h($1),{"data-orientation":h(a).orientation,"data-disabled":s.value,"data-state":o.value,disabled:i.value,open:r.value,as:n.as,"as-child":n.asChild,"unmount-on-hide":n.unmountOnHide??h(a).unmountOnHide.value,onKeydown:lt(c,["up","down","left","right","home","end"])},{default:C(()=>[F(d.$slots,"default",{open:r.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),q1=L1;function Ym(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=Ym(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function V1(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=Ym(t))&&(a&&(a+=" "),a+=e);return a}const Qd=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ef=V1,I=(t,e)=>n=>{var a;if(e?.variants==null)return ef(t,n?.class,n?.className);const{variants:r,defaultVariants:i}=e,s=Object.keys(r).map(u=>{const c=n?.[u],d=i?.[u];if(c===null)return null;const f=Qd(c)||Qd(d);return r[u][f]}),o=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(a=e.compoundVariants)===null||a===void 0?void 0:a.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[g,y]=m;return Array.isArray(y)?y.includes({...i,...o}[g]):{...i,...o}[g]===y})?[...u,d,f]:u},[]);return ef(t,s,l,n?.class,n?.className)},F1=I("w-full flex flex-col font-inter",{variants:{variant:{default:"",floating:"gap-3 [&>div[data-state]]:shadow-stroke-bordered-interactive [&>div[data-state]]:border-b-0"}},defaultVariants:{variant:"default"}}),B1=I("border-b border-border-muted rounded-md bg-transparent hover:bg-hover"),R1=I(["w-full px-2 py-2 cursor-pointer flex gap-2 items-center text-left","border-none outline-none bg-transparent","text-normal text-xs font-medium leading-lg font-normal tracking-normal"].join(" ")),N1=I("p-0.5 [&>svg]:block"),j1=I("flex-1 flex justify-between items-center gap-2"),z1=I(["bg-transparent text-subtle text-xs font-normal leading-[150%] tracking-[0%]","p-2 pt-1 overflow-hidden","data-[state=open]:animate-collapse-in data-[state=closed]:animate-collapse-out"].join(" ")),W1=I(["w-6 h-6 flex items-center justify-center origin-center","duration-200 transition-transform ease-default","[[data-state=open]_&]:rotate-180"].join(" ")),Pi=(t={})=>({root:F1(t),item:B1(),itemTrigger:R1(),itemTriggerPrefix:N1(),itemTriggerContent:j1(),itemContent:z1(),itemIndicator:W1()}),H1=P({__name:"AccordionItem",props:{disabled:{type:Boolean},value:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=tn(t),n=k(()=>Pi());return(a,r)=>(_(),D(h(q1),re(h(e),{class:[n.value.item],"data-testid":"atlantis-accordion-item"}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["class"]))}});function Pt(t,e="reka"){var n;let a;return a=(n=Lm)==null?void 0:n.call(e1),e?`${e}-${a}`:a}function U1(t,e){const n=V(t);function a(r){return e[n.value][r]??n.value}return{state:n,dispatch:r=>{n.value=a(r)}}}function Y1(t,e){var n;const a=V({}),r=V("none"),i=V(t),s=t.value?"mounted":"unmounted";let o;const l=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??Ei,{state:u,dispatch:c}=U1(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),d=y=>{var v;if(zt){const b=new CustomEvent(y,{bubbles:!1,cancelable:!1});(v=e.value)==null||v.dispatchEvent(b)}};de(t,async(y,v)=>{var b;const x=v!==y;if(await qe(),x){const w=r.value,$=Ui(e.value);y?(c("MOUNT"),d("enter"),$==="none"&&d("after-enter")):$==="none"||$==="undefined"||((b=a.value)==null?void 0:b.display)==="none"?(c("UNMOUNT"),d("leave"),d("after-leave")):v&&w!==$?(c("ANIMATION_OUT"),d("leave")):(c("UNMOUNT"),d("after-leave"))}},{immediate:!0});const f=y=>{const v=Ui(e.value),b=v.includes(CSS.escape(y.animationName)),x=u.value==="mounted"?"enter":"leave";if(y.target===e.value&&b&&(d(`after-${x}`),c("ANIMATION_END"),!i.value)){const w=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=l?.setTimeout(()=>{var $;(($=e.value)==null?void 0:$.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=w)})}y.target===e.value&&v==="none"&&c("ANIMATION_END")},p=y=>{y.target===e.value&&(r.value=Ui(e.value))},m=de(e,(y,v)=>{y?(a.value=getComputedStyle(y),y.addEventListener("animationstart",p),y.addEventListener("animationcancel",f),y.addEventListener("animationend",f)):(c("ANIMATION_END"),o!==void 0&&l?.clearTimeout(o),v?.removeEventListener("animationstart",p),v?.removeEventListener("animationcancel",f),v?.removeEventListener("animationend",f))},{immediate:!0}),g=de(u,()=>{const y=Ui(e.value);r.value=u.value==="mounted"?y:"none"});return pn(()=>{m(),g()}),{isPresent:k(()=>["mounted","unmountSuspended"].includes(u.value))}}function Ui(t){return t&&getComputedStyle(t).animationName||"none"}var la=P({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var a;const{present:r,forceMount:i}=He(t),s=V(),{isPresent:o}=Y1(r,s);n({present:o});let l=e.default({present:o.value});l=$c(l||[]);const u=Bn();if(l&&l?.length>1){const c=(a=u?.parent)!=null&&a.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(`
|
|
2
|
+
`)].join(`
|
|
3
|
+
`))}return()=>i.value||r.value||o.value?Ke(e.default({present:o.value})[0],{ref:c=>{const d=Tt(c);return typeof d?.hasAttribute>"u"||(d!=null&&d.hasAttribute("data-reka-popper-content-wrapper")?s.value=d.firstElementChild:s.value=d),d}}):null}}),K1=P({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(t,{emit:e}){const n=t,a=e,r=Hm();r.contentId||(r.contentId=Pt(void 0,"reka-collapsible-content"));const i=V(),{forwardRef:s,currentElement:o}=ce(),l=V(0),u=V(0),c=k(()=>r.open.value),d=V(c.value),f=V();de(()=>{var m;return[c.value,(m=i.value)==null?void 0:m.present]},async()=>{await qe();const m=o.value;if(!m)return;f.value=f.value||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const g=m.getBoundingClientRect();u.value=g.height,l.value=g.width,d.value||(m.style.transitionDuration=f.value.transitionDuration,m.style.animationName=f.value.animationName)},{immediate:!0});const p=k(()=>d.value&&r.open.value);return Ie(()=>{requestAnimationFrame(()=>{d.value=!1})}),Ca(o,"beforematch",m=>{requestAnimationFrame(()=>{r.onOpenToggle(),a("contentFound")})}),(m,g)=>(_(),D(h(la),{ref_key:"presentRef",ref:i,present:m.forceMount||h(r).open.value,"force-mount":!0},{default:C(({present:y})=>{var v;return[R(h(oe),re(m.$attrs,{id:h(r).contentId,ref:h(s),"as-child":n.asChild,as:m.as,hidden:y?void 0:h(r).unmountOnHide.value?"":"until-found","data-state":p.value?void 0:h(r).open.value?"open":"closed","data-disabled":(v=h(r).disabled)!=null&&v.value?"":void 0,style:{"--reka-collapsible-content-height":`${u.value}px`,"--reka-collapsible-content-width":`${l.value}px`}}),{default:C(()=>[!h(r).unmountOnHide.value||y?F(m.$slots,"default",{key:0}):H("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),G1=K1,Z1=P({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Po(),a=kc();return ce(),(r,i)=>(_(),D(h(G1),{role:"region","as-child":e.asChild,as:r.as,"force-mount":e.forceMount,"aria-labelledby":h(a).triggerId,"data-state":h(a).dataState.value,"data-disabled":h(a).dataDisabled.value,"data-orientation":h(n).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:i[0]||(i[0]=s=>h(n).changeModelValue(h(a).value.value))},{default:C(()=>[F(r.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),J1=Z1;const X1=P({__name:"AccordionItemContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=k(()=>Pi());return(a,r)=>(_(),D(h(J1),re(e,{class:[n.value.itemContent],"data-testid":"atlantis-accordion-item-content"}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["class"]))}}),Q1={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",preserveAspectRatio:"none"};function ex(t,e){return _(),O("svg",Q1,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5531 5.90623L10.089 6.37027L7.6187 8.84055C7.27698 9.18232 6.72297 9.18232 6.38126 8.84055L3.91094 6.37027L3.4469 5.90623L4.37498 4.97815L4.83902 5.44219L6.99998 7.60315L9.16097 5.44219L9.62499 4.97815L10.5531 5.90623Z",fill:"currentColor"},null,-1)])])}const Km={render:ex},tx=P({__name:"AccordionItemIndicator",setup(t){const e=k(()=>Pi());return(n,a)=>(_(),O("span",{class:L([e.value.itemIndicator]),"data-testid":"atlantis-accordion-item-indicator"},[F(n.$slots,"default",{},()=>[R(h(Km))])],2))}});var nx=P({__name:"AccordionHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h3"}},setup(t){const e=t,n=Po(),a=kc();return ce(),(r,i)=>(_(),D(h(oe),{as:e.as,"as-child":e.asChild,"data-orientation":h(n).orientation,"data-state":h(a).dataState.value,"data-disabled":h(a).dataDisabled.value},{default:C(()=>[F(r.$slots,"default")]),_:3},8,["as","as-child","data-orientation","data-state","data-disabled"]))}}),ax=nx,rx=P({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;ce();const n=Hm();return(a,r)=>{var i,s;return _(),D(h(oe),{type:a.as==="button"?"button":void 0,as:a.as,"as-child":e.asChild,"aria-controls":h(n).contentId,"aria-expanded":h(n).open.value,"data-state":h(n).open.value?"open":"closed","data-disabled":(i=h(n).disabled)!=null&&i.value?"":void 0,disabled:(s=h(n).disabled)==null?void 0:s.value,onClick:h(n).onOpenToggle},{default:C(()=>[F(a.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),ix=rx,sx=P({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Po(),a=kc();a.triggerId||(a.triggerId=Pt(void 0,"reka-accordion-trigger"));function r(){const i=n.isSingle.value&&a.open.value&&!n.collapsible;a.disabled.value||i||n.changeModelValue(a.value.value)}return(i,s)=>(_(),D(h(ix),{id:h(a).triggerId,ref:h(a).currentRef,"data-reka-collection-item":"",as:e.as,"as-child":e.asChild,"aria-disabled":h(a).disabled.value||void 0,"aria-expanded":h(a).open.value||!1,"data-disabled":h(a).dataDisabled.value,"data-orientation":h(n).orientation,"data-state":h(a).dataState.value,disabled:h(a).disabled.value,onClick:r},{default:C(()=>[F(i.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),ox=sx;const lx=P({__name:"AccordionItemTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=gc(),a=k(()=>Pi());return(r,i)=>(_(),D(h(ax),null,{default:C(()=>[R(h(ox),re(e,{class:[a.value.itemTrigger],"data-testid":"atlantis-accordion-item-trigger"}),{default:C(()=>[h(n).prefix?(_(),O("div",{key:0,class:L(a.value.itemTriggerPrefix)},[F(r.$slots,"prefix")],2)):H("",!0),T("div",{class:L([a.value.itemTriggerContent])},[F(r.$slots,"default")],2)]),_:3},16,["class"])]),_:3}))}}),ux=P({__name:"AccordionRoot",props:{collapsible:{type:Boolean},disabled:{type:Boolean},dir:{},orientation:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{},variant:{default:"default"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=tn(n,e),r=k(()=>Pi({variant:n.variant}));return(i,s)=>(_(),D(h(P1),re(h(a),{class:[r.value.root],"data-testid":"atlantis-accordion-root"}),{default:C(()=>[F(i.$slots,"default")]),_:3},16,["class"]))}});var Gm=(t=>(t.ArrowUp="↑",t.ArrowDown="↓",t.ArrowLeft="←",t.ArrowRight="→",t.Enter="↵",t.Tab="⇥",t.Escape="Esc",t.Space="␣",t.Backspace="⌫",t.Delete="Del",t.PageUp="PgUp",t.PageDown="PgDn",t.Command="⌘",t.Control="CTRL",t))(Gm||{});const cx=I("inline-flex items-center justify-center rounded-sm px-0.5 h-3.5 text-center font-mono text-xs font-regular leading-sm tracking-tight uppercase text-subtle bg-neutral-default shadow-inner-highlighted-ring",{defaultVariants:{type:"default"},variants:{type:{default:"",inverted:"text-inverse bg-neutral-default shadow-inner-highlighted-ring"}}}),dx={class:"flex gap-x-3"},eo=P({__name:"KeyboardKey",props:{type:{default:"default"},keys:{default:()=>[]},macKeys:{default:()=>[]},windowsKeys:{default:()=>[]},forcePlatform:{default:"mac"}},setup(t){const e=t,n=s=>s==="Ctrl"?"Control":s==="Meta"?"Command":s,a=s=>{const o=n(s);return Gm[o]||s},r=V("windows");de(()=>e.forcePlatform,s=>{s&&(r.value=s)}),Ie(()=>{e.forcePlatform?r.value=e.forcePlatform:typeof navigator<"u"&&(r.value=navigator.userAgent.toLowerCase().includes("mac")?"mac":"windows")});const i=k(()=>e.macKeys||e.windowsKeys?r.value==="mac"?e.macKeys??[]:e.windowsKeys??[]:e.keys??[]);return(s,o)=>(_(),O("div",dx,[(_(!0),O(ge,null,ke(i.value,l=>(_(),O("div",{key:l,class:L(h(cx)({type:t.type}))},Q(a(l)),3))),128))]))}}),fx=I("relative inline-flex items-center justify-center",{variants:{size:{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"}},defaultVariants:{size:"md"}}),tf=I("w-full h-full"),hx=I("absolute top-0 left-0"),px=I("absolute top-0 left-0 w-full h-full animate-spin"),mx=["aria-label"],gx=["fill"],vx=["fill"],Zm=P({__name:"Spinner",props:{variant:{default:"default"},size:{default:"md"},ariaLabel:{default:"Loading"}},setup(t){const e=t,n=k(()=>e.variant==="default"?"var(--icon-selected)":"var(--icon-inverse)");return(a,r)=>(_(),O("div",{class:L(h(fx)({size:e.size})),"aria-label":e.ariaLabel,role:"status","data-testid":"spinner"},[(_(),O("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L([h(tf)(),h(hx)()])},[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:n.value,opacity:"0.3",d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"},null,8,gx)],2)),T("div",{class:L(h(px)())},[(_(),O("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:L(h(tf)())},[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:n.value,d:"M12 4C9.38441 4 7.06204 5.25316 5.59909 7.20034C4.9356 8.08342 3.68185 8.26146 2.79876 7.59798C1.91568 6.93449 1.73764 5.68074 2.40113 4.79765C4.58709 1.88817 8.07337 0 12 0C18.6274 0 24 5.37257 24 12C24 18.6274 18.6274 24 12 24C10.8954 24 10 23.1046 10 22C10 20.8954 10.8954 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"},null,8,vx)],2))],2)],10,mx))}}),yx=I("",{variants:{variant:{primary:"text-inherit",critical:"text-inherit",default:"text-inherit",subtle:"text-inherit",plainPrimary:"text-inherit",plainCritical:"text-inherit",dashed:"text-inherit",validation:"text-inherit",link:"text-inherit text-body_small_medium"}},defaultVariants:{variant:"primary"}}),bx=(t={})=>({root:yx(t)}),xx=P({__name:"ButtonText",props:{text:{},variant:{default:"primary"}},setup(t){const e=t,n=k(()=>bx({variant:e.variant}));return(a,r)=>(_(),O("span",{class:L(n.value.root)},[F(a.$slots,"default",{},()=>[xe(Q(e.text),1)])],2))}}),xt={primary:["active:!bg-brand-bold-pressed","text-whitealpha-1000","bg-brand-bold-default","shadow-stroke-bordered-interactive","hover:bg-brand-bold-hover","focus:bg-brand-bold-default","focus:shadow-state-focus-primary","disabled:text-disabled","disabled:bg-gray-subtler-default","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-gray-subtler-default","disabled:active:!bg-gray-subtler-default","data-[selected=true]:shadow-stroke-bordered-interactive"].join(" "),critical:["bg-red-700","text-whitealpha-1000","shadow-stroke-bordered-interactive","active:!bg-error-bold-pressed","hover:bg-red-800","focus:bg-error-bold-default","focus:shadow-state-focus-critical","disabled:text-disabled","disabled:bg-gray-subtler-default","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-gray-subtler-default","disabled:active:!bg-gray-subtler-default","data-[selected=true]:shadow-stroke-bordered-interactive"].join(" "),default:["bg-whitealpha-1000","text-graycool-1000","shadow-stroke-bordered-interactive","hover:bg-graycoolalpha-10","active:!bg-pressed","focus:shadow-state-focus-primary","focus:z-[100000]","disabled:text-disabled","disabled:bg-gray-subtler-default","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-gray-subtler-default","disabled:active:!bg-gray-subtler-default","data-[selected=true]:shadow-stroke-bordered-interactive"].join(" "),subtle:["bg-whitealpha-1000","text-subtle","active:!bg-pressed","disabled:bg-pressed","hover:bg-hover","focus:shadow-state-focus-primary"].join(" "),plainPrimary:["bg-whitealpha-1000","text-seed-800","active:!bg-brand-selected-pressed","active:text-brand-pressed","hover:bg-seed-200","data-[selected]:bg-seed-a3","disabled:text-disabled","disabled:bg-whitealpha-1000","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-whitealpha-1000","focus:shadow-state-focus-primary","focus:text-brand-default"].join(" "),plainCritical:["bg-whitealpha-1000","text-red-800","active:!bg-error-pressed","active:text-error-pressed","hover:bg-red-200","data-[selected]:bg-red-a3","disabled:text-disabled","disabled:bg-whitealpha-1000","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-whitealpha-1000","focus:shadow-state-focus-critical","focus:text-error-default"].join(" "),dashed:["data-[selected=true]:shadow-stroke-bordered-interactive","shadow-stroke-bordered-interactive","bg-whitealpha-1000","text-graycool-900","border","border-dashed","border-graycoolalpha-75","active:!bg-hover","active:text-normal","hover:bg-graycoolalpha-10","focus:shadow-state-focus-primary","disabled:text-disabled","disabled:bg-gray-subtler-default","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-gray-subtler-default","disabled:active:!bg-gray-subtler-default"].join(" "),validation:["bg-green-700","text-whitealpha-1000","shadow-stroke-bordered-interactive","active:!bg-success-bold-pressed","hover:bg-green-800","focus:bg-success-bold-default","focus:shadow-state-focus-success","disabled:text-graycoolalpha-75","disabled:bg-graycoolalpha-20","disabled:cursor-not-allowed","disabled:hover:text-graycoolalpha-75","disabled:hover:bg-graycoolalpha-20","data-[selected=true]:shadow-stroke-bordered-interactive"].join(" "),link:["bg-transparent","text-brand-default","text-body_small_medium","p-0","h-auto","disabled:text-disabled","disabled:cursor-not-allowed"].join(" ")},nf={default:"w-8 h-8",small:"w-6 h-6"},wx=["items-center","appearance-none","cursor-pointer","inline-flex","isolate","min-w-0","justify-center","outline-none","relative","transition-[background,border-color,color,box-shadow]","duration-normal","ease-default","select-none","align-middle","rounded","border-none","text-xs","font-medium","font-inter","leading-lg","whitespace-nowrap","[hidden]:hidden","disabled:text-disabled","disabled:bg-gray-subtler-default","disabled:cursor-not-allowed","disabled:shadow-none","disabled:hover:text-disabled","disabled:hover:bg-gray-subtler-default","disabled:active:!bg-gray-subtler-default"].join(" "),_x=I(wx,{variants:{type:{primary:xt.primary,critical:xt.critical,default:xt.default,subtle:xt.subtle,plainPrimary:xt.plainPrimary,plainCritical:xt.plainCritical,dashed:xt.dashed,validation:xt.validation,link:xt.link},size:{default:"px-3 py-1.5 gap-1.5",small:"px-2 py-0.5 gap-1.5"}},defaultVariants:{type:"primary",size:"default"}}),$x=I("flex items-center gap-1.5"),kx=I("w-4 h-4 data-[loading]:opacity-70"),Sx=I("data-[loading]:opacity-70"),Cx=I("flex items-center justify-center"),Mx=(t={})=>({root:_x(t),content:$x(),spinner:kx(),label:Sx(),slots:Cx()}),Dx=["disabled","data-loading","data-selected","aria-busy"],_t=P({__name:"Button",props:{type:{default:"primary"},size:{default:"default"},isLoading:{type:Boolean},isDisabled:{type:Boolean},label:{},isSelected:{type:Boolean,default:!1},shortcutKeys:{}},setup(t){const e=gc(),n=t,a=k(()=>Mx({type:n.type,size:n.size})),r=k(()=>n.type==="primary"||n.type==="validation"||n.type==="critical"?"inverted":"default"),i=k(()=>e.prefix),s=k(()=>e.suffix);return(o,l)=>(_(),O("button",{disabled:n.isDisabled,"data-loading":n.isLoading||null,"data-selected":n.isSelected||null,"aria-busy":n.isLoading||void 0,class:L([a.value.root,n.isSelected?"!bg-brand-selected !text-selected":""])},[T("div",{class:L([a.value.content,n.isLoading?"relative":""])},[i.value?(_(),O("div",{key:0,class:L([a.value.slots,n.isLoading?"invisible":""])},[F(o.$slots,"prefix")],2)):H("",!0),n.isLoading?(_(),D(Zm,{key:1,class:L([a.value.spinner,n.isLoading?"absolute -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2":""]),variant:r.value,"data-loading":n.isLoading||null},null,8,["class","variant","data-loading"])):H("",!0),T("div",{class:L([i.value?"pr-0.5 inline-flex":"",s.value?"pl-0.5 inline-flex":"",a.value.label,n.isLoading?"invisible":""])},[F(o.$slots,"default",{},()=>[n.label?(_(),D(xx,{key:0,text:n.label,variant:n.type},null,8,["text","variant"])):H("",!0)])],2),s.value?(_(),O("div",{key:2,class:L([a.value.slots,n.isLoading?"invisible":""])},[F(o.$slots,"suffix")],2)):H("",!0),n.shortcutKeys?(_(),O("div",{key:3,class:L([n.isLoading?"invisible":""])},[R(eo,{type:"default",keys:n.shortcutKeys},null,8,["keys"])],2)):H("",!0)],2)],10,Dx))}}),Ax=(t,e)=>{const n=t.__vccOpts||t;for(const[a,r]of e)n[a]=r;return n},Ox=["items-center","appearance-none","cursor-pointer","inline-flex","isolate","min-w-0","justify-center","outline-none","select-none","align-middle","rounded","border-none","[hidden]:hidden"].join(" "),Ex=I(Ox,{variants:{type:{primary:xt.primary,critical:xt.critical,default:xt.default,subtle:xt.subtle,dashed:xt.dashed,plain:["bg-transparent","focus-visible:shadow-state-focus-primary","disabled:p-0","disabled:shadow-none","disabled:bg-graycoolalpha-20","disabled:border-disabled","disabled:text-graycoolalpha-75","disabled:cursor-not-allowed","disabled:hover:bg-graycoolalpha-20","disabled:hover:border-disabled","disabled:hover:text-graycoolalpha-75"].join(" ")},size:{default:nf.default,small:nf.small}},compoundVariants:[{type:"plain",size:"default",class:"!w-4 !h-4"},{type:"plain",size:"small",class:"!w-4 !h-4"}],defaultVariants:{type:"primary",size:"default"}}),Tx=I("flex items-center justify-center"),Px=(t={})=>({root:Ex(t),content:Tx()}),Ix=["disabled","data-selected"],lu=P({__name:"IconButton",props:{type:{},size:{},isDisabled:{type:Boolean},isSelected:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:e}){const n=t,a=e,r=s=>{n.isDisabled||a("click",s)},i=k(()=>Px({type:n.type,size:n.size}));return(s,o)=>(_(),O("button",{disabled:n.isDisabled,"data-selected":n.isSelected||null,"aria-label":"Icon button",onClick:r,class:L([i.value.root,n.isSelected?"!bg-brand-selected !text-selected":""])},[T("div",{class:L(i.value.content)},[F(s.$slots,"prefixIcon")],2)],10,Ix))}}),Lx=I("inline-flex justify-center items-center gap-1 rounded-sm uppercase font-inter font-normal shadow-[0px_0px_0px_1px_var(--colors-blackalpha-50)_inset]",{variants:{type:{decorative:"pt-1.5 pb-1.5 pl-3 pr-3 text-xs font-bold tracking-widest leading-xxs",counter:"min-w-5 pt-0.5 pb-0.5 pl-1 pr-1 text-xs font-regular tracking-tighter leading-sm"},variant:{neutral:"bg-graycoolalpha-10 text-graycool-900 shadow-none",information:"bg-blue-100 text-seed-800",feature:"bg-purple-100 text-purple-800 shadow-[0px_0px_0px_1px_var(--colors-blackalpha-50)_inset]",success:"bg-green-100 text-green-900",warning:"bg-orange-100 text-orange-900",critical:"bg-red-100 text-red-900",ai:"bg-purple-700 text-whitealpha-1000",new:"bg-seed-700 text-whitealpha-1000",reserved:"bg-blackalpha-900 text-whitealpha-1000",neutralCounter:"bg-whitealpha-1000 text-graycool-900",criticalCounter:"bg-red-700 text-whitealpha-1000"}},defaultVariants:{variant:"neutral",type:"decorative"}}),qx=P({__name:"Badge",props:{variant:{default:"neutral"},type:{default:"decorative"}},setup(t){const e=t,n=k(()=>Lx({variant:e.variant,type:e.type}));return(a,r)=>(_(),O("div",{class:L(n.value)},[F(a.$slots,"default")],2))}}),Vx={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"};function Fx(t,e){return _(),O("svg",Vx,[...e[0]||(e[0]=[T("g",{"clip-path":"url(#clip0_2115_3244)"},[T("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.29505 0.21967C3.43571 0.0790177 3.62647 0 3.82538 0H8.17463C8.37352 0 8.56433 0.0790177 8.70495 0.21967L11.7803 3.29505C11.9209 3.4357 12 3.62647 12 3.82538V8.17463C12 8.37352 11.9209 8.56433 11.7803 8.70495L8.70495 11.7803C8.56433 11.9209 8.37352 12 8.17463 12H3.82538C3.62647 12 3.43571 11.9209 3.29505 11.7803L0.219671 8.70495C0.0790178 8.56433 0 8.37352 0 8.17463V3.82538C0 3.62647 0.0790177 3.43571 0.21967 3.29505L3.29505 0.21967ZM6.5625 2.8125V3.375V6V6.5625H5.4375V6V3.375V2.8125H6.5625ZM6 9C6.41422 9 6.75 8.66422 6.75 8.25C6.75 7.83577 6.41422 7.5 6 7.5C5.58579 7.5 5.25 7.83577 5.25 8.25C5.25 8.66422 5.58579 9 6 9Z"})],-1),T("defs",null,[T("clipPath",{id:"clip0_2115_3244"},[T("rect",{width:"12",height:"12",fill:"currentColor"})])],-1)])])}const Bx={render:Fx},Rx={xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",viewBox:"0 0 6 8",fill:"none"};function Nx(t,e){return _(),O("svg",Rx,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.86875 0.484377L2.33279 0.948477L4.80307 3.41878C5.14485 3.76049 5.14485 4.31451 4.80307 4.65622L2.33279 7.12654L1.86875 7.59058L0.940674 6.6625L1.40471 6.19846L3.56567 4.0375L1.40471 1.8765L0.940674 1.41249L1.86875 0.484377Z",fill:"#7E808A",style:{fill:"color(display-p3 0.4929 0.5038 0.5431)","fill-opacity":"1"}},null,-1)])])}const Jm={render:Nx},jx=I("flex items-center"),zx=I("flex items-center gap-1"),Wx=I("flex items-center gap-1"),Hx=I("flex items-center gap-1 font-inter text-[13px] font-medium leading-lg text-subtle no-underline cursor-pointer hover:underline"),Ux=I("flex items-center icon-subtle justify-center w-5 h-5"),Yx=I("flex items-center gap-1 font-inter text-[13px] font-medium leading-lg text-normal"),Kx=I("flex items-center w-4 h-4 icon-subtle"),Gx=I("flex items-center w-5 h-5 icon-normal"),Zx=["aria-label"],Jx=P({__name:"Breadcrumb",props:{items:{},ariaLabel:{default:"Breadcrumb"}},emits:["click"],setup(t,{emit:e}){const n=t,a=e,r=s=>s===n.items.length-1,i=(s,o,l)=>{r(o)?l.preventDefault():a("click",s,o)};return(s,o)=>(_(),O("nav",{class:L(h(jx)()),"aria-label":n.ariaLabel,"data-testid":"breadcrumb"},[T("ol",{class:L(h(zx)())},[(_(!0),O(ge,null,ke(t.items,(l,u)=>(_(),O("li",{key:u,class:L(h(Wx)()),"data-testid":"breadcrumb-item"},[(_(),D(Ne(r(u)?"span":"a"),{class:L(r(u)?h(Yx)():h(Hx)()),href:!r(u)&&l.url?l.url:void 0,"aria-current":r(u)?"page":void 0,"data-testid":"breadcrumb-link",onClick:c=>i(l,u,c)},{default:C(()=>[l.icon?(_(),D(Ne(l.icon),{key:0,class:L(r(u)?h(Gx)():h(Kx)()),"data-testid":"breadcrumb-icon"},null,8,["class"])):H("",!0),xe(" "+Q(l.label),1)]),_:2},1032,["class","href","aria-current","onClick"])),r(u)?H("",!0):(_(),O("span",{key:0,class:L(h(Ux)()),"aria-hidden":"true","data-testid":"breadcrumb-separator"},[R(h(Jm))],2))],2))),128))],2)],10,Zx))}});function Io(t){return k(()=>{var e;return ze(t)?!!((e=Tt(t))!=null&&e.closest("form")):!0})}function Ln(){const t=V(),e=k(()=>{var n,a;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:Tt(t)});return{primitiveElement:t,currentElement:e}}var Xx=P({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(_(),D(h(oe),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:C(()=>[F(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Ii=Xx,Qx=P({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:a}=Ln(),r=k(()=>e.checked??e.value);return de(r,(i,s)=>{if(!a.value)return;const o=a.value,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(u&&i!==s){const c=new Event("input",{bubbles:!0}),d=new Event("change",{bubbles:!0});u.call(o,i),o.dispatchEvent(c),o.dispatchEvent(d)}}),(i,s)=>(_(),D(Ii,re({ref_key:"primitiveElement",ref:n},{...e,...i.$attrs},{as:"input"}),null,16))}}),af=Qx,ew=P({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,n=k(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),a=k(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((r,i)=>typeof r=="object"?Object.entries(r).map(([s,o])=>({name:`${e.name}[${i}][${s}]`,value:o})):{name:`${e.name}[${i}]`,value:r}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([r,i])=>({name:`${e.name}[${r}]`,value:i})):[]);return(r,i)=>(_(),O(ge,null,[H(" We render single input if it's required "),n.value?(_(),D(af,re({key:r.name},{...e,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(_(!0),O(ge,{key:1},ke(a.value,s=>(_(),D(af,re({key:s.name},{ref_for:!0},{...e,...r.$attrs},{name:s.name,value:s.value}),null,16,["name","value"]))),128))],2112))}}),Sc=ew;const rf="data-reka-collection-item";function Rn(t={}){const{key:e="",isProvider:n=!1}=t,a=`${e}CollectionProvider`;let r;if(n){const c=V(new Map);r={collectionRef:V(),itemMap:c},Di(a,r)}else r=tt(a);const i=(c=!1)=>{const d=r.collectionRef.value;if(!d)return[];const f=Array.from(d.querySelectorAll(`[${rf}]`)),p=Array.from(r.itemMap.value.values()).sort((m,g)=>f.indexOf(m.ref)-f.indexOf(g.ref));return c?p:p.filter(m=>m.ref.dataset.disabled!=="")},s=P({name:"CollectionSlot",inheritAttrs:!1,setup(c,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:m}=Ln();return de(m,()=>{r.collectionRef.value=m.value}),()=>Ke(iu,{ref:p,...f},d)}}),o=P({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(c,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:m}=Ln();return ct(g=>{if(m.value){const y=Sm(m.value);r.itemMap.value.set(y,{ref:m.value,value:c.value}),g(()=>r.itemMap.value.delete(y))}}),()=>Ke(iu,{...f,[rf]:"",ref:p},d)}}),l=k(()=>Array.from(r.itemMap.value.values())),u=k(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:l,itemMapSize:u,CollectionSlot:s,CollectionItem:o}}function Qe(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const tw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nw(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function aw(t,e,n){const a=nw(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return tw[a]}function rw(t,e=!1){const n=Qe();for(const a of t)if(a===n||(a.focus({preventScroll:e}),Qe()!==n))return}function iw(t,e){return t.map((n,a)=>t[(e+a)%t.length])}const[sw]=Ve("RovingFocusGroup");var ow=P({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=sw(),a=Pt(),r=k(()=>e.tabStopId||a),i=k(()=>n.currentTabStopId.value===r.value),{getItems:s,CollectionItem:o}=Rn();Ie(()=>{e.focusable&&n.onFocusableItemAdd()}),pn(()=>{e.focusable&&n.onFocusableItemRemove()});function l(u){if(u.key==="Tab"&&u.shiftKey){n.onItemShiftTab();return}if(u.target!==u.currentTarget)return;const c=aw(u,n.orientation.value,n.dir.value);if(c!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||!e.allowShiftKey&&u.shiftKey)return;u.preventDefault();let d=[...s().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(c==="last")d.reverse();else if(c==="prev"||c==="next"){c==="prev"&&d.reverse();const f=d.indexOf(u.currentTarget);d=n.loop.value?iw(d,f+1):d.slice(f+1)}qe(()=>rw(d))}}return(u,c)=>(_(),D(h(o),null,{default:C(()=>[R(h(oe),{tabindex:i.value?0:-1,"data-orientation":h(n).orientation.value,"data-active":u.active?"":void 0,"data-disabled":u.focusable?void 0:"",as:u.as,"as-child":u.asChild,onMousedown:c[0]||(c[0]=d=>{u.focusable?h(n).onItemFocus(r.value):d.preventDefault()}),onFocus:c[1]||(c[1]=d=>h(n).onItemFocus(r.value)),onKeydown:l},{default:C(()=>[F(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),lw=ow;const[uw]=Ve("CheckboxGroupRoot");function Cc(t){return t==="indeterminate"}function Xm(t){return Cc(t)?"indeterminate":t?"checked":"unchecked"}const[cw,dw]=Ve("CheckboxRoot");var fw=P({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,{forwardRef:r,currentElement:i}=ce(),s=uw(null),o=ut(n,"modelValue",a,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),l=k(()=>s?.disabled.value||n.disabled),u=k(()=>Aa(o.value,n.trueValue)),c=k(()=>Pn(s?.modelValue.value)?o.value==="indeterminate"?"indeterminate":u.value:su(s.modelValue.value,n.value));function d(){if(Pn(s?.modelValue.value))o.value==="indeterminate"?o.value=n.trueValue:o.value=u.value?n.falseValue:n.trueValue;else{const m=[...s.modelValue.value||[]];if(su(m,n.value)){const g=m.findIndex(y=>Aa(y,n.value));m.splice(g,1)}else m.push(n.value);s.modelValue.value=m}}const f=Io(i),p=k(()=>{var m;return n.id&&i.value?(m=document.querySelector(`[for="${n.id}"]`))==null?void 0:m.innerText:void 0});return dw({disabled:l,state:c}),(m,g)=>{var y,v;return _(),D(Ne((y=h(s))!=null&&y.rovingFocus.value?h(lw):h(oe)),re(m.$attrs,{id:m.id,ref:h(r),role:"checkbox","as-child":m.asChild,as:m.as,type:m.as==="button"?"button":void 0,"aria-checked":h(Cc)(c.value)?"mixed":c.value,"aria-required":m.required,"aria-label":m.$attrs["aria-label"]||p.value,"data-state":h(Xm)(c.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:(v=h(s))!=null&&v.rovingFocus.value?!l.value:void 0,onKeydown:lt(ye(()=>{},["prevent"]),["enter"]),onClick:d}),{default:C(()=>[F(m.$slots,"default",{modelValue:h(o),state:c.value}),h(f)&&m.name&&!h(s)?(_(),D(h(Sc),{key:0,type:"checkbox",checked:!!c.value,name:m.name,value:m.value,disabled:l.value,required:m.required},null,8,["checked","name","value","disabled","required"])):H("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),hw=fw,pw=P({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const{forwardRef:e}=ce(),n=cw();return(a,r)=>(_(),D(h(la),{present:a.forceMount||h(Cc)(h(n).state.value)||h(n).state.value===!0},{default:C(()=>[R(h(oe),re({ref:h(e),"data-state":h(Xm)(h(n).state.value),"data-disabled":h(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":a.asChild,as:a.as},a.$attrs),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),mw=pw;const gw={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"};function vw(t,e){return _(),O("svg",gw,[...e[0]||(e[0]=[T("path",{d:"M1.24033 3.98097L3.71905 6.45973C4.10957 6.85026 4.74274 6.85026 5.13326 6.45974L10.7599 0.833153",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const Qm={render:vw},yw={width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bw(t,e){return _(),O("svg",yw,[...e[0]||(e[0]=[T("path",{id:"Vector",d:"M0 1.0361L8 0.963898",stroke:"currentColor",style:{stroke:"currentColor","stroke-opacity":"1"},"stroke-width":"1.5"},null,-1)])])}const xw={render:bw},ww={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _w(t,e){return _(),O("svg",ww,[...e[0]||(e[0]=[T("g",{id:"icon-information","clip-path":"url(#clip0_2674_19124)"},[T("path",{id:"Vector","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.6875C10.1412 12.6875 12.6875 10.1412 12.6875 7C12.6875 3.85888 10.1412 1.3125 7 1.3125C3.85888 1.3125 1.3125 3.85888 1.3125 7C1.3125 10.1412 3.85888 12.6875 7 12.6875ZM7 14C10.866 14 14 10.866 14 7C14 3.134 10.866 0 7 0C3.134 0 0 3.134 0 7C0 10.866 3.134 14 7 14ZM5.46875 6.125H6.125H6.78124C7.26449 6.125 7.65624 6.51676 7.65624 7V10.0625V10.7188H6.34374V10.0625V7.4375H6.125H5.46875V6.125ZM7 5.25C7.48325 5.25 7.875 4.85824 7.875 4.375C7.875 3.89176 7.48325 3.5 7 3.5C6.51676 3.5 6.125 3.89176 6.125 4.375C6.125 4.85824 6.51676 5.25 7 5.25Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),T("defs",null,[T("clipPath",{id:"clip0_2674_19124"},[T("rect",{width:"14",height:"14",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const Oa={render:_w},$w={key:0,d:"M0 0L6 6L12 0"},kw={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Sw=P({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const e=t;return ce(),(n,a)=>(_(),D(h(oe),re(e,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:C(()=>[F(n.$slots,"default",{},()=>[n.rounded?(_(),O("path",kw)):(_(),O("path",$w))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Cw=Sw;function Mw(t){const e=V(),n=k(()=>{var r;return((r=e.value)==null?void 0:r.width)??0}),a=k(()=>{var r;return((r=e.value)==null?void 0:r.height)??0});return Ie(()=>{const r=Tt(t);if(r){e.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=r.offsetWidth,u=r.offsetHeight;e.value={width:l,height:u}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else e.value=void 0}),{width:n,height:a}}const[eg,Dw]=Ve("PopperRoot");var Aw=P({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=V();return Dw({anchor:e,onAnchorChange:n=>e.value=n}),(n,a)=>F(n.$slots,"default")}}),Mc=Aw;function Ow(t){return t!==null}function Ew(t){return{name:"transformOrigin",options:t,fn(e){var n,a,r;const{placement:i,rects:s,middlewareData:o}=e,l=((n=o.arrow)==null?void 0:n.centerOffset)!==0,u=l?0:t.arrowWidth,c=l?0:t.arrowHeight,[d,f]=uu(i),p={start:"0%",center:"50%",end:"100%"}[f],m=(((a=o.arrow)==null?void 0:a.x)??0)+u/2,g=(((r=o.arrow)==null?void 0:r.y)??0)+c/2;let y="",v="";return d==="bottom"?(y=l?p:`${m}px`,v=`${-c}px`):d==="top"?(y=l?p:`${m}px`,v=`${s.floating.height+c}px`):d==="right"?(y=`${-c}px`,v=l?p:`${g}px`):d==="left"&&(y=`${s.floating.width+c}px`,v=l?p:`${g}px`),{data:{x:y,y:v}}}}}function uu(t){const[e,n="center"]=t.split("-");return[e,n]}const Tw=["top","right","bottom","left"],ta=Math.min,Dt=Math.max,to=Math.round,Yi=Math.floor,hn=t=>({x:t,y:t}),Pw={left:"right",right:"left",bottom:"top",top:"bottom"};function cu(t,e,n){return Dt(t,ta(e,n))}function qn(t,e){return typeof t=="function"?t(e):t}function Vn(t){return t.split("-")[0]}function kr(t){return t.split("-")[1]}function Dc(t){return t==="x"?"y":"x"}function Ac(t){return t==="y"?"height":"width"}function cn(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Oc(t){return Dc(cn(t))}function Iw(t,e,n){n===void 0&&(n=!1);const a=kr(t),r=Oc(t),i=Ac(r);let s=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=no(s)),[s,no(s)]}function Lw(t){const e=no(t);return[du(t),e,du(e)]}function du(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const sf=["left","right"],of=["right","left"],qw=["top","bottom"],Vw=["bottom","top"];function Fw(t,e,n){switch(t){case"top":case"bottom":return n?e?of:sf:e?sf:of;case"left":case"right":return e?qw:Vw;default:return[]}}function Bw(t,e,n,a){const r=kr(t);let i=Fw(Vn(t),n==="start",a);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(du)))),i}function no(t){const e=Vn(t);return Pw[e]+t.slice(e.length)}function Rw(t){return{top:0,right:0,bottom:0,left:0,...t}}function tg(t){return typeof t!="number"?Rw(t):{top:t,right:t,bottom:t,left:t}}function ao(t){const{x:e,y:n,width:a,height:r}=t;return{width:a,height:r,top:n,left:e,right:e+a,bottom:n+r,x:e,y:n}}function lf(t,e,n){let{reference:a,floating:r}=t;const i=cn(e),s=Oc(e),o=Ac(s),l=Vn(e),u=i==="y",c=a.x+a.width/2-r.width/2,d=a.y+a.height/2-r.height/2,f=a[o]/2-r[o]/2;let p;switch(l){case"top":p={x:c,y:a.y-r.height};break;case"bottom":p={x:c,y:a.y+a.height};break;case"right":p={x:a.x+a.width,y:d};break;case"left":p={x:a.x-r.width,y:d};break;default:p={x:a.x,y:a.y}}switch(kr(e)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1);break}return p}async function Nw(t,e){var n;e===void 0&&(e={});const{x:a,y:r,platform:i,rects:s,elements:o,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=qn(e,t),m=tg(p),g=o[f?d==="floating"?"reference":"floating":d],y=ao(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:a,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=ao(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-w.top+m.top)/x.y,bottom:(w.bottom-y.bottom+m.bottom)/x.y,left:(y.left-w.left+m.left)/x.x,right:(w.right-y.right+m.right)/x.x}}const jw=50,zw=async(t,e,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,o=s.detectOverflow?s:{...s,detectOverflow:Nw},l=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:d}=lf(u,a,l),f=a,p=0;const m={};for(let g=0;g<i.length;g++){const y=i[g];if(!y)continue;const{name:v,fn:b}=y,{x,y:w,data:$,reset:S}=await b({x:c,y:d,initialPlacement:a,placement:f,strategy:r,middlewareData:m,rects:u,platform:o,elements:{reference:t,floating:e}});c=x??c,d=w??d,m[v]={...m[v],...$},S&&p<jw&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:c,y:d}=lf(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:m}},Ww=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:a,placement:r,rects:i,platform:s,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=qn(t,e)||{};if(u==null)return{};const d=tg(c),f={x:n,y:a},p=Oc(r),m=Ac(p),g=await s.getDimensions(u),y=p==="y",v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],$=f[p]-i.reference[p],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=S?S[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(S)))&&(E=o.floating[x]||i.floating[m]);const A=w/2-$/2,B=E/2-g[m]/2-1,z=ta(d[v],B),W=ta(d[b],B),U=z,X=E-g[m]-W,N=E/2-g[m]/2+A,q=cu(U,N,X),j=!l.arrow&&kr(r)!=null&&N!==q&&i.reference[m]/2-(N<U?z:W)-g[m]/2<0,J=j?N<U?N-U:N-X:0;return{[p]:f[p]+J,data:{[p]:q,centerOffset:N-q-J,...j&&{alignmentOffset:J}},reset:j}}}),Hw=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,a;const{placement:r,middlewareData:i,rects:s,initialPlacement:o,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=qn(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Vn(r),b=cn(o),x=Vn(o)===o,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),$=f||(x||!g?[no(o)]:Lw(o)),S=m!=="none";!f&&S&&$.push(...Bw(o,g,m,w));const E=[o,...$],A=await l.detectOverflow(e,y),B=[];let z=((a=i.flip)==null?void 0:a.overflows)||[];if(c&&B.push(A[v]),d){const N=Iw(r,s,w);B.push(A[N[0]],A[N[1]])}if(z=[...z,{placement:r,overflows:B}],!B.every(N=>N<=0)){var W,U;const N=(((W=i.flip)==null?void 0:W.index)||0)+1,q=E[N];if(q&&(!(d==="alignment"&&b!==cn(q))||z.every(J=>cn(J.placement)===b?J.overflows[0]>0:!0)))return{data:{index:N,overflows:z},reset:{placement:q}};let j=(U=z.filter(J=>J.overflows[0]<=0).sort((J,Y)=>J.overflows[1]-Y.overflows[1])[0])==null?void 0:U.placement;if(!j)switch(p){case"bestFit":{var X;const J=(X=z.filter(Y=>{if(S){const ne=cn(Y.placement);return ne===b||ne==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ne=>ne>0).reduce((ne,K)=>ne+K,0)]).sort((Y,ne)=>Y[1]-ne[1])[0])==null?void 0:X[0];J&&(j=J);break}case"initialPlacement":j=o;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function uf(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function cf(t){return Tw.some(e=>t[e]>=0)}const Uw=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:a}=e,{strategy:r="referenceHidden",...i}=qn(t,e);switch(r){case"referenceHidden":{const s=await a.detectOverflow(e,{...i,elementContext:"reference"}),o=uf(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:cf(o)}}}case"escaped":{const s=await a.detectOverflow(e,{...i,altBoundary:!0}),o=uf(s,n.floating);return{data:{escapedOffsets:o,escaped:cf(o)}}}default:return{}}}}},ng=new Set(["left","top"]);async function Yw(t,e){const{placement:n,platform:a,elements:r}=t,i=await(a.isRTL==null?void 0:a.isRTL(r.floating)),s=Vn(n),o=kr(n),l=cn(n)==="y",u=ng.has(s)?-1:1,c=i&&l?-1:1,d=qn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const Kw=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,a;const{x:r,y:i,placement:s,middlewareData:o}=e,l=await Yw(e,t);return s===((n=o.offset)==null?void 0:n.placement)&&(a=o.arrow)!=null&&a.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Gw=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:a,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...u}=qn(t,e),c={x:n,y:a},d=await i.detectOverflow(e,u),f=cn(Vn(r)),p=Dc(f);let m=c[p],g=c[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=m+d[v],w=m-d[b];m=cu(x,m,w)}if(o){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=g+d[v],w=g-d[b];g=cu(x,g,w)}const y=l.fn({...e,[p]:m,[f]:g});return{...y,data:{x:y.x-n,y:y.y-a,enabled:{[p]:s,[f]:o}}}}}},Zw=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:a,placement:r,rects:i,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=qn(t,e),c={x:n,y:a},d=cn(r),f=Dc(d);let p=c[f],m=c[d];const g=qn(o,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=f==="y"?"height":"width",w=i.reference[f]-i.floating[x]+y.mainAxis,$=i.reference[f]+i.reference[x]-y.mainAxis;p<w?p=w:p>$&&(p=$)}if(u){var v,b;const x=f==="y"?"width":"height",w=ng.has(Vn(r)),$=i.reference[d]-i.floating[x]+(w&&((v=s.offset)==null?void 0:v[d])||0)+(w?0:y.crossAxis),S=i.reference[d]+i.reference[x]+(w?0:((b=s.offset)==null?void 0:b[d])||0)-(w?y.crossAxis:0);m<$?m=$:m>S&&(m=S)}return{[f]:p,[d]:m}}}},Jw=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,a;const{placement:r,rects:i,platform:s,elements:o}=e,{apply:l=()=>{},...u}=qn(t,e),c=await s.detectOverflow(e,u),d=Vn(r),f=kr(r),p=cn(r)==="y",{width:m,height:g}=i.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,y=f==="end"?"top":"bottom");const b=g-c.top-c.bottom,x=m-c.left-c.right,w=ta(g-c[y],b),$=ta(m-c[v],x),S=!e.middlewareData.shift;let E=w,A=$;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(a=e.middlewareData.shift)!=null&&a.enabled.y&&(E=b),S&&!f){const z=Dt(c.left,0),W=Dt(c.right,0),U=Dt(c.top,0),X=Dt(c.bottom,0);p?A=m-2*(z!==0||W!==0?z+W:Dt(c.left,c.right)):E=g-2*(U!==0||X!==0?U+X:Dt(c.top,c.bottom))}await l({...e,availableWidth:A,availableHeight:E});const B=await s.getDimensions(o.floating);return m!==B.width||g!==B.height?{reset:{rects:!0}}:{}}}};function Lo(){return typeof window<"u"}function Ba(t){return Ec(t)?(t.nodeName||"").toLowerCase():"#document"}function Et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function mn(t){var e;return(e=(Ec(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ec(t){return Lo()?t instanceof Node||t instanceof Et(t).Node:!1}function Xt(t){return Lo()?t instanceof Element||t instanceof Et(t).Element:!1}function Nn(t){return Lo()?t instanceof HTMLElement||t instanceof Et(t).HTMLElement:!1}function df(t){return!Lo()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Et(t).ShadowRoot}function Li(t){const{overflow:e,overflowX:n,overflowY:a,display:r}=Qt(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&r!=="inline"&&r!=="contents"}function Xw(t){return/^(table|td|th)$/.test(Ba(t))}function qo(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Qw=/transform|translate|scale|rotate|perspective|filter/,e_=/paint|layout|strict|content/,pa=t=>!!t&&t!=="none";let fl;function Tc(t){const e=Xt(t)?Qt(t):t;return pa(e.transform)||pa(e.translate)||pa(e.scale)||pa(e.rotate)||pa(e.perspective)||!Pc()&&(pa(e.backdropFilter)||pa(e.filter))||Qw.test(e.willChange||"")||e_.test(e.contain||"")}function t_(t){let e=na(t);for(;Nn(e)&&!hr(e);){if(Tc(e))return e;if(qo(e))return null;e=na(e)}return null}function Pc(){return fl==null&&(fl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fl}function hr(t){return/^(html|body|#document)$/.test(Ba(t))}function Qt(t){return Et(t).getComputedStyle(t)}function Vo(t){return Xt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function na(t){if(Ba(t)==="html")return t;const e=t.assignedSlot||t.parentNode||df(t)&&t.host||mn(t);return df(e)?e.host:e}function ag(t){const e=na(t);return hr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Nn(e)&&Li(e)?e:ag(e)}function yi(t,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=ag(t),i=r===((a=t.ownerDocument)==null?void 0:a.body),s=Et(r);if(i){const o=fu(s);return e.concat(s,s.visualViewport||[],Li(r)?r:[],o&&n?yi(o):[])}else return e.concat(r,yi(r,[],n))}function fu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rg(t){const e=Qt(t);let n=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const r=Nn(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:a,o=to(n)!==i||to(a)!==s;return o&&(n=i,a=s),{width:n,height:a,$:o}}function Ic(t){return Xt(t)?t:t.contextElement}function ar(t){const e=Ic(t);if(!Nn(e))return hn(1);const n=e.getBoundingClientRect(),{width:a,height:r,$:i}=rg(e);let s=(i?to(n.width):n.width)/a,o=(i?to(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const n_=hn(0);function ig(t){const e=Et(t);return!Pc()||!e.visualViewport?n_:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function a_(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Et(t)?!1:e}function Ea(t,e,n,a){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Ic(t);let s=hn(1);e&&(a?Xt(a)&&(s=ar(a)):s=ar(t));const o=a_(i,n,a)?ig(i):hn(0);let l=(r.left+o.x)/s.x,u=(r.top+o.y)/s.y,c=r.width/s.x,d=r.height/s.y;if(i){const f=Et(i),p=a&&Xt(a)?Et(a):a;let m=f,g=fu(m);for(;g&&a&&p!==m;){const y=ar(g),v=g.getBoundingClientRect(),b=Qt(g),x=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,w=v.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=x,u+=w,m=Et(g),g=fu(m)}}return ao({width:c,height:d,x:l,y:u})}function Fo(t,e){const n=Vo(t).scrollLeft;return e?e.left+n:Ea(mn(t)).left+n}function sg(t,e){const n=t.getBoundingClientRect(),a=n.left+e.scrollLeft-Fo(t,n),r=n.top+e.scrollTop;return{x:a,y:r}}function r_(t){let{elements:e,rect:n,offsetParent:a,strategy:r}=t;const i=r==="fixed",s=mn(a),o=e?qo(e.floating):!1;if(a===s||o&&i)return n;let l={scrollLeft:0,scrollTop:0},u=hn(1);const c=hn(0),d=Nn(a);if((d||!d&&!i)&&((Ba(a)!=="body"||Li(s))&&(l=Vo(a)),d)){const p=Ea(a);u=ar(a),c.x=p.x+a.clientLeft,c.y=p.y+a.clientTop}const f=s&&!d&&!i?sg(s,l):hn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function i_(t){return Array.from(t.getClientRects())}function s_(t){const e=mn(t),n=Vo(t),a=t.ownerDocument.body,r=Dt(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),i=Dt(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let s=-n.scrollLeft+Fo(t);const o=-n.scrollTop;return Qt(a).direction==="rtl"&&(s+=Dt(e.clientWidth,a.clientWidth)-r),{width:r,height:i,x:s,y:o}}const ff=25;function o_(t,e){const n=Et(t),a=mn(t),r=n.visualViewport;let i=a.clientWidth,s=a.clientHeight,o=0,l=0;if(r){i=r.width,s=r.height;const c=Pc();(!c||c&&e==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}const u=Fo(a);if(u<=0){const c=a.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(a.clientWidth-d.clientWidth-p);m<=ff&&(i-=m)}else u<=ff&&(i+=u);return{width:i,height:s,x:o,y:l}}function l_(t,e){const n=Ea(t,!0,e==="fixed"),a=n.top+t.clientTop,r=n.left+t.clientLeft,i=Nn(t)?ar(t):hn(1),s=t.clientWidth*i.x,o=t.clientHeight*i.y,l=r*i.x,u=a*i.y;return{width:s,height:o,x:l,y:u}}function hf(t,e,n){let a;if(e==="viewport")a=o_(t,n);else if(e==="document")a=s_(mn(t));else if(Xt(e))a=l_(e,n);else{const r=ig(t);a={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ao(a)}function og(t,e){const n=na(t);return n===e||!Xt(n)||hr(n)?!1:Qt(n).position==="fixed"||og(n,e)}function u_(t,e){const n=e.get(t);if(n)return n;let a=yi(t,[],!1).filter(o=>Xt(o)&&Ba(o)!=="body"),r=null;const i=Qt(t).position==="fixed";let s=i?na(t):t;for(;Xt(s)&&!hr(s);){const o=Qt(s),l=Tc(s);!l&&o.position==="fixed"&&(r=null),(i?!l&&!r:!l&&o.position==="static"&&r&&(r.position==="absolute"||r.position==="fixed")||Li(s)&&!l&&og(t,s))?a=a.filter(u=>u!==s):r=o,s=na(s)}return e.set(t,a),a}function c_(t){let{element:e,boundary:n,rootBoundary:a,strategy:r}=t;const i=[...n==="clippingAncestors"?qo(e)?[]:u_(e,this._c):[].concat(n),a],s=hf(e,i[0],r);let o=s.top,l=s.right,u=s.bottom,c=s.left;for(let d=1;d<i.length;d++){const f=hf(e,i[d],r);o=Dt(f.top,o),l=ta(f.right,l),u=ta(f.bottom,u),c=Dt(f.left,c)}return{width:l-c,height:u-o,x:c,y:o}}function d_(t){const{width:e,height:n}=rg(t);return{width:e,height:n}}function f_(t,e,n){const a=Nn(e),r=mn(e),i=n==="fixed",s=Ea(t,!0,i,e);let o={scrollLeft:0,scrollTop:0};const l=hn(0);function u(){l.x=Fo(r)}if(a||!a&&!i)if((Ba(e)!=="body"||Li(r))&&(o=Vo(e)),a){const p=Ea(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else r&&u();i&&!a&&r&&u();const c=r&&!a&&!i?sg(r,o):hn(0),d=s.left+o.scrollLeft-l.x-c.x,f=s.top+o.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function hl(t){return Qt(t).position==="static"}function pf(t,e){if(!Nn(t)||Qt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return mn(t)===n&&(n=n.ownerDocument.body),n}function lg(t,e){const n=Et(t);if(qo(t))return n;if(!Nn(t)){let r=na(t);for(;r&&!hr(r);){if(Xt(r)&&!hl(r))return r;r=na(r)}return n}let a=pf(t,e);for(;a&&Xw(a)&&hl(a);)a=pf(a,e);return a&&hr(a)&&hl(a)&&!Tc(a)?n:a||t_(t)||n}const h_=async function(t){const e=this.getOffsetParent||lg,n=this.getDimensions,a=await n(t.floating);return{reference:f_(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function p_(t){return Qt(t).direction==="rtl"}const m_={convertOffsetParentRelativeRectToViewportRelativeRect:r_,getDocumentElement:mn,getClippingRect:c_,getOffsetParent:lg,getElementRects:h_,getClientRects:i_,getDimensions:d_,getScale:ar,isElement:Xt,isRTL:p_};function ug(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function g_(t,e){let n=null,a;const r=mn(t);function i(){var o;clearTimeout(a),(o=n)==null||o.disconnect(),n=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const u=t.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(o||e(),!f||!p)return;const m=Yi(d),g=Yi(r.clientWidth-(c+f)),y=Yi(r.clientHeight-(d+p)),v=Yi(c),b={rootMargin:-m+"px "+-g+"px "+-y+"px "+-v+"px",threshold:Dt(0,ta(1,l))||1};let x=!0;function w($){const S=$[0].intersectionRatio;if(S!==l){if(!x)return s();S?s(!1,S):a=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!ug(u,t.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(w,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(t)}return s(!0),i}function v_(t,e,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,u=Ic(t),c=r||i?[...u?yi(u):[],...e?yi(e):[]]:[];c.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&o?g_(u,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&p&&e&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(e)})),n()}),u&&!l&&p.observe(u),e&&p.observe(e));let m,g=l?Ea(t):null;l&&y();function y(){const v=Ea(t);g&&!ug(g,v)&&n(),g=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(b=>{r&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const y_=Kw,b_=Gw,mf=Hw,x_=Jw,w_=Uw,__=Ww,$_=Zw,k_=(t,e,n)=>{const a=new Map,r={platform:m_,...n},i={...r.platform,_c:a};return zw(t,e,{...r,platform:i})};function S_(t){return t!=null&&typeof t=="object"&&"$el"in t}function hu(t){if(S_(t)){const e=t.$el;return Ec(e)&&Ba(e)==="#comment"?null:e}return t}function Za(t){return typeof t=="function"?t():h(t)}function C_(t){return{name:"arrow",options:t,fn(e){const n=hu(Za(t.element));return n==null?{}:__({element:n,padding:t.padding}).fn(e)}}}function cg(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function gf(t,e){const n=cg(t);return Math.round(e*n)/n}function M_(t,e,n){n===void 0&&(n={});const a=n.whileElementsMounted,r=k(()=>{var E;return(E=Za(n.open))!=null?E:!0}),i=k(()=>Za(n.middleware)),s=k(()=>{var E;return(E=Za(n.placement))!=null?E:"bottom"}),o=k(()=>{var E;return(E=Za(n.strategy))!=null?E:"absolute"}),l=k(()=>{var E;return(E=Za(n.transform))!=null?E:!0}),u=k(()=>hu(t.value)),c=k(()=>hu(e.value)),d=V(0),f=V(0),p=V(o.value),m=V(s.value),g=ea({}),y=V(!1),v=k(()=>{const E={position:p.value,left:"0",top:"0"};if(!c.value)return E;const A=gf(c.value,d.value),B=gf(c.value,f.value);return l.value?{...E,transform:"translate("+A+"px, "+B+"px)",...cg(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:A+"px",top:B+"px"}});let b;function x(){if(u.value==null||c.value==null)return;const E=r.value;k_(u.value,c.value,{middleware:i.value,placement:s.value,strategy:o.value}).then(A=>{d.value=A.x,f.value=A.y,p.value=A.strategy,m.value=A.placement,g.value=A.middlewareData,y.value=E!==!1})}function w(){typeof b=="function"&&(b(),b=void 0)}function $(){if(w(),a===void 0){x();return}if(u.value!=null&&c.value!=null){b=a(u.value,c.value,x);return}}function S(){r.value||(y.value=!1)}return de([i,s,o,r],x,{flush:"sync"}),de([u,c],$,{flush:"sync"}),de(r,S,{flush:"sync"}),Ao()&&Mi(w),{x:Wn(d),y:Wn(f),strategy:Wn(p),placement:Wn(m),middlewareData:Wn(g),isPositioned:Wn(y),floatingStyles:v,update:x}}const D_={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[A_,O_]=Ve("PopperContent");var E_=P({inheritAttrs:!1,__name:"PopperContent",props:Cm({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...D_}),emits:["placed"],setup(t,{emit:e}){const n=t,a=e,r=eg(),{forwardRef:i,currentElement:s}=ce(),o=V(),l=V(),{width:u,height:c}=Mw(l),d=k(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=k(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),p=k(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=k(()=>({padding:f.value,boundary:p.value.filter(Ow),altBoundary:p.value.length>0})),g=k(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),y=n1(()=>[y_({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&mf({...m.value,...g.value}),n.avoidCollisions&&b_({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$_():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&mf({...m.value,...g.value}),x_({...m.value,apply:({elements:U,rects:X,availableWidth:N,availableHeight:q})=>{const{width:j,height:J}=X.reference,Y=U.floating.style;Y.setProperty("--reka-popper-available-width",`${N}px`),Y.setProperty("--reka-popper-available-height",`${q}px`),Y.setProperty("--reka-popper-anchor-width",`${j}px`),Y.setProperty("--reka-popper-anchor-height",`${J}px`)}}),l.value&&C_({element:l.value,padding:n.arrowPadding}),Ew({arrowWidth:u.value,arrowHeight:c.value}),n.hideWhenDetached&&w_({strategy:"referenceHidden",...m.value})]),v=k(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:x,isPositioned:w,middlewareData:$}=M_(v,o,{strategy:n.positionStrategy,placement:d,whileElementsMounted:(...U)=>v_(...U,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:y}),S=k(()=>uu(x.value)[0]),E=k(()=>uu(x.value)[1]);yc(()=>{w.value&&a("placed")});const A=k(()=>{var U;const X=((U=$.value.arrow)==null?void 0:U.centerOffset)!==0;return n.hideShiftedArrow&&X}),B=V("");ct(()=>{s.value&&(B.value=window.getComputedStyle(s.value).zIndex)});const z=k(()=>{var U;return((U=$.value.arrow)==null?void 0:U.x)??0}),W=k(()=>{var U;return((U=$.value.arrow)==null?void 0:U.y)??0});return O_({placedSide:S,onArrowChange:U=>l.value=U,arrowX:z,arrowY:W,shouldHideArrow:A}),(U,X)=>{var N,q,j;return _(),O("div",{ref_key:"floatingRef",ref:o,"data-reka-popper-content-wrapper":"",style:Rt({...h(b),transform:h(w)?h(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[(N=h($).transformOrigin)==null?void 0:N.x,(q=h($).transformOrigin)==null?void 0:q.y].join(" "),...((j=h($).hide)==null?void 0:j.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[R(h(oe),re({ref:h(i)},U.$attrs,{"as-child":n.asChild,as:U.as,"data-side":S.value,"data-align":E.value,style:{animation:h(w)?void 0:"none"}}),{default:C(()=>[F(U.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Lc=E_;const T_={top:"bottom",right:"left",bottom:"top",left:"right"};var P_=P({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const{forwardRef:e}=ce(),n=A_(),a=k(()=>T_[n.placedSide.value]);return(r,i)=>{var s,o,l,u;return _(),O("span",{ref:c=>{h(n).onArrowChange(c??void 0)},style:Rt({position:"absolute",left:(s=h(n).arrowX)!=null&&s.value?`${(o=h(n).arrowX)==null?void 0:o.value}px`:void 0,top:(l=h(n).arrowY)!=null&&l.value?`${(u=h(n).arrowY)==null?void 0:u.value}px`:void 0,[a.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[h(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[h(n).placedSide.value],visibility:h(n).shouldHideArrow.value?"hidden":void 0})},[R(Cw,re(r.$attrs,{ref:h(e),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:C(()=>[F(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4)}}}),I_=P_,L_=P({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(t){const e=t;return ce(),(n,a)=>(_(),D(h(I_),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),q_=L_;const[Bo,V_]=Ve("TooltipProvider");var F_=P({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(t){const e=t,{delayDuration:n,skipDelayDuration:a,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:s,disabled:o,content:l}=He(e);ce();const u=V(!0),c=V(!1),{start:d,stop:f}=wc(()=>{u.value=!0},a,{immediate:!1});return V_({isOpenDelayed:u,delayDuration:n,onOpen(){f(),u.value=!1},onClose(){d()},isPointerInTransitRef:c,disableHoverableContent:r,disableClosingTrigger:i,disabled:o,ignoreNonKeyboardFocus:s,content:l}),(p,m)=>F(p.$slots,"default")}}),B_=F_;const dg="tooltip.open",[Ro,R_]=Ve("TooltipRoot");var N_=P({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,a=e;ce();const r=Bo(),i=k(()=>n.disableHoverableContent??r.disableHoverableContent.value),s=k(()=>n.disableClosingTrigger??r.disableClosingTrigger.value),o=k(()=>n.disabled??r.disabled.value),l=k(()=>n.delayDuration??r.delayDuration.value),u=k(()=>n.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),c=ut(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0});de(c,x=>{r.onClose&&(x?(r.onOpen(),document.dispatchEvent(new CustomEvent(dg))):r.onClose())});const d=V(!1),f=V(),p=k(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:g}=wc(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function y(){g(),d.value=!1,c.value=!0}function v(){g(),c.value=!1}function b(){m()}return R_({contentId:"",open:c,stateAttribute:p,trigger:f,onTriggerChange(x){f.value=x},onTriggerEnter(){r.isOpenDelayed.value?b():y()},onTriggerLeave(){i.value?v():g()},onOpen:y,onClose:v,disableHoverableContent:i,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:u}),(x,w)=>(_(),D(h(Mc),null,{default:C(()=>[F(x.$slots,"default",{open:h(c)})]),_:3}))}}),j_=N_;function qc(t,e,n){const a=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&a.addEventListener(t,e,{once:!0}),a.dispatchEvent(r)}const z_="dismissableLayer.pointerDownOutside",W_="dismissableLayer.focusOutside";function fg(t,e){if(!(e instanceof Element))return!1;const n=e.closest("[data-dismissable-layer]"),a=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),r=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(a===n||r.indexOf(a)<r.indexOf(n)))}function H_(t,e,n=!0){var a;const r=((a=e?.value)==null?void 0:a.ownerDocument)??globalThis?.document,i=V(!1),s=V(()=>{});return ct(o=>{if(!zt||!ze(n))return;const l=async c=>{const d=c.target;if(!(!(e!=null&&e.value)||!d)){if(fg(e.value,d)){i.value=!1;return}if(c.target&&!i.value){let f=function(){qc(z_,t,p)};const p={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=f,r.addEventListener("click",s.value,{once:!0})):f()}else r.removeEventListener("click",s.value);i.value=!1}},u=window.setTimeout(()=>{r.addEventListener("pointerdown",l)},0);o(()=>{window.clearTimeout(u),r.removeEventListener("pointerdown",l),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>{ze(n)&&(i.value=!0)}}}function U_(t,e,n=!0){var a;const r=((a=e?.value)==null?void 0:a.ownerDocument)??globalThis?.document,i=V(!1);return ct(s=>{if(!zt||!ze(n))return;const o=async l=>{if(!(e!=null&&e.value))return;await qe(),await qe();const u=l.target;!e.value||!u||fg(e.value,u)||l.target&&!i.value&&qc(W_,t,{originalEvent:l})};r.addEventListener("focusin",o),s(()=>r.removeEventListener("focusin",o))}),{onFocusCapture:()=>{ze(n)&&(i.value=!0)},onBlurCapture:()=>{ze(n)&&(i.value=!1)}}}const bt=fr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var Y_=P({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,a=e,{forwardRef:r,currentElement:i}=ce(),s=k(()=>{var p;return((p=i.value)==null?void 0:p.ownerDocument)??globalThis.document}),o=k(()=>bt.layersRoot),l=k(()=>i.value?Array.from(o.value).indexOf(i.value):-1),u=k(()=>bt.layersWithOutsidePointerEventsDisabled.size>0),c=k(()=>{const p=Array.from(o.value),[m]=[...bt.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(m);return l.value>=g}),d=H_(async p=>{const m=[...bt.branches].some(g=>g?.contains(p.target));!c.value||m||(a("pointerDownOutside",p),a("interactOutside",p),await qe(),p.defaultPrevented||a("dismiss"))},i),f=U_(p=>{[...bt.branches].some(m=>m?.contains(p.target))||(a("focusOutside",p),a("interactOutside",p),p.defaultPrevented||a("dismiss"))},i);return _c("Escape",p=>{l.value===o.value.size-1&&(a("escapeKeyDown",p),p.defaultPrevented||a("dismiss"))}),ct(p=>{i.value&&(n.disableOutsidePointerEvents&&(bt.layersWithOutsidePointerEventsDisabled.size===0&&(bt.originalBodyPointerEvents=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),bt.layersWithOutsidePointerEventsDisabled.add(i.value)),o.value.add(i.value),p(()=>{n.disableOutsidePointerEvents&&bt.layersWithOutsidePointerEventsDisabled.size===1&&!Pn(bt.originalBodyPointerEvents)&&(s.value.body.style.pointerEvents=bt.originalBodyPointerEvents)}))}),ct(p=>{p(()=>{i.value&&(o.value.delete(i.value),bt.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(p,m)=>(_(),D(h(oe),{ref:h(r),"as-child":p.asChild,as:p.as,"data-dismissable-layer":"",style:Rt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:h(f).onFocusCapture,onBlurCapture:h(f).onBlurCapture,onPointerdownCapture:h(d).onPointerDownCapture},{default:C(()=>[F(p.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),No=Y_;function pl(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function pu(t,e,n=".",a){if(!pl(e))return pu(t,{},n);const r={...e};for(const i of Object.keys(t)){if(i==="__proto__"||i==="constructor")continue;const s=t[i];s!=null&&(Array.isArray(s)&&Array.isArray(r[i])?r[i]=[...s,...r[i]]:pl(s)&&pl(r[i])?r[i]=pu(s,r[i],(n?`${n}.`:"")+i.toString()):r[i]=s)}return r}function K_(t){return(...e)=>e.reduce((n,a)=>pu(n,a,""),{})}const hg=K_();var G_=P({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,a=e,r=Ro(),i=Bo(),{forwardRef:s,currentElement:o}=ce(),l=k(()=>{var c;return n.ariaLabel||((c=o.value)==null?void 0:c.textContent)}),u=k(()=>{const{ariaLabel:c,...d}=n;return hg(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Ie(()=>{Ca(window,"scroll",c=>{const d=c.target;d!=null&&d.contains(r.trigger.value)&&r.onClose()},{capture:!0}),Ca(window,dg,r.onClose)}),(c,d)=>(_(),D(h(No),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=f=>a("escapeKeyDown",f)),onPointerDownOutside:d[1]||(d[1]=f=>{var p;h(r).disableClosingTrigger.value&&(p=h(r).trigger.value)!=null&&p.contains(f.target)&&f.preventDefault(),a("pointerDownOutside",f)}),onFocusOutside:d[2]||(d[2]=ye(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=f=>h(r).onClose())},{default:C(()=>[R(h(Lc),re({ref:h(s),"data-state":h(r).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:C(()=>[F(c.$slots,"default"),R(h(Ii),{id:h(r).contentId,role:"tooltip"},{default:C(()=>[xe(Q(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),pg=G_;function Z_(t,e){const n=zm(!1,300);Fa(()=>{n.value=!1});const a=V(null),r=jm();function i(){a.value=null,n.value=!1}function s(o,l){if(!l)return;const u=o.currentTarget,c={x:o.clientX,y:o.clientY},d=J_(c,u.getBoundingClientRect()),f=X_(c,d,1),p=Q_(l.getBoundingClientRect()),m=t$([...f,...p]);a.value=m,n.value=!0}return ct(o=>{if(t.value&&e.value){const l=c=>s(c,e.value),u=c=>s(c,t.value);t.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),o(()=>{var c,d;(c=t.value)==null||c.removeEventListener("pointerleave",l),(d=e.value)==null||d.removeEventListener("pointerleave",u)})}}),ct(o=>{var l;if(a.value){const u=c=>{var d,f;if(!a.value||!(c.target instanceof Element))return;const p=c.target,m={x:c.clientX,y:c.clientY},g=((d=t.value)==null?void 0:d.contains(p))||((f=e.value)==null?void 0:f.contains(p)),y=!e$(m,a.value),v=!!p.closest("[data-grace-area-trigger]");g?i():(y||v)&&(i(),r.trigger())};(l=t.value)==null||l.ownerDocument.addEventListener("pointermove",u),o(()=>{var c;return(c=t.value)==null?void 0:c.ownerDocument.removeEventListener("pointermove",u)})}}),{isPointerInTransit:n,onPointerExit:r.on}}function J_(t,e){const n=Math.abs(e.top-t.y),a=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,a,r,i)){case i:return"left";case r:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function X_(t,e,n=5){const a=[];switch(e){case"top":a.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":a.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":a.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":a.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return a}function Q_(t){const{top:e,right:n,bottom:a,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:a},{x:r,y:a}]}function e$(t,e){const{x:n,y:a}=t;let r=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const o=e[i].x,l=e[i].y,u=e[s].x,c=e[s].y;l>a!=c>a&&n<(u-o)*(a-l)/(c-l)+o&&(r=!r)}return r}function t$(t){const e=t.slice();return e.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),n$(e)}function n$(t){if(t.length<=1)return t.slice();const e=[];for(let a=0;a<t.length;a++){const r=t[a];for(;e.length>=2;){const i=e.at(-1),s=e[e.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let a=t.length-1;a>=0;a--){const r=t[a];for(;n.length>=2;){const i=n.at(-1),s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var a$=P({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(t){const e=Oi(t),{forwardRef:n,currentElement:a}=ce(),{trigger:r,onClose:i}=Ro(),s=Bo(),{isPointerInTransit:o,onPointerExit:l}=Z_(r,a);return s.isPointerInTransitRef=o,l(()=>{i()}),(u,c)=>(_(),D(pg,re({ref:h(n)},h(e)),{default:C(()=>[F(u.$slots,"default")]),_:3},16))}}),r$=a$,i$=P({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,a=e,r=Ro(),i=tn(n,a),{forwardRef:s}=ce();return(o,l)=>(_(),D(h(la),{present:o.forceMount||h(r).open.value},{default:C(()=>[(_(),D(Ne(h(r).disableHoverableContent.value?pg:r$),re({ref:h(s)},h(i)),{default:C(()=>[F(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),s$=i$,o$=P({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=Wm();return(n,a)=>h(e)||n.forceMount?(_(),D(dr,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[F(n.$slots,"default")],8,["to","disabled","defer"])):H("v-if",!0)}}),jo=o$,l$=P({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(jo),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),u$=l$,c$=P({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:a}=ce(),r=eg();return yc(()=>{r.onAnchorChange(e.reference??a.value)}),(i,s)=>(_(),D(h(oe),{ref:h(n),as:i.as,"as-child":i.asChild},{default:C(()=>[F(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Vc=c$,d$=P({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=Ro(),a=Bo();n.contentId||(n.contentId=Pt(void 0,"reka-tooltip-content"));const{forwardRef:r,currentElement:i}=ce(),s=V(!1),o=V(!1),l=k(()=>n.disabled.value?{}:{click:g,focus:p,pointermove:d,pointerleave:f,pointerdown:c,blur:m});Ie(()=>{n.onTriggerChange(i.value)});function u(){setTimeout(()=>{s.value=!1},1)}function c(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),s.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(y){y.pointerType!=="touch"&&!o.value&&!a.isPointerInTransitRef.value&&(n.onTriggerEnter(),o.value=!0)}function f(){n.onTriggerLeave(),o.value=!1}function p(y){var v,b;s.value||n.ignoreNonKeyboardFocus.value&&!((b=(v=y.target).matches)!=null&&b.call(v,":focus-visible"))||n.onOpen()}function m(){n.onClose()}function g(){n.disableClosingTrigger.value||n.onClose()}return(y,v)=>(_(),D(h(Vc),{"as-child":"",reference:y.reference},{default:C(()=>[R(h(oe),re({ref:h(r),"aria-describedby":h(n).open.value?h(n).contentId:void 0,"data-state":h(n).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},Tm(l.value)),{default:C(()=>[F(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),f$=d$;const h$=I("bg-transparent border-none outline-none flex items-center justify-center p-0"),p$=I(["font-inter text-xs bg-graycool-25 px-2 py-1 rounded-sm gap-1.5","max-w-[200px] text-graycool-800 font-normal","shadow-[0px_1px_3px_0px_var(--colors-blackalpha-100)]","border-[0.5px] border-solid border-graycool-500","data-[state=open]:animate-fadeIn","data-[state=closed]:animate-fadeOut"].join(" ")),m$=()=>({trigger:h$(),content:p$()}),g$={key:0,class:"tooltip-content"},Yn=P({__name:"Tooltip",props:{placement:{default:"top"},title:{},defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(t){const e=t,n=k(()=>m$());return(a,r)=>(_(),D(h(B_),null,{default:C(()=>[R(h(j_),null,{default:C(()=>[R(h(f$),{class:L(n.value.trigger)},{default:C(()=>[F(a.$slots,"default")]),_:3},8,["class"]),R(h(u$),null,{default:C(()=>[R(h(s$),{side:e.placement,class:L(n.value.content)},{default:C(()=>[R(h(q_)),e.title?(_(),O("div",g$,Q(e.title),1)):F(a.$slots,"content",{key:1})]),_:3},8,["side","class"])]),_:3})]),_:3})]),_:3}))}}),v$=I("flex items-center"),y$=I("text-normal text-xs font-normal font-inter pl-2"),b$=I(["items-center border cursor-pointer flex justify-center","transition-[border-color,background] duration-normal ease-default","w-sm h-sm rounded-sm shadow-stroke-bordered-interactive","[&_svg]:w-[9.52px] [&_svg]:h-[6.33px]","hover:bg-graycoolalpha-10","data-[state=checked]:bg-seed-700 data-[state=checked]:shadow-inner-highlighted-ring","data-[state=checked]:hover:bg-seed-800","data-[state=checked]:disabled:bg-graycoolalpha-20 data-[state=checked]:disabled:shadow-inner-highlighted-ring","data-[state=indeterminate]:bg-seed-700 data-[state=indeterminate]:shadow-inner-highlighted-ring","data-[state=indeterminate]:hover:bg-seed-800","data-[state=indeterminate]:[&_svg]:w-[9.52px]","data-[state=indeterminate]:disabled:bg-graycoolalpha-20 data-[state=indeterminate]:disabled:shadow-inner-highlighted-ring","focus:shadow-state-focus-primary","disabled:text-graycoolalpha-75 disabled:bg-graycoolalpha-20","disabled:cursor-not-allowed disabled:shadow-inner-highlighted-ring","disabled:hover:text-graycoolalpha-75 disabled:hover:bg-graycoolalpha-20"].join(" ")),x$=I(["text-whitealpha-1000","data-[state=checked]:flex data-[state=checked]:justify-center data-[state=checked]:items-center","data-[state=indeterminate]:flex data-[state=indeterminate]:justify-center data-[state=indeterminate]:items-center"].join(" ")),w$=()=>({root:v$(),label:y$(),control:b$(),indicator:x$()}),_$={class:"checkbox-root"},$$={key:0,class:"checkbox-label-content"},k$={key:0,class:"checkbox-label-description"},S$=P({__name:"Checkbox",props:{disabled:{type:Boolean},checked:{type:[Boolean,String]},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!0},defaultValue:{},modelValue:{},value:{},id:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},"aria-labelledby":{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,a=e,r=w$();return(i,s)=>(_(),O("div",_$,[T("div",{class:L(h(r).root)},[R(h(hw),{class:L(h(r).control),checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],"onUpdate:checked":s[0]||(s[0]=o=>a("update:checked",o))},{default:C(()=>[R(h(mw),{class:L(h(r).indicator)},{default:C(()=>[n.checked===!0?(_(),D(h(Qm),{key:0})):n.checked==="indeterminate"?(_(),D(h(xw),{key:1})):H("",!0)]),_:1},8,["class"])]),_:1},8,["class","checked","disabled","aria-labelledby"]),n.hasLabel||t.iconTooltip?(_(),O("div",$$,[T("label",{class:L(h(r).label)},[F(i.$slots,"default",{},void 0,!0)],2),t.iconTooltip?(_(),D(Yn,{key:0,title:t.iconTooltip},{default:C(()=>[(_(),D(Ne(t.suffixIcon&&h(Oa)),{class:"suffix-icon"}))]),_:1},8,["title"])):(_(),D(Ne(t.suffixIcon&&h(Oa)),{key:1,class:"suffix-icon"}))])):H("",!0)],2),t.description?(_(),O("p",k$,Q(t.description),1)):H("",!0)]))}}),mg=Ax(S$,[["__scopeId","data-v-b1ed64d6"]]);function rr(t,e){return t-e*Math.floor(t/e)}const gg=1721426;function _a(t,e,n,a){e=qi(t,e);let r=e-1,i=-2;return n<=2?i=0:Kn(e)&&(i=-1),gg-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+i+a)}function Kn(t){return t%4===0&&(t%100!==0||t%400===0)}function qi(t,e){return t==="BC"?1-e:e}function zo(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const C$={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};let en=class{fromJulianDay(e){let n=e,a=n-gg,r=Math.floor(a/146097),i=rr(a,146097),s=Math.floor(i/36524),o=rr(i,36524),l=Math.floor(o/1461),u=rr(o,1461),c=Math.floor(u/365),d=r*400+s*100+l*4+c+(s!==4&&c!==4?1:0),[f,p]=zo(d),m=n-_a(f,p,1,1),g=2;n<_a(f,p,3,1)?g=0:Kn(p)&&(g=1);let y=Math.floor(((m+g)*12+373)/367),v=n-_a(f,p,y,1)+1;return new rt(f,p,y,v)}toJulianDay(e){return _a(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return C$[Kn(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Kn(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}};const M$={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function aa(t,e){return e=kt(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Fc(t,e){return e=kt(e,t.calendar),t=mu(t),e=mu(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function si(t,e){return Bc(t.calendar,e.calendar)&&aa(t,e)}function vf(t,e){return Bc(t.calendar,e.calendar)&&Fc(t,e)}function Bc(t,e){var n,a;return((n=t.isEqual)==null?void 0:n.call(t,e))??((a=e.isEqual)==null?void 0:a.call(e,t))??t.identifier===e.identifier}function D$(t,e){return aa(t,vg(e))}const A$={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Rc(t,e,n){let a=t.calendar.toJulianDay(t),r=n?A$[n]:P$(e),i=Math.ceil(a+1-r)%7;return i<0&&(i+=7),i}function O$(t){return Dn(Date.now(),t)}function vg(t){return q$(O$(t))}function yg(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function E$(t,e){return yf(t)-yf(e)}function yf(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let ml=null;function Vi(){return ml==null&&(ml=new Intl.DateTimeFormat().resolvedOptions().timeZone),ml}function mu(t){return t.subtract({days:t.day-1})}function bf(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const xf=new Map,gl=new Map;function T$(t){if(Intl.Locale){let n=xf.get(t);return n||(n=new Intl.Locale(t).maximize().region,n&&xf.set(t,n)),n}let e=t.split("-")[1];return e==="u"?void 0:e}function P$(t){let e=gl.get(t);if(!e){if(Intl.Locale){let a=new Intl.Locale(t);if("getWeekInfo"in a&&(e=a.getWeekInfo(),e))return gl.set(t,e),e.firstDay}let n=T$(t);if(t.includes("-fw-")){let a=t.split("-fw-")[1].split("-")[0];a==="mon"?e={firstDay:1}:a==="tue"?e={firstDay:2}:a==="wed"?e={firstDay:3}:a==="thu"?e={firstDay:4}:a==="fri"?e={firstDay:5}:a==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:n&&M$[n]||0};gl.set(t,e)}return e.firstDay}function pr(t){t=kt(t,new en);let e=qi(t.era,t.year);return bg(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function bg(t,e,n,a,r,i,s){let o=new Date;return o.setUTCHours(a,r,i,s),o.setUTCFullYear(t,e-1,n),o.getTime()}function gu(t,e){if(e==="UTC")return 0;if(t>0&&e===Vi())return new Date(t).getTimezoneOffset()*-6e4;let{year:n,month:a,day:r,hour:i,minute:s,second:o}=xg(t,e);return bg(n,a,r,i,s,o,0)-Math.floor(t/1e3)*1e3}const wf=new Map;function xg(t,e){let n=wf.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),wf.set(e,n));let a=n.formatToParts(new Date(t)),r={};for(let i of a)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const _f=864e5;function I$(t,e,n,a){return(n===a?[n]:[n,a]).filter(r=>L$(t,e,r))}function L$(t,e,n){let a=xg(n,e);return t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}function Cn(t,e,n="compatible"){let a=mr(t);if(e==="UTC")return pr(a);if(e===Vi()&&n==="compatible"){a=kt(a,new en);let l=new Date,u=qi(a.era,a.year);return l.setFullYear(u,a.month-1,a.day),l.setHours(a.hour,a.minute,a.second,a.millisecond),l.getTime()}let r=pr(a),i=gu(r-_f,e),s=gu(r+_f,e),o=I$(a,e,r-i,r-s);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-i,r-s);case"compatible":case"later":return Math.max(r-i,r-s);case"reject":throw new RangeError("No such absolute time found")}}function wg(t,e,n="compatible"){return new Date(Cn(t,e,n))}function Dn(t,e){let n=gu(t,e),a=new Date(t+n),r=a.getUTCFullYear(),i=a.getUTCMonth()+1,s=a.getUTCDate(),o=a.getUTCHours(),l=a.getUTCMinutes(),u=a.getUTCSeconds(),c=a.getUTCMilliseconds();return new Uc(r<1?"BC":"AD",r<1?-r+1:r,i,s,e,n,o,l,u,c)}function q$(t){return new rt(t.calendar,t.era,t.year,t.month,t.day)}function mr(t,e){let n=0,a=0,r=0,i=0;if("timeZone"in t)({hour:n,minute:a,second:r,millisecond:i}=t);else if("hour"in t)return t;return new Hc(t.calendar,t.era,t.year,t.month,t.day,n,a,r,i)}function kt(t,e){if(Bc(t.calendar,e))return t;let n=e.fromJulianDay(t.calendar.toJulianDay(t)),a=t.copy();return a.calendar=e,a.era=n.era,a.year=n.year,a.month=n.month,a.day=n.day,Ta(a),a}function V$(t,e,n){if(t instanceof Uc)return t.timeZone===e?t:B$(t,e);let a=Cn(t,e,n);return Dn(a,e)}function F$(t){let e=pr(t)-t.offset;return new Date(e)}function B$(t,e){let n=pr(t)-t.offset;return kt(Dn(n,e),t.calendar)}const Ir=36e5;function Wo(t,e){var n,a;let r=t.copy(),i="hour"in r?z$(r,e):0;vu(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,yu(r),_g(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=i,R$(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let s=r.calendar.getYearsInEra(r);if(r.year>s){let l=(a=(n=r.calendar).isInverseEra)==null?void 0:a.call(n,r);r.year=s,r.month=l?1:r.calendar.getMonthsInYear(r),r.day=l?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function vu(t,e){var n,a;(a=(n=t.calendar).isInverseEra)!=null&&a.call(n,t)&&(e=-e),t.year+=e}function yu(t){for(;t.month<1;)vu(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,vu(t,1)}function R$(t){for(;t.day<1;)t.month--,yu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,yu(t)}function _g(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function Ta(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),_g(t)}function $g(t){let e={};for(let n in t)typeof t[n]=="number"&&(e[n]=-t[n]);return e}function kg(t,e){return Wo(t,$g(e))}function Nc(t,e){let n=t.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),Ta(n),n}function ro(t,e){let n=t.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),j$(n),n}function N$(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ki(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ki(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ki(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ki(t.hour,24),e}function j$(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ki(t,e){let n=t%e;return n<0&&(n+=e),n}function z$(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,N$(t)}function jc(t,e,n,a){var r,i;let s=t.copy();switch(e){case"era":{let o=t.calendar.getEras(),l=o.indexOf(t.era);if(l<0)throw new Error("Invalid era: "+t.era);l=An(l,n,0,o.length-1,a?.round),s.era=o[l],Ta(s);break}case"year":(i=(r=s.calendar).isInverseEra)!=null&&i.call(r,s)&&(n=-n),s.year=An(t.year,n,-1/0,9999,a?.round),s.year===-1/0&&(s.year=1),s.calendar.balanceYearMonth&&s.calendar.balanceYearMonth(s,t);break;case"month":s.month=An(t.month,n,1,t.calendar.getMonthsInYear(t),a?.round);break;case"day":s.day=An(t.day,n,1,t.calendar.getDaysInMonth(t),a?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(s),Ta(s),s}function Sg(t,e,n,a){let r=t.copy();switch(e){case"hour":{let i=t.hour,s=0,o=23;if(a?.hourCycle===12){let l=i>=12;s=l?12:0,o=l?23:11}r.hour=An(i,n,s,o,a?.round);break}case"minute":r.minute=An(t.minute,n,0,59,a?.round);break;case"second":r.second=An(t.second,n,0,59,a?.round);break;case"millisecond":r.millisecond=An(t.millisecond,n,0,999,a?.round);break;default:throw new Error("Unsupported field "+e)}return r}function An(t,e,n,a,r=!1){if(r){t+=Math.sign(e),t<n&&(t=a);let i=Math.abs(e);e>0?t=Math.ceil(t/i)*i:t=Math.floor(t/i)*i,t>a&&(t=n)}else t+=e,t<n?t=a-(n-t-1):t>a&&(t=n+(t-a-1));return t}function Cg(t,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let r=Wo(mr(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Cn(r,t.timeZone)}else n=pr(t)-t.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let a=Dn(n,t.timeZone);return kt(a,t.calendar)}function W$(t,e){return Cg(t,$g(e))}function H$(t,e,n,a){switch(e){case"hour":{let r=0,i=23;if(a?.hourCycle===12){let m=t.hour>=12;r=m?12:0,i=m?23:11}let s=mr(t),o=kt(ro(s,{hour:r}),new en),l=[Cn(o,t.timeZone,"earlier"),Cn(o,t.timeZone,"later")].filter(m=>Dn(m,t.timeZone).day===o.day)[0],u=kt(ro(s,{hour:i}),new en),c=[Cn(u,t.timeZone,"earlier"),Cn(u,t.timeZone,"later")].filter(m=>Dn(m,t.timeZone).day===u.day).pop(),d=pr(t)-t.offset,f=Math.floor(d/Ir),p=d%Ir;return d=An(f,n,Math.floor(l/Ir),Math.floor(c/Ir),a?.round)*Ir+p,kt(Dn(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return Sg(t,e,n,a);case"era":case"year":case"month":case"day":{let r=jc(mr(t),e,n,a),i=Cn(r,t.timeZone);return kt(Dn(i,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function U$(t,e,n){let a=mr(t),r=ro(Nc(a,e),e);if(r.compare(a)===0)return t;let i=Cn(r,t.timeZone,n);return kt(Dn(i,t.timeZone),t.calendar)}function Y$(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Mg(t){let e=kt(t,new en),n;return e.era==="BC"?n=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):n=String(e.year).padStart(4,"0"),`${n}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function Dg(t){return`${Mg(t)}T${Y$(t)}`}function K$(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let n=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),r=Math.floor(t%36e5%6e4/1e3),i=`${e}${String(n).padStart(2,"0")}:${String(a).padStart(2,"0")}`;return r!==0&&(i+=`:${String(r).padStart(2,"0")}`),i}function G$(t){return`${Dg(t)}${K$(t.offset)}[${t.timeZone}]`}var Z$=t=>{throw TypeError(t)},zc=(t,e,n)=>e.has(t)?Z$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);function Wc(t){let e=typeof t[0]=="object"?t.shift():new en,n;if(typeof t[0]=="string")n=t.shift();else{let s=e.getEras();n=s[s.length-1]}let a=t.shift(),r=t.shift(),i=t.shift();return[e,n,a,r,i]}var Ag;const J$=class bu{constructor(...e){zc(this,Ag);let[n,a,r,i,s]=Wc(e);this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,Ta(this)}copy(){return this.era?new bu(this.calendar,this.era,this.year,this.month,this.day):new bu(this.calendar,this.year,this.month,this.day)}add(e){return Wo(this,e)}subtract(e){return kg(this,e)}set(e){return Nc(this,e)}cycle(e,n,a){return jc(this,e,n,a)}toDate(e){return wg(this,e)}toString(){return Mg(this)}compare(e){return yg(this,e)}};Ag=new WeakMap;let rt=J$;var Og;const X$=class xu{constructor(...e){zc(this,Og);let[n,a,r,i,s]=Wc(e);this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Ta(this)}copy(){return this.era?new xu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new xu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Wo(this,e)}subtract(e){return kg(this,e)}set(e){return Nc(ro(this,e),e)}cycle(e,n,a){switch(e){case"era":case"year":case"month":case"day":return jc(this,e,n,a);default:return Sg(this,e,n,a)}}toDate(e,n){return wg(this,e,n)}toString(){return Dg(this)}compare(e){let n=yg(this,e);return n===0?E$(this,mr(e)):n}};Og=new WeakMap;let Hc=X$;var Eg;const Q$=class wu{constructor(...e){zc(this,Eg);let[n,a,r,i,s]=Wc(e),o=e.shift(),l=e.shift();this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,this.timeZone=o,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Ta(this)}copy(){return this.era?new wu(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new wu(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Cg(this,e)}subtract(e){return W$(this,e)}set(e,n){return U$(this,e,n)}cycle(e,n,a){return H$(this,e,n,a)}toDate(){return F$(this)}toString(){return G$(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-V$(e,this.timeZone).toDate().getTime()}};Eg=new WeakMap;let Uc=Q$;const Tg=-543;let ek=class extends en{fromJulianDay(e){let n=super.fromJulianDay(e),a=qi(n.era,n.year);return new rt(this,a-Tg,n.month,n.day)}toJulianDay(e){return super.toJulianDay($f(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth($f(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}};function $f(t){let[e,n]=zo(t.year+Tg);return new rt(e,n,t.month,t.day)}const _u=1723856,kf=1824665,$u=5500;function io(t,e,n,a){return t+365*e+Math.floor(e/4)+30*(n-1)+a-1}function Yc(t,e){let n=Math.floor(4*(e-t)/1461),a=1+Math.floor((e-io(t,n,1,1))/30),r=e+1-io(t,n,a,1);return[n,a,r]}function Pg(t){return Math.floor(t%4/3)}function Ig(t,e){return e%13!==0?30:Pg(t)+5}let Kc=class{fromJulianDay(e){let[n,a,r]=Yc(_u,e),i="AM";return n<=0&&(i="AA",n+=$u),new rt(this,i,n,a,r)}toJulianDay(e){let n=e.year;return e.era==="AA"&&(n-=$u),io(_u,n,e.month,e.day)}getDaysInMonth(e){return Ig(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+Pg(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return e.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}},tk=class extends Kc{fromJulianDay(e){let[n,a,r]=Yc(_u,e);return n+=$u,new rt(this,"AA",n,a,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}},nk=class extends Kc{fromJulianDay(e){let[n,a,r]=Yc(kf,e),i="CE";return n<=0&&(i="BCE",n=1-n),new rt(this,i,n,a,r)}toJulianDay(e){let n=e.year;return e.era==="BCE"&&(n=1-n),io(kf,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return e.era==="BCE"&&(n=1-n),Ig(n,e.month)}isInverseEra(e){return e.era==="BCE"}balanceDate(e){e.year<=0&&(e.era=e.era==="BCE"?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return e.era==="BCE"?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}};const Sf=347997,Lg=1080,qg=24*Lg,ak=29,rk=12*Lg+793,ik=ak*qg+rk;function wa(t){return rr(t*7+1,19)<7}function Ts(t){let e=Math.floor((235*t-234)/19),n=12084+13753*e,a=e*29+Math.floor(n/25920);return rr(3*(a+1),7)<3&&(a+=1),a}function sk(t){let e=Ts(t-1),n=Ts(t);return Ts(t+1)-n===356?2:n-e===382?1:0}function oi(t){return Ts(t)+sk(t)}function Vg(t){return oi(t+1)-oi(t)}function ok(t){let e=Vg(t);switch(e>380&&(e-=30),e){case 353:return 0;case 354:return 1;case 355:return 2}}function Gi(t,e){if(e>=6&&!wa(t)&&e++,e===4||e===7||e===9||e===11||e===13)return 29;let n=ok(t);return e===2?n===2?30:29:e===3?n===0?29:30:e===6?wa(t)?30:0:30}let lk=class{fromJulianDay(e){let n=e-Sf,a=n*qg/ik,r=Math.floor((19*a+234)/235)+1,i=oi(r),s=Math.floor(n-i);for(;s<1;)r--,i=oi(r),s=Math.floor(n-i);let o=1,l=0;for(;l<s;)l+=Gi(r,o),o++;o--,l-=Gi(r,o);let u=s-l;return new rt(this,r,o,u)}toJulianDay(e){let n=oi(e.year);for(let a=1;a<e.month;a++)n+=Gi(e.year,a);return n+e.day+Sf}getDaysInMonth(e){return Gi(e.year,e.month)}getMonthsInYear(e){return wa(e.year)?13:12}getDaysInYear(e){return Vg(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(wa(n.year)&&!wa(e.year)&&n.month>6?e.month--:!wa(n.year)&&wa(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}};const vl=78,Cf=80;let uk=class extends en{fromJulianDay(e){let n=super.fromJulianDay(e),a=n.year-vl,r=e-_a(n.era,n.year,1,1),i;r<Cf?(a--,i=Kn(n.year-1)?31:30,r+=i+155+90+10):(i=Kn(n.year)?31:30,r-=Cf);let s,o;if(r<i)s=1,o=r+1;else{let l=r-i;l<155?(s=Math.floor(l/31)+2,o=l%31+1):(l-=155,s=Math.floor(l/30)+7,o=l%30+1)}return new rt(this,a,s,o)}toJulianDay(e){let n=e.year+vl,[a,r]=zo(n),i,s;return Kn(r)?(i=31,s=_a(a,r,3,21)):(i=30,s=_a(a,r,3,22)),e.month===1?s+e.day-1:(s+=i+Math.min(e.month-2,5)*31,e.month>=8&&(s+=(e.month-7)*30),s+=e.day-1,s)}getDaysInMonth(e){return e.month===1&&Kn(e.year+vl)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}};const so=1948440,Mf=1948439,Vt=1300,Wa=1600,ck=460322;function oo(t,e,n,a){return a+Math.ceil(29.5*(n-1))+(e-1)*354+Math.floor((3+11*e)/30)+t-1}function Fg(t,e,n){let a=Math.floor((30*(n-e)+10646)/10631),r=Math.min(12,Math.ceil((n-(29+oo(e,a,1,1)))/29.5)+1),i=n-oo(e,a,r,1)+1;return new rt(t,a,r,i)}function Df(t){return(14+11*t)%30<11}let Gc=class{fromJulianDay(e){return Fg(this,so,e)}toJulianDay(e){return oo(so,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return e.month===12&&Df(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return Df(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}},dk=class extends Gc{fromJulianDay(e){return Fg(this,Mf,e)}toJulianDay(e){return oo(Mf,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}};const fk="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let ku,ir;function Ps(t){return ck+ir[t-Vt]}function Qr(t,e){let n=t-Vt,a=1<<11-(e-1);return(ku[n]&a)===0?29:30}function Af(t,e){let n=Ps(t);for(let a=1;a<e;a++)n+=Qr(t,a);return n}function Of(t){return ir[t+1-Vt]-ir[t-Vt]}let hk=class extends Gc{constructor(){if(super(),this.identifier="islamic-umalqura",ku||(ku=new Uint16Array(Uint8Array.from(atob(fk),e=>e.charCodeAt(0)).buffer)),!ir){ir=new Uint32Array(Wa-Vt+1);let e=0;for(let n=Vt;n<=Wa;n++){ir[n-Vt]=e;for(let a=1;a<=12;a++)e+=Qr(n,a)}}}fromJulianDay(e){let n=e-so,a=Ps(Vt),r=Ps(Wa);if(n<a||n>r)return super.fromJulianDay(e);{let i=Vt-1,s=1,o=1;for(;o>0;){i++,o=n-Ps(i)+1;let l=Of(i);if(o===l){s=12;break}else if(o<l){let u=Qr(i,s);for(s=1;o>u;)o-=u,s++,u=Qr(i,s);break}}return new rt(this,i,s,n-Af(i,s)+1)}}toJulianDay(e){return e.year<Vt||e.year>Wa?super.toJulianDay(e):so+Af(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<Vt||e.year>Wa?super.getDaysInMonth(e):Qr(e.year,e.month)}getDaysInYear(e){return e.year<Vt||e.year>Wa?super.getDaysInYear(e):Of(e.year)}};const sr=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],pk=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Is=[1867,1911,1925,1988,2018],Hn=["meiji","taisho","showa","heisei","reiwa"];function Ef(t){const e=sr.findIndex(([n,a,r])=>t.year<n||t.year===n&&t.month<a||t.year===n&&t.month===a&&t.day<r);return e===-1?sr.length-1:e===0?0:e-1}function yl(t){let e=Is[Hn.indexOf(t.era)];if(!e)throw new Error("Unknown era: "+t.era);return new rt(t.year+e,t.month,t.day)}let mk=class extends en{fromJulianDay(e){let n=super.fromJulianDay(e),a=Ef(n);return new rt(this,Hn[a],n.year-Is[a],n.month,n.day)}toJulianDay(e){return super.toJulianDay(yl(e))}balanceDate(e){let n=yl(e),a=Ef(n);Hn[a]!==e.era&&(e.era=Hn[a],e.year=n.year-Is[a]),this.constrainDate(e)}constrainDate(e){let n=Hn.indexOf(e.era),a=pk[n];if(a!=null){let[r,i,s]=a,o=r-Is[n];e.year=Math.max(1,Math.min(o,e.year)),e.year===o&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(s,e.day)))}if(e.year===1&&n>=0){let[,r,i]=sr[n];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(i,e.day))}}getEras(){return Hn}getYearsInEra(e){let n=Hn.indexOf(e.era),a=sr[n],r=sr[n+1];if(r==null)return 9999-a[0]+1;let i=r[0]-a[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(yl(e))}getMinimumMonthInYear(e){let n=Tf(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=Tf(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}};function Tf(t){if(t.year===1){let e=Hn.indexOf(t.era);return sr[e]}}const Pf=1948320,If=[0,31,62,93,124,155,186,216,246,276,306,336];let gk=class{fromJulianDay(e){let n=e-Pf,a=1+Math.floor((33*n+3)/12053),r=365*(a-1)+Math.floor((8*a+21)/33),i=n-r,s=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-If[s]+1;return new rt(this,a,s+1,o)}toJulianDay(e){let n=Pf-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=If[e.month-1],n+=e.day,n}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||rr(25*e.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}};const lo=1911;function Bg(t){return t.era==="minguo"?t.year+lo:1-t.year+lo}function Lf(t){let e=t-lo;return e>0?["minguo",e]:["before_minguo",1-e]}let vk=class extends en{fromJulianDay(e){let n=super.fromJulianDay(e),a=qi(n.era,n.year),[r,i]=Lf(a);return new rt(this,r,i,n.month,n.day)}toJulianDay(e){return super.toJulianDay(qf(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,a]=Lf(Bg(e));e.era=n,e.year=a}isInverseEra(e){return e.era==="before_minguo"}getDaysInMonth(e){return super.getDaysInMonth(qf(e))}getYearsInEra(e){return e.era==="before_minguo"?9999:9999-lo}constructor(...e){super(...e),this.identifier="roc"}};function qf(t){let[e,n]=zo(Bg(t));return new rt(e,n,t.month,t.day)}function yk(t){switch(t){case"buddhist":return new ek;case"ethiopic":return new Kc;case"ethioaa":return new tk;case"coptic":return new nk;case"hebrew":return new lk;case"indian":return new uk;case"islamic-civil":return new Gc;case"islamic-tbla":return new dk;case"islamic-umalqura":return new hk;case"japanese":return new mk;case"persian":return new gk;case"roc":return new vk;case"gregory":default:return new en}}let bl=new Map,_n=class{constructor(e,n={}){this.formatter=Rg(e,n),this.options=n}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let a=this.formatter.formatToParts(e),r=this.formatter.formatToParts(n);return[...a.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return wk()&&(this.resolvedHourCycle||(this.resolvedHourCycle=_k(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}};const bk={true:{ja:"h11"},false:{}};function Rg(t,e={}){if(typeof e.hour12=="boolean"&&xk()){e={...e};let r=bk[String(e.hour12)][t.split("-")[0]],i=e.hour12?"h12":"h23";e.hourCycle=r??i,delete e.hour12}let n=t+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():"");if(bl.has(n))return bl.get(n);let a=new Intl.DateTimeFormat(t,e);return bl.set(n,a),a}let xl=null;function xk(){return xl==null&&(xl=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),xl}let wl=null;function wk(){return wl==null&&(wl=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),wl}function _k(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let n=Rg(t,{...e,timeZone:void 0}),a=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(a===0&&r===23)return"h23";if(a===24&&r===23)return"h24";if(a===0&&r===11)return"h11";if(a===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function un(t,e=Vi()){return Zc(t)?t.toDate():t.toDate(e)}function $k(t){return t instanceof Hc}function Zc(t){return t instanceof Uc}function kk(t){return $k(t)||Zc(t)}function or(t){if(t instanceof Date){const e=t.getFullYear(),n=t.getMonth()+1;return new Date(e,n,0).getDate()}else return t.set({day:100}).day}function Zi(t,e){return t.compare(e)<0}function _l(t,e){return t.compare(e)>0}function Sk(t,e,n){const a=Rc(t,n,"sun");return e>a?t.subtract({days:a+7-e}):e===a?t:t.subtract({days:a-e})}function Ck(t,e,n){const a=Rc(t,n,"sun"),r=e===0?6:e-1;return a===r?t:a>r?t.add({days:7-a+r}):t.add({days:r-a})}function Ng(t){const{defaultValue:e,defaultPlaceholder:n,granularity:a="day",locale:r="en"}=t;if(Array.isArray(e)&&e.length)return e.at(-1).copy();if(e&&!Array.isArray(e))return e.copy();if(n)return n.copy();const i=new Date,s=i.getFullYear(),o=i.getMonth()+1,l=i.getDate(),u=["hour","minute","second"],c=new _n(r),d=yk(c.resolvedOptions().calendar);return u.includes(a??"day")?kt(new Hc(s,o,l,0,0,0),d):kt(new rt(s,o,l),d)}function Mk(t,e){const n=[];for(let a=0;a<t.length;a+=e)n.push(t.slice(a,a+e));return n}function jg(t){const e=t.querySelector("[data-selected]");if(e)return e.focus();const n=t.querySelector("[data-today]");if(n)return n.focus();const a=t.querySelector("[data-reka-calendar-day]");if(a)return a.focus()}function Vf(t,e){const n=[];let a=t.add({days:1});const r=e;for(;a.compare(r)<0;)n.push(a),a=a.add({days:1});return n}function $l(t){const{dateObj:e,weekStartsOn:n,fixedWeeks:a,locale:r}=t,i=or(e),s=Array.from({length:i},(y,v)=>e.set({day:v+1})),o=mu(e),l=bf(e),u=Sk(o,n,r),c=Ck(l,n,r),d=Vf(u.subtract({days:1}),o),f=Vf(l,c.add({days:1})),p=d.length+s.length+f.length;if(a&&p<42){const y=42-p;let v=f.at(-1);v||(v=bf(e));const b=Array.from({length:y},(x,w)=>{const $=w+1;return v.add({days:$})});f.push(...b)}const m=d.concat(s,f),g=Mk(m,7);return{value:e,cells:m,rows:g}}function ma(t){const{numberOfMonths:e,dateObj:n,...a}=t,r=[];if(!e||e===1)return r.push($l({...a,dateObj:n})),r;r.push($l({...a,dateObj:n}));for(let i=1;i<e;i++){const s=n.add({months:i});r.push($l({...a,dateObj:s}))}return r}function zg(t){const e=new rt(2025,1,6);return(1-Rc(e,t)+7)%7}function Jc(t){const e=To({locale:V("en")});return k(()=>{var n;return t?.value||((n=e.locale)==null?void 0:n.value)||"en"})}const[Fi,Dk]=Ve("PopoverRoot");var Ak=P({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(t,{emit:e}){const n=t,a=e,{modal:r}=He(n),i=ut(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=V(),o=V(!1);return Dk({contentId:"",triggerId:"",modal:r,open:i,onOpenChange:l=>{i.value=l},onOpenToggle:()=>{i.value=!i.value},triggerElement:s,hasCustomAnchor:o}),(l,u)=>(_(),D(h(Mc),null,{default:C(()=>[F(l.$slots,"default",{open:h(i),close:()=>i.value=!1})]),_:3}))}}),Ok=Ak;const[Wg,Ek]=Ve("DatePickerRoot");var Tk=P({inheritAttrs:!1,__name:"DatePickerRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},modelValue:{type:null,required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},isDateUnavailable:{type:Function,required:!1,default:void 0},id:{type:String,required:!1},dir:{type:String,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},fixedWeeks:{type:Boolean,required:!1,default:!1},numberOfMonths:{type:Number,required:!1,default:1},preventDeselect:{type:Boolean,required:!1,default:!1},closeOnSelect:{type:Boolean,required:!1,default:!1}},emits:["update:open","update:modelValue","update:placeholder"],setup(t,{emit:e}){const n=t,a=e,{locale:r,disabled:i,readonly:s,pagedNavigation:o,weekdayFormat:l,fixedWeeks:u,numberOfMonths:c,preventDeselect:d,isDateDisabled:f,isDateUnavailable:p,defaultOpen:m,modal:g,id:y,name:v,required:b,minValue:x,maxValue:w,granularity:$,hideTimeZone:S,hourCycle:E,defaultValue:A,dir:B,step:z,closeOnSelect:W}=He(n),U=Ti(B),X=Jc(r),N=k(()=>n.weekStartsOn??zg(X.value)),q=ut(n,"modelValue",a,{defaultValue:A.value,passive:n.modelValue===void 0}),j=k(()=>Ng({defaultPlaceholder:n.placeholder,granularity:n.granularity,defaultValue:q.value,locale:X.value})),J=ut(n,"placeholder",a,{defaultValue:n.defaultPlaceholder??j.value.copy(),passive:n.placeholder===void 0}),Y=ut(n,"open",a,{defaultValue:m.value,passive:n.open===void 0}),ne=V();return de(q,K=>{K&&K.compare(J.value)!==0&&(J.value=K.copy()),W.value&&(Y.value=!1)}),Ek({isDateUnavailable:p.value,isDateDisabled:f.value,locale:X,disabled:i,pagedNavigation:o,weekStartsOn:N,weekdayFormat:l,fixedWeeks:u,numberOfMonths:c,readonly:s,preventDeselect:d,modelValue:q,placeholder:J,defaultOpen:m,modal:g,open:Y,id:y,name:v,required:b,minValue:x,maxValue:w,granularity:$,hideTimeZone:S,hourCycle:E,dateFieldRef:ne,dir:U,step:z,onDateChange(K){!K||!q.value?q.value=K?.copy()??void 0:!d.value&&K&&q.value.compare(K)===0?q.value=void 0:q.value=K.copy()},onPlaceholderChange(K){J.value=K.copy()},closeOnSelect:W}),(K,ee)=>(_(),D(h(Ok),{open:h(Y),"onUpdate:open":ee[0]||(ee[0]=fe=>Tn(Y)?Y.value=fe:null),"default-open":h(m),modal:h(g)},{default:C(()=>[F(K.$slots,"default")]),_:3},8,["open","default-open","modal"]))}}),Pk=Tk;function Ik(t,e={}){const n=V(t);function a(){return n.value}function r(y){n.value=y}function i(y,v){return new _n(n.value,{...e,...v}).format(y)}function s(y,v=!0){return kk(y)&&v?i(un(y),{dateStyle:"long",timeStyle:"long"}):i(un(y),{dateStyle:"long"})}function o(y,v={}){return new _n(n.value,{...e,month:"long",year:"numeric",...v}).format(y)}function l(y,v={}){return new _n(n.value,{...e,month:"long",...v}).format(y)}function u(){const y=vg(Vi());return[1,2,3,4,5,6,7,8,9,10,11,12].map(v=>({label:l(un(y.set({month:v}))),value:v}))}function c(y,v={}){return new _n(n.value,{...e,year:"numeric",...v}).format(y)}function d(y,v){return Zc(y)?new _n(n.value,{...e,...v,timeZone:y.timeZone}).formatToParts(un(y)):new _n(n.value,{...e,...v}).formatToParts(un(y))}function f(y,v="narrow"){return new _n(n.value,{...e,weekday:v}).format(y)}function p(y){var v;const b=(v=new _n(n.value,{...e,hour:"numeric",minute:"numeric"}).formatToParts(y).find(x=>x.type==="dayPeriod"))==null?void 0:v.value;return b==="PM"||b==="pm"||b==="p.m."?"PM":"AM"}const m={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function g(y,v,b={}){const x={...m,...b},w=d(y,x).find($=>$.type===v);return w?w.value:""}return{setLocale:r,getLocale:a,fullMonth:l,fullYear:c,fullMonthAndYear:o,toParts:d,custom:i,part:g,dayPeriod:p,selectedDate:s,dayOfWeek:f,getMonths:u}}function Lk(t){function e(i){return Array.isArray(t.date.value)?t.date.value.some(s=>aa(s,i)):t.date.value?aa(t.date.value,i):!1}const n=k(()=>{var i,s,o,l;if(Array.isArray(t.date.value)){if(!t.date.value.length)return!1;for(const u of t.date.value)if((i=t.isDateDisabled)!=null&&i.call(t,u)||(s=t.isDateUnavailable)!=null&&s.call(t,u))return!0}else{if(!t.date.value)return!1;if((o=t.isDateDisabled)!=null&&o.call(t,t.date.value)||(l=t.isDateUnavailable)!=null&&l.call(t,t.date.value))return!0}return!1}),a=k(()=>Array.isArray(t.date.value)?t.date.value.length>0:!!t.date.value),r=k(()=>{var i;return Array.isArray(t.date.value)?t.date.value.length?t.date.value.some(s=>{var o;return(o=t.isDateDisabled)==null?void 0:o.call(t,s)}):!1:t.date.value?!!((i=t.isDateDisabled)!=null&&i.call(t,t.date.value)):!1});return{isDateSelected:e,isInvalid:n,hasSelectedDate:a,isSelectedDateDisabled:r}}function qk(t,e){const n=e(t),a=n.compare(t),r={};return a>=7&&(r.day=1),a>=or(t)&&(r.month=1),n.set({...r})}function Vk(t,e){const n=e(t),a=t.compare(n),r={};return a>=7&&(r.day=35),a>=or(t)&&(r.month=13),n.set({...r})}function Fk(t,e){return e(t)}function Bk(t,e){return e(t)}function Rk(t){const e=Ik(t.locale.value),n=k(()=>{const v={calendar:t.placeholder.value.calendar.identifier};return t.placeholder.value.calendar.identifier==="gregory"&&t.placeholder.value.era==="BC"&&(v.era="short"),v}),a=V(ma({dateObj:t.placeholder.value,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value})),r=k(()=>a.value.map(v=>v.value));function i(v){return!r.value.some(b=>vf(v,b))}const s=v=>{if(!t.maxValue.value||!a.value.length)return!1;if(t.disabled.value)return!0;const b=a.value.at(-1).value;if(!v&&!t.nextPage.value){const w=b.add({months:1}).set({day:1});return _l(w,t.maxValue.value)}const x=qk(b,v||t.nextPage.value);return _l(x,t.maxValue.value)},o=v=>{if(!t.minValue.value||!a.value.length)return!1;if(t.disabled.value)return!0;const b=a.value[0].value;if(!v&&!t.prevPage.value){const w=b.subtract({months:1}).set({day:35});return Zi(w,t.minValue.value)}const x=Vk(b,v||t.prevPage.value);return Zi(x,t.minValue.value)};function l(v){var b;return!!((b=t.isDateDisabled)!=null&&b.call(t,v)||t.disabled.value||t.maxValue.value&&_l(v,t.maxValue.value)||t.minValue.value&&Zi(v,t.minValue.value))}const u=v=>{var b;return!!((b=t.isDateUnavailable)!=null&&b.call(t,v))},c=k(()=>a.value.length?a.value[0].rows[0].map(v=>e.dayOfWeek(un(v),t.weekdayFormat.value)):[]),d=v=>{const b=a.value[0].value;if(!v&&!t.nextPage.value){const S=b.add({months:t.pagedNavigation.value?t.numberOfMonths.value:1}),E=ma({dateObj:S,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value});a.value=E,t.placeholder.value=E[0].value.set({day:1});return}const x=Fk(b,v||t.nextPage.value),w=ma({dateObj:x,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value});a.value=w;const $={};if(!v){const S=w[0].value.compare(b);S>=or(b)&&($.day=1),S>=365&&($.month=1)}t.placeholder.value=w[0].value.set({...$})},f=v=>{const b=a.value[0].value;if(!v&&!t.prevPage.value){const S=b.subtract({months:t.pagedNavigation.value?t.numberOfMonths.value:1}),E=ma({dateObj:S,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value});a.value=E,t.placeholder.value=E[0].value.set({day:1});return}const x=Bk(b,v||t.prevPage.value),w=ma({dateObj:x,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value});a.value=w;const $={};if(!v){const S=b.compare(w[0].value);S>=or(b)&&($.day=1),S>=365&&($.month=1)}t.placeholder.value=w[0].value.set({...$})};de(t.placeholder,v=>{r.value.some(b=>vf(b,v))||(a.value=ma({dateObj:v,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value}))}),de([t.locale,t.weekStartsOn,t.fixedWeeks,t.numberOfMonths],()=>{a.value=ma({dateObj:t.placeholder.value,weekStartsOn:t.weekStartsOn.value,locale:t.locale.value,fixedWeeks:t.fixedWeeks.value,numberOfMonths:t.numberOfMonths.value})});const p=k(()=>{if(!a.value.length)return"";if(t.locale.value!==e.getLocale()&&e.setLocale(t.locale.value),a.value.length===1){const E=a.value[0].value;return`${e.fullMonthAndYear(un(E),n.value)}`}const v=un(a.value[0].value),b=un(a.value.at(-1).value),x=e.fullMonth(v,n.value),w=e.fullMonth(b,n.value),$=e.fullYear(v,n.value),S=e.fullYear(b,n.value);return $===S?`${x} - ${w} ${S}`:`${x} ${$} - ${w} ${S}`}),m=k(()=>`${t.calendarLabel.value??"Event Date"}, ${p.value}`),g=k(()=>!(l(t.placeholder.value)||u(t.placeholder.value)||i(t.placeholder.value))),y=k(()=>{for(const v of a.value){if(t.minValue.value&&Zi(v.value,t.minValue.value))continue;const b=or(v.value),x=t.minValue.value&&Fc(t.minValue.value,v.value)?t.minValue.value.day:1;for(let w=x;w<=b;w++){const $=v.value.set({day:w});if(!(l($)||u($)))return $}}});return{isDateDisabled:l,isDateUnavailable:u,isNextButtonDisabled:s,isPrevButtonDisabled:o,grid:a,weekdays:c,visibleView:r,isOutsideVisibleView:i,formatter:e,nextPage:d,prevPage:f,headingValue:p,fullCalendarLabel:m,isPlaceholderFocusable:g,firstFocusableDate:y}}const Nk={style:{border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"}},jk={role:"heading","aria-level":"2"},[Sr,zk]=Ve("CalendarRoot");var Wk=P({__name:"CalendarRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},preventDeselect:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},calendarLabel:{type:String,required:!1},fixedWeeks:{type:Boolean,required:!1,default:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},numberOfMonths:{type:Number,required:!1,default:1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},initialFocus:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},isDateUnavailable:{type:Function,required:!1,default:void 0},dir:{type:String,required:!1},nextPage:{type:Function,required:!1},prevPage:{type:Function,required:!1},modelValue:{type:null,required:!1},multiple:{type:Boolean,required:!1,default:!1},disableDaysOutsideCurrentView:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["update:modelValue","update:placeholder"],setup(t,{emit:e}){const n=t,a=e,{disabled:r,readonly:i,initialFocus:s,pagedNavigation:o,weekdayFormat:l,fixedWeeks:u,multiple:c,minValue:d,maxValue:f,numberOfMonths:p,preventDeselect:m,isDateDisabled:g,isDateUnavailable:y,calendarLabel:v,defaultValue:b,nextPage:x,prevPage:w,dir:$,locale:S,disableDaysOutsideCurrentView:E}=He(n),{primitiveElement:A,currentElement:B}=Ln(),z=Jc(S),W=Ti($),U=k(()=>n.weekStartsOn??zg(z.value)),X=ut(n,"modelValue",a,{defaultValue:b.value,passive:n.modelValue===void 0}),N=Ng({defaultPlaceholder:n.placeholder,defaultValue:X.value,locale:n.locale}),q=ut(n,"placeholder",a,{defaultValue:n.defaultPlaceholder??N.copy(),passive:n.placeholder===void 0});function j(ie){q.value=ie.copy()}const{fullCalendarLabel:J,headingValue:Y,isDateDisabled:ne,isDateUnavailable:K,isNextButtonDisabled:ee,isPrevButtonDisabled:fe,weekdays:le,isOutsideVisibleView:pe,nextPage:he,prevPage:be,formatter:Me,grid:Te,isPlaceholderFocusable:Le,firstFocusableDate:$e}=Rk({locale:z,placeholder:q,weekStartsOn:U,fixedWeeks:u,numberOfMonths:p,minValue:d,maxValue:f,disabled:r,weekdayFormat:l,pagedNavigation:o,isDateDisabled:g.value,isDateUnavailable:y.value,calendarLabel:v,nextPage:x,prevPage:w}),{isInvalid:Fe,isDateSelected:Ue,hasSelectedDate:G,isSelectedDateDisabled:ae}=Lk({date:X,isDateDisabled:ne,isDateUnavailable:K});de(X,ie=>{if(Array.isArray(ie)&&ie.length){const De=ie.at(-1);De&&!si(q.value,De)&&j(De)}else!Array.isArray(ie)&&ie&&!si(q.value,ie)&&j(ie)});function te(ie){if(c.value){if(!X.value)X.value=[ie.copy()];else if(Array.isArray(X.value)){if(X.value.findIndex(De=>aa(De,ie))===-1)X.value=[...X.value,ie];else if(!m.value){const De=X.value.filter(it=>!aa(it,ie));if(!De.length){q.value=ie.copy(),X.value=void 0;return}X.value=De.map(it=>it.copy())}}}else{if(!X.value){X.value=ie.copy();return}!m.value&&si(X.value,ie)?(q.value=ie.copy(),X.value=void 0):X.value=ie.copy()}}return Ie(()=>{s.value&&jg(B.value)}),zk({isDateUnavailable:K,dir:W,isDateDisabled:ne,locale:z,formatter:Me,modelValue:X,placeholder:q,disabled:r,initialFocus:s,pagedNavigation:o,grid:Te,weekDays:le,weekStartsOn:U,weekdayFormat:l,fixedWeeks:u,multiple:c,numberOfMonths:p,readonly:i,preventDeselect:m,fullCalendarLabel:J,headingValue:Y,isInvalid:Fe,isDateSelected:Ue,isNextButtonDisabled:ee,isPrevButtonDisabled:fe,isOutsideVisibleView:pe,nextPage:he,prevPage:be,parentElement:B,onPlaceholderChange:j,onDateChange:te,disableDaysOutsideCurrentView:E,minValue:d,maxValue:f,isPlaceholderFocusable:Le,firstFocusableDate:$e,hasSelectedDate:G,isSelectedDateDisabled:ae}),(ie,De)=>(_(),D(h(oe),{ref_key:"primitiveElement",ref:A,as:ie.as,"as-child":ie.asChild,"aria-label":h(J),"data-readonly":h(i)?"":void 0,"data-disabled":h(r)?"":void 0,"data-invalid":h(Fe)?"":void 0,dir:h(W)},{default:C(()=>[F(ie.$slots,"default",{date:h(q),grid:h(Te),weekDays:h(le),weekStartsOn:U.value,locale:h(z),fixedWeeks:h(u),modelValue:h(X)}),T("div",Nk,[T("div",jk,Q(h(J)),1)])]),_:3},8,["as","as-child","aria-label","data-readonly","data-disabled","data-invalid","dir"]))}}),Hk=Wk,Uk=P({__name:"DatePickerCalendar",setup(t){const e=Wg();return(n,a)=>(_(),D(h(Hk),re({isDateDisabled:h(e).isDateDisabled,isDateUnavailable:h(e).isDateUnavailable,minValue:h(e).minValue.value,maxValue:h(e).maxValue.value,locale:h(e).locale.value,disabled:h(e).disabled.value,pagedNavigation:h(e).pagedNavigation.value,weekStartsOn:h(e).weekStartsOn.value,weekdayFormat:h(e).weekdayFormat.value,fixedWeeks:h(e).fixedWeeks.value,numberOfMonths:h(e).numberOfMonths.value,readonly:h(e).readonly.value,preventDeselect:h(e).preventDeselect.value,dir:h(e).dir.value},{"model-value":h(e).modelValue.value,placeholder:h(e).placeholder.value,multiple:!1,"onUpdate:modelValue":a[0]||(a[0]=r=>{r&&h(e).modelValue.value&&h(si)(r,h(e).modelValue.value)||h(e).onDateChange(r)}),"onUpdate:placeholder":a[1]||(a[1]=r=>{h(si)(r,h(e).placeholder.value)||h(e).onPlaceholderChange(r)})}),{default:C(({weekDays:r,grid:i,date:s,weekStartsOn:o,locale:l,fixedWeeks:u})=>[F(n.$slots,"default",{date:s,grid:i,weekDays:r,weekStartsOn:o,locale:l,fixedWeeks:u})]),_:3},16,["model-value","placeholder"]))}}),Yk=Uk,Kk=P({__name:"CalendarCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"td"}},setup(t){const e=Sr();return(n,a)=>{var r,i;return _(),D(h(oe),{as:n.as,"as-child":n.asChild,role:"gridcell","aria-selected":h(e).isDateSelected(n.date)?!0:void 0,"aria-disabled":h(e).isDateDisabled(n.date)||((i=(r=h(e)).isDateUnavailable)==null?void 0:i.call(r,n.date))||h(e).disableDaysOutsideCurrentView.value,"data-disabled":h(e).isDateDisabled(n.date)||h(e).disableDaysOutsideCurrentView.value?"":void 0},{default:C(()=>[F(n.$slots,"default")]),_:3},8,["as","as-child","aria-selected","aria-disabled","data-disabled"])}}}),Gk=Kk,Zk=P({__name:"DatePickerCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(Gk),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),Jk=Zk;function Hg(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}var Xk=P({__name:"CalendarCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t,n=Hg(),a=Sr(),{primitiveElement:r}=Ln(),i=k(()=>e.day.day.toLocaleString(a.locale.value)),s=k(()=>a.formatter.custom(un(e.day),{weekday:"long",month:"long",day:"numeric",year:"numeric"})),o=k(()=>{var v;return((v=a.isDateUnavailable)==null?void 0:v.call(a,e.day))??!1}),l=k(()=>D$(e.day,Vi())),u=k(()=>!Fc(e.day,e.month)),c=k(()=>a.isOutsideVisibleView(e.day)),d=k(()=>a.isDateDisabled(e.day)||a.disableDaysOutsideCurrentView.value&&u.value),f=k(()=>u.value||d.value?!1:!a.disabled.value&&a.isPlaceholderFocusable.value&&aa(e.day,a.placeholder.value)?!0:(!a.hasSelectedDate.value||a.isSelectedDateDisabled.value)&&!a.isPlaceholderFocusable.value?a.firstFocusableDate.value&&aa(e.day,a.firstFocusableDate.value):!1),p=k(()=>a.isDateSelected(e.day));function m(v){var b;a.readonly.value||a.isDateDisabled(v)||(b=a.isDateUnavailable)!=null&&b.call(a,v)||a.onDateChange(v)}function g(){d.value||m(e.day)}function y(v){if(d.value)return;v.preventDefault(),v.stopPropagation();const b=a.parentElement.value,x=7,w=a.dir.value==="rtl"?-1:1;switch(v.code){case n.ARROW_RIGHT:$(e.day,w);break;case n.ARROW_LEFT:$(e.day,-w);break;case n.ARROW_UP:$(e.day,-x);break;case n.ARROW_DOWN:$(e.day,x);break;case n.ENTER:case n.SPACE_CODE:m(e.day)}function $(S,E){const A=S.add({days:E});if(a.minValue.value&&A.compare(a.minValue.value)<0||a.maxValue.value&&A.compare(a.maxValue.value)>0)return;const B=b.querySelector(`[data-value='${A.toString()}']:not([data-outside-view])`);if(!B){if(E>0){if(a.isNextButtonDisabled())return;a.nextPage()}else{if(a.isPrevButtonDisabled())return;a.prevPage()}qe(()=>{$(S,E)});return}if(B&&B.hasAttribute("data-disabled"))return $(A,E);a.onPlaceholderChange(A),B?.focus()}}return(v,b)=>(_(),D(h(oe),{ref_key:"primitiveElement",ref:r,as:e.as,"as-child":e.asChild,role:"button","aria-label":s.value,"data-reka-calendar-cell-trigger":"","aria-disabled":d.value||o.value?!0:void 0,"data-selected":p.value?!0:void 0,"data-value":v.day.toString(),"data-disabled":d.value?"":void 0,"data-unavailable":o.value?"":void 0,"data-today":l.value?"":void 0,"data-outside-view":u.value?"":void 0,"data-outside-visible-view":c.value?"":void 0,"data-focused":f.value?"":void 0,tabindex:f.value?0:u.value||d.value?void 0:-1,onClick:g,onKeydown:[lt(y,["up","down","left","right","space","enter"]),b[0]||(b[0]=lt(ye(()=>{},["prevent"]),["enter"]))]},{default:C(()=>[F(v.$slots,"default",{dayValue:i.value,disabled:d.value,today:l.value,selected:p.value,outsideView:u.value,outsideVisibleView:c.value,unavailable:o.value},()=>[xe(Q(i.value),1)])]),_:3},8,["as","as-child","aria-label","aria-disabled","data-selected","data-value","data-disabled","data-unavailable","data-today","data-outside-view","data-outside-visible-view","data-focused","tabindex"]))}}),Qk=Xk,e2=P({__name:"DatePickerCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(Qk),Oe(Ae(e)),{default:C(r=>[F(n.$slots,"default",Oe(Ae(r)))]),_:3},16))}}),t2=e2;const n2=u1(()=>{const t=V(new Map),e=V(),n=k(()=>{for(const i of t.value.values())if(i)return!0;return!1}),a=To({scrollBody:V(!0)}),r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",e.value=void 0};return de(n,(i,s)=>{var o;if(!zt)return;if(!i){s&&r();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=(o=a.scrollBody)!=null&&o.value?typeof a.scrollBody.value=="object"?hg({padding:a.scrollBody.value.padding===!0?l:a.scrollBody.value.padding,margin:a.scrollBody.value.margin===!0?l:a.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),qe(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),t});function Xc(t){const e=Math.random().toString(36).substring(2,7),n=n2();n.value.set(e,t??!1);const a=k({get:()=>n.value.get(e)??!1,set:r=>n.value.set(e,r)});return f1(()=>{n.value.delete(e)}),a}var a2=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ha=new WeakMap,Ji=new WeakMap,Xi={},kl=0,Ug=function(t){return t&&(t.host||Ug(t.parentNode))},r2=function(t,e){return e.map(function(n){if(t.contains(n))return n;var a=Ug(n);return a&&t.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},i2=function(t,e,n,a){var r=r2(e,Array.isArray(t)?t:[t]);Xi[n]||(Xi[n]=new WeakMap);var i=Xi[n],s=[],o=new Set,l=new Set(r),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};r.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))c(f);else try{var p=f.getAttribute(a),m=p!==null&&p!=="false",g=(Ha.get(f)||0)+1,y=(i.get(f)||0)+1;Ha.set(f,g),i.set(f,y),s.push(f),g===1&&m&&Ji.set(f,!0),y===1&&f.setAttribute(n,"true"),m||f.setAttribute(a,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(e),o.clear(),kl++,function(){s.forEach(function(d){var f=Ha.get(d)-1,p=i.get(d)-1;Ha.set(d,f),i.set(d,p),f||(Ji.has(d)||d.removeAttribute(a),Ji.delete(d)),p||d.removeAttribute(n)}),kl--,kl||(Ha=new WeakMap,Ha=new WeakMap,Ji=new WeakMap,Xi={})}},s2=function(t,e,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),r=a2(t);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live], script"))),i2(a,r,n,"aria-hidden")):function(){return null}};function Qc(t){let e;de(()=>Tt(t),n=>{let a=!1;try{a=!!(n!=null&&n.closest("[popover]:not(:popover-open)"))}catch{}n&&!a?e=s2(n):e&&e()}),pn(()=>{e&&e()})}let Sl=0;function Yg(){ct(t=>{if(!zt)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Ff()),document.body.insertAdjacentElement("beforeend",e[1]??Ff()),Sl++,t(()=>{Sl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Sl--})})}function Ff(){const t=document.createElement("span");return t.setAttribute("data-reka-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}const o2=a1(()=>V([]));function l2(){const t=o2();return{add(e){const n=t.value[0];e!==n&&n?.pause(),t.value=Bf(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=Bf(t.value,e),(n=t.value[0])==null||n.resume()}}}function Bf(t,e){const n=[...t],a=n.indexOf(e);return a!==-1&&n.splice(a,1),n}const Cl="focusScope.autoFocusOnMount",Ml="focusScope.autoFocusOnUnmount",Rf={bubbles:!1,cancelable:!0};function Ls(t,{select:e=!1}={}){const n=Qe();for(const a of t)if(zn(a,{select:e}),Qe()!==n)return!0}function u2(t){const e=ed(t),n=Nf(e,t),a=Nf(e.reverse(),t);return[n,a]}function ed(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Nf(t,e){for(const n of t)if(!c2(n,{upTo:e}))return n}function c2(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function d2(t){return t instanceof HTMLInputElement&&"select"in t}function zn(t,{select:e=!1}={}){if(t&&t.focus){const n=Qe();t.focus({preventScroll:!0}),t!==n&&d2(t)&&e&&t.select()}}var f2=P({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,a=e,{currentRef:r,currentElement:i}=ce(),s=V(null),o=l2(),l=fr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ct(c=>{if(!zt)return;const d=i.value;if(!n.trapped)return;function f(y){if(l.paused||!d)return;const v=y.target;d.contains(v)?s.value=v:zn(s.value,{select:!0})}function p(y){if(l.paused||!d)return;const v=y.relatedTarget;v!==null&&(d.contains(v)||zn(s.value,{select:!0}))}function m(y){const v=s.value;v===null||!y.some(b=>b.removedNodes.length>0)||d.contains(v)||zn(d)}document.addEventListener("focusin",f),document.addEventListener("focusout",p);const g=new MutationObserver(m);d&&g.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",p),g.disconnect()})}),ct(async c=>{const d=i.value;if(await qe(),!d)return;o.add(l);const f=Qe();if(!d.contains(f)){const p=new CustomEvent(Cl,Rf);d.addEventListener(Cl,m=>a("mountAutoFocus",m)),d.dispatchEvent(p),p.defaultPrevented||(Ls(ed(d),{select:!0}),Qe()===f&&zn(d))}c(()=>{d.removeEventListener(Cl,g=>a("mountAutoFocus",g));const p=new CustomEvent(Ml,Rf),m=g=>{a("unmountAutoFocus",g)};d.addEventListener(Ml,m),d.dispatchEvent(p),setTimeout(()=>{p.defaultPrevented||zn(f??document.body,{select:!0}),d.removeEventListener(Ml,m),o.remove(l)},0)})});function u(c){if(!n.loop&&!n.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=Qe();if(d&&f){const p=c.currentTarget,[m,g]=u2(p);m&&g?!c.shiftKey&&f===g?(c.preventDefault(),n.loop&&zn(m,{select:!0})):c.shiftKey&&f===m&&(c.preventDefault(),n.loop&&zn(g,{select:!0})):f===p&&c.preventDefault()}}return(c,d)=>(_(),D(h(oe),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:C(()=>[F(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),td=f2,h2=P({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=Oi(d1(n,"trapFocus","disableOutsidePointerEvents")),{forwardRef:i}=ce(),s=Fi();return Yg(),(o,l)=>(_(),D(h(td),{"as-child":"",loop:"",trapped:o.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>a("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>a("closeAutoFocus",u))},{default:C(()=>[R(h(No),{"as-child":"","disable-outside-pointer-events":o.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=u=>a("pointerDownOutside",u)),onInteractOutside:l[1]||(l[1]=u=>a("interactOutside",u)),onEscapeKeyDown:l[2]||(l[2]=u=>a("escapeKeyDown",u)),onFocusOutside:l[3]||(l[3]=u=>a("focusOutside",u)),onDismiss:l[4]||(l[4]=u=>h(s).onOpenChange(!1))},{default:C(()=>[R(h(Lc),re(h(r),{id:h(s).contentId,ref:h(i),"data-state":h(s).open.value?"open":"closed","aria-labelledby":h(s).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:C(()=>[F(o.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Kg=h2,p2=P({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=Fi(),i=V(!1);Xc(!0);const s=tn(n,a),{forwardRef:o,currentElement:l}=ce();return Qc(l),(u,c)=>(_(),D(Kg,re(h(s),{ref:h(o),"trap-focus":h(r).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=ye(d=>{var f;a("closeAutoFocus",d),i.value||(f=h(r).triggerElement.value)==null||f.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=d=>{a("pointerDownOutside",d);const f=d.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,m=f.button===2||p;i.value=m}),onFocusOutside:c[2]||(c[2]=ye(()=>{},["prevent"]))}),{default:C(()=>[F(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),m2=p2,g2=P({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=Fi(),i=V(!1),s=V(!1),o=tn(n,a);return(l,u)=>(_(),D(Kg,re(h(o),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;a("closeAutoFocus",c),c.defaultPrevented||(i.value||(d=h(r).triggerElement.value)==null||d.focus(),c.preventDefault()),i.value=!1,s.value=!1}),onInteractOutside:u[1]||(u[1]=async c=>{var d;a("interactOutside",c),c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const f=c.target;(d=h(r).triggerElement.value)!=null&&d.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:C(()=>[F(l.$slots,"default")]),_:3},16))}}),v2=g2,y2=P({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=Fi(),i=tn(n,a),{forwardRef:s}=ce();return r.contentId||(r.contentId=Pt(void 0,"reka-popover-content")),(o,l)=>(_(),D(h(la),{present:o.forceMount||h(r).open.value},{default:C(()=>[h(r).modal.value?(_(),D(m2,re({key:0},h(i),{ref:h(s)}),{default:C(()=>[F(o.$slots,"default")]),_:3},16)):(_(),D(v2,re({key:1},h(i),{ref:h(s)}),{default:C(()=>[F(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),b2=y2,x2=P({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(jo),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),w2=x2,_2=P({__name:"DatePickerContent",props:{portal:{type:Object,required:!1},forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=k(()=>({...n,portal:void 0})),i=tn(r,a);return(s,o)=>(_(),D(h(w2),Oe(Ae(s.portal)),{default:C(()=>[R(h(b2),re({...h(i),...s.$attrs},{onOpenAutoFocus:o[0]||(o[0]=l=>{a("openAutoFocus",l),!l.defaultPrevented&&l.target&&(h(jg)(l.target),l.preventDefault())})}),{default:C(()=>[F(s.$slots,"default")]),_:3},16)]),_:3},16))}}),$2=_2,k2=P({__name:"CalendarGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"table"}},setup(t){const e=t,n=Sr(),a=k(()=>n.disabled.value?!0:void 0),r=k(()=>n.readonly.value?!0:void 0);return(i,s)=>(_(),D(h(oe),re(e,{tabindex:"-1",role:"application","aria-readonly":r.value,"aria-disabled":a.value,"data-readonly":r.value&&"","data-disabled":a.value&&""}),{default:C(()=>[F(i.$slots,"default")]),_:3},16,["aria-readonly","aria-disabled","data-readonly","data-disabled"]))}}),S2=k2,C2=P({__name:"DatePickerGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(S2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),M2=C2,D2=P({__name:"CalendarGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tbody"}},setup(t){const e=t;return(n,a)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),A2=D2,O2=P({__name:"DatePickerGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(A2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),E2=O2,T2=P({__name:"CalendarGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"thead"}},setup(t){const e=t;return(n,a)=>(_(),D(h(oe),re(e,{"aria-hidden":"true"}),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),P2=T2,I2=P({__name:"DatePickerGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(P2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),L2=I2,q2=P({__name:"CalendarGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tr"}},setup(t){const e=t;return(n,a)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),V2=q2,F2=P({__name:"DatePickerGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(V2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),jf=F2,B2=P({__name:"CalendarHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"th"}},setup(t){const e=t;return(n,a)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),R2=B2,N2=P({__name:"DatePickerHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(R2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),j2=N2,z2=P({__name:"CalendarHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t;return(n,a)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),W2=z2,H2=P({__name:"DatePickerHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(W2),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),U2=H2,Y2=P({__name:"CalendarHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t,n=Sr();return(a,r)=>(_(),D(h(oe),re(e,{"data-disabled":h(n).disabled.value?"":void 0}),{default:C(()=>[F(a.$slots,"default",{headingValue:h(n).headingValue.value},()=>[xe(Q(h(n).headingValue.value),1)])]),_:3},16,["data-disabled"]))}}),K2=Y2,G2=P({__name:"DatePickerHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(K2),Oe(Ae(e)),{default:C(({headingValue:r})=>[F(n.$slots,"default",{headingValue:r},()=>[xe(Q(r),1)])]),_:3},16))}}),Z2=G2,J2=P({__name:"CalendarNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=k(()=>a.disabled.value||a.isNextButtonDisabled(e.nextPage)),a=Sr();function r(){n.value||a.nextPage(e.nextPage)}return(i,s)=>(_(),D(h(oe),{as:e.as,"as-child":e.asChild,"aria-label":"Next page",type:e.as==="button"?"button":void 0,"aria-disabled":n.value||void 0,"data-disabled":n.value||void 0,disabled:n.value,onClick:r},{default:C(()=>[F(i.$slots,"default",{disabled:n.value},()=>[s[0]||(s[0]=xe(" Next page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),X2=J2,Q2=P({__name:"DatePickerNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(X2),Oe(Ae(e)),{default:C(r=>[F(n.$slots,"default",Oe(Ae(r)))]),_:3},16))}}),eS=Q2,tS=P({__name:"CalendarPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=k(()=>a.disabled.value||a.isPrevButtonDisabled(e.prevPage)),a=Sr();function r(){n.value||a.prevPage(e.prevPage)}return(i,s)=>(_(),D(h(oe),{"aria-label":"Previous page",as:e.as,"as-child":e.asChild,type:e.as==="button"?"button":void 0,"aria-disabled":n.value||void 0,"data-disabled":n.value||void 0,disabled:n.value,onClick:r},{default:C(()=>[F(i.$slots,"default",{disabled:n.value},()=>[s[0]||(s[0]=xe(" Prev page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),nS=tS,aS=P({__name:"DatePickerPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(nS),Oe(Ae(e)),{default:C(r=>[F(n.$slots,"default",Oe(Ae(r)))]),_:3},16))}}),rS=aS,iS=P({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=Fi(),{forwardRef:a,currentElement:r}=ce();return n.triggerId||(n.triggerId=Pt(void 0,"reka-popover-trigger")),Ie(()=>{n.triggerElement.value=r.value}),(i,s)=>(_(),D(Ne(h(n).hasCustomAnchor.value?h(oe):h(Vc)),{"as-child":""},{default:C(()=>[R(h(oe),{id:h(n).triggerId,ref:h(a),type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":h(n).open.value,"aria-controls":h(n).contentId,"data-state":h(n).open.value?"open":"closed",as:i.as,"as-child":e.asChild,onClick:h(n).onOpenToggle},{default:C(()=>[F(i.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),sS=iS,oS=P({__name:"DatePickerTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Wg();return(a,r)=>(_(),D(h(sS),re({"data-reka-date-field-segment":"trigger"},e,{disabled:h(n).disabled.value,onFocusin:r[0]||(r[0]=i=>{var s;(s=h(n).dateFieldRef.value)==null||s.setFocusedElement(i.target)})}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["disabled"]))}}),lS=oS;const uS={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cS(t,e){return _(),O("svg",uS,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.93933 9.24999L4.46966 8.71966L7.29288 5.89644C7.68341 5.50592 8.31657 5.50592 8.7071 5.89644L11.5303 8.71966L12.0607 9.24999L11 10.3107L10.4697 9.78032L7.99999 7.31065L5.53032 9.78032L4.99999 10.3107L3.93933 9.24999Z",fill:"#60646C",style:{fill:"color(display-p3 0.3760 0.3920 0.4240)","fill-opacity":"1"}},null,-1)])])}const zf={render:cS},dS=I("relative"),fS=I("flex items-center justify-center rounded border-none cursor-pointer"),hS=I("mb-3"),pS=I("flex items-center pl-3 mb-[4px]"),mS=I("flex items-center justify-start rounded bg-transparent border-none pointer-events-none text-body_base_medium flex-grow"),gS=I(["flex items-center justify-center rounded bg-transparent border-none cursor-pointer outline-none","focus:shadow-none","[&_svg]:-rotate-90"].join(" ")),vS=I(["flex items-center justify-center rounded bg-transparent border-none cursor-pointer","focus:shadow-none","[&_svg]:rotate-90"].join(" ")),yS=I("px-[14px] pt-[14px] pb-3 shadow-elevations-overlay rounded bg-white"),bS=I("border-collapse border-spacing-0"),xS=I("text-body_base_medium text-subtle py-1.5 px-2 h-8 w-8 min-w-8 max-w-8"),wS=I("w-8 h-8 p-0"),_S=I(["flex items-center justify-center text-body_base_regular py-1.5 px-2 rounded border-none cursor-pointer h-[inherit] w-[inherit]","hover:bg-brand-selected","[&[data-in-range]]:bg-brand-selected [&[data-in-range]]:rounded-none","[&[data-selected]]:bg-brand-bold-default [&[data-selected]]:text-inverse","[&[data-range-start]]:rounded","[&[data-range-end]]:rounded","[&[data-in-range][data-selected]]:bg-brand-bold-default [&[data-in-range][data-selected]]:text-inverse [&[data-in-range][data-selected]]:rounded","[&[data-today]]:bg-error-bold-default [&[data-today]]:text-inverse [&[data-today]]:text-body_base_semibold [&[data-today]]:rounded-full","[&[data-outside-range]]:text-muted","[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:hover:bg-transparent"].join(" ")),$S=I(""),kS=I(""),SS=I(""),CS=()=>({root:dS(),trigger:fS(),input:hS(),viewControl:pS(),viewTrigger:mS(),prevTrigger:gS(),nextTrigger:vS(),content:yS(),table:bS(),tableHeader:xS(),tableCell:wS(),tableCellTrigger:_S(),clearTrigger:$S(),control:kS(),positioner:SS()}),MS=P({__name:"DatePicker",props:{isDisabled:{type:Boolean},triggerLabel:{},isClearable:{type:Boolean},defaultValue:{},defaultPlaceholder:{},placeholder:{default:void 0},modelValue:{},hourCycle:{},step:{},granularity:{},hideTimeZone:{type:Boolean},maxValue:{},minValue:{},locale:{},disabled:{type:Boolean},readonly:{type:Boolean},isDateUnavailable:{},id:{},dir:{},name:{},required:{type:Boolean},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean},modal:{type:Boolean},isDateDisabled:{},pagedNavigation:{type:Boolean},weekStartsOn:{},weekdayFormat:{},fixedWeeks:{type:Boolean},numberOfMonths:{},preventDeselect:{type:Boolean},closeOnSelect:{type:Boolean}},emits:["update:open","update:modelValue","update:placeholder"],setup(t,{emit:e}){const n=t,a=e,r=tn(n,a),i=k(()=>CS());return(s,o)=>(_(),D(h(Pk),re(h(r),{class:i.value.root,disabled:n.isDisabled,"default-open":n.defaultOpen}),{default:C(()=>[T("div",{class:L(i.value.control)},[R(h(lS),{"as-child":""},{default:C(()=>[F(s.$slots,"trigger",{},()=>[R(_t,{type:"primary",size:"small",disabled:n.isDisabled,"data-testid":"date-picker-trigger"},{default:C(()=>[xe(Q(n.triggerLabel??"Select a date"),1)]),_:1},8,["disabled"])])]),_:3}),n.isClearable?(_(),O("button",{key:0,class:L(i.value.clearTrigger),onClick:o[0]||(o[0]=l=>a("update:modelValue",void 0))}," Clear ",2)):H("",!0)],2),R(h($2),{class:L(i.value.content),side:"bottom",align:"start"},{default:C(()=>[R(h(Yk),null,{default:C(({weekDays:l,grid:u})=>[R(h(U2),{class:L(i.value.viewControl)},{default:C(()=>[R(h(Z2),{class:L(i.value.viewTrigger)},null,8,["class"]),R(h(rS),{class:L(i.value.prevTrigger),"as-child":""},{default:C(()=>[R(lu,{type:"subtle",size:"small"},{prefixIcon:C(()=>[R(h(zf))]),_:1})]),_:1},8,["class"]),R(h(eS),{class:L(i.value.nextTrigger),"as-child":""},{default:C(()=>[R(lu,{type:"subtle",size:"small"},{prefixIcon:C(()=>[R(h(zf))]),_:1})]),_:1},8,["class"])]),_:1},8,["class"]),(_(!0),O(ge,null,ke(u,c=>(_(),D(h(M2),{key:c.value.toString(),class:L(i.value.table)},{default:C(()=>[R(h(L2),null,{default:C(()=>[R(h(jf),null,{default:C(()=>[(_(!0),O(ge,null,ke(l,(d,f)=>(_(),D(h(j2),{key:f,class:L(i.value.tableHeader)},{default:C(()=>[xe(Q(d),1)]),_:2},1032,["class"]))),128))]),_:2},1024)]),_:2},1024),R(h(E2),null,{default:C(()=>[(_(!0),O(ge,null,ke(c.rows,(d,f)=>(_(),D(h(jf),{key:`weekDate-${f}`},{default:C(()=>[(_(!0),O(ge,null,ke(d,p=>(_(),D(h(Jk),{key:p.toString(),date:p,class:L(i.value.tableCell)},{default:C(()=>[R(h(t2),{day:p,month:c.value,class:L(i.value.tableCellTrigger)},null,8,["day","month","class"])]),_:2},1032,["date","class"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1})]),_:1},8,["class"])]),_:3},16,["class","disabled","default-open"]))}}),[ua,DS]=Ve("DialogRoot");var AS=P({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,a=ut(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),r=V(),i=V(),{modal:s}=He(n);return DS({open:a,modal:s,openModal:()=>{a.value=!0},onOpenChange:o=>{a.value=o},onOpenToggle:()=>{a.value=!a.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:i}),(o,l)=>F(o.$slots,"default",{open:h(a),close:()=>a.value=!1})}}),OS=AS,ES=P({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;ce();const n=ua();return(a,r)=>(_(),D(h(oe),re(e,{type:a.as==="button"?"button":void 0,onClick:r[0]||(r[0]=i=>h(n).onOpenChange(!1))}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["type"]))}}),TS=ES;function PS(t){return t?"open":"closed"}function Wf(t){const e=Qe();for(const n of t)if(n===e||(n.focus(),Qe()!==e))return}var IS=P({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=ua(),{forwardRef:i,currentElement:s}=ce();return r.titleId||(r.titleId=Pt(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=Pt(void 0,"reka-dialog-description")),Ie(()=>{r.contentElement=s,Qe()!==document.body&&(r.triggerElement.value=Qe())}),(o,l)=>(_(),D(h(td),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>a("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>a("closeAutoFocus",u))},{default:C(()=>[R(h(No),re({id:h(r).contentId,ref:h(i),as:o.as,"as-child":o.asChild,"disable-outside-pointer-events":o.disableOutsidePointerEvents,role:"dialog","aria-describedby":h(r).descriptionId,"aria-labelledby":h(r).titleId,"data-state":h(PS)(h(r).open.value)},o.$attrs,{onDismiss:l[0]||(l[0]=u=>h(r).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>a("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>a("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>a("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>a("pointerDownOutside",u))}),{default:C(()=>[F(o.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Gg=IS,LS=P({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=ua(),i=Eo(a),{forwardRef:s,currentElement:o}=ce();return Qc(o),(l,u)=>(_(),D(Gg,re({...n,...h(i)},{ref:h(s),"trap-focus":h(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;c.defaultPrevented||(c.preventDefault(),(d=h(r).triggerElement.value)==null||d.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:C(()=>[F(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),qS=LS,VS=P({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=Eo(e);ce();const r=ua(),i=V(!1),s=V(!1);return(o,l)=>(_(),D(Gg,re({...n,...h(a)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{var c;u.defaultPrevented||(i.value||(c=h(r).triggerElement.value)==null||c.focus(),u.preventDefault()),i.value=!1,s.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{var c;u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const d=u.target;(c=h(r).triggerElement.value)!=null&&c.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.value&&u.preventDefault()})}),{default:C(()=>[F(o.$slots,"default")]),_:3},16))}}),FS=VS,BS=P({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,a=e,r=ua(),i=Eo(a),{forwardRef:s}=ce();return(o,l)=>(_(),D(h(la),{present:o.forceMount||h(r).open.value},{default:C(()=>[h(r).modal.value?(_(),D(qS,re({key:0,ref:h(s)},{...n,...h(i),...o.$attrs}),{default:C(()=>[F(o.$slots,"default")]),_:3},16)):(_(),D(FS,re({key:1,ref:h(s)},{...n,...h(i),...o.$attrs}),{default:C(()=>[F(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),RS=BS,NS=P({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=ua();return Xc(!0),ce(),(n,a)=>(_(),D(h(oe),{as:n.as,"as-child":n.asChild,"data-state":h(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:C(()=>[F(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),jS=NS,zS=P({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=ua(),{forwardRef:n}=ce();return(a,r)=>{var i;return(i=h(e))!=null&&i.modal.value?(_(),D(h(la),{key:0,present:a.forceMount||h(e).open.value},{default:C(()=>[R(jS,re(a.$attrs,{ref:h(n),as:a.as,"as-child":a.asChild}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):H("v-if",!0)}}}),WS=zS,HS=P({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(jo),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),US=HS,YS=P({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(t){const e=t,n=ua();return ce(),(a,r)=>(_(),D(h(oe),re(e,{id:h(n).titleId}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["id"]))}}),Dl=YS;const KS={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function GS(t,e){return _(),O("svg",KS,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.911 16.839L16.375 17.3031L17.3031 16.375L16.839 15.911L12.9281 12L16.839 8.08903L17.3031 7.62499L16.375 6.69691L15.911 7.16095L12 11.0719L8.08902 7.16095L7.62498 6.69691L6.6969 7.62499L7.16094 8.08903L11.0719 12L7.16094 15.911L6.6969 16.375L7.62498 17.3031L8.08902 16.839L12 12.9281L15.911 16.839Z",fill:"#60646C",style:{fill:"color(display-p3 0.3760 0.3920 0.4240)","fill-opacity":"1"}},null,-1)])])}const ZS={render:GS},JS={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function XS(t,e){return _(),O("svg",JS,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.48071 1.125L1.625 3.98071V8.0193L4.48071 10.875H8.5193L11.375 8.0193V3.98071L8.5193 1.125H4.48071ZM4.32538 0C4.12647 0 3.93571 0.0790177 3.79505 0.21967L0.71967 3.29505C0.579018 3.43571 0.5 3.62647 0.5 3.82538V8.17463C0.5 8.37352 0.579018 8.56433 0.719671 8.70495L3.79505 11.7803C3.93571 11.9209 4.12647 12 4.32538 12H8.67463C8.87352 12 9.06433 11.9209 9.20495 11.7803L12.2803 8.70495C12.4209 8.56433 12.5 8.37352 12.5 8.17463V3.82538C12.5 3.62647 12.4209 3.4357 12.2803 3.29505L9.20495 0.21967C9.06433 0.0790177 8.87352 0 8.67463 0H4.32538ZM7.0625 2.8125V3.375V6V6.5625H5.9375V6V3.375V2.8125H7.0625ZM6.5 9C6.91422 9 7.25 8.66422 7.25 8.25C7.25 7.83577 6.91422 7.5 6.5 7.5C6.08579 7.5 5.75 7.83577 5.75 8.25C5.75 8.66422 6.08579 9 6.5 9Z",fill:"currentColor",style:{fill:"rgba(198, 42, 47, 1)","fill-opacity":"1"}},null,-1)])])}const QS={render:XS},eC={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tC(t,e){return _(),O("svg",eC,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(126, 128, 138, 1)",style:{fill:"rgba(126, 128, 138, 1)","fill-opacity":"1"}},null,-1)])])}const nC={render:tC},aC={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rC(t,e){return _(),O("svg",aC,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(24, 121, 78, 1)",style:{fill:"rgba(24, 121, 78, 1)","fill-opacity":"1"}},null,-1)])])}const iC={render:rC},sC={width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oC(t,e){return _(),O("svg",sC,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 10.875C9.19242 10.875 11.375 8.69242 11.375 6C11.375 3.30761 9.19242 1.125 6.5 1.125C3.80761 1.125 1.625 3.30761 1.625 6C1.625 8.69242 3.80761 10.875 6.5 10.875ZM6.5 12C9.81373 12 12.5 9.31373 12.5 6C12.5 2.68629 9.81373 0 6.5 0C3.18629 0 0.5 2.68629 0.5 6C0.5 9.31373 3.18629 12 6.5 12ZM5.1875 5.25H5.75H6.31249C6.7267 5.25 7.06249 5.58579 7.06249 6V8.625V9.1875H5.93749V8.625V6.375H5.75H5.1875V5.25ZM6.5 4.5C6.91422 4.5 7.25 4.16421 7.25 3.75C7.25 3.33579 6.91422 3 6.5 3C6.08579 3 5.75 3.33579 5.75 3.75C5.75 4.16421 6.08579 4.5 6.5 4.5Z",fill:"rgba(153, 84, 58, 1)",style:{fill:"rgba(153, 84, 58, 1)","fill-opacity":"1"}},null,-1)])])}const lC={render:oC},uC=I("h-md flex gap-x-1 items-center"),cC=I("flex items-center"),dC=I("inline-flex text-xs font-regular font-inter items-center justify-center leading-sm",{variants:{type:{default:"text-muted",error:"text-error-hover",warning:"text-warning-hover",success:"text-success-hover"}},defaultVariants:{type:"default"}}),fC=P({__name:"HintMessage",props:{type:{default:"default"},text:{default:"Message under a text input"}},setup(t){const e=t,n=k(()=>{switch(e.type){case"error":return QS;case"warning":return lC;case"success":return iC;default:return nC}});return(a,r)=>(_(),O("div",{class:L(h(uC)())},[T("span",{class:L(h(cC)())},[(_(),D(Ne(n.value)))],2),T("span",{class:L(h(dC)({type:t.type}))},Q(t.text),3)],2))}}),hC={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pC(t,e){return _(),O("svg",hC,[...e[0]||(e[0]=[T("path",{d:"M6 1C5.73478 1 5.48043 1.10536 5.29289 1.29289C5.10536 1.48043 5 1.73478 5 2V3H2C1.73478 3 1.48043 3.10536 1.29289 3.29289C1.10536 3.48043 1 3.73478 1 4C1 4.26522 1.10536 4.51957 1.29289 4.70711C1.48043 4.89464 1.73478 5 2 5H3V13C3 13.5304 3.21071 14.0391 3.58579 14.4142C3.96086 14.7893 4.46957 15 5 15H11C11.5304 15 12.0391 14.7893 12.4142 14.4142C12.7893 14.0391 13 13.5304 13 13V5H14C14.2652 5 14.5196 4.89464 14.7071 4.70711C14.8946 4.51957 15 4.26522 15 4C15 3.73478 14.8946 3.48043 14.7071 3.29289C14.5196 3.10536 14.2652 3 14 3H11V2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1H6ZM7 6C7.26522 6 7.51957 6.10536 7.70711 6.29289C7.89464 6.48043 8 6.73478 8 7V11C8 11.2652 7.89464 11.5196 7.70711 11.7071C7.51957 11.8946 7.26522 12 7 12C6.73478 12 6.48043 11.8946 6.29289 11.7071C6.10536 11.5196 6 11.2652 6 11V7C6 6.73478 6.10536 6.48043 6.29289 6.29289C6.48043 6.10536 6.73478 6 7 6ZM10 6C10.2652 6 10.5196 6.10536 10.7071 6.29289C10.8946 6.48043 11 6.73478 11 7V11C11 11.2652 10.8946 11.5196 10.7071 11.7071C10.5196 11.8946 10.2652 12 10 12C9.73478 12 9.48043 11.8946 9.29289 11.7071C9.10536 11.5196 9 11.2652 9 11V7C9 6.73478 9.10536 6.48043 9.29289 6.29289C9.48043 6.10536 9.73478 6 10 6Z",fill:"currentColor"},null,-1)])])}const mC={render:pC},gC=I("flex flex-col gap-0 w-full",{variants:{disabled:{true:"opacity-50 pointer-events-none"}},defaultVariants:{disabled:!1}}),vC=I("text-body_small_medium text-normal mb-2"),yC=I(["flex flex-col items-center justify-center gap-3 p-3","rounded-lg border border-dashed border-graycool-200 bg-white","cursor-pointer transition-all duration-200 ease-in-out min-h-[200px]","hover:border-graycool-300","data-[dragging]:border-primary-default data-[dragging]:bg-primary-subtle","data-[invalid]:border-error-default data-[invalid]:bg-error-subtle"].join(" "),{variants:{variant:{default:"",error:"border-error-default"}}}),bC=I("flex flex-col items-center gap-3"),xC=I("text-body_small_regular text-subtle"),wC=I(["inline-flex items-center justify-center gap-1.5","px-4 py-2 rounded bg-brand-bold-default shadow-stroke-bordered-interactive","cursor-pointer text-body_small_medium text-white","transition-all duration-200 ease-in-out border-none","hover:bg-brand-bold-hover","disabled:opacity-50 disabled:cursor-not-allowed"].join(" ")),_C=I(["inline-flex items-center justify-center gap-1.5","px-2 py-1 rounded bg-transparent","cursor-pointer text-body_small_medium text-subtle","transition-all duration-200 ease-in-out","hover:text-normal hover:bg-hover"].join(" ")),$C=I("flex flex-col gap-2 mt-4"),kC=I(["flex items-center justify-between gap-3","px-4 py-3 rounded-lg bg-white","border border-solid border-graycool-200"].join(" ")),SC=I("flex flex-col gap-0.5 flex-1 min-w-0"),CC=I("hidden"),MC=I("w-full h-full object-cover"),DC=I("text-body_small_medium text-normal overflow-hidden text-ellipsis whitespace-nowrap"),AC=I("text-body_xsmall_regular text-subtle"),OC=I(["flex items-center justify-center w-8 h-8","rounded cursor-pointer text-subtle","transition-all duration-200 ease-in-out shrink-0","hover:text-normal hover:bg-hover"].join(" ")),EC=I("hidden"),TC=I("w-5 h-5 text-subtle"),PC=I("w-5 h-5"),IC=(t={})=>({root:gC(t),label:vC(),dropzone:yC(t),dropzoneContent:bC(),dropzoneText:xC(),trigger:wC(),clearTrigger:_C(),itemGroup:$C(),item:kC(),itemInfo:SC(),itemPreview:CC(),itemPreviewImage:MC(),itemName:DC(),itemSizeText:AC(),itemDeleteTrigger:OC(),hiddenInput:EC(),fileIcon:TC(),deleteIcon:PC()}),LC=["data-disabled"],qC=["data-dragging","data-invalid"],VC=["disabled"],FC=["disabled"],BC=["onClick"],RC=["accept","multiple","name","capture","disabled"],NC=P({__name:"FileUpload",props:{accept:{},allowDrop:{type:Boolean,default:!0},isDisabled:{type:Boolean},invalid:{type:Boolean},maxFileSize:{},maxFiles:{default:1},minFileSize:{},name:{},multiple:{type:Boolean},capture:{},directory:{type:Boolean},label:{},placeholder:{default:"Drop your files here"},triggerLabel:{default:"Open Dialog"},showDropzone:{type:Boolean,default:!0},variant:{default:"default"}},emits:["update:acceptedFiles","fileAccept","fileChange","fileReject"],setup(t,{emit:e}){const n=t,a=e,r=V([]),i=V(!1),s=V(null),o=k(()=>IC({variant:n.variant,disabled:n.isDisabled})),l=b=>{if(b===0)return"0 Bytes";const x=1024,w=["Bytes","KB","MB","GB"],$=Math.floor(Math.log(b)/Math.log(x));return parseFloat((b/Math.pow(x,$)).toFixed(1))+" "+w[$]},u=b=>!(n.maxFileSize&&b.size>n.maxFileSize||n.minFileSize&&b.size<n.minFileSize),c=b=>{const x=Array.from(b),w=[],$=[];for(const A of x)u(A)?w.push(A):$.push(A);const S=n.maxFiles??1,E=w.splice(S-r.value.length);$.push(...E),w.length>0&&(r.value=[...r.value,...w],a("update:acceptedFiles",r.value),a("fileAccept",{files:w})),$.length>0&&a("fileReject",{files:$}),a("fileChange",{acceptedFiles:r.value,rejectedFiles:$})},d=()=>{var b;n.isDisabled||(b=s.value)==null||b.click()},f=b=>{const x=b.target;x.files&&c(x.files),x.value=""},p=b=>{!n.allowDrop||n.isDisabled||(b.preventDefault(),i.value=!0)},m=b=>{!n.allowDrop||n.isDisabled||b.preventDefault()},g=b=>{!n.allowDrop||n.isDisabled||(b.preventDefault(),i.value=!1)},y=b=>{var x;!n.allowDrop||n.isDisabled||(b.preventDefault(),i.value=!1,(x=b.dataTransfer)!=null&&x.files&&c(b.dataTransfer.files))},v=b=>{r.value=r.value.filter(x=>x!==b),a("update:acceptedFiles",r.value),a("fileChange",{acceptedFiles:r.value,rejectedFiles:[]})};return(b,x)=>(_(),O("div",{class:L(o.value.root),"data-disabled":n.isDisabled||void 0,"data-testid":"atlantis-file-upload"},[n.label?(_(),O("label",{key:0,class:L(o.value.label),"data-testid":"atlantis-file-upload-label"},Q(n.label),3)):H("",!0),n.showDropzone?(_(),O("div",{key:1,class:L(o.value.dropzone),"data-dragging":i.value||void 0,"data-invalid":n.invalid||void 0,"data-testid":"atlantis-file-upload-dropzone",onDragenter:p,onDragover:m,onDragleave:g,onDrop:y,onClick:d},[F(b.$slots,"dropzone",{},()=>[T("div",{class:L(o.value.dropzoneContent)},[T("span",{class:L(o.value.dropzoneText)},Q(n.placeholder),3),T("button",{type:"button",class:L(o.value.trigger),disabled:n.isDisabled,"data-testid":"atlantis-file-upload-trigger",onClick:ye(d,["stop"])},Q(n.triggerLabel),11,VC)],2)])],42,qC)):H("",!0),n.showDropzone?H("",!0):(_(),O("button",{key:2,type:"button",class:L(o.value.trigger),disabled:n.isDisabled,"data-testid":"atlantis-file-upload-trigger",onClick:d},[F(b.$slots,"trigger",{},()=>[T("span",null,Q(n.triggerLabel),1)])],10,FC)),T("div",{class:L(o.value.itemGroup)},[(_(!0),O(ge,null,ke(r.value,w=>(_(),O("div",{key:w.name,class:L(o.value.item),"data-testid":"atlantis-file-upload-item"},[T("div",{class:L(o.value.itemInfo)},[T("span",{class:L(o.value.itemName)},Q(w.name),3),T("span",{class:L(o.value.itemSizeText)},Q(l(w.size)),3)],2),T("button",{type:"button",class:L(o.value.itemDeleteTrigger),"data-testid":"atlantis-file-upload-delete",onClick:$=>v(w)},[R(h(mC),{class:L(o.value.deleteIcon)},null,8,["class"])],10,BC)],2))),128))],2),T("input",{ref_key:"hiddenInputRef",ref:s,type:"file",accept:n.accept,multiple:n.multiple||(n.maxFiles??1)>1,name:n.name,capture:n.capture,disabled:n.isDisabled,style:{display:"none"},"data-testid":"atlantis-file-upload-input",onChange:f},null,40,RC)],10,LC))}});function Zg(t){const e=zm("",1e3);return{search:e,handleTypeaheadSearch:(n,a)=>{e.value=e.value+n;{const r=Qe(),i=a.map(c=>{var d,f;return{...c,textValue:((d=c.value)==null?void 0:d.textValue)??((f=c.ref.textContent)==null?void 0:f.trim())??""}}),s=i.find(c=>c.ref===r),o=i.map(c=>c.textValue),l=zC(o,e.value,s?.textValue),u=i.find(c=>c.textValue===l);return u&&u.ref.focus(),u?.ref}},resetTypeahead:()=>{e.value=""}}}function jC(t,e){return t.map((n,a)=>t[(e+a)%t.length])}function zC(t,e,n){const a=e.length>1&&Array.from(e).every(o=>o===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let i=jC(t,Math.max(r,0));a.length===1&&(i=i.filter(o=>o!==n));const s=i.find(o=>o.toLowerCase().startsWith(a.toLowerCase()));return s!==n?s:void 0}const WC=I("font-inter",{variants:{as:{h1:"text-heading_text_h1",h2:"text-heading_text_h2",h3:"text-heading_text_h3",h4:"text-heading_text_h4",h5:"text-heading_text_h5"}}}),HC=P({__name:"Heading",props:{as:{default:"h2"}},setup(t){const e=t,n=k(()=>WC(e));return(a,r)=>(_(),D(Ne(t.as),{class:L(n.value)},{default:C(()=>[F(a.$slots,"default")]),_:3},8,["class"]))}}),UC={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function YC(t,e){return _(),O("svg",UC,[...e[0]||(e[0]=[T("g",{"clip-path":"url(#clip0_9565_3071)"},[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 6C12 9.31373 9.31373 12 6 12C2.68629 12 0 9.31373 0 6C0 2.68629 2.68629 0 6 0C9.31373 0 12 2.68629 12 6ZM7.875 8.67053L7.47725 8.27273L6 6.7955L4.52275 8.27273L4.125 8.67053L3.3295 7.875L3.72725 7.47725L5.2045 6L3.72725 4.52275L3.3295 4.125L4.125 3.3295L4.52275 3.72725L6 5.2045L7.47725 3.72725L7.875 3.3295L8.67053 4.125L8.27273 4.52275L6.7955 6L8.27273 7.47725L8.67053 7.875L7.875 8.67053Z",fill:"currentColor","fill-opacity":"0.75",style:{fill:"currentColor","fill-opacity":"0.75"}})],-1),T("defs",null,[T("clipPath",{id:"clip0_9565_3071"},[T("rect",{width:"12",height:"12",fill:"white",style:{fill:"white","fill-opacity":"1"}})])],-1)])])}const KC={render:YC},GC=I(["flex","items-center","justify-center","w-full","h-xxl","px-1.5","py-1.5","gap-x-1.5","rounded","box-border","cursor-text","hover:bg-gray-subtlest-hover","transition-[background,border-color,color,box-shadow]","duration-normal","ease-default","text-graycool-1000","isolate","min-w-0","outline-none","relative","select-none","align-middle","border-none","text-xs","font-regular","font-inter","leading-lg","whitespace-nowrap","[hidden]:hidden","[&_:where(svg)]:text-[1.1em]","[&_:where(svg)]:w-[1.1em]","[&_:where(svg)]:h-[1.1em]"].join(" "),{variants:{variant:{default:"shadow-stroke-bordered-interactive focus-within:shadow-state-focus-primary focus:shadow-state-focus-primary",error:"shadow-state-error focus-within:shadow-state-focus-critical focus:shadow-state-focus-critical"},theme:{gray:"",white:""},state:{idle:"",disabled:["cursor-not-allowed","bg-disabled","text-subtle","shadow-none","hover:bg-disabled","focus-within:shadow-none","focus:shadow-none"].join(" ")},isBordered:{true:"",false:"shadow-none"},hasBackground:{true:"bg-gray-subtlest-default",false:"bg-transparent hover:bg-transparent focus-within:shadow-none focus:shadow-none"},hasPreInput:{true:"pl-0"},hasPostInput:{true:"pr-0"}},defaultVariants:{variant:"default",state:"idle",isBordered:!0,theme:"gray"}}),ZC=I(["h-xxl","rounded","flex-1","border-none","outline-none","p-0","min-w-0","bg-transparent","text-sm font-inter","placeholder:text-subtle"].join(" "),{variants:{state:{idle:"",disabled:"cursor-not-allowed bg-transparent text-subtle placeholder:text-subtle"}},defaultVariants:{state:"idle"}}),JC=I("flex items-center justify-center shrink-0"),XC=I("flex items-center justify-center shrink-0"),QC=I("flex items-center justify-center w-3 h-3 cursor-pointer icon-disabled hover:icon-muted"),e3=I(["flex","items-center","justify-center","h-xxl","py-1.5","px-3","gap-2","shrink-0","text-subtle","font-[Inter]","text-xs","font-regular","leading-lg"].join(" "),{variants:{theme:{gray:"bg-hover",white:"bg-default"}},defaultVariants:{theme:"gray"}}),t3=I("rounded-[4px_0_0_4px] border-r border-r-border-muted"),n3=I("rounded-[0_4px_4px_0] border-l border-l-border-muted"),bn=(t={})=>({root:GC(t),input:ZC({state:t.state}),prefix:JC(),suffix:XC(),clearIconContainer:QC(),prePostInput:e3({theme:t.theme}),preInput:t3(),postInput:n3(),shortcut:""}),a3=["placeholder","disabled","list","autofocus"],r3={key:1,id:"input-datalist"},i3=["value"],Cr=P({__name:"Input",props:{variant:{default:"default"},state:{default:"idle"},placeholder:{default:""},modelValue:{default:""},prefixText:{default:""},suffixText:{default:""},canClear:{type:Boolean,default:!1},shortcutKeys:{default:()=>[]},isAutocompleteEnable:{type:Boolean,default:!1},preInput:{default:""},postInput:{default:""},prePostInputTheme:{default:"gray"},options:{default:()=>["Alpha","Beta","Gamma","Zeta"]},isBordered:{type:Boolean,default:!0},hasBackground:{type:Boolean,default:!0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const a=t,r=V(null),i=V(a.modelValue??""),s=k(()=>a.state==="disabled"||a.disabled),o=k(()=>[bn({variant:a.variant,state:s.value?"disabled":"idle",isBordered:a.isBordered,hasPreInput:a.preInput!=="",hasPostInput:a.postInput!=="",hasBackground:a.hasBackground}).root]),l=k(()=>bn({state:s.value?"disabled":"idle"}).input),u=k(()=>[bn({variant:a.variant}).prePostInput,bn({theme:a.prePostInputTheme}).prePostInput]),c=k(()=>[...u.value,bn({variant:a.variant}).preInput]),d=k(()=>[...u.value,bn({variant:a.variant}).postInput]),f=k(()=>bn().prefix),p=k(()=>bn().suffix),m=k(()=>bn().clearIconContainer),g=()=>i.value="",y=()=>{var b;(b=r.value)==null||b.focus()};e({focus:y});const v=n;return de(i,b=>{v("update:modelValue",b)}),de(()=>a.modelValue,b=>{b!==i.value&&(i.value=b??"")}),(b,x)=>(_(),O("div",{class:L(o.value),onClick:ye(y,["stop"]),onKeydown:lt(y,["enter"])},[a.preInput?(_(),O("div",{key:0,class:L(c.value)},[T("span",null,Q(a.preInput),1)],2)):H("",!0),F(b.$slots,"prefixIcon",{},()=>[t.prefixText?(_(),O("span",{key:0,class:L(f.value)},Q(t.prefixText),3)):H("",!0)]),bc(T("input",re({ref_key:"inputRef",ref:r,role:"textbox"},b.$attrs,{placeholder:t.placeholder,disabled:s.value,list:t.isAutocompleteEnable?"input-datalist":void 0,class:l.value,"onUpdate:modelValue":x[0]||(x[0]=w=>i.value=w),autofocus:t.autofocus}),null,16,a3),[[Vm,i.value]]),t.isAutocompleteEnable?(_(),O("datalist",r3,[(_(!0),O(ge,null,ke(t.options,w=>(_(),O("option",{key:w,value:w},null,8,i3))),128))])):H("",!0),F(b.$slots,"suffixIcon",{},()=>[t.suffixText?(_(),O("span",{key:0,class:L(p.value)},Q(t.suffixText),3)):H("",!0)]),R(eo,{keys:t.shortcutKeys,type:"default"},null,8,["keys"]),t.canClear&&i.value?(_(),O("span",{key:2,class:L(m.value),onClick:ye(g,["stop"]),onKeydown:lt(g,["enter"]),"data-testid":"clear"},[R(h(KC))],34)):H("",!0),a.postInput?(_(),O("div",{key:3,class:L(d.value)},[T("span",null,Q(a.postInput),1)],2)):H("",!0)],34))}}),s3=I("inline-block text-left pl-0.5 text-graycool-900 font-inter text-xs font-semimedium leading-lg tracking-normal"),o3=I("flex items-center justify-start gap-1"),l3=I("text-red-800 text-center"),u3=I("font-regular text-xs leading-md tracking-normal"),Hf=I("text-graycoolalpha-75"),c3=["for"],nd=P({__name:"Label",props:{for:{},mandatory:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},iconTooltip:{},badgeVariant:{default:"neutral"},badgeLabel:{},description:{}},setup(t){const e=t;return(n,a)=>(_(),O("label",{class:L(h(s3)()),for:e.for},[T("span",{class:L(h(o3)())},[F(n.$slots,"default"),e.mandatory?(_(),O("span",{key:0,class:L(h(l3)())},"*",2)):H("",!0),t.iconTooltip?(_(),D(Yn,{key:1,title:t.iconTooltip},{default:C(()=>[(_(),D(Ne(t.suffixIcon&&h(Oa)),{class:L(h(Hf)())},null,8,["class"]))]),_:1},8,["title"])):(_(),D(Ne(t.suffixIcon&&h(Oa)),{key:2,class:L(h(Hf)())},null,8,["class"])),t.badgeVariant&&t.badgeLabel?(_(),D(qx,{key:3,type:"decorative",variant:t.badgeVariant},{default:C(()=>[xe(Q(e.badgeLabel),1)]),_:1},8,["variant"])):H("",!0)],2),e.description?(_(),O("span",{key:0,class:L(h(u3)())},Q(e.description),3)):H("",!0)],10,c3))}});var d3=P({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return ce(),(n,a)=>(_(),D(h(oe),re(e,{onMousedown:a[0]||(a[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),f3=d3;const h3=I("font-inter outline-none relative z-50"),p3=I("fixed inset-0 bg-blackalpha-500 z-40"),m3=I("flex flex-col w-full max-w-[350px] bg-default rounded-md outline-none shadow-elevations-overlay overflow-hidden z-[1]",{variants:{size:{small:"min-w-[22em]",large:"min-w-[39em]"}},defaultVariants:{size:"small"}}),g3=I("flex justify-between items-center p-4 w-full relative"),v3=I("text-normal font-bold text-base leading-lg tracking-tight font-inter my-0"),y3=I("text-normal font-bold text-base leading-lg tracking-tight flex items-center my-0"),b3=I(["flex items-center","[&_.separator]:mx-1 [&_.separator]:text-subtle","[&_ol]:ps-0 [&_ol]:my-0"].join(" ")),x3=I("bg-transparent border-none p-0 m-0 cursor-pointer icon-normal"),w3=I("font-inter p-4 flex flex-col gap-4 text-subtle relative"),_3=I("flex items-center p-4 w-full bg-neutral-default relative",{variants:{layout:{default:'[&[data-variant="default"]]:justify-end [&[data-variant="extra"]]:justify-between',multiAction:"justify-between"}},defaultVariants:{layout:"default"}}),$3=I("flex gap-3 relative z-[1]"),k3=(t={})=>({root:h3(),backdrop:p3(),content:m3({size:t.size}),header:g3(),title:v3(),titleNested:y3(),breadcrumbs:b3(),closeButton:x3(),body:w3(),footer:_3({layout:t.layout}),actions:$3()}),S3=["data-variant"],C3='[&_[data-testid="breadcrumb-link"]]:text-base [&_[data-testid="breadcrumb-link"]_span]:text-base',M3=P({__name:"Modal",props:{isOpen:{type:Boolean},title:{},size:{default:"small"},variant:{default:"default"},footerVariant:{default:"default"},primaryAction:{},secondaryAction:{},backAction:{},hintMessage:{},showCloseButton:{type:Boolean,default:!0},position:{default:"center"},isFooterVisible:{type:Boolean,default:!0},breadcrumbs:{}},emits:["update:isOpen","close","breadcrumbClick"],setup(t,{emit:e}){const n=t,a=e,{isOpen:r}=He(n),i=k(()=>k3({size:n.size,layout:n.backAction?"multiAction":"default"})),s=k(()=>{const m={position:"fixed",zIndex:50};switch(n.position){case"top":return{...m,top:"20px",left:"50%",transform:"translateX(-50%)"};case"right":return{...m,top:"0",right:"0",height:"100vh",display:"flex",alignItems:"center"};case"bottom":return{...m,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"left":return{...m,top:"0",left:"0",height:"100vh",display:"flex",alignItems:"center"};case"center":default:return{...m,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}}),o=()=>{a("update:isOpen",!1),a("close")},l=m=>{m||o()},u=()=>{var m;(m=n.primaryAction)!=null&&m.onClick&&n.primaryAction.onClick()},c=()=>{var m;(m=n.secondaryAction)!=null&&m.onClick?n.secondaryAction.onClick():o()},d=()=>{var m;(m=n.backAction)!=null&&m.onClick&&n.backAction.onClick()},f=(m="default",g="primary")=>g==="primary"&&m==="critical"?"critical":g==="primary"?"primary":"default",p=k(()=>f(n.footerVariant,"primary"));return(m,g)=>(_(),D(h(OS),{open:h(r),modal:!0,"onUpdate:open":l},{default:C(()=>[R(h(US),null,{default:C(()=>[R(h(WS),{class:L(i.value.backdrop),"data-testid":"modal-backdrop"},null,8,["class"]),R(h(RS),{class:L(i.value.content),style:Rt(s.value),"data-testid":"modal-content"},{default:C(()=>[T("div",{class:L(i.value.header),"data-testid":"modal-header"},[t.variant==="default"?(_(),D(h(Dl),{key:0,class:L(i.value.title),"data-testid":"modal-title"},{default:C(()=>[xe(Q(t.title),1)]),_:1},8,["class"])):t.variant==="custom"?(_(),D(h(Dl),{key:1,class:L(i.value.title),"data-testid":"modal-title"},{default:C(()=>[F(m.$slots,"title",{},()=>[xe(Q(t.title),1)])]),_:3},8,["class"])):t.variant==="nested"?(_(),D(h(Dl),{key:2,class:L(i.value.titleNested),"data-testid":"modal-title-nested"},{default:C(()=>[T("div",{class:L(i.value.breadcrumbs)},[t.breadcrumbs&&t.breadcrumbs.length?(_(),D(Jx,{key:0,items:t.breadcrumbs,onClick:g[0]||(g[0]=(y,v)=>a("breadcrumbClick",y,v)),"data-testid":"modal-breadcrumb",class:L(C3)},null,8,["items"])):H("",!0)],2)]),_:1},8,["class"])):H("",!0),t.showCloseButton?(_(),D(h(TS),{key:3,"data-testid":"modal-close-button","aria-label":"Close modal",class:L(i.value.closeButton),"as-child":""},{default:C(()=>[R(lu,{size:"small",type:"subtle",onClick:ye(o,["stop"])},{prefixIcon:C(()=>[R(h(ZS))]),_:1})]),_:1},8,["class"])):H("",!0)],2),T("div",{class:L(i.value.body),"data-testid":"modal-body"},[F(m.$slots,"default")],2),t.isFooterVisible?(_(),O("div",{key:0,class:L(i.value.footer),"data-testid":"modal-footer","data-variant":t.backAction||t.hintMessage?"extra":"default"},[t.backAction?(_(),D(_t,{key:0,type:f("default","tertiary"),size:"default",label:t.backAction.label,onClick:ye(d,["stop"]),"data-testid":"modal-back-button"},null,8,["type","label"])):t.hintMessage?(_(),D(fC,{key:1,type:t.hintMessage.type,text:t.hintMessage.text,"data-testid":"modal-hint-message"},null,8,["type","text"])):H("",!0),T("div",{class:L(i.value.actions)},[t.secondaryAction?(_(),D(_t,{key:0,type:f("default","secondary"),size:"default",label:t.secondaryAction.label,onClick:ye(c,["stop"]),"data-testid":"modal-secondary-button"},null,8,["type","label"])):H("",!0),t.primaryAction?(_(),D(_t,{key:1,type:p.value,size:"default",label:t.primaryAction.label,onClick:ye(u,["stop"]),"data-testid":"modal-primary-button"},null,8,["type","label"])):H("",!0)],2)],10,S3)):H("",!0)]),_:3},8,["class","style"])]),_:3})]),_:3},8,["open"]))}});function Su(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function Qi(t,e){let n=t;const a=e.toString(),r=a.indexOf("."),i=r>=0?a.length-r:0;if(i>0){const s=10**i;n=Math.round(n*s)/s}return n}function D3(t,e,n,a){e=Number(e),n=Number(n);const r=(t-(Number.isNaN(e)?0:e))%a;let i=Qi(Math.abs(r)*2>=a?t+Math.sign(r)*(a-Math.abs(r)):t-r,a);return Number.isNaN(e)?!Number.isNaN(n)&&i>n&&(i=Math.floor(Qi(n/a,a))*a):i<e?i=e:!Number.isNaN(n)&&i>n&&(i=e+Math.floor(Qi((n-e)/a,a))*a),i=Qi(i,a),i}let Al=new Map,Cu=!1;try{Cu=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let uo=!1;try{uo=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Jg={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let Xg=class{format(e){let n="";if(!Cu&&this.options.signDisplay!=null?n=O3(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!uo){var a;let{unit:r,unitDisplay:i="short",locale:s}=this.resolvedOptions();if(!r)return n;let o=(a=Jg[r])===null||a===void 0?void 0:a[i];n+=o[s]||o.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let a=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(n);return[...a.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Cu&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!uo&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=A3(e,n),this.options=n}};function A3(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!uo){var a;let{unit:s,unitDisplay:o="short"}=e;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((a=Jg[s])===null||a===void 0)&&a[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let r=t+(e?Object.entries(e).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if(Al.has(r))return Al.get(r);let i=new Intl.NumberFormat(t,e);return Al.set(r,i),i}function O3(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let a=!1;if(e==="always"?a=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):a=n>0),a){let r=t.format(-n),i=t.format(n),s=r.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return t.format(n)}}const E3=new RegExp("^.*\\(.*\\).*$"),T3=["latn","arab","hanidec","deva","beng","fullwide"];let Qg=class{parse(e){return Ol(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,a){return Ol(this.locale,this.options,e).isValidPartialNumber(e,n,a)}getNumberingSystem(e){return Ol(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}};const Uf=new Map;function Ol(t,e,n){let a=Yf(t,e);if(!t.includes("-nu-")&&!a.isValidPartialNumber(n)){for(let r of T3)if(r!==a.options.numberingSystem){let i=Yf(t+(t.includes("-u-")?"-nu-":"-u-nu-")+r,e);if(i.isValidPartialNumber(n))return i}}return a}function Yf(t,e){let n=t+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""),a=Uf.get(n);return a||(a=new P3(t,e),Uf.set(n,a)),a}let P3=class{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=Ua(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-",""),n=n.replace("+","");let o=n.indexOf(".");o===-1&&(o=n.length),n=n.replace(".",""),o-2===0?n=`0.${n}`:o-2===-1?n=`0.0${n}`:o-2===-2?n="0.00":n=`${n.slice(0,o-2)}.${n.slice(o-2)}`,s>-1&&(n=`-${n}`)}let a=n?+n:NaN;if(isNaN(a))return NaN;if(this.options.style==="percent"){var r,i;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)+2,20)};return new Qg(this.locale,s).parse(new Xg(this.locale,s).format(a))}return this.options.currencySign==="accounting"&&E3.test(e)&&(a=-1*a),a}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=Ua(e,".",this.symbols.group))),this.symbols.group==="’"&&e.includes("'")&&(e=Ua(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Ua(e," ",this.symbols.group),e=Ua(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,n=-1/0,a=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&a>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Ua(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,n={}){this.locale=e,n.roundingIncrement!==1&&n.roundingIncrement!=null&&(n.maximumFractionDigits==null&&n.minimumFractionDigits==null?(n.maximumFractionDigits=0,n.minimumFractionDigits=0):n.maximumFractionDigits==null?n.maximumFractionDigits=n.minimumFractionDigits:n.minimumFractionDigits==null&&(n.minimumFractionDigits=n.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=L3(e,this.formatter,this.options,n);var a,r;this.options.style==="percent"&&(((a=this.options.minimumFractionDigits)!==null&&a!==void 0?a:0)>18||((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}};const Kf=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),I3=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function L3(t,e,n,a){var r,i,s,o;let l=new Intl.NumberFormat(t,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=I3.map(A=>l.formatToParts(A));var f;let p=(f=(r=u.find(A=>A.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&f!==void 0?f:"-",m=(i=c.find(A=>A.type==="plusSign"))===null||i===void 0?void 0:i.value;!m&&(a?.signDisplay==="exceptZero"||a?.signDisplay==="always")&&(m="+");let g=(s=new Intl.NumberFormat(t,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(A=>A.type==="decimal"))===null||s===void 0?void 0:s.value,y=(o=u.find(A=>A.type==="group"))===null||o===void 0?void 0:o.value,v=u.filter(A=>!Kf.has(A.type)).map(A=>Gf(A.value)),b=d.flatMap(A=>A.filter(B=>!Kf.has(B.type)).map(B=>Gf(B.value))),x=[...new Set([...v,...b])].sort((A,B)=>B.length-A.length),w=x.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${x.join("|")}|[\\p{White_Space}]`,"gu"),$=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),S=new Map($.map((A,B)=>[A,B])),E=new RegExp(`[${$.join("")}]`,"g");return{minusSign:p,plusSign:m,decimal:g,group:y,literals:w,numeral:E,index:A=>String(S.get(A))}}function Ua(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function Gf(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ev(t){const{disabled:e}=t,n=V(),a=jm(),r=()=>window.clearTimeout(n.value),i=f=>{r(),!e.value&&(a.trigger(),n.value=window.setTimeout(()=>{i(60)},f))},s=()=>{i(400)},o=()=>{r()},l=V(!1),u=k(()=>Tt(t.target)),c=f=>{f.button!==0||l.value||(f.preventDefault(),l.value=!0,s())},d=()=>{l.value=!1,o()};return zt&&(Ca(u||window,"pointerdown",c),Ca(window,"pointerup",d),Ca(window,"pointercancel",d)),{isPressed:l,onTrigger:a.on}}function Zf(t,e=V({})){return xc(()=>new Xg(t.value,e.value))}function q3(t,e=V({})){return xc(()=>new Qg(t.value,e.value))}function Jf(t,e,n){let a=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const r=e.toString().split("."),i=n.toString().split("."),s=r[1]&&r[1].length||0,o=i[1]&&i[1].length||0,l=10**Math.max(s,o);e=Math.round(e*l),n=Math.round(n*l),a=t==="+"?e+n:e-n,a/=l}return a}const[ad,V3]=Ve("NumberFieldRoot");var F3=P({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},focusOnChange:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,{disabled:r,readonly:i,disableWheelChange:s,invertWheelChange:o,min:l,max:u,step:c,stepSnapping:d,formatOptions:f,id:p,locale:m}=He(n),g=ut(n,"modelValue",a,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{primitiveElement:y,currentElement:v}=Ln(),b=Jc(m),x=Io(v),w=V(),$=k(()=>!Pn(g.value)&&(Y(g.value)===l.value||l.value&&!isNaN(g.value)?Jf("-",g.value,c.value)<l.value:!1)),S=k(()=>!Pn(g.value)&&(Y(g.value)===u.value||u.value&&!isNaN(g.value)?Jf("+",g.value,c.value)>u.value:!1));function E(K,ee=1){var fe,le;if(n.focusOnChange&&((fe=w.value)==null||fe.focus()),n.disabled||n.readonly)return;const pe=U.parse(((le=w.value)==null?void 0:le.value)??"");isNaN(pe)?g.value=l.value??0:K==="increase"?g.value=Y(pe+(c.value??1)*ee):g.value=Y(pe-(c.value??1)*ee)}function A(K=1){E("increase",K)}function B(K=1){E("decrease",K)}function z(K){K==="min"&&l.value!==void 0?g.value=Y(l.value):K==="max"&&u.value!==void 0&&(g.value=Y(u.value))}const W=Zf(b,f),U=q3(b,f),X=k(()=>W.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),N=Zf(b,f),q=k(()=>Pn(g.value)||isNaN(g.value)?"":N.format(g.value));function j(K){return U.isValidPartialNumber(K,l.value,u.value)}function J(K){w.value&&(w.value.value=K)}function Y(K){let ee;return c.value===void 0||isNaN(c.value)||!d.value?ee=Su(K,l.value,u.value):ee=D3(K,l.value,u.value,c.value),ee=U.parse(W.format(ee)),ee}function ne(K){const ee=U.parse(K);return g.value=isNaN(ee)?void 0:Y(ee),K.length?J(q.value):J(K)}return V3({modelValue:g,handleDecrease:B,handleIncrease:A,handleMinMaxValue:z,inputMode:X,inputEl:w,onInputElement:K=>w.value=K,textValue:q,readonly:i,validate:j,applyInputValue:ne,disabled:r,disableWheelChange:s,invertWheelChange:o,max:u,min:l,isDecreaseDisabled:$,isIncreaseDisabled:S,id:p}),(K,ee)=>(_(),D(h(oe),re(K.$attrs,{ref_key:"primitiveElement",ref:y,role:"group",as:K.as,"as-child":K.asChild,"data-disabled":h(r)?"":void 0,"data-readonly":h(i)?"":void 0}),{default:C(()=>[F(K.$slots,"default",{modelValue:h(g),textValue:q.value,readonly:h(i)}),h(x)&&K.name?(_(),D(h(Sc),{key:0,type:"text",value:h(g),name:K.name,disabled:h(r),readonly:h(i),required:K.required},null,8,["value","name","disabled","readonly","required"])):H("v-if",!0)]),_:3},16,["as","as-child","data-disabled","data-readonly"]))}}),B3=F3,R3=P({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=ad(),a=k(()=>{var l;return((l=n.disabled)==null?void 0:l.value)||n.readonly.value||e.disabled||n.isDecreaseDisabled.value}),{primitiveElement:r,currentElement:i}=Ln(),{isPressed:s,onTrigger:o}=ev({target:i,disabled:a});return o(()=>{n.handleDecrease()}),(l,u)=>(_(),D(h(oe),re(e,{ref_key:"primitiveElement",ref:r,tabindex:"-1","aria-label":"Decrease",type:l.as==="button"?"button":void 0,style:{userSelect:h(s)?"none":void 0},disabled:a.value?"":void 0,"data-disabled":a.value?"":void 0,"data-pressed":h(s)?"true":void 0,onContextmenu:u[0]||(u[0]=ye(()=>{},["prevent"]))}),{default:C(()=>[F(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),N3=R3,j3=P({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=ad(),a=k(()=>{var l;return((l=n.disabled)==null?void 0:l.value)||n.readonly.value||e.disabled||n.isIncreaseDisabled.value}),{primitiveElement:r,currentElement:i}=Ln(),{isPressed:s,onTrigger:o}=ev({target:i,disabled:a});return o(()=>{n.handleIncrease()}),(l,u)=>(_(),D(h(oe),re(e,{ref_key:"primitiveElement",ref:r,tabindex:"-1","aria-label":"Increase",type:l.as==="button"?"button":void 0,style:{userSelect:h(s)?"none":void 0},disabled:a.value?"":void 0,"data-disabled":a.value?"":void 0,"data-pressed":h(s)?"true":void 0,onContextmenu:u[0]||(u[0]=ye(()=>{},["prevent"]))}),{default:C(()=>[F(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),z3=j3,W3=P({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(t){const e=t,{primitiveElement:n,currentElement:a}=Ln(),r=ad();function i(l){r.disableWheelChange.value||l.target===Qe()&&(Math.abs(l.deltaY)<=Math.abs(l.deltaX)||(l.preventDefault(),l.deltaY>0?r.invertWheelChange.value?r.handleDecrease():r.handleIncrease():l.deltaY<0&&(r.invertWheelChange.value?r.handleIncrease():r.handleDecrease())))}Ie(()=>{r.onInputElement(a.value)});const s=V(r.textValue.value);de(()=>r.textValue.value,()=>{s.value=r.textValue.value},{immediate:!0,deep:!0});function o(){requestAnimationFrame(()=>{s.value=r.textValue.value})}return(l,u)=>(_(),D(h(oe),re(e,{id:h(r).id.value,ref_key:"primitiveElement",ref:n,value:s.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:h(r).inputMode.value,disabled:h(r).disabled.value?"":void 0,"data-disabled":h(r).disabled.value?"":void 0,readonly:h(r).readonly.value?"":void 0,"data-readonly":h(r).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":h(r).modelValue.value,"aria-valuemin":h(r).min.value,"aria-valuemax":h(r).max.value,onKeydown:[u[0]||(u[0]=lt(ye(c=>h(r).handleIncrease(),["prevent"]),["up"])),u[1]||(u[1]=lt(ye(c=>h(r).handleDecrease(),["prevent"]),["down"])),u[2]||(u[2]=lt(ye(c=>h(r).handleIncrease(10),["prevent"]),["page-up"])),u[3]||(u[3]=lt(ye(c=>h(r).handleDecrease(10),["prevent"]),["page-down"])),u[4]||(u[4]=lt(ye(c=>h(r).handleMinMaxValue("min"),["prevent"]),["home"])),u[5]||(u[5]=lt(ye(c=>h(r).handleMinMaxValue("max"),["prevent"]),["end"])),u[8]||(u[8]=lt(c=>{var d;return h(r).applyInputValue((d=c.target)==null?void 0:d.value)},["enter"]))],onWheel:i,onBeforeinput:u[6]||(u[6]=c=>{const d=c.target;let f=d.value.slice(0,d.selectionStart??void 0)+(c.data??"")+d.value.slice(d.selectionEnd??void 0);h(r).validate(f)||c.preventDefault()}),onInput:u[7]||(u[7]=c=>{const d=c.target;s.value=d.value}),onChange:o,onBlur:u[9]||(u[9]=c=>{var d;return h(r).applyInputValue((d=c.target)==null?void 0:d.value)})}),{default:C(()=>[F(l.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","readonly","data-readonly","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),H3=W3;const U3=I("flex flex-col gap-1 w-full"),Y3=I("text-normal text-xs font-inter font-medium leading-lg"),K3=I(["flex items-center w-full h-xxl px-1.5 py-1.5 gap-x-1.5","rounded box-border shadow-stroke-bordered-interactive","bg-gray-subtlest-default cursor-text","transition-[background,border-color,color,box-shadow] duration-normal ease-default","hover:bg-gray-subtlest-hover","focus-within:shadow-state-focus-primary","has-[[aria-invalid=true]]:shadow-state-error","has-[[aria-invalid=true]]:focus-within:shadow-state-focus-critical","has-[:disabled]:cursor-not-allowed has-[:disabled]:bg-disabled has-[:disabled]:shadow-none","has-[:disabled]:hover:bg-disabled has-[:disabled]:focus-within:shadow-none"].join(" ")),G3=I(["flex-1 h-xxl border-none outline-none p-0 min-w-0","bg-transparent text-xs font-inter text-normal","placeholder:text-subtle","disabled:cursor-not-allowed disabled:text-subtle disabled:placeholder:text-subtle"].join(" ")),Z3=I("flex flex-col shrink-0 h-full"),J3=I(["flex items-center justify-center flex-1 cursor-pointer","icon-muted border-none bg-transparent p-0","hover:icon-normal","disabled:cursor-not-allowed disabled:icon-disabled","[&_svg]:w-3 [&_svg]:h-3"].join(" ")),X3=I(["flex items-center justify-center flex-1 cursor-pointer","icon-muted border-none bg-transparent p-0","hover:icon-normal","disabled:cursor-not-allowed disabled:icon-disabled","[&_svg]:w-3 [&_svg]:h-3"].join(" ")),Q3=I(["flex items-center justify-center cursor-ew-resize","icon-muted shrink-0","[&_svg]:w-3 [&_svg]:h-3"].join(" ")),eM=()=>({root:U3(),label:Y3(),control:K3(),input:G3(),triggerGroup:Z3(),incrementTrigger:J3(),decrementTrigger:X3(),scrubber:Q3()});const Xf=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tM=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,a)=>a?a.toUpperCase():n.toLowerCase()),nM=t=>{const e=tM(t);return e.charAt(0).toUpperCase()+e.slice(1)},aM=(...t)=>t.filter((e,n,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===n).join(" ").trim(),Qf=t=>t==="";var Lr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const rM=({name:t,iconNode:e,absoluteStrokeWidth:n,"absolute-stroke-width":a,strokeWidth:r,"stroke-width":i,size:s=Lr.width,color:o=Lr.stroke,...l},{slots:u})=>Ke("svg",{...Lr,...l,width:s,height:s,stroke:o,"stroke-width":Qf(n)||Qf(a)||n===!0||a===!0?Number(r||i||Lr["stroke-width"])*24/Number(s):r||i||Lr["stroke-width"],class:aM("lucide",l.class,...t?[`lucide-${Xf(nM(t))}-icon`,`lucide-${Xf(t)}`]:["lucide-icon"])},[...e.map(c=>Ke(...c)),...u.default?[u.default()]:[]]);const tv=(t,e)=>(n,{slots:a,attrs:r})=>Ke(rM,{...r,...n,iconNode:e,name:t},a);const iM=tv("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const sM=tv("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),oM=P({__name:"NumberInput",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},stepSnapping:{type:Boolean},focusOnChange:{type:Boolean},formatOptions:{},locale:{},disabled:{type:Boolean},readonly:{type:Boolean},disableWheelChange:{type:Boolean},invertWheelChange:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},label:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=tn(t,e),a=k(()=>eM());return(r,i)=>(_(),D(h(B3),re(h(n),{class:a.value.root}),{default:C(()=>[t.label?(_(),D(h(f3),{key:0,class:L(a.value.label)},{default:C(()=>[xe(Q(t.label),1)]),_:1},8,["class"])):H("",!0),T("div",{class:L(a.value.control)},[r.$slots.scrubber?(_(),O("div",{key:0,class:L(a.value.scrubber)},[F(r.$slots,"scrubber")],2)):H("",!0),R(h(H3),{class:L(a.value.input)},null,8,["class"]),T("div",{class:L(a.value.triggerGroup)},[R(h(z3),{class:L(a.value.incrementTrigger)},{default:C(()=>[R(h(iM))]),_:1},8,["class"]),R(h(N3),{class:L(a.value.decrementTrigger)},{default:C(()=>[R(h(sM))]),_:1},8,["class"])],2)],2)]),_:3},16,["class"]))}}),lM=I("flex flex-row items-center justify-center p-1.5 rounded gap-1 bg-neutral-hover w-fit",{variants:{size:{medium:"h-10"},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"medium",isDisabled:!1}}),uM=I("flex flex-row items-center gap-1 w-full"),cM=I(["flex","items-center","justify-center","gap-1.5","rounded","py-1","px-2","cursor-pointer","whitespace-nowrap","select-none","font-inter","text-xs","leading-lg","transition-all","duration-200","ease-in-out","text-subtle","font-medium","relative","border-none","bg-transparent","hover:text-normal","hover:bg-hover","focus:outline-none","focus:shadow-state-focus-primary","active:text-normal"].join(" "),{variants:{state:{idle:"active:text-normal",active:["text-normal","bg-default","shadow-stroke-container","hover:text-normal","hover:bg-default"].join(" "),disabled:["cursor-not-allowed","text-placeholder","hover:bg-transparent","hover:text-placeholder"].join(" ")},hasIcon:{true:"",false:""},hasShortcut:{true:"",false:""},hasDependentField:{true:"pr-2.5",false:""}},compoundVariants:[{hasIcon:!0,class:"gap-1"}],defaultVariants:{state:"idle",hasIcon:!1,hasShortcut:!1,hasDependentField:!1}}),dM=I("flex items-center justify-center w-4 h-4",{variants:{state:{idle:"icon-subtle",active:"icon-normal",disabled:"icon-placeholder"}},defaultVariants:{state:"idle"}}),fM=I("",{variants:{state:{idle:"",active:"text-subtle",disabled:"text-placeholder"}},defaultVariants:{state:"idle"}}),hM=I("absolute right-2 flex items-center justify-center"),eh=(t={})=>({root:lM({size:t.size,isDisabled:t.isDisabled}),container:uM(),item:cM({state:t.state,hasIcon:t.hasIcon,hasShortcut:t.hasShortcut,hasDependentField:t.hasDependentField}),icon:dM({state:t.state}),shortcut:fM({state:t.state}),dependentField:hM()}),pM=["id","aria-label"],mM=["id","aria-selected","aria-disabled","tabindex","onClick","onKeydown","data-state"],nv=P({__name:"Segmented",props:{id:{},options:{},modelValue:{default:""},size:{default:"medium"},isDisabled:{type:Boolean,default:!1},ariaLabel:{default:"Segmented Control"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,a=e,r=V(n.modelValue);ct(()=>{r.value=n.modelValue});const i=k(()=>eh({size:n.size,isDisabled:n.isDisabled})),s=c=>{n.isDisabled||c.isDisabled||(r.value=c.value,a("update:modelValue",c.value),a("change",c.value))},o=(c,d,f)=>{var p,m;if(n.isDisabled)return;const g=n.options.filter(v=>!v.isDisabled),y=g.findIndex(v=>v.value===d.value);switch(c.preventDefault(),c.key){case"ArrowRight":case"ArrowDown":if(y<g.length-1){const v=g[y+1];s(v),(p=document.getElementById(`segmented-item-${v.value}`))==null||p.focus()}break;case"ArrowLeft":case"ArrowUp":if(y>0){const v=g[y-1];s(v),(m=document.getElementById(`segmented-item-${v.value}`))==null||m.focus()}break;case"Enter":case" ":s(d);break}},l=c=>n.isDisabled||c.isDisabled?"disabled":c.value===r.value?"active":"idle",u=c=>{var d,f;const p=l(c);return eh({state:p,hasIcon:!!c.icon,hasShortcut:!!((d=c.shortcutKeys)!=null&&d.length)||!!((f=c.counterKey)!=null&&f.length),hasDependentField:!!c.hasDependentField,size:n.size,isDisabled:n.isDisabled||c.isDisabled})};return(c,d)=>(_(),O("div",{class:L(i.value.root),id:t.id,role:"tablist","aria-label":t.ariaLabel,"data-testid":"segmented-control"},[T("div",{class:L(i.value.container)},[(_(!0),O(ge,null,ke(t.options,(f,p)=>{var m,g;return _(),O("button",{key:f.value,type:"button",id:`segmented-item-${f.value}`,class:L(u(f).item),role:"tab","aria-selected":f.value===r.value,"aria-disabled":n.isDisabled||f.isDisabled,tabindex:f.value===r.value?0:-1,onClick:y=>s(f),onKeydown:y=>o(y,f),"data-testid":"segmented-item","data-state":f.value===r.value?"active":"idle"},[f.icon?(_(),D(Ne(f.icon),{key:0,class:L(u(f).icon)},null,8,["class"])):H("",!0),T("span",null,Q(f.label),1),(m=f?.shortcutKeys)!=null&&m.length?(_(),D(eo,{key:1,keys:f.shortcutKeys,type:"default"},null,8,["keys"])):H("",!0),(g=f?.counterKey)!=null&&g.length?(_(),D(eo,{key:2,keys:f.counterKey,type:"default"},null,8,["keys"])):H("",!0),f.hasDependentField?(_(),O("span",{key:3,class:L(u(f).dependentField)},[F(c.$slots,`dependent-field-${f.value}`)],2)):H("",!0)],42,mM)}),128))],2)],10,pM))}});var gM=P({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(t){const e=t,n=V(),a=ca();de(()=>e.value,(i,s)=>{const o=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(o,"value").set;if(i!==s&&l&&n.value){const u=new Event("change",{bubbles:!0});l.call(n.value,i),n.value.dispatchEvent(u)}});function r(i){a.onValueChange(i.target.value)}return(i,s)=>(_(),D(h(Ii),{"as-child":""},{default:C(()=>[T("select",re({ref_key:"selectElement",ref:n},e,{onInput:r}),[F(i.$slots,"default")],16)]),_:3}))}}),vM=gM;const yM=[" ","Enter","ArrowUp","ArrowDown"],bM=[" ","Enter"],Kt=10;function bi(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(a=>Mu(a,e,n)):Mu(t,e,n)}function Mu(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?t?.[n]===e?.[n]:Aa(t,e)}function xM(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const wM={key:0,value:""},[ca,av]=Ve("SelectRoot");var _M=P({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,a=e,{required:r,disabled:i,multiple:s,dir:o}=He(n),l=ut(n,"modelValue",a,{defaultValue:n.defaultValue??(s.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),u=ut(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0}),c=V(),d=V(),f=V({x:0,y:0}),p=k(()=>{var w;return s.value&&Array.isArray(l.value)?((w=l.value)==null?void 0:w.length)===0:Pn(l.value)});Rn({isProvider:!0});const m=Ti(o),g=Io(c),y=V(new Set),v=k(()=>Array.from(y.value).map(w=>w.value).join(";"));function b(w){if(s.value){const $=Array.isArray(l.value)?[...l.value]:[],S=$.findIndex(E=>Mu(E,w,n.by));S===-1?$.push(w):$.splice(S,1),l.value=[...$]}else l.value=w}function x(w){return Array.from(y.value).find($=>bi(w,$.value,n.by))}return av({triggerElement:c,onTriggerChange:w=>{c.value=w},valueElement:d,onValueElementChange:w=>{d.value=w},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:u,multiple:s,required:r,onOpenChange:w=>{u.value=w},dir:m,triggerPointerDownPosRef:f,disabled:i,isEmptyModelValue:p,optionsSet:y,onOptionAdd:w=>{const $=x(w.value);$&&y.value.delete($),y.value.add(w)},onOptionRemove:w=>{const $=x(w.value);$&&y.value.delete($)}}),(w,$)=>(_(),D(h(Mc),null,{default:C(()=>[F(w.$slots,"default",{modelValue:h(l),open:h(u)}),h(g)&&w.name?(_(),D(vM,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:h(s),required:h(r),name:w.name,autocomplete:w.autocomplete,disabled:h(i),value:h(l)},{default:C(()=>[h(Pn)(h(l))?(_(),O("option",wM)):H("v-if",!0),(_(!0),O(ge,null,ke(Array.from(y.value),S=>(_(),O("option",re({key:S.value??""},{ref_for:!0},S),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):H("v-if",!0)]),_:3}))}}),$M=_M;const[kM,SM]=Ve("SelectItemAlignedPosition");var CM=P({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(t,{emit:e}){const n=t,a=e,{getItems:r}=Rn(),i=ca(),s=Ho(),o=V(!1),l=V(!0),u=V(),{forwardRef:c,currentElement:d}=ce(),{viewport:f,selectedItem:p,selectedItemText:m,focusSelectedItem:g}=s;function y(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&f!=null&&f.value&&p!=null&&p.value&&m!=null&&m.value){const x=i.triggerElement.value.getBoundingClientRect(),w=d.value.getBoundingClientRect(),$=i.valueElement.value.getBoundingClientRect(),S=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const be=S.left-w.left,Me=$.left-be,Te=x.left-Me,Le=x.width+Te,$e=Math.max(Le,w.width),Fe=window.innerWidth-Kt,Ue=Su(Me,Kt,Math.max(Kt,Fe-$e));u.value.style.minWidth=`${Le}px`,u.value.style.left=`${Ue}px`}else{const be=w.right-S.right,Me=window.innerWidth-$.right-be,Te=window.innerWidth-x.right-Me,Le=x.width+Te,$e=Math.max(Le,w.width),Fe=window.innerWidth-Kt,Ue=Su(Me,Kt,Math.max(Kt,Fe-$e));u.value.style.minWidth=`${Le}px`,u.value.style.right=`${Ue}px`}const E=r().map(be=>be.ref),A=window.innerHeight-Kt*2,B=f.value.scrollHeight,z=window.getComputedStyle(d.value),W=Number.parseInt(z.borderTopWidth,10),U=Number.parseInt(z.paddingTop,10),X=Number.parseInt(z.borderBottomWidth,10),N=Number.parseInt(z.paddingBottom,10),q=W+U+B+N+X,j=Math.min(p.value.offsetHeight*5,q),J=window.getComputedStyle(f.value),Y=Number.parseInt(J.paddingTop,10),ne=Number.parseInt(J.paddingBottom,10),K=x.top+x.height/2-Kt,ee=A-K,fe=p.value.offsetHeight/2,le=p.value.offsetTop+fe,pe=W+U+le,he=q-pe;if(pe<=K){const be=p.value===E.at(-1);u.value.style.bottom="0px";const Me=d.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,Te=Math.max(ee,fe+(be?ne:0)+Me+X),Le=pe+Te;u.value.style.height=`${Le}px`}else{const be=p.value===E[0];u.value.style.top="0px";const Me=Math.max(K,W+f.value.offsetTop+(be?Y:0)+fe)+he;u.value.style.height=`${Me}px`,f.value.scrollTop=pe-K+f.value.offsetTop}u.value.style.margin=`${Kt}px 0`,u.value.style.minHeight=`${j}px`,u.value.style.maxHeight=`${A}px`,a("placed"),requestAnimationFrame(()=>o.value=!0)}}const v=V("");Ie(async()=>{await qe(),y(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function b(x){x&&l.value===!0&&(y(),g?.(),l.value=!1)}return b1(i.triggerElement,()=>{y()}),SM({contentWrapper:u,shouldExpandOnScrollRef:o,onScrollButtonChange:b}),(x,w)=>(_(),O("div",{ref_key:"contentWrapperElement",ref:u,style:Rt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[R(h(oe),re({ref:h(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...x.$attrs,...n}),{default:C(()=>[F(x.$slots,"default")]),_:3},16)],4))}}),MM=CM,DM=P({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:Kt},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Oi(t);return(n,a)=>(_(),D(h(Lc),re(h(e),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),AM=DM;const OM={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Ho,rv]=Ve("SelectContent");var EM=P({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,a=e,r=ca();Yg(),Xc(n.bodyLock);const{CollectionSlot:i,getItems:s}=Rn(),o=V();Qc(o);const{search:l,handleTypeaheadSearch:u}=Zg(),c=V(),d=V(),f=V(),p=V(!1),m=V(!1),g=V(!1);function y(){d.value&&o.value&&Wf([d.value,o.value])}de(p,()=>{y()});const{onOpenChange:v,triggerPointerDownPosRef:b}=r;ct(S=>{if(!o.value)return;let E={x:0,y:0};const A=z=>{var W,U;E={x:Math.abs(Math.round(z.pageX)-(((W=b.value)==null?void 0:W.x)??0)),y:Math.abs(Math.round(z.pageY)-(((U=b.value)==null?void 0:U.y)??0))}},B=z=>{var W;z.pointerType!=="touch"&&(E.x<=10&&E.y<=10?z.preventDefault():(W=o.value)!=null&&W.contains(z.target)||v(!1),document.removeEventListener("pointermove",A),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",B,{capture:!0,once:!0})),S(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",B,{capture:!0})})});function x(S){const E=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!E&&S.key.length===1&&u(S.key,s()),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let A=[...s().map(B=>B.ref)];if(["ArrowUp","End"].includes(S.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const B=S.target,z=A.indexOf(B);A=A.slice(z+1)}setTimeout(()=>Wf(A)),S.preventDefault()}}const w=k(()=>n.position==="popper"?n:{}),$=Oi(w.value);return rv({content:o,viewport:c,onViewportChange:S=>{c.value=S},itemRefCallback:(S,E,A)=>{const B=!m.value&&!A,z=bi(r.modelValue.value,E,r.by);if(r.multiple.value){if(g.value)return;(z||B)&&(d.value=S,z&&(g.value=!0))}else(z||B)&&(d.value=S);B&&(m.value=!0)},selectedItem:d,selectedItemText:f,onItemLeave:()=>{var S;(S=o.value)==null||S.focus()},itemTextRefCallback:(S,E,A)=>{const B=!m.value&&!A;(bi(r.modelValue.value,E,r.by)||B)&&(f.value=S)},focusSelectedItem:y,position:n.position,isPositioned:p,searchRef:l}),(S,E)=>(_(),D(h(i),null,{default:C(()=>[R(h(td),{"as-child":"",onMountAutoFocus:E[6]||(E[6]=ye(()=>{},["prevent"])),onUnmountAutoFocus:E[7]||(E[7]=A=>{var B;a("closeAutoFocus",A),!A.defaultPrevented&&((B=h(r).triggerElement.value)==null||B.focus({preventScroll:!0}),A.preventDefault())})},{default:C(()=>[R(h(No),{"as-child":"","disable-outside-pointer-events":S.disableOutsidePointerEvents,onFocusOutside:E[2]||(E[2]=ye(()=>{},["prevent"])),onDismiss:E[3]||(E[3]=A=>h(r).onOpenChange(!1)),onEscapeKeyDown:E[4]||(E[4]=A=>a("escapeKeyDown",A)),onPointerDownOutside:E[5]||(E[5]=A=>a("pointerDownOutside",A))},{default:C(()=>[(_(),D(Ne(S.position==="popper"?AM:MM),re({...S.$attrs,...h($)},{id:h(r).contentId,ref:A=>{if(!A)return;const B=h(Tt)(A);B!=null&&B.hasAttribute("data-reka-popper-content-wrapper")?o.value=B.firstElementChild:o.value=B},role:"listbox","data-state":h(r).open.value?"open":"closed",dir:h(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:E[0]||(E[0]=ye(()=>{},["prevent"])),onPlaced:E[1]||(E[1]=A=>p.value=!0),onKeydown:x}),{default:C(()=>[F(S.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),TM=EM,PM=P({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(t){return av(t.context),rv(OM),(e,n)=>F(e.$slots,"default")}}),IM=PM;const LM={key:1};var qM=P({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,a=tn(n,e),r=ca(),i=V();Ie(()=>{i.value=new DocumentFragment});const s=V(),o=k(()=>n.forceMount||r.open.value),l=V(o.value);return de(o,()=>{setTimeout(()=>l.value=o.value)}),(u,c)=>{var d;return o.value||l.value||(d=s.value)!=null&&d.present?(_(),D(h(la),{key:0,ref_key:"presenceRef",ref:s,present:o.value},{default:C(()=>[R(TM,Oe(Ae({...h(a),...u.$attrs})),{default:C(()=>[F(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(_(),O("div",LM,[(_(),D(dr,{to:i.value},[R(IM,{context:h(r)},{default:C(()=>[F(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):H("v-if",!0)}}}),VM=qM;const[FM,BM]=Ve("SelectGroup");var RM=P({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Pt(void 0,"reka-select-group");return BM({id:n}),(a,r)=>(_(),D(h(oe),re({role:"group"},e,{"aria-labelledby":h(n)}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),NM=RM,jM=P({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(_(),D(h(oe),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:C(()=>[F(e.$slots,"default",{},()=>[n[0]||(n[0]=xe("▼"))])]),_:3},8,["as","as-child"]))}}),zM=jM;const[iv,WM]=Ve("SelectItem");var HM=P({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,a=e,{disabled:r}=He(n),i=ca(),s=Ho(),{forwardRef:o,currentElement:l}=ce(),{CollectionItem:u}=Rn(),c=k(()=>{var w;return bi((w=i.modelValue)==null?void 0:w.value,n.value,i.by)}),d=V(!1),f=V(n.textValue??""),p=Pt(void 0,"reka-select-item-text"),m="select.select";async function g(w){if(w.defaultPrevented)return;const $={originalEvent:w,value:n.value};qc(m,y,$)}async function y(w){await qe(),a("select",w),!w.defaultPrevented&&(r.value||(i.onValueChange(n.value),i.multiple.value||i.onOpenChange(!1)))}async function v(w){var $,S;await qe(),!w.defaultPrevented&&(r.value?($=s.onItemLeave)==null||$.call(s):(S=w.currentTarget)==null||S.focus({preventScroll:!0}))}async function b(w){var $;await qe(),!w.defaultPrevented&&w.currentTarget===Qe()&&(($=s.onItemLeave)==null||$.call(s))}async function x(w){var $;await qe(),!(w.defaultPrevented||(($=s.searchRef)==null?void 0:$.value)!==""&&w.key===" ")&&(bM.includes(w.key)&&g(w),w.key===" "&&w.preventDefault())}if(n.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Ie(()=>{l.value&&s.itemRefCallback(l.value,n.value,n.disabled)}),WM({value:n.value,disabled:r,textId:p,isSelected:c,onItemTextChange:w=>{f.value=((f.value||w?.textContent)??"").trim()}}),(w,$)=>(_(),D(h(u),{value:{textValue:f.value}},{default:C(()=>[R(h(oe),{ref:h(o),role:"option","aria-labelledby":h(p),"data-highlighted":d.value?"":void 0,"aria-selected":c.value,"data-state":c.value?"checked":"unchecked","aria-disabled":h(r)||void 0,"data-disabled":h(r)?"":void 0,tabindex:h(r)?void 0:-1,as:w.as,"as-child":w.asChild,onFocus:$[0]||($[0]=S=>d.value=!0),onBlur:$[1]||($[1]=S=>d.value=!1),onPointerup:g,onPointerdown:$[2]||($[2]=S=>{S.currentTarget.focus({preventScroll:!0})}),onTouchend:$[3]||($[3]=ye(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:b,onKeydown:x},{default:C(()=>[F(w.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),UM=HM,YM=P({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=iv();return(a,r)=>h(n).isSelected.value?(_(),D(h(oe),re({key:0,"aria-hidden":"true"},e),{default:C(()=>[F(a.$slots,"default")]),_:3},16)):H("v-if",!0)}}),KM=YM,GM=P({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=ca(),a=Ho(),r=iv(),{forwardRef:i,currentElement:s}=ce(),o=k(()=>{var l,u;return{value:r.value,disabled:r.disabled.value,textContent:((l=s.value)==null?void 0:l.textContent)??((u=r.value)==null?void 0:u.toString())??""}});return Ie(()=>{s.value&&(r.onItemTextChange(s.value),a.itemTextRefCallback(s.value,r.value,r.disabled.value),n.onOptionAdd(o.value))}),pn(()=>{n.onOptionRemove(o.value)}),(l,u)=>(_(),D(h(oe),re({id:h(r).textId,ref:h(i)},{...e,...l.$attrs}),{default:C(()=>[F(l.$slots,"default")]),_:3},16,["id"]))}}),ZM=GM,JM=P({__name:"SelectLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(t){const e=t,n=FM({id:""});return(a,r)=>(_(),D(h(oe),re(e,{id:h(n).id}),{default:C(()=>[F(a.$slots,"default")]),_:3},16,["id"]))}}),XM=JM,QM=P({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,a)=>(_(),D(h(jo),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),eD=QM,tD=P({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=ca(),{forwardRef:a,currentElement:r}=ce(),i=k(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=Pt(void 0,"reka-select-content")),Ie(()=>{n.onTriggerChange(r.value)});const{getItems:s}=Rn(),{search:o,handleTypeaheadSearch:l,resetTypeahead:u}=Zg();function c(){i.value||(n.onOpenChange(!0),u())}function d(f){c(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,p)=>(_(),D(h(Vc),{"as-child":"",reference:f.reference},{default:C(()=>{var m,g,y,v;return[R(h(oe),{ref:h(a),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":h(n).contentId,"aria-expanded":h(n).open.value||!1,"aria-required":(m=h(n).required)==null?void 0:m.value,"aria-autocomplete":"none",disabled:i.value,dir:(g=h(n))==null?void 0:g.dir.value,"data-state":(y=h(n))!=null&&y.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":h(xM)((v=h(n).modelValue)==null?void 0:v.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:p[0]||(p[0]=b=>{var x;(x=b?.currentTarget)==null||x.focus()}),onPointerdown:p[1]||(p[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const x=b.target;x.hasPointerCapture(b.pointerId)&&x.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(d(b),b.preventDefault())}),onPointerup:p[2]||(p[2]=ye(b=>{b.pointerType==="touch"&&d(b)},["prevent"])),onKeydown:p[3]||(p[3]=b=>{const x=h(o)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&x&&b.key===" "||(h(l)(b.key,h(s)()),h(yM).includes(b.key)&&(c(),b.preventDefault()))})},{default:C(()=>[F(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),nD=tD,aD=P({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:a}=ce(),r=ca();Ie(()=>{r.valueElement=a});const i=k(()=>{var o;let l=[];const u=Array.from(r.optionsSet.value),c=d=>u.find(f=>bi(d,f.value,r.by));return Array.isArray(r.modelValue.value)?l=r.modelValue.value.map(d=>{var f;return((f=c(d))==null?void 0:f.textContent)??""}):l=[((o=c(r.modelValue.value))==null?void 0:o.textContent)??""],l.filter(Boolean)}),s=k(()=>i.value.length?i.value.join(", "):e.placeholder);return(o,l)=>(_(),D(h(oe),{ref:h(n),as:o.as,"as-child":o.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:e.placeholder},{default:C(()=>[F(o.$slots,"default",{selectedLabel:i.value,modelValue:h(r).modelValue.value},()=>[xe(Q(s.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),rD=aD;function iD(t){const e=To({nonce:V()});return k(()=>{var n;return t?.value||((n=e.nonce)==null?void 0:n.value)})}var sD=P({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{nonce:n}=He(e),a=iD(n),r=Ho(),i=r.position==="item-aligned"?kM():void 0,{forwardRef:s,currentElement:o}=ce();Ie(()=>{r?.onViewportChange(o.value)});const l=V(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:p}=i??{};if(f!=null&&f.value&&p!=null&&p.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const g=window.innerHeight-Kt*2,y=Number.parseFloat(p.value.style.minHeight),v=Number.parseFloat(p.value.style.height),b=Math.max(y,v);if(b<g){const x=b+m,w=Math.min(g,x),$=x-w;p.value.style.height=`${w}px`,p.value.style.bottom==="0px"&&(d.scrollTop=$>0?$:0,p.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(_(),O(ge,null,[R(h(oe),re({ref:h(s),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:C(()=>[F(c.$slots,"default")]),_:3},16),R(h(oe),{as:"style",nonce:h(a)},{default:C(()=>d[0]||(d[0]=[xe(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),oD=sD;const lD={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function uD(t,e){return _(),O("svg",lD,[...e[0]||(e[0]=[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.96966 11.0303L10.5 11.5607L11.5607 10.5L11.0303 9.96966L9.06065 7.99999L11.0303 6.03032L11.5607 5.49999L10.5 4.43933L9.96966 4.96966L7.99999 6.93933L6.03032 4.96966L5.49999 4.43933L4.43933 5.49999L4.96966 6.03032L6.93933 7.99999L4.96966 9.96966L4.43933 10.5L5.49999 11.5607L6.03032 11.0303L7.99999 9.06065L9.96966 11.0303Z",fill:"currentColor"},null,-1)])])}const cD={render:uD},dD=I("w-full h-fit flex flex-col gap-0.5"),fD=I(""),hD=I(""),pD=I("flex items-center gap-1.5 py-0.5 pl-1.5 pr-1 rounded"),mD=I(["flex-1 flex items-center gap-1.5 cursor-pointer text-normal","hover:bg-hover","focus-visible:outline-none focus-visible:shadow-state-focus-primary","aria-selected:bg-seed-100 aria-selected:hover:bg-seed-100 aria-selected:outline-none",'[&[aria-disabled="true"]]:opacity-40 [&[aria-disabled="true"]]:cursor-not-allowed [&[aria-disabled="true"]]:hover:bg-transparent [&[aria-disabled="true"]]:pointer-events-none [&[aria-disabled="true"]]:text-disabled'].join(" ")),gD=I(""),vD=I(["flex items-center justify-center",'[&[data-state="open"]]:rotate-90'].join(" ")),yD=I(""),bD=I("text-xs font-inter font-normal leading-lg tracking-normal text-normal"),xD=I(""),wD=I(["flex items-center gap-1.5 py-0.5 pl-1.5 pr-1 rounded cursor-pointer text-normal","hover:bg-hover","focus-visible:outline-none focus-visible:shadow-state-focus-primary","aria-selected:outline-none aria-selected:bg-seed-100 aria-selected:hover:bg-seed-100",'[&[aria-disabled="true"]]:opacity-40 [&[aria-disabled="true"]]:cursor-not-allowed [&[aria-disabled="true"]]:hover:bg-transparent [&[aria-disabled="true"]]:pointer-events-none [&[aria-disabled="true"]]:text-disabled'].join(" ")),_D=I("text-xs font-inter font-normal leading-lg tracking-normal text-normal"),$D=I(["flex items-center justify-center w-4 h-4 icon-normal",'[&[data-state="open"]]:rotate-90'].join(" ")),kD=I("inline-flex items-center justify-center shrink-0 icon-disabled w-3.5 h-3.5 [&_svg]:w-full [&_svg]:h-full"),SD=I("inline-flex items-center justify-center shrink-0 text-normal w-4 h-4 [&_svg]:w-full [&_svg]:h-full"),CD=I(""),MD=I(""),DD=I(""),AD=I("inline-flex items-center"),Wt=()=>({root:dD(),branchContent:fD(),treeNode:hD(),branchControl:pD(),branchControlButton:mD(),branchIndentGuide:gD(),branchIndicator:vD(),branch:yD(),branchText:bD(),branchTrigger:xD(),item:wD(),itemText:_D(),itemIndicator:$D(),info:kD(),treeNodeIcon:SD(),label:CD(),nodeProvider:MD(),tree:DD(),checkbox:AD()}),OD=["aria-level","aria-posinset","aria-setsize"],ED=P({__name:"TreeViewBranch",props:{"aria-level":{},"aria-posinset":{},"aria-setsize":{}},setup(t){const e=t,n=k(()=>Wt());return(a,r)=>(_(),O("div",{role:"treeitem","aria-level":e["aria-level"],"aria-posinset":e["aria-posinset"],"aria-setsize":e["aria-setsize"],class:L([n.value.branch]),"data-testid":"atlantis-tree-view-branch"},[F(a.$slots,"default")],10,OD))}}),TD=P({__name:"TreeViewBranchContent",setup(t){const e=k(()=>Wt());return(n,a)=>(_(),O("div",{role:"group",class:L([e.value.branchContent]),"data-testid":"atlantis-tree-view-branch-content"},[F(n.$slots,"default")],2))}}),PD=["aria-labelledby"],ID=P({__name:"TreeViewBranchControl",props:{depth:{default:0},disabled:{type:Boolean},"aria-labelledby":{}},setup(t){const e=t,n=k(()=>Wt());return(a,r)=>(_(),O("div",{"aria-labelledby":e["aria-labelledby"],class:L([n.value.branchControl]),"data-testid":"atlantis-tree-view-branch-control",style:Rt(e.depth>1?{marginLeft:`${(e.depth-1)*24}px`}:{})},[F(a.$slots,"default")],14,PD))}}),LD=P({__name:"TreeViewBranchIndentGuide",setup(t){const e=k(()=>Wt());return(n,a)=>(_(),O("div",{class:L([e.value.branchIndentGuide]),"data-testid":"atlantis-tree-view-branch-indent-guide"},[F(n.$slots,"default")],2))}}),qD=P({__name:"TreeViewBranchIndicator",setup(t){const e=k(()=>Wt());return(n,a)=>(_(),O("span",{class:L([e.value.branchIndicator]),"data-testid":"atlantis-tree-view-branch-indicator"},[F(n.$slots,"default")],2))}}),VD=["id"],FD=P({__name:"TreeViewBranchText",props:{id:{}},setup(t){const e=t,n=k(()=>Wt());return(a,r)=>(_(),O("span",{id:e.id,class:L([n.value.branchText]),"data-testid":"atlantis-tree-view-branch-text"},[F(a.$slots,"default")],10,VD))}}),BD=["aria-disabled","aria-level","aria-posinset","aria-setsize"],RD=P({__name:"TreeViewItem",props:{depth:{default:0},disabled:{type:Boolean},"aria-disabled":{type:Boolean},"aria-level":{},"aria-posinset":{},"aria-setsize":{}},emits:["click"],setup(t,{emit:e}){const n=t,a=e,r=k(()=>Wt());return(i,s)=>(_(),O("div",{role:"treeitem","aria-disabled":n["aria-disabled"],"aria-level":n["aria-level"],"aria-posinset":n["aria-posinset"],"aria-setsize":n["aria-setsize"],class:L([r.value.item]),"data-testid":"atlantis-tree-view-item",style:Rt(n.depth>1?{marginLeft:`${(n.depth-1)*24}px`}:{}),onClick:s[0]||(s[0]=o=>a("click",o))},[F(i.$slots,"default")],14,BD))}}),ND=P({__name:"TreeViewItemIndicator",setup(t){const e=k(()=>Wt());return(n,a)=>(_(),O("span",{class:L([e.value.itemIndicator]),"data-testid":"atlantis-tree-view-item-indicator"},[F(n.$slots,"default")],2))}}),jD=["id"],zD=P({__name:"TreeViewItemText",props:{id:{}},setup(t){const e=t,n=k(()=>Wt());return(a,r)=>(_(),O("span",{id:e.id,class:L([n.value.itemText]),"data-testid":"atlantis-tree-view-item-text"},[F(a.$slots,"default")],10,jD))}}),th=P({__name:"TreeViewItemCheckbox",props:{"aria-labelledby":{},disabled:{type:Boolean,default:!1},checked:{type:[Boolean,String],default:!1},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},hasLabel:{type:Boolean,default:!1},defaultValue:{},modelValue:{},value:{},id:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:["update:checked"],setup(t,{emit:e}){const n=t,a=e,r=k(()=>Wt());return(i,s)=>(_(),O("span",{class:L([r.value.checkbox])},[R(mg,{checked:n.checked,disabled:n.disabled,"aria-labelledby":n["aria-labelledby"],"onUpdate:checked":s[0]||(s[0]=o=>a("update:checked",o)),onClick:s[1]||(s[1]=ye(()=>{},["stop"]))},{default:C(()=>[F(i.$slots,"default")]),_:3},8,["checked","disabled","aria-labelledby"])],2))}}),WD=P({__name:"TreeViewItemInfo",props:{placement:{default:"top"},title:{},defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(t){const e=t,n=k(()=>Wt());return(a,r)=>(_(),O("span",null,[R(Yn,{title:e.title,placement:e.placement},{default:C(()=>[F(a.$slots,"default",{},()=>[R(h(Oa),{class:L(n.value.info)},null,8,["class"])])]),_:3},8,["title","placement"])]))}}),sv=P({__name:"TreeNode",props:{node:{},indexPath:{},selectionMode:{},selectedValue:{}},emits:["node-select"],setup(t,{emit:e}){const n=t,a=e,r=k(()=>Wt()),i=k(()=>`tree-node-text-${n.node.id}`),s=k(()=>Math.max(1,n.indexPath.length+1)),o=k(()=>{if(n.indexPath.length===0)return 1;const d=n.indexPath[n.indexPath.length-1];return Math.max(1,d+1)}),l=()=>{(!n.node.children||n.node.children.length===0)&&a("node-select",n.node.id,!0)},u=d=>{const f=[];if(d.children)for(const p of d.children)f.push(p.id),p.children&&f.push(...u(p));return f},c=k(()=>{if(n.selectionMode!=="multiple")return n.selectedValue.includes(n.node.id);const d=n.selectedValue.includes(n.node.id);if(!n.node.children||n.node.children.length===0)return d;const f=u(n.node),p=f.filter(m=>n.selectedValue.includes(m)).length;return p===0?!!d:p===f.length?!0:"indeterminate"});return(d,f)=>n.node.children&&n.node.children.length>0?(_(),D(h(ED),{key:0,"aria-level":s.value,"aria-posinset":o.value},{default:C(()=>[R(h(LD),null,{default:C(()=>[T("div",{class:L([r.value.branchControl])},[R(h(ID),{disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,depth:n.indexPath.length,"aria-labelledby":i.value,class:L(r.value.branchControlButton)},{default:C(()=>[R(h(qD),null,{default:C(()=>[R(h(Jm))]),_:1}),n.selectionMode==="multiple"?(_(),D(h(th),{key:0,checked:c.value,disabled:n.node.isDisabled,"aria-labelledby":i.value,onCheckedChange:f[0]||(f[0]=()=>a("node-select",n.node.id,!1))},null,8,["checked","disabled","aria-labelledby"])):H("",!0),n.node.icon?(_(),D(Ne(n.node.icon),{key:1,class:L([r.value.treeNodeIcon])},null,8,["class"])):H("",!0),R(h(FD),{id:i.value},{default:C(()=>[xe(Q(n.node.name),1)]),_:1},8,["id"])]),_:1},8,["disabled","aria-disabled","depth","aria-labelledby","class"])],2)]),_:1}),R(h(TD),null,{default:C(()=>[(_(!0),O(ge,null,ke(n.node.children,(p,m)=>(_(),D(sv,{key:p.id,node:p,indexPath:[...n.indexPath,m],selectedValue:n.selectedValue,selectionMode:n.selectionMode,onNodeSelect:f[1]||(f[1]=(g,y)=>a("node-select",g,y))},{default:C(()=>[F(d.$slots,"default")]),_:3},8,["node","indexPath","selectedValue","selectionMode"]))),128))]),_:3})]),_:3},8,["aria-level","aria-posinset"])):(_(),D(h(RD),{key:1,depth:n.indexPath.length,disabled:n.node.isDisabled,"aria-disabled":n.node.isDisabled,"aria-level":s.value,"aria-posinset":o.value,class:L([r.value.item]),onClick:l},{default:C(()=>{var p,m,g,y,v;return[n.selectionMode==="multiple"?(_(),D(h(th),{key:0,checked:c.value,disabled:n.node.isDisabled,"aria-labelledby":i.value,onCheckedChange:f[2]||(f[2]=()=>a("node-select",n.node.id,!0))},null,8,["checked","disabled","aria-labelledby"])):H("",!0),(p=n.node)!=null&&p.icon?(_(),D(h(ND),{key:1},{default:C(()=>[n.node.icon?(_(),D(Ne(n.node.icon),{key:0,class:L([r.value.treeNodeIcon])},null,8,["class"])):H("",!0)]),_:1})):H("",!0),R(h(zD),{id:i.value},{default:C(()=>[xe(Q(n.node.name),1)]),_:1},8,["id"]),(g=(m=n.node)==null?void 0:m.info)!=null&&g.isVisible?(_(),D(h(WD),{key:2,title:(v=(y=n.node)==null?void 0:y.info)==null?void 0:v.title},null,8,["title"])):H("",!0)]}),_:1},8,["depth","disabled","aria-disabled","aria-level","aria-posinset","class"]))}}),HD=I("w-full relative select-none align-middle border-none text-xs font-inter flex flex-col gap-2"),UD=I("flex items-center justify-center p-2 min-h-8 w-full gap-2 text-error-default"),YD=I("w-4 h-4 icon-error-default"),KD=I("flex items-center justify-center p-2 min-h-8 w-full gap-1 text-xs leading-lg font-inter text-subtle"),GD=I("flex flex-wrap gap-1.5 items-center w-full"),ZD=I("flex items-center justify-center gap-1 h-6 pl-2 rounded bg-gray-subtlest-default shadow-inner-highlighted-ring text-xs leading-lg tracking-wider text-normal font-inter font-normal"),JD=I("w-3.5 h-3.5 icon-muted"),XD=I("w-3.5 h-3.5 icon-selected"),QD=I("flex items-center justify-center w-4 h-4 p-0 border-none outline-none shadow-none cursor-pointer icon-muted rounded-sm mr-1 bg-gray-subtlest-default hover:icon-subtle hover:bg-gray-subtler-hover focus-visible:shadow-state-focus-primary"),eA=I(["rounded box-border bg-gray-subtlest-default cursor-pointer","transition-[background,border-color,color,box-shadow] duration-normal ease-default","leading-lg flex items-center outline-none","[&_svg]:w-4 [&_svg]:h-4 [&_svg]:icon-muted",'[&[data-state="open"]]:shadow-state-selected'].join(" "),{variants:{state:{idle:"",disabled:"cursor-not-allowed bg-disabled text-disabled shadow-none hover:bg-disabled"}},defaultVariants:{state:"idle"}}),tA=I(["shadow-none border-none outline-none","flex items-center rounded justify-between w-full bg-gray-subtlest-default cursor-pointer","py-1.5 px-3 min-h-8 gap-1.5","[&[data-placeholder-shown]]:text-subtle [&[data-placeholder-shown]]:text-xs [&[data-placeholder-shown]]:leading-lg [&[data-placeholder-shown]]:tracking-normal","[&[data-disabled]]:bg-disabled [&[data-disabled]]:text-disabled [&[data-disabled]]:hover:bg-disabled [&[data-disabled]]:shadow-none","[&[data-disabled]:not([data-placeholder-shown])]:text-subtle","[&:not([data-disabled])]:hover:bg-gray-subtlest-hover",'[&[data-state="open"]]:shadow-state-selected [&[data-state="open"]_[data-chevron]]:rotate-180'].join(" "),{variants:{variant:{default:"shadow-stroke-bordered-interactive focus-visible:shadow-state-focus-primary",error:"shadow-state-error focus-visible:shadow-state-focus-critical"}},defaultVariants:{variant:"default"}}),nA=I("flex-1 text-left text-xs leading-lg font-inter text-subtle whitespace-nowrap overflow-hidden text-ellipsis [&[data-placeholder]]:text-subtle"),aA=I(["flex items-center justify-center icon-muted","disabled:icon-disabled","[&_[data-chevron]]:transition-transform [&_[data-chevron]]:duration-200 [&_[data-chevron]]:ease-in-out [&_[data-chevron]]:rotate-0"].join(" ")),rA=I(["py-1.5 px-2 my-1 rounded cursor-pointer flex items-center justify-between","text-xs leading-lg font-inter","hover:bg-hover","data-[state=checked]:bg-selected data-[state=checked]:text-selected data-[state=checked]:font-medium","data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled data-[disabled]:bg-transparent data-[disabled]:hover:bg-transparent","focus:bg-hover focus:shadow-state-focus-primary","[&[data-highlighted]]:bg-hover","[&[data-focus]]:bg-hover [&[data-focus]]:shadow-state-focus-primary"].join(" ")),iA=I("px-1 py-0.5"),sA=I("mt-1 w-full rounded"),oA=I("min-w-[var(--reka-popper-anchor-width)] text-normal shadow-elevations-overlay surface-raised-default rounded max-h-[300px] overflow-y-auto p-1 outline-none z-dropdown"),lA=I("ml-auto w-3.5 h-3.5 icon-selected"),uA=I("text-subtle text-xs font-medium leading-md font-inter"),cA=I(""),Xe=(t={})=>({root:HD(),errorContainer:UD(),errorIcon:YD(),loadingContainer:KD(),pillWrapper:GD(),pill:ZD(),crossIcon:JD(),checkIcon:XD(),iconButton:QD(),control:eA({state:t.state}),trigger:tA({variant:t.variant}),valueText:nA(),indicator:aA(),item:rA(),itemGroup:iA(),positioner:sA(),content:oA(),itemIndicator:lA(),label:uA(),errorMessage:cA()}),dA=["aria-label","onClick","onKeydown"],fA={key:1},hA=["aria-label"],pA=["aria-label","aria-multiselectable"],jn=P({__name:"Select",props:{modelValue:{},variant:{default:"default"},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},errorMessage:{default:""},options:{default:()=>[]},placeholder:{default:"Select an option"},label:{default:""},multiple:{type:Boolean,default:!1},defaultOpen:{type:Boolean,default:!1},loopFocus:{type:Boolean,default:!0},composite:{type:Boolean,default:!0},typeahead:{type:Boolean,default:!0},isTree:{type:Boolean,default:!1},open:{type:Boolean},defaultValue:{},by:{},dir:{},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,a=e,r=tn(n,a),i=v=>{const b=[],x=w=>{for(const $ of w)b.push($),$.children&&x($.children)};return x(v),b},s=k(()=>n.modelValue?n.isTree?i(n.options).filter(v=>{var b;return(b=n.modelValue)==null?void 0:b.includes(v.value)}):n.options.filter(v=>{var b;return(b=n.modelValue)==null?void 0:b.includes(v.value)}):[]),o=v=>({id:v.value,name:v.label,isDisabled:v.disabled,children:v.children?v.children.map(o):void 0}),l=k(()=>n.isTree?n.options.map(o):[]),u=k(()=>({root:Xe({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).root,trigger:Xe({variant:n.variant,state:n.isDisabled||n.isLoading?"disabled":"idle"}).trigger,content:Xe().content,item:Xe().item,itemGroup:Xe().itemGroup,indicator:Xe().indicator,positioner:Xe().positioner,selectedIndicator:Xe().itemIndicator,label:Xe().label,control:Xe({variant:n.variant,state:n.isDisabled?"disabled":"idle",isMultiple:n.multiple}).control,pillWrapper:Xe().pillWrapper,pill:Xe().pill,iconButton:Xe().iconButton,crossIcon:Xe().crossIcon,checkIcon:Xe().checkIcon,loadingContainer:Xe().loadingContainer,errorMessage:Xe().errorMessage,errorContainer:Xe().errorContainer,errorIcon:Xe().errorIcon})),c=v=>{const b=(n.modelValue||[]).filter(x=>x!==v.value);a("update:modelValue",b)},d=(v,b)=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c(b))},f=v=>{const b=[];if(v.children)for(const x of v.children)b.push(x.id),b.push(...f(x));return b},p=(v,b)=>{for(const x of v){if(x.id===b)return x;if(x.children){const w=p(x.children,b);if(w)return w}}return null},m=(v,b)=>{const x=f(v);return x.length===0?!1:x.every(w=>b.includes(w))},g=(v,b)=>{const x=f(v);if(x.length===0)return!1;const w=x.filter($=>b.includes($)).length;return w>0&&w<x.length},y=(v,b)=>{if(!n.multiple||!n.isTree||l.value.length===0){if(n.multiple){const A=[...n.modelValue||[]],B=A.indexOf(v);B>-1?A.splice(B,1):A.push(v),a("update:modelValue",A)}else a("update:modelValue",[v]);return}const x=l.value,w=p(x,v);if(!w)return;const $=[...n.modelValue||[]];if($.includes(v)){const A=$.indexOf(v);A>-1&&$.splice(A,1);const B=f(w);for(const z of B){const W=$.indexOf(z);W>-1&&$.splice(W,1)}}else{$.includes(v)||$.push(v);const A=f(w);for(const B of A)$.includes(B)||$.push(B)}const S=[...$],E=A=>{for(const B of A)if(B.children&&B.children.length>0){E(B.children);const z=m(B,S),W=g(B,S);if(z)S.includes(B.id)||S.push(B.id);else if(!W){const U=S.indexOf(B.id);U>-1&&S.splice(U,1)}}};E(x),a("update:modelValue",S)};return(v,b)=>(_(),D(h($M),re(h(r),{class:u.value.root,disabled:n.isDisabled,defaultOpen:n.defaultOpen}),{default:C(()=>[n.label?(_(),D(h(XM),{key:0,class:L(u.value.label),"data-testid":"select-label",id:"select-label"},{default:C(()=>[xe(Q(n.label),1)]),_:1},8,["class"])):H("",!0),T("div",{class:L(u.value.control)},[R(h(nD),{class:L(u.value.trigger),"data-testid":"select-input","aria-labelledby":n.label?"select-label":void 0,"aria-expanded":n.defaultOpen,role:"combobox","aria-haspopup":n.isTree?"tree":"listbox","aria-invalid":n.variant==="error","aria-errormessage":n.errorMessage?"select-error":void 0},{default:C(()=>[n.multiple&&s.value.length?(_(),O("div",{key:0,class:L(u.value.pillWrapper)},[(_(!0),O(ge,null,ke(s.value,x=>(_(),O("div",{key:x.value,class:L(u.value.pill)},[T("span",null,Q(x.label),1),T("button",{type:"button",class:L(u.value.iconButton),"aria-label":"Remove "+x.label,onClick:ye(w=>c(x),["stop"]),onKeydown:w=>d(w,x)},[R(h(cD),{class:L(u.value.crossIcon)},null,8,["class"])],42,dA)],2))),128))],2)):n.isTree&&!n.multiple&&s.value.length?(_(),O("span",fA,Q(s.value[0].label),1)):(_(),D(h(rD),{key:2,placeholder:t.placeholder},null,8,["placeholder"])),R(h(zM),{class:L(u.value.indicator)},{default:C(()=>[R(h(Km),{"data-chevron":""})]),_:1},8,["class"])]),_:1},8,["class","aria-labelledby","aria-expanded","aria-haspopup","aria-invalid","aria-errormessage"])],2),R(h(eD),null,{default:C(()=>[R(h(VM),{class:L([u.value.positioner,u.value.content]),role:n.isTree?void 0:"listbox",position:"popper"},{default:C(()=>[R(h(oD),null,{default:C(()=>[n.isLoading?(_(),O("div",{key:0,class:L(u.value.loadingContainer)},[F(v.$slots,"loading",{},()=>[R(Zm,{size:"sm"}),b[0]||(b[0]=T("span",null,"Loading...",-1))])],2)):n.variant==="error"&&n.errorMessage?(_(),O("div",{key:1,class:L(u.value.errorContainer),id:"select-error",role:"alert"},[F(v.$slots,"error-content",{},()=>[R(h(Bx),{class:L(u.value.errorIcon)},null,8,["class"]),T("span",null,Q(n.errorMessage),1)])],2)):n.isTree&&l.value.length>0?(_(),O("div",{key:2,class:L(u.value.itemGroup),role:"group","aria-label":n.label?`${n.label} tree options`:"Select options"},[T("div",{role:"tree","aria-label":n.label?`${n.label} tree`:"Options tree","aria-multiselectable":n.multiple},[(_(!0),O(ge,null,ke(l.value,(x,w)=>(_(),D(sv,{key:x.id,node:x,indexPath:[w],selectionMode:n.multiple?"multiple":"single",selectedValue:n.modelValue||[],onNodeSelect:y},null,8,["node","indexPath","selectionMode","selectedValue"]))),128))],8,pA)],10,hA)):(_(),D(h(NM),{key:3,class:L(u.value.itemGroup)},{default:C(()=>[(_(!0),O(ge,null,ke(n.options,x=>(_(),D(h(UM),{key:x.value,value:x.value,class:L(u.value.item),disabled:x.disabled,"data-testid":"select-option-"+x.value,role:"option","aria-selected":(n.modelValue||[]).includes(x.value),"aria-disabled":x.disabled},{default:C(()=>[R(h(ZM),null,{default:C(()=>[xe(Q(x.label),1)]),_:2},1024),R(h(KM),{class:L(u.value.selectedIndicator),"aria-hidden":"true"},{default:C(()=>[R(h(Qm),{class:L(u.value.checkIcon)},null,8,["class"])]),_:1},8,["class"])]),_:2},1032,["value","class","disabled","data-testid","aria-selected","aria-disabled"]))),128))]),_:1},8,["class"]))]),_:3})]),_:3},8,["class","role"])]),_:3})]),_:3},16,["class","disabled","defaultOpen"]))}});function mA(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}mA();const gA={"aria-live":"polite","aria-atomic":"true",role:"status",style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},[ov,vA]=Ve("StepperRoot");var yA=P({__name:"StepperRoot",props:{defaultValue:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},modelValue:{type:Number,required:!1},linear:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const a=t,r=n,{dir:i,orientation:s,linear:o}=He(a),l=Ti(i),u=V(new Set),c=ut(a,"modelValue",r,{defaultValue:a.defaultValue,passive:a.modelValue===void 0}),d=k(()=>Array.from(u.value)),f=k(()=>c.value===1),p=k(()=>c.value===d.value.length),m=k(()=>u.value.size);function g(A){A>m.value||A<1||u.value.size&&d.value[A]&&d.value[A].getAttribute("disabled")||o.value&&A>(c.value??1)+1||(c.value=A)}function y(){g((c.value??1)+1)}function v(){g((c.value??1)-1)}function b(){return(c.value??1)<m.value}function x(){return(c.value??1)>1}const w=V(null),$=V(null),S=k(()=>w.value?w.value.getAttribute("disabled")==="":!0),E=k(()=>$.value?$.value.getAttribute("disabled")==="":!0);return de(c,async()=>{await qe(()=>{w.value=d.value.length&&c.value<d.value.length?d.value[c.value]:null,$.value=d.value.length&&c.value>1?d.value[c.value-2]:null})}),de(d,async()=>{await qe(()=>{w.value=d.value.length&&c.value<d.value.length?d.value[c.value]:null,$.value=d.value.length&&c.value>1?d.value[c.value-2]:null})}),vA({modelValue:c,changeModelValue:A=>{c.value=A},orientation:s,dir:l,linear:o,totalStepperItems:u}),e({goToStep:g,nextStep:y,prevStep:v,modelValue:c,totalSteps:m,isNextDisabled:S,isPrevDisabled:E,isFirstStep:f,isLastStep:p,hasNext:b,hasPrev:x}),ce(),(A,B)=>(_(),D(h(oe),{role:"group","aria-label":"progress",as:A.as,"as-child":A.asChild,"data-linear":h(o)?"":void 0,"data-orientation":A.orientation},{default:C(()=>[F(A.$slots,"default",{modelValue:h(c),totalSteps:u.value.size,isNextDisabled:S.value,isPrevDisabled:E.value,isFirstStep:f.value,isLastStep:p.value,goToStep:g,nextStep:y,prevStep:v,hasNext:b,hasPrev:x}),T("div",gA," Step "+Q(h(c))+" of "+Q(u.value.size),1)]),_:3},8,["as","as-child","data-linear","data-orientation"]))}}),bA=yA;const[lv,xA]=Ve("StepperItem");var wA=P({__name:"StepperItem",props:{step:{type:Number,required:!0},disabled:{type:Boolean,required:!1,default:!1},completed:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{disabled:n,step:a,completed:r}=He(e),{forwardRef:i}=ce(),s=ov(),o=Pt(void 0,"reka-stepper-item-title"),l=Pt(void 0,"reka-stepper-item-description"),u=k(()=>r.value?"completed":s.modelValue.value===a.value?"active":s.modelValue.value>a.value?"completed":"inactive"),c=k(()=>n.value?!1:s.linear.value?a.value<=s.modelValue.value||a.value===s.modelValue.value+1:!0);return xA({titleId:o,descriptionId:l,state:u,disabled:n,step:a,isFocusable:c}),(d,f)=>(_(),D(h(oe),{ref:h(i),as:d.as,"as-child":d.asChild,"aria-current":u.value==="active"?"true":void 0,"data-state":u.value,disabled:h(n)||!c.value?"":void 0,"data-disabled":h(n)||!c.value?"":void 0,"data-orientation":h(s).orientation.value},{default:C(()=>[F(d.$slots,"default",{state:u.value})]),_:3},8,["as","as-child","aria-current","data-state","disabled","data-disabled","data-orientation"]))}}),_A=wA;const Ja={Default:"default",Alt:"alt"},Xa={Horizontal:"horizontal",Vertical:"vertical"};var $A=P({__name:"StepperIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=lv();return ce(),(a,r)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(a.$slots,"default",{step:h(n).step.value},()=>[xe(" Step "+Q(h(n).step.value),1)])]),_:3},16))}}),kA=$A,SA=P({__name:"StepperTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=ov(),n=lv(),a=Hg(),r=k(()=>Array.from(e.totalStepperItems.value));function i(u){if(!n.disabled.value){if(e.linear.value){if((n.step.value<=e.modelValue.value||n.step.value===e.modelValue.value+1)&&u.ctrlKey===!1){e.changeModelValue(n.step.value);return}}else if(u.ctrlKey===!1){e.changeModelValue(n.step.value);return}u.preventDefault()}}function s(u){u.preventDefault(),!n.disabled.value&&((u.key===a.ENTER||u.key===a.SPACE)&&!u.ctrlKey&&!u.shiftKey&&e.changeModelValue(n.step.value),[a.ARROW_LEFT,a.ARROW_RIGHT,a.ARROW_UP,a.ARROW_DOWN].includes(u.key)&&Rm(u,Qe(),void 0,{itemsArray:r.value,focus:!0,loop:!1,arrowKeyOptions:e.orientation.value,dir:e.dir.value}))}const{forwardRef:o,currentElement:l}=ce();return Ie(()=>{e.totalStepperItems.value.add(l.value)}),pn(()=>{e.totalStepperItems.value.delete(l.value)}),(u,c)=>(_(),D(h(oe),{ref:h(o),type:u.as==="button"?"button":void 0,as:u.as,"as-child":u.asChild,"data-state":h(n).state.value,disabled:h(n).disabled.value||!h(n).isFocusable.value?"":void 0,"data-disabled":h(n).disabled.value||!h(n).isFocusable.value?"":void 0,"data-orientation":h(e).orientation.value,tabindex:h(n).isFocusable.value?0:-1,"aria-describedby":h(n).descriptionId,"aria-labelledby":h(n).titleId,onMousedown:ye(i,["left"]),onKeydown:lt(s,["enter","space","left","right","up","down"])},{default:C(()=>[F(u.$slots,"default")]),_:3},8,["type","as","as-child","data-state","disabled","data-disabled","data-orientation","tabindex","aria-describedby","aria-labelledby"]))}}),CA=SA;const MA={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function DA(t,e){return _(),O("svg",MA,[...e[0]||(e[0]=[T("circle",{cx:"12",cy:"11.9999",r:"10",fill:"#E6EDFE",style:{fill:"color(display-p3 0.9036 0.9299 0.9965)","fill-opacity":"1"}},null,-1),T("path",{d:"M16 9L10.5 14.5L8 12",stroke:"#3E63DD",style:{stroke:"color(display-p3 0.2435 0.3889 0.8665)","stroke-opacity":"1"},"stroke-width":"1.125","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const AA={render:DA},OA={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function EA(t,e){return _(),O("svg",OA,[...e[0]||(e[0]=[T("circle",{cx:"10",cy:"9.99994",r:"7",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}},null,-1),T("path",{d:"M13.3332 7.5L8.74984 12.0833L6.6665 10",stroke:"#F9FAFA",style:{stroke:"color(display-p3 0.9765 0.9804 0.9804)","stroke-opacity":"1"},"stroke-width":"0.9375","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const TA={render:EA},PA={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IA(t,e){return _(),O("svg",PA,[...e[0]||(e[0]=[T("g",{id:"State=Upcoming, Size=Small"},[T("circle",{id:"Ellipse 22",cx:"9.99997",cy:"9.99995",r:"6.5",transform:"rotate(-15 9.99997 9.99995)",stroke:"#60646C",style:{stroke:"color(display-p3 0.3760 0.3920 0.4240)","stroke-opacity":"1"},"stroke-dasharray":"2 2"})],-1)])])}const LA={render:IA},qA={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VA(t,e){return _(),O("svg",qA,[...e[0]||(e[0]=[T("g",{id:"State=Ongoing, Size=Small"},[T("circle",{id:"Ellipse 21",cx:"9.99997",cy:"9.99994",r:"6.5",transform:"rotate(-15 9.99997 9.99994)",stroke:"#3A5CCC",style:{stroke:"color(display-p3 0.2276 0.3608 0.7984)","stroke-opacity":"1"},"stroke-dasharray":"2 2"}),T("path",{id:"Ellipse 22",d:"M10 16.9999C8.14348 16.9999 6.36301 16.2624 5.05025 14.9497C3.7375 13.6369 3 11.8565 3 9.99994C3 8.14342 3.7375 6.36295 5.05025 5.05019C6.36301 3.73744 8.14348 2.99994 10 2.99994L10 9.99994L10 16.9999Z",fill:"#3A5CCC",style:{fill:"color(display-p3 0.2276 0.3608 0.7984)","fill-opacity":"1"}})],-1)])])}const FA={render:VA},BA=I("flex flex-col gap-2"),RA=I(["list-none p-0 m-0 flex w-full flex-1","data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:gap-2","data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-1.5"].join(" ")),NA=I("flex flex-col gap-0.5 flex-1",{variants:{type:{default:"",alt:"last:flex-none"}},defaultVariants:{type:"default"}}),jA=I("bg-transparent border-none p-0 m-0 cursor-pointer font-inter font-normal tracking-normal"),zA=I(["flex flex-col items-start gap-0.5 flex-1","data-[orientation=horizontal]:flex-none data-[orientation=horizontal]:w-auto"].join(" "),{variants:{type:{default:"",alt:""}}}),WA=I("text-xs font-medium text-normal leading-lg text-left"),HA=I("overflow-hidden text-ellipsis whitespace-nowrap max-w-full text-subtle text-xs font-normal leading-md text-left"),UA=I(["flex","data-[orientation=horizontal]:gap-2","data-[orientation=vertical]:gap-4"].join(" "),{variants:{type:{default:"",alt:"data-[orientation=horizontal]:items-center"}}}),YA=I("",{variants:{type:{default:"pl-1",alt:["data-[orientation=horizontal]:flex data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:items-center data-[orientation=horizontal]:pr-1","data-[orientation=horizontal]:[&[data-state=completed]]:pr-0","data-[orientation=vertical]:flex-col data-[orientation=vertical]:pl-0.5 data-[orientation=vertical]:pr-0.5","data-[orientation=vertical]:[&[data-state=completed]]:pb-0 data-[orientation=vertical]:[&[data-state=completed]]:pr-0 data-[orientation=vertical]:[&[data-state=completed]]:pl-0"].join(" ")}},defaultVariants:{type:"default"}}),KA=I(["flex justify-center items-center","w-lg h-lg min-w-lg rounded-full","font-inter text-xs font-normal leading-md tracking-tighter","tabular-nums mb-1"].join(" ")),GA=I(""),ZA=I("",{variants:{type:{default:["data-[orientation=horizontal]:w-full data-[orientation=horizontal]:pb-2 data-[orientation=horizontal]:pt-3 data-[orientation=horizontal]:pl-1 data-[orientation=horizontal]:pr-1","data-[orientation=vertical]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:flex data-[orientation=vertical]:justify-center"].join(" "),alt:["data-[orientation=horizontal]:w-full data-[orientation=horizontal]:pb-3 data-[orientation=horizontal]:pt-3 data-[orientation=horizontal]:pl-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center","data-[orientation=vertical]:w-full data-[orientation=vertical]:h-[calc(100%-20px)] data-[orientation=vertical]:flex data-[orientation=vertical]:justify-center","data-[orientation=vertical]:[&[data-complete]]:h-[calc(100%-24px)]"].join(" ")}},defaultVariants:{type:"default"}}),JA=I("",{variants:{type:{default:["data-[orientation=horizontal]:w-full data-[orientation=horizontal]:h-1","data-[orientation=horizontal]:[&[data-current]]:bg-border-brand","data-[orientation=horizontal]:[&[data-complete]]:bg-border-brand","data-[orientation=horizontal]:[&[data-incomplete]]:bg-border-muted","data-[orientation=vertical]:w-px data-[orientation=vertical]:h-[calc(100%-20px)]","data-[orientation=vertical]:[&[data-current]]:bg-border-muted","data-[orientation=vertical]:[&[data-complete]]:bg-border-brand","data-[orientation=vertical]:[&[data-incomplete]]:bg-border-muted"].join(" "),alt:["data-[orientation=horizontal]:w-full data-[orientation=horizontal]:h-0.5","data-[orientation=horizontal]:[&[data-current]]:bg-border-muted","data-[orientation=horizontal]:[&[data-complete]]:bg-border-brand","data-[orientation=horizontal]:[&[data-incomplete]]:bg-border-muted","data-[orientation=vertical]:w-px data-[orientation=vertical]:h-full","data-[orientation=vertical]:[&[data-current]]:bg-border-muted","data-[orientation=vertical]:[&[data-complete]]:bg-border-brand","data-[orientation=vertical]:[&[data-incomplete]]:bg-border-muted"].join(" ")}},defaultVariants:{type:"default"}}),uv=(t={})=>({root:BA(),list:RA(),item:NA(t),trigger:jA(),triggerContent:zA(t),itemTitle:WA(),itemDescription:HA(),triggerContainer:UA(t),indicator:YA(t),altIndicator:KA(),altIndicatorText:GA(),itemLineContainer:ZA(t),itemLine:JA(t)}),XA=["data-orientation"],QA=["data-orientation"],eO=["data-orientation"],tO=["data-orientation"],nO=["data-orientation"],aO=["data-orientation"],rO=["data-orientation"],iO=["data-orientation"],sO=P({__name:"StepperItem",props:{item:{},index:{},orientation:{default:Xa.Horizontal},type:{default:Ja.Default},modelValue:{default:1},items:{},currentStep:{}},setup(t){const e=t,n=k(()=>uv({type:e.type})),a=k(()=>e.currentStep-1),r=k(()=>({"data-complete":a.value>e.index?!0:void 0,"data-current":a.value===e.index?!0:void 0,"data-incomplete":a.value<e.index?!0:void 0}));return(i,s)=>(_(),D(h(CA),{class:L(n.value.trigger)},{default:C(()=>[e.type===h(Ja).Default&&e.orientation===h(Xa).Horizontal?(_(),O("div",{key:0,class:L(n.value.itemLineContainer),"data-orientation":e.orientation},[T("div",re({class:n.value.itemLine},r.value,{"data-orientation":e.orientation}),null,16,QA)],10,XA)):H("",!0),T("div",{class:L(n.value.triggerContainer),"data-orientation":e.orientation},[R(h(kA),{class:L(n.value.indicator),"data-orientation":e.orientation},{default:C(()=>[e.type===h(Ja).Default?(_(),O(ge,{key:0},[a.value===t.index?(_(),D(h(FA),{key:0})):a.value>t.index?(_(),D(h(TA),{key:1})):a.value<t.index?(_(),D(h(LA),{key:2})):H("",!0)],64)):(_(),O(ge,{key:1},[a.value>t.index?(_(),D(h(AA),{key:0})):(_(),O("div",re({key:1,class:n.value.altIndicator},r.value),[T("span",{class:L(n.value.altIndicatorText)},Q(t.index+1),3)],16))],64)),e.orientation===h(Xa).Vertical&&t.index!==e.items.length-1?(_(),O("div",re({key:2,class:n.value.itemLineContainer},r.value,{"data-orientation":e.orientation}),[T("div",re({class:n.value.itemLine},r.value,{"data-orientation":e.orientation}),null,16,nO)],16,tO)):H("",!0)]),_:1},8,["class","data-orientation"]),T("div",{class:L(n.value.triggerContent),"data-orientation":e.orientation},[T("span",{class:L(n.value.itemTitle)},Q(t.item.title),3),e.type!==h(Ja).Alt||e.orientation!==h(Xa).Horizontal?(_(),O("span",{key:0,class:L(n.value.itemDescription)},Q(t.item.description),3)):H("",!0)],10,aO),e.type===h(Ja).Alt&&e.orientation===h(Xa).Horizontal&&t.index!==e.items.length-1?(_(),O("div",{key:0,class:L(n.value.itemLineContainer),"data-orientation":e.orientation},[T("div",re({class:n.value.itemLine},r.value,{"data-orientation":e.orientation}),null,16,iO)],10,rO)):H("",!0)],10,eO)]),_:1},8,["class"]))}}),oO=["data-orientation"],lO=P({__name:"Stepper",props:{orientation:{default:Xa.Horizontal},type:{default:Ja.Default},modelValue:{default:1},items:{}},emits:["stepChange"],setup(t,{emit:e}){const n=t,a=e,r=k(()=>uv({type:n.type})),i=o=>o<1?1:o>n.items.length?n.items.length:o,s=V(i(n.modelValue));return de(()=>n.modelValue,o=>{s.value=i(o)}),de(s,o=>{a("stepChange",o)}),(o,l)=>(_(),D(h(bA),{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),orientation:n.orientation,linear:!1},{default:C(()=>[T("div",{class:L(r.value.list),"data-orientation":n.orientation},[(_(!0),O(ge,null,ke(n.items,(u,c)=>(_(),D(h(_A),{key:u.value,step:c+1,class:L(r.value.item),"data-testid":"stepper-item"},{default:C(()=>[R(sO,re({item:u,index:c},{ref_for:!0},n,{currentStep:s.value}),null,16,["item","index","currentStep"])]),_:2},1032,["step","class"]))),128))],10,oO)]),_:1},8,["modelValue","orientation"]))}}),[uO,cO]=Ve("SwitchRoot");var dO=P({__name:"SwitchRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,{disabled:r}=He(n),i=ut(n,"modelValue",a,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),s=k(()=>i.value===n.trueValue);function o(){r.value||(i.value=s.value?n.falseValue:n.trueValue)}const{forwardRef:l,currentElement:u}=ce(),c=Io(u),d=k(()=>{var f;return n.id&&u.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return cO({checked:s,toggleCheck:o,disabled:r}),(f,p)=>(_(),D(h(oe),re(f.$attrs,{id:f.id,ref:h(l),role:"switch",type:f.as==="button"?"button":void 0,value:f.value,"aria-label":f.$attrs["aria-label"]||d.value,"aria-checked":s.value,"aria-required":f.required,"data-state":s.value?"checked":"unchecked","data-disabled":h(r)?"":void 0,"as-child":f.asChild,as:f.as,disabled:h(r),onClick:o,onKeydown:lt(ye(o,["prevent"]),["enter"])}),{default:C(()=>[F(f.$slots,"default",{modelValue:h(i),checked:s.value}),h(c)&&f.name?(_(),D(h(Sc),{key:0,type:"checkbox",name:f.name,disabled:h(r),required:f.required,value:f.value,checked:s.value},null,8,["name","disabled","required","value","checked"])):H("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),fO=dO,hO=P({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=uO();return ce(),(n,a)=>(_(),D(h(oe),{"data-state":h(e).checked.value?"checked":"unchecked","data-disabled":h(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:C(()=>[F(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"]))}}),pO=hO;const mO=I("flex items-center gap-1.5 relative w-fit cursor-pointer disabled:cursor-not-allowed"),gO=I(["inline-flex items-center box-content justify-start shrink-0 cursor-pointer rounded-full","pr-0 relative transition-all ease-in-out duration-150","bg-graycoolalpha-10 w-[26px] h-[16px] shadow-stroke-bordered-interactive","focus:shadow-state-focus-primary","data-[state=checked]:bg-seed-800","data-[state=checked]:disabled:bg-brand-pressed","data-[state=checked][data-loading=true]:bg-brand-pressed","disabled:cursor-not-allowed disabled:bg-disabled disabled:shadow-none","disabled:[data-loading=true]:bg-disabled"].join(" ")),vO=I(["bg-white rounded-full h-[12px] w-[12px] translate-x-[2px]","shadow-elevations-raised transition-transform ease-in-out duration-150 relative","data-[state=checked]:translate-x-[12px] data-[state=checked]:bg-white data-[state=checked]:shadow-elevations-raised","data-[state=checked]:disabled:bg-white","disabled:bg-white","data-[state=checked][data-loading=true]:before:border-t-brand-pressed",'[data-loading=true]:before:content-[""] [data-loading=true]:before:absolute [data-loading=true]:before:m-px',"[data-loading=true]:before:inset-0 [data-loading=true]:before:rounded-full","[data-loading=true]:before:border-2 [data-loading=true]:before:border-solid [data-loading=true]:before:border-white","[data-loading=true]:before:border-t-disabled [data-loading=true]:before:bg-transparent","[data-loading=true]:before:animate-spin [data-loading=true]:before:shadow-[0_0_8px_rgba(255,255,255,0.3)]","[data-loading=true]:before:will-change-transform [data-loading=true]:before:backface-hidden"].join(" ")),yO=I("text-graycool-1000 text-xs font-normal font-inter cursor-pointer leading-lg"),bO=I("icon-disabled"),xO=I("flex items-center gap-1"),wO=I("m-0 pl-2 text-subtle text-xs font-inter"),_O=()=>({root:mO(),control:gO(),thumb:vO(),label:yO(),suffixIcon:bO(),labelContent:xO(),labelDescription:wO()}),$O=["data-loading"],kO=P({__name:"Switch",props:{disabled:{type:Boolean},checked:{},loading:{type:Boolean},suffixIcon:{type:[Boolean,Function,Object]},description:{},iconTooltip:{},readOnly:{type:Boolean},defaultValue:{},modelValue:{},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:["checkedChange","update:modelValue"],setup(t,{emit:e}){const n=t,a=e,r=_O();return(i,s)=>(_(),O("div",null,[R(h(fO),{class:L(h(r).root),checked:n.checked,disabled:n.disabled||n.loading,"data-loading":n.loading,"onUpdate:checked":s[0]||(s[0]=o=>a("checkedChange",o)),"data-testid":"atlantis-switch"},{default:C(()=>[T("span",{"data-loading":n.loading,class:L(h(r).control)},[R(h(pO),{"data-loading":n.loading,class:L(h(r).thumb)},null,8,["data-loading","class"])],10,$O),T("div",{class:L(h(r).labelContent)},[T("label",{class:L(h(r).label)},[F(i.$slots,"default")],2),t.iconTooltip?(_(),D(Yn,{key:0,title:t.iconTooltip,placement:"bottom"},{default:C(()=>[(_(),D(Ne(t.suffixIcon&&h(Oa)),{class:L(h(r).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))]),_:1},8,["title"])):(_(),D(Ne(t.suffixIcon&&h(Oa)),{key:1,class:L(h(r).suffixIcon),"data-testid":"atlantis-suffix-icon"},null,8,["class"]))],2)]),_:3},8,["class","checked","disabled","data-loading"]),t.description?(_(),O("p",{key:0,class:L(h(r).labelDescription),"data-testid":"atlantis-switch-description"},Q(t.description),3)):H("",!0)]))}});function Bi(t){return t+.5|0}const Gn=(t,e,n)=>Math.max(Math.min(t,n),e);function ei(t){return Gn(Bi(t*2.55),0,255)}function Xn(t){return Gn(Bi(t*255),0,255)}function Sn(t){return Gn(Bi(t/2.55)/100,0,1)}function nh(t){return Gn(Bi(t*100),0,100)}const Lt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Du=[..."0123456789ABCDEF"],SO=t=>Du[t&15],CO=t=>Du[(t&240)>>4]+Du[t&15],es=t=>(t&240)>>4===(t&15),MO=t=>es(t.r)&&es(t.g)&&es(t.b)&&es(t.a);function DO(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Lt[t[1]]*17,g:255&Lt[t[2]]*17,b:255&Lt[t[3]]*17,a:e===5?Lt[t[4]]*17:255}:(e===7||e===9)&&(n={r:Lt[t[1]]<<4|Lt[t[2]],g:Lt[t[3]]<<4|Lt[t[4]],b:Lt[t[5]]<<4|Lt[t[6]],a:e===9?Lt[t[7]]<<4|Lt[t[8]]:255})),n}const AO=(t,e)=>t<255?e(t):"";function OO(t){var e=MO(t)?SO:CO;return t?"#"+e(t.r)+e(t.g)+e(t.b)+AO(t.a,e):void 0}const EO=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function cv(t,e,n){const a=e*Math.min(n,1-n),r=(i,s=(i+t/30)%12)=>n-a*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function TO(t,e,n){const a=(r,i=(r+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[a(5),a(3),a(1)]}function PO(t,e,n){const a=cv(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)a[r]*=1-e-n,a[r]+=e;return a}function IO(t,e,n,a,r){return t===r?(e-n)/a+(e<n?6:0):e===r?(n-t)/a+2:(t-e)/a+4}function rd(t){const e=t.r/255,n=t.g/255,a=t.b/255,r=Math.max(e,n,a),i=Math.min(e,n,a),s=(r+i)/2;let o,l,u;return r!==i&&(u=r-i,l=s>.5?u/(2-r-i):u/(r+i),o=IO(e,n,a,u,r),o=o*60+.5),[o|0,l||0,s]}function id(t,e,n,a){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,a)).map(Xn)}function sd(t,e,n){return id(cv,t,e,n)}function LO(t,e,n){return id(PO,t,e,n)}function qO(t,e,n){return id(TO,t,e,n)}function dv(t){return(t%360+360)%360}function VO(t){const e=EO.exec(t);let n=255,a;if(!e)return;e[5]!==a&&(n=e[6]?ei(+e[5]):Xn(+e[5]));const r=dv(+e[2]),i=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?a=LO(r,i,s):e[1]==="hsv"?a=qO(r,i,s):a=sd(r,i,s),{r:a[0],g:a[1],b:a[2],a:n}}function FO(t,e){var n=rd(t);n[0]=dv(n[0]+e),n=sd(n),t.r=n[0],t.g=n[1],t.b=n[2]}function BO(t){if(!t)return;const e=rd(t),n=e[0],a=nh(e[1]),r=nh(e[2]);return t.a<255?`hsla(${n}, ${a}%, ${r}%, ${Sn(t.a)})`:`hsl(${n}, ${a}%, ${r}%)`}const ah={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},rh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function RO(){const t={},e=Object.keys(rh),n=Object.keys(ah);let a,r,i,s,o;for(a=0;a<e.length;a++){for(s=o=e[a],r=0;r<n.length;r++)i=n[r],o=o.replace(i,ah[i]);i=parseInt(rh[s],16),t[o]=[i>>16&255,i>>8&255,i&255]}return t}let ts;function NO(t){ts||(ts=RO(),ts.transparent=[0,0,0,0]);const e=ts[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const jO=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function zO(t){const e=jO.exec(t);let n=255,a,r,i;if(e){if(e[7]!==a){const s=+e[7];n=e[8]?ei(s):Gn(s*255,0,255)}return a=+e[1],r=+e[3],i=+e[5],a=255&(e[2]?ei(a):Gn(a,0,255)),r=255&(e[4]?ei(r):Gn(r,0,255)),i=255&(e[6]?ei(i):Gn(i,0,255)),{r:a,g:r,b:i,a:n}}}function WO(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Sn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const El=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ya=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function HO(t,e,n){const a=Ya(Sn(t.r)),r=Ya(Sn(t.g)),i=Ya(Sn(t.b));return{r:Xn(El(a+n*(Ya(Sn(e.r))-a))),g:Xn(El(r+n*(Ya(Sn(e.g))-r))),b:Xn(El(i+n*(Ya(Sn(e.b))-i))),a:t.a+n*(e.a-t.a)}}function ns(t,e,n){if(t){let a=rd(t);a[e]=Math.max(0,Math.min(a[e]+a[e]*n,e===0?360:1)),a=sd(a),t.r=a[0],t.g=a[1],t.b=a[2]}}function fv(t,e){return t&&Object.assign(e||{},t)}function ih(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Xn(t[3]))):(e=fv(t,{r:0,g:0,b:0,a:1}),e.a=Xn(e.a)),e}function UO(t){return t.charAt(0)==="r"?zO(t):VO(t)}let hv=class Au{constructor(e){if(e instanceof Au)return e;const n=typeof e;let a;n==="object"?a=ih(e):n==="string"&&(a=DO(e)||NO(e)||UO(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=fv(this._rgb);return e&&(e.a=Sn(e.a)),e}set rgb(e){this._rgb=ih(e)}rgbString(){return this._valid?WO(this._rgb):void 0}hexString(){return this._valid?OO(this._rgb):void 0}hslString(){return this._valid?BO(this._rgb):void 0}mix(e,n){if(e){const a=this.rgb,r=e.rgb;let i;const s=n===i?.5:n,o=2*s-1,l=a.a-r.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;i=1-u,a.r=255&u*a.r+i*r.r+.5,a.g=255&u*a.g+i*r.g+.5,a.b=255&u*a.b+i*r.b+.5,a.a=s*a.a+(1-s)*r.a,this.rgb=a}return this}interpolate(e,n){return e&&(this._rgb=HO(this._rgb,e._rgb,n)),this}clone(){return new Au(this.rgb)}alpha(e){return this._rgb.a=Xn(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Bi(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ns(this._rgb,2,e),this}darken(e){return ns(this._rgb,2,-e),this}saturate(e){return ns(this._rgb,1,e),this}desaturate(e){return ns(this._rgb,1,-e),this}rotate(e){return FO(this._rgb,e),this}};function xn(){}const YO=(()=>{let t=0;return()=>t++})();function Pe(t){return t==null}function at(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function _e(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Nt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function rn(t,e){return Nt(t)?t:e}function Re(t,e){return typeof t>"u"?e:t}const KO=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function We(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Se(t,e,n,a){let r,i,s;if(at(t))for(i=t.length,r=0;r<i;r++)e.call(n,t[r],r);else if(_e(t))for(s=Object.keys(t),i=s.length,r=0;r<i;r++)e.call(n,t[s[r]],s[r])}function co(t,e){let n,a,r,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,a=t.length;n<a;++n)if(r=t[n],i=e[n],r.datasetIndex!==i.datasetIndex||r.index!==i.index)return!1;return!0}function fo(t){if(at(t))return t.map(fo);if(_e(t)){const e=Object.create(null),n=Object.keys(t),a=n.length;let r=0;for(;r<a;++r)e[n[r]]=fo(t[n[r]]);return e}return t}function pv(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function GO(t,e,n,a){if(!pv(t))return;const r=e[t],i=n[t];_e(r)&&_e(i)?xi(r,i,a):e[t]=fo(i)}function xi(t,e,n){const a=at(e)?e:[e],r=a.length;if(!_e(t))return t;n=n||{};const i=n.merger||GO;let s;for(let o=0;o<r;++o){if(s=a[o],!_e(s))continue;const l=Object.keys(s);for(let u=0,c=l.length;u<c;++u)i(l[u],t,s,n)}return t}function li(t,e){return xi(t,e,{merger:ZO})}function ZO(t,e,n){if(!pv(t))return;const a=e[t],r=n[t];_e(a)&&_e(r)?li(a,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=fo(r))}const sh={"":t=>t,x:t=>t.x,y:t=>t.y};function JO(t){const e=t.split("."),n=[];let a="";for(const r of e)a+=r,a.endsWith("\\")?a=a.slice(0,-1)+".":(n.push(a),a="");return n}function XO(t){const e=JO(t);return n=>{for(const a of e){if(a==="")break;n=n&&n[a]}return n}}function gr(t,e){return(sh[e]||(sh[e]=XO(e)))(t)}function od(t){return t.charAt(0).toUpperCase()+t.slice(1)}const wi=t=>typeof t<"u",ra=t=>typeof t=="function",oh=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function QO(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const St=Math.PI,Ma=2*St,ho=Number.POSITIVE_INFINITY,eE=St/180,Gt=St/2,ga=St/4,lh=St*2/3,mv=Math.log10,Qn=Math.sign;function qs(t,e,n){return Math.abs(t-e)<n}function uh(t){const e=Math.round(t);t=qs(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(mv(t))),a=t/n;return(a<=1?1:a<=2?2:a<=5?5:10)*n}function tE(t){const e=[],n=Math.sqrt(t);let a;for(a=1;a<n;a++)t%a===0&&(e.push(a),e.push(t/a));return n===(n|0)&&e.push(n),e.sort((r,i)=>r-i).pop(),e}function nE(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function po(t){return!nE(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function aE(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function rE(t,e,n){let a,r,i;for(a=0,r=t.length;a<r;a++)i=t[a][n],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function $a(t){return t*(St/180)}function iE(t){return t*(180/St)}function ch(t){if(!Nt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function sE(t,e){const n=e.x-t.x,a=e.y-t.y,r=Math.sqrt(n*n+a*a);let i=Math.atan2(a,n);return i<-.5*St&&(i+=Ma),{angle:i,distance:r}}function oE(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function va(t){return(t%Ma+Ma)%Ma}function lE(t,e,n,a){const r=va(t),i=va(e),s=va(n),o=va(i-r),l=va(s-r),u=va(r-i),c=va(r-s);return r===i||r===s||a||o>l&&u<c}function Zt(t,e,n){return Math.max(e,Math.min(n,t))}function uE(t){return Zt(t,-32768,32767)}function dh(t,e,n,a=1e-6){return t>=Math.min(e,n)-a&&t<=Math.max(e,n)+a}function ld(t,e,n){n=n||(s=>t[s]<e);let a=t.length-1,r=0,i;for(;a-r>1;)i=r+a>>1,n(i)?r=i:a=i;return{lo:r,hi:a}}const Ou=(t,e,n,a)=>ld(t,n,a?r=>{const i=t[r][e];return i<n||i===n&&t[r+1][e]===n}:r=>t[r][e]<n),cE=(t,e,n)=>ld(t,n,a=>t[a][e]>=n);function dE(t,e,n){let a=0,r=t.length;for(;a<r&&t[a]<e;)a++;for(;r>a&&t[r-1]>n;)r--;return a>0||r<t.length?t.slice(a,r):t}const gv=["push","pop","shift","splice","unshift"];function fE(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),gv.forEach(n=>{const a="_onData"+od(n),r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...i){const s=r.apply(this,i);return t._chartjs.listeners.forEach(o=>{typeof o[a]=="function"&&o[a](...i)}),s}})})}function fh(t,e){const n=t._chartjs;if(!n)return;const a=n.listeners,r=a.indexOf(e);r!==-1&&a.splice(r,1),!(a.length>0)&&(gv.forEach(i=>{delete t[i]}),delete t._chartjs)}function vv(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const yv=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function bv(t,e){let n=[],a=!1;return function(...r){n=r,a||(a=!0,yv.call(window,()=>{a=!1,t.apply(e,n)}))}}function hE(t,e){let n;return function(...a){return e?(clearTimeout(n),n=setTimeout(t,e,a)):t.apply(this,a),e}}const pE=t=>t==="start"?"left":t==="end"?"right":"center",hh=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,as=t=>t===0||t===1,ph=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ma/n)),mh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ma/n)+1,ui={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Gt)+1,easeOutSine:t=>Math.sin(t*Gt),easeInOutSine:t=>-.5*(Math.cos(St*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>as(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>as(t)?t:ph(t,.075,.3),easeOutElastic:t=>as(t)?t:mh(t,.075,.3),easeInOutElastic(t){return as(t)?t:t<.5?.5*ph(t*2,.1125,.45):.5+.5*mh(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-ui.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?ui.easeInBounce(t*2)*.5:ui.easeOutBounce(t*2-1)*.5+.5};function xv(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function gh(t){return xv(t)?t:new hv(t)}function Tl(t){return xv(t)?t:new hv(t).saturate(.5).darken(.1).hexString()}const mE=["x","y","borderWidth","radius","tension"],gE=["color","borderColor","backgroundColor"];function vE(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:gE},numbers:{type:"number",properties:mE}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function yE(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vh=new Map;function bE(t,e){e=e||{};const n=t+JSON.stringify(e);let a=vh.get(n);return a||(a=new Intl.NumberFormat(t,e),vh.set(n,a)),a}function wv(t,e,n){return bE(e,n).format(t)}const xE={values(t){return at(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const a=this.chart.options.locale;let r,i=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),i=wE(t,n)}const s=mv(Math.abs(i)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),wv(t,a,l)}};function wE(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var _v={formatters:xE};function _E(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:_v.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Pa=Object.create(null),Eu=Object.create(null);function ci(t,e){if(!e)return t;const n=e.split(".");for(let a=0,r=n.length;a<r;++a){const i=n[a];t=t[i]||(t[i]=Object.create(null))}return t}function Pl(t,e,n){return typeof e=="string"?xi(ci(t,e),n):xi(ci(t,""),e)}let $E=class{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=a=>a.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(a,r)=>Tl(r.backgroundColor),this.hoverBorderColor=(a,r)=>Tl(r.borderColor),this.hoverColor=(a,r)=>Tl(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Pl(this,e,n)}get(e){return ci(this,e)}describe(e,n){return Pl(Eu,e,n)}override(e,n){return Pl(Pa,e,n)}route(e,n,a,r){const i=ci(this,e),s=ci(this,a),o="_"+n;Object.defineProperties(i,{[o]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],u=s[r];return _e(l)?Object.assign({},u,l):Re(l,u)},set(l){this[o]=l}}})}apply(e){e.forEach(n=>n(this))}};var Ge=new $E({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[vE,yE,_E]);function kE(t){return!t||Pe(t.size)||Pe(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function yh(t,e,n,a,r){let i=e[r];return i||(i=e[r]=t.measureText(r).width,n.push(r)),i>a&&(a=i),a}function ya(t,e,n){const a=t.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((e-r)*a)/a+r}function bh(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function xh(t,e,n,a){SE(t,e,n,a)}function SE(t,e,n,a,r){let i,s,o,l,u,c,d,f;const p=e.pointStyle,m=e.rotation,g=e.radius;let y=(m||0)*eE;if(p&&typeof p=="object"&&(i=p.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(n,a),t.rotate(y),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:t.arc(n,a,g,0,Ma),t.closePath();break;case"triangle":c=g,t.moveTo(n+Math.sin(y)*c,a-Math.cos(y)*g),y+=lh,t.lineTo(n+Math.sin(y)*c,a-Math.cos(y)*g),y+=lh,t.lineTo(n+Math.sin(y)*c,a-Math.cos(y)*g),t.closePath();break;case"rectRounded":u=g*.516,l=g-u,s=Math.cos(y+ga)*l,d=Math.cos(y+ga)*l,o=Math.sin(y+ga)*l,f=Math.sin(y+ga)*l,t.arc(n-d,a-o,u,y-St,y-Gt),t.arc(n+f,a-s,u,y-Gt,y),t.arc(n+d,a+o,u,y,y+Gt),t.arc(n-f,a+s,u,y+Gt,y+St),t.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,c=l,t.rect(n-c,a-l,2*c,2*l);break}y+=ga;case"rectRot":d=Math.cos(y)*g,s=Math.cos(y)*g,o=Math.sin(y)*g,f=Math.sin(y)*g,t.moveTo(n-d,a-o),t.lineTo(n+f,a-s),t.lineTo(n+d,a+o),t.lineTo(n-f,a+s),t.closePath();break;case"crossRot":y+=ga;case"cross":d=Math.cos(y)*g,s=Math.cos(y)*g,o=Math.sin(y)*g,f=Math.sin(y)*g,t.moveTo(n-d,a-o),t.lineTo(n+d,a+o),t.moveTo(n+f,a-s),t.lineTo(n-f,a+s);break;case"star":d=Math.cos(y)*g,s=Math.cos(y)*g,o=Math.sin(y)*g,f=Math.sin(y)*g,t.moveTo(n-d,a-o),t.lineTo(n+d,a+o),t.moveTo(n+f,a-s),t.lineTo(n-f,a+s),y+=ga,d=Math.cos(y)*g,s=Math.cos(y)*g,o=Math.sin(y)*g,f=Math.sin(y)*g,t.moveTo(n-d,a-o),t.lineTo(n+d,a+o),t.moveTo(n+f,a-s),t.lineTo(n-f,a+s);break;case"line":s=Math.cos(y)*g,o=Math.sin(y)*g,t.moveTo(n-s,a-o),t.lineTo(n+s,a+o);break;case"dash":t.moveTo(n,a),t.lineTo(n+Math.cos(y)*g,a+Math.sin(y)*g);break;case!1:t.closePath();break}t.fill(),t.stroke()}}function $v(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function kv(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Sv(t){t.restore()}function CE(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Pe(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function ME(t,e,n,a,r){if(r.strikethrough||r.underline){const i=t.measureText(a),s=e-i.actualBoundingBoxLeft,o=e+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=r.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,c),t.lineTo(o,c),t.stroke()}}function DE(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function wh(t,e,n,a,r,i={}){const s=at(e)?e:[e],o=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(t.save(),t.font=r.string,CE(t,i),l=0;l<s.length;++l)u=s[l],i.backdrop&&DE(t,i.backdrop),o&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),Pe(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(u,n,a,i.maxWidth)),t.fillText(u,n,a,i.maxWidth),ME(t,n,a,u,i),a+=Number(r.lineHeight);t.restore()}function Tu(t,e){const{x:n,y:a,w:r,h:i,radius:s}=e;t.arc(n+s.topLeft,a+s.topLeft,s.topLeft,1.5*St,St,!0),t.lineTo(n,a+i-s.bottomLeft),t.arc(n+s.bottomLeft,a+i-s.bottomLeft,s.bottomLeft,St,Gt,!0),t.lineTo(n+r-s.bottomRight,a+i),t.arc(n+r-s.bottomRight,a+i-s.bottomRight,s.bottomRight,Gt,0,!0),t.lineTo(n+r,a+s.topRight),t.arc(n+r-s.topRight,a+s.topRight,s.topRight,0,-Gt,!0),t.lineTo(n+s.topLeft,a)}const AE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,OE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function EE(t,e){const n=(""+t).match(AE);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const TE=t=>+t||0;function Cv(t,e){const n={},a=_e(e),r=a?Object.keys(e):e,i=_e(t)?a?s=>Re(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of r)n[s]=TE(i(s));return n}function Mv(t){return Cv(t,{top:"y",right:"x",bottom:"y",left:"x"})}function di(t){return Cv(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ia(t){const e=Mv(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function dn(t,e){t=t||{},e=e||Ge.font;let n=Re(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let a=Re(t.style,e.style);a&&!(""+a).match(OE)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const r={family:Re(t.family,e.family),lineHeight:EE(Re(t.lineHeight,e.lineHeight),n),size:n,style:a,weight:Re(t.weight,e.weight),string:""};return r.string=kE(r),r}function rs(t,e,n,a){let r,i,s;for(r=0,i=t.length;r<i;++r)if(s=t[r],s!==void 0&&s!==void 0)return s}function PE(t,e,n){const{min:a,max:r}=t,i=KO(e,(r-a)/2),s=(o,l)=>n&&o===0?0:o+l;return{min:s(a,-Math.abs(i)),max:s(r,i)}}function Mr(t,e){return Object.assign(Object.create(t),e)}function ud(t,e=[""],n,a,r=()=>t[0]){const i=n||t;typeof a>"u"&&(a=Ev("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:a,_getTarget:r,override:o=>ud([o,...t],e,i,a)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete t[0][l],!0},get(o,l){return Av(o,l,()=>NE(l,e,t,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,l){return $h(o).includes(l)},ownKeys(o){return $h(o)},set(o,l,u){const c=o._storage||(o._storage=r());return o[l]=c[l]=u,delete o._keys,!0}})}function vr(t,e,n,a){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Dv(t,a),setContext:i=>vr(t,i,n,a),override:i=>vr(t.override(i),e,n,a)};return new Proxy(r,{deleteProperty(i,s){return delete i[s],delete t[s],!0},get(i,s,o){return Av(i,s,()=>LE(i,s,o))},getOwnPropertyDescriptor(i,s){return i._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(i,s,o){return t[s]=o,delete i[s],!0}})}function Dv(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:a=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:a,isScriptable:ra(n)?n:()=>n,isIndexable:ra(a)?a:()=>a}}const IE=(t,e)=>t?t+od(e):e,cd=(t,e)=>_e(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Av(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const a=n();return t[e]=a,a}function LE(t,e,n){const{_proxy:a,_context:r,_subProxy:i,_descriptors:s}=t;let o=a[e];return ra(o)&&s.isScriptable(e)&&(o=qE(e,o,t,n)),at(o)&&o.length&&(o=VE(e,o,t,s.isIndexable)),cd(e,o)&&(o=vr(o,r,i&&i[e],s)),o}function qE(t,e,n,a){const{_proxy:r,_context:i,_subProxy:s,_stack:o}=n;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(i,s||a);return o.delete(t),cd(t,l)&&(l=dd(r._scopes,r,t,l)),l}function VE(t,e,n,a){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=n;if(typeof i.index<"u"&&a(t))return e[i.index%e.length];if(_e(e[0])){const l=e,u=r._scopes.filter(c=>c!==l);e=[];for(const c of l){const d=dd(u,r,t,c);e.push(vr(d,i,s&&s[t],o))}}return e}function Ov(t,e,n){return ra(t)?t(e,n):t}const FE=(t,e)=>t===!0?e:typeof t=="string"?gr(e,t):void 0;function BE(t,e,n,a,r){for(const i of e){const s=FE(n,i);if(s){t.add(s);const o=Ov(s._fallback,n,r);if(typeof o<"u"&&o!==n&&o!==a)return o}else if(s===!1&&typeof a<"u"&&n!==a)return null}return!1}function dd(t,e,n,a){const r=e._rootScopes,i=Ov(e._fallback,n,a),s=[...t,...r],o=new Set;o.add(a);let l=_h(o,s,n,i||n,a);return l===null||typeof i<"u"&&i!==n&&(l=_h(o,s,i,l,a),l===null)?!1:ud(Array.from(o),[""],r,i,()=>RE(e,n,a))}function _h(t,e,n,a,r){for(;n;)n=BE(t,e,n,a,r);return n}function RE(t,e,n){const a=t._getTarget();e in a||(a[e]={});const r=a[e];return at(r)&&_e(n)?n:r||{}}function NE(t,e,n,a){let r;for(const i of e)if(r=Ev(IE(i,t),n),typeof r<"u")return cd(t,r)?dd(n,a,t,r):r}function Ev(t,e){for(const n of e){if(!n)continue;const a=n[t];if(typeof a<"u")return a}}function $h(t){let e=t._keys;return e||(e=t._keys=jE(t._scopes)),e}function jE(t){const e=new Set;for(const n of t)for(const a of Object.keys(n).filter(r=>!r.startsWith("_")))e.add(a);return Array.from(e)}function fd(){return typeof window<"u"&&typeof document<"u"}function hd(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function mo(t,e,n){let a;return typeof t=="string"?(a=parseInt(t,10),t.indexOf("%")!==-1&&(a=a/100*e.parentNode[n])):a=t,a}const Uo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function zE(t,e){return Uo(t).getPropertyValue(e)}const WE=["top","right","bottom","left"];function Da(t,e,n){const a={};n=n?"-"+n:"";for(let r=0;r<4;r++){const i=WE[r];a[i]=parseFloat(t[e+"-"+i+n])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const HE=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function UE(t,e){const n=t.touches,a=n&&n.length?n[0]:t,{offsetX:r,offsetY:i}=a;let s=!1,o,l;if(HE(r,i,t.target))o=r,l=i;else{const u=e.getBoundingClientRect();o=a.clientX-u.left,l=a.clientY-u.top,s=!0}return{x:o,y:l,box:s}}function xa(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:a}=e,r=Uo(n),i=r.boxSizing==="border-box",s=Da(r,"padding"),o=Da(r,"border","width"),{x:l,y:u,box:c}=UE(t,n),d=s.left+(c&&o.left),f=s.top+(c&&o.top);let{width:p,height:m}=e;return i&&(p-=s.width+o.width,m-=s.height+o.height),{x:Math.round((l-d)/p*n.width/a),y:Math.round((u-f)/m*n.height/a)}}function YE(t,e,n){let a,r;if(e===void 0||n===void 0){const i=t&&hd(t);if(!i)e=t.clientWidth,n=t.clientHeight;else{const s=i.getBoundingClientRect(),o=Uo(i),l=Da(o,"border","width"),u=Da(o,"padding");e=s.width-u.width-l.width,n=s.height-u.height-l.height,a=mo(o.maxWidth,i,"clientWidth"),r=mo(o.maxHeight,i,"clientHeight")}}return{width:e,height:n,maxWidth:a||ho,maxHeight:r||ho}}const Zn=t=>Math.round(t*10)/10;function KE(t,e,n,a){const r=Uo(t),i=Da(r,"margin"),s=mo(r.maxWidth,t,"clientWidth")||ho,o=mo(r.maxHeight,t,"clientHeight")||ho,l=YE(t,e,n);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const d=Da(r,"border","width"),f=Da(r,"padding");u-=f.width+d.width,c-=f.height+d.height}return u=Math.max(0,u-i.width),c=Math.max(0,a?u/a:c-i.height),u=Zn(Math.min(u,s,l.maxWidth)),c=Zn(Math.min(c,o,l.maxHeight)),u&&!c&&(c=Zn(u/2)),(e!==void 0||n!==void 0)&&a&&l.height&&c>l.height&&(c=l.height,u=Zn(Math.floor(c*a))),{width:u,height:c}}function kh(t,e,n){const a=e||1,r=Zn(t.height*a),i=Zn(t.width*a);t.height=Zn(t.height),t.width=Zn(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==a||s.height!==r||s.width!==i?(t.currentDevicePixelRatio=a,s.height=r,s.width=i,t.ctx.setTransform(a,0,0,a,0,0),!0):!1}const GE=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};fd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Sh(t,e){const n=zE(t,e),a=n&&n.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}const ZE=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,a){return n-a},leftForLtr(n,a){return n-a}}},JE=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Il(t,e,n){return t?ZE(e,n):JE()}function XE(t,e){let n,a;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,a=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=a)}function QE(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function is(t,e,n){return t.options.clip?t[n]:e[n]}function e5(t,e){const{xScale:n,yScale:a}=t;return n&&a?{left:is(n,e,"left"),right:is(n,e,"right"),top:is(a,e,"top"),bottom:is(a,e,"bottom")}:e}function t5(t,e){const n=e._clip;if(n.disabled)return!1;const a=e5(e,t.chartArea);return{left:n.left===!1?0:a.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:a.right+(n.right===!0?0:n.right),top:n.top===!1?0:a.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:a.bottom+(n.bottom===!0?0:n.bottom)}}var n5=Object.defineProperty,a5=(t,e,n)=>e in t?n5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,we=(t,e,n)=>a5(t,typeof e!="symbol"?e+"":e,n);class r5{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,a,r){const i=n.listeners[r],s=n.duration;i.forEach(o=>o({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(a-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=yv.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((a,r)=>{if(!a.running||!a.items.length)return;const i=a.items;let s=i.length-1,o=!1,l;for(;s>=0;--s)l=i[s],l._active?(l._total>a.duration&&(a.duration=l._total),l.tick(e),o=!0):(i[s]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,a,e,"progress")),i.length||(a.running=!1,this._notify(r,a,e,"complete"),a.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let a=n.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,a)),a}listen(e,n,a){this._getAnims(e).listeners[n].push(a)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((a,r)=>Math.max(a,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const a=n.items;let r=a.length-1;for(;r>=0;--r)a[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var $n=new r5;const Ch="transparent",i5={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const a=gh(t||Ch),r=a.valid&&gh(e||Ch);return r&&r.valid?r.mix(a,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class s5{constructor(e,n,a,r){const i=n[a];r=rs([e.to,r,i,e.from]);const s=rs([e.from,i,r]);this._active=!0,this._fn=e.fn||i5[e.type||typeof s],this._easing=ui[e.easing]||ui.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=a,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,a){if(this._active){this._notify(!1);const r=this._target[this._prop],i=a-this._start,s=this._duration-i;this._start=a,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=rs([e.to,n,r,e.from]),this._from=rs([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,a=this._duration,r=this._prop,i=this._from,s=this._loop,o=this._to;let l;if(this._active=i!==o&&(s||n<a),!this._active){this._target[r]=o,this._notify(!0);return}if(n<0){this._target[r]=i;return}l=n/a%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(i,o,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,a)=>{e.push({res:n,rej:a})})}_notify(e){const n=e?"res":"rej",a=this._promises||[];for(let r=0;r<a.length;r++)a[r][n]()}}class Tv{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!_e(e))return;const n=Object.keys(Ge.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!_e(i))return;const s={};for(const o of n)s[o]=i[o];(at(i.properties)&&i.properties||[r]).forEach(o=>{(o===r||!a.has(o))&&a.set(o,s)})})}_animateOptions(e,n){const a=n.options,r=l5(e,a);if(!r)return[];const i=this._createAnimations(r,a);return a.$shared&&o5(e.options.$animations,a).then(()=>{e.options=a},()=>{}),i}_createAnimations(e,n){const a=this._properties,r=[],i=e.$animations||(e.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const u=s[l];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(e,n));continue}const c=n[u];let d=i[u];const f=a.get(u);if(d)if(f&&d.active()){d.update(f,c,o);continue}else d.cancel();if(!f||!f.duration){e[u]=c;continue}i[u]=d=new s5(f,e,u,c),r.push(d)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const a=this._createAnimations(e,n);if(a.length)return $n.add(this._chart,a),!0}}function o5(t,e){const n=[],a=Object.keys(e);for(let r=0;r<a.length;r++){const i=t[a[r]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function l5(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Mh(t,e){const n=t&&t.options||{},a=n.reverse,r=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:a?i:r,end:a?r:i}}function u5(t,e,n){if(n===!1)return!1;const a=Mh(t,n),r=Mh(e,n);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function c5(t){let e,n,a,r;return _e(t)?(e=t.top,n=t.right,a=t.bottom,r=t.left):e=n=a=r=t,{top:e,right:n,bottom:a,left:r,disabled:t===!1}}function Pv(t,e){const n=[],a=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=a.length;r<i;++r)n.push(a[r].index);return n}function Dh(t,e,n,a={}){const r=t.keys,i=a.mode==="single";let s,o,l,u;if(e===null)return;let c=!1;for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===n){if(c=!0,a.all)continue;break}u=t.values[l],Nt(u)&&(i||e===0||Qn(e)===Qn(u))&&(e+=u)}return!c&&!a.all?0:e}function d5(t,e){const{iScale:n,vScale:a}=e,r=n.axis==="x"?"x":"y",i=a.axis==="x"?"x":"y",s=Object.keys(t),o=new Array(s.length);let l,u,c;for(l=0,u=s.length;l<u;++l)c=s[l],o[l]={[r]:c,[i]:t[c]};return o}function Ll(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function f5(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function h5(t){const{min:e,max:n,minDefined:a,maxDefined:r}=t.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function p5(t,e,n){const a=t[e]||(t[e]={});return a[n]||(a[n]={})}function Ah(t,e,n,a){for(const r of e.getMatchingVisibleMetas(a).reverse()){const i=t[r.index];if(n&&i>0||!n&&i<0)return r.index}return null}function Oh(t,e){const{chart:n,_cachedMeta:a}=t,r=n._stacks||(n._stacks={}),{iScale:i,vScale:s,index:o}=a,l=i.axis,u=s.axis,c=f5(i,s,a),d=e.length;let f;for(let p=0;p<d;++p){const m=e[p],{[l]:g,[u]:y}=m,v=m._stacks||(m._stacks={});f=v[u]=p5(r,c,g),f[o]=y,f._top=Ah(f,s,!0,a.type),f._bottom=Ah(f,s,!1,a.type);const b=f._visualValues||(f._visualValues={});b[o]=y}}function ql(t,e){const n=t.scales;return Object.keys(n).filter(a=>n[a].axis===e).shift()}function m5(t,e){return Mr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function g5(t,e,n){return Mr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function qr(t,e){const n=t.controller.index,a=t.vScale&&t.vScale.axis;if(a){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[a]===void 0||i[a][n]===void 0)return;delete i[a][n],i[a]._visualValues!==void 0&&i[a]._visualValues[n]!==void 0&&delete i[a]._visualValues[n]}}}const Vl=t=>t==="reset"||t==="none",Eh=(t,e)=>e?t:Object.assign({},t),v5=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Pv(n,!0),values:null};class fi{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ll(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&qr(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,a=this.getDataset(),r=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,i=n.xAxisID=Re(a.xAxisID,ql(e,"x")),s=n.yAxisID=Re(a.yAxisID,ql(e,"y")),o=n.rAxisID=Re(a.rAxisID,ql(e,"r")),l=n.indexAxis,u=n.iAxisID=r(l,i,s,o),c=n.vAxisID=r(l,s,i,o);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&fh(this._data,this),e._stacked&&qr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),a=this._data;if(_e(n)){const r=this._cachedMeta;this._data=d5(n,r)}else if(a!==n){if(a){fh(a,this);const r=this._cachedMeta;qr(r),r._parsed=[]}n&&Object.isExtensible(n)&&fE(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,a=this.getDataset();let r=!1;this._dataCheck();const i=n._stacked;n._stacked=Ll(n.vScale,n),n.stack!==a.stack&&(r=!0,qr(n),n.stack=a.stack),this._resyncElements(e),(r||i!==n._stacked)&&(Oh(this,n._parsed),n._stacked=Ll(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:a,_data:r}=this,{iScale:i,_stacked:s}=a,o=i.axis;let l=e===0&&n===r.length?!0:a._sorted,u=e>0&&a._parsed[e-1],c,d,f;if(this._parsing===!1)a._parsed=r,a._sorted=!0,f=r;else{at(r[e])?f=this.parseArrayData(a,r,e,n):_e(r[e])?f=this.parseObjectData(a,r,e,n):f=this.parsePrimitiveData(a,r,e,n);const p=()=>d[o]===null||u&&d[o]<u[o];for(c=0;c<n;++c)a._parsed[c+e]=d=f[c],l&&(p()&&(l=!1),u=d);a._sorted=l}s&&Oh(this,f)}parsePrimitiveData(e,n,a,r){const{iScale:i,vScale:s}=e,o=i.axis,l=s.axis,u=i.getLabels(),c=i===s,d=new Array(r);let f,p,m;for(f=0,p=r;f<p;++f)m=f+a,d[f]={[o]:c||i.parse(u[m],m),[l]:s.parse(n[m],m)};return d}parseArrayData(e,n,a,r){const{xScale:i,yScale:s}=e,o=new Array(r);let l,u,c,d;for(l=0,u=r;l<u;++l)c=l+a,d=n[c],o[l]={x:i.parse(d[0],c),y:s.parse(d[1],c)};return o}parseObjectData(e,n,a,r){const{xScale:i,yScale:s}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=new Array(r);let c,d,f,p;for(c=0,d=r;c<d;++c)f=c+a,p=n[f],u[c]={x:i.parse(gr(p,o),f),y:s.parse(gr(p,l),f)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,a){const r=this.chart,i=this._cachedMeta,s=n[e.axis],o={keys:Pv(r,!0),values:n._stacks[e.axis]._visualValues};return Dh(o,s,i.index,{mode:a})}updateRangeFromParsed(e,n,a,r){const i=a[n.axis];let s=i===null?NaN:i;const o=r&&a._stacks[n.axis];r&&o&&(r.values=o,s=Dh(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const a=this._cachedMeta,r=a._parsed,i=a._sorted&&e===a.iScale,s=r.length,o=this._getOtherScale(e),l=v5(n,a,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=h5(o);let f,p;function m(){p=r[f];const g=p[o.axis];return!Nt(p[e.axis])||c>g||d<g}for(f=0;f<s&&!(!m()&&(this.updateRangeFromParsed(u,e,p,l),i));++f);if(i){for(f=s-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(u,e,p,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,a=[];let r,i,s;for(r=0,i=n.length;r<i;++r)s=n[r][e.axis],Nt(s)&&a.push(s);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,a=n.iScale,r=n.vScale,i=this.getParsed(e);return{label:a?""+a.getLabelForValue(i[a.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=c5(Re(this.options.clip,u5(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,a=this._cachedMeta,r=a.data||[],i=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,u=this.options.drawActiveElementsOnTop;let c;for(a.dataset&&a.dataset.draw(e,i,o,l),c=o;c<o+l;++c){const d=r[c];d.hidden||(d.active&&u?s.push(d):d.draw(e,i))}for(c=0;c<s.length;++c)s[c].draw(e,i)}getStyle(e,n){const a=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,n,a){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];i=s.$context||(s.$context=g5(this.getContext(),e,s)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=m5(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=a,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",a){const r=n==="active",i=this._cachedDataOpts,s=e+"-"+n,o=i[s],l=this.enableOptionSharing&&wi(a);if(o)return Eh(o,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),d=r?[`${e}Hover`,"hover",e,""]:[e,""],f=u.getOptionScopes(this.getDataset(),c),p=Object.keys(Ge.elements[e]),m=()=>this.getContext(a,r,n),g=u.resolveNamedOptions(f,p,m,d);return g.$shared&&(g.$shared=l,i[s]=Object.freeze(Eh(g,l))),g}_resolveAnimations(e,n,a){const r=this.chart,i=this._cachedDataOpts,s=`animation-${n}`,o=i[s];if(o)return o;let l;if(r.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(e,a,n))}const u=new Tv(r,l&&l.animations);return l&&l._cacheable&&(i[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Vl(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const a=this.resolveDataElementOptions(e,n),r=this._sharedOptions,i=this.getSharedOptions(a),s=this.includeOptions(n,i)||i!==r;return this.updateSharedOptions(i,n,a),{sharedOptions:i,includeOptions:s}}updateElement(e,n,a,r){Vl(r)?Object.assign(e,a):this._resolveAnimations(n,r).update(e,a)}updateSharedOptions(e,n,a){e&&!Vl(n)&&this._resolveAnimations(void 0,n).update(e,a)}_setStyle(e,n,a,r){e.active=r;const i=this.getStyle(n,r);this._resolveAnimations(n,a,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,n,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,a=this._cachedMeta.data;for(const[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];const r=a.length,i=n.length,s=Math.min(i,r);s&&this.parse(0,s),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,n,a=!0){const r=this._cachedMeta,i=r.data,s=e+n;let o;const l=u=>{for(u.length+=n,o=u.length-1;o>=s;o--)u[o]=u[o-n]};for(l(i),o=e;o<s;++o)i[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(e,n),a&&this.updateElements(i,e,n,"reset")}updateElements(e,n,a,r){}_removeElements(e,n){const a=this._cachedMeta;if(this._parsing){const r=a._parsed.splice(e,n);a._stacked&&qr(a,r)}a.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,a,r]=e;this[n](a,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}we(fi,"defaults",{}),we(fi,"datasetElementType",null),we(fi,"dataElementType",null);function y5(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let a=[];for(let r=0,i=n.length;r<i;r++)a=a.concat(n[r].controller.getAllParsedValues(t));t._cache.$bar=vv(a.sort((r,i)=>r-i))}return t._cache.$bar}function b5(t){const e=t.iScale,n=y5(e,t.type);let a=e._length,r,i,s,o;const l=()=>{s===32767||s===-32768||(wi(o)&&(a=Math.min(a,Math.abs(s-o)||a)),o=s)};for(r=0,i=n.length;r<i;++r)s=e.getPixelForValue(n[r]),l();for(o=void 0,r=0,i=e.ticks.length;r<i;++r)s=e.getPixelForTick(r),l();return a}function x5(t,e,n,a){const r=n.barThickness;let i,s;return Pe(r)?(i=e.min*n.categoryPercentage,s=n.barPercentage):(i=r*a,s=1),{chunk:i/a,ratio:s,start:e.pixels[t]-i/2}}function w5(t,e,n,a){const r=e.pixels,i=r[t];let s=t>0?r[t-1]:null,o=t<r.length-1?r[t+1]:null;const l=n.categoryPercentage;s===null&&(s=i-(o===null?e.end-e.start:o-i)),o===null&&(o=i+i-s);const u=i-(i-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/a,ratio:n.barPercentage,start:u}}function _5(t,e,n,a){const r=n.parse(t[0],a),i=n.parse(t[1],a),s=Math.min(r,i),o=Math.max(r,i);let l=s,u=o;Math.abs(s)>Math.abs(o)&&(l=o,u=s),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:r,end:i,min:s,max:o}}function Iv(t,e,n,a){return at(t)?_5(t,e,n,a):e[n.axis]=n.parse(t,a),e}function Th(t,e,n,a){const r=t.iScale,i=t.vScale,s=r.getLabels(),o=r===i,l=[];let u,c,d,f;for(u=n,c=n+a;u<c;++u)f=e[u],d={},d[r.axis]=o||r.parse(s[u],u),l.push(Iv(f,d,i,u));return l}function Fl(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function $5(t,e,n){return t!==0?Qn(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function k5(t){let e,n,a,r,i;return t.horizontal?(e=t.base>t.x,n="left",a="right"):(e=t.base<t.y,n="bottom",a="top"),e?(r="end",i="start"):(r="start",i="end"),{start:n,end:a,reverse:e,top:r,bottom:i}}function S5(t,e,n,a){let r=e.borderSkipped;const i={};if(!r){t.borderSkipped=i;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:u,bottom:c}=k5(t);r==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===a?r=u:(n._bottom||0)===a?r=c:(i[Ph(c,s,o,l)]=!0,r=u)),i[Ph(r,s,o,l)]=!0,t.borderSkipped=i}function Ph(t,e,n,a){return a?(t=C5(t,e,n),t=Ih(t,n,e)):t=Ih(t,e,n),t}function C5(t,e,n){return t===e?n:t===n?e:t}function Ih(t,e,n){return t==="start"?e:t==="end"?n:t}function M5(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}let Vs=class extends fi{parsePrimitiveData(e,n,a,r){return Th(e,n,a,r)}parseArrayData(e,n,a,r){return Th(e,n,a,r)}parseObjectData(e,n,a,r){const{iScale:i,vScale:s}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?o:l,c=s.axis==="x"?o:l,d=[];let f,p,m,g;for(f=a,p=a+r;f<p;++f)g=n[f],m={},m[i.axis]=i.parse(gr(g,u),f),d.push(Iv(gr(g,c),m,s,f));return d}updateRangeFromParsed(e,n,a,r){super.updateRangeFromParsed(e,n,a,r);const i=a._custom;i&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:a,vScale:r}=n,i=this.getParsed(e),s=i._custom,o=Fl(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+a.getLabelForValue(i[a.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,a,r){const i=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),u=o.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,r);for(let p=n;p<n+a;p++){const m=this.getParsed(p),g=i||Pe(m[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),v=(m._stacks||{})[o.axis],b={horizontal:u,base:g.base,enableBorderRadius:!v||Fl(m._custom)||s===v._top||s===v._bottom,x:u?g.head:y.center,y:u?y.center:g.head,height:u?y.size:Math.abs(g.size),width:u?Math.abs(g.size):y.size};f&&(b.options=d||this.resolveDataElementOptions(p,e[p].active?"active":r));const x=b.options||e[p].options;S5(b,x,v,s),M5(b,x,c.ratio),this.updateElement(e[p],p,b,r)}}_getStacks(e,n){const{iScale:a}=this._cachedMeta,r=a.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),i=a.options.stacked,s=[],o=this._cachedMeta.controller.getParsed(n),l=o&&o[a.axis],u=c=>{const d=c._parsed.find(p=>p[a.axis]===l),f=d&&d[c.vScale.axis];if(Pe(f)||isNaN(f))return!0};for(const c of r)if(!(n!==void 0&&u(c))&&((i===!1||s.indexOf(c.stack)===-1||i===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(a=>e[a].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const a of this.chart.data.datasets)e[Re(this.chart.options.indexAxis==="x"?a.xAxisID:a.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,a){const r=this._getStacks(e,a),i=n!==void 0?r.indexOf(n):-1;return i===-1?r.length-1:i}_getRuler(){const e=this.options,n=this._cachedMeta,a=n.iScale,r=[];let i,s;for(i=0,s=n.data.length;i<s;++i)r.push(a.getPixelForValue(this.getParsed(i)[a.axis],i));const o=e.barThickness;return{min:o||b5(n),pixels:r,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:a,index:r},options:{base:i,minBarLength:s}}=this,o=i||0,l=this.getParsed(e),u=l._custom,c=Fl(u);let d=l[n.axis],f=0,p=a?this.applyStack(n,l,a):d,m,g;p!==d&&(f=p-d,p=d),c&&(d=u.barStart,p=u.barEnd-u.barStart,d!==0&&Qn(d)!==Qn(u.barEnd)&&(f=0),f+=d);const y=!Pe(i)&&!c?i:f;let v=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(f+p):m=v,g=m-v,Math.abs(g)<s){g=$5(g,n,o)*s,d===o&&(v-=g/2);const b=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),w=Math.min(b,x),$=Math.max(b,x);v=Math.max(Math.min(v,$),w),m=v+g,a&&!c&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(m)-n.getValueForPixel(v))}if(v===n.getPixelForValue(o)){const b=Qn(g)*n.getLineWidthForValue(o)/2;v+=b,g-=b}return{size:g,base:v,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const a=n.scale,r=this.options,i=r.skipNull,s=Re(r.maxBarThickness,1/0);let o,l;const u=this._getAxisCount();if(n.grouped){const c=i?this._getStackCount(e):n.stackCount,d=r.barThickness==="flex"?w5(e,n,r,c*u):x5(e,n,r,c*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Re(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+p;o=d.start+d.chunk*m+d.chunk/2,l=Math.min(s,d.chunk*d.ratio)}else o=a.getPixelForValue(this.getParsed(e)[a.axis],e),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,a=e.data,r=a.length;let i=0;for(;i<r;++i)this.getParsed(i)[n.axis]!==null&&!a[i].hidden&&a[i].draw(this._ctx)}};we(Vs,"id","bar"),we(Vs,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),we(Vs,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ba(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pd{constructor(e){we(this,"options"),this.options=e||{}}static override(e){Object.assign(pd.prototype,e)}init(){}formats(){return ba()}parse(){return ba()}format(){return ba()}add(){return ba()}diff(){return ba()}startOf(){return ba()}endOf(){return ba()}}var Lv={_date:pd};function D5(t,e,n,a){const{controller:r,data:i,_sorted:s}=t,o=r._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&e!=="r"&&s&&i.length){const u=o._reversePixels?cE:Ou;if(a){if(r._sharedOptions){const c=i[0],d=typeof c.getRange=="function"&&c.getRange(e);if(d){const f=u(i,e,n-d),p=u(i,e,n+d);return{lo:f.lo,hi:p.hi}}}}else{const c=u(i,e,n);if(l){const{vScale:d}=r._cachedMeta,{_parsed:f}=t,p=f.slice(0,c.lo+1).reverse().findIndex(g=>!Pe(g[d.axis]));c.lo-=Math.max(0,p);const m=f.slice(c.hi).findIndex(g=>!Pe(g[d.axis]));c.hi+=Math.max(0,m)}return c}}return{lo:0,hi:i.length-1}}function Yo(t,e,n,a,r){const i=t.getSortedVisibleDatasetMetas(),s=n[e];for(let o=0,l=i.length;o<l;++o){const{index:u,data:c}=i[o],{lo:d,hi:f}=D5(i[o],e,s,r);for(let p=d;p<=f;++p){const m=c[p];m.skip||a(m,u,p)}}}function A5(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(a,r){const i=e?Math.abs(a.x-r.x):0,s=n?Math.abs(a.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}function Bl(t,e,n,a,r){const i=[];return!r&&!t.isPointInArea(e)||Yo(t,n,e,function(s,o,l){!r&&!$v(s,t.chartArea,0)||s.inRange(e.x,e.y,a)&&i.push({element:s,datasetIndex:o,index:l})},!0),i}function O5(t,e,n,a){let r=[];function i(s,o,l){const{startAngle:u,endAngle:c}=s.getProps(["startAngle","endAngle"],a),{angle:d}=sE(s,{x:e.x,y:e.y});lE(d,u,c)&&r.push({element:s,datasetIndex:o,index:l})}return Yo(t,n,e,i),r}function E5(t,e,n,a,r,i){let s=[];const o=A5(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const p=c.inRange(e.x,e.y,r);if(a&&!p)return;const m=c.getCenterPoint(r);if(!(i||t.isPointInArea(m))&&!p)return;const g=o(e,m);g<l?(s=[{element:c,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:c,datasetIndex:d,index:f})}return Yo(t,n,e,u),s}function Rl(t,e,n,a,r,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!a?O5(t,e,n,r):E5(t,e,n,a,r,i)}function Lh(t,e,n,a,r){const i=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return Yo(t,n,e,(l,u,c)=>{l[s]&&l[s](e[n],r)&&(i.push({element:l,datasetIndex:u,index:c}),o=o||l.inRange(e.x,e.y,r))}),a&&!o?[]:i}var T5={modes:{index(t,e,n,a){const r=xa(e,t),i=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?Bl(t,r,i,a,s):Rl(t,r,i,!1,a,s),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=o[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,a){const r=xa(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?Bl(t,r,i,a,s):Rl(t,r,i,!1,a,s);if(o.length>0){const l=o[0].datasetIndex,u=t.getDatasetMeta(l).data;o=[];for(let c=0;c<u.length;++c)o.push({element:u[c],datasetIndex:l,index:c})}return o},point(t,e,n,a){const r=xa(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;return Bl(t,r,i,a,s)},nearest(t,e,n,a){const r=xa(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;return Rl(t,r,i,n.intersect,a,s)},x(t,e,n,a){const r=xa(e,t);return Lh(t,r,"x",n.intersect,a)},y(t,e,n,a){const r=xa(e,t);return Lh(t,r,"y",n.intersect,a)}}};const qv=["left","top","right","bottom"];function Vr(t,e){return t.filter(n=>n.pos===e)}function qh(t,e){return t.filter(n=>qv.indexOf(n.pos)===-1&&n.box.axis===e)}function Fr(t,e){return t.sort((n,a)=>{const r=e?a:n,i=e?n:a;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function P5(t){const e=[];let n,a,r,i,s,o;for(n=0,a=(t||[]).length;n<a;++n)r=t[n],{position:i,options:{stack:s,stackWeight:o=1}}=r,e.push({index:n,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&i+s,stackWeight:o});return e}function I5(t){const e={};for(const n of t){const{stack:a,pos:r,stackWeight:i}=n;if(!a||!qv.includes(r))continue;const s=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=i}return e}function L5(t,e){const n=I5(t),{vBoxMaxWidth:a,hBoxMaxHeight:r}=e;let i,s,o;for(i=0,s=t.length;i<s;++i){o=t[i];const{fullSize:l}=o.box,u=n[o.stack],c=u&&o.stackWeight/u.weight;o.horizontal?(o.width=c?c*a:l&&e.availableWidth,o.height=r):(o.width=a,o.height=c?c*r:l&&e.availableHeight)}return n}function q5(t){const e=P5(t),n=Fr(e.filter(u=>u.box.fullSize),!0),a=Fr(Vr(e,"left"),!0),r=Fr(Vr(e,"right")),i=Fr(Vr(e,"top"),!0),s=Fr(Vr(e,"bottom")),o=qh(e,"x"),l=qh(e,"y");return{fullSize:n,leftAndTop:a.concat(i),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Vr(e,"chartArea"),vertical:a.concat(r).concat(l),horizontal:i.concat(s).concat(o)}}function Vh(t,e,n,a){return Math.max(t[n],e[n])+Math.max(t[a],e[a])}function Vv(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function V5(t,e,n,a){const{pos:r,box:i}=n,s=t.maxPadding;if(!_e(r)){n.size&&(t[r]-=n.size);const d=a[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,t[r]+=n.size}i.getPadding&&Vv(s,i.getPadding());const o=Math.max(0,e.outerWidth-Vh(s,t,"left","right")),l=Math.max(0,e.outerHeight-Vh(s,t,"top","bottom")),u=o!==t.w,c=l!==t.h;return t.w=o,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function F5(t){const e=t.maxPadding;function n(a){const r=Math.max(e[a]-t[a],0);return t[a]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function B5(t,e){const n=e.maxPadding;function a(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{i[s]=Math.max(e[s],n[s])}),i}return a(t?["left","right"]:["top","bottom"])}function ti(t,e,n,a){const r=[];let i,s,o,l,u,c;for(i=0,s=t.length,u=0;i<s;++i){o=t[i],l=o.box,l.update(o.width||e.w,o.height||e.h,B5(o.horizontal,e));const{same:d,other:f}=V5(e,n,o,a);u|=d&&r.length,c=c||f,l.fullSize||r.push(o)}return u&&ti(r,e,n,a)||c}function ss(t,e,n,a,r){t.top=n,t.left=e,t.right=e+a,t.bottom=n+r,t.width=a,t.height=r}function Fh(t,e,n,a){const r=n.padding;let{x:i,y:s}=e;for(const o of t){const l=o.box,u=a[o.stack]||{placed:0,weight:1},c=o.stackWeight/u.weight||1;if(o.horizontal){const d=e.w*c,f=u.size||l.height;wi(u.start)&&(s=u.start),l.fullSize?ss(l,r.left,s,n.outerWidth-r.right-r.left,f):ss(l,e.left+u.placed,s,d,f),u.start=s,u.placed+=d,s=l.bottom}else{const d=e.h*c,f=u.size||l.width;wi(u.start)&&(i=u.start),l.fullSize?ss(l,i,r.top,f,n.outerHeight-r.bottom-r.top):ss(l,i,e.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}e.x=i,e.y=s}var os={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,a){if(!t)return;const r=ia(t.options.layout.padding),i=Math.max(e-r.width,0),s=Math.max(n-r.height,0),o=q5(t.boxes),l=o.vertical,u=o.horizontal;Se(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const c=l.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/c,hBoxMaxHeight:s/2}),f=Object.assign({},r);Vv(f,ia(a));const p=Object.assign({maxPadding:f,w:i,h:s,x:r.left,y:r.top},r),m=L5(l.concat(u),d);ti(o.fullSize,p,d,m),ti(l,p,d,m),ti(u,p,d,m)&&ti(l,p,d,m),F5(p),Fh(o.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,Fh(o.rightAndBottom,p,d,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Se(o.chartArea,g=>{const y=g.box;Object.assign(y,t.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Fv{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,a){}removeEventListener(e,n,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,a,r){return n=Math.max(0,n||e.width),a=a||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):a)}}isAttached(e){return!0}updateConfig(e){}}class R5 extends Fv{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Fs="$chartjs",N5={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Bh=t=>t===null||t==="";function j5(t,e){const n=t.style,a=t.getAttribute("height"),r=t.getAttribute("width");if(t[Fs]={initial:{height:a,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Bh(r)){const i=Sh(t,"width");i!==void 0&&(t.width=i)}if(Bh(a))if(t.style.height==="")t.height=t.width/(e||2);else{const i=Sh(t,"height");i!==void 0&&(t.height=i)}return t}const Bv=GE?{passive:!0}:!1;function z5(t,e,n){t&&t.addEventListener(e,n,Bv)}function W5(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Bv)}function H5(t,e){const n=N5[t.type]||t.type,{x:a,y:r}=xa(t,e);return{type:n,chart:e,native:t,x:a!==void 0?a:null,y:r!==void 0?r:null}}function go(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function U5(t,e,n){const a=t.canvas,r=new MutationObserver(i=>{let s=!1;for(const o of i)s=s||go(o.addedNodes,a),s=s&&!go(o.removedNodes,a);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Y5(t,e,n){const a=t.canvas,r=new MutationObserver(i=>{let s=!1;for(const o of i)s=s||go(o.removedNodes,a),s=s&&!go(o.addedNodes,a);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const _i=new Map;let Rh=0;function Rv(){const t=window.devicePixelRatio;t!==Rh&&(Rh=t,_i.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function K5(t,e){_i.size||window.addEventListener("resize",Rv),_i.set(t,e)}function G5(t){_i.delete(t),_i.size||window.removeEventListener("resize",Rv)}function Z5(t,e,n){const a=t.canvas,r=a&&hd(a);if(!r)return;const i=bv((o,l)=>{const u=r.clientWidth;n(o,l),u<r.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return s.observe(r),K5(t,i),s}function Nl(t,e,n){n&&n.disconnect(),e==="resize"&&G5(t)}function J5(t,e,n){const a=t.canvas,r=bv(i=>{t.ctx!==null&&n(H5(i,t))},t);return z5(a,e,r),r}class X5 extends Fv{acquireContext(e,n){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(j5(e,n),a):null}releaseContext(e){const n=e.canvas;if(!n[Fs])return!1;const a=n[Fs].initial;["height","width"].forEach(i=>{const s=a[i];Pe(s)?n.removeAttribute(i):n.setAttribute(i,s)});const r=a.style||{};return Object.keys(r).forEach(i=>{n.style[i]=r[i]}),n.width=n.width,delete n[Fs],!0}addEventListener(e,n,a){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),i={attach:U5,detach:Y5,resize:Z5}[n]||J5;r[n]=i(e,n,a)}removeEventListener(e,n){const a=e.$proxies||(e.$proxies={}),r=a[n];r&&(({attach:Nl,detach:Nl,resize:Nl}[n]||W5)(e,n,r),a[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,a,r){return KE(e,n,a,r)}isAttached(e){const n=e&&hd(e);return!!(n&&n.isConnected)}}function Q5(t){return!fd()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?R5:X5}class yr{constructor(){we(this,"x"),we(this,"y"),we(this,"active",!1),we(this,"options"),we(this,"$animations")}tooltipPosition(e){const{x:n,y:a}=this.getProps(["x","y"],e);return{x:n,y:a}}hasValue(){return po(this.x)&&po(this.y)}getProps(e,n){const a=this.$animations;if(!n||!a)return this;const r={};return e.forEach(i=>{r[i]=a[i]&&a[i].active()?a[i]._to:this[i]}),r}}we(yr,"defaults",{}),we(yr,"defaultRoutes");function eT(t,e){const n=t.options.ticks,a=tT(t),r=Math.min(n.maxTicksLimit||a,a),i=n.major.enabled?aT(e):[],s=i.length,o=i[0],l=i[s-1],u=[];if(s>r)return rT(e,u,i,s/r),u;const c=nT(i,e,r);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(ls(e,u,c,Pe(p)?0:o-p,o),d=0,f=s-1;d<f;d++)ls(e,u,c,i[d],i[d+1]);return ls(e,u,c,l,Pe(p)?e.length:l+p),u}return ls(e,u,c),u}function tT(t){const e=t.options.offset,n=t._tickSize(),a=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(a,r))}function nT(t,e,n){const a=iT(t),r=e.length/n;if(!a)return Math.max(r,1);const i=tE(a);for(let s=0,o=i.length-1;s<o;s++){const l=i[s];if(l>r)return l}return Math.max(r,1)}function aT(t){const e=[];let n,a;for(n=0,a=t.length;n<a;n++)t[n].major&&e.push(n);return e}function rT(t,e,n,a){let r=0,i=n[0],s;for(a=Math.ceil(a),s=0;s<t.length;s++)s===i&&(e.push(t[s]),r++,i=n[r*a])}function ls(t,e,n,a,r){const i=Re(a,0),s=Math.min(Re(r,t.length),t.length);let o=0,l,u,c;for(n=Math.ceil(n),r&&(l=r-a,n=l/Math.floor(l/n)),c=i;c<0;)o++,c=Math.round(i+o*n);for(u=Math.max(i,0);u<s;u++)u===c&&(e.push(t[u]),o++,c=Math.round(i+o*n))}function iT(t){const e=t.length;let n,a;if(e<2)return!1;for(a=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==a)return!1;return a}const sT=t=>t==="left"?"right":t==="right"?"left":t,Nh=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,jh=(t,e)=>Math.min(e||t,t);function zh(t,e){const n=[],a=t.length/e,r=t.length;let i=0;for(;i<r;i+=a)n.push(t[Math.floor(i)]);return n}function oT(t,e,n){const a=t.ticks.length,r=Math.min(e,a-1),i=t._startPixel,s=t._endPixel,o=1e-6;let l=t.getPixelForTick(r),u;if(!(n&&(a===1?u=Math.max(l-i,s-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(r-1))/2,l+=r<e?u:-u,l<i-o||l>s+o)))return l}function lT(t,e){Se(t,n=>{const a=n.gc,r=a.length/2;let i;if(r>e){for(i=0;i<r;++i)delete n.data[a[i]];a.splice(0,r)}})}function Br(t){return t.drawTicks?t.tickLength:0}function Wh(t,e){if(!t.display)return 0;const n=dn(t.font,e),a=ia(t.padding);return(at(t.text)?t.text.length:1)*n.lineHeight+a.height}function uT(t,e){return Mr(t,{scale:e,type:"scale"})}function cT(t,e,n){return Mr(t,{tick:n,index:e,type:"tick"})}function dT(t,e,n){let a=pE(t);return(n&&e!=="right"||!n&&e==="right")&&(a=sT(a)),a}function fT(t,e,n,a){const{top:r,left:i,bottom:s,right:o,chart:l}=t,{chartArea:u,scales:c}=l;let d=0,f,p,m;const g=s-r,y=o-i;if(t.isHorizontal()){if(p=hh(a,i,o),_e(n)){const v=Object.keys(n)[0],b=n[v];m=c[v].getPixelForValue(b)+g-e}else n==="center"?m=(u.bottom+u.top)/2+g-e:m=Nh(t,n,e);f=o-i}else{if(_e(n)){const v=Object.keys(n)[0],b=n[v];p=c[v].getPixelForValue(b)-y+e}else n==="center"?p=(u.left+u.right)/2-y+e:p=Nh(t,n,e);m=hh(a,s,r),d=n==="left"?-Gt:Gt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Dr extends yr{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:a,_suggestedMax:r}=this;return e=rn(e,Number.POSITIVE_INFINITY),n=rn(n,Number.NEGATIVE_INFINITY),a=rn(a,Number.POSITIVE_INFINITY),r=rn(r,Number.NEGATIVE_INFINITY),{min:rn(e,a),max:rn(n,r),minDefined:Nt(e),maxDefined:Nt(n)}}getMinMax(e){let{min:n,max:a,minDefined:r,maxDefined:i}=this.getUserBounds(),s;if(r&&i)return{min:n,max:a};const o=this.getMatchingVisibleMetas();for(let l=0,u=o.length;l<u;++l)s=o[l].controller.getMinMax(this,e),r||(n=Math.min(n,s.min)),i||(a=Math.max(a,s.max));return n=i&&n>a?a:n,a=r&&n>a?n:a,{min:rn(n,rn(a,n)),max:rn(a,rn(n,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){We(this.options.beforeUpdate,[this])}update(e,n,a){const{beginAtZero:r,grace:i,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=PE(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?zh(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=eT(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,a;this.isHorizontal()?(n=this.left,a=this.right):(n=this.top,a=this.bottom,e=!e),this._startPixel=n,this._endPixel=a,this._reversePixels=e,this._length=a-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){We(this.options.afterUpdate,[this])}beforeSetDimensions(){We(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){We(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),We(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){We(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let a,r,i;for(a=0,r=e.length;a<r;a++)i=e[a],i.label=We(n.callback,[i.value,a,e],this)}afterTickToLabelConversion(){We(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){We(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,a=jh(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,i=n.maxRotation;let s=r,o,l,u;if(!this._isVisible()||!n.display||r>=i||a<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,p=Zt(this.chart.width-d,0,this.maxWidth);o=e.offset?this.maxWidth/a:p/(a-1),d+6>o&&(o=p/(a-(e.offset?.5:1)),l=this.maxHeight-Br(e.grid)-n.padding-Wh(e.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),s=iE(Math.min(Math.asin(Zt((c.highest.height+6)/o,-1,1)),Math.asin(Zt(l/u,-1,1))-Math.asin(Zt(f/u,-1,1)))),s=Math.max(r,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){We(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){We(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:a,title:r,grid:i}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=Wh(r,n.options.font);if(o?(e.width=this.maxWidth,e.height=Br(i)+l):(e.height=this.maxHeight,e.width=Br(i)+l),a.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=a.padding*2,m=$a(this.labelRotation),g=Math.cos(m),y=Math.sin(m);if(o){const v=a.mirror?0:y*d.width+g*f.height;e.height=Math.min(this.maxHeight,e.height+v+p)}else{const v=a.mirror?0:g*d.width+y*f.height;e.width=Math.min(this.maxWidth,e.width+v+p)}this._calculatePadding(u,c,y,g)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,a,r){const{ticks:{align:i,padding:s},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?u?(f=r*e.width,p=a*n.height):(f=a*e.height,p=r*n.width):i==="start"?p=n.width:i==="end"?f=e.width:i!=="inner"&&(f=e.width/2,p=n.width/2),this.paddingLeft=Math.max((f-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let c=n.height/2,d=e.height/2;i==="start"?(c=0,d=e.height):i==="end"&&(c=n.height,d=0),this.paddingTop=c+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){We(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,a;for(n=0,a=e.length;n<a;n++)Pe(e[n].label)&&(e.splice(n,1),a--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let a=this.ticks;n<a.length&&(a=zh(a,n)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,a){const{ctx:r,_longestTextCache:i}=this,s=[],o=[],l=Math.floor(n/jh(n,a));let u=0,c=0,d,f,p,m,g,y,v,b,x,w,$;for(d=0;d<n;d+=l){if(m=e[d].label,g=this._resolveTickFontOptions(d),r.font=y=g.string,v=i[y]=i[y]||{data:{},gc:[]},b=g.lineHeight,x=w=0,!Pe(m)&&!at(m))x=yh(r,v.data,v.gc,x,m),w=b;else if(at(m))for(f=0,p=m.length;f<p;++f)$=m[f],!Pe($)&&!at($)&&(x=yh(r,v.data,v.gc,x,$),w+=b);s.push(x),o.push(w),u=Math.max(x,u),c=Math.max(w,c)}lT(i,n);const S=s.indexOf(u),E=o.indexOf(c),A=B=>({width:s[B]||0,height:o[B]||0});return{first:A(0),last:A(n-1),widest:A(S),highest:A(E),widths:s,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return uE(this._alignToPixels?ya(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const a=n[e];return a.$context||(a.$context=cT(this.getContext(),e,a))}return this.$context||(this.$context=uT(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=$a(this.labelRotation),a=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),i=this._getLabelSizes(),s=e.autoSkipPadding||0,o=i?i.widest.width+s:0,l=i?i.highest.height+s:0;return this.isHorizontal()?l*a>o*r?o/a:l/r:l*r<o*a?l/a:o/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,a=this.chart,r=this.options,{grid:i,position:s,border:o}=r,l=i.offset,u=this.isHorizontal(),c=this.ticks.length+(l?1:0),d=Br(i),f=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,y=function(q){return ya(a,q,m)};let v,b,x,w,$,S,E,A,B,z,W,U;if(s==="top")v=y(this.bottom),S=this.bottom-d,A=v-g,z=y(e.top)+g,U=e.bottom;else if(s==="bottom")v=y(this.top),z=e.top,U=y(e.bottom)-g,S=v+g,A=this.top+d;else if(s==="left")v=y(this.right),$=this.right-d,E=v-g,B=y(e.left)+g,W=e.right;else if(s==="right")v=y(this.left),B=e.left,W=y(e.right)-g,$=v+g,E=this.left+d;else if(n==="x"){if(s==="center")v=y((e.top+e.bottom)/2+.5);else if(_e(s)){const q=Object.keys(s)[0],j=s[q];v=y(this.chart.scales[q].getPixelForValue(j))}z=e.top,U=e.bottom,S=v+g,A=S+d}else if(n==="y"){if(s==="center")v=y((e.left+e.right)/2);else if(_e(s)){const q=Object.keys(s)[0],j=s[q];v=y(this.chart.scales[q].getPixelForValue(j))}$=v-g,E=$-d,B=e.left,W=e.right}const X=Re(r.ticks.maxTicksLimit,c),N=Math.max(1,Math.ceil(c/X));for(b=0;b<c;b+=N){const q=this.getContext(b),j=i.setContext(q),J=o.setContext(q),Y=j.lineWidth,ne=j.color,K=J.dash||[],ee=J.dashOffset,fe=j.tickWidth,le=j.tickColor,pe=j.tickBorderDash||[],he=j.tickBorderDashOffset;x=oT(this,b,l),x!==void 0&&(w=ya(a,x,Y),u?$=E=B=W=w:S=A=z=U=w,f.push({tx1:$,ty1:S,tx2:E,ty2:A,x1:B,y1:z,x2:W,y2:U,width:Y,color:ne,borderDash:K,borderDashOffset:ee,tickWidth:fe,tickColor:le,tickBorderDash:pe,tickBorderDashOffset:he}))}return this._ticksLength=c,this._borderValue=v,f}_computeLabelItems(e){const n=this.axis,a=this.options,{position:r,ticks:i}=a,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,f=Br(a.grid),p=f+c,m=d?-c:p,g=-$a(this.labelRotation),y=[];let v,b,x,w,$,S,E,A,B,z,W,U,X="middle";if(r==="top")S=this.bottom-m,E=this._getXAxisLabelAlignment();else if(r==="bottom")S=this.top+m,E=this._getXAxisLabelAlignment();else if(r==="left"){const q=this._getYAxisLabelAlignment(f);E=q.textAlign,$=q.x}else if(r==="right"){const q=this._getYAxisLabelAlignment(f);E=q.textAlign,$=q.x}else if(n==="x"){if(r==="center")S=(e.top+e.bottom)/2+p;else if(_e(r)){const q=Object.keys(r)[0],j=r[q];S=this.chart.scales[q].getPixelForValue(j)+p}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")$=(e.left+e.right)/2-p;else if(_e(r)){const q=Object.keys(r)[0],j=r[q];$=this.chart.scales[q].getPixelForValue(j)}E=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?X="top":l==="end"&&(X="bottom"));const N=this._getLabelSizes();for(v=0,b=o.length;v<b;++v){x=o[v],w=x.label;const q=i.setContext(this.getContext(v));A=this.getPixelForTick(v)+i.labelOffset,B=this._resolveTickFontOptions(v),z=B.lineHeight,W=at(w)?w.length:1;const j=W/2,J=q.color,Y=q.textStrokeColor,ne=q.textStrokeWidth;let K=E;s?($=A,E==="inner"&&(v===b-1?K=this.options.reverse?"left":"right":v===0?K=this.options.reverse?"right":"left":K="center"),r==="top"?u==="near"||g!==0?U=-W*z+z/2:u==="center"?U=-N.highest.height/2-j*z+z:U=-N.highest.height+z/2:u==="near"||g!==0?U=z/2:u==="center"?U=N.highest.height/2-j*z:U=N.highest.height-W*z,d&&(U*=-1),g!==0&&!q.showLabelBackdrop&&($+=z/2*Math.sin(g))):(S=A,U=(1-W)*z/2);let ee;if(q.showLabelBackdrop){const fe=ia(q.backdropPadding),le=N.heights[v],pe=N.widths[v];let he=U-fe.top,be=0-fe.left;switch(X){case"middle":he-=le/2;break;case"bottom":he-=le;break}switch(E){case"center":be-=pe/2;break;case"right":be-=pe;break;case"inner":v===b-1?be-=pe:v>0&&(be-=pe/2);break}ee={left:be,top:he,width:pe+fe.width,height:le+fe.height,color:q.backdropColor}}y.push({label:w,font:B,textOffset:U,options:{rotation:g,color:J,strokeColor:Y,strokeWidth:ne,textAlign:K,textBaseline:X,translation:[$,S],backdrop:ee}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-$a(this.labelRotation))return e==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:a,mirror:r,padding:i}}=this.options,s=this._getLabelSizes(),o=e+i,l=s.widest.width;let u,c;return n==="left"?r?(c=this.right+i,a==="near"?u="left":a==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-o,a==="near"?u="right":a==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?r?(c=this.left+i,a==="near"?u="right":a==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+o,a==="near"?u="left":a==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:a,top:r,width:i,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(a,r,i,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(r=>r.value===e);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(e){const n=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,s;const o=(l,u,c)=>{!c.width||!c.color||(a.save(),a.lineWidth=c.width,a.strokeStyle=c.color,a.setLineDash(c.borderDash||[]),a.lineDashOffset=c.borderDashOffset,a.beginPath(),a.moveTo(l.x,l.y),a.lineTo(u.x,u.y),a.stroke(),a.restore())};if(n.display)for(i=0,s=r.length;i<s;++i){const l=r[i];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:a,grid:r}}=this,i=a.setContext(this.getContext()),s=a.display?i.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=ya(e,this.left,s)-s/2,c=ya(e,this.right,o)+o/2,d=f=l):(d=ya(e,this.top,s)-s/2,f=ya(e,this.bottom,o)+o/2,u=c=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,a=this._computeLabelArea();a&&kv(n,a);const r=this.getLabelItems(e);for(const i of r){const s=i.options,o=i.font,l=i.label,u=i.textOffset;wh(n,l,0,u,o,s)}a&&Sv(n)}drawTitle(){const{ctx:e,options:{position:n,title:a,reverse:r}}=this;if(!a.display)return;const i=dn(a.font),s=ia(a.padding),o=a.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||_e(n)?(l+=s.bottom,at(a.text)&&(l+=i.lineHeight*(a.text.length-1))):l+=s.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=fT(this,l,n,o);wh(e,a.text,0,0,i,{color:a.color,maxWidth:d,rotation:f,textAlign:dT(o,n,r),textBaseline:"middle",translation:[u,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,a=Re(e.grid&&e.grid.z,-1),r=Re(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Dr.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:a,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];o[a]===this.id&&(!e||o.type===e)&&r.push(o)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return dn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class us{constructor(e,n,a){this.type=e,this.scope=n,this.override=a,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let a;mT(n)&&(a=this.register(n));const r=this.items,i=e.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,hT(e,s,a),this.override&&Ge.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,a=e.id,r=this.scope;a in n&&delete n[a],r&&a in Ge[r]&&(delete Ge[r][a],this.override&&delete Pa[a])}}function hT(t,e,n){const a=xi(Object.create(null),[n?Ge.get(n):{},Ge.get(e),t.defaults]);Ge.set(e,a),t.defaultRoutes&&pT(e,t.defaultRoutes),t.descriptors&&Ge.describe(e,t.descriptors)}function pT(t,e){Object.keys(e).forEach(n=>{const a=n.split("."),r=a.pop(),i=[t].concat(a).join("."),s=e[n].split("."),o=s.pop(),l=s.join(".");Ge.route(i,r,l,o)})}function mT(t){return"id"in t&&"defaults"in t}class gT{constructor(){this.controllers=new us(fi,"datasets",!0),this.elements=new us(yr,"elements"),this.plugins=new us(Object,"plugins"),this.scales=new us(Dr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,a){[...n].forEach(r=>{const i=a||this._getRegistryForType(r);a||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):Se(r,s=>{const o=a||this._getRegistryForType(s);this._exec(e,o,s)})})}_exec(e,n,a){const r=od(e);We(a["before"+r],[],a),n[e](a),We(a["after"+r],[],a)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const a=this._typedRegistries[n];if(a.isForType(e))return a}return this.plugins}_get(e,n,a){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return r}}var ln=new gT;class vT{constructor(){this._init=void 0}notify(e,n,a,r){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const i=r?this._descriptors(e).filter(r):this._descriptors(e),s=this._notify(i,e,n,a);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),s}_notify(e,n,a,r){r=r||{};for(const i of e){const s=i.plugin,o=s[a],l=[n,r,i.options];if(We(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){Pe(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const a=e&&e.config,r=Re(a.options&&a.options.plugins,{}),i=yT(a);return r===!1&&!n?[]:xT(e,i,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],a=this._cache,r=(i,s)=>i.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(n,a),e,"stop"),this._notify(r(a,n),e,"start")}}function yT(t){const e={},n=[],a=Object.keys(ln.plugins.items);for(let i=0;i<a.length;i++)n.push(ln.getPlugin(a[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const s=r[i];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function bT(t,e){return!e&&t===!1?null:t===!0?{}:t}function xT(t,{plugins:e,localIds:n},a,r){const i=[],s=t.getContext();for(const o of e){const l=o.id,u=bT(a[l],r);u!==null&&i.push({plugin:o,options:wT(t.config,{plugin:o,local:n[l]},u,s)})}return i}function wT(t,{plugin:e,local:n},a,r){const i=t.pluginScopeKeys(e),s=t.getOptionScopes(a,i);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Pu(t,e){const n=Ge.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function _T(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function $T(t,e){return t===e?"_index_":"_value_"}function Hh(t){if(t==="x"||t==="y"||t==="r")return t}function kT(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Iu(t,...e){if(Hh(t))return t;for(const n of e){const a=n.axis||kT(n.position)||t.length>1&&Hh(t[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Uh(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function ST(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(a=>a.xAxisID===t||a.yAxisID===t);if(n.length)return Uh(t,"x",n[0])||Uh(t,"y",n[0])}return{}}function CT(t,e){const n=Pa[t.type]||{scales:{}},a=e.scales||{},r=Pu(t.type,e),i=Object.create(null);return Object.keys(a).forEach(s=>{const o=a[s];if(!_e(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Iu(s,o,ST(s,t),Ge.scales[o.type]),u=$T(l,r),c=n.scales||{};i[s]=li(Object.create(null),[{axis:l},o,c[l],c[u]])}),t.data.datasets.forEach(s=>{const o=s.type||t.type,l=s.indexAxis||Pu(o,e),u=(Pa[o]||{}).scales||{};Object.keys(u).forEach(c=>{const d=_T(c,l),f=s[d+"AxisID"]||d;i[f]=i[f]||Object.create(null),li(i[f],[{axis:d},a[f],u[c]])})}),Object.keys(i).forEach(s=>{const o=i[s];li(o,[Ge.scales[o.type],Ge.scale])}),i}function Nv(t){const e=t.options||(t.options={});e.plugins=Re(e.plugins,{}),e.scales=CT(t,e)}function jv(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function MT(t){return t=t||{},t.data=jv(t.data),Nv(t),t}const Yh=new Map,zv=new Set;function cs(t,e){let n=Yh.get(t);return n||(n=e(),Yh.set(t,n),zv.add(n)),n}const Rr=(t,e,n)=>{const a=gr(e,n);a!==void 0&&t.add(a)};class DT{constructor(e){this._config=MT(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=jv(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Nv(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cs(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return cs(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return cs(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,a=this.type;return cs(`${a}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const a=this._scopeCache;let r=a.get(e);return(!r||n)&&(r=new Map,a.set(e,r)),r}getOptionScopes(e,n,a){const{options:r,type:i}=this,s=this._cachedScopes(e,a),o=s.get(n);if(o)return o;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(d=>Rr(l,e,d))),c.forEach(d=>Rr(l,r,d)),c.forEach(d=>Rr(l,Pa[i]||{},d)),c.forEach(d=>Rr(l,Ge,d)),c.forEach(d=>Rr(l,Eu,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),zv.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Pa[n]||{},Ge.datasets[n]||{},{type:n},Ge,Eu]}resolveNamedOptions(e,n,a,r=[""]){const i={$shared:!0},{resolver:s,subPrefixes:o}=Kh(this._resolverCache,e,r);let l=s;if(OT(s,n)){i.$shared=!1,a=ra(a)?a():a;const u=this.createResolver(e,a,o);l=vr(s,a,u)}for(const u of n)i[u]=l[u];return i}createResolver(e,n,a=[""],r){const{resolver:i}=Kh(this._resolverCache,e,a);return _e(n)?vr(i,n,void 0,r):i}}function Kh(t,e,n){let a=t.get(e);a||(a=new Map,t.set(e,a));const r=n.join();let i=a.get(r);return i||(i={resolver:ud(e,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},a.set(r,i)),i}const AT=t=>_e(t)&&Object.getOwnPropertyNames(t).some(e=>ra(t[e]));function OT(t,e){const{isScriptable:n,isIndexable:a}=Dv(t);for(const r of e){const i=n(r),s=a(r),o=(s||i)&&t[r];if(i&&(ra(o)||AT(o))||s&&at(o))return!0}return!1}var ET="4.5.1";const TT=["top","bottom","left","right","chartArea"];function Gh(t,e){return t==="top"||t==="bottom"||TT.indexOf(t)===-1&&e==="x"}function Zh(t,e){return function(n,a){return n[t]===a[t]?n[e]-a[e]:n[t]-a[t]}}function Jh(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),We(n&&n.onComplete,[t],e)}function PT(t){const e=t.chart,n=e.options.animation;We(n&&n.onProgress,[t],e)}function Wv(t){return fd()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const vo={},Hv=t=>{const e=Wv(t);return Object.values(vo).filter(n=>n.canvas===e).pop()};function IT(t,e,n){const a=Object.keys(t);for(const r of a){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}function LT(t,e,n,a){return!n||t.type==="mouseout"?null:a?e:t}class Un{static register(...e){ln.add(...e),Xh()}static unregister(...e){ln.remove(...e),Xh()}constructor(e,n){const a=this.config=new DT(n),r=Wv(e),i=Hv(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const s=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||Q5(r)),this.platform.updateConfig(a);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,u=l&&l.height,c=l&&l.width;if(this.id=YO(),this.ctx=o,this.canvas=l,this.width=c,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new vT,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=hE(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],vo[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$n.listen(this,"complete",Jh),$n.listen(this,"progress",PT),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:a,height:r,_aspectRatio:i}=this;return Pe(e)?n&&i?i:r?a/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ln}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bh(this.canvas,this.ctx),this}stop(){return $n.stop(this),this}resize(e,n){$n.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const a=this.options,r=this.canvas,i=a.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,e,n,i),o=a.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,kh(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),We(a.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Se(e,(n,a)=>{n.id=a})}buildOrUpdateScales(){const e=this.options,n=e.scales,a=this.scales,r=Object.keys(a).reduce((s,o)=>(s[o]=!1,s),{});let i=[];n&&(i=i.concat(Object.keys(n).map(s=>{const o=n[s],l=Iu(s,o),u=l==="r",c=l==="x";return{options:o,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Se(i,s=>{const o=s.options,l=o.id,u=Iu(l,o),c=Re(o.type,s.dtype);(o.position===void 0||Gh(o.position,u)!==Gh(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in a&&a[l].type===c)d=a[l];else{const f=ln.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),a[d.id]=d}d.init(o,e)}),Se(r,(s,o)=>{s||delete a[o]}),Se(a,s=>{os.configure(this,s,s.options),os.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,a=e.length;if(e.sort((r,i)=>r.index-i.index),a>n){for(let r=n;r<a;++r)this._destroyDatasetMeta(r);e.splice(n,a-n)}this._sortedMetasets=e.slice(0).sort(Zh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((a,r)=>{n.filter(i=>i===a._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let a,r;for(this._removeUnreferencedMetasets(),a=0,r=n.length;a<r;a++){const i=n[a];let s=this.getDatasetMeta(a);const o=i.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(a),s=this.getDatasetMeta(a)),s.type=o,s.indexAxis=i.indexAxis||Pu(o,this.options),s.order=i.order||0,s.index=a,s.label=""+i.label,s.visible=this.isDatasetVisible(a),s.controller)s.controller.updateIndex(a),s.controller.linkScales();else{const l=ln.getController(o),{datasetElementType:u,dataElementType:c}=Ge.datasets[o];Object.assign(l,{dataElementType:ln.getElement(c),datasetElementType:u&&ln.getElement(u)}),s.controller=new l(this,a),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){Se(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const a=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!r&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=a.layout.autoPadding?s:0,this._updateLayout(s),r||Se(i,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Zh("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Se(this.scales,e=>{os.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!oh(n,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:a,start:r,count:i}of n){const s=a==="_removeElements"?-i:i;IT(e,r,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,a=i=>new Set(e.filter(s=>s[0]===i).map((s,o)=>o+","+s.splice(1).join(","))),r=a(0);for(let i=1;i<n;i++)if(!oh(r,a(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;os.update(this,this.width,this.height,e);const n=this.chartArea,a=n.width<=0||n.height<=0;this._layers=[],Se(this.boxes,r=>{a&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,a=this.data.datasets.length;n<a;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,a=this.data.datasets.length;n<a;++n)this._updateDataset(n,ra(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const a=this.getDatasetMeta(e),r={meta:a,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(a.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&($n.has(this)?this.attached&&!$n.running(this)&&$n.start(this):(this.draw(),Jh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,a=[];let r,i;for(r=0,i=n.length;r<i;++r){const s=n[r];(!e||s.visible)&&a.push(s)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,a={meta:e,index:e.index,cancelable:!0},r=t5(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(r&&kv(n,r),e.controller.draw(),r&&Sv(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return $v(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,a,r){const i=T5.modes[n];return typeof i=="function"?i(this,e,a,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],a=this._metasets;let r=a.filter(i=>i&&i._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},a.push(r)),r}getContext(){return this.$context||(this.$context=Mr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!n.hidden}setDatasetVisibility(e,n){const a=this.getDatasetMeta(e);a.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,a){const r=a?"show":"hide",i=this.getDatasetMeta(e),s=i.controller._resolveAnimations(void 0,r);wi(n)?(i.data[n].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),s.update(i,{visible:a}),this.update(o=>o.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),$n.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),bh(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,a=(i,s)=>{n.addEventListener(this,i,s),e[i]=s},r=(i,s,o)=>{i.offsetX=s,i.offsetY=o,this._eventHandler(i)};Se(this.options.events,i=>a(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,a=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},r=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),a("resize",i),a("detach",s)};s=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),a("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){Se(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Se(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,a){const r=a?"set":"remove";let i,s,o,l;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=e.length;o<l;++o){s=e[o];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],a=e.map(({datasetIndex:r,index:i})=>{const s=this.getDatasetMeta(r);if(!s)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:s.data[i],index:i}});!co(a,n)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,n))}notifyPlugins(e,n,a){return this._plugins.notify(this,e,n,a)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,a){const r=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),s=i(n,e),o=a?e:i(e,n);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,n){const a={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,r)===!1)return;const i=this._handleEvent(e,n,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,r),(i||a.changed)&&this.render(),this}_handleEvent(e,n,a){const{_active:r=[],options:i}=this,s=n,o=this._getActiveElements(e,r,a,s),l=QO(e),u=LT(e,this._lastEvent,a,l);a&&(this._lastEvent=null,We(i.onHover,[e,o,this],this),l&&We(i.onClick,[e,o,this],this));const c=!co(o,r);return(c||n)&&(this._active=o,this._updateHoverStyles(o,r,n)),this._lastEvent=u,c}_getActiveElements(e,n,a,r){if(e.type==="mouseout")return[];if(!a)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}we(Un,"defaults",Ge),we(Un,"instances",vo),we(Un,"overrides",Pa),we(Un,"registry",ln),we(Un,"version",ET),we(Un,"getChart",Hv);function Xh(){return Se(Un.instances,t=>t._plugins.invalidate())}function Uv(t,e){const{x:n,y:a,base:r,width:i,height:s}=t.getProps(["x","y","base","width","height"],e);let o,l,u,c,d;return t.horizontal?(d=s/2,o=Math.min(n,r),l=Math.max(n,r),u=a-d,c=a+d):(d=i/2,o=n-d,l=n+d,u=Math.min(a,r),c=Math.max(a,r)),{left:o,top:u,right:l,bottom:c}}function Jn(t,e,n,a){return t?0:Zt(e,n,a)}function qT(t,e,n){const a=t.options.borderWidth,r=t.borderSkipped,i=Mv(a);return{t:Jn(r.top,i.top,0,n),r:Jn(r.right,i.right,0,e),b:Jn(r.bottom,i.bottom,0,n),l:Jn(r.left,i.left,0,e)}}function VT(t,e,n){const{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,i=di(r),s=Math.min(e,n),o=t.borderSkipped,l=a||_e(r);return{topLeft:Jn(!l||o.top||o.left,i.topLeft,0,s),topRight:Jn(!l||o.top||o.right,i.topRight,0,s),bottomLeft:Jn(!l||o.bottom||o.left,i.bottomLeft,0,s),bottomRight:Jn(!l||o.bottom||o.right,i.bottomRight,0,s)}}function FT(t){const e=Uv(t),n=e.right-e.left,a=e.bottom-e.top,r=qT(t,n/2,a/2),i=VT(t,n/2,a/2);return{outer:{x:e.left,y:e.top,w:n,h:a,radius:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:a-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function jl(t,e,n,a){const r=e===null,i=n===null,s=t&&!(r&&i)&&Uv(t,a);return s&&(r||dh(e,s.left,s.right))&&(i||dh(n,s.top,s.bottom))}function BT(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function RT(t,e){t.rect(e.x,e.y,e.w,e.h)}function zl(t,e,n={}){const a=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-a,s=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+a,y:t.y+r,w:t.w+i,h:t.h+s,radius:t.radius}}class Bs extends yr{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:a,backgroundColor:r}}=this,{inner:i,outer:s}=FT(this),o=BT(s.radius)?Tu:RT;e.save(),(s.w!==i.w||s.h!==i.h)&&(e.beginPath(),o(e,zl(s,n,i)),e.clip(),o(e,zl(i,-n,s)),e.fillStyle=a,e.fill("evenodd")),e.beginPath(),o(e,zl(i,n)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,n,a){return jl(this,e,n,a)}inXRange(e,n){return jl(this,e,null,n)}inYRange(e,n){return jl(this,null,e,n)}getCenterPoint(e){const{x:n,y:a,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(n+r)/2:n,y:i?a:(a+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}we(Bs,"id","bar"),we(Bs,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),we(Bs,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const hi={average(t){if(!t.length)return!1;let e,n,a=new Set,r=0,i=0;for(e=0,n=t.length;e<n;++e){const s=t[e].element;if(s&&s.hasValue()){const o=s.tooltipPosition();a.add(o.x),r+=o.y,++i}}return i===0||a.size===0?!1:{x:[...a].reduce((s,o)=>s+o)/a.size,y:r/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,a=e.y,r=Number.POSITIVE_INFINITY,i,s,o;for(i=0,s=t.length;i<s;++i){const l=t[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=oE(e,u);c<r&&(r=c,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,a=l.y}return{x:n,y:a}}};function sn(t,e){return e&&(at(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function kn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
4
|
+
`)>-1?t.split(`
|
|
5
|
+
`):t}function NT(t,e){const{element:n,datasetIndex:a,index:r}=e,i=t.getDatasetMeta(a).controller,{label:s,value:o}=i.getLabelAndValue(r);return{chart:t,label:s,parsed:i.getParsed(r),raw:t.data.datasets[a].data[r],formattedValue:o,dataset:i.getDataset(),dataIndex:r,datasetIndex:a,element:n}}function Qh(t,e){const n=t.chart.ctx,{body:a,footer:r,title:i}=t,{boxWidth:s,boxHeight:o}=e,l=dn(e.bodyFont),u=dn(e.titleFont),c=dn(e.footerFont),d=i.length,f=r.length,p=a.length,m=ia(e.padding);let g=m.height,y=0,v=a.reduce((w,$)=>w+$.before.length+$.lines.length+$.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const w=e.displayColors?Math.max(o,l.lineHeight):l.lineHeight;g+=p*w+(v-p)*l.lineHeight+(v-1)*e.bodySpacing}f&&(g+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let b=0;const x=function(w){y=Math.max(y,n.measureText(w).width+b)};return n.save(),n.font=u.string,Se(t.title,x),n.font=l.string,Se(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?s+2+e.boxPadding:0,Se(a,w=>{Se(w.before,x),Se(w.lines,x),Se(w.after,x)}),b=0,n.font=c.string,Se(t.footer,x),n.restore(),y+=m.width,{width:y,height:g}}function jT(t,e){const{y:n,height:a}=e;return n<a/2?"top":n>t.height-a/2?"bottom":"center"}function zT(t,e,n,a){const{x:r,width:i}=a,s=n.caretSize+n.caretPadding;if(t==="left"&&r+i+s>e.width||t==="right"&&r-i-s<0)return!0}function WT(t,e,n,a){const{x:r,width:i}=n,{width:s,chartArea:{left:o,right:l}}=t;let u="center";return a==="center"?u=r<=(o+l)/2?"left":"right":r<=i/2?u="left":r>=s-i/2&&(u="right"),zT(u,t,e,n)&&(u="center"),u}function ep(t,e,n){const a=n.yAlign||e.yAlign||jT(t,n);return{xAlign:n.xAlign||e.xAlign||WT(t,e,n,a),yAlign:a}}function HT(t,e){let{x:n,width:a}=t;return e==="right"?n-=a:e==="center"&&(n-=a/2),n}function UT(t,e,n){let{y:a,height:r}=t;return e==="top"?a+=n:e==="bottom"?a-=r+n:a-=r/2,a}function tp(t,e,n,a){const{caretSize:r,caretPadding:i,cornerRadius:s}=t,{xAlign:o,yAlign:l}=n,u=r+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:p}=di(s);let m=HT(e,o);const g=UT(e,l,u);return l==="center"?o==="left"?m+=u:o==="right"&&(m-=u):o==="left"?m-=Math.max(c,f)+r:o==="right"&&(m+=Math.max(d,p)+r),{x:Zt(m,0,a.width-e.width),y:Zt(g,0,a.height-e.height)}}function ds(t,e,n){const a=ia(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-a.right:t.x+a.left}function np(t){return sn([],kn(t))}function YT(t,e,n){return Mr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ap(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Yv={beforeTitle:xn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,a=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return n[e.dataIndex]}return""},afterTitle:xn,beforeBody:xn,beforeLabel:xn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Pe(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:xn,afterBody:xn,beforeFooter:xn,footer:xn,afterFooter:xn};function vt(t,e,n,a){const r=t[e].call(n,a);return typeof r>"u"?Yv[e].call(n,a):r}class Lu extends yr{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,a=this.options.setContext(this.getContext()),r=a.enabled&&n.options.animation&&a.animations,i=new Tv(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=YT(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:a}=n,r=vt(a,"beforeTitle",this,e),i=vt(a,"title",this,e),s=vt(a,"afterTitle",this,e);let o=[];return o=sn(o,kn(r)),o=sn(o,kn(i)),o=sn(o,kn(s)),o}getBeforeBody(e,n){return np(vt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:a}=n,r=[];return Se(e,i=>{const s={before:[],lines:[],after:[]},o=ap(a,i);sn(s.before,kn(vt(o,"beforeLabel",this,i))),sn(s.lines,vt(o,"label",this,i)),sn(s.after,kn(vt(o,"afterLabel",this,i))),r.push(s)}),r}getAfterBody(e,n){return np(vt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:a}=n,r=vt(a,"beforeFooter",this,e),i=vt(a,"footer",this,e),s=vt(a,"afterFooter",this,e);let o=[];return o=sn(o,kn(r)),o=sn(o,kn(i)),o=sn(o,kn(s)),o}_createItems(e){const n=this._active,a=this.chart.data,r=[],i=[],s=[];let o=[],l,u;for(l=0,u=n.length;l<u;++l)o.push(NT(this.chart,n[l]));return e.filter&&(o=o.filter((c,d,f)=>e.filter(c,d,f,a))),e.itemSort&&(o=o.sort((c,d)=>e.itemSort(c,d,a))),Se(o,c=>{const d=ap(e.callbacks,c);r.push(vt(d,"labelColor",this,c)),i.push(vt(d,"labelPointStyle",this,c)),s.push(vt(d,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=o,o}update(e,n){const a=this.options.setContext(this.getContext()),r=this._active;let i,s=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const o=hi[a.position].call(this,r,this._eventPosition);s=this._createItems(a),this.title=this.getTitle(s,a),this.beforeBody=this.getBeforeBody(s,a),this.body=this.getBody(s,a),this.afterBody=this.getAfterBody(s,a),this.footer=this.getFooter(s,a);const l=this._size=Qh(this,a),u=Object.assign({},o,l),c=ep(this.chart,a,u),d=tp(a,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,a,r){const i=this.getCaretPosition(e,a,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,a){const{xAlign:r,yAlign:i}=this,{caretSize:s,cornerRadius:o}=a,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=di(o),{x:f,y:p}=e,{width:m,height:g}=n;let y,v,b,x,w,$;return i==="center"?(w=p+g/2,r==="left"?(y=f,v=y-s,x=w+s,$=w-s):(y=f+m,v=y+s,x=w-s,$=w+s),b=y):(r==="left"?v=f+Math.max(l,c)+s:r==="right"?v=f+m-Math.max(u,d)-s:v=this.caretX,i==="top"?(x=p,w=x-s,y=v-s,b=v+s):(x=p+g,w=x+s,y=v+s,b=v-s),$=x),{x1:y,x2:v,x3:b,y1:x,y2:w,y3:$}}drawTitle(e,n,a){const r=this.title,i=r.length;let s,o,l;if(i){const u=Il(a.rtl,this.x,this.width);for(e.x=ds(this,a.titleAlign,a),n.textAlign=u.textAlign(a.titleAlign),n.textBaseline="middle",s=dn(a.titleFont),o=a.titleSpacing,n.fillStyle=a.titleColor,n.font=s.string,l=0;l<i;++l)n.fillText(r[l],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o,l+1===i&&(e.y+=a.titleMarginBottom-o)}}_drawColorBox(e,n,a,r,i){const s=this.labelColors[a],o=this.labelPointStyles[a],{boxHeight:l,boxWidth:u}=i,c=dn(i.bodyFont),d=ds(this,"left",i),f=r.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,m=n.y+p;if(i.usePointStyle){const g={radius:Math.min(u,l)/2,pointStyle:o.pointStyle,rotation:o.rotation},y=r.leftForLtr(f,u)+u/2,v=m+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,xh(e,g,y,v),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,xh(e,g,y,v)}else{e.lineWidth=_e(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const g=r.leftForLtr(f,u),y=r.leftForLtr(r.xPlus(f,1),u-2),v=di(s.borderRadius);Object.values(v).some(b=>b!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Tu(e,{x:g,y:m,w:u,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Tu(e,{x:y,y:m+1,w:u-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(g,m,u,l),e.strokeRect(g,m,u,l),e.fillStyle=s.backgroundColor,e.fillRect(y,m+1,u-2,l-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,n,a){const{body:r}=this,{bodySpacing:i,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:c}=a,d=dn(a.bodyFont);let f=d.lineHeight,p=0;const m=Il(a.rtl,this.x,this.width),g=function(A){n.fillText(A,m.x(e.x+p),e.y+f/2),e.y+=f+i},y=m.textAlign(s);let v,b,x,w,$,S,E;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,e.x=ds(this,y,a),n.fillStyle=a.bodyColor,Se(this.beforeBody,g),p=o&&y!=="right"?s==="center"?u/2+c:u+2+c:0,w=0,S=r.length;w<S;++w){for(v=r[w],b=this.labelTextColors[w],n.fillStyle=b,Se(v.before,g),x=v.lines,o&&x.length&&(this._drawColorBox(n,e,w,m,a),f=Math.max(d.lineHeight,l)),$=0,E=x.length;$<E;++$)g(x[$]),f=d.lineHeight;Se(v.after,g)}p=0,f=d.lineHeight,Se(this.afterBody,g),e.y-=i}drawFooter(e,n,a){const r=this.footer,i=r.length;let s,o;if(i){const l=Il(a.rtl,this.x,this.width);for(e.x=ds(this,a.footerAlign,a),e.y+=a.footerMarginTop,n.textAlign=l.textAlign(a.footerAlign),n.textBaseline="middle",s=dn(a.footerFont),n.fillStyle=a.footerColor,n.font=s.string,o=0;o<i;++o)n.fillText(r[o],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+a.footerSpacing}}drawBackground(e,n,a,r){const{xAlign:i,yAlign:s}=this,{x:o,y:l}=e,{width:u,height:c}=a,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=di(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(e,n,a,r),n.lineTo(o+u-f,l),n.quadraticCurveTo(o+u,l,o+u,l+f),s==="center"&&i==="right"&&this.drawCaret(e,n,a,r),n.lineTo(o+u,l+c-m),n.quadraticCurveTo(o+u,l+c,o+u-m,l+c),s==="bottom"&&this.drawCaret(e,n,a,r),n.lineTo(o+p,l+c),n.quadraticCurveTo(o,l+c,o,l+c-p),s==="center"&&i==="left"&&this.drawCaret(e,n,a,r),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,a=this.$animations,r=a&&a.x,i=a&&a.y;if(r||i){const s=hi[e.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Qh(this,e),l=Object.assign({},s,this._size),u=ep(n,e,l),c=tp(e,l,u,n);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const s=ia(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(e.save(),e.globalAlpha=a,this.drawBackground(i,e,r,n),XE(e,n.textDirection),i.y+=s.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),QE(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const a=this._active,r=e.map(({datasetIndex:o,index:l})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),i=!co(a,r),s=this._positionChanged(r,n);(i||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,a=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],s=this._getActiveElements(e,i,n,a),o=this._positionChanged(s,e),l=n||!co(s,i)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,a,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,i.mode,i,a);return i.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:a,caretY:r,options:i}=this,s=hi[i.position].call(this,e,n);return s!==!1&&(a!==s.x||r!==s.y)}}we(Lu,"positioners",hi);var KT={id:"tooltip",_element:Lu,positioners:hi,afterInit(t,e,n){n&&(t.tooltip=new Lu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yv},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const GT=(t,e,n,a)=>(typeof e=="string"?(n=t.push(e)-1,a.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function ZT(t,e,n,a){const r=t.indexOf(e);if(r===-1)return GT(t,e,n,a);const i=t.lastIndexOf(e);return r!==i?n:r}const JT=(t,e)=>t===null?null:Zt(Math.round(t),0,e);function Kv(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class qu extends Dr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const a=this.getLabels();for(const{index:r,label:i}of n)a[r]===i&&a.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Pe(e))return null;const a=this.getLabels();return n=isFinite(n)&&a[n]===e?n:ZT(a,e,Re(n,e),this._addedLabels),JT(n,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:a,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),n||(r=this.getLabels().length-1)),this.min=a,this.max=r}buildTicks(){const e=this.min,n=this.max,a=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let s=e;s<=n;s++)r.push({value:s});return r}getLabelForValue(e){return Kv.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}we(qu,"id","category"),we(qu,"defaults",{ticks:{callback:Kv}});function XT(t,e){const n=[],{bounds:a,step:r,min:i,max:s,precision:o,count:l,maxTicks:u,maxDigits:c,includeBounds:d}=t,f=r||1,p=u-1,{min:m,max:g}=e,y=!Pe(i),v=!Pe(s),b=!Pe(l),x=(g-m)/(c+1);let w=uh((g-m)/p/f)*f,$,S,E,A;if(w<1e-14&&!y&&!v)return[{value:m},{value:g}];A=Math.ceil(g/w)-Math.floor(m/w),A>p&&(w=uh(A*w/p/f)*f),Pe(o)||($=Math.pow(10,o),w=Math.ceil(w*$)/$),a==="ticks"?(S=Math.floor(m/w)*w,E=Math.ceil(g/w)*w):(S=m,E=g),y&&v&&r&&aE((s-i)/r,w/1e3)?(A=Math.round(Math.min((s-i)/w,u)),w=(s-i)/A,S=i,E=s):b?(S=y?i:S,E=v?s:E,A=l-1,w=(E-S)/A):(A=(E-S)/w,qs(A,Math.round(A),w/1e3)?A=Math.round(A):A=Math.ceil(A));const B=Math.max(ch(w),ch(S));$=Math.pow(10,Pe(o)?B:o),S=Math.round(S*$)/$,E=Math.round(E*$)/$;let z=0;for(y&&(d&&S!==i?(n.push({value:i}),S<i&&z++,qs(Math.round((S+z*w)*$)/$,i,rp(i,x,t))&&z++):S<i&&z++);z<A;++z){const W=Math.round((S+z*w)*$)/$;if(v&&W>s)break;n.push({value:W})}return v&&d&&E!==s?n.length&&qs(n[n.length-1].value,s,rp(s,x,t))?n[n.length-1].value=s:n.push({value:s}):(!v||E===s)&&n.push({value:E}),n}function rp(t,e,{horizontal:n,minRotation:a}){const r=$a(a),i=(n?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+t).length;return Math.min(e/i,s)}class QT extends Dr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Pe(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:a}=this.getUserBounds();let{min:r,max:i}=this;const s=l=>r=n?r:l,o=l=>i=a?i:l;if(e){const l=Qn(r),u=Qn(i);l<0&&u<0?o(0):l>0&&u>0&&s(0)}if(r===i){let l=i===0?1:Math.abs(i*.05);o(i+l),e||s(r-l)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:a}=e,r;return a?(r=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const r={maxTicks:a,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,s=XT(r,i);return e.bounds==="ticks"&&rE(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const r=(a-n)/Math.max(e.length-1,1)/2;n-=r,a+=r}this._startValue=n,this._endValue=a,this._valueRange=a-n}getLabelForValue(e){return wv(e,this.chart.options.locale,this.options.ticks.format)}}class Vu extends QT{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Nt(e)?e:0,this.max=Nt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,a=$a(this.options.ticks.minRotation),r=(e?Math.sin(a):Math.cos(a))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}we(Vu,"id","linear"),we(Vu,"defaults",{ticks:{callback:_v.formatters.numeric}});const Ko={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$t=Object.keys(Ko);function ip(t,e){return t-e}function sp(t,e){if(Pe(e))return null;const n=t._adapter,{parser:a,round:r,isoWeekday:i}=t._parseOpts;let s=e;return typeof a=="function"&&(s=a(s)),Nt(s)||(s=typeof a=="string"?n.parse(s,a):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(po(i)||i===!0)?n.startOf(s,"isoWeek",i):n.startOf(s,r)),+s)}function op(t,e,n,a){const r=$t.length;for(let i=$t.indexOf(t);i<r-1;++i){const s=Ko[$t[i]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(o*s.size))<=a)return $t[i]}return $t[r-1]}function e6(t,e,n,a,r){for(let i=$t.length-1;i>=$t.indexOf(n);i--){const s=$t[i];if(Ko[s].common&&t._adapter.diff(r,a,s)>=e-1)return s}return $t[n?$t.indexOf(n):0]}function t6(t){for(let e=$t.indexOf(t)+1,n=$t.length;e<n;++e)if(Ko[$t[e]].common)return $t[e]}function lp(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:a,hi:r}=ld(n,e),i=n[a]>=e?n[a]:n[r];t[i]=!0}}function n6(t,e,n,a){const r=t._adapter,i=+r.startOf(e[0].value,a),s=e[e.length-1].value;let o,l;for(o=i;o<=s;o=+r.add(o,1,a))l=n[o],l>=0&&(e[l].major=!0);return e}function up(t,e,n){const a=[],r={},i=e.length;let s,o;for(s=0;s<i;++s)o=e[s],r[o]=s,a.push({value:o,major:!1});return i===0||!n?a:n6(t,a,r,n)}class $i extends Dr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const a=e.time||(e.time={}),r=this._adapter=new Lv._date(e.adapters.date);r.init(n),li(a.displayFormats,r.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:sp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,a=e.time.unit||"day";let{min:r,max:i,minDefined:s,maxDefined:o}=this.getUserBounds();function l(u){!s&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!o&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!s||!o)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=Nt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),a),i=Nt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),a)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],a=e[e.length-1]),{min:n,max:a}}buildTicks(){const e=this.options,n=e.time,a=e.ticks,r=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,s=this.max,o=dE(r,i,s);return this._unit=n.unit||(a.autoSkip?op(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):e6(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:t6(this._unit),this.initOffsets(r),e.reverse&&o.reverse(),up(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,a=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?a=i:a=(i-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Zt(n,0,s),a=Zt(a,0,s),this._offsets={start:n,end:a,factor:1/(n+1+a)}}_generate(){const e=this._adapter,n=this.min,a=this.max,r=this.options,i=r.time,s=i.unit||op(i.minUnit,n,a,this._getLabelCapacity(n)),o=Re(r.ticks.stepSize,1),l=s==="week"?i.isoWeekday:!1,u=po(l)||l===!0,c={};let d=n,f,p;if(u&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,u?"day":s),e.diff(a,n,s)>1e5*o)throw new Error(n+" and "+a+" are too far apart with stepSize of "+o+" "+s);const m=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<a;f=+e.add(f,o,s),p++)lp(c,f,m);return(f===a||r.bounds==="ticks"||p===1)&&lp(c,f,m),Object.keys(c).sort(ip).map(g=>+g)}getLabelForValue(e){const n=this._adapter,a=this.options.time;return a.tooltipFormat?n.format(e,a.tooltipFormat):n.format(e,a.displayFormats.datetime)}format(e,n){const a=this.options.time.displayFormats,r=this._unit,i=n||a[r];return this._adapter.format(e,i)}_tickFormatFunction(e,n,a,r){const i=this.options,s=i.ticks.callback;if(s)return We(s,[e,n,a],this);const o=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&o[l],d=u&&o[u],f=a[n],p=u&&d&&f&&f.major;return this._adapter.format(e,r||(p?d:c))}generateTickLabels(e){let n,a,r;for(n=0,a=e.length;n<a;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+a)*n.factor)}getValueForPixel(e){const n=this._offsets,a=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,a=this.ctx.measureText(e).width,r=$a(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:a*i+o*s,h:a*s+o*i}}_getLabelCapacity(e){const n=this.options.time,a=n.displayFormats,r=a[n.unit]||a.millisecond,i=this._tickFormatFunction(e,0,up(this,[e],this._majorUnit),r),s=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],n,a;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,a=r.length;n<a;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,a;if(e.length)return e;const r=this.getLabels();for(n=0,a=r.length;n<a;++n)e.push(sp(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return vv(e.sort(ip))}}we($i,"id","time"),we($i,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function fs(t,e,n){let a=0,r=t.length-1,i,s,o,l;n?(e>=t[a].pos&&e<=t[r].pos&&({lo:a,hi:r}=Ou(t,"pos",e)),{pos:i,time:o}=t[a],{pos:s,time:l}=t[r]):(e>=t[a].time&&e<=t[r].time&&({lo:a,hi:r}=Ou(t,"time",e)),{time:i,pos:o}=t[a],{time:s,pos:l}=t[r]);const u=s-i;return u?o+(l-o)*(e-i)/u:o}class cp extends $i{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=fs(n,this.min),this._tableRange=fs(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:a}=this,r=[],i=[];let s,o,l,u,c;for(s=0,o=e.length;s<o;++s)u=e[s],u>=n&&u<=a&&r.push(u);if(r.length<2)return[{time:n,pos:0},{time:a,pos:1}];for(s=0,o=r.length;s<o;++s)c=r[s+1],l=r[s-1],u=r[s],Math.round((c+l)/2)!==u&&i.push({time:u,pos:s/(o-1)});return i}_generate(){const e=this.min,n=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(n)||a.length===1)&&a.push(n),a.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),a=this.getLabelTimestamps();return n.length&&a.length?e=this.normalize(n.concat(a)):e=n.length?n:a,e=this._cache.all=e,e}getDecimalForValue(e){return(fs(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,a=this.getDecimalForPixel(e)/n.factor-n.end;return fs(this._table,a*this._tableRange+this._minPos,!0)}}we(cp,"id","timeseries"),we(cp,"defaults",$i.defaults);function Ar(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rs={exports:{}},a6=Rs.exports,dp;function r6(){return dp||(dp=1,function(t,e){(function(n,a){t.exports=a()})(a6,function(){var n=1e3,a=6e4,r=36e5,i="millisecond",s="second",o="minute",l="hour",u="day",c="week",d="month",f="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var q=["th","st","nd","rd"],j=N%100;return"["+N+(q[(j-20)%10]||q[j]||q[0])+"]"}},x=function(N,q,j){var J=String(N);return!J||J.length>=q?N:""+Array(q+1-J.length).join(j)+N},w={s:x,z:function(N){var q=-N.utcOffset(),j=Math.abs(q),J=Math.floor(j/60),Y=j%60;return(q<=0?"+":"-")+x(J,2,"0")+":"+x(Y,2,"0")},m:function N(q,j){if(q.date()<j.date())return-N(j,q);var J=12*(j.year()-q.year())+(j.month()-q.month()),Y=q.clone().add(J,d),ne=j-Y<0,K=q.clone().add(J+(ne?-1:1),d);return+(-(J+(j-Y)/(ne?Y-K:K-Y))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:p,w:c,d:u,D:m,h:l,m:o,s,ms:i,Q:f}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},$="en",S={};S[$]=b;var E="$isDayjsObject",A=function(N){return N instanceof U||!(!N||!N[E])},B=function N(q,j,J){var Y;if(!q)return $;if(typeof q=="string"){var ne=q.toLowerCase();S[ne]&&(Y=ne),j&&(S[ne]=j,Y=ne);var K=q.split("-");if(!Y&&K.length>1)return N(K[0])}else{var ee=q.name;S[ee]=q,Y=ee}return!J&&Y&&($=Y),Y||!J&&$},z=function(N,q){if(A(N))return N.clone();var j=typeof q=="object"?q:{};return j.date=N,j.args=arguments,new U(j)},W=w;W.l=B,W.i=A,W.w=function(N,q){return z(N,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var U=function(){function N(j){this.$L=B(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[E]=!0}var q=N.prototype;return q.parse=function(j){this.$d=function(J){var Y=J.date,ne=J.utc;if(Y===null)return new Date(NaN);if(W.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var K=Y.match(y);if(K){var ee=K[2]-1||0,fe=(K[7]||"0").substring(0,3);return ne?new Date(Date.UTC(K[1],ee,K[3]||1,K[4]||0,K[5]||0,K[6]||0,fe)):new Date(K[1],ee,K[3]||1,K[4]||0,K[5]||0,K[6]||0,fe)}}return new Date(Y)}(j),this.init()},q.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},q.$utils=function(){return W},q.isValid=function(){return this.$d.toString()!==g},q.isSame=function(j,J){var Y=z(j);return this.startOf(J)<=Y&&Y<=this.endOf(J)},q.isAfter=function(j,J){return z(j)<this.startOf(J)},q.isBefore=function(j,J){return this.endOf(J)<z(j)},q.$g=function(j,J,Y){return W.u(j)?this[J]:this.set(Y,j)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(j,J){var Y=this,ne=!!W.u(J)||J,K=W.p(j),ee=function(Le,$e){var Fe=W.w(Y.$u?Date.UTC(Y.$y,$e,Le):new Date(Y.$y,$e,Le),Y);return ne?Fe:Fe.endOf(u)},fe=function(Le,$e){return W.w(Y.toDate()[Le].apply(Y.toDate("s"),(ne?[0,0,0,0]:[23,59,59,999]).slice($e)),Y)},le=this.$W,pe=this.$M,he=this.$D,be="set"+(this.$u?"UTC":"");switch(K){case p:return ne?ee(1,0):ee(31,11);case d:return ne?ee(1,pe):ee(0,pe+1);case c:var Me=this.$locale().weekStart||0,Te=(le<Me?le+7:le)-Me;return ee(ne?he-Te:he+(6-Te),pe);case u:case m:return fe(be+"Hours",0);case l:return fe(be+"Minutes",1);case o:return fe(be+"Seconds",2);case s:return fe(be+"Milliseconds",3);default:return this.clone()}},q.endOf=function(j){return this.startOf(j,!1)},q.$set=function(j,J){var Y,ne=W.p(j),K="set"+(this.$u?"UTC":""),ee=(Y={},Y[u]=K+"Date",Y[m]=K+"Date",Y[d]=K+"Month",Y[p]=K+"FullYear",Y[l]=K+"Hours",Y[o]=K+"Minutes",Y[s]=K+"Seconds",Y[i]=K+"Milliseconds",Y)[ne],fe=ne===u?this.$D+(J-this.$W):J;if(ne===d||ne===p){var le=this.clone().set(m,1);le.$d[ee](fe),le.init(),this.$d=le.set(m,Math.min(this.$D,le.daysInMonth())).$d}else ee&&this.$d[ee](fe);return this.init(),this},q.set=function(j,J){return this.clone().$set(j,J)},q.get=function(j){return this[W.p(j)]()},q.add=function(j,J){var Y,ne=this;j=Number(j);var K=W.p(J),ee=function(pe){var he=z(ne);return W.w(he.date(he.date()+Math.round(pe*j)),ne)};if(K===d)return this.set(d,this.$M+j);if(K===p)return this.set(p,this.$y+j);if(K===u)return ee(1);if(K===c)return ee(7);var fe=(Y={},Y[o]=a,Y[l]=r,Y[s]=n,Y)[K]||1,le=this.$d.getTime()+j*fe;return W.w(le,this)},q.subtract=function(j,J){return this.add(-1*j,J)},q.format=function(j){var J=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||g;var ne=j||"YYYY-MM-DDTHH:mm:ssZ",K=W.z(this),ee=this.$H,fe=this.$m,le=this.$M,pe=Y.weekdays,he=Y.months,be=Y.meridiem,Me=function($e,Fe,Ue,G){return $e&&($e[Fe]||$e(J,ne))||Ue[Fe].slice(0,G)},Te=function($e){return W.s(ee%12||12,$e,"0")},Le=be||function($e,Fe,Ue){var G=$e<12?"AM":"PM";return Ue?G.toLowerCase():G};return ne.replace(v,function($e,Fe){return Fe||function(Ue){switch(Ue){case"YY":return String(J.$y).slice(-2);case"YYYY":return W.s(J.$y,4,"0");case"M":return le+1;case"MM":return W.s(le+1,2,"0");case"MMM":return Me(Y.monthsShort,le,he,3);case"MMMM":return Me(he,le);case"D":return J.$D;case"DD":return W.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return Me(Y.weekdaysMin,J.$W,pe,2);case"ddd":return Me(Y.weekdaysShort,J.$W,pe,3);case"dddd":return pe[J.$W];case"H":return String(ee);case"HH":return W.s(ee,2,"0");case"h":return Te(1);case"hh":return Te(2);case"a":return Le(ee,fe,!0);case"A":return Le(ee,fe,!1);case"m":return String(fe);case"mm":return W.s(fe,2,"0");case"s":return String(J.$s);case"ss":return W.s(J.$s,2,"0");case"SSS":return W.s(J.$ms,3,"0");case"Z":return K}return null}($e)||K.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(j,J,Y){var ne,K=this,ee=W.p(J),fe=z(j),le=(fe.utcOffset()-this.utcOffset())*a,pe=this-fe,he=function(){return W.m(K,fe)};switch(ee){case p:ne=he()/12;break;case d:ne=he();break;case f:ne=he()/3;break;case c:ne=(pe-le)/6048e5;break;case u:ne=(pe-le)/864e5;break;case l:ne=pe/r;break;case o:ne=pe/a;break;case s:ne=pe/n;break;default:ne=pe}return Y?ne:W.a(ne)},q.daysInMonth=function(){return this.endOf(d).$D},q.$locale=function(){return S[this.$L]},q.locale=function(j,J){if(!j)return this.$L;var Y=this.clone(),ne=B(j,J,!0);return ne&&(Y.$L=ne),Y},q.clone=function(){return W.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},N}(),X=U.prototype;return z.prototype=X,[["$ms",i],["$s",s],["$m",o],["$H",l],["$W",u],["$M",d],["$y",p],["$D",m]].forEach(function(N){X[N[1]]=function(q){return this.$g(q,N[0],N[1])}}),z.extend=function(N,q){return N.$i||(N(q,U,z),N.$i=!0),z},z.locale=B,z.isDayjs=A,z.unix=function(N){return z(1e3*N)},z.en=S[$],z.Ls=S,z.p={},z})}(Rs)),Rs.exports}var i6=r6();const ot=Ar(i6);var Ns={exports:{}},s6=Ns.exports,fp;function o6(){return fp||(fp=1,function(t,e){(function(n,a){t.exports=a()})(s6,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,s=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},c=function(y){return function(v){this[y]=+v}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var b=v.match(/([+-]|\d\d)/g),x=60*b[1]+(+b[2]||0);return x===0?0:b[0]==="+"?-x:x}(y)}],f=function(y){var v=l[y];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(y,v){var b,x=l.meridiem;if(x){for(var w=1;w<=24;w+=1)if(y.indexOf(x(w,0,v))>-1){b=w>12;break}}else b=y===(v?"pm":"PM");return b},m={A:[o,function(y){this.afternoon=p(y,!1)}],a:[o,function(y){this.afternoon=p(y,!0)}],Q:[r,function(y){this.month=3*(y-1)+1}],S:[r,function(y){this.milliseconds=100*+y}],SS:[i,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[o,function(y){var v=l.ordinal,b=y.match(/\d+/);if(this.day=b[0],v)for(var x=1;x<=31;x+=1)v(x).replace(/\[|\]/g,"")===y&&(this.day=x)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[o,function(y){var v=f("months"),b=(f("monthsShort")||v.map(function(x){return x.slice(0,3)})).indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[o,function(y){var v=f("months").indexOf(y)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(y){this.year=u(y)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(y){var v,b;v=y,b=l&&l.formats;for(var x=(y=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(z,W,U){var X=U&&U.toUpperCase();return W||b[U]||n[U]||b[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(N,q,j){return q||j.slice(1)})})).match(a),w=x.length,$=0;$<w;$+=1){var S=x[$],E=m[S],A=E&&E[0],B=E&&E[1];x[$]=B?{regex:A,parser:B}:S.replace(/^\[|\]$/g,"")}return function(z){for(var W={},U=0,X=0;U<w;U+=1){var N=x[U];if(typeof N=="string")X+=N.length;else{var q=N.regex,j=N.parser,J=z.slice(X),Y=q.exec(J)[0];j.call(W,Y),z=z.replace(Y,"")}}return function(ne){var K=ne.afternoon;if(K!==void 0){var ee=ne.hours;K?ee<12&&(ne.hours+=12):ee===12&&(ne.hours=0),delete ne.afternoon}}(W),W}}return function(y,v,b){b.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var x=v.prototype,w=x.parse;x.parse=function($){var S=$.date,E=$.utc,A=$.args;this.$u=E;var B=A[1];if(typeof B=="string"){var z=A[2]===!0,W=A[3]===!0,U=z||W,X=A[2];W&&(X=A[2]),l=this.$locale(),!z&&X&&(l=b.Ls[X]),this.$d=function(J,Y,ne,K){try{if(["x","X"].indexOf(Y)>-1)return new Date((Y==="X"?1e3:1)*J);var ee=g(Y)(J),fe=ee.year,le=ee.month,pe=ee.day,he=ee.hours,be=ee.minutes,Me=ee.seconds,Te=ee.milliseconds,Le=ee.zone,$e=ee.week,Fe=new Date,Ue=pe||(fe||le?1:Fe.getDate()),G=fe||Fe.getFullYear(),ae=0;fe&&!le||(ae=le>0?le-1:Fe.getMonth());var te,ie=he||0,De=be||0,it=Me||0,Ct=Te||0;return Le?new Date(Date.UTC(G,ae,Ue,ie,De,it,Ct+60*Le.offset*1e3)):ne?new Date(Date.UTC(G,ae,Ue,ie,De,it,Ct)):(te=new Date(G,ae,Ue,ie,De,it,Ct),$e&&(te=K(te).week($e).toDate()),te)}catch{return new Date("")}}(S,B,E,b),this.init(),X&&X!==!0&&(this.$L=this.locale(X).$L),U&&S!=this.format(B)&&(this.$d=new Date("")),l={}}else if(B instanceof Array)for(var N=B.length,q=1;q<=N;q+=1){A[1]=B[q-1];var j=b.apply(this,A);if(j.isValid()){this.$d=j.$d,this.$L=j.$L,this.init();break}q===N&&(this.$d=new Date(""))}else w.call(this,$)}}})}(Ns)),Ns.exports}var l6=o6();const u6=Ar(l6);var js={exports:{}},c6=js.exports,hp;function d6(){return hp||(hp=1,function(t,e){(function(n,a){t.exports=a()})(c6,function(){return function(n,a){var r=a.prototype,i=r.format;r.format=function(s){var o=this,l=this.$locale();if(!this.isValid())return i.bind(this)(s);var u=this.$utils(),c=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((o.$M+1)/3);case"Do":return l.ordinal(o.$D);case"gggg":return o.weekYear();case"GGGG":return o.isoWeekYear();case"wo":return l.ordinal(o.week(),"W");case"w":case"ww":return u.s(o.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(o.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(o.$H===0?24:o.$H),d==="k"?1:2,"0");case"X":return Math.floor(o.$d.getTime()/1e3);case"x":return o.$d.getTime();case"z":return"["+o.offsetName()+"]";case"zzz":return"["+o.offsetName("long")+"]";default:return d}});return i.bind(this)(c)}}})}(js)),js.exports}var f6=d6();const h6=Ar(f6);var zs={exports:{}},p6=zs.exports,pp;function m6(){return pp||(pp=1,function(t,e){(function(n,a){t.exports=a()})(p6,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(u){return this.$utils().u(u)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(u-1))};var o=s.add;s.add=function(u,c){return u=Number(u),this.$utils().p(c)===a?this.add(3*u,n):o.bind(this)(u,c)};var l=s.startOf;s.startOf=function(u,c){var d=this.$utils(),f=!!d.u(c)||c;if(d.p(u)===a){var p=this.quarter()-1;return f?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return l.bind(this)(u,c)}}})}(zs)),zs.exports}var g6=m6();const v6=Ar(g6);var Ws={exports:{}},y6=Ws.exports,mp;function b6(){return mp||(mp=1,function(t,e){(function(n,a){t.exports=a()})(y6,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(a,r,i){var s=r.prototype,o=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,c=function(d,f){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,m,g){var y=g&&g.toUpperCase();return m||f[g]||n[g]||f[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,b,x){return b||x.slice(1)})})}(l,u===void 0?{}:u);return o.call(this,c)}}})}(Ws)),Ws.exports}var x6=b6();const w6=Ar(x6);var Hs={exports:{}},_6=Hs.exports,gp;function $6(){return gp||(gp=1,function(t,e){(function(n,a){t.exports=a()})(_6,function(){var n="day";return function(a,r,i){var s=function(u){return u.add(4-u.isoWeekday(),n)},o=r.prototype;o.isoWeekYear=function(){return s(this).year()},o.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),n);var c,d,f,p,m=s(this),g=(c=this.isoWeekYear(),d=this.$u,f=(d?i.utc:i)().year(c).startOf("year"),p=4-f.isoWeekday(),f.isoWeekday()>4&&(p+=7),f.add(p,n));return m.diff(g,"week")+1},o.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var l=o.startOf;o.startOf=function(u,c){var d=this.$utils(),f=!!d.u(c)||c;return d.p(u)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(u,c)}}})}(Hs)),Hs.exports}var k6=$6();const S6=Ar(k6);ot.extend(h6);ot.extend(v6);ot.extend(w6);ot.extend(u6);ot.extend(S6);var C6={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Lv._date.override({formats:function(){return C6},parse:function(t,e){var n=typeof t;return t===null||n==="undefined"?null:n==="string"&&typeof e=="string"?ot(t,e).isValid()?ot(t,e).valueOf():null:t instanceof ot?null:ot(t).isValid()?ot(t).valueOf():null},format:function(t,e){return ot(t).format(e)},add:function(t,e,n){return ot(t).add(e,n).valueOf()},diff:function(t,e,n){return ot(t).diff(ot(e),n)},startOf:function(t,e,n){if(e==="isoWeek"){var a=typeof n=="number"&&n>0&&n<7?n:1;return ot(t).isoWeekday(a).startOf("day").valueOf()}return ot(t).startOf(e).valueOf()},endOf:function(t,e){return ot(t).endOf(e).valueOf()}});const M6=I("relative flex bg-default border border-solid border-muted rounded shadow-stroke-bordered font-inter text-xs text-subtle pointer-events-none transition-opacity duration-100 ease-in-out"),D6=I("absolute w-2 h-2 bg-default border border-solid border-muted rotate-45 -z-[1]",{variants:{placement:{top:"-bottom-[4px] left-1/2 -ml-[4px]","top-start":"-bottom-[4px] left-1/4 -ml-[4px]","top-end":"-bottom-[4px] left-3/4 -ml-[4px]",bottom:"-top-[4px] left-1/2 -ml-[4px]","bottom-start":"-top-[4px] left-1/4 -ml-[4px]","bottom-end":"-top-[4px] left-3/4 -ml-[4px]",left:"-right-[4px] top-1/2 -mt-[4px]",right:"-left-[4px] top-1/2 -mt-[4px]"}},defaultVariants:{placement:"top"}}),A6=I("w-1 bg-success-bold-default rounded-[2px_0_0_2px] shrink-0"),O6=I("p-2"),E6=I("text-subtle mb-1.5 text-body_small_semibold"),hs=I("flex justify-between mb-0.5 gap-5"),ps=I("text-subtle text-body_xsmall_regular min-w-max"),ms=I("text-subtle text-body_xsmall_regular text-right"),vp=P({__name:"TimelineTooltip",props:{data:{},placement:{default:"top"},targetPosition:{}},setup(t){const e=t,n=k(()=>({backgroundColor:e.data.barColor||void 0})),a=k(()=>{if(e.data.isRunning){const s=Date.now()-e.data.startTime.getTime(),o=Math.round(s/(1e3*60));return o<60?`${o} min`:`${Math.floor(o/60)}h ${o%60}m`}else{const s=e.data.endTime.getTime()-e.data.startTime.getTime(),o=Math.round(s/(1e3*60));return o<60?`${o} min`:`${Math.floor(o/60)}h ${o%60}m`}}),r=k(()=>e.data.startTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"})),i=k(()=>e.data.endTime.toLocaleTimeString("en-US",{hour12:!0,hour:"2-digit",minute:"2-digit"}));return(s,o)=>(_(),O("div",{class:L(h(M6)()),"data-testid":"timeline-tooltip"},[T("div",{class:L(h(D6)({placement:t.placement}))},null,2),T("div",{class:L(h(A6)()),style:Rt(n.value)},null,6),T("div",{class:L(h(O6)())},[T("div",{class:L(h(E6)())},Q(t.data.title),3),T("div",{class:L(h(hs)())},[T("span",{class:L(h(ps)())},Q(t.data.isRunning?"Running for":"Run Duration"),3),T("span",{class:L(h(ms)())},Q(a.value),3)],2),T("div",{class:L(h(hs)())},[T("span",{class:L(h(ps)())},"Start Time",2),T("span",{class:L(h(ms)())},Q(r.value),3)],2),t.data.isRunning?H("",!0):(_(),O("div",{key:0,class:L(h(hs)())},[T("span",{class:L(h(ps)())},"End Time",2),T("span",{class:L(h(ms)())},Q(i.value),3)],2)),t.data.extraData?(_(!0),O(ge,{key:1},ke(Object.entries(t.data.extraData),([l,u])=>(_(),O("div",{key:l,class:L(h(hs)())},[T("span",{class:L(h(ps)())},Q(l),3),T("span",{class:L(h(ms)())},Q(u),3)],2))),128)):H("",!0)],2)],2))}});var T6=Object.defineProperty,P6=(t,e,n)=>e in t?T6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nr=(t,e,n)=>P6(t,typeof e!="symbol"?e+"":e,n);class I6{constructor(){Nr(this,"app",null),Nr(this,"container",null),Nr(this,"tooltipId","timeline-tooltip"),Nr(this,"VIEWPORT_PADDING",8),Nr(this,"ARROW_SIZE",8)}calculateOptimalPosition(e,n){const a={width:window.innerWidth,height:window.innerHeight,scrollX:window.pageXOffset,scrollY:window.pageYOffset},{left:r,top:i}=e,{height:s}=n,o=["top","bottom","top-start","top-end","bottom-start","bottom-end","left","right"];for(const l of o){const u=this.getPositionForPlacement(l,e,n);if(this.isPositionInViewport(u,n,a))return{...u,placement:l}}return{...this.constrainToViewport({left:r,top:i-s-this.ARROW_SIZE},n,a),placement:"top"}}getPositionForPlacement(e,n,a){const{left:r,top:i}=n,{width:s,height:o}=a;switch(e){case"top":return{left:r-s/2,top:i-o-this.ARROW_SIZE};case"bottom":return{left:r-s/2,top:i+this.ARROW_SIZE};case"top-start":return{left:r-s*.25,top:i-o-this.ARROW_SIZE};case"top-end":return{left:r-s*.75,top:i-o-this.ARROW_SIZE};case"bottom-start":return{left:r-s*.25,top:i+this.ARROW_SIZE};case"bottom-end":return{left:r-s*.75,top:i+this.ARROW_SIZE};case"left":return{left:r-s-this.ARROW_SIZE,top:i-o/2};case"right":return{left:r+this.ARROW_SIZE,top:i-o/2};default:return{left:r-s/2,top:i-o-this.ARROW_SIZE}}}isPositionInViewport(e,n,a){const{left:r,top:i}=e,{width:s,height:o}=n;return r>=a.scrollX+this.VIEWPORT_PADDING&&i>=a.scrollY+this.VIEWPORT_PADDING&&r+s<=a.scrollX+a.width-this.VIEWPORT_PADDING&&i+o<=a.scrollY+a.height-this.VIEWPORT_PADDING}constrainToViewport(e,n,a){const{width:r,height:i}=n;let{left:s,top:o}=e;const l=a.scrollX+this.VIEWPORT_PADDING,u=a.scrollX+a.width-r-this.VIEWPORT_PADDING;s=Math.max(l,Math.min(s,u));const c=a.scrollY+this.VIEWPORT_PADDING,d=a.scrollY+a.height-i-this.VIEWPORT_PADDING;return o=Math.max(c,Math.min(o,d)),{left:s,top:o}}show(e,n){this.hide();const a=document.createElement("div");a.style.cssText=`
|
|
6
|
+
position: absolute;
|
|
7
|
+
left: -9999px;
|
|
8
|
+
top: -9999px;
|
|
9
|
+
visibility: hidden;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
`;const r=Qs(vp,{data:e});r.mount(a),document.body.appendChild(a);const i={width:a.offsetWidth,height:a.offsetHeight};r.unmount(),document.body.removeChild(a);const s=this.calculateOptimalPosition(n,i);this.container=document.createElement("div"),this.container.id=this.tooltipId,this.container.style.cssText=`
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: ${s.left}px;
|
|
14
|
+
top: ${s.top}px;
|
|
15
|
+
z-index: 1000;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
`,this.app=Qs(vp,{data:e,placement:s.placement,targetPosition:n}),this.app.mount(this.container),document.body.appendChild(this.container)}hide(){this.app&&(this.app.unmount(),this.app=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}updatePosition(e){if(this.container&&this.app){const n={width:this.container.offsetWidth,height:this.container.offsetHeight},a=this.calculateOptimalPosition(e,n);this.container.style.left=`${a.left}px`,this.container.style.top=`${a.top}px`;const r=this.app._instance;r!=null&&r.props&&(r.props.placement=a.placement,r.props.targetPosition=e)}}}new I6;let yp=!1;yp||(Un.register(qu,Vu,Bs,Vs,KT,$i),yp=!0);const[Go,L6]=Ve("ToastProvider");var q6=P({inheritAttrs:!1,__name:"ToastProvider",props:{label:{type:String,required:!1,default:"Notification"},duration:{type:Number,required:!1,default:5e3},disableSwipe:{type:Boolean,required:!1},swipeDirection:{type:String,required:!1,default:"right"},swipeThreshold:{type:Number,required:!1,default:50}},setup(t){const e=t,{label:n,duration:a,disableSwipe:r,swipeDirection:i,swipeThreshold:s}=He(e);Rn({isProvider:!0});const o=V(),l=V(0),u=V(!1),c=V(!1);if(e.label&&typeof e.label=="string"&&!e.label.trim()){const d="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw new Error(d)}return L6({label:n,duration:a,disableSwipe:r,swipeDirection:i,swipeThreshold:s,toastCount:l,viewport:o,onViewportChange(d){o.value=d},onToastAdd(){l.value++},onToastRemove(){l.value--},isFocusedToastEscapeKeyDownRef:u,isClosePausedRef:c}),(d,f)=>F(d.$slots,"default")}}),V6=q6,F6=P({__name:"ToastAnnounce",setup(t){const e=Go(),n=h1(1e3),a=V(!1);let r=0,i=0;return zt&&(r=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{a.value=!0})}),Mi(()=>{cancelAnimationFrame(r),cancelAnimationFrame(i)})),(s,o)=>h(n)||a.value?(_(),D(h(Ii),{key:0,feature:"fully-hidden"},{default:C(()=>[xe(Q(h(e).label.value)+" ",1),F(s.$slots,"default")]),_:3})):H("v-if",!0)}}),B6=F6;const R6="toast.swipeStart",N6="toast.swipeMove",j6="toast.swipeCancel",z6="toast.swipeEnd",Fu="toast.viewportPause",Bu="toast.viewportResume";function gs(t,e,n){const a=n.originalEvent.currentTarget,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&a.addEventListener(t,e,{once:!0}),a.dispatchEvent(r)}function bp(t,e,n=0){const a=Math.abs(t.x),r=Math.abs(t.y),i=a>r;return e==="left"||e==="right"?i&&a>n:!i&&r>n}function W6(t){return t.nodeType===t.ELEMENT_NODE}function Gv(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),W6(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",r=n.dataset.rekaToastAnnounceExclude==="";if(!a)if(r){const i=n.dataset.rekaToastAnnounceAlt;i&&e.push(i)}else e.push(...Gv(n))}}),e}const[wF,H6]=Ve("ToastRoot");var U6=P({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{type:String,required:!1},open:{type:Boolean,required:!1,default:!1},duration:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(t,{emit:e}){const n=t,a=e,{forwardRef:r,currentElement:i}=ce(),{CollectionItem:s}=Rn(),o=Go(),l=V(null),u=V(null),c=k(()=>typeof n.duration=="number"?n.duration:o.duration.value),d=V(0),f=V(c.value),p=V(0),m=V(c.value),g=v1(()=>{const x=Date.now()-d.value;m.value=Math.max(f.value-x,0)},{fpsLimit:60});function y(x){x<=0||x===Number.POSITIVE_INFINITY||zt&&(window.clearTimeout(p.value),d.value=Date.now(),p.value=window.setTimeout(v,x))}function v(x){var w,$;const S=x?.pointerType==="";(w=i.value)!=null&&w.contains(Qe())&&S&&(($=o.viewport.value)==null||$.focus()),S&&(o.isClosePausedRef.value=!1),a("close")}const b=k(()=>i.value?Gv(i.value):null);if(n.type&&!["foreground","background"].includes(n.type)){const x="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(x)}return ct(x=>{const w=o.viewport.value;if(w){const $=()=>{y(f.value),g.resume(),a("resume")},S=()=>{const E=Date.now()-d.value;f.value=f.value-E,window.clearTimeout(p.value),g.pause(),a("pause")};return w.addEventListener(Fu,S),w.addEventListener(Bu,$),()=>{w.removeEventListener(Fu,S),w.removeEventListener(Bu,$)}}}),de(()=>[n.open,c.value],()=>{f.value=c.value,n.open&&!o.isClosePausedRef.value&&y(c.value)},{immediate:!0}),_c("Escape",x=>{a("escapeKeyDown",x),x.defaultPrevented||(o.isFocusedToastEscapeKeyDownRef.value=!0,v())}),Ie(()=>{o.onToastAdd()}),pn(()=>{o.onToastRemove()}),H6({onClose:v}),(x,w)=>(_(),O(ge,null,[b.value?(_(),D(B6,{key:0,role:"alert","aria-live":x.type==="foreground"?"assertive":"polite"},{default:C(()=>[H(`
|
|
18
|
+
Render each chunk as its own text node so screen readers get the
|
|
19
|
+
natural pause break between nodes (see comment in utils.ts).
|
|
20
|
+
Interpolating the array directly with \`{{ announceTextContent }}\`
|
|
21
|
+
would route through Vue's \`toDisplayString\`, which JSON-stringifies
|
|
22
|
+
arrays — the live region would then announce literal \`[\`, quotes
|
|
23
|
+
and commas instead of the toast title and description.
|
|
24
|
+
`),(_(!0),O(ge,null,ke(b.value,($,S)=>(_(),O(ge,{key:S},[xe(Q($),1)],64))),128))]),_:1},8,["aria-live"])):H("v-if",!0),h(o).viewport.value?(_(),D(dr,{key:1,to:h(o).viewport.value},[R(h(s),null,{default:C(()=>[R(h(oe),re({ref:h(r),tabindex:"0"},x.$attrs,{as:x.as,"as-child":x.asChild,"data-state":x.open?"open":"closed","data-swipe-direction":h(o).swipeDirection.value,style:h(o).disableSwipe.value?void 0:{userSelect:"none",touchAction:"none"},onPointerdown:w[0]||(w[0]=ye($=>{h(o).disableSwipe.value||(l.value={x:$.clientX,y:$.clientY})},["left"])),onPointermove:w[1]||(w[1]=$=>{if(h(o).disableSwipe.value||!l.value)return;const S=$.clientX-l.value.x,E=$.clientY-l.value.y,A=!!u.value,B=["left","right"].includes(h(o).swipeDirection.value),z=["left","up"].includes(h(o).swipeDirection.value)?Math.min:Math.max,W=B?z(0,S):0,U=B?0:z(0,E),X=$.pointerType==="touch"?10:2,N={x:W,y:U},q={originalEvent:$,delta:N};A?(u.value=N,h(gs)(h(N6),j=>a("swipeMove",j),q)):h(bp)(N,h(o).swipeDirection.value,X)?(u.value=N,h(gs)(h(R6),j=>a("swipeStart",j),q),$.target.setPointerCapture($.pointerId)):(Math.abs(S)>X||Math.abs(E)>X)&&(l.value=null)}),onPointerup:w[2]||(w[2]=$=>{if(h(o).disableSwipe.value)return;const S=u.value,E=$.target;if(E.hasPointerCapture($.pointerId)&&E.releasePointerCapture($.pointerId),u.value=null,l.value=null,S){const A=$.currentTarget,B={originalEvent:$,delta:S};h(bp)(S,h(o).swipeDirection.value,h(o).swipeThreshold.value)?h(gs)(h(z6),z=>a("swipeEnd",z),B):h(gs)(h(j6),z=>a("swipeCancel",z),B),A?.addEventListener("click",z=>z.preventDefault(),{once:!0})}})}),{default:C(()=>[F(x.$slots,"default",{remaining:m.value,duration:c.value})]),_:3},16,["as","as-child","data-state","data-swipe-direction","style"])]),_:3})],8,["to"])):H("v-if",!0)],64))}}),Y6=U6,K6=P({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!0},forceMount:{type:Boolean,required:!1},type:{type:String,required:!1,default:"foreground"},open:{type:Boolean,required:!1,default:void 0},duration:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(t,{emit:e}){const n=t,a=e,{forwardRef:r}=ce(),i=ut(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0});return(s,o)=>(_(),D(h(la),{present:s.forceMount||h(i)},{default:C(()=>[R(Y6,re({ref:h(r),open:h(i),type:s.type,as:s.as,"as-child":s.asChild,duration:s.duration},s.$attrs,{onClose:o[0]||(o[0]=l=>i.value=!1),onPause:o[1]||(o[1]=l=>a("pause")),onResume:o[2]||(o[2]=l=>a("resume")),onEscapeKeyDown:o[3]||(o[3]=l=>a("escapeKeyDown",l)),onSwipeStart:o[4]||(o[4]=l=>{a("swipeStart",l),l.defaultPrevented||l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:o[5]||(o[5]=l=>{if(a("swipeMove",l),!l.defaultPrevented){const{x:u,y:c}=l.detail.delta,d=l.currentTarget;d.setAttribute("data-swipe","move"),d.style.setProperty("--reka-toast-swipe-move-x",`${u}px`),d.style.setProperty("--reka-toast-swipe-move-y",`${c}px`)}}),onSwipeCancel:o[6]||(o[6]=l=>{if(a("swipeCancel",l),!l.defaultPrevented){const u=l.currentTarget;u.setAttribute("data-swipe","cancel"),u.style.removeProperty("--reka-toast-swipe-move-x"),u.style.removeProperty("--reka-toast-swipe-move-y"),u.style.removeProperty("--reka-toast-swipe-end-x"),u.style.removeProperty("--reka-toast-swipe-end-y")}}),onSwipeEnd:o[7]||(o[7]=l=>{if(a("swipeEnd",l),!l.defaultPrevented){const{x:u,y:c}=l.detail.delta,d=l.currentTarget;d.setAttribute("data-swipe","end"),d.style.removeProperty("--reka-toast-swipe-move-x"),d.style.removeProperty("--reka-toast-swipe-move-y"),d.style.setProperty("--reka-toast-swipe-end-x",`${u}px`),d.style.setProperty("--reka-toast-swipe-end-y",`${c}px`),i.value=!1}})}),{default:C(({remaining:l,duration:u})=>[F(s.$slots,"default",{remaining:l,duration:u,open:h(i)})]),_:3},16,["open","type","as","as-child","duration"])]),_:3},8,["present"]))}}),G6=K6,Z6=P({__name:"ToastTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return ce(),(n,a)=>(_(),D(h(oe),Oe(Ae(e)),{default:C(()=>[F(n.$slots,"default")]),_:3},16))}}),J6=Z6,X6=P({__name:"DismissableLayerBranch",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:a}=ce();return Ie(()=>{bt.branches.add(a.value)}),pn(()=>{bt.branches.delete(a.value)}),(r,i)=>(_(),D(h(oe),re({ref:h(n)},e),{default:C(()=>[F(r.$slots,"default")]),_:3},16))}}),Q6=X6,eP=P({__name:"FocusProxy",emits:["focusFromOutsideViewport"],setup(t,{emit:e}){const n=e,a=Go();return(r,i)=>(_(),D(h(Ii),{tabindex:"0",style:{position:"fixed"},onFocus:i[0]||(i[0]=s=>{var o;const l=s.relatedTarget;!((o=h(a).viewport.value)!=null&&o.contains(l))&&n("focusFromOutsideViewport")})},{default:C(()=>[F(r.$slots,"default")]),_:3}))}}),xp=eP,tP=P({inheritAttrs:!1,__name:"ToastViewport",props:{hotkey:{type:Array,required:!1,default:()=>["F8"]},label:{type:[String,Function],required:!1,default:"Notifications ({hotkey})"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"ol"}},setup(t){const e=t,{hotkey:n,label:a}=He(e),{forwardRef:r,currentElement:i}=ce(),{CollectionSlot:s,getItems:o}=Rn(),l=Go(),u=k(()=>l.toastCount.value>0),c=V(),d=V(),f=/Key/g,p=/Digit/g,m=k(()=>n.value.join("+").replace(f,"").replace(p,""));_c(n.value,()=>{i.value.focus()}),Ie(()=>{l.onViewportChange(i.value)}),ct(y=>{const v=i.value;if(u.value&&v){const b=()=>{if(!l.isClosePausedRef.value){const E=new CustomEvent(Fu);v.dispatchEvent(E),l.isClosePausedRef.value=!0}},x=()=>{if(l.isClosePausedRef.value){const E=new CustomEvent(Bu);v.dispatchEvent(E),l.isClosePausedRef.value=!1}},w=E=>{!v.contains(E.relatedTarget)&&x()},$=()=>{v.contains(Qe())||x()},S=E=>{var A,B,z;const W=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!W){const U=Qe(),X=E.shiftKey;if(E.target===v&&X){(A=c.value)==null||A.focus();return}const N=g({tabbingDirection:X?"backwards":"forwards"}),q=N.findIndex(j=>j===U);Ls(N.slice(q+1))?E.preventDefault():X?(B=c.value)==null||B.focus():(z=d.value)==null||z.focus()}};v.addEventListener("focusin",b),v.addEventListener("focusout",w),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",$),v.addEventListener("keydown",S),window.addEventListener("blur",b),window.addEventListener("focus",x),y(()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",$),v.removeEventListener("keydown",S),window.removeEventListener("blur",b),window.removeEventListener("focus",x)})}});function g({tabbingDirection:y}){const v=o().map(b=>b.ref).map(b=>{const x=[b,...ed(b)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?v.reverse():v).flat()}return(y,v)=>(_(),D(h(Q6),{role:"region","aria-label":typeof h(a)=="string"?h(a).replace("{hotkey}",m.value):h(a)(m.value),tabindex:"-1",style:Rt({pointerEvents:u.value?void 0:"none"})},{default:C(()=>[u.value?(_(),D(xp,{key:0,ref:b=>{b&&(c.value=h(Tt)(b))},onFocusFromOutsideViewport:v[0]||(v[0]=()=>{const b=g({tabbingDirection:"forwards"});h(Ls)(b)})},null,512)):H("v-if",!0),R(h(s),null,{default:C(()=>[R(h(oe),re({ref:h(r),tabindex:"-1",as:y.as,"as-child":y.asChild},y.$attrs),{default:C(()=>[F(y.$slots,"default")]),_:3},16,["as","as-child"])]),_:3}),u.value?(_(),D(xp,{key:1,ref:b=>{b&&(d.value=h(Tt)(b))},onFocusFromOutsideViewport:v[1]||(v[1]=()=>{const b=g({tabbingDirection:"backwards"});h(Ls)(b)})},null,512)):H("v-if",!0)]),_:3},8,["aria-label","style"]))}}),nP=tP;const aP={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function rP(t,e){return _(),O("svg",aP,[...e[0]||(e[0]=[T("g",{"clip-path":"url(#clip0_12427_264)"},[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5303 6.53033L12.0607 6L11 4.93934L10.4697 5.46967L6.5 9.43934L5.53033 8.46967L5 7.93934L3.93934 9L4.46967 9.53033L5.96967 11.0303C6.26256 11.3232 6.73744 11.3232 7.03033 11.0303L11.5303 6.53033Z",fill:"currentColor"})],-1),T("defs",null,[T("clipPath",{id:"clip0_12427_264"},[T("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const iP={render:rP},sP={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function oP(t,e){return _(),O("svg",sP,[...e[0]||(e[0]=[T("g",{"clip-path":"url(#clip0_12427_230)"},[T("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.3934 0.292893C4.58094 0.105357 4.83529 0 5.10051 0H10.8995C11.1647 0 11.4191 0.105357 11.6066 0.292893L15.7071 4.3934C15.8946 4.58093 16 4.83529 16 5.10051V10.8995C16 11.1647 15.8946 11.4191 15.7071 11.6066L11.6066 15.7071C11.4191 15.8946 11.1647 16 10.8995 16H5.10051C4.83529 16 4.58094 15.8946 4.3934 15.7071L0.292894 11.6066C0.105357 11.4191 0 11.1647 0 10.8995V5.10051C0 4.83529 0.105357 4.58094 0.292893 4.3934L4.3934 0.292893ZM8.75 3.75V4.5V8V8.75H7.25V8V4.5V3.75H8.75ZM8 12C8.55229 12 9 11.5523 9 11C9 10.4477 8.55229 10 8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12Z",fill:"currentColor"})],-1),T("defs",null,[T("clipPath",{id:"clip0_12427_230"},[T("rect",{width:"16",height:"16",fill:"white"})])],-1)])])}const lP={render:oP},uP=I(["py-1.5 px-3 rounded shadow-elevations-overlay gap-1.5","text-xs font-normal font-inter leading-lg tracking-normal","bg-blackalpha-900 text-whitealpha-1000","flex items-center whitespace-nowrap"].join(" ")),cP=I("",{variants:{variant:{default:"",success:"text-green-800",failed:"text-red-800"}},defaultVariants:{variant:"default"}}),dP=(t={})=>({root:uP(),icon:cP({variant:t.variant})}),fP={"bottom-end":{bottom:"0",right:"0"}};let hP=0;const Us=fr({toasts:[]});let wp=!1;function pP(t,e){return t==="success"?Ke(iP,{class:e}):t==="failed"?Ke(lP,{class:e}):null}function mP(){if(wp)return;wp=!0;const t=document.createElement("div");document.body.appendChild(t),Qs({render(){return Ke(V6,{duration:3e3,label:"Notification"},()=>[...Us.toasts.map(e=>{const n=dP({variant:e.type});return Ke(G6,{key:e.id,duration:e.duration,open:e.open,"onUpdate:open":a=>{if(e.open=a,!a){const r=Us.toasts.indexOf(e);r!==-1&&Us.toasts.splice(r,1)}},class:n.root,"data-testid":`toast-${e.type}`},()=>[pP(e.type,n.icon),Ke(J6,null,()=>e.title)])}),Ke(nP,{style:{position:"fixed",display:"flex",flexDirection:"column",gap:"24px",padding:"24px",margin:"0",listStyle:"none",zIndex:"2147483647",outline:"none",...fP["bottom-end"]}})])}}).mount(t)}const Wl=(t,e,n)=>{mP(),Us.toasts.push({id:hP++,title:t,type:e,duration:n?.duration??3e3,open:!0})},lr={success:(t,e)=>Wl(t,"success",e),failed:(t,e)=>Wl(t,"failed",e),default:(t,e)=>Wl(t,"default",e)},gP=P({name:"InputWidget",__name:"Input",props:{property:{},disabled:{type:Boolean},field:{}},setup(t){const e=k(()=>t.property.ui);return(n,a)=>(_(),D(h(Cr),re({"model-value":t.field.state.value},h(e),{disabled:t.property.BYOCdisabled||t.disabled,variant:"default",state:"idle","onUpdate:modelValue":t.field.handleChange,onBlur:t.field.handleBlur}),null,16,["model-value","disabled","onUpdate:modelValue","onBlur"]))}}),Hl=Object.assign(gP,{__name:"Input"}),vP=P({name:"BooleanWidget",__name:"Boolean",props:{property:{},field:{}},setup(t){const e=r=>typeof r=="boolean"?String(r):void 0,n=V(e(t.field.state.value));de(()=>t.field.state.value,r=>{n.value=e(r)});const a=r=>{n.value=r,t.field.handleChange(r==="true")};return(r,i)=>(_(),O("div",null,[R(h(nv),{modelValue:h(n),options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],"onUpdate:modelValue":a},null,8,["modelValue"])]))}}),_p=Object.assign(vP,{__name:"Boolean"}),yP=P({name:"RadioWidget",__name:"Radio",props:{property:{},field:{}},setup(t){const e=k(()=>t.property.enum&&t.property.enumNames?t.property.enum.map((n,a)=>({value:n,label:t.property.enumNames?.[a]||n})):[]);return(n,a)=>(_(),O("div",null,[R(h(nv),{"model-value":t.field.state.value,options:h(e),"onUpdate:modelValue":t.field.handleChange},null,8,["model-value","options","onUpdate:modelValue"])]))}}),bP=Object.assign(yP,{__name:"Radio"}),mt=Symbol("form"),Zv=Symbol("getPayloadFn"),Ru=(t,e,n,a)=>{const r={},i=t[`${e}.auth-type`],s=t[`${e}.connector`],o=t[`${e}.connectorType`],l=t[`${e}.credentialType`];Object.keys(t).forEach(p=>{p.includes(`${e}.extra.`)&&(r[p.replace(`${e}.extra.`,"")]=t[p])}),Object.keys(t).forEach(p=>{p.includes(`${e}.${i}.extra.`)&&(r[p.replace(`${e}.${i}.extra.`,"")]=t[p])});const u=t[`${e}.host`]?.endsWith("/")?t[`${e}.host`].substr(0,t[`${e}.host`].length-1):t[`${e}.host`],c=t[`${e}.host`]?.startsWith("http")?t[`${e}.host`].startsWith("https")?443:80:t[`${e}.port`],d=typeof u=="string"&&u.length>0,f=typeof l=="string"&&l.length>0;return{name:a,...f&&{credentialType:l},...d&&{host:u},...d&&c&&{port:t[`${e}.port`]?parseInt(t[`${e}.port`]):c},authType:i,connectorType:o,...s?{connector:s}:{},connectBy:t[`${e}.connectBy`],connectorConfigName:n,credentialSource:"direct",username:t[`${e}.${i}.username`],password:t[`${e}.${i}.password`],extra:r}},yo=Array.isArray,bo=t=>!!t&&t.constructor===Object,xP=t=>t==null||typeof t!="object"&&typeof t!="function",Ul=t=>typeof t=="string"||t instanceof String,md=(t,e)=>{if(Object.is(t,e))return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Reflect.ownKeys(t),a=Reflect.ownKeys(e);if(n.length!==a.length)return!1;for(let r=0;r<n.length;r++)if(!Reflect.has(e,n[r])||!md(t[n[r]],e[n[r]]))return!1;return!0},wP=(t,e,n=a=>a)=>t.reduce((a,r)=>(a[e(r)]=n(r),a),{}),_P=(t,e)=>{const n=t.reduce((a,r)=>{const i=r;return a[i]||(a[i]=r),a},{});return Object.values(n)},vs=t=>t?.filter(e=>!!e)??[],$P=(t,e)=>Object.keys(t).reduce((a,r)=>(a[r]=e(t[r],r),a),{}),kP=t=>{if(xP(t))return t;if(typeof t=="function")return t.bind({});const e=new t.constructor;return Object.getOwnPropertyNames(t).forEach(n=>{e[n]=t[n]}),e},gd=(t,e)=>t?e.reduce((n,a)=>(Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]),n),{}):{},Jv=(t,e)=>t?!e||e.length===0?t:e.reduce((n,a)=>(delete n[a],n),{...t}):{},SP=(t,e,n)=>{const a=e.split(/[\.\[\]]/g);let r=t;for(const i of a){if(r===null||r===void 0)return n;const s=i.replace(/['"]/g,"");s.trim()!==""&&(r=r[s])}return r===void 0?n:r},CP=(t,e,n)=>{if(!t)return{};if(!e||n===void 0)return t;const a=e.split(/[\.\[\]]/g).filter(s=>!!s.trim()),r=s=>{if(a.length>1){const o=a.shift(),l=/^\d+$/.test(a[0]);s[o]=s[o]===void 0?l?[]:{}:s[o],r(s[o])}else s[a[0]]=n},i=kP(t);return r(i),i},MP=t=>{if(!t)return[];const e=(n,a)=>bo(n)?Object.entries(n).flatMap(([r,i])=>e(i,[...a,r])):yo(n)?n.flatMap((r,i)=>e(r,[...a,`${i}`])):[a.join(".")];return e(t,[])},sa=t=>t?wP(MP(t),e=>e,e=>SP(t,e)):{},DP=t=>t?Object.keys(t).reduce((e,n)=>CP(e,n,t[n]),{}):{},Xv=(t,e=" ")=>{if(!t)return"";const n=e.replace(/[\W]{1}/g,"\\$&"),a=new RegExp(`^[${n}]+|[${n}]+$`,"g");return t.replace(a,"")},AP={trailing:!0};function OP(t,e=25,n={}){if(n={...AP,...n},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let a,r,i=[],s,o;const l=(d,f)=>(s=EP(t,d,f),s.finally(()=>{if(s=null,n.trailing&&o&&!r){const p=l(d,o);return o=null,p}}),s),u=function(...d){return n.trailing&&(o=d),s||new Promise(f=>{const p=!r&&n.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const m=n.leading?a:l(this,d);o=null;for(const g of i)g(m);i=[]},e),p?(a=l(this,d),f(a)):i.push(f)})},c=d=>{d&&(clearTimeout(d),r=null)};return u.isPending=()=>!!r,u.cancel=()=>{c(r),i=[],o=null},u.flush=()=>{if(c(r),!o||s)return;const d=o;return o=null,l(this,d)},u}async function EP(t,e,n){return await t.apply(e,n)}function Ia(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;TP(t[0],t[1])&&t.unshift(e);let[n,a,r={}]=t,i=!1;const s=k(()=>ze(n));if(typeof s.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof a!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const o=K0();r.server??=!0,r.default??=IP,r.getCachedData??=ey,r.lazy??=!1,r.immediate??=!0,r.deep??=G0.deep,r.dedupe??="cancel",r._functionName,o._asyncData[s.value];function l(){const m={cause:"initial",dedupe:r.dedupe};return o._asyncData[s.value]?._init||(m.cachedData=r.getCachedData(s.value,o,{cause:"initial"}),o._asyncData[s.value]=$p(o,s.value,a,r,m.cachedData)),()=>o._asyncData[s.value].execute(m)}const u=l(),c=o._asyncData[s.value];c._deps++;const d=r.server!==!1&&o.payload.serverRendered;{let m=function(w){const $=o._asyncData[w];$?._deps&&($._deps--,$._deps===0&&$?._off())};const g=Bn();if(g&&d&&r.immediate&&!g.sp&&(g.sp=[]),g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const w=g._nuxtOnBeforeMountCbs;Mm(()=>{w.forEach($=>{$()}),w.splice(0,w.length)}),pn(()=>w.splice(0,w.length))}const y=g&&(g._nuxtClientOnly||tt(Z0,!1));d&&o.isHydrating&&(c.error.value||c.data.value!==void 0)?c.status.value=c.error.value?"error":"success":g&&(!y&&o.payload.serverRendered&&o.isHydrating||r.lazy)&&r.immediate?g._nuxtOnBeforeMountCbs.push(u):r.immediate&&c.status.value!=="success"&&u();const v=Ao(),b=de(s,(w,$)=>{if((w||$)&&w!==$){i=!0;const S=o._asyncData[$]?.data.value!==void 0,E=o._asyncDataPromises[$]!==void 0,A={cause:"initial",dedupe:r.dedupe};if(!o._asyncData[w]?._init){let B;$&&S?B=o._asyncData[$].data.value:(B=r.getCachedData(w,o,{cause:"initial"}),A.cachedData=B),o._asyncData[w]=$p(o,w,a,r,B)}o._asyncData[w]._deps++,$&&m($),(r.immediate||S||E)&&o._asyncData[w].execute(A),Om(()=>{i=!1})}},{flush:"sync"}),x=r.watch?de(r.watch,()=>{i||c._execute({cause:"watch",dedupe:r.dedupe})}):()=>{};v&&Mi(()=>{b(),x(),m(s.value)})}const f={data:ys(()=>o._asyncData[s.value]?.data),pending:ys(()=>o._asyncData[s.value]?.pending),status:ys(()=>o._asyncData[s.value]?.status),error:ys(()=>o._asyncData[s.value]?.error),refresh:(...m)=>o._asyncData[s.value]?._init?o._asyncData[s.value].execute(...m):l()(),execute:(...m)=>f.refresh(...m),clear:()=>{const m=o._asyncData[s.value];if(m?._abortController)try{m._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{m._abortController=void 0}Qv(o,s.value)}},p=Promise.resolve(o._asyncDataPromises[s.value]).then(()=>f);return Object.assign(p,f),p}function ys(t){return k({get(){return t()?.value},set(e){const n=t();n&&(n.value=e)}})}function TP(t,e){return!(typeof t=="string"||typeof t=="object"&&t!==null||typeof t=="function"&&typeof e=="function")}function Qv(t,e){e in t.payload.data&&(t.payload.data[e]=void 0),e in t.payload._errors&&(t.payload._errors[e]=void 0),t._asyncData[e]&&(t._asyncData[e].data.value=h(t._asyncData[e]._default()),t._asyncData[e].error.value=void 0,t._asyncData[e].status.value="idle"),e in t._asyncDataPromises&&(t._asyncDataPromises[e]=void 0)}function PP(t,e){const n={};for(const a of e)n[a]=t[a];return n}function $p(t,e,n,a,r){t.payload._errors[e]??=void 0;const i=a.getCachedData!==ey,s=n,o=a.deep?V:ea,l=r!==void 0,u=t.hook("app:data:refresh",async d=>{(!d||d.includes(e))&&await c.execute({cause:"refresh:hook"})}),c={data:o(l?r:a.default()),pending:k(()=>c.status.value==="pending"),error:mc(t.payload._errors,e),status:ea("idle"),execute:(...d)=>{const[f,p=void 0]=d,m=f&&p===void 0&&typeof f=="object"?f:{};if(t._asyncDataPromises[e]&&(m.dedupe??a.dedupe)==="defer")return t._asyncDataPromises[e];{const y="cachedData"in m?m.cachedData:a.getCachedData(e,t,{cause:m.cause??"refresh:manual"});if(y!==void 0)return t.payload.data[e]=c.data.value=y,c.error.value=void 0,c.status.value="success",Promise.resolve(y)}c._abortController&&c._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),c._abortController=new AbortController,c.status.value="pending";const g=new Promise((y,v)=>{try{const b=m.timeout??a.timeout,x=LP([c._abortController?.signal,m?.signal],b);if(x.aborted){const w=x.reason;v(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"));return}return x.addEventListener("abort",()=>{const w=x.reason;v(w instanceof Error?w:new DOMException(String(w??"Aborted"),"AbortError"))},{once:!0}),Promise.resolve(s(t,{signal:x})).then(y,v)}catch(b){v(b)}}).then(async y=>{let v=y;a.transform&&(v=await a.transform(y)),a.pick&&(v=PP(v,a.pick)),t.payload.data[e]=v,c.data.value=v,c.error.value=void 0,c.status.value="success"}).catch(y=>{if(!(t._asyncDataPromises[e]&&t._asyncDataPromises[e]!==g)&&!c._abortController?.signal.aborted){if(typeof DOMException<"u"&&y instanceof DOMException&&y.name==="AbortError"){c.status.value="idle";return}c.error.value=J0(y),c.data.value=h(a.default()),c.status.value="error"}}).finally(()=>{delete t._asyncDataPromises[e]});return t._asyncDataPromises[e]=g,t._asyncDataPromises[e]},_execute:OP((...d)=>c.execute(...d),0,{leading:!0}),_default:a.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{u(),t._asyncData[e]?._init&&(t._asyncData[e]._init=!1),i||qe(()=>{t._asyncData[e]?._init||(Qv(t,e),c.execute=()=>Promise.resolve())})}};return c}const IP=()=>{},ey=(t,e,n)=>{if(e.isHydrating)return e.payload.data[t];if(n.cause!=="refresh:manual"&&n.cause!=="refresh:hook")return e.static.data[t]};function LP(t,e){const n=t.filter(i=>!!i);if(typeof e=="number"&&e>=0){const i=AbortSignal.timeout?.(e);i&&n.push(i)}if(AbortSignal.any)return AbortSignal.any(n);const a=new AbortController;for(const i of n)if(i.aborted){const s=i.reason??new DOMException("Aborted","AbortError");try{a.abort(s)}catch{a.abort()}return a.signal}const r=()=>{const s=n.find(o=>o.aborted)?.reason??new DOMException("Aborted","AbortError");try{a.abort(s)}catch{a.abort()}};for(const i of n)i.addEventListener?.("abort",r,{once:!0});return a.signal}async function ty(t){const{data:e}=await Ia(()=>`credential_${ze(t)}`,()=>$fetch(`/workflows/v1/configmap/${ze(t)}`),"$vlaIZ4700T");return{credentialConfig:k(()=>{const a=e.value?.data;return a&&"kind"in a?JSON.parse(a.data.config):a?.config??null}),data:e}}function Zo(t){const e={};return Object.entries(t.properties).forEach(([n,a])=>{a.default!==void 0?a?.ui?.widget==="Repeater"?e[n]=JSON.parse(a.default):e[n]=a.default:a.properties&&(e[n]=Zo(a))}),e}const qP={key:0,class:"flex mt-3"},VP={key:1,class:"p-3 mt-4 border rounded-md border-green-400 bg-green-100"},FP={key:0,class:"mt-1"},BP={class:"text-sm text-green-600"},RP={key:2,class:"p-3 mt-4 border rounded-md border-new-red-400 bg-new-red-100"},NP={class:"mt-1"},jP={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},zP=P({__name:"CredentialWidget",props:{property:{},modelValue:{}},async setup(t){let e,n;const a=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),r=tt(mt),{credentialConfig:i}=([e,n]=Va(()=>ty(()=>t.property.ui.credentialType)),e=await e,n(),e),s=r.useStore(c=>Jv(c.values,["credential_guid_body","credential_property_id"]));de(()=>t.property,c=>{c&&r.setFieldValue("credential_property_id",c.id)},{immediate:!0}),de(s,c=>{c&&r.setFieldValue("credential_guid_body",Ru(sa(c),t.property.id,t.property.ui?.credentialType,void 0))},{immediate:!0}),de(i,c=>{c&&Object.entries(Zo(c)).forEach(([d,f])=>{r.state.values[`${t.property.id}.${d}`]||r.setFieldValue(`${t.property.id}.${d}`,f)})},{immediate:!0});const o=V(!1),l=V(null);async function u(){o.value=!0,l.value=null;try{const c=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(Ru(sa(r.state.values),t.property.id,t.property.ui?.credentialType,void 0))});l.value=c}catch(c){l.value={success:!1,message:c?.data?.message||c?.message||"Authentication failed"}}finally{o.value=!1}}return(c,d)=>(_(),O("div",{class:L(t.property.ui.class)},[h(i)?(_(),O(ge,{key:0},[R(h(a),{"config-map":h(i),"base-key":t.property.id},null,8,["config-map","base-key"]),t.property.ui?.isTestAuthenticationDisabled?H("",!0):(_(),O("div",qP,[R(h(_t),{loading:h(o),label:h(o)?"Testing Authentication":"Test Authentication",onClick:u},null,8,["loading","label"])]))],64)):H("",!0),!t.property.ui?.isTestAuthenticationDisabled&&h(l)?.success?(_(),O("div",VP,[d[0]||(d[0]=T("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),h(l).message?(_(),O("div",FP,[T("span",BP,Q(h(l).message),1)])):H("",!0)])):H("",!0),!t.property.ui?.isTestAuthenticationDisabled&&h(l)&&!h(l).success?(_(),O("div",RP,[d[1]||(d[1]=T("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),T("div",NP,[T("span",jP,Q(h(l).message),1)])])):H("",!0)],2))}}),WP=Object.assign(zP,{__name:"CredentialWidget"}),HP=P({__name:"Nested",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url));return(n,a)=>(_(),D(h(e),{"config-map":t.property,"base-key":t.property.id},null,8,["config-map","base-key"]))}}),UP=Object.assign(HP,{__name:"Nested"}),YP=P({__name:"Password",props:{field:{},property:{},disabled:{type:Boolean}},setup(t){const e=V(t.field.state.value??""),n=a=>{e.value=a,t.field.handleChange(a)};return(a,r)=>(_(),D(h(Cr),{id:t.property.id,type:"password","model-value":h(e),placeholder:t.property.ui?.placeholder,disabled:t.disabled,"data-test-id":t.property.id,"onUpdate:modelValue":n,onBlur:t.field.handleBlur},null,8,["id","model-value","placeholder","disabled","data-test-id","onBlur"]))}}),KP=Object.assign(YP,{__name:"Password"}),GP=P({name:"SelectWidget",__name:"Select",props:{property:{},disabled:{type:Boolean},field:{}},setup(t){const e=k(()=>t.property.ui?.mode==="multiple"),n=k(()=>t.property.enum&&t.property.enumNames?t.property.enum.map((i,s)=>({value:i,label:t.property.enumNames?.[s]||i})):[]),a=V((()=>{if(e.value)return t.field.state.value;const i=t.field.state.value;return i?[i]:[]})());function r(i){t.field.handleChange(e.value?i:i[0]),a.value=i}return(i,s)=>(_(),D(h(jn),{id:t.property.id,"model-value":h(a),options:h(n),placeholder:t.property.placeholder,"is-disabled":t.disabled,multiple:h(e),variant:"default","onUpdate:modelValue":r,onBlur:t.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","multiple","onBlur"]))}}),ZP=Object.assign(GP,{__name:"Select"}),JP=P({__name:"SQLTree",props:{field:{}},async setup(t){let e,n;const a=tt(mt),{data:r}=([e,n]=Va(()=>Ia("metadata",()=>$fetch("/workflows/v1/metadata",{method:"POST",body:a.getFieldValue("credential_guid_body")}))),e=await e,n(),e),i=k(()=>r.value?_P(r.value.data.map(p=>p.TABLE_CATALOG)).map(p=>({value:p,label:p,children:r.value.data.filter(m=>m.TABLE_CATALOG===p).map(m=>({value:`${p}:${m.TABLE_SCHEMA}`,label:m.TABLE_SCHEMA}))})):[]),s=f=>{let p=f;return p.startsWith("^")&&(p=p.slice(1)),p.endsWith("$")&&(p=p.slice(0,-1)),p},l=V((f=>{const p=[];if(f){if(typeof f=="object")Object.keys(f)?.forEach(m=>{f[m]?.length>0?f[m]?.forEach(g=>{p.push(`${s(m)}:${s(g)}`)}):p.push(s(m))});else if(typeof f=="string")try{const m=JSON.parse(f);Object.keys(m)?.forEach(g=>{m[g].length>0?m[g]?.forEach(y=>{p.push(`${s(g)}:${s(y)}`)}):p.push(s(g))})}catch{p.push(s(f))}}return p})(t.field.state.value)),u=f=>{const p=new Set(i.value.map(g=>g.value)),m=new Set(f.filter(g=>p.has(g)));return m.size?f.filter(g=>m.has(g)?!0:![...m].some(y=>g.startsWith(`${y}:`))):f},c=f=>{const p={};return f.forEach(m=>{if(m.includes(":")){const g=m.split(":")[0];p[`^${g}$`]=[]}else p[`^${m}$`]=[]}),f.forEach(m=>{if(m.includes(":")){const[g,y]=m.split(":"),v=`^${g}$`;y&&p[v]&&p[v].push(`^${y}$`)}}),p},d=f=>{const p=u(f),m=c(p);t.field.handleChange(m),l.value=p};return(f,p)=>(_(),D(h(jn),{isTree:"",multiple:"",options:h(i),modelValue:h(l),"onUpdate:modelValue":d},null,8,["options","modelValue"]))}}),XP=Object.assign(JP,{__name:"SQLTree"}),QP=P({__name:"APITree",props:{field:{},property:{}},async setup(t){let e,n;const a=tt(mt),{data:r}=([e,n]=Va(()=>Ia(`${t.property.id}_metadata`,()=>{const d=a.getFieldValue("credential_guid_body"),f=t.property.ui?.metadataTemplateKey;return $fetch("/workflows/v1/metadata",{method:"POST",body:{...d&&d,...f&&{type:f},...f&&{database:f}}})})),e=await e,n(),e);function i(d,f=null){return d.map(p=>{const m=f?`${f}:${p.value}`:p.value;return{value:m,label:p.title,children:p.children?i(p.children,m):void 0}})}const s=k(()=>r.value?i(r.value.data):[]),l=V((d=>{const f=[],p=(m,g=[])=>{Array.isArray(m)?g.length>0&&f.push(g.join(":")):typeof m=="object"&&m!==null&&Object.keys(m).forEach(y=>{p(m[y],[...g,y])})};if(d)if(typeof d=="string")try{p(JSON.parse(d))}catch{f.push(d)}else p(d);return f})(t.field.state.value)),u=d=>{const f={};return d.forEach(p=>{const m=p.split(":");let g=f;m.forEach((y,v)=>{g[y]||(g[y]={}),v!==m.length-1&&(g=g[y])})}),f},c=d=>{const f=u(d);t.field.handleChange(f),l.value=d};return(d,f)=>(_(),D(h(jn),{isTree:"",multiple:"",options:h(s),modelValue:h(l),"onUpdate:modelValue":c},null,8,["options","modelValue"]))}}),e4=Object.assign(QP,{__name:"APITree"}),t4={class:"border border-gray-200 rounded-lg p-6 bg-white"},n4={class:"flex items-center justify-between mb-4"},a4={key:0,class:"mt-4 space-y-3"},r4={class:"flex items-start gap-3"},i4={class:"flex-1"},s4={class:"flex items-center gap-2"},o4={class:"font-medium text-gray-900 capitalize"},l4={key:0,class:"text-sm text-gray-600 mt-1"},u4={key:1,class:"text-sm text-red-600 mt-1"},c4={key:1,class:"mt-4 text-center text-gray-500 text-sm"},d4=P({name:"SageWidget",__name:"Sage",props:{property:{},field:{}},setup(t){const e=tt(Zv),n=V(!1),a=V(null);async function r(){n.value=!0,a.value=null;try{const{credentialBody:o,startPayload:l}=await e(),u=await $fetch("/workflows/v1/check",{method:"POST",body:{...l||{},...o?{credentials:o}:{}}});a.value=u.data,u.success?lr.success("Pre-flight checks completed!",{placement:"top",duration:3e3}):lr.failed("Some pre-flight checks failed",{placement:"top",duration:3e3})}catch(o){lr.failed("Failed to run pre-flight checks. Please try again.",{placement:"top",duration:3e3}),console.error("Pre-flight check error:",o)}finally{n.value=!1}}const i=o=>o?"✓":"✗",s=o=>o?"text-green-600":"text-red-600";return(o,l)=>(_(),O("div",t4,[T("div",n4,[l[0]||(l[0]=T("div",null,[T("h3",{class:"text-lg font-semibold text-gray-900"}," Pre-flight Checks "),T("p",{class:"text-sm text-gray-500 mt-1"}," Verify your configuration before starting the workflow ")],-1)),R(h(_t),{label:"Check","is-loading":h(n),onClick:r},null,8,["is-loading"])]),h(a)?(_(),O("div",a4,[(_(!0),O(ge,null,ke(h(a),(u,c)=>(_(),O("div",{key:c,class:"border border-gray-200 rounded-md p-4"},[T("div",r4,[T("span",{class:L(["text-xl font-bold",s(u.success)])},Q(i(u.success)),3),T("div",i4,[T("div",s4,[T("h4",o4,Q(c.replace(/([A-Z])/g," $1").trim()),1),T("span",{class:L(["text-xs px-2 py-0.5 rounded-full font-medium",u.success?"bg-green-100 text-green-700":"bg-red-100 text-red-700"])},Q(u.success?"Passed":"Failed"),3)]),u.success&&u.successMessage?(_(),O("p",l4,Q(u.successMessage),1)):H("",!0),!u.success&&u.failureMessage?(_(),O("p",u4,Q(u.failureMessage),1)):H("",!0)])])]))),128))])):h(n)?H("",!0):(_(),O("div",c4,' Click "Check" to run pre-flight checks '))]))}}),f4=Object.assign(d4,{__name:"Sage"}),h4=P({__name:"Connection",props:{property:{},modelValue:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n={properties:{name:{type:"string",ui:{widget:"input",label:"Connection name",placeholder:"environment",help:"Name of your connection which represents your source environment. Example - 'production', 'development', 'gold', 'analytics' ",required:!0,grid:4,rules:[{required:!0,message:"Please enter a connection name"}]}}}};return(a,r)=>(_(),D(h(e),{"config-map":n,"base-key":t.property.id},null,8,["base-key"]))}}),p4=Object.assign(h4,{__name:"Connection"}),m4={key:0,class:"text-sm text-gray-500 mt-2"},g4={key:1,class:"text-sm text-red-500 mt-2"},v4=P({name:"FileUploadWidget",__name:"FileUpload",props:{property:{},disabled:{type:Boolean},field:{}},setup(t){const e=V(!1),n=V(null),a=async s=>{const o=new FormData;return o.append("file",s),await $fetch("/workflows/v1/file",{method:"POST",body:o})},r=async s=>{const{files:o}=s;if(!o||o.length===0)return;const l=o[0];if(l){e.value=!0,n.value=null;try{const u=await a(l);t.property.ui?.fileMetadata?t.field.handleChange(JSON.stringify({...u,fileKey:u.key,fileId:u.id})):t.field.handleChange(u.id)}catch(u){n.value=u instanceof Error?u.message:"Failed to upload file"}finally{e.value=!1}}},i=k(()=>({placeholder:t.property.ui?.placeholder||"Drag and drop files here",accept:t.property.ui?.accept,isDisabled:t.disabled||e.value}));return(s,o)=>(_(),O("div",null,[R(h(NC),re(h(i),{onFileAccept:r,onBlur:t.field.handleBlur}),null,16,["onBlur"]),h(e)?(_(),O("div",m4," Uploading... ")):H("",!0),h(n)?(_(),O("div",g4,Q(h(n)),1)):H("",!0)]))}}),y4=Object.assign(v4,{__name:"FileUpload"});const kp=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b4=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,a)=>a?a.toUpperCase():n.toLowerCase()),x4=t=>{const e=b4(t);return e.charAt(0).toUpperCase()+e.slice(1)},w4=(...t)=>t.filter((e,n,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===n).join(" ").trim(),Sp=t=>t==="";var jr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const _4=({name:t,iconNode:e,absoluteStrokeWidth:n,"absolute-stroke-width":a,strokeWidth:r,"stroke-width":i,size:s=jr.width,color:o=jr.stroke,...l},{slots:u})=>Ke("svg",{...jr,...l,width:s,height:s,stroke:o,"stroke-width":Sp(n)||Sp(a)||n===!0||a===!0?Number(r||i||jr["stroke-width"])*24/Number(s):r||i||jr["stroke-width"],class:w4("lucide",l.class,...t?[`lucide-${kp(x4(t))}-icon`,`lucide-${kp(t)}`]:["lucide-icon"])},[...e.map(c=>Ke(...c)),...u.default?[u.default()]:[]]);const Ht=(t,e)=>(n,{slots:a,attrs:r})=>Ke(_4,{...r,...n,iconNode:e,name:t},a);const $4=Ht("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const k4=Ht("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ny=Ht("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const S4=Ht("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const C4=Ht("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Nu=Ht("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const M4=Ht("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);const ay=Ht("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const D4=Ht("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const A4=Ht("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const O4=Ht("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const pi=Ht("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),E4={key:0,class:"text-red-500"},T4={key:0,class:"absolute right-3 top-3 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},P4={class:"flex justify-center"},I4=P({__name:"Repeater",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n=tt(mt),a=s=>{s.pushValue()},r=(s,o)=>{const l=t.property.ui.minItems??1;s.state.value.length>l&&s.removeValue(o)},i=s=>t.property.ui.maxItems!==void 0&&s.state.value.length>=t.property.ui.maxItems;return(s,o)=>(_(),D(h(n).Field,{name:t.property.id,mode:"array"},{default:C(({field:l})=>[T("div",null,[T("div",null,[R(h(nd),null,{default:C(()=>[xe(Q(t.property.ui?.label)+" ",1),t.property?.required?(_(),O("span",E4," * ")):H("",!0)]),_:1})]),(_(!0),O(ge,null,ke(l.state.value,(u,c)=>(_(),O("div",{key:c,class:"relative mb-3 border border-gray-300 rounded-lg p-4 group hover:border-gray-400 transition-colors"},[l.state.value.length>(t.property.ui.minItems??1)?(_(),O("div",T4,[R(h(A4),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>{r(l,c)}},null,8,["onClick"])])):H("",!0),R(h(e),{configMap:t.property,baseKey:`${t.property.id}[${c}]`},null,8,["configMap","baseKey"])]))),128)),T("div",P4,[R(h(_t),{type:"default",label:`Add to ${t.property.ui.label}`,disabled:i(l),onClick:()=>{a(l)}},null,8,["label","disabled","onClick"])])])]),_:1},8,["name"]))}}),L4=Object.assign(I4,{__name:"Repeater"}),q4={class:"flex flex-col gap-y-4 py-2"},V4={class:"flex flex-col gap-y-1"},F4={key:0,class:"text-xs text-red-600"},B4={key:0,class:"flex flex-col gap-y-1"},R4={key:0,class:"text-xs text-red-600"},N4=P({name:"CreateConnectionModal",__name:"CreateConnectionModal",props:{isOpen:{type:Boolean},connectorConfigurations:{},existingNames:{}},emits:["update:isOpen","created"],setup(t,{emit:e}){const n=t,a=e,r=V(""),i=V(""),s=V(!1),o=k(()=>n.connectorConfigurations.length>1),l=k(()=>n.connectorConfigurations.map(x=>({label:x.connector,value:x.connector}))),u=k(()=>r.value.trim()),c=k(()=>s.value?u.value?n.existingNames?.some(x=>x?.trim()===u.value)?"A connection with this name already exists":"":"Name is required":""),d=k(()=>s.value&&o.value&&!i.value?"Connector is required":""),f=k(()=>!u.value),p=()=>{r.value="",s.value=!1,i.value=n.connectorConfigurations.length===1?n.connectorConfigurations[0]?.connector??"":""};de(()=>n.isOpen,x=>{x&&p()},{immediate:!0}),de(()=>n.connectorConfigurations,()=>{n.connectorConfigurations.length===1&&!i.value&&(i.value=n.connectorConfigurations[0]?.connector??"")});const m=()=>{a("update:isOpen",!1)},g=()=>{if(s.value=!0,c.value||d.value)return;const x=n.connectorConfigurations.find(S=>S.connector===i.value),w=i.value,$={attributes:{qualifiedName:`default/${w}/${Date.now()}`,name:u.value,connectorName:w,image:x?.connectorImage}};a("created",$),a("update:isOpen",!1)},y=k(()=>({label:"Create connection",onClick:g,variant:f.value?"default":"primary"})),v=k(()=>({label:"Cancel",onClick:m})),b=x=>{i.value=x[0]??""};return(x,w)=>(_(),D(h(M3),{isOpen:t.isOpen,title:"Create new connection",size:"small",primaryAction:h(y),secondaryAction:h(v),"onUpdate:isOpen":w[1]||(w[1]=$=>a("update:isOpen",$))},{default:C(()=>[T("div",q4,[T("div",V4,[w[2]||(w[2]=T("label",{class:"text-sm font-medium text-new-gray-700"}," Name ",-1)),R(h(Cr),{modelValue:h(r),"onUpdate:modelValue":w[0]||(w[0]=$=>Tn(r)?r.value=$:null),placeholder:"e.g. Production warehouse",variant:h(c)?"error":"default",state:"idle",autofocus:""},null,8,["modelValue","variant"]),h(c)?(_(),O("span",F4,Q(h(c)),1)):H("",!0)]),h(o)?(_(),O("div",B4,[w[3]||(w[3]=T("label",{class:"text-sm font-medium text-new-gray-700"}," Connector ",-1)),R(h(jn),{modelValue:h(i)?[h(i)]:[],options:h(l),placeholder:"Select a connector",variant:h(d)?"error":"default","onUpdate:modelValue":b},null,8,["modelValue","options","variant"]),h(d)?(_(),O("span",R4,Q(h(d)),1)):H("",!0)])):H("",!0)])]),_:1},8,["isOpen","primaryAction","secondaryAction"]))}}),j4=Object.assign(N4,{__name:"CreateConnectionModal"}),z4={class:"flex flex-col gap-y-2"},W4={key:0},H4=P({name:"ConnectionSelector",__name:"ConnectionSelector",props:{property:{},disabled:{type:Boolean},field:{}},setup(t){const e=k(()=>t.property.ui?.mode==="multiple"),n=()=>t.property.enum&&t.property.enumNames?t.property.enum.map((m,g)=>({attributes:{qualifiedName:m,name:t.property.enumNames?.[g],connectorName:m.split("/")[1]}})):[{attributes:{qualifiedName:"default/snowflake/1234567890",name:"Production Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",name:"Staging Database",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/postgres/8938390",name:"Development Database",connectorName:"postgres"}},{attributes:{qualifiedName:"default/bigquery/1234567890",name:"Analytics Warehouse",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/s3/1234567890",name:"Backup Storage",connectorName:"s3"}}],a=V(n());de([()=>t.property.enum,()=>t.property.enumNames],()=>{a.value=n()});const r=k(()=>a.value.map(m=>({label:m.attributes.name??m.attributes.qualifiedName,value:m.attributes.qualifiedName}))),i=m=>a.value.find(g=>g.attributes.qualifiedName===m),o=V((()=>{const m=t.field.state.value;if(!m)return[];if(yo(m))return m.every(y=>Ul(y))?m:vs(m.map(y=>y?.attributes?.qualifiedName));if(bo(m)){const y=m?.attributes?.qualifiedName;return y?[y]:[]}if(!Ul(m))return[];let g;try{g=JSON.parse(m)}catch{return[m]}if(yo(g))return g.every(Ul)?g:vs(g.map(y=>y?.attributes?.qualifiedName));if(g&&bo(g)){const y=g?.attributes?.qualifiedName;return y?[y]:[m]}return[m]})());function l(m){if(o.value=m,t.property.ui?.shouldIncludeConnectionInfo)if(e.value){const g=vs(m.map(y=>i(y)));t.field.handleChange(g)}else{const g=m[0]?i(m[0]):void 0;t.field.handleChange(g||void 0)}else t.field.handleChange(e.value?m:m[0])}const u=k(()=>(t.property.ui?.canCreateNewConnections?.connectorConfigurations.length??0)>0),c=V(!1),d=k(()=>vs(a.value.map(m=>m.attributes.name))),f=()=>{c.value=!0},p=m=>{a.value=[...a.value,m];const g=m.attributes.qualifiedName;e.value?l([...o.value,g]):l([g])};return(m,g)=>(_(),O("div",z4,[R(h(jn),{id:t.property.id,modelValue:h(o),options:h(r),placeholder:t.property.placeholder,"is-disabled":t.disabled,multiple:h(e),variant:"default","onUpdate:modelValue":l,onBlur:t.field.handleBlur},null,8,["id","modelValue","options","placeholder","is-disabled","multiple","onBlur"]),h(u)?(_(),O("div",W4,[R(h(_t),{type:"link",size:"small",label:"Add new connection","is-disabled":t.disabled,"data-test-id":"create-new-connection-action",onClick:f},{prefix:C(()=>[R(h(ay),{class:"h-3.5 w-3.5"})]),_:1},8,["is-disabled"])])):H("",!0),h(u)?(_(),D(j4,{key:1,isOpen:h(c),"onUpdate:isOpen":g[0]||(g[0]=y=>Tn(c)?c.value=y:null),connectorConfigurations:t.property.ui.canCreateNewConnections.connectorConfigurations,existingNames:h(d),onCreated:p},null,8,["isOpen","connectorConfigurations","existingNames"])):H("",!0)]))}}),U4=Object.assign(H4,{__name:"ConnectionSelector"}),Y4=P({name:"SwitcherWidget",__name:"Switcher",props:{property:{},field:{}},setup(t){const e=({checked:n})=>{t.field.handleChange(n)};return(n,a)=>(_(),O("div",null,[R(h(kO),{checked:t.field.state.value,onCheckedChange:e},{default:C(()=>[xe(Q(t.property.ui?.title),1)]),_:1},8,["checked"])]))}}),K4=Object.assign(Y4,{__name:"Switcher"}),Cp=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},At=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(a=>{["__proto__","constructor","prototype"].includes(a)||(Array.isArray(e[a])&&Array.isArray(n[a])?e[a]=At.options.mergeArrays?At.options.uniqueArrayItems?Array.from(new Set(e[a].concat(n[a]))):[...e[a],...n[a]]:n[a]:Cp(e[a])&&Cp(n[a])?e[a]=At(e[a],n[a]):e[a]=n[a]===void 0?At.options.allowUndefinedOverrides?n[a]:e[a]:n[a])}),e},{}),ju={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};At.options=ju;At.withOptions=(t,...e)=>{At.options=Object.assign(Object.assign({},ju),t);const n=At(...e);return At.options=ju,n};const G4={properties:{divider:{ui:{widget:"divider",class:"mt-0"}},header:{ui:{widget:"header",label:"Secure Agent Configuration",class:"mb-4 text-base text-new-gray-500"}},"agent-name":{type:"string",required:!0,ui:{widget:"agentSelector",label:"Agent",grid:4,rules:[{required:!0,message:"Please select an agent"}]}},"secret-manager":{type:"string",required:!0,enum:["awssecretmanager","azurekeyvault","gcpsecretmanager","secretinjectionenvironment","kubernetes","custom"],enumNames:["AWS Secret Manager","Azure Key Vault","GCP Secret Manager","Environment Variable based Injection","Kubernetes Secret","Custom"],ui:{widget:"select",label:"Secret Store",placeholder:"Secret Store",rules:[{required:!0,message:"Please select the secret store"}]}},"secret-path":{type:"string",required:!0,ui:{label:"Secret Path/Name in Secret Manager",placeholder:"Enter Secret Path/Name",help:"The secret path or name of the stored secret in the secret manager",hidden:!1,grid:4,rules:[{required:!0,message:"Please enter the secret path"}]}},"aws-region":{type:"string",enum:["us-east-1","us-east-2","us-west-1","us-west-2","af-south-1","ap-east-1","ap-south-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-west-1","eu-west-2","eu-west-3","eu-north-1","eu-south-1","me-south-1","sa-east-1"],required:!0,enumNames:["US East (N. Virginia)","US East (Ohio)","US West (N. California)","US West (Oregon)","Africa (Cape Town)","Asia Pacific (Hong Kong)","Asia Pacific (Mumbai)","Asia Pacific (Tokyo)","Asia Pacific (Seoul)","Asia Pacific (Osaka)","Asia Pacific (Singapore)","Asia Pacific (Sydney)","Canada (Central)","Europe (Frankfurt)","Europe (Ireland)","Europe (London)","Europe (Paris)","Europe (Stockholm)","Europe (Milan)","Middle East (Bahrain)","South America (São Paulo)"],ui:{widget:"select",label:"AWS Region",placeholder:"Select AWS Region",grid:4,rules:[{required:!0,message:"Please select a region"}]}},"aws-auth-method":{type:"string",required:!0,enum:["iam","iam-assume-role","access-key"],default:"iam",enumNames:["IAM","IAM Assume Role","Access Key and Secret Key"],ui:{widget:"select",label:"AWS Authentication Method",placeholder:"Select AWS Authentication Method",help:"In case of IAM assume role or access key and secret key authentication, the keys should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an AWS authentication method"}]}},"aws-assume-role-arn":{type:"string",required:!0,ui:{label:"AWS Assume Role ARN",placeholder:"Enter AWS Role ARN to assume",help:"The AWS role ARN to assume for accessing AWS Secret Manager",hidden:!1,grid:4}},"azure-auth-method":{type:"string",enum:["managed_identity","service_principal"],default:"managed_identity",enumNames:["Managed Identity","Service Principal"],ui:{widget:"select",label:"Azure Authentication Method",placeholder:"Select Azure Authentication Method",help:"In case of Service Principal authentication, the client id, client secret and tenant id should be set as environment variables or added in kubernetes secrets",grid:4,rules:[{required:!0,message:"Please select an Azure authentication method"}]}},"azure-vault-name":{type:"string",required:!0,ui:{label:"Azure Key Vault Name",placeholder:"Enter Azure Key Vault Name",help:"The name of the Azure Key Vault",hidden:!1,grid:8}},"agent-custom-config":{type:"string",ui:{label:"Agent Custom configuration",placeholder:"{}",help:"Use this if you wish to use any custom configuration for the agent. Do not enter any sensitive information here.",hidden:!1,grid:8}},"aws-secret-manager-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the AWS Secret, add the path for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"azure-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Azure Key Vault, add the name of key vault secret for the fields with the placeholder Store Credential Path. Example: atlan-crawler-db-username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"secret-injection-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"Add the expected environment variable values for the fields with the placeholder Store Credential Path. Example: vault:secret/data/accounts/test#PASSWORD",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"kubernetes-secret-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the K8S Secret, add the corresponding key name in the secret for the fields with the placeholder Store Credential Path. Example: username",link:{label:"View docs",url:"https://ask.atlan.com/"}}},"gcp-help-text":{type:"banner",ui:{hidden:!1,category:"info",prefixText:"For the Google Secret Manager, add the secret path for the fields with the placeholder Store Credential Path. Example: projects/{project_id}/secrets/{secret_id}/versions/{version_id}",link:{label:"View docs",url:"https://ask.atlan.com/"}}}},anyOf:[{properties:{"secret-manager":{const:"awssecretmanager"}},required:["aws-auth-method","aws-region","secret-path","aws-secret-manager-help-text"]},{properties:{"aws-auth-method":{const:"iam-assume-role"},"secret-manager":{const:"awssecretmanager"}},required:["aws-assume-role-arn"]},{properties:{"secret-manager":{const:"azurekeyvault"}},required:["azure-auth-method","azure-vault-name","azure-help-text"]},{properties:{"secret-manager":{const:"secretinjectionenvironment"}},required:["secret-injection-help-text"]},{properties:{"secret-manager":{const:"kubernetes"}},required:["secret-path","kubernetes-secret-help-text"]},{properties:{"secret-manager":{const:"gcpsecretmanager"}},required:["gcp-help-text"]},{properties:{"secret-manager":{const:"custom"}},required:["agent-custom-config"]}]},Z4={config:G4},J4=t=>{try{const e=JSON.parse(t);return typeof e=="object"&&e!==null}catch{return!1}return!0};function X4(t){if(!t)return{message:null,link:null};if(!J4(t))return{message:t,link:null};const e=JSON.parse(t);return{message:e.error_message??e.debug_message??t,link:e.doc_link?e.doc_link:null}}const Q4={key:0,class:"flex items-center justify-center",style:{height:"100px"}},eI={key:1,class:"flex items-center justify-center"},tI={class:"text-red-500 text-sm"},nI={class:"mt-2"},aI={key:0,class:"flex flex-col mt-2 gap-y-2"},rI={class:"flex"},iI={key:0,class:"p-3 border rounded-md border-green-400 bg-green-100"},sI={key:0,class:"mt-1"},oI={class:"text-sm text-green-600"},lI={key:1,class:"p-3 border rounded-md border-new-red-400 bg-new-red-100"},uI={class:"mt-1"},cI={class:"text-sm text-new-red-600","data-test-id":"error-log-message"},dI=["href"],fI="atlan-connectors-agent",hI=P({__name:"Agent",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n=tt(mt),a=k(()=>t.property.ui?.agentConfigs??[]),r=k(()=>t.property.ui?.agentType),i=k(()=>{const y=r.value?[{name:r.value,options:{}}]:[],v=a.value.map(([b,x={}])=>({name:b,options:x}));return[...y,...v].filter(b=>b.name)});async function s(y){if(y===fI)return{data:Z4};const b=(await $fetch(`/workflows/v1/configmap/${y}`))?.data;return b&&"kind"in b?{data:{config:JSON.parse(b.data.config)}}:{data:{config:b?.config??{}}}}const o=V(null),l=V(!0),u=V(null);de(i,async y=>{l.value=!0,u.value=null;try{o.value=await Promise.all(y.map(({name:v})=>s(v)))}catch(v){u.value=v}finally{l.value=!1}},{immediate:!0});const c=k(()=>{if(!o.value)return null;let y={};for(let v=0;v<i.value.length;v++){const b=i.value[v];if(!b)continue;const x=o.value[v]?.data?.config;if(x)if(Object.keys(b.options).length>0){const w=At(y,x,b.options);y=At.withOptions({mergeArrays:!1},w,b.options)}else y=At(y,x)}return Object.keys(y).length>0?y:null}),d=n.useStore(y=>sa(y.values));de(c,y=>{y?.properties&&Object.entries(Zo(y)).forEach(([v,b])=>{const x=`${t.property.id}.${v}`;d.value[x]||n.setFieldValue(x,b)})},{immediate:!0});const f=k(()=>{const y=a.value[0];return Array.isArray(y)?y[0]:r.value??""}),p=V(!1),m=V(null);de(d,()=>{m.value=null});async function g(){p.value=!0,m.value=null;try{const y=await $fetch("/workflows/v1/auth",{method:"POST",body:JSON.stringify(Ru(d.value,t.property.id,f.value,void 0))});m.value={success:!0,message:y.message||"Authentication successful"}}catch(y){const v=y,{message:b,link:x}=X4(v?.data?.message||v?.message);m.value={success:!1,message:b||"Authentication failed",link:x}}finally{p.value=!1}}return(y,v)=>h(l)?(_(),O("div",Q4,[...v[0]||(v[0]=[T("span",{class:"text-sm text-gray-500"},"Loading credential configuration...",-1)])])):h(u)?(_(),O("div",eI,[T("span",tI,Q(h(u)),1)])):h(c)?(_(),O("div",{key:2,class:L([t.property.ui?.class,"flex flex-col gap-y-2"])},[T("div",nI,[R(h(e),{"config-map":h(c),"base-key":t.property.id},null,8,["config-map","base-key"])]),t.property.ui?.showTestAuthentication?(_(),O("div",aI,[T("div",rI,[R(h(_t),{loading:h(p),label:h(p)?"Testing Authentication":"Test Authentication",onClick:g},null,8,["loading","label"])]),h(m)?.success?(_(),O("div",iI,[v[1]||(v[1]=T("span",{class:"text-sm font-semibold text-green-700"}," Authentication successful ",-1)),h(m).message?(_(),O("div",sI,[T("span",oI,Q(h(m).message),1)])):H("",!0)])):H("",!0),h(m)&&!h(m).success?(_(),O("div",lI,[v[2]||(v[2]=T("span",{class:"text-sm font-semibold text-new-red-700"}," Authentication failed ",-1)),T("div",uI,[T("span",cI,Q(h(m).message),1),h(m).link?(_(),O("a",{key:0,href:h(m).link,target:"_blank",class:"ml-1 text-sm text-blue-600 underline"}," Troubleshoot ",8,dI)):H("",!0)])])):H("",!0)])):H("",!0)],2)):H("",!0)}}),pI=Object.assign(hI,{__name:"Agent"}),mI=P({name:"AgentSelector",__name:"AgentSelector",props:{property:{},disabled:{type:Boolean},field:{},baseKey:{}},setup(t){const e=tt(mt),n=[{id:"atlas-agent-1",label:"Atlas Agent 1",agentType:"atlas"},{id:"miner-agent-2",label:"Miner Agent 2",agentType:"miner"},{id:"lineage-agent-3",label:"Lineage Agent 3",agentType:"lineage"},{id:"catalog-agent-4",label:"Catalog Agent 4",agentType:"catalog"}],a=n.map(({id:s,label:o})=>({value:s,label:o})),r=V(t.field.state.value?[t.field.state.value]:[]);function i(s){r.value=s,t.field.handleChange(s[0]);const o=n.find(l=>l.id===s[0]);if(o){const l=t.baseKey?`${t.baseKey}.agent-type`:"agent-type";e.setFieldValue(l,o.agentType)}}return(s,o)=>(_(),D(h(jn),{id:t.property.id,"model-value":h(r),options:h(a),placeholder:t.property.placeholder,"is-disabled":t.disabled,variant:"default","onUpdate:modelValue":i,onBlur:t.field.handleBlur},null,8,["id","model-value","options","placeholder","is-disabled","onBlur"]))}}),gI=Object.assign(mI,{__name:"AgentSelector"});var Mp;const vI=typeof window<"u";vI&&((Mp=window?.navigator)!=null&&Mp.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function yI(t,e){function n(...a){return new Promise((r,i)=>{Promise.resolve(t(()=>e.apply(this,a),{fn:e,thisArg:this,args:a})).then(r).catch(i)})}return n}const ry=t=>t();function bI(t=ry){const e=V(!0);function n(){e.value=!1}function a(){e.value=!0}const r=(...i)=>{e.value&&t(...i)};return{isActive:Ai(e),pause:n,resume:a,eventFilter:r}}function xI(t){return t}var Dp=Object.getOwnPropertySymbols,wI=Object.prototype.hasOwnProperty,_I=Object.prototype.propertyIsEnumerable,$I=(t,e)=>{var n={};for(var a in t)wI.call(t,a)&&e.indexOf(a)<0&&(n[a]=t[a]);if(t!=null&&Dp)for(var a of Dp(t))e.indexOf(a)<0&&_I.call(t,a)&&(n[a]=t[a]);return n};function kI(t,e,n={}){const a=n,{eventFilter:r=ry}=a,i=$I(a,["eventFilter"]);return de(t,yI(r,e),i)}var SI=Object.defineProperty,CI=Object.defineProperties,MI=Object.getOwnPropertyDescriptors,xo=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,sy=Object.prototype.propertyIsEnumerable,Ap=(t,e,n)=>e in t?SI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DI=(t,e)=>{for(var n in e||(e={}))iy.call(e,n)&&Ap(t,n,e[n]);if(xo)for(var n of xo(e))sy.call(e,n)&&Ap(t,n,e[n]);return t},AI=(t,e)=>CI(t,MI(e)),OI=(t,e)=>{var n={};for(var a in t)iy.call(t,a)&&e.indexOf(a)<0&&(n[a]=t[a]);if(t!=null&&xo)for(var a of xo(t))e.indexOf(a)<0&&sy.call(t,a)&&(n[a]=t[a]);return n};function wo(t,e,n={}){const a=n,{eventFilter:r}=a,i=OI(a,["eventFilter"]),{eventFilter:s,pause:o,resume:l,isActive:u}=bI(r);return{stop:kI(t,e,AI(DI({},i),{eventFilter:s})),pause:o,resume:l,isActive:u}}function EI(t,e,n){return de(t,(a,r,i)=>{a&&e(a,r,i)},n)}const Op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ep="__vueuse_ssr_handlers__";Op[Ep]=Op[Ep]||{};var Tp;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Tp||(Tp={}));function TI(){const t=V([]);return t.value.set=e=>{e&&t.value.push(e)},Dm(()=>{t.value.length=0}),t}var PI=Object.defineProperty,Pp=Object.getOwnPropertySymbols,II=Object.prototype.hasOwnProperty,LI=Object.prototype.propertyIsEnumerable,Ip=(t,e,n)=>e in t?PI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qI=(t,e)=>{for(var n in e||(e={}))II.call(e,n)&&Ip(t,n,e[n]);if(Pp)for(var n of Pp(e))LI.call(e,n)&&Ip(t,n,e[n]);return t};const VI={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};qI({linear:xI},VI);var Yl={},zr={},Wr={},Lp;function vd(){if(Lp)return Wr;Lp=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.HostType=void 0;var t;return function(e){e.domain="domain",e.socket="socket",e.IPv4="IPv4",e.IPv6="IPv6"}(t||(Wr.HostType=t={})),Wr}var wn={},qp;function FI(){if(qp)return wn;qp=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.fullHostName=e,wn.encode=n,wn.decode=a,wn.hasText=r,wn.validateUrl=i,wn.parseHost=s;const t=vd();function e(o,l){let u="";return o.name&&(u=o.type===t.HostType.IPv4||o.type===t.HostType.IPv6?o.name:n(o.name,l??{})),o.port&&(u+=`:${o.port}`),u}function n(o,l){return o=encodeURIComponent(o),l.plusForSpace&&(o=o.replace(/%20/g,"+")),l.encodeDollar?o:o.replace(/%24/g,"$")}function a(o){return decodeURIComponent(o.replace(/\+/g,"%20"))}function r(o){return typeof o=="string"&&/\S/.test(o)}function i(o){const l=o.search(/[^a-z0-9-._:\/?[\]@!$&'()*+,;=%~]/i);if(l>=0){const u=JSON.stringify(o[l]).replace(/^"|"$/g,"'");throw new Error(`Invalid URL character ${u} at position ${l}`)}}function s(o,l){if(l){if(typeof o!="string")throw new TypeError(`Invalid "host" parameter: ${JSON.stringify(o)}`);o=o.trim()}let u,c;if(o[0]==="["?(u=o.match(/((\[[0-9a-z:%_]{2,45}])(?::(-?[0-9a-z]+))?)/i),c=!0):l?u=o.match(/(([a-z0-9.$/\- _]*)(?::(-?[0-9a-z]+))?)/i):u=o.match(/(([a-z0-9.+$%\-_]*)(?::(-?[0-9a-z]+))?)/i),u){const d={};if(u[2]&&(c?(d.name=u[2],d.type=t.HostType.IPv6):u[2].match(/([0-9]{1,3}\.){3}[0-9]{1,3}/)?(d.name=u[2],d.type=t.HostType.IPv4):(d.name=l?u[2]:a(u[2]),d.type=d.name.match(/\/|.*\.sock$/i)?t.HostType.socket:t.HostType.domain)),u[3]){const f=u[3],p=parseInt(f);if(p>0&&p<65536&&p.toString()===f)d.port=p;else throw new Error(`Invalid port: ${JSON.stringify(f)}. Valid port range is: [1...65535]`)}if(d.name||d.port)return Object.defineProperty(d,"toString",{value:f=>e(d,f),enumerable:!1}),d}return null}return wn}var Vp;function BI(){if(Vp)return zr;Vp=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.ConnectionString=void 0;const t=vd(),e=FI(),n='Invalid "defaults" parameter: ';class a{get host(){return this.hosts?.[0].toString()}get hostname(){return this.hosts?.[0].name}get port(){return this.hosts?.[0].port}get type(){return this.hosts?.[0].type}constructor(i,s){if(i=i??"",typeof i!="string")throw new TypeError(`Invalid connection string: ${JSON.stringify(i)}`);if(typeof(s??{})!="object")throw new TypeError(n+JSON.stringify(s));i=i.trim(),(0,e.validateUrl)(i);let o=i.match(/^(.*)?:\/\//);if(o){const u=o[1];if(u){const c=u.match(/^([a-z]+[a-z0-9+-.:]*)/i);if(u&&(!c||c[1]!==u))throw new Error(`Invalid protocol name: ${u}`);this.protocol=u}i=i.substring(o[0].length)}if(o=i.match(/^([\w-_.+!*'()$%]*):?([\w-_.+!*'()$%~]*)@/),o&&(o[1]&&(this.user=(0,e.decode)(o[1])),o[2]&&(this.password=(0,e.decode)(o[2])),i=i.substring(o[0].length)),i[0]!=="/"){const u=i.search(/[\/?]/);(u===-1?i:i.substring(0,u)).split(",").forEach(d=>{const f=(0,e.parseHost)(d);f&&(this.hosts||(this.hosts=[]),this.hosts.push(f))}),u>=0&&(i=i.substring(u))}o=i.match(/\/([\w-_.+!*'()$%]+)/g),o&&(this.path=o.map(u=>(0,e.decode)(u.substring(1))));const l=i.indexOf("?");if(l!==-1&&(i=i.substring(l+1),o=i.match(/([\w-_.+!*'()$%]+)=([\w-_.+!*'()$%,]+)/g),o)){const u={};o.forEach(c=>{const d=c.split("="),f=(0,e.decode)(d[0]),p=d[1].split(",").map(e.decode);f in u?Array.isArray(u[f])?u[f].push(...p):u[f]=[u[f],...p]:u[f]=p.length>1?p:p[0]}),this.params=u}s&&this.setDefaults(s)}static parseHost(i){return(0,e.parseHost)(i,!0)}toString(i){let s=this.protocol?`${this.protocol}://`:"";const o=i||{};if(this.user||this.password){if(this.user&&(s+=(0,e.encode)(this.user,o)),this.password){s+=":";const l=o.passwordHash;if(l){const u=typeof l=="string"&&l[0]||"#";s+=u.repeat(this.password.length)}else s+=(0,e.encode)(this.password,o)}s+="@"}if(Array.isArray(this.hosts)&&(s+=this.hosts.map(l=>(0,e.fullHostName)(l,i)).join()),Array.isArray(this.path)&&this.path.forEach(l=>{s+=`/${(0,e.encode)(l,o)}`}),this.params&&typeof this.params=="object"){const l=[];for(const u in this.params){let c=this.params[u];c=Array.isArray(c)?c:[c],c=c.map(d=>(0,e.encode)(typeof d=="string"?d:JSON.stringify(d),o)).join(),o.plusForSpace&&(c=c.replace(/%20/g,"+")),l.push(`${(0,e.encode)(u,o)}=${c}`)}l.length&&(s+=`?${l.join("&")}`)}return s}setDefaults(i){if(!i||typeof i!="object")throw new TypeError(n+JSON.stringify(i));if(!("protocol"in this)&&(0,e.hasText)(i.protocol)&&(this.protocol=i.protocol&&i.protocol.trim()),Array.isArray(i.hosts)){const s=Array.isArray(this.hosts)?this.hosts:[];i.hosts.filter(l=>l&&typeof l=="object").forEach(l=>{const c={name:(0,e.hasText)(l.name)?l.name.trim():void 0,port:l.port,type:l.type};let d=!1;for(let f=0;f<s.length;f++){const p=(0,e.fullHostName)(s[f]),m=(0,e.fullHostName)(c);if(p.toLowerCase()===m.toLowerCase()){d=!0;break}}if(!d){const f={};if(c.name)if(c.type&&c.type in t.HostType)f.name=c.name,f.type=c.type;else{const m=(0,e.parseHost)(c.name,!0);m&&(f.name=m.name,f.type=m.type)}const p=c.port;typeof p=="number"&&p>0&&p<65536&&(f.port=p),(f.name||f.port)&&(Object.defineProperty(f,"toString",{value:m=>(0,e.fullHostName)(f,m)}),s.push(f))}}),s.length&&(this.hosts=s)}if(!("user"in this)&&(0,e.hasText)(i.user)&&(this.user=i.user.trim()),!("password"in this)&&(0,e.hasText)(i.password)&&(this.password=i.password.trim()),!("path"in this)&&Array.isArray(i.path)){const s=i.path.filter(e.hasText);s.length&&(this.path=s)}if(i.params&&typeof i.params=="object"&&Object.keys(i.params).length)if(this.params&&typeof this.params=="object")for(const o in i.params)o in this.params||(this.params[o]=i.params[o]);else{this.params={};for(const o in i.params)this.params[o]=i.params[o]}return this}}return zr.ConnectionString=a,function(){["setDefaults","toString"].forEach(r=>{const i=Object.getOwnPropertyDescriptor(a.prototype,r);i.enumerable=!1,Object.defineProperty(a.prototype,r,i)})}(),zr}var Fp;function RI(){return Fp||(Fp=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HostType=t.ConnectionString=void 0;var e=BI();Object.defineProperty(t,"ConnectionString",{enumerable:!0,get:function(){return e.ConnectionString}});var n=vd();Object.defineProperty(t,"HostType",{enumerable:!0,get:function(){return n.HostType}})}(Yl)),Yl}var bs=RI();const Bp=0,Rp=1,NI=P({__name:"AdvancedJDBCUrlGroup",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n=t,a=tt(mt),r=a.useStore(d=>sa(d.values));function i(d){try{return new bs.ConnectionString(d),!0}catch{return!1}}const s=k(()=>r.value[n.property.ui.urlPropertyId]),o=k(()=>gd(r.value,Object.values(sa(n.property.ui.urlPartPropertyIdMapping)).filter(d=>d!==n.property.ui.urlPropertyId))),l=[],u=wo(s,async d=>{const f=n.property.ui.isDelimitedBySemicolons?d?.replace(";","?").replaceAll(";","&"):d;if(f&&i(f)){const p=new bs.ConnectionString(f);l[Rp]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([m,g])=>{m==="searchParams"?Object.entries(g).forEach(([y,v])=>{p.params?.[y]&&Object.keys(r.value).includes(v)&&a.setFieldValue(v,p.params[y])}):m==="pathname"?Object.keys(r.value).includes(g)&&a.setFieldValue(g,p.path?.[0]):m==="username"?Object.keys(r.value).includes(g)&&a.setFieldValue(g,p.user):p[m]&&Object.keys(r.value).includes(g)&&a.setFieldValue(g,p[m])}),await qe(),l[Rp]?.resume()}});l.push(u);const c=wo([o,()=>n.property.ui],async([d,f],[p,m])=>{l[Bp]?.pause();let g={protocol:Xv(f.protocol,":")};if(s.value){const b=f.isDelimitedBySemicolons?s.value.replace(";","?").replaceAll(";","&"):s.value;if(i(b)&&md(m,f)){const x=new bs.ConnectionString(b);for(const w of["protocol","user","password","hosts","port","path","params"])g={...g,[w]:x[w]}}}const y={};Object.entries(f.urlPartPropertyIdMapping).forEach(([b,x])=>{b==="searchParams"?Object.entries(x).forEach(([w,$])=>{Object.keys(d).includes($)?g={...g,params:{...g.params,[w]:d[$]}}:g={...g,params:{...g.params,[w]:$}}}):b==="hostname"?d[x]&&(y.name=d[x],g={...g,hosts:[y]}):b==="port"?d[x]&&(y.port=d[x],g={...g,hosts:[y]}):b==="username"?d[x]&&(g={...g,user:d[x]}):b==="pathname"?d[x]&&(g={...g,path:[d[x]]}):d[x]&&(g={...g,[b]:d[x]})});const v=new bs.ConnectionString(null,g);a.setFieldValue(f.urlPropertyId,f.isDelimitedBySemicolons?v.toString().replace("?",";").replaceAll("&",";"):v.toString()),await qe(),l[Bp]?.resume()});return l.push(c),(d,f)=>(_(),D(h(e),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),jI=Object.assign(NI,{__name:"AdvancedJDBCUrlGroup"}),Np=0,jp=1,zI=P({__name:"JDBCUrlGroup",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n=t,a=tt(mt),r=a.useStore(c=>sa(c.values)),i=k(()=>r.value[n.property.ui.urlPropertyId]),s=k(()=>gd(r.value,Object.values(sa(n.property.ui.urlPartPropertyIdMapping)).filter(c=>c!==n.property.ui.urlPropertyId))),o=[],l=wo(i,async c=>{const d=n.property.ui.isDelimitedBySemicolons?c?.replace(";","?").replaceAll(";","&"):c;if(d&&URL.canParse(d)){const f=new URL(d);o[jp]?.pause(),Object.entries(n.property.ui.urlPartPropertyIdMapping).forEach(([p,m])=>{if(p==="searchParams")Object.entries(m).forEach(([g,y])=>{f.searchParams.get(g)&&Object.keys(r.value).includes(y)&&a.setFieldValue(y,f.searchParams.get(g))});else{const g=f[p];g&&Object.keys(r.value).includes(m)&&a.setFieldValue(m,p==="pathname"?Xv(g,"/"):g)}}),await qe(),o[jp]?.resume()}});o.push(l);const u=wo([s,()=>n.property.ui],async([c,d],[f,p])=>{o[Np]?.pause();let m=new URL(`${d.protocol}//`);if(i.value){const g=d.isDelimitedBySemicolons?i.value.replace(";","?").replaceAll(";","&"):i.value;URL.canParse(g)&&md(p,d)&&(m=new URL(g))}Object.entries(d.urlPartPropertyIdMapping).forEach(([g,y])=>{g==="searchParams"?Object.entries(y).forEach(([v,b])=>{Object.keys(c).includes(b)?m.searchParams.set(v,c[b]):m.searchParams.set(v,b)}):c[y]&&(m[g]=c[y])}),a.setFieldValue(d.urlPropertyId,d.isDelimitedBySemicolons?m.toString().replace("?",";").replaceAll("&",";"):m.toString()),await qe(),o[Np]?.resume()});return o.push(u),(c,d)=>(_(),D(h(e),{class:"border border-gray-200 rounded-lg p-3 mb-4","config-map":n.property,"base-key":n.property.id.split(".")[0]},null,8,["config-map","base-key"]))}}),WI=Object.assign(zI,{__name:"JDBCUrlGroup"}),HI=P({__name:"NestedCollapse",props:{property:{}},setup(t){const e=Fn(()=>oa(()=>Promise.resolve().then(()=>fa),void 0,import.meta.url)),n=V([]);return(a,r)=>(_(),D(h(ux),{modelValue:h(n),"onUpdate:modelValue":r[0]||(r[0]=i=>Tn(n)?n.value=i:null),collapsible:""},{default:C(()=>[(_(!0),O(ge,null,ke(t.property.panels,i=>(_(),D(h(H1),{key:i.id,value:i.id},{default:C(()=>[R(h(lx),null,{default:C(()=>[xe(Q(i.header)+" ",1),R(h(tx),null,{default:C(()=>[R(h(ny),{class:"w-4 h-4 transition-transform"})]),_:1})]),_:2},1024),R(h(X1),null,{default:C(()=>[R(h(e),{"config-map":i.configMap,"base-key":t.property.id},null,8,["config-map","base-key"])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]))}}),UI=Object.assign(HI,{__name:"NestedCollapse"}),YI=P({__name:"ApiSelect",props:{field:{},property:{}},async setup(t){let e,n;const a=tt(mt),r=k(()=>!!t.property.ui?.isMultiple),{data:i}=([e,n]=Va(()=>Ia(`${t.property.id}_metadata`,()=>{const f=a.getFieldValue("credential_guid_body"),{metadataTemplateKey:p,metadataTransformerTemplateKey:m}=t.property.ui??{};return $fetch("/workflows/v1/metadata",{method:"POST",body:{...f&&f,...p&&{type:p},...p&&{database:p},...m&&{metadataTransformerTemplateKey:m}}})})),e=await e,n(),e);function s(f,p=null){return f.map(m=>{const g=p?`${p}:${m.value}`:m.value;return{value:g,label:m.title,children:m.children?s(m.children,g):void 0}})}const o=k(()=>i.value?s(i.value.data):[]),u=V((f=>{const p=[],m=(g,y=[])=>{Array.isArray(g)?y.length>0&&p.push(y.join(":")):typeof g=="object"&&g!==null&&Object.keys(g).forEach(v=>{m(g[v],[...y,v])})};if(f)if(typeof f=="string")try{m(JSON.parse(f))}catch{p.push(f)}else m(f);return p})(t.field.state.value)),c=f=>{const p={};return f.forEach(m=>{const g=m.split(":");let y=p;g.forEach((v,b)=>{y[v]||(y[v]={}),b!==g.length-1&&(y=y[v])})}),p},d=f=>{const p=Array.isArray(f)?f:[f].filter(Boolean);t.field.handleChange(c(p)),u.value=p};return(f,p)=>(_(),D(h(jn),{isTree:"",multiple:h(r),options:h(o),modelValue:h(u),"onUpdate:modelValue":d},null,8,["multiple","options","modelValue"]))}}),KI=Object.assign(YI,{__name:"ApiSelect"}),GI={class:"flex flex-col gap-y-1"},ZI={class:"text-gray-600"},JI=["href"],XI=P({__name:"Checkbox",props:{field:{},property:{}},setup(t){const e=k(()=>t.property?.ui),n=a=>{t.field.handleChange(a.checked),t.field.handleBlur()};return(a,r)=>(_(),O("div",GI,[R(h(mg),{checked:t.field.state.value,"data-test-id":t.property?.id,onCheckedChange:n},{default:C(()=>[T("span",ZI,Q(h(e)?.title),1),h(e)?.link?(_(),O("a",{key:0,href:h(e).link.url,target:"_blank",class:"hover:underline"},Q(h(e).link.text),9,JI)):H("",!0)]),_:1},8,["checked","data-test-id"])]))}}),QI=Object.assign(XI,{__name:"Checkbox"});function Kl(t,e){return t-e*Math.floor(t/e)}const oy=1721426;function xs(t,e,n,a){e=yd(t,e);let r=e-1,i=-2;return n<=2?i=0:Ys(e)&&(i=-1),oy-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+i+a)}function Ys(t){return t%4===0&&(t%100!==0||t%400===0)}function yd(t,e){return t==="BC"?1-e:e}function e8(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const t8={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class br{fromJulianDay(e){let n=e,a=n-oy,r=Math.floor(a/146097),i=Kl(a,146097),s=Math.floor(i/36524),o=Kl(i,36524),l=Math.floor(o/1461),u=Kl(o,1461),c=Math.floor(u/365),d=r*400+s*100+l*4+c+(s!==4&&c!==4?1:0),[f,p]=e8(d),m=n-xs(f,p,1,1),g=2;n<xs(f,p,3,1)?g=0:Ys(p)&&(g=1);let y=Math.floor(((m+g)*12+373)/367),v=n-xs(f,p,y,1)+1;return new _r(f,p,y,v)}toJulianDay(e){return xs(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return t8[Ys(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Ys(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function n8(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function a8(t){return On(Date.now(),t)}function r8(t){return u8(a8(t))}function ly(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function i8(t,e){return zp(t)-zp(e)}function zp(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Gl=null,s8=!1;function bd(){return Gl==null&&(Gl=new Intl.DateTimeFormat().resolvedOptions().timeZone),Gl}function uy(){return s8}function xr(t){t=fn(t,new br);let e=yd(t.era,t.year);return cy(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function cy(t,e,n,a,r,i,s){let o=new Date;return o.setUTCHours(a,r,i,s),o.setUTCFullYear(t,e-1,n),o.getTime()}function zu(t,e){if(e==="UTC")return 0;if(t>0&&e===bd()&&!uy())return new Date(t).getTimezoneOffset()*-6e4;let{year:n,month:a,day:r,hour:i,minute:s,second:o}=dy(t,e);return cy(n,a,r,i,s,o,0)-Math.floor(t/1e3)*1e3}const Wp=new Map;function dy(t,e){let n=Wp.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Wp.set(e,n));let a=n.formatToParts(new Date(t)),r={};for(let i of a)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const Hp=864e5;function o8(t,e,n,a){return(n===a?[n]:[n,a]).filter(i=>l8(t,e,i))}function l8(t,e,n){let a=dy(n,e);return t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}function Mn(t,e,n="compatible"){let a=wr(t);if(e==="UTC")return xr(a);if(e===bd()&&n==="compatible"&&!uy()){a=fn(a,new br);let l=new Date,u=yd(a.era,a.year);return l.setFullYear(u,a.month-1,a.day),l.setHours(a.hour,a.minute,a.second,a.millisecond),l.getTime()}let r=xr(a),i=zu(r-Hp,e),s=zu(r+Hp,e),o=o8(a,e,r-i,r-s);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-i,r-s);case"compatible":case"later":return Math.max(r-i,r-s);case"reject":throw new RangeError("No such absolute time found")}}function fy(t,e,n="compatible"){return new Date(Mn(t,e,n))}function On(t,e){let n=zu(t,e),a=new Date(t+n),r=a.getUTCFullYear(),i=a.getUTCMonth()+1,s=a.getUTCDate(),o=a.getUTCHours(),l=a.getUTCMinutes(),u=a.getUTCSeconds(),c=a.getUTCMilliseconds();return new ki(r<1?"BC":"AD",r<1?-r+1:r,i,s,e,n,o,l,u,c)}function u8(t){return new _r(t.calendar,t.era,t.year,t.month,t.day)}function wr(t,e){let n=0,a=0,r=0,i=0;if("timeZone"in t)({hour:n,minute:a,second:r,millisecond:i}=t);else if("hour"in t&&!e)return t;return e&&({hour:n,minute:a,second:r,millisecond:i}=e),new $o(t.calendar,t.era,t.year,t.month,t.day,n,a,r,i)}function fn(t,e){if(n8(t.calendar,e))return t;let n=e.fromJulianDay(t.calendar.toJulianDay(t)),a=t.copy();return a.calendar=e,a.era=n.era,a.year=n.year,a.month=n.month,a.day=n.day,La(a),a}function c8(t,e,n){if(t instanceof ki)return t.timeZone===e?t:f8(t,e);let a=Mn(t,e,n);return On(a,e)}function d8(t){let e=xr(t)-t.offset;return new Date(e)}function f8(t,e){let n=xr(t)-t.offset;return fn(On(n,e),t.calendar)}const Hr=36e5;function Jo(t,e){let n=t.copy(),a="hour"in n?g8(n,e):0;Wu(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,t),n.month+=e.months||0,Hu(n),hy(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=a,h8(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){let s=n.calendar.isInverseEra?.(n);n.year=r,n.month=s?1:n.calendar.getMonthsInYear(n),n.day=s?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let i=n.calendar.getMonthsInYear(n);return n.month>i&&(n.month=i,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Wu(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function Hu(t){for(;t.month<1;)Wu(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,Wu(t,1)}function h8(t){for(;t.day<1;)t.month--,Hu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,Hu(t)}function hy(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function La(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),hy(t)}function py(t){let e={};for(let n in t)typeof t[n]=="number"&&(e[n]=-t[n]);return e}function my(t,e){return Jo(t,py(e))}function xd(t,e){let n=t.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),La(n),n}function _o(t,e){let n=t.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),m8(n),n}function p8(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=ws(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=ws(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=ws(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=ws(t.hour,24),e}function m8(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function ws(t,e){let n=t%e;return n<0&&(n+=e),n}function g8(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,p8(t)}function wd(t,e,n,a){let r=t.copy();switch(e){case"era":{let i=t.calendar.getEras(),s=i.indexOf(t.era);if(s<0)throw new Error("Invalid era: "+t.era);s=En(s,n,0,i.length-1,a?.round),r.era=i[s],La(r);break}case"year":r.calendar.isInverseEra?.(r)&&(n=-n),r.year=En(t.year,n,-1/0,9999,a?.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t);break;case"month":r.month=En(t.month,n,1,t.calendar.getMonthsInYear(t),a?.round);break;case"day":r.day=En(t.day,n,1,t.calendar.getDaysInMonth(t),a?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(r),La(r),r}function gy(t,e,n,a){let r=t.copy();switch(e){case"hour":{let i=t.hour,s=0,o=23;if(a?.hourCycle===12){let l=i>=12;s=l?12:0,o=l?23:11}r.hour=En(i,n,s,o,a?.round);break}case"minute":r.minute=En(t.minute,n,0,59,a?.round);break;case"second":r.second=En(t.second,n,0,59,a?.round);break;case"millisecond":r.millisecond=En(t.millisecond,n,0,999,a?.round);break;default:throw new Error("Unsupported field "+e)}return r}function En(t,e,n,a,r=!1){if(r){t+=Math.sign(e),t<n&&(t=a);let i=Math.abs(e);e>0?t=Math.ceil(t/i)*i:t=Math.floor(t/i)*i,t>a&&(t=n)}else t+=e,t<n?t=a-(n-t-1):t>a&&(t=n+(t-a-1));return t}function vy(t,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let r=Jo(wr(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Mn(r,t.timeZone)}else n=xr(t)-t.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let a=On(n,t.timeZone);return fn(a,t.calendar)}function v8(t,e){return vy(t,py(e))}function y8(t,e,n,a){switch(e){case"hour":{let r=0,i=23;if(a?.hourCycle===12){let m=t.hour>=12;r=m?12:0,i=m?23:11}let s=wr(t),o=fn(_o(s,{hour:r}),new br),l=[Mn(o,t.timeZone,"earlier"),Mn(o,t.timeZone,"later")].filter(m=>On(m,t.timeZone).day===o.day)[0],u=fn(_o(s,{hour:i}),new br),c=[Mn(u,t.timeZone,"earlier"),Mn(u,t.timeZone,"later")].filter(m=>On(m,t.timeZone).day===u.day).pop(),d=xr(t)-t.offset,f=Math.floor(d/Hr),p=d%Hr;return d=En(f,n,Math.floor(l/Hr),Math.floor(c/Hr),a?.round)*Hr+p,fn(On(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return gy(t,e,n,a);case"era":case"year":case"month":case"day":{let r=wd(wr(t),e,n,a),i=Mn(r,t.timeZone);return fn(On(i,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function b8(t,e,n){let a=wr(t),r=_o(xd(a,e),e);if(r.compare(a)===0)return t;let i=Mn(r,t.timeZone,n);return fn(On(i,t.timeZone),t.calendar)}function x8(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function yy(t){let e=fn(t,new br),n;return e.era==="BC"?n=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):n=String(e.year).padStart(4,"0"),`${n}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function by(t){return`${yy(t)}T${x8(t)}`}function w8(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let n=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),r=Math.floor(t%36e5%6e4/1e3),i=`${e}${String(n).padStart(2,"0")}:${String(a).padStart(2,"0")}`;return r!==0&&(i+=`:${String(r).padStart(2,"0")}`),i}function _8(t){return`${by(t)}${w8(t.offset)}[${t.timeZone}]`}function _d(t){let e=typeof t[0]=="object"?t.shift():new br,n;if(typeof t[0]=="string")n=t.shift();else{let s=e.getEras();n=s[s.length-1]}let a=t.shift(),r=t.shift(),i=t.shift();return[e,n,a,r,i]}class _r{#n;constructor(...e){let[n,a,r,i,s]=_d(e);this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,La(this)}copy(){return this.era?new _r(this.calendar,this.era,this.year,this.month,this.day):new _r(this.calendar,this.year,this.month,this.day)}add(e){return Jo(this,e)}subtract(e){return my(this,e)}set(e){return xd(this,e)}cycle(e,n,a){return wd(this,e,n,a)}toDate(e){return fy(this,e)}toString(){return yy(this)}compare(e){return ly(this,e)}}class $o{#n;constructor(...e){let[n,a,r,i,s]=_d(e);this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,La(this)}copy(){return this.era?new $o(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $o(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Jo(this,e)}subtract(e){return my(this,e)}set(e){return xd(_o(this,e),e)}cycle(e,n,a){switch(e){case"era":case"year":case"month":case"day":return wd(this,e,n,a);default:return gy(this,e,n,a)}}toDate(e,n){return fy(this,e,n)}toString(){return by(this)}compare(e){let n=ly(this,e);return n===0?i8(this,wr(e)):n}}class ki{#n;constructor(...e){let[n,a,r,i,s]=_d(e),o=e.shift(),l=e.shift();this.calendar=n,this.era=a,this.year=r,this.month=i,this.day=s,this.timeZone=o,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,La(this)}copy(){return this.era?new ki(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ki(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vy(this,e)}subtract(e){return v8(this,e)}set(e,n){return b8(this,e,n)}cycle(e,n,a){return y8(this,e,n,a)}toDate(){return d8(this)}toString(){return _8(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-c8(e,this.timeZone).toDate().getTime()}}const $8=P({__name:"Date",props:{field:{},property:{}},setup(t){const e=bd(),n=k(()=>t.property?.ui),a=k(()=>r8(e)),r=k(()=>a.value.add({days:n.value?.min??0})),i=k(()=>a.value.add({days:n.value?.max??0})),s=k(()=>a.value.add({days:n.value?.default??0})),o=f=>{const p=f;return p.compare(r.value)<0||p.compare(i.value)>0},l=f=>{const p=parseInt(f,10);if(!p)return null;const m=new Date(p*1e3);return new _r(m.getUTCFullYear(),m.getUTCMonth()+1,m.getUTCDate())},u=f=>Math.floor(f.toDate("UTC").getTime()/1e3).toString(),c=k(()=>{const f=t.field.state.value;if(!f||parseInt(f,10)===0)return[];const p=l(f);return p?[p]:[]}),d=f=>{const[p]=f.value;p&&(t.field.handleChange(u(p)),t.field.handleBlur())};return Ie(()=>{const f=t.field.state.value;(!f||parseInt(f,10)===0)&&(t.field.handleChange(u(s.value)),t.field.handleBlur())}),(f,p)=>(_(),D(h(MS),{"model-value":h(c),"is-date-unavailable":o,"data-test-id":t.property?.id,onValueChange:d},null,8,["model-value","data-test-id"]))}}),k8=Object.assign($8,{__name:"Date"}),S8=P({__name:"InputNumber",props:{field:{},property:{}},setup(t){const e=t.field.state.value,n=V((()=>{if(e==null||e==="")return"";const r=typeof e=="string"?parseFloat(e):e;return isNaN(r)?"":String(r)})()),a=r=>{n.value=r;const i=parseFloat(r);t.field.handleChange(isNaN(i)?void 0:i),t.field.handleBlur()};return(r,i)=>(_(),D(h(oM),{"model-value":h(n),min:t.property?.ui?.min,max:t.property?.ui?.max,step:t.property?.ui?.step,disabled:t.property?.ui?.disabled,"data-test-id":t.property?.id,class:"w-full","onUpdate:modelValue":a},null,8,["model-value","min","max","step","disabled","data-test-id"]))}}),C8=Object.assign(S8,{__name:"InputNumber"}),M8={key:0,class:"text-red-500"},D8={class:"max-h-[300px] overflow-y-auto overflow-x-hidden pr-1"},A8=["data-test-id"],O8={class:"flex-grow max-w-[calc(100%-30px)]"},E8={key:0,class:"absolute right-0 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer p-1"},T8=P({__name:"InputRepeater",props:{property:{}},setup(t){const e=tt(mt),n=TI(),a=c=>{const d=new Set;return c.filter(f=>f.trim()===""?!0:d.has(f.trim())?!1:(d.add(f.trim()),!0))},r=V(!1),i=c=>{const d=t.property.ui.maxItems;d!==void 0&&c.state.value.length>=d||(c.pushValue(""),r.value||qe(()=>{const f=n.value[c.state.value.length-1];f&&f.focus()}))},s=(c,d)=>{const f=t.property.ui.minItems??1;c.state.value.length>f&&c.removeValue(d)},o=(c,d)=>{d===c.state.value.length-1&&(r.value=!0,i(c),r.value=!1)},l=(c,d,f)=>{f.preventDefault();const m=(f.clipboardData?.getData("text")??"").split(/\r?\n|\r|,/).map(v=>v.trim()).filter(v=>v.length>0);if(m.length===0)return;const g=[...c.state.value];g.splice(d,1,...m);const y=a(g);e.setFieldValue(t.property.id,y)},u=(c,d,f)=>{const p=[...c.state.value];p[d]=f,e.setFieldValue(t.property.id,p)};return Ie(()=>{const c=e.getFieldValue(t.property.id),d=t.property.ui.maxItems;if(!c||c.length===0){e.setFieldValue(t.property.id,[""]);return}c[c.length-1]!==""&&(d===void 0||c.length<d)&&e.setFieldValue(t.property.id,[...c,""])}),(c,d)=>(_(),D(h(e).Field,{name:t.property.id,mode:"array"},{default:C(({field:f})=>[T("div",null,[T("div",null,[R(h(nd),null,{default:C(()=>[xe(Q(t.property.ui?.label)+" ",1),t.property?.required?(_(),O("span",M8," * ")):H("",!0)]),_:1})]),T("div",D8,[(_(!0),O(ge,null,ke(f.state.value,(p,m)=>(_(),O("div",{key:m,"data-test-id":t.property.id,class:"relative flex items-center justify-between group mb-4"},[T("div",O8,[R(h(Cr),{ref_for:!0,ref:h(n).set,"model-value":f.state.value[m],placeholder:t.property.ui?.placeholder,"onUpdate:modelValue":g=>u(f,m,g),onFocus:()=>o(f,m),onPaste:g=>l(f,m,g),onKeydown:lt(ye(()=>i(f),["prevent"]),["enter"])},null,8,["model-value","placeholder","onUpdate:modelValue","onFocus","onPaste","onKeydown"])]),f.state.value.length>(t.property.ui.minItems??1)?(_(),O("div",E8,[R(h(pi),{class:"w-4 h-4 text-gray-400 hover:text-red-500",onClick:()=>s(f,m)},null,8,["onClick"])])):H("",!0)],8,A8))),128))])])]),_:1},8,["name"]))}}),P8=Object.assign(T8,{__name:"InputRepeater"}),I8=P({__name:"Evaluate",props:{property:{}},setup(t){const e=tt(mt),n=k(()=>t.property.ui?.value);return EI(n,()=>{e?.setFieldValue(t.property.id,n.value)},{immediate:!0}),(a,r)=>(_(),D(Ne(null)))}}),L8=Object.assign(I8,{__name:"Evaluate"}),q8=P({name:"ConnectionTree",__name:"ConnectionTree",props:ru({isAdmin:{type:Boolean,default:!1},connections:{},databases:{default:()=>[]},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:ru(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=qm(t,"modelValue"),a=e,r=l=>!0,i=k(()=>{let l=t.connections.filter(u=>t.isAdmin?r():!0).map(u=>{const c=t.databases.filter(d=>d.attributes.connectionQualifiedName===u.attributes.qualifiedName).map(d=>({label:d.attributes.displayName||d.attributes.name||"",value:d.attributes.qualifiedName,disabled:!1}));return{label:u.attributes.displayName||u.attributes.name||"",value:u.attributes.qualifiedName,connector:u.attributes.connectorName,children:c}});return l=l.filter(u=>u.children&&u.children.length>0),l.sort((u,c)=>(u.connector||"").localeCompare(c.connector||"")),l}),s=k(()=>n.value?[n.value]:[]);function o(l){const u=Array.isArray(l)?l[0]:l;n.value=u,a("change",u)}return(l,u)=>(_(),D(h(jn),{isTree:"","model-value":h(s),options:h(i),placeholder:t.placeholder??"Select a connection",variant:"default","onUpdate:modelValue":o},null,8,["model-value","options","placeholder"]))}}),V8=Object.assign(q8,{__name:"ConnectionTree"}),F8={key:0,class:"dsn-tree-map-shell flex flex-col gap-4 p-4 rounded-md"},B8={class:"flex flex-col gap-2"},R8={key:0,class:"font-semibold text-gray-800"},N8={key:1,class:"text-sm text-new-gray-600"},j8={class:"flex gap-4"},z8={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},W8={class:"flex items-center w-1/2 gap-2 text-sm text-gray-700"},H8={class:"flex items-center gap-3"},U8={class:"flex-1"},Y8={class:"flex-1"},K8=["disabled","onClick"],G8={key:0,class:"mt-1 text-xs text-red-500"},Z8={key:1,class:"my-1 border-t border-new-gray-200"},J8=["disabled"],X8=P({name:"DsnTreeMapWidget",__name:"DsnTreeMap",props:{property:{},field:{}},setup(t){const e=k(()=>t.property.ui?.config),n=tt(mt,null),a=[{attributes:{qualifiedName:"default/snowflake/1234567890",displayName:"Production Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321",displayName:"Staging Snowflake",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890",displayName:"Analytics BigQuery",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390",displayName:"Dev Postgres",connectorName:"postgres"}}],r=[{attributes:{qualifiedName:"default/snowflake/1234567890/ANALYTICS_PROD",displayName:"ANALYTICS_PROD",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/1234567890/RAW",displayName:"RAW",connectionQualifiedName:"default/snowflake/1234567890",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/snowflake/0987654321/ANALYTICS_STAGING",displayName:"ANALYTICS_STAGING",connectionQualifiedName:"default/snowflake/0987654321",connectorName:"snowflake"}},{attributes:{qualifiedName:"default/bigquery/1234567890/analytics-prod",displayName:"analytics-prod",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/bigquery/1234567890/marketing",displayName:"marketing",connectionQualifiedName:"default/bigquery/1234567890",connectorName:"bigquery"}},{attributes:{qualifiedName:"default/postgres/8938390/app_db",displayName:"app_db",connectionQualifiedName:"default/postgres/8938390",connectorName:"postgres"}}],i=k(()=>t.property.ui?.connections??a),s=k(()=>t.property.ui?.databases??r),o=k(()=>{if(!n)return[];const x=n.getFieldValue("sql-connection-qualified-names");if(!x)return[];if(Array.isArray(x))return x;try{const w=JSON.parse(x);return Array.isArray(w)?w:[x]}catch{return[x]}}),l=k(()=>o.value.length?i.value.filter(x=>o.value.includes(x.attributes.qualifiedName)):i.value),c=V((()=>{const x=t.field?.state?.value;if(!x)return[{id:1,dsn:"",connection:void 0}];let w={};try{w=typeof x=="string"?JSON.parse(x):x}catch{return[{id:1,dsn:"",connection:void 0}]}const $=Object.keys(w||{});return $.length?$.map((S,E)=>({id:E+1,dsn:S,connection:w[S]})):[{id:1,dsn:"",connection:void 0}]})()),d=V(c.value.length+1),f=k(()=>{const x={};return c.value.forEach(w=>{const $=w.dsn.trim();$&&(x[$]=(x[$]||0)+1)}),Object.keys(x).filter(w=>x[w]>1)}),p=k(()=>c.value.every(x=>x.dsn.trim()&&x.connection)&&f.value.length===0);function m(){const x={};c.value.forEach(w=>{const $=w.dsn.trim();$&&w.connection&&(x[$]=w.connection)}),t.field.handleChange(JSON.stringify(x))}function g(x,w){const $=c.value.find(S=>S.id===x);$&&($.dsn=w,m())}function y(x,w){const $=c.value.find(S=>S.id===x);$&&($.connection=w,m())}function v(){c.value.push({id:d.value++,dsn:"",connection:void 0})}function b(x){c.value=c.value.filter(w=>w.id!==x),c.value.length===0&&c.value.push({id:d.value++,dsn:"",connection:void 0}),m()}return(x,w)=>{const $=V8;return h(e)?(_(),O("div",F8,[T("div",B8,[h(e).heading?(_(),O("h2",R8,Q(h(e).heading),1)):H("",!0),h(e).content?(_(),O("p",N8,Q(h(e).content),1)):H("",!0)]),T("div",j8,[T("div",z8,[T("span",null,Q(h(e).inputLabel??"DSN"),1),h(e).inputHelpText?(_(),D(h(Yn),{key:0,title:h(e).inputHelpText},{default:C(()=>[R(h(Nu),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):H("",!0)]),T("div",W8,[T("span",null,Q(h(e).connectionLabel??"Connection"),1),h(e).connectionHelpText?(_(),D(h(Yn),{key:0,title:h(e).connectionHelpText},{default:C(()=>[R(h(Nu),{class:"h-3.5 w-3.5 text-gray-400 cursor-pointer"})]),_:1},8,["title"])):H("",!0)])]),(_(!0),O(ge,null,ke(h(c),(S,E)=>(_(),O("div",{key:S.id,class:"flex flex-col gap-1"},[T("div",H8,[T("div",U8,[R(h(Cr),{"model-value":S.dsn,placeholder:h(e).inputPlaceholder??"Enter DSN",variant:"default",state:"idle",class:L({"dsn-duplicate":h(f).includes(S.dsn.trim())}),"onUpdate:modelValue":A=>g(S.id,A)},null,8,["model-value","placeholder","class","onUpdate:modelValue"])]),T("div",Y8,[R($,{isAdmin:"","model-value":S.connection,connections:h(l),databases:h(s),placeholder:h(e).connectionPlaceholder??"Select connection",onChange:A=>y(S.id,A)},null,8,["model-value","connections","databases","placeholder","onChange"])]),R(h(Yn),{title:"Remove Mapping"},{default:C(()=>[T("button",{type:"button",disabled:h(c).length===1,class:"p-1 text-gray-500 rounded hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed",onClick:A=>b(S.id)},[R(h(pi),{class:"h-4 w-4"})],8,K8)]),_:2},1024)]),h(f).includes(S.dsn.trim())?(_(),O("div",G8," This DSN is duplicated. Please provide a unique name. ")):H("",!0),E<h(c).length-1?(_(),O("div",Z8)):H("",!0)]))),128)),T("div",null,[R(h(Yn),{title:"Add Another Mapping"},{default:C(()=>[T("button",{type:"button",disabled:!h(p),class:"p-1 rounded border border-solid border-new-gray-300 text-gray-600 hover:bg-new-gray-100 disabled:opacity-40 disabled:cursor-not-allowed","aria-label":"Add Another Mapping",onClick:v},[R(h(ay),{class:"h-4 w-4"})],8,J8)]),_:1})])])):H("",!0)}}}),Q8=Object.assign(Oo(X8,[["__scopeId","data-v-08522bfa"]]),{__name:"DsnTreeMap"});function $d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ra=$d();function xy(t){Ra=t}const wy=/[&<>"']/,eL=new RegExp(wy.source,"g"),_y=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,tL=new RegExp(_y.source,"g"),nL={"&":"&","<":"<",">":">",'"':""","'":"'"},Up=t=>nL[t];function Mt(t,e){if(e){if(wy.test(t))return t.replace(eL,Up)}else if(_y.test(t))return t.replace(tL,Up);return t}const aL=/(^|[^\[])\^/g;function Ee(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const a={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(aL,"$1"),n=n.replace(r,s),a},getRegex:()=>new RegExp(n,e)};return a}function Yp(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const mi={exec:()=>null};function Kp(t,e){const n=t.replace(/\|/g,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),a=n.split(/ \|/);let r=0;if(a[0].trim()||a.shift(),a.length>0&&!a[a.length-1].trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;r<a.length;r++)a[r]=a[r].trim().replace(/\\\|/g,"|");return a}function Ur(t,e,n){const a=t.length;if(a===0)return"";let r=0;for(;r<a&&t.charAt(a-r-1)===e;)r++;return t.slice(0,a-r)}function rL(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])n++;else if(t[a]===e[1]&&(n--,n<0))return a;return-1}function Gp(t,e,n,a){const r=e.href,i=e.title?Mt(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){a.state.inLink=!0;const o={type:"link",raw:n,href:r,title:i,text:s,tokens:a.inlineTokens(s)};return a.state.inLink=!1,o}return{type:"image",raw:n,href:r,title:i,text:Mt(s)}}function iL(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const a=n[1];return e.split(`
|
|
25
|
+
`).map(r=>{const i=r.match(/^\s+/);if(i===null)return r;const[s]=i;return s.length>=a.length?r.slice(a.length):r}).join(`
|
|
26
|
+
`)}class ko{options;rules;lexer;constructor(e){this.options=e||Ra}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const a=n[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Ur(a,`
|
|
27
|
+
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const a=n[0],r=iL(a,n[3]||"");return{type:"code",raw:a,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let a=n[2].trim();if(/#$/.test(a)){const r=Ur(a,"#");(this.options.pedantic||!r||/ $/.test(r))&&(a=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:Ur(n[0],`
|
|
28
|
+
`)}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let a=Ur(n[0],`
|
|
29
|
+
`).split(`
|
|
30
|
+
`),r="",i="";const s=[];for(;a.length>0;){let o=!1;const l=[];let u;for(u=0;u<a.length;u++)if(/^ {0,3}>/.test(a[u]))l.push(a[u]),o=!0;else if(!o)l.push(a[u]);else break;a=a.slice(u);const c=l.join(`
|
|
31
|
+
`),d=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
32
|
+
$1`).replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}
|
|
33
|
+
${c}`:c,i=i?`${i}
|
|
34
|
+
${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,a.length===0)break;const p=s[s.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){const m=p,g=m.raw+`
|
|
35
|
+
`+a.join(`
|
|
36
|
+
`),y=this.blockquote(g);s[s.length-1]=y,r=r.substring(0,r.length-m.raw.length)+y.raw,i=i.substring(0,i.length-m.text.length)+y.text;break}else if(p?.type==="list"){const m=p,g=m.raw+`
|
|
37
|
+
`+a.join(`
|
|
38
|
+
`),y=this.list(g);s[s.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,i=i.substring(0,i.length-m.raw.length)+y.raw,a=g.substring(s[s.length-1].raw.length).split(`
|
|
39
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let n=this.rules.block.list.exec(e);if(n){let a=n[1].trim();const r=a.length>1,i={type:"list",raw:"",ordered:r,start:r?+a.slice(0,-1):"",loose:!1,items:[]};a=r?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=r?a:"[*+-]");const s=new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let l=!1,u="",c="";if(!(n=s.exec(e))||this.rules.block.hr.test(e))break;u=n[0],e=e.substring(u.length);let d=n[2].split(`
|
|
40
|
+
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=e.split(`
|
|
41
|
+
`,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,c=d.trimStart()):p?m=n[1].length+1:(m=n[2].search(/[^ ]/),m=m>4?1:m,c=d.slice(m),m+=n[1].length),p&&/^[ \t]*$/.test(f)&&(u+=f+`
|
|
42
|
+
`,e=e.substring(f.length+1),l=!0),!l){const v=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,m-1)}}#`),$=new RegExp(`^ {0,${Math.min(3,m-1)}}<(?:[a-z].*>|!--)`,"i");for(;e;){const S=e.split(`
|
|
43
|
+
`,1)[0];let E;if(f=S,this.options.pedantic?(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),E=f):E=f.replace(/\t/g," "),x.test(f)||w.test(f)||$.test(f)||v.test(f)||b.test(f))break;if(E.search(/[^ ]/)>=m||!f.trim())c+=`
|
|
44
|
+
`+E.slice(m);else{if(p||d.replace(/\t/g," ").search(/[^ ]/)>=4||x.test(d)||w.test(d)||b.test(d))break;c+=`
|
|
45
|
+
`+f}!p&&!f.trim()&&(p=!0),u+=S+`
|
|
46
|
+
`,e=e.substring(S.length+1),d=E.slice(m)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(u)&&(o=!0));let g=null,y;this.options.gfm&&(g=/^\[[ xX]\] /.exec(c),g&&(y=g[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:u,task:!!g,checked:y,loose:!1,text:c,tokens:[]}),i.raw+=u}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){const u=i.items[l].tokens.filter(d=>d.type==="space"),c=u.length>0&&u.some(d=>/\n.*\n/.test(d.raw));i.loose=c}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(e){const n=this.rules.block.def.exec(e);if(n){const a=n[1].toLowerCase().replace(/\s+/g," "),r=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:a,raw:n[0],href:r,title:i}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;const a=Kp(n[1]),r=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
47
|
+
`):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(a.length===r.length){for(const o of r)/^ *-+: *$/.test(o)?s.align.push("right"):/^ *:-+: *$/.test(o)?s.align.push("center"):/^ *:-+ *$/.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<a.length;o++)s.header.push({text:a[o],tokens:this.lexer.inline(a[o]),header:!0,align:s.align[o]});for(const o of i)s.rows.push(Kp(o,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const a=n[1].charAt(n[1].length-1)===`
|
|
48
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:a,tokens:this.lexer.inline(a)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Mt(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const a=n[2].trim();if(!this.options.pedantic&&/^</.test(a)){if(!/>$/.test(a))return;const s=Ur(a.slice(0,-1),"\\");if((a.length-s.length)%2===0)return}else{const s=rL(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let r=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(a)?r=r.slice(1):r=r.slice(1,-1)),Gp(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let a;if((a=this.rules.inline.reflink.exec(e))||(a=this.rules.inline.nolink.exec(e))){const r=(a[2]||a[1]).replace(/\s+/g," "),i=n[r.toLowerCase()];if(!i){const s=a[0].charAt(0);return{type:"text",raw:s,text:s}}return Gp(a,i,a[0],this.lexer)}}emStrong(e,n,a=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&a.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!a||this.rules.inline.punctuation.exec(a)){const s=[...r[0]].length-1;let o,l,u=s,c=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+s);(r=d.exec(n))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(l=[...o].length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const f=[...r[0]][0].length,p=e.slice(0,s+r.index+f+l);if(Math.min(s,l)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const m=p.slice(2,-2);return{type:"strong",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let a=n[2].replace(/\n/g," ");const r=/[^ ]/.test(a),i=/^ /.test(a)&&/ $/.test(a);return r&&i&&(a=a.substring(1,a.length-1)),a=Mt(a,!0),{type:"codespan",raw:n[0],text:a}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let a,r;return n[2]==="@"?(a=Mt(n[1]),r="mailto:"+a):(a=Mt(n[1]),r=a),{type:"link",raw:n[0],text:a,href:r,tokens:[{type:"text",raw:a,text:a}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let a,r;if(n[2]==="@")a=Mt(n[0]),r="mailto:"+a;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);a=Mt(n[0]),n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:a,href:r,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let a;return this.lexer.state.inRawBlock?a=n[0]:a=Mt(n[0]),{type:"text",raw:n[0],text:a}}}}const sL=/^(?:[ \t]*(?:\n|$))+/,oL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ri=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$y=/(?:[*+-]|\d{1,9}[.)])/,ky=Ee(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,$y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),kd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cL=/^[^\n]+/,Sd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,dL=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fL=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$y).getRegex(),Xo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hL=Ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cd).replace("tag",Xo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sy=Ee(kd).replace("hr",Ri).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xo).getRegex(),pL=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sy).getRegex(),Md={blockquote:pL,code:oL,def:dL,fences:lL,heading:uL,hr:Ri,html:hL,lheading:ky,list:fL,newline:sL,paragraph:Sy,table:mi,text:cL},Zp=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ri).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xo).getRegex(),mL={...Md,table:Zp,paragraph:Ee(kd).replace("hr",Ri).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xo).getRegex()},gL={...Md,html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee(kd).replace("hr",Ri).replace("heading",` *#{1,6} *[^
|
|
49
|
+
]`).replace("lheading",ky).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Cy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,My=/^( {2,}|\\)\n(?!\s*$)/,yL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ni="\\p{P}\\p{S}",bL=Ee(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ni).getRegex(),xL=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,wL=Ee(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ni).getRegex(),_L=Ee("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ni).getRegex(),$L=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ni).getRegex(),kL=Ee(/\\([punct])/,"gu").replace(/punct/g,Ni).getRegex(),SL=Ee(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),CL=Ee(Cd).replace("(?:-->|$)","-->").getRegex(),ML=Ee("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",CL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),So=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,DL=Ee(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",So).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dy=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",So).replace("ref",Sd).getRegex(),Ay=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sd).getRegex(),AL=Ee("reflink|nolink(?!\\()","g").replace("reflink",Dy).replace("nolink",Ay).getRegex(),Dd={_backpedal:mi,anyPunctuation:kL,autolink:SL,blockSkip:xL,br:My,code:vL,del:mi,emStrongLDelim:wL,emStrongRDelimAst:_L,emStrongRDelimUnd:$L,escape:Cy,link:DL,nolink:Ay,punctuation:bL,reflink:Dy,reflinkSearch:AL,tag:ML,text:yL,url:mi},OL={...Dd,link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",So).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",So).getRegex()},Uu={...Dd,escape:Ee(Cy).replace("])","~|])").getRegex(),url:Ee(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},EL={...Uu,br:Ee(My).replace("{2,}","*").getRegex(),text:Ee(Uu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_s={normal:Md,gfm:mL,pedantic:gL},Yr={normal:Dd,gfm:Uu,breaks:EL,pedantic:OL};class Ft{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ra,this.options.tokenizer=this.options.tokenizer||new ko,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:_s.normal,inline:Yr.normal};this.options.pedantic?(n.block=_s.pedantic,n.inline=Yr.pedantic):this.options.gfm&&(n.block=_s.gfm,this.options.breaks?n.inline=Yr.breaks:n.inline=Yr.gfm),this.tokenizer.rules=n}static get rules(){return{block:_s,inline:Yr}}static lex(e,n){return new Ft(n).lex(e)}static lexInline(e,n){return new Ft(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
|
|
50
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],a=!1){this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));let r,i,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(r=o.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
51
|
+
`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
52
|
+
`+r.raw,i.text+=`
|
|
53
|
+
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
54
|
+
`+r.raw,i.text+=`
|
|
55
|
+
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const l=e.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=e.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],a&&i?.type==="paragraph"?(i.raw+=`
|
|
56
|
+
`+r.raw,i.text+=`
|
|
57
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),a=s.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
58
|
+
`+r.raw,i.text+=`
|
|
59
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let a,r,i,s=e,o,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(a=c.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))){if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),r=n[n.length-1],r&&a.type==="text"&&r.type==="text"?(r.raw+=a.raw,r.text+=a.text):n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length),r=n[n.length-1],r&&a.type==="text"&&r.type==="text"?(r.raw+=a.raw,r.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,u)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(i)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(u=a.raw.slice(-1)),l=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=a.raw,r.text+=a.text):n.push(a);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Si{options;parser;constructor(e){this.options=e||Ra}space(e){return""}code({text:e,lang:n,escaped:a}){const r=(n||"").match(/^\S*/)?.[0],i=e.replace(/\n$/,"")+`
|
|
60
|
+
`;return r?'<pre><code class="language-'+Mt(r)+'">'+(a?i:Mt(i,!0))+`</code></pre>
|
|
61
|
+
`:"<pre><code>"+(a?i:Mt(i,!0))+`</code></pre>
|
|
62
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
63
|
+
${this.parser.parse(e)}</blockquote>
|
|
64
|
+
`}html({text:e}){return e}heading({tokens:e,depth:n}){return`<h${n}>${this.parser.parseInline(e)}</h${n}>
|
|
65
|
+
`}hr(e){return`<hr>
|
|
66
|
+
`}list(e){const n=e.ordered,a=e.start;let r="";for(let o=0;o<e.items.length;o++){const l=e.items[o];r+=this.listitem(l)}const i=n?"ol":"ul",s=n&&a!==1?' start="'+a+'"':"";return"<"+i+s+`>
|
|
67
|
+
`+r+"</"+i+`>
|
|
68
|
+
`}listitem(e){let n="";if(e.task){const a=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" "}):n+=a+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`<li>${n}</li>
|
|
69
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
70
|
+
`}table(e){let n="",a="";for(let i=0;i<e.header.length;i++)a+=this.tablecell(e.header[i]);n+=this.tablerow({text:a});let r="";for(let i=0;i<e.rows.length;i++){const s=e.rows[i];a="";for(let o=0;o<s.length;o++)a+=this.tablecell(s[o]);r+=this.tablerow({text:a})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
71
|
+
<thead>
|
|
72
|
+
`+n+`</thead>
|
|
73
|
+
`+r+`</table>
|
|
74
|
+
`}tablerow({text:e}){return`<tr>
|
|
75
|
+
${e}</tr>
|
|
76
|
+
`}tablecell(e){const n=this.parser.parseInline(e.tokens),a=e.header?"th":"td";return(e.align?`<${a} align="${e.align}">`:`<${a}>`)+n+`</${a}>
|
|
77
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:n,tokens:a}){const r=this.parser.parseInline(a),i=Yp(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return n&&(s+=' title="'+n+'"'),s+=">"+r+"</a>",s}image({href:e,title:n,text:a}){const r=Yp(e);if(r===null)return a;e=r;let i=`<img src="${e}" alt="${a}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class Ad{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Bt{options;renderer;textRenderer;constructor(e){this.options=e||Ra,this.options.renderer=this.options.renderer||new Si,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ad}static parse(e,n){return new Bt(n).parse(e)}static parseInline(e,n){return new Bt(n).parseInline(e)}parse(e,n=!0){let a="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const o=i,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){a+=l||"";continue}}const s=i;switch(s.type){case"space":{a+=this.renderer.space(s);continue}case"hr":{a+=this.renderer.hr(s);continue}case"heading":{a+=this.renderer.heading(s);continue}case"code":{a+=this.renderer.code(s);continue}case"table":{a+=this.renderer.table(s);continue}case"blockquote":{a+=this.renderer.blockquote(s);continue}case"list":{a+=this.renderer.list(s);continue}case"html":{a+=this.renderer.html(s);continue}case"paragraph":{a+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;r+1<e.length&&e[r+1].type==="text";)o=e[++r],l+=`
|
|
78
|
+
`+this.renderer.text(o);n?a+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):a+=l;continue}default:{const o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return a}parseInline(e,n){n=n||this.renderer;let a="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){a+=o||"";continue}}const s=i;switch(s.type){case"escape":{a+=n.text(s);break}case"html":{a+=n.html(s);break}case"link":{a+=n.link(s);break}case"image":{a+=n.image(s);break}case"strong":{a+=n.strong(s);break}case"em":{a+=n.em(s);break}case"codespan":{a+=n.codespan(s);break}case"br":{a+=n.br(s);break}case"del":{a+=n.del(s);break}case"text":{a+=n.text(s);break}default:{const o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return a}}class Ks{options;block;constructor(e){this.options=e||Ra}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Ft.lex:Ft.lexInline}provideParser(){return this.block?Bt.parse:Bt.parseInline}}class TL{defaults=$d();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Bt;Renderer=Si;TextRenderer=Ad;Lexer=Ft;Tokenizer=ko;Hooks=Ks;constructor(...e){this.use(...e)}walkTokens(e,n){let a=[];for(const r of e)switch(a=a.concat(n.call(this,r)),r.type){case"table":{const i=r;for(const s of i.header)a=a.concat(this.walkTokens(s.tokens,n));for(const s of i.rows)for(const o of s)a=a.concat(this.walkTokens(o.tokens,n));break}case"list":{const i=r;a=a.concat(this.walkTokens(i.items,n));break}default:{const i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{const o=i[s].flat(1/0);a=a.concat(this.walkTokens(o,n))}):i.tokens&&(a=a.concat(this.walkTokens(i.tokens,n)))}}return a}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{const r={...a};if(r.async=this.defaults.async||r.async||!1,a.extensions&&(a.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...o){let l=i.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),r.extensions=n),a.renderer){const i=this.defaults.renderer||new Si(this.defaults);for(const s in a.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const o=s,l=a.renderer[o],u=i[o];i[o]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}r.renderer=i}if(a.tokenizer){const i=this.defaults.tokenizer||new ko(this.defaults);for(const s in a.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,l=a.tokenizer[o],u=i[o];i[o]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}r.tokenizer=i}if(a.hooks){const i=this.defaults.hooks||new Ks;for(const s in a.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const o=s,l=a.hooks[o],u=i[o];Ks.passThroughHooks.has(s)?i[o]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(f=>u.call(i,f));const d=l.call(i,c);return u.call(i,d)}:i[o]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}r.hooks=i}if(a.walkTokens){const i=this.defaults.walkTokens,s=a.walkTokens;r.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),i&&(l=l.concat(i.call(this,o))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Ft.lex(e,n??this.defaults)}parser(e,n){return Bt.parse(e,n??this.defaults)}parseMarkdown(e){return(a,r)=>{const i={...r},s={...this.defaults,...i},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof a>"u"||a===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof a!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(a)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const l=s.hooks?s.hooks.provideLexer():e?Ft.lex:Ft.lexInline,u=s.hooks?s.hooks.provideParser():e?Bt.parse:Bt.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(a):a).then(c=>l(c,s)).then(c=>s.hooks?s.hooks.processAllTokens(c):c).then(c=>s.walkTokens?Promise.all(this.walkTokens(c,s.walkTokens)).then(()=>c):c).then(c=>u(c,s)).then(c=>s.hooks?s.hooks.postprocess(c):c).catch(o);try{s.hooks&&(a=s.hooks.preprocess(a));let c=l(a,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let d=u(c,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(c){return o(c)}}}onError(e,n){return a=>{if(a.message+=`
|
|
79
|
+
Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+Mt(a.message+"",!0)+"</pre>";return n?Promise.resolve(r):r}if(n)return Promise.reject(a);throw a}}}const qa=new TL;function Ce(t,e){return qa.parse(t,e)}Ce.options=Ce.setOptions=function(t){return qa.setOptions(t),Ce.defaults=qa.defaults,xy(Ce.defaults),Ce};Ce.getDefaults=$d;Ce.defaults=Ra;Ce.use=function(...t){return qa.use(...t),Ce.defaults=qa.defaults,xy(Ce.defaults),Ce};Ce.walkTokens=function(t,e){return qa.walkTokens(t,e)};Ce.parseInline=qa.parseInline;Ce.Parser=Bt;Ce.parser=Bt.parse;Ce.Renderer=Si;Ce.TextRenderer=Ad;Ce.Lexer=Ft;Ce.lexer=Ft.lex;Ce.Tokenizer=ko;Ce.Hooks=Ks;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;Bt.parse;Ft.lex;const{entries:Oy,setPrototypeOf:Jp,isFrozen:PL,getPrototypeOf:IL,getOwnPropertyDescriptor:LL}=Object;let{freeze:pt,seal:jt,create:Qa}=Object,{apply:Yu,construct:Ku}=typeof Reflect<"u"&&Reflect;pt||(pt=function(e){return e});jt||(jt=function(e){return e});Yu||(Yu=function(e,n){for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i<a;i++)r[i-2]=arguments[i];return e.apply(n,r)});Ku||(Ku=function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return new e(...a)});const Kr=Ze(Array.prototype.forEach),qL=Ze(Array.prototype.lastIndexOf),Xp=Ze(Array.prototype.pop),Gr=Ze(Array.prototype.push),VL=Ze(Array.prototype.splice),ht=Array.isArray,ni=Ze(String.prototype.toLowerCase),Zl=Ze(String.prototype.toString),Qp=Ze(String.prototype.match),Ka=Ze(String.prototype.replace),em=Ze(String.prototype.indexOf),FL=Ze(String.prototype.trim),BL=Ze(Number.prototype.toString),RL=Ze(Boolean.prototype.toString),tm=typeof BigInt>"u"?null:Ze(BigInt.prototype.toString),nm=typeof Symbol>"u"?null:Ze(Symbol.prototype.toString),je=Ze(Object.prototype.hasOwnProperty),Zr=Ze(Object.prototype.toString),st=Ze(RegExp.prototype.test),$s=NL(TypeError);function Ze(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Yu(t,e,a)}}function NL(t){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return Ku(t,n)}}function me(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ni;if(Jp&&Jp(t,null),!ht(e))return t;let a=e.length;for(;a--;){let r=e[a];if(typeof r=="string"){const i=n(r);i!==r&&(PL(e)||(e[a]=i),r=i)}t[r]=!0}return t}function jL(t){for(let e=0;e<t.length;e++)je(t,e)||(t[e]=null);return t}function yt(t){const e=Qa(null);for(const[n,a]of Oy(t))je(t,n)&&(ht(a)?e[n]=jL(a):a&&typeof a=="object"&&a.constructor===Object?e[n]=yt(a):e[n]=a);return e}function zL(t){switch(typeof t){case"string":return t;case"number":return BL(t);case"boolean":return RL(t);case"bigint":return tm?tm(t):"0";case"symbol":return nm?nm(t):"Symbol()";case"undefined":return Zr(t);case"function":case"object":{if(t===null)return Zr(t);const e=t,n=er(e,"toString");if(typeof n=="function"){const a=n(e);return typeof a=="string"?a:Zr(a)}return Zr(t)}default:return Zr(t)}}function er(t,e){for(;t!==null;){const a=LL(t,e);if(a){if(a.get)return Ze(a.get);if(typeof a.value=="function")return Ze(a.value)}t=IL(t)}function n(){return null}return n}function WL(t){try{return st(t,""),!0}catch{return!1}}const am=pt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Jl=pt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xl=pt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HL=pt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ql=pt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),UL=pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rm=pt(["#text"]),im=pt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eu=pt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sm=pt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ks=pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),YL=jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KL=jt(/<%[\w\W]*|[\w\W]*%>/gm),GL=jt(/\$\{[\w\W]*/gm),ZL=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),JL=jt(/^aria-[\-\w]+$/),Ey=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),XL=jt(/^(?:\w+script|data):/i),QL=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ty=jt(/^html$/i),eq=jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var om=Object.freeze({__proto__:null,ARIA_ATTR:JL,ATTR_WHITESPACE:QL,CUSTOM_ELEMENT:eq,DATA_ATTR:ZL,DOCTYPE_NAME:Ty,ERB_EXPR:KL,IS_ALLOWED_URI:Ey,IS_SCRIPT_OR_DATA:XL,MUSTACHE_EXPR:YL,TMPLIT_EXPR:GL});const Jr={element:1,text:3,progressingInstruction:7,comment:8,document:9},tq=function(){return typeof window>"u"?null:window},nq=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));const i="dompurify"+(a?"#"+a:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},lm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Py(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tq();const e=ue=>Py(ue);if(e.version="3.4.1",e.removed=[],!t||!t.document||t.document.nodeType!==Jr.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const a=n,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=t,m=l.prototype,g=er(m,"cloneNode"),y=er(m,"remove"),v=er(m,"nextSibling"),b=er(m,"childNodes"),x=er(m,"parentNode");if(typeof s=="function"){const ue=n.createElement("template");ue.content&&ue.content.ownerDocument&&(n=ue.content.ownerDocument)}let w,$="";const{implementation:S,createNodeIterator:E,createDocumentFragment:A,getElementsByTagName:B}=n,{importNode:z}=a;let W=lm();e.isSupported=typeof Oy=="function"&&typeof x=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:U,ERB_EXPR:X,TMPLIT_EXPR:N,DATA_ATTR:q,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:ne}=om;let{IS_ALLOWED_URI:K}=om,ee=null;const fe=me({},[...am,...Jl,...Xl,...Ql,...rm]);let le=null;const pe=me({},[...im,...eu,...sm,...ks]);let he=Object.seal(Qa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,Me=null;const Te=Object.seal(Qa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,$e=!0,Fe=!1,Ue=!0,G=!1,ae=!0,te=!1,ie=!1,De=!1,it=!1,Ct=!1,vn=!1,Id=!0,Ld=!1;const qd="user-content-";let el=!0,Tr=!1,Na={},nn=null;const tl=me({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Vd=null;const Fd=me({},["audio","video","img","source","image","track"]);let nl=null;const Bd=me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),zi="http://www.w3.org/1998/Math/MathML",Wi="http://www.w3.org/2000/svg",an="http://www.w3.org/1999/xhtml";let ja=an,al=!1,rl=null;const Qy=me({},[zi,Wi,an],Zl);let il=me({},["mi","mo","mn","ms","mtext"]),sl=me({},["annotation-xml"]);const eb=me({},["title","style","font","a","script"]);let Pr=null;const tb=["application/xhtml+xml","text/html"],nb="text/html";let Je=null,za=null;const ab=n.createElement("form"),Rd=function(M){return M instanceof RegExp||M instanceof Function},ol=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(za&&za===M)return;(!M||typeof M!="object")&&(M={}),M=yt(M),Pr=tb.indexOf(M.PARSER_MEDIA_TYPE)===-1?nb:M.PARSER_MEDIA_TYPE,Je=Pr==="application/xhtml+xml"?Zl:ni,ee=je(M,"ALLOWED_TAGS")&&ht(M.ALLOWED_TAGS)?me({},M.ALLOWED_TAGS,Je):fe,le=je(M,"ALLOWED_ATTR")&&ht(M.ALLOWED_ATTR)?me({},M.ALLOWED_ATTR,Je):pe,rl=je(M,"ALLOWED_NAMESPACES")&&ht(M.ALLOWED_NAMESPACES)?me({},M.ALLOWED_NAMESPACES,Zl):Qy,nl=je(M,"ADD_URI_SAFE_ATTR")&&ht(M.ADD_URI_SAFE_ATTR)?me(yt(Bd),M.ADD_URI_SAFE_ATTR,Je):Bd,Vd=je(M,"ADD_DATA_URI_TAGS")&&ht(M.ADD_DATA_URI_TAGS)?me(yt(Fd),M.ADD_DATA_URI_TAGS,Je):Fd,nn=je(M,"FORBID_CONTENTS")&&ht(M.FORBID_CONTENTS)?me({},M.FORBID_CONTENTS,Je):tl,be=je(M,"FORBID_TAGS")&&ht(M.FORBID_TAGS)?me({},M.FORBID_TAGS,Je):yt({}),Me=je(M,"FORBID_ATTR")&&ht(M.FORBID_ATTR)?me({},M.FORBID_ATTR,Je):yt({}),Na=je(M,"USE_PROFILES")?M.USE_PROFILES&&typeof M.USE_PROFILES=="object"?yt(M.USE_PROFILES):M.USE_PROFILES:!1,Le=M.ALLOW_ARIA_ATTR!==!1,$e=M.ALLOW_DATA_ATTR!==!1,Fe=M.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=M.SAFE_FOR_TEMPLATES||!1,ae=M.SAFE_FOR_XML!==!1,te=M.WHOLE_DOCUMENT||!1,it=M.RETURN_DOM||!1,Ct=M.RETURN_DOM_FRAGMENT||!1,vn=M.RETURN_TRUSTED_TYPE||!1,De=M.FORCE_BODY||!1,Id=M.SANITIZE_DOM!==!1,Ld=M.SANITIZE_NAMED_PROPS||!1,el=M.KEEP_CONTENT!==!1,Tr=M.IN_PLACE||!1,K=WL(M.ALLOWED_URI_REGEXP)?M.ALLOWED_URI_REGEXP:Ey,ja=typeof M.NAMESPACE=="string"?M.NAMESPACE:an,il=je(M,"MATHML_TEXT_INTEGRATION_POINTS")&&M.MATHML_TEXT_INTEGRATION_POINTS&&typeof M.MATHML_TEXT_INTEGRATION_POINTS=="object"?yt(M.MATHML_TEXT_INTEGRATION_POINTS):me({},["mi","mo","mn","ms","mtext"]),sl=je(M,"HTML_INTEGRATION_POINTS")&&M.HTML_INTEGRATION_POINTS&&typeof M.HTML_INTEGRATION_POINTS=="object"?yt(M.HTML_INTEGRATION_POINTS):me({},["annotation-xml"]);const Z=je(M,"CUSTOM_ELEMENT_HANDLING")&&M.CUSTOM_ELEMENT_HANDLING&&typeof M.CUSTOM_ELEMENT_HANDLING=="object"?yt(M.CUSTOM_ELEMENT_HANDLING):Qa(null);if(he=Qa(null),je(Z,"tagNameCheck")&&Rd(Z.tagNameCheck)&&(he.tagNameCheck=Z.tagNameCheck),je(Z,"attributeNameCheck")&&Rd(Z.attributeNameCheck)&&(he.attributeNameCheck=Z.attributeNameCheck),je(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(he.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),G&&($e=!1),Ct&&(it=!0),Na&&(ee=me({},rm),le=Qa(null),Na.html===!0&&(me(ee,am),me(le,im)),Na.svg===!0&&(me(ee,Jl),me(le,eu),me(le,ks)),Na.svgFilters===!0&&(me(ee,Xl),me(le,eu),me(le,ks)),Na.mathMl===!0&&(me(ee,Ql),me(le,sm),me(le,ks))),Te.tagCheck=null,Te.attributeCheck=null,je(M,"ADD_TAGS")&&(typeof M.ADD_TAGS=="function"?Te.tagCheck=M.ADD_TAGS:ht(M.ADD_TAGS)&&(ee===fe&&(ee=yt(ee)),me(ee,M.ADD_TAGS,Je))),je(M,"ADD_ATTR")&&(typeof M.ADD_ATTR=="function"?Te.attributeCheck=M.ADD_ATTR:ht(M.ADD_ATTR)&&(le===pe&&(le=yt(le)),me(le,M.ADD_ATTR,Je))),je(M,"ADD_URI_SAFE_ATTR")&&ht(M.ADD_URI_SAFE_ATTR)&&me(nl,M.ADD_URI_SAFE_ATTR,Je),je(M,"FORBID_CONTENTS")&&ht(M.FORBID_CONTENTS)&&(nn===tl&&(nn=yt(nn)),me(nn,M.FORBID_CONTENTS,Je)),je(M,"ADD_FORBID_CONTENTS")&&ht(M.ADD_FORBID_CONTENTS)&&(nn===tl&&(nn=yt(nn)),me(nn,M.ADD_FORBID_CONTENTS,Je)),el&&(ee["#text"]=!0),te&&me(ee,["html","head","body"]),ee.table&&(me(ee,["tbody"]),delete be.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw $s('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $s('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=M.TRUSTED_TYPES_POLICY,$=w.createHTML("")}else w===void 0&&(w=nq(p,r)),w!==null&&typeof $=="string"&&($=w.createHTML(""));pt&&pt(M),za=M},Nd=me({},[...Jl,...Xl,...HL]),jd=me({},[...Ql,...UL]),rb=function(M){let Z=x(M);(!Z||!Z.tagName)&&(Z={namespaceURI:ja,tagName:"template"});const se=ni(M.tagName),Be=ni(Z.tagName);return rl[M.namespaceURI]?M.namespaceURI===Wi?Z.namespaceURI===an?se==="svg":Z.namespaceURI===zi?se==="svg"&&(Be==="annotation-xml"||il[Be]):!!Nd[se]:M.namespaceURI===zi?Z.namespaceURI===an?se==="math":Z.namespaceURI===Wi?se==="math"&&sl[Be]:!!jd[se]:M.namespaceURI===an?Z.namespaceURI===Wi&&!sl[Be]||Z.namespaceURI===zi&&!il[Be]?!1:!jd[se]&&(eb[se]||!Nd[se]):!!(Pr==="application/xhtml+xml"&&rl[M.namespaceURI]):!1},Ut=function(M){Gr(e.removed,{element:M});try{x(M).removeChild(M)}catch{y(M)}},ha=function(M,Z){try{Gr(e.removed,{attribute:Z.getAttributeNode(M),from:Z})}catch{Gr(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(M),M==="is")if(it||Ct)try{Ut(Z)}catch{}else try{Z.setAttribute(M,"")}catch{}},zd=function(M){let Z=null,se=null;if(De)M="<remove></remove>"+M;else{const Ye=Qp(M,/^[\r\n\t ]+/);se=Ye&&Ye[0]}Pr==="application/xhtml+xml"&&ja===an&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const Be=w?w.createHTML(M):M;if(ja===an)try{Z=new f().parseFromString(Be,Pr)}catch{}if(!Z||!Z.documentElement){Z=S.createDocument(ja,"template",null);try{Z.documentElement.innerHTML=al?$:Be}catch{}}const dt=Z.body||Z.documentElement;return M&&se&&dt.insertBefore(n.createTextNode(se),dt.childNodes[0]||null),ja===an?B.call(Z,te?"html":"body")[0]:te?Z.documentElement:dt},Wd=function(M){return E.call(M.ownerDocument||M,M,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ll=function(M){return M instanceof d&&(typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||!(M.attributes instanceof c)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function")},ul=function(M){return typeof o=="function"&&M instanceof o};function yn(ue,M,Z){Kr(ue,se=>{se.call(e,M,Z,za)})}const Hd=function(M){let Z=null;if(yn(W.beforeSanitizeElements,M,null),ll(M))return Ut(M),!0;const se=Je(M.nodeName);if(yn(W.uponSanitizeElement,M,{tagName:se,allowedTags:ee}),ae&&M.hasChildNodes()&&!ul(M.firstElementChild)&&st(/<[/\w!]/g,M.innerHTML)&&st(/<[/\w!]/g,M.textContent)||ae&&M.namespaceURI===an&&se==="style"&&ul(M.firstElementChild)||M.nodeType===Jr.progressingInstruction||ae&&M.nodeType===Jr.comment&&st(/<[/\w]/g,M.data))return Ut(M),!0;if(be[se]||!(Te.tagCheck instanceof Function&&Te.tagCheck(se))&&!ee[se]){if(!be[se]&&Yd(se)&&(he.tagNameCheck instanceof RegExp&&st(he.tagNameCheck,se)||he.tagNameCheck instanceof Function&&he.tagNameCheck(se)))return!1;if(el&&!nn[se]){const Be=x(M)||M.parentNode,dt=b(M)||M.childNodes;if(dt&&Be){const Ye=dt.length;for(let gt=Ye-1;gt>=0;--gt){const It=g(dt[gt],!0);Be.insertBefore(It,v(M))}}}return Ut(M),!0}return M instanceof l&&!rb(M)||(se==="noscript"||se==="noembed"||se==="noframes")&&st(/<\/no(script|embed|frames)/i,M.innerHTML)?(Ut(M),!0):(G&&M.nodeType===Jr.text&&(Z=M.textContent,Kr([U,X,N],Be=>{Z=Ka(Z,Be," ")}),M.textContent!==Z&&(Gr(e.removed,{element:M.cloneNode()}),M.textContent=Z)),yn(W.afterSanitizeElements,M,null),!1)},Ud=function(M,Z,se){if(Me[Z]||Id&&(Z==="id"||Z==="name")&&(se in n||se in ab))return!1;if(!($e&&!Me[Z]&&st(q,Z))){if(!(Le&&st(j,Z))){if(!(Te.attributeCheck instanceof Function&&Te.attributeCheck(Z,M))){if(!le[Z]||Me[Z]){if(!(Yd(M)&&(he.tagNameCheck instanceof RegExp&&st(he.tagNameCheck,M)||he.tagNameCheck instanceof Function&&he.tagNameCheck(M))&&(he.attributeNameCheck instanceof RegExp&&st(he.attributeNameCheck,Z)||he.attributeNameCheck instanceof Function&&he.attributeNameCheck(Z,M))||Z==="is"&&he.allowCustomizedBuiltInElements&&(he.tagNameCheck instanceof RegExp&&st(he.tagNameCheck,se)||he.tagNameCheck instanceof Function&&he.tagNameCheck(se))))return!1}else if(!nl[Z]){if(!st(K,Ka(se,Y,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&M!=="script"&&em(se,"data:")===0&&Vd[M])){if(!(Fe&&!st(J,Ka(se,Y,"")))){if(se)return!1}}}}}}}return!0},ib=me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Yd=function(M){return!ib[ni(M)]&&st(ne,M)},Kd=function(M){yn(W.beforeSanitizeAttributes,M,null);const{attributes:Z}=M;if(!Z||ll(M))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let Be=Z.length;for(;Be--;){const dt=Z[Be],{name:Ye,namespaceURI:gt,value:It}=dt,Yt=Je(Ye),cl=It;let nt=Ye==="value"?cl:FL(cl);if(se.attrName=Yt,se.attrValue=nt,se.keepAttr=!0,se.forceKeepAttr=void 0,yn(W.uponSanitizeAttribute,M,se),nt=se.attrValue,Ld&&(Yt==="id"||Yt==="name")&&em(nt,qd)!==0&&(ha(Ye,M),nt=qd+nt),ae&&st(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,nt)){ha(Ye,M);continue}if(Yt==="attributename"&&Qp(nt,"href")){ha(Ye,M);continue}if(se.forceKeepAttr)continue;if(!se.keepAttr){ha(Ye,M);continue}if(!Ue&&st(/\/>/i,nt)){ha(Ye,M);continue}G&&Kr([U,X,N],Jd=>{nt=Ka(nt,Jd," ")});const Zd=Je(M.nodeName);if(!Ud(Zd,Yt,nt)){ha(Ye,M);continue}if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!gt)switch(p.getAttributeType(Zd,Yt)){case"TrustedHTML":{nt=w.createHTML(nt);break}case"TrustedScriptURL":{nt=w.createScriptURL(nt);break}}if(nt!==cl)try{gt?M.setAttributeNS(gt,Ye,nt):M.setAttribute(Ye,nt),ll(M)?Ut(M):Xp(e.removed)}catch{ha(Ye,M)}}yn(W.afterSanitizeAttributes,M,null)},Gd=function(M){let Z=null;const se=Wd(M);for(yn(W.beforeSanitizeShadowDOM,M,null);Z=se.nextNode();)yn(W.uponSanitizeShadowNode,Z,null),Hd(Z),Kd(Z),Z.content instanceof i&&Gd(Z.content);yn(W.afterSanitizeShadowDOM,M,null)};return e.sanitize=function(ue){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,se=null,Be=null,dt=null;if(al=!ue,al&&(ue="<!-->"),typeof ue!="string"&&!ul(ue)&&(ue=zL(ue),typeof ue!="string"))throw $s("dirty is not a string, aborting");if(!e.isSupported)return ue;if(ie||ol(M),e.removed=[],typeof ue=="string"&&(Tr=!1),Tr){const It=ue.nodeName;if(typeof It=="string"){const Yt=Je(It);if(!ee[Yt]||be[Yt])throw $s("root node is forbidden and cannot be sanitized in-place")}}else if(ue instanceof o)Z=zd("<!---->"),se=Z.ownerDocument.importNode(ue,!0),se.nodeType===Jr.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?Z=se:Z.appendChild(se);else{if(!it&&!G&&!te&&ue.indexOf("<")===-1)return w&&vn?w.createHTML(ue):ue;if(Z=zd(ue),!Z)return it?null:vn?$:""}Z&&De&&Ut(Z.firstChild);const Ye=Wd(Tr?ue:Z);for(;Be=Ye.nextNode();)Hd(Be),Kd(Be),Be.content instanceof i&&Gd(Be.content);if(Tr)return ue;if(it){if(G){Z.normalize();let It=Z.innerHTML;Kr([U,X,N],Yt=>{It=Ka(It,Yt," ")}),Z.innerHTML=It}if(Ct)for(dt=A.call(Z.ownerDocument);Z.firstChild;)dt.appendChild(Z.firstChild);else dt=Z;return(le.shadowroot||le.shadowrootmode)&&(dt=z.call(a,dt,!0)),dt}let gt=te?Z.outerHTML:Z.innerHTML;return te&&ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&st(Ty,Z.ownerDocument.doctype.name)&&(gt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
80
|
+
`+gt),G&&Kr([U,X,N],It=>{gt=Ka(gt,It," ")}),w&&vn?w.createHTML(gt):gt},e.setConfig=function(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ol(ue),ie=!0},e.clearConfig=function(){za=null,ie=!1},e.isValidAttribute=function(ue,M,Z){za||ol({});const se=Je(ue),Be=Je(M);return Ud(se,Be,Z)},e.addHook=function(ue,M){typeof M=="function"&&Gr(W[ue],M)},e.removeHook=function(ue,M){if(M!==void 0){const Z=qL(W[ue],M);return Z===-1?void 0:VL(W[ue],Z,1)[0]}return Xp(W[ue])},e.removeHooks=function(ue){W[ue]=[]},e.removeAllHooks=function(){W=lm()},e}var aq=Py();const rq={class:"flex items-start gap-2"},iq=["innerHTML"],sq=["href"],oq=P({name:"InfoBannerWidget",__name:"InfoBanner",props:{property:{}},setup(t){const e=k(()=>t.property?.ui);function n(c){return c.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}const a=["http:","https:","mailto:"];function r(c){if(!c)return null;if(c.startsWith("/")||c.startsWith("./")||c.startsWith("../")||c.startsWith("#"))return c;try{const d=new URL(c,"http://localhost");return a.includes(d.protocol)?c:null}catch{return null}}class i extends Si{link({tokens:d,href:f,title:p}){const m=this.parser.parseInline(d),g=r(f);if(!g)return m;const y=typeof location<"u"&&g.startsWith(`${location.protocol}//${location.hostname}`),v=n(g),b=p?` title="${n(p)}"`:"";return`<a href="${v}"${b}${y?"":' target="_blank" rel="noreferrer noopener nofollow"'}>${m}</a>`}}const s=new i,o=k(()=>aq.sanitize(Ce(e.value?.content??"",{renderer:s}))),l=k(()=>e.value?.type??"info"),u=k(()=>{switch(l.value){case"warning":return O4;case"error":return S4;case"prerequisites":return M4;default:return Nu}});return(c,d)=>(_(),O("div",{class:L(["px-4 py-3 rounded-lg info-banner-shell",{"info-banner--info":h(l)==="info","info-banner--warning":h(l)==="warning","info-banner--error":h(l)==="error","info-banner--prerequisites":h(l)==="prerequisites","info-banner--side-note bg-new-gray-100":h(l)==="side-note"}])},[T("div",rq,[h(e)?.hideIcon?H("",!0):(_(),D(Ne(h(u)),{key:0,class:"mt-0.5 h-4 w-4 shrink-0"})),T("div",{class:"info-banner__content flex-1 text-sm text-new-gray-800",innerHTML:h(o)},null,8,iq),h(e)?.link?(_(),O("a",{key:1,href:h(e).link.url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-sm font-medium text-new-blue-600 hover:underline whitespace-nowrap"},[xe(Q(h(e).link.label)+" ",1),h(e).link.icon==="External"?(_(),D(h(C4),{key:0,class:"h-3 w-3"})):H("",!0)],8,sq)):H("",!0)])],2))}}),lq=Object.assign(Oo(oq,[["__scopeId","data-v-13721035"]]),{__name:"InfoBanner"}),uq={class:"flex flex-wrap gap-1 flex-1 min-w-0"},cq={class:"truncate"},dq={key:0,class:"text-xs text-gray-500 self-center"},fq={key:1,class:"text-sm text-gray-500 truncate self-center"},hq={class:"flex items-center gap-1 shrink-0"},pq={class:"flex items-center gap-2 px-3 py-2"},mq=["placeholder"],gq={key:0,class:"flex flex-wrap items-center gap-2 border-t border-b border-solid border-new-gray-200 px-3 py-2"},vq=["onClick"],yq={key:1,class:"border-b border-solid border-new-gray-200 px-3 py-2 text-sm"},bq={class:"inline-flex items-center gap-2 cursor-pointer select-none"},xq=["checked","disabled"],wq={class:"max-h-64 overflow-y-auto p-1"},_q={class:"flex items-center gap-1 px-2 py-1 rounded hover:bg-new-gray-50"},$q=["onClick"],kq={key:1,class:"inline-block w-4"},Sq=["checked",".indeterminate","onChange"],Cq=["checked","onChange"],Mq={class:"text-sm text-new-gray-800"},Dq={key:0,class:"ml-6"},Aq=["checked","onChange"],Oq={class:"text-sm text-new-gray-700"},Eq={key:1,class:"px-3 py-4 text-center text-sm text-new-gray-500"},Tq={class:"flex flex-col gap-2"},Pq={class:"text-xs font-medium text-new-gray-600"},Iq=P({name:"ApiTreeSelectWidget",__name:"ApiTreeSelect",props:{field:{},property:{}},async setup(t){let e,n;const a=tt(mt),{data:r}=([e,n]=Va(()=>Ia(`${t.property.id}_metadata`,()=>{const G=a.getFieldValue("credential_guid_body");return $fetch("/workflows/v1/metadata",{method:"POST",body:{...G&&G,...t.property.ui?.connectorConfigName&&{connectorConfigName:t.property.ui.connectorConfigName},...t.property.ui?.metadataTemplateKey&&{type:t.property.ui.metadataTemplateKey},...t.property.ui?.metadataTransformerTemplateKey&&{transformerType:t.property.ui.metadataTransformerTemplateKey}}})})),e=await e,n(),e);function i(G){return{label:G.title??G.value,value:G.value,children:G.children?.length?G.children.map(i):void 0}}const s=k(()=>{const G=r.value?.data?.results;return Array.isArray(G)?G.map(i):[]});function o(G,ae=""){if(typeof G!="object"||G===null)return[];const te=Object.keys(G);if(!te.length)return ae?[ae]:[];const ie=[];return te.forEach(De=>{o(G[De],De).forEach(Ct=>ie.push(ae?`${ae}:${Ct}`:Ct))}),ie}function l(G){if(!G)return{};const ae=G.split(":");return ae.length===1?{[G]:{}}:{[ae[0]]:l(ae.slice(1).join(":"))}}function u(){const G=t.field?.state?.value;if(!G)return[];if(typeof G=="string")try{return o(JSON.parse(G))}catch{return[]}return o(G)}const c=V(u()),d=V(""),f=V(!1),p=V(!1),m=V({contains:"",startsWith:"",endsWith:"",regex:""}),g=V(new Set),y=V(null),v=V(null),b=V(null),x=V(null),w=V(null),$=V({}),S=V({});function E(){if(!v.value)return;const G=v.value.getBoundingClientRect(),ae=Math.max(G.width,360);$.value={position:"fixed",top:`${G.bottom+4}px`,left:`${G.left}px`,width:`${ae}px`,zIndex:"1000"}}function A(){if(!x.value)return;const G=x.value.getBoundingClientRect(),ae=288,te=window.innerWidth;let ie=G.right-ae;ie<8&&(ie=Math.min(G.left,te-ae-8)),S.value={position:"fixed",top:`${G.bottom+6}px`,left:`${ie}px`,width:`${ae}px`,zIndex:"1001"}}function B(){p.value=!p.value}function z(G){const ae=G.target;ae&&(y.value?.contains(ae)||b.value?.contains(ae)||w.value?.contains(ae))||(f.value=!1,p.value=!1)}function W(){f.value&&E(),p.value&&A()}de(p,async G=>{G&&(await qe(),A())}),de(f,async G=>{G?(await qe(),E(),document.addEventListener("mousedown",z),window.addEventListener("scroll",W,!0),window.addEventListener("resize",W)):(document.removeEventListener("mousedown",z),window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W))}),pc(()=>{document.removeEventListener("mousedown",z),window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W)});const U=k(()=>Object.values(m.value).filter(G=>G!=="").length);function X(G,ae){return G.map(te=>{const ie=te.children?X(te.children,ae):[];return ae(te)||ie.length?{...te,children:ie}:null}).filter(te=>te!==null)}const N=k(()=>{const{contains:G,startsWith:ae,endsWith:te,regex:ie}=m.value;if(!(G||ae||te||ie))return s.value;const it=Ct=>{const vn=(Ct.label||"").toLowerCase();if(G&&!vn.includes(G.toLowerCase())||ae&&!vn.startsWith(ae.toLowerCase())||te&&!vn.endsWith(te.toLowerCase()))return!1;if(ie)try{if(!new RegExp(ie,"i").test(vn))return!1}catch{return!1}return!0};return X(s.value,it)}),q=k(()=>{if(!d.value)return N.value;const G=ae=>(ae.label||"").toLowerCase().includes(d.value.toLowerCase());return X(N.value,G)});function j(G,ae){const te=ae?`${ae}:${G.value}`:G.value;return G.children?.length?G.children.flatMap(ie=>j(ie,te)):[te]}const J=k(()=>q.value.flatMap(G=>j(G))),Y=k(()=>!!J.value.length&&J.value.every(G=>c.value.includes(G)));function ne(G){c.value=G;const ae=G.length?At({},...G.map(te=>l(te))):{};t.field.handleChange(JSON.stringify(ae))}function K(G,ae){ae?c.value.includes(G)||ne([...c.value,G]):ne(c.value.filter(te=>te!==G))}function ee(G,ae){const te=j(G),ie=new Set(c.value);ae?te.forEach(De=>ie.add(De)):te.forEach(De=>ie.delete(De)),ne(Array.from(ie))}function fe(G){const ae=j(G),te=ae.filter(ie=>c.value.includes(ie));return te.length?te.length===ae.length?"all":"some":"none"}function le(G){const ae=new Set(J.value);ne(G?Array.from(new Set([...c.value,...ae])):c.value.filter(te=>!ae.has(te)))}function pe(G){g.value.has(G)?g.value.delete(G):g.value.add(G),g.value=new Set(g.value)}function he(G){return d.value||U.value>0?!0:g.value.has(G)}function be(){m.value={contains:"",startsWith:"",endsWith:"",regex:""}}function Me(G){m.value[G]=""}const Te={contains:"Contains",startsWith:"Starts with",endsWith:"Ends with",regex:"Regex"},Le=k(()=>Object.keys(m.value).filter(G=>m.value[G]).map(G=>({key:G,label:Te[G],value:m.value[G]}))),$e=k(()=>c.value.slice(0,3).map(G=>{const ae=G.split(":");return{path:G,label:ae[ae.length-1]}}));function Fe(G){const ae=$e.value[G]?.path;ae&&ne(c.value.filter(te=>te!==ae))}function Ue(){ne([])}return(G,ae)=>(_(),O("div",{ref_key:"rootRef",ref:y,class:"relative"},[T("button",{ref_key:"triggerRef",ref:v,type:"button",class:L(["api-tree-trigger flex w-full items-center justify-between gap-2 rounded-md bg-white px-3 py-2 text-left text-sm transition-colors focus:outline-none",{"api-tree-trigger--open":h(f)}]),onClick:ae[0]||(ae[0]=te=>f.value=!h(f))},[T("div",uq,[h(c).length?(_(),O(ge,{key:0},[(_(!0),O(ge,null,ke(h($e),(te,ie)=>(_(),O("span",{key:te.path,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-blue-50 text-blue-700 border border-solid border-blue-200 truncate max-w-[10rem]"},[T("span",cq,Q(te.label),1),R(h(pi),{class:"h-3 w-3 shrink-0 cursor-pointer hover:opacity-70",onClick:ye(De=>Fe(ie),["stop"])},null,8,["onClick"])]))),128)),h(c).length>3?(_(),O("span",dq," +"+Q(h(c).length-3)+" more ",1)):H("",!0)],64)):(_(),O("span",fq,Q(t.property.ui?.placeholder??"Select workspaces"),1))]),T("div",hq,[h(c).length?(_(),D(h(pi),{key:0,class:"h-3.5 w-3.5 text-new-gray-500 hover:text-new-gray-700",onClick:ye(Ue,["stop"])})):H("",!0),R(h(k4),{class:L(["h-4 w-4 text-new-gray-500 transition-transform",{"rotate-180":h(f)}])},null,8,["class"])])],2),(_(),D(dr,{to:"body"},[h(f)?(_(),O("div",{key:0,ref_key:"popoverRef",ref:b,style:Rt(h($)),class:"api-tree-popover rounded-md bg-white",role:"listbox"},[T("div",pq,[R(h(D4),{class:"h-4 w-4 text-new-gray-500 shrink-0"}),bc(T("input",{"onUpdate:modelValue":ae[1]||(ae[1]=te=>Tn(d)?d.value=te:null),type:"text",placeholder:`Search from ${h(s).length} items`,class:"flex-1 min-w-0 text-sm text-new-gray-700 placeholder:text-new-gray-500 bg-transparent border-0 outline-none"},null,8,mq),[[Fm,h(d)]]),T("button",{ref_key:"advancedTriggerRef",ref:x,type:"button",class:"shrink-0 text-sm font-bold text-blue-600 bg-transparent border-0 p-0 cursor-pointer hover:text-blue-700",onClick:ye(B,["stop"])}," Advanced Search ",512)]),h(Le).length?(_(),O("div",gq,[(_(!0),O(ge,null,ke(h(Le),te=>(_(),O("span",{key:te.key,class:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full bg-blue-50 border border-solid border-blue-200 text-blue-700"},[xe(Q(te.label)+": "+Q(te.value)+" ",1),T("button",{type:"button",class:"bg-transparent border-0 p-0 cursor-pointer hover:opacity-70",onClick:ie=>Me(te.key)},[R(h(pi),{class:"h-3 w-3"})],8,vq)]))),128)),T("span",{class:"ml-auto text-xs font-bold text-red-500 cursor-pointer hover:underline",onClick:be}," Clear Filter ("+Q(h(U))+") ",1)])):H("",!0),h(d)||h(U)?(_(),O("div",yq,[T("label",bq,[T("input",{type:"checkbox",checked:h(Y),disabled:!h(J).length,onChange:ae[2]||(ae[2]=te=>le(te.target.checked))},null,40,xq),ae[3]||(ae[3]=T("span",{class:"font-normal text-new-gray-700"}," Select all ",-1))])])):H("",!0),T("div",wq,[h(q).length?(_(!0),O(ge,{key:0},ke(h(q),te=>(_(),O("div",{key:te.value},[T("div",_q,[te.children?.length?(_(),O("button",{key:0,type:"button",class:"p-0.5 text-new-gray-500",onClick:ie=>pe(te.value)},[R(h(ny),{class:L(["h-3 w-3 transition-transform",{"rotate-90":he(te.value)}])},null,8,["class"])],8,$q)):(_(),O("span",kq)),te.children?.length?(_(),O("input",{key:2,type:"checkbox",checked:fe(te)==="all",".indeterminate":fe(te)==="some",onChange:ie=>ee(te,ie.target.checked)},null,40,Sq)):(_(),O("input",{key:3,type:"checkbox",checked:h(c).includes(te.value),onChange:ie=>K(te.value,ie.target.checked)},null,40,Cq)),T("span",Mq,Q(te.label),1)]),te.children?.length&&he(te.value)?(_(),O("div",Dq,[(_(!0),O(ge,null,ke(te.children,ie=>(_(),O("div",{key:ie.value,class:"flex items-center gap-2 px-2 py-1 rounded hover:bg-new-gray-50"},[T("input",{type:"checkbox",checked:h(c).includes(`${te.value}:${ie.value}`),onChange:De=>K(`${te.value}:${ie.value}`,De.target.checked)},null,40,Aq),T("span",Oq,Q(ie.label),1)]))),128))])):H("",!0)]))),128)):(_(),O("div",Eq," No matches "))])],4)):H("",!0)])),(_(),D(dr,{to:"body"},[h(p)?(_(),O("div",{key:0,ref_key:"advancedPopoverRef",ref:w,style:Rt(h(S)),class:"api-tree-popover rounded-md bg-white p-2"},[T("div",Tq,[(_(),O(ge,null,ke([{key:"contains",label:"Contains"},{key:"startsWith",label:"Starts with"},{key:"endsWith",label:"Ends with"},{key:"regex",label:"Regex pattern"}],te=>T("div",{key:te.key,class:"flex flex-col gap-1"},[T("label",Pq,Q(te.label),1),R(h(Cr),{"model-value":h(m)[te.key],placeholder:te.label,variant:"default",state:"idle","onUpdate:modelValue":ie=>h(m)[te.key]=ie},null,8,["model-value","placeholder","onUpdate:modelValue"])])),64))])],4)):H("",!0)]))],512))}}),Lq=Object.assign(Oo(Iq,[["__scopeId","data-v-c4e14c6c"]]),{__name:"ApiTreeSelect"}),qq=P({name:"GlossarySelectorWidget",__name:"GlossarySelector",props:{field:{},property:{}},setup(t){const e=k(()=>t.property.ui?.mode==="multiple"),n=k(()=>t.property.ui?.showIcon??!0),a=k(()=>t.property.ui?.showCount??!1),r=[{guid:"glossary-1",name:"Sales Glossary",qualifiedName:"default/glossary/1711027234",termsCount:42},{guid:"glossary-2",name:"Marketing Glossary",qualifiedName:"default/glossary/1711027235",termsCount:18},{guid:"glossary-3",name:"Finance Glossary",qualifiedName:"default/glossary/1711027236",termsCount:76},{guid:"glossary-4",name:"Data Engineering Glossary",qualifiedName:"default/glossary/1711027237",termsCount:9}],i=k(()=>t.property.ui?.glossaries??r),s=k(()=>[...i.value].sort((d,f)=>d.name.localeCompare(f.name)).map(d=>({label:a.value&&d.termsCount!==void 0?`${d.name} (${d.termsCount})`:d.name,value:d.qualifiedName})));function o(d){const f=i.value.find(p=>p.qualifiedName===d);return f?{qualifiedName:f.qualifiedName,guid:f.guid,name:f.name}:null}function l(){const d=t.field?.state?.value;if(!d)return[];try{const f=typeof d=="string"?JSON.parse(d):d;if(Array.isArray(f))return f.map(p=>p?.qualifiedName).filter(p=>!!p);if(f?.qualifiedName)return[f.qualifiedName]}catch{}return[]}const u=V(l());function c(d){u.value=d;const f=d.map(o).filter(p=>!!p);e.value?t.field.handleChange(JSON.stringify(f)):t.field.handleChange(f[0]?JSON.stringify(f[0]):"")}return(d,f)=>(_(),O("div",{class:L(["glossary-select-wrap relative",{"with-icon":h(n)}])},[h(n)?(_(),D(h($4),{key:0,class:"glossary-select-icon h-4 w-4 text-gray-500 pointer-events-none"})):H("",!0),R(h(jn),{multiple:h(e),"model-value":h(u),options:h(s),placeholder:t.property.ui?.placeholder??(h(e)?"Select glossaries":"Select a glossary"),variant:"default","onUpdate:modelValue":c,onBlur:t.field.handleBlur},null,8,["multiple","model-value","options","placeholder","onBlur"])],2))}}),Vq=Object.assign(Oo(qq,[["__scopeId","data-v-f019e86a"]]),{__name:"GlossarySelector"});function ka(){return ka=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ka.apply(this,arguments)}function Fq(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ci(t,e)}function Gu(t){return Gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gu(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,r){return a.__proto__=r,a},Ci(t,e)}function Bq(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gs(t,e,n){return Bq()?Gs=Reflect.construct.bind():Gs=function(r,i,s){var o=[null];o.push.apply(o,i);var l=Function.bind.apply(r,o),u=new l;return s&&Ci(u,s.prototype),u},Gs.apply(null,arguments)}function Rq(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Zu(t){var e=typeof Map=="function"?new Map:void 0;return Zu=function(a){if(a===null||!Rq(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(a))return e.get(a);e.set(a,r)}function r(){return Gs(a,arguments,Gu(this).constructor)}return r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ci(r,a)},Zu(t)}var Nq=/%[sdj%]/g,jq=function(){};function Ju(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var a=n.field;e[a]=e[a]||[],e[a].push(n)}),e}function Ot(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];var r=0,i=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var s=t.replace(Nq,function(o){if(o==="%%")return"%";if(r>=i)return o;switch(o){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return o}});return s}return t}function zq(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function et(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||zq(e)&&typeof t=="string"&&!t)}function Wq(t,e,n){var a=[],r=0,i=t.length;function s(o){a.push.apply(a,o||[]),r++,r===i&&n(a)}t.forEach(function(o){e(o,s)})}function um(t,e,n){var a=0,r=t.length;function i(s){if(s&&s.length){n(s);return}var o=a;a=a+1,o<r?e(t[o],i):n([])}i([])}function Hq(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var cm=function(t){Fq(e,t);function e(n,a){var r;return r=t.call(this,"Async Validation Error")||this,r.errors=n,r.fields=a,r}return e}(Zu(Error));function Uq(t,e,n,a,r){if(e.first){var i=new Promise(function(f,p){var m=function(v){return a(v),v.length?p(new cm(v,Ju(v))):f(r)},g=Hq(t);um(g,n,m)});return i.catch(function(f){return f}),i}var s=e.firstFields===!0?Object.keys(t):e.firstFields||[],o=Object.keys(t),l=o.length,u=0,c=[],d=new Promise(function(f,p){var m=function(y){if(c.push.apply(c,y),u++,u===l)return a(c),c.length?p(new cm(c,Ju(c))):f(r)};o.length||(a(c),f(r)),o.forEach(function(g){var y=t[g];s.indexOf(g)!==-1?um(y,n,m):Wq(y,n,m)})});return d.catch(function(f){return f}),d}function Yq(t){return!!(t&&t.message!==void 0)}function Kq(t,e){for(var n=t,a=0;a<e.length;a++){if(n==null)return n;n=n[e[a]]}return n}function dm(t,e){return function(n){var a;return t.fullFields?a=Kq(e,t.fullFields):a=e[n.field||t.fullField],Yq(n)?(n.field=n.field||t.fullField,n.fieldValue=a,n):{message:typeof n=="function"?n():n,fieldValue:a,field:n.field||t.fullField}}}function fm(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];typeof a=="object"&&typeof t[n]=="object"?t[n]=ka({},t[n],a):t[n]=a}}return t}var Iy=function(e,n,a,r,i,s){e.required&&(!a.hasOwnProperty(e.field)||et(n,s||e.type))&&r.push(Ot(i.messages.required,e.fullField))},Gq=function(e,n,a,r,i){(/^\s+$/.test(n)||n==="")&&r.push(Ot(i.messages.whitespace,e.fullField))},Ss,Zq=function(){if(Ss)return Ss;var t="[a-fA-F\\d:]",e=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",a="[a-fA-F\\d]{1,4}",r=(`
|
|
81
|
+
(?:
|
|
82
|
+
(?:`+a+":){7}(?:"+a+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
83
|
+
(?:`+a+":){6}(?:"+n+"|:"+a+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
84
|
+
(?:`+a+":){5}(?::"+n+"|(?::"+a+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
85
|
+
(?:`+a+":){4}(?:(?::"+a+"){0,1}:"+n+"|(?::"+a+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
86
|
+
(?:`+a+":){3}(?:(?::"+a+"){0,2}:"+n+"|(?::"+a+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
87
|
+
(?:`+a+":){2}(?:(?::"+a+"){0,3}:"+n+"|(?::"+a+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
88
|
+
(?:`+a+":){1}(?:(?::"+a+"){0,4}:"+n+"|(?::"+a+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
89
|
+
(?::(?:(?::`+a+"){0,5}:"+n+"|(?::"+a+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
90
|
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
91
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+r+"$)"),s=new RegExp("^"+n+"$"),o=new RegExp("^"+r+"$"),l=function(w){return w&&w.exact?i:new RegExp("(?:"+e(w)+n+e(w)+")|(?:"+e(w)+r+e(w)+")","g")};l.v4=function(x){return x&&x.exact?s:new RegExp(""+e(x)+n+e(x),"g")},l.v6=function(x){return x&&x.exact?o:new RegExp(""+e(x)+r+e(x),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',b="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+p+m+g+")"+y+v;return Ss=new RegExp("(?:^"+b+"$)","i"),Ss},hm={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ai={integer:function(e){return ai.number(e)&&parseInt(e,10)===e},float:function(e){return ai.number(e)&&!ai.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!ai.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(hm.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Zq())},hex:function(e){return typeof e=="string"&&!!e.match(hm.hex)}},Jq=function(e,n,a,r,i){if(e.required&&n===void 0){Iy(e,n,a,r,i);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;s.indexOf(o)>-1?ai[o](n)||r.push(Ot(i.messages.types[o],e.fullField,e.type)):o&&typeof n!==e.type&&r.push(Ot(i.messages.types[o],e.fullField,e.type))},Xq=function(e,n,a,r,i){var s=typeof e.len=="number",o=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(f?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(c=n.length),p&&(c=n.replace(u,"_").length),s?c!==e.len&&r.push(Ot(i.messages[d].len,e.fullField,e.len)):o&&!l&&c<e.min?r.push(Ot(i.messages[d].min,e.fullField,e.min)):l&&!o&&c>e.max?r.push(Ot(i.messages[d].max,e.fullField,e.max)):o&&l&&(c<e.min||c>e.max)&&r.push(Ot(i.messages[d].range,e.fullField,e.min,e.max))},Ga="enum",Qq=function(e,n,a,r,i){e[Ga]=Array.isArray(e[Ga])?e[Ga]:[],e[Ga].indexOf(n)===-1&&r.push(Ot(i.messages[Ga],e.fullField,e[Ga].join(", ")))},e7=function(e,n,a,r,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||r.push(Ot(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(n)||r.push(Ot(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},ve={required:Iy,whitespace:Gq,type:Jq,range:Xq,enum:Qq,pattern:e7},t7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n,"string")&&!e.required)return a();ve.required(e,n,r,s,i,"string"),et(n,"string")||(ve.type(e,n,r,s,i),ve.range(e,n,r,s,i),ve.pattern(e,n,r,s,i),e.whitespace===!0&&ve.whitespace(e,n,r,s,i))}a(s)},n7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&ve.type(e,n,r,s,i)}a(s)},a7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(n===""&&(n=void 0),et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&(ve.type(e,n,r,s,i),ve.range(e,n,r,s,i))}a(s)},r7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&ve.type(e,n,r,s,i)}a(s)},i7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),et(n)||ve.type(e,n,r,s,i)}a(s)},s7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&(ve.type(e,n,r,s,i),ve.range(e,n,r,s,i))}a(s)},o7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&(ve.type(e,n,r,s,i),ve.range(e,n,r,s,i))}a(s)},l7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(n==null&&!e.required)return a();ve.required(e,n,r,s,i,"array"),n!=null&&(ve.type(e,n,r,s,i),ve.range(e,n,r,s,i))}a(s)},u7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&ve.type(e,n,r,s,i)}a(s)},c7="enum",d7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i),n!==void 0&&ve[c7](e,n,r,s,i)}a(s)},f7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n,"string")&&!e.required)return a();ve.required(e,n,r,s,i),et(n,"string")||ve.pattern(e,n,r,s,i)}a(s)},h7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n,"date")&&!e.required)return a();if(ve.required(e,n,r,s,i),!et(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),ve.type(e,l,r,s,i),l&&ve.range(e,l.getTime(),r,s,i)}}a(s)},p7=function(e,n,a,r,i){var s=[],o=Array.isArray(n)?"array":typeof n;ve.required(e,n,r,s,i,o),a(s)},tu=function(e,n,a,r,i){var s=e.type,o=[],l=e.required||!e.required&&r.hasOwnProperty(e.field);if(l){if(et(n,s)&&!e.required)return a();ve.required(e,n,r,o,i,s),et(n,s)||ve.type(e,n,r,o,i)}a(o)},m7=function(e,n,a,r,i){var s=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(et(n)&&!e.required)return a();ve.required(e,n,r,s,i)}a(s)},gi={string:t7,method:n7,number:a7,boolean:r7,regexp:i7,integer:s7,float:o7,array:l7,object:u7,enum:d7,pattern:f7,date:h7,url:tu,hex:tu,email:tu,required:p7,any:m7};function Xu(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Qu=Xu(),ji=function(){function t(n){this.rules=null,this._messages=Qu,this.define(n)}var e=t.prototype;return e.define=function(a){var r=this;if(!a)throw new Error("Cannot configure a schema with no rules");if(typeof a!="object"||Array.isArray(a))throw new Error("Rules must be an object");this.rules={},Object.keys(a).forEach(function(i){var s=a[i];r.rules[i]=Array.isArray(s)?s:[s]})},e.messages=function(a){return a&&(this._messages=fm(Xu(),a)),this._messages},e.validate=function(a,r,i){var s=this;r===void 0&&(r={}),i===void 0&&(i=function(){});var o=a,l=r,u=i;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,o),Promise.resolve(o);function c(g){var y=[],v={};function b(w){if(Array.isArray(w)){var $;y=($=y).concat.apply($,w)}else y.push(w)}for(var x=0;x<g.length;x++)b(g[x]);y.length?(v=Ju(y),u(y,v)):u(null,o)}if(l.messages){var d=this.messages();d===Qu&&(d=Xu()),fm(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},p=l.keys||Object.keys(this.rules);p.forEach(function(g){var y=s.rules[g],v=o[g];y.forEach(function(b){var x=b;typeof x.transform=="function"&&(o===a&&(o=ka({},o)),v=o[g]=x.transform(v)),typeof x=="function"?x={validator:x}:x=ka({},x),x.validator=s.getValidationMethod(x),x.validator&&(x.field=g,x.fullField=x.fullField||g,x.type=s.getType(x),f[g]=f[g]||[],f[g].push({rule:x,value:v,source:o,field:g}))})});var m={};return Uq(f,l,function(g,y){var v=g.rule,b=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");b=b&&(v.required||!v.required&&g.value),v.field=g.field;function x(S,E){return ka({},E,{fullField:v.fullField+"."+S,fullFields:v.fullFields?[].concat(v.fullFields,[S]):[S]})}function w(S){S===void 0&&(S=[]);var E=Array.isArray(S)?S:[S];!l.suppressWarning&&E.length&&t.warning("async-validator:",E),E.length&&v.message!==void 0&&(E=[].concat(v.message));var A=E.map(dm(v,o));if(l.first&&A.length)return m[v.field]=1,y(A);if(!b)y(A);else{if(v.required&&!g.value)return v.message!==void 0?A=[].concat(v.message).map(dm(v,o)):l.error&&(A=[l.error(v,Ot(l.messages.required,v.field))]),y(A);var B={};v.defaultField&&Object.keys(g.value).map(function(U){B[U]=v.defaultField}),B=ka({},B,g.rule.fields);var z={};Object.keys(B).forEach(function(U){var X=B[U],N=Array.isArray(X)?X:[X];z[U]=N.map(x.bind(null,U))});var W=new t(z);W.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),W.validate(g.value,g.rule.options||l,function(U){var X=[];A&&A.length&&X.push.apply(X,A),U&&U.length&&X.push.apply(X,U),y(X.length?X:null)})}}var $;if(v.asyncValidator)$=v.asyncValidator(v,g.value,w,g.source,l);else if(v.validator){try{$=v.validator(v,g.value,w,g.source,l)}catch(S){console.error?.(S),l.suppressValidatorError||setTimeout(function(){throw S},0),w(S.message)}$===!0?w():$===!1?w(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):$ instanceof Array?w($):$ instanceof Error&&w($.message)}$&&$.then&&$.then(function(){return w()},function(S){return w(S)})},function(g){c(g)},o)},e.getType=function(a){if(a.type===void 0&&a.pattern instanceof RegExp&&(a.type="pattern"),typeof a.validator!="function"&&a.type&&!gi.hasOwnProperty(a.type))throw new Error(Ot("Unknown rule type %s",a.type));return a.type||"string"},e.getValidationMethod=function(a){if(typeof a.validator=="function")return a.validator;var r=Object.keys(a),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?gi.required:gi[this.getType(a)]||void 0},t}();ji.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");gi[e]=n};ji.warning=jq;ji.messages=Qu;ji.validators=gi;function g7(t){const e=new ji({[t.id]:t.ui?.rules??[]});return{onBlurAsync:async({value:n})=>{try{await e.validate({[t.id]:n})}catch({errors:a}){return a[0].message}}}}var v7={},ec=function(t,e){return ec=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r])},ec(t,e)};function ft(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ec(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Od=function(t){var e="[object "+t+"]";return function(n){return y7(n)===e}},y7=function(t){return Object.prototype.toString.call(t)},$r=function(t){return t instanceof Date?t.getTime():Or(t)?t.map($r):t&&typeof t.toJSON=="function"?t.toJSON():t},b7=function(t){return t??null},Or=Od("Array"),x7=Od("Object"),Ly=Od("Function"),w7=function(t,e){return t.hasOwnProperty(e)&&!Ly(t[e])},_7=function(t){return t&&(t.constructor===Object||t.constructor===Array||t.constructor.toString()==="function Object() { [native code] }"||t.constructor.toString()==="function Array() { [native code] }")&&!t.toJSON},tc=function(t,e){if(t==null&&t==e||t===e)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e))return!1;if(Or(t)){if(t.length!==e.length)return!1;for(var n=0,a=t.length;n<a;n++)if(!tc(t[n],e[n]))return!1;return!0}else if(x7(t)){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var r in t)if(!tc(t[r],e[r]))return!1;return!0}return!1},nc=function(t,e,n,a,r,i){var s=e[a];if(Or(t)&&isNaN(Number(s))&&!w7(t,s)){for(var o=0,l=t.length;o<l;o++)if(!nc(t[o],e,n,a,o,t))return!1}return a===e.length||t==null?n(t,r,i,a===0,a===e.length):nc(t[s],e,n,a+1,s,t)},gn=function(){function t(e,n,a,r){this.params=e,this.owneryQuery=n,this.options=a,this.name=r,this.init()}return t.prototype.init=function(){},t.prototype.reset=function(){this.done=!1,this.keep=!1},t}(),Ed=function(t){ft(e,t);function e(n,a,r,i){var s=t.call(this,n,a,r)||this;return s.children=i,s}return e.prototype.reset=function(){this.keep=!1,this.done=!1;for(var n=0,a=this.children.length;n<a;n++)this.children[n].reset()},e.prototype.childrenNext=function(n,a,r,i,s){for(var o=!0,l=!0,u=0,c=this.children.length;u<c;u++){var d=this.children[u];if(d.done||d.next(n,a,r,i,s),d.keep||(l=!1),d.done){if(!d.keep)break}else o=!1}this.done=o,this.keep=l},e}(gn),qy=function(t){ft(e,t);function e(n,a,r,i,s){var o=t.call(this,n,a,r,i)||this;return o.name=s,o}return e}(Ed),$7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.next=function(n,a,r,i){this.childrenNext(n,a,r,i)},e}(Ed),ac=function(t){ft(e,t);function e(n,a,r,i,s){var o=t.call(this,a,r,i,s)||this;return o.keyPath=n,o.propop=!0,o._nextNestedValue=function(l,u,c,d,f){return o.childrenNext(l,u,c,d,f),!o.done},o}return e.prototype.next=function(n,a,r){nc(n,this.keyPath,this._nextNestedValue,0,a,r)},e}(Ed),Td=function(t,e){if(t instanceof Function)return t;if(t instanceof RegExp)return function(a){var r=typeof a=="string"&&t.test(a);return t.lastIndex=0,r};var n=$r(t);return function(a){return e(n,$r(a))}},da=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){this._test=Td(this.params,this.options.compare)},e.prototype.next=function(n,a,r){(!Array.isArray(r)||r.hasOwnProperty(a))&&this._test(n,a,r)&&(this.done=!0,this.keep=!0)},e}(gn),k7=function(t){return function(e,n,a,r){return t(e,n,a,r)}},Qo=function(t){return k7(function(e,n,a,r){var i=typeof $r(e),s=t(e);return new da(function(o){var l=b7(o);return typeof $r(l)===i&&s(l)},n,a,r)})},S7=function(t,e,n,a){var r=a.operations[t];return r||Vy(t),r(e,n,a,t)},Vy=function(t){throw new Error("Unsupported operation: ".concat(t))},Fy=function(t,e){for(var n in t)if(e.operations.hasOwnProperty(n)||n.charAt(0)==="$")return!0;return!1},C7=function(t,e,n,a,r){if(Fy(e,r)){var i=By(e,n,r),s=i[0],o=i[1];if(o.length)throw new Error("Property queries must contain only operations, or exact objects.");return new ac(t,e,a,r,s)}return new ac(t,e,a,r,[new da(e,a,r)])},Er=function(t,e,n){e===void 0&&(e=null);var a=n===void 0?{}:n,r=a.compare,i=a.operations,s={compare:r||tc,operations:Object.assign({},i||{})},o=By(t,null,s),l=o[0],u=o[1],c=[];return l.length&&c.push(new ac([],t,e,s,l)),c.push.apply(c,u),c.length===1?c[0]:new $7(t,e,s,c)},By=function(t,e,n){var a=[],r=[];if(!_7(t))return a.push(new da(t,t,n)),[a,r];for(var i in t)if(n.operations.hasOwnProperty(i)){var s=S7(i,t[i],t,n);if(s&&!s.propop&&e&&!n.operations[e])throw new Error("Malformed query. ".concat(i," cannot be matched against property."));s!=null&&a.push(s)}else i.charAt(0)==="$"?Vy(i):r.push(C7(i.split("."),t[i],i,t,n));return[a,r]},M7=function(t){return function(e,n,a){return t.reset(),t.next(e,n,a),t.keep}},D7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){this._test=Td(this.params,this.options.compare)},e.prototype.reset=function(){t.prototype.reset.call(this),this.keep=!0},e.prototype.next=function(n){this._test(n)&&(this.done=!0,this.keep=!1)},e}(gn),A7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){if(!this.params||typeof this.params!="object")throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=Er(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},e.prototype.next=function(n){if(Or(n)){for(var a=0,r=n.length;a<r;a++){this._queryOperation.reset();var i=n[a];this._queryOperation.next(i,a,n,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},e}(gn),O7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){this._queryOperation=Er(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},e.prototype.next=function(n,a,r,i){this._queryOperation.next(n,a,r,i),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},e}(gn),Ry=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){},e.prototype.next=function(n){Or(n)&&n.length===this.params&&(this.done=!0,this.keep=!0)},e}(gn),Ny=function(t){if(t.length===0)throw new Error("$and/$or/$nor must be a nonempty array")},jy=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!1,n}return e.prototype.init=function(){var n=this;Ny(this.params),this._ops=this.params.map(function(a){return Er(a,null,n.options)})},e.prototype.reset=function(){this.done=!1,this.keep=!1;for(var n=0,a=this._ops.length;n<a;n++)this._ops[n].reset()},e.prototype.next=function(n,a,r){for(var i=!1,s=!1,o=0,l=this._ops.length;o<l;o++){var u=this._ops[o];if(u.next(n,a,r),u.keep){i=!0,s=u.keep;break}}this.keep=s,this.done=i},e}(gn),E7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!1,n}return e.prototype.next=function(n,a,r){t.prototype.next.call(this,n,a,r),this.keep=!this.keep},e}(jy),zy=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.init=function(){var n=this,a=Array.isArray(this.params)?this.params:[this.params];this._testers=a.map(function(r){if(Fy(r,n.options))throw new Error("cannot nest $ under ".concat(n.name.toLowerCase()));return Td(r,n.options.compare)})},e.prototype.next=function(n,a,r){for(var i=!1,s=!1,o=0,l=this._testers.length;o<l;o++){var u=this._testers[o];if(u(n)){i=!0,s=!0;break}}this.keep=s,this.done=i},e}(gn),T7=function(t){ft(e,t);function e(n,a,r,i){var s=t.call(this,n,a,r,i)||this;return s.propop=!0,s._in=new zy(n,a,r,i),s}return e.prototype.next=function(n,a,r,i){this._in.next(n,a,r),Or(r)&&!i?this._in.keep?(this.keep=!1,this.done=!0):a==r.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},e.prototype.reset=function(){t.prototype.reset.call(this),this._in.reset()},e}(gn),P7=function(t){ft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.propop=!0,n}return e.prototype.next=function(n,a,r,i,s){s?r.hasOwnProperty(a)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},e}(gn),I7=function(t){ft(e,t);function e(n,a,r,i){var s=t.call(this,n,a,r,n.map(function(o){return Er(o,a,r)}),i)||this;return s.propop=!1,Ny(n),s}return e.prototype.next=function(n,a,r,i){this.childrenNext(n,a,r,i)},e}(qy),L7=function(t){ft(e,t);function e(n,a,r,i){var s=t.call(this,n,a,r,n.map(function(o){return Er(o,a,r)}),i)||this;return s.propop=!0,s}return e.prototype.next=function(n,a,r,i){this.childrenNext(n,a,r,i)},e}(qy),q7=function(t,e,n){return new da(t,e,n)},V7=function(t,e,n,a){return new D7(t,e,n,a)},F7=function(t,e,n,a){return new jy(t,e,n,a)},B7=function(t,e,n,a){return new E7(t,e,n,a)},R7=function(t,e,n,a){return new A7(t,e,n,a)},N7=function(t,e,n,a){return new T7(t,e,n,a)},j7=function(t,e,n,a){return new zy(t,e,n,a)},z7=Qo(function(t){return function(e){return e!=null&&e<t}}),W7=Qo(function(t){return function(e){return e===t||e<=t}}),H7=Qo(function(t){return function(e){return e!=null&&e>t}}),U7=Qo(function(t){return function(e){return e===t||e>=t}}),Y7=function(t,e,n){var a=t[0],r=t[1];return new da(function(i){return $r(i)%a===r},e,n)},K7=function(t,e,n,a){return new P7(t,e,n,a)},G7=function(t,e,n){return new da(new RegExp(t,e.$options),e,n)},Z7=function(t,e,n,a){return new O7(t,e,n,a)},pm={number:function(t){return typeof t=="number"},string:function(t){return typeof t=="string"},bool:function(t){return typeof t=="boolean"},array:function(t){return Array.isArray(t)},null:function(t){return t===null},timestamp:function(t){return t instanceof Date}},J7=function(t,e,n){return new da(function(a){if(typeof t=="string"){if(!pm[t])throw new Error("Type alias does not exist");return pm[t](a)}return a!=null?a instanceof t||a.constructor===t:!1},e,n)},X7=function(t,e,n,a){return new I7(t,e,n,a)},Q7=function(t,e,n,a){return new L7(t,e,n,a)},eV=function(t,e,n){return new Ry(t,e,n,"$size")},tV=function(){return null},nV=function(t,e,n){var a;if(Ly(t))a=t;else if(!v7.CSP_ENABLED)a=new Function("obj","return "+t);else throw new Error('In CSP mode, sift does not support strings in "$where" condition');return new da(function(r){return a.bind(r)(r)},e,n)},aV=Object.freeze({__proto__:null,$Size:Ry,$all:Q7,$and:X7,$elemMatch:R7,$eq:q7,$exists:K7,$gt:H7,$gte:U7,$in:j7,$lt:z7,$lte:W7,$mod:Y7,$ne:V7,$nin:N7,$nor:B7,$not:Z7,$options:tV,$or:F7,$regex:G7,$size:eV,$type:J7,$where:nV}),rV=function(t,e,n){var a=n===void 0?{}:n,r=a.compare,i=a.operations;return Er(t,e,{compare:r,operations:Object.assign({},aV,i||{})})},iV=function(t,e){e===void 0&&(e={});var n=rV(t,null,e);return M7(n)};function sV(t,{formState:e}){return t.find(n=>{if(n.filter){const a={},r=Object.keys(e);return Object.entries(e).forEach(([i,s])=>{(i.includes(".")||r.every(o=>o===i?!0:!o.startsWith(i)))&&(a[i]=s)}),[DP(a)].filter(iV(n.filter)).length>0}return n.regex?new RegExp(n.regex).test(e[n.property]):e[n.property]===n.value})}const oV={class:"grid grid-cols-8 gap-x-4 gap-y-4"},lV={key:0,class:"text-red-500"},uV={key:1,class:"text-red-500 text-xs"},cV=P({__name:"DynamicForm",props:{configMap:{},baseKey:{},currentStep:{}},setup(t,{expose:e}){const n=tt(mt),a=n.useStore(p=>sa(p.values)),r=(p=8,m,g)=>{let y=`col-span-${p}`;return m&&(y+=` col-start-${m}`),g&&(y+=` col-start-${m}`),y},i=p=>t.baseKey?`${t.baseKey}.${p}`:p,s=k(()=>{const p=JSON.parse(JSON.stringify(t.configMap));if(p.anyOf){p.anyOf.forEach(g=>{g.required.forEach(y=>{p.properties&&p.properties[y]&&(p.properties[y].ui.hidden=!0)})});const m=[];p.anyOf.forEach(g=>{Object.keys(g.properties).every(v=>{if(a.value[i(v)]?.toString()===g.properties[v]?.const?.toString())return!0})&&m.push(g)}),m.length>0&&m.forEach(g=>{g.required.forEach(y=>{p.properties&&p.properties[y]&&(p.properties[y].ui.hidden=!1)})})}return p}),o=p=>{const m=s.value?.properties[p];let g={id:i(p),name:i(p)};if(m.type==="conditional"){const{conditions:y,...v}=m,b=y?sV(y,{formState:a.value}):null;g={...g,...v,...b}}else g={...g,...m};return g},l=k(()=>{{const p=[];return s.value?.properties&&(t.currentStep?.properties?t.currentStep.properties.forEach(m=>{Object.keys(s?.value?.properties).find(y=>y===m)&&(s.value?.properties[m].ui?.hidden||p.push(o(m)))}):Object.keys(s?.value?.properties).forEach(m=>{s.value?.properties[m].ui?.hidden||p.push(o(m))})),p}}),u=["credential","nested","connection","sage","Repeater","agent","advancedJdbcUrlGroup","jdbcurlgroup","nestedcollapse","inputrepeater"],c=["evaluate","infoBanner"],d=p=>{if(p.ui?.widget)switch(p.ui?.widget?.toLowerCase()){case"divider":return"hr";case"header":return"h5";case"radio":return bP;case"credential":return WP;case"nested":return UP;case"input":return Hl;case"password":return KP;case"select":return ZP;case"sqltree":return XP;case"apitree":return e4;case"sage":case"sagev2":return f4;case"connection":return p4;case"fileupload":return y4;case"repeater":return L4;case"connectionselector":return U4;case"switcher":return K4;case"agent":return pI;case"agentselector":return gI;case"advancedjdbcurlgroup":return jI;case"jdbcurlgroup":return WI;case"nestedcollapse":return UI;case"apiselect":return KI;case"checkbox":return QI;case"date":return k8;case"inputnumber":return C8;case"inputrepeater":return P8;case"evaluate":return L8;case"dsntreemap":return Q8;case"infobanner":return lq;case"apitreeselect":return Lq;case"glossaryselector":return Vq;case"boolean":return _p;default:return p.ui.widget}else switch(p.type){case"string":case"number":return Hl;case"boolean":return _p;case"array":return"Select";case"object":return"Form";case"code":return"CodeBlock";case"banner":return"Banner";default:return Hl}};async function f(){if(await n.handleSubmit(),!n.state.isValid)throw new Error("Form is invalid");return n.state.values}return e({validate:f}),(p,m)=>(_(),O("div",oV,[(_(!0),O(ge,null,ke(h(l),g=>(_(),O(ge,{key:`${g.id}`},[g.ui?.hidden?H("",!0):(_(),O("div",{key:0,class:L(r(g.ui?.grid,g.ui?.start,g.ui?.end))},[u.includes(g?.ui?.widget)?(_(),D(Ne(d(g)),{key:0,property:g},null,8,["property"])):c.includes(g?.ui?.widget)?(_(),D(Ne(d(g)),{key:1,property:g},null,8,["property"])):(_(),D(h(n).Field,{key:2,name:g.id,validators:h(g7)(g)},{default:C(({field:y})=>[g.ui?.label?(_(),D(h(nd),{key:0},{default:C(()=>[xe(Q(g.ui?.label)+" ",1),g?.required?(_(),O("span",lV," * ")):H("",!0)]),_:2},1024)):H("",!0),(_(),D(Ne(d(g)),{field:y,"base-key":t.baseKey,property:g},null,8,["field","base-key","property"])),y.state.meta.isTouched&&!y.state.meta.isValid?(_(),O("span",uV,Q(y.state.meta.errors.join(", ")),1)):H("",!0)]),_:2},1032,["name","validators"]))],2))],64))),128))]))}}),Wy=Object.assign(cV,{__name:"DynamicForm"}),fa=Object.freeze(Object.defineProperty({__proto__:null,default:Wy},Symbol.toStringTag,{value:"Module"})),ur=new WeakMap,Zs=new WeakMap,Co={current:[]};let nu=!1,vi=0;const ri=new Set,Cs=new Map;function Hy(t){const e=Array.from(t).sort((n,a)=>n instanceof In&&n.options.deps.includes(a)?1:a instanceof In&&a.options.deps.includes(n)?-1:0);for(const n of e){if(Co.current.includes(n))continue;Co.current.push(n),n.recompute();const a=Zs.get(n);if(a)for(const r of a){const i=ur.get(r);i&&Hy(i)}}}function dV(t){const e={prevVal:t.prevState,currentVal:t.state};for(const n of t.listeners)n(e)}function fV(t){const e={prevVal:t.prevState,currentVal:t.state};for(const n of t.listeners)n(e)}function Uy(t){if(vi>0&&!Cs.has(t)&&Cs.set(t,t.prevState),ri.add(t),!(vi>0)&&!nu)try{for(nu=!0;ri.size>0;){const e=Array.from(ri);ri.clear();for(const n of e){const a=Cs.get(n)??n.prevState;n.prevState=a,dV(n)}for(const n of e){const a=ur.get(n);a&&(Co.current.push(n),Hy(a))}for(const n of e){const a=ur.get(n);if(a)for(const r of a)fV(r)}}}finally{nu=!1,Co.current=[],Cs.clear()}}function on(t){vi++;try{t()}finally{if(vi--,vi===0){const e=ri.values().next().value;e&&Uy(e)}}}function hV(t){return typeof t=="function"}class Mo{constructor(e,n){this.listeners=new Set,this.subscribe=a=>{var r,i;this.listeners.add(a);const s=(i=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:i.call(r,a,this);return()=>{this.listeners.delete(a),s?.()}},this.prevState=e,this.state=e,this.options=n}setState(e){var n,a,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(e):hV(e)?this.state=e(this.prevState):this.state=e,(r=(a=this.options)==null?void 0:a.onUpdate)==null||r.call(a),Uy(this)}}class In{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,a=new Array(n),r=new Array(n);for(let i=0;i<n;i++){const s=this.options.deps[i];a[i]=s.prevState,r[i]=s.state}return this.lastSeenDepValues=r,{prevDepVals:a,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,a;this.prevState=this.state;const r=this.getDepVals();this.state=this.options.fn(r),(a=(n=this.options).onUpdate)==null||a.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof In&&i.checkIfRecalculationNeededDeeply();let n=!1;const a=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let i=0;i<r.length;i++)if(r[i]!==a[i]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var a,r;this.listeners.add(n);const i=(r=(a=this.options).onSubscribe)==null?void 0:r.call(a,n,this);return()=>{this.listeners.delete(n),i?.()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const n of e)if(n instanceof In)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof Mo){let a=ur.get(n);a||(a=new Set,ur.set(n,a)),a.add(this);let r=Zs.get(this);r||(r=new Set,Zs.set(this,r)),r.add(n)}}unregisterFromGraph(e=this.options.deps){for(const n of e)if(n instanceof In)this.unregisterFromGraph(n.options.deps);else if(n instanceof Mo){const a=ur.get(n);a&&a.delete(this);const r=Zs.get(this);r&&r.delete(n)}}}function pV(t){return typeof t=="function"}function mm(t,...e){return pV(t)?t(...e):t}function mV(t){return t||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"")}class Yy{#n=!0;#e;#t;#i;#a;#r;#s;#o;#u=0;#d=5;#c=()=>{this.debugLog("Connected to event bus"),this.#r=!0,this.debugLog("Emitting queued events",this.#a),this.#a.forEach(e=>this.emitEventToBus(e)),this.#a=[],this.stopConnectLoop(),this.#t().removeEventListener("tanstack-connect-success",this.#c)};#l=()=>{if(this.#t().addEventListener("tanstack-connect-success",this.#c),this.#u<this.#d){this.#u++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#t().removeEventListener("tanstack-connect",this.#l),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};constructor({pluginId:e,debug:n=!1,enabled:a=!0,reconnectEveryMs:r=1e3}){this.#e=e,this.#n=a,this.#t=this.getGlobalTarget,this.#i=n,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#a=[],this.#r=!1,this.#s=null,this.#o=r}startConnectLoop(){this.#s!==null||this.#r||(this.debugLog(`Starting connect loop (every ${this.#o}ms)`),this.#s=setInterval(this.#l,this.#o))}stopConnectLoop(){this.#s!==null&&(clearInterval(this.#s),this.#s=null,this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const e=typeof EventTarget<"u"?new EventTarget:void 0;return typeof e>"u"||typeof e.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#e}dispatchCustomEventShim(e,n){try{const a=new Event(e,{detail:n});this.#t().dispatchEvent(a)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,n){try{this.#t().dispatchEvent(new CustomEvent(e,{detail:n}))}catch{this.dispatchCustomEventShim(e,n)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}emit(e,n){if(!this.#n){this.debugLog("Event bus client is disabled, not emitting event",e,n);return}if(!this.#r){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#a.push({type:`${this.#e}:${e}`,payload:n,pluginId:this.#e}),typeof CustomEvent<"u"&&(this.#l(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#e}:${e}`,payload:n,pluginId:this.#e})}on(e,n){const a=`${this.#e}:${e}`;if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event",a),()=>{};const r=i=>{this.debugLog("Received event from bus",i.detail),n(i.detail)};return this.#t().addEventListener(a,r),this.debugLog("Registered event to bus",a),()=>{this.#t().removeEventListener(a,r)}}onAll(e){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=a=>{const r=a.detail;e(r)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}onAllPluginEvents(e){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const n=a=>{const r=a.detail;this.#e&&r.pluginId!==this.#e||e(r)};return this.#t().addEventListener("tanstack-devtools-global",n),()=>this.#t().removeEventListener("tanstack-devtools-global",n)}}class gV extends Yy{constructor(e){super({pluginId:"pacer",debug:e?.debug})}}const vV=(t,e)=>{Ky.emit(t,e)},Ky=new gV;function gm(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}const yV={enabled:!0,leading:!0,trailing:!0,wait:0};class bV{constructor(e,n){this.fn=e,this.store=new Mo(gm()),this.setOptions=a=>{this.options={...this.options,...a},this.#t()||this.cancel()},this.#e=a=>{this.store.setState(r=>{const i={...r,...a},{isPending:s}=i;return{...i,status:this.#t()?s?"pending":"idle":"disabled"}}),vV("Throttler",this)},this.#t=()=>!!mm(this.options.enabled,this),this.#i=()=>mm(this.options.wait,this),this.maybeExecute=(...a)=>{this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});const r=Date.now(),i=r-this.store.state.lastExecutionTime,s=this.#i();if(this.options.leading&&i>=s)this.#a(...a);else if(this.#e({lastArgs:a}),!this.#n&&this.options.trailing){const o=this.store.state.lastExecutionTime?r-this.store.state.lastExecutionTime:0,l=s-o;this.#e({isPending:!0}),this.#n=setTimeout(()=>{const{lastArgs:u}=this.store.state;u!==void 0&&this.#a(...u)},l)}},this.#a=(...a)=>{if(!this.#t())return;this.fn(...a);const r=Date.now(),i=r+this.#i();this.#r(),this.#e({executionCount:this.store.state.executionCount+1,lastExecutionTime:r,nextExecutionTime:i,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(a,this),setTimeout(()=>{this.store.state.isPending||this.#e({nextExecutionTime:void 0})},this.#i())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#a(...this.store.state.lastArgs)},this.#r=()=>{this.#n&&(clearTimeout(this.#n),this.#n=void 0)},this.cancel=()=>{this.#r(),this.#e({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#e(gm())},this.key=mV(n.key),this.options={...yV,...n},this.#e(this.options.initialState??{}),Ky.on("d-Throttler",a=>{a.payload.key===this.key&&(this.#e(a.payload.store.state),this.setOptions(a.payload.options))})}#n;#e;#t;#i;#a;#r}function xV(t,e){return new bV(t,e).maybeExecute}function Gy(t,e){return typeof t=="function"?t(e):t}function ii(t,e){return Pd(e).reduce((a,r)=>{if(a===null)return null;if(typeof a<"u")return a[r]},t)}function Ms(t,e,n){const a=Pd(e);function r(i){if(!a.length)return Gy(n,i);const s=a.shift();if(typeof s=="string"||typeof s=="number"&&!Array.isArray(i))return typeof i=="object"?(i===null&&(i={}),{...i,[s]:r(i[s])}):{[s]:r()};if(Array.isArray(i)&&typeof s=="number"){const o=i.slice(0,s);return[...o.length?o:new Array(s),r(i[s]),...i.slice(s+1)]}return[...new Array(s),r()]}return r(t)}function wV(t,e){const n=Pd(e);function a(r){if(!r)return;if(n.length===1){const s=n[0];if(Array.isArray(r)&&typeof s=="number")return r.filter((u,c)=>c!==s);const{[s]:o,...l}=r;return l}const i=n.shift();if(typeof i=="string"&&typeof r=="object")return{...r,[i]:a(r[i])};if(typeof i=="number"&&Array.isArray(r)){if(i>=r.length)return r;const s=r.slice(0,i);return[...s.length?s:new Array(i),a(r[i]),...r.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return a(t)}const _V=/^(\d+)$/gm,$V=/\.(\d+)(?=\.)/gm,kV=/^(\d+)\./gm,SV=/\.(\d+$)/gm,CV=/\.{2,}/gm,rc="__int__",Ds=`${rc}$1`;function Pd(t){if(Array.isArray(t))return[...t];if(typeof t!="string")throw new Error("Path must be a string.");return t.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(_V,Ds).replace($V,`.${Ds}.`).replace(kV,`${Ds}.`).replace(SV,`.${Ds}`).replace(CV,".").split(".").map(e=>{if(e.startsWith(rc)){const n=e.substring(rc.length),a=parseInt(n,10);return String(a)===n?a:n}return e})}function MV(t){return!(Array.isArray(t)&&t.length===0)}function ic(t,e){const n=a=>a.validators.filter(Boolean).map(r=>({cause:r.cause,validate:r.fn}));return e.validationLogic({form:e.form,validators:e.validators,event:{type:t,async:!1},runValidation:n})}function sc(t,e){const{asyncDebounceMs:n}=e,{onBlurAsyncDebounceMs:a,onChangeAsyncDebounceMs:r,onDynamicAsyncDebounceMs:i}=e.validators||{},s=n??0,o=l=>l.validators.filter(Boolean).map(u=>{const c=u?.cause||t;let d=s;switch(c){case"change":d=r??s;break;case"blur":d=a??s;break;case"dynamic":d=i??s;break;case"submit":d=0;break}return t==="submit"&&(d=0),{cause:c,validate:u.fn,debounceMs:d}});return e.validationLogic({form:e.form,validators:e.validators,event:{type:t,async:!0},runValidation:o})}const oc=t=>!!t&&typeof t=="object"&&"fields"in t;function tr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[r,i]of t)if(!e.has(r)||!Object.is(i,e.get(r)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}const n=Object.keys(t),a=Object.keys(e);if(n.length!==a.length)return!1;for(const r of n)if(!a.includes(r)||!tr(t[r],e[r]))return!1;return!0}const vm=({newFormValidatorError:t,isPreviousErrorFromFormValidator:e,previousErrorValue:n})=>t?{newErrorValue:t,newSource:"form"}:e?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},ym=({formLevelError:t,fieldLevelError:e})=>e?{newErrorValue:e,newSource:"field"}:t?{newErrorValue:t,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function wt(t,e){return t==null?e:{...t,...e}}let Sa=256;const Js=[];let As;for(;Sa--;)Js[Sa]=(Sa+256).toString(16).substring(1);function DV(){let t=0,e,n="";if(!As||Sa+16>256){for(As=new Array(256),t=256;t--;)As[t]=256*Math.random()|0;t=0,Sa=0}for(;t<16;t++)e=As[Sa+t],t===6?n+=Js[e&15|64]:t===8?n+=Js[e&63|128]:n+=Js[e],t&1&&t>1&&t<11&&(n+="-");return Sa++,n}const nr=t=>{if(!t.validators)return t.runValidation({validators:[],form:t.form});const e=t.event.async,n=e?void 0:{fn:t.validators.onMount,cause:"mount"},a={fn:e?t.validators.onChangeAsync:t.validators.onChange,cause:"change"},r={fn:e?t.validators.onBlurAsync:t.validators.onBlur,cause:"blur"},i={fn:e?t.validators.onSubmitAsync:t.validators.onSubmit,cause:"submit"},s=e?void 0:{fn:()=>{},cause:"server"};switch(t.event.type){case"mount":return t.runValidation({validators:[n],form:t.form});case"submit":return t.runValidation({validators:[a,r,i,s],form:t.form});case"server":return t.runValidation({validators:[],form:t.form});case"blur":return t.runValidation({validators:[r,s],form:t.form});case"change":return t.runValidation({validators:[a,s],form:t.form});default:throw new Error(`Unknown validation event type: ${t.event.type}`)}};function AV(t,e){const n=new Map;for(const a of t){const r=a.path??[];let i=e,s="";for(let o=0;o<r.length;o++){const l=r[o];if(l===void 0)continue;const u=typeof l=="object"?l.key:l,c=Number(u);Array.isArray(i)&&!Number.isNaN(c)?s+=`[${c}]`:s+=(o>0?".":"")+String(u),typeof i=="object"&&i!==null?i=i[u]:i=void 0}n.set(s,(n.get(s)??[]).concat(a))}return Object.fromEntries(n)}const bm=(t,e)=>{const n=AV(t,e);return{form:n,fields:n}},cr={validate({value:t,validationSource:e},n){const a=n["~standard"].validate(t);if(a instanceof Promise)throw new Error("async function passed to sync validator");if(a.issues)return e==="field"?a.issues:bm(a.issues,t)},async validateAsync({value:t,validationSource:e},n){const a=await n["~standard"].validate(t);if(a.issues)return e==="field"?a.issues:bm(a.issues,t)}},Zy=t=>!!t&&"~standard"in t,Do={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function Os(t){function e(d,f,p,m){const g=a(d,f,p,m);({insert:()=>o(g,d,f),remove:()=>l(g),swap:()=>m!==void 0&&c(g,d,f,m),move:()=>m!==void 0&&u(g,d,f,m)})[p]()}function n(d,f){return`${d}[${f}]`}function a(d,f,p,m){const g=[n(d,f)];if(p==="swap")g.push(n(d,m));else if(p==="move"){const[y,v]=[Math.min(f,m),Math.max(f,m)];for(let b=y;b<=v;b++)g.push(n(d,b))}else{const y=t.getFieldValue(d),v=Array.isArray(y)?y.length:0;for(let b=f+1;b<v;b++)g.push(n(d,b))}return Object.keys(t.fieldInfo).filter(y=>g.some(v=>y.startsWith(v)))}function r(d,f){return d.replace(/\[(\d+)\]/,(p,m)=>{const g=parseInt(m,10);return`[${f==="up"?g+1:Math.max(0,g-1)}]`})}function i(d,f){(f==="up"?d:[...d].reverse()).forEach(m=>{const g=r(m.toString(),f),y=t.getFieldMeta(g);y?t.setFieldMeta(m,y):t.setFieldMeta(m,s())})}const s=()=>Do,o=(d,f,p)=>{i(d,"down"),d.forEach(m=>{m.toString().startsWith(n(f,p))&&t.setFieldMeta(m,s())})},l=d=>{i(d,"up")},u=(d,f,p,m)=>{const g=new Map(Object.keys(t.fieldInfo).filter(y=>y.startsWith(n(f,p))).map(y=>[y,t.getFieldMeta(y)]));i(d,p<m?"up":"down"),Object.keys(t.fieldInfo).filter(y=>y.startsWith(n(f,m))).forEach(y=>{const v=y.replace(n(f,m),n(f,p)),b=g.get(v);b&&t.setFieldMeta(y,b)})},c=(d,f,p,m)=>{d.forEach(g=>{if(!g.toString().startsWith(n(f,p)))return;const y=g.toString().replace(n(f,p),n(f,m)),[v,b]=[t.getFieldMeta(g),t.getFieldMeta(y)];v&&t.setFieldMeta(y,v),b&&t.setFieldMeta(g,b)})};return{handleArrayFieldMetaShift:e}}class OV extends Yy{constructor(){super({pluginId:"form-devtools"})}}const qt=new OV;function au(t){return{values:t.values??{},errorMap:t.errorMap??{},fieldMetaBase:t.fieldMetaBase??{},isSubmitted:t.isSubmitted??!1,isSubmitting:t.isSubmitting??!1,isValidating:t.isValidating??!1,submissionAttempts:t.submissionAttempts??0,isSubmitSuccessful:t.isSubmitSuccessful??!1,validationMetaMap:t.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class EV{constructor(e){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const a=this.fieldMetaDerived.mount(),r=this.store.mount(),i=()=>{a(),r(),qt.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:s}=this.options.validators||{};return qt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),s&&this.validateSync("mount"),i},this.update=a=>{if(!a)return;const r=this.options;this.options=a;const i=!!a.transform?.deps?.some((l,u)=>l!==this.prevTransformArray[u]),s=a.defaultValues&&!tr(a.defaultValues,r.defaultValues)&&!this.state.isTouched,o=!tr(a.defaultState,r.defaultState)&&!this.state.isTouched;!s&&!o&&!i||(on(()=>{this.baseStore.setState(()=>au(Object.assign({},this.state,o?a.defaultState:{},s?{values:a.defaultValues}:{},i?{_force_re_eval:!this.state._force_re_eval}:{})))}),qt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(a,r)=>{const{fieldMeta:i}=this.state,s=this.resetFieldMeta(i);a&&!r?.keepDefaultValues&&(this.options={...this.options,defaultValues:a}),this.baseStore.setState(()=>au({...this.options.defaultState,values:a??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:s}))},this.validateAllFields=async a=>{const r=[];return on(()=>{Object.values(this.fieldInfo).forEach(s=>{if(!s.instance)return;const o=s.instance;r.push(Promise.resolve().then(()=>o.validate(a,{skipFormValidation:!0}))),s.instance.state.meta.isTouched||s.instance.setMeta(l=>({...l,isTouched:!0}))})}),(await Promise.all(r)).flat()},this.validateArrayFieldsStartingFrom=async(a,r,i)=>{const s=this.getFieldValue(a),o=Array.isArray(s)?Math.max(s.length-1,0):null,l=[`${a}[${r}]`];for(let f=r+1;f<=(o??0);f++)l.push(`${a}[${f}]`);const u=Object.keys(this.fieldInfo).filter(f=>l.some(p=>f.startsWith(p))),c=[];return on(()=>{u.forEach(f=>{c.push(Promise.resolve().then(()=>this.validateField(f,i)))})}),(await Promise.all(c)).flat()},this.validateField=(a,r)=>{const i=this.fieldInfo[a]?.instance;return i?(i.state.meta.isTouched||i.setMeta(s=>({...s,isTouched:!0})),i.validate(r)):[]},this.validateSync=a=>{const r=ic(a,{...this.options,form:this,validationLogic:this.options.validationLogic||nr});let i=!1;const s={};return on(()=>{for(const u of r){if(!u.validate)continue;const c=this.runValidator({validate:u.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:d,fieldErrors:f}=Xs(c),p=Xr(u.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const g=this.getFieldMeta(m);if(!g)continue;const{errorMap:y,errorSourceMap:v}=g,b=f?.[m],{newErrorValue:x,newSource:w}=vm({newFormValidatorError:b,isPreviousErrorFromFormValidator:v?.[p]==="form",previousErrorValue:y?.[p]});w==="form"&&(s[m]={...s[m],[p]:b}),y?.[p]!==x&&this.setFieldMeta(m,$=>({...$,errorMap:{...$.errorMap,[p]:x},errorSourceMap:{...$.errorSourceMap,[p]:w}}))}this.state.errorMap?.[p]!==d&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:d}})),(d||f)&&(i=!0)}const o=Xr("submit");this.state.errorMap?.[o]&&a!=="submit"&&!i&&this.baseStore.setState(u=>({...u,errorMap:{...u.errorMap,[o]:void 0}}));const l=Xr("server");this.state.errorMap?.[l]&&a!=="server"&&!i&&this.baseStore.setState(u=>({...u,errorMap:{...u.errorMap,[l]:void 0}}))}),{hasErrored:i,fieldsErrorMap:s}},this.validateAsync=async a=>{const r=sc(a,{...this.options,form:this,validationLogic:this.options.validationLogic||nr});this.state.isFormValidating||this.baseStore.setState(u=>({...u,isFormValidating:!0}));const i=[];let s;for(const u of r){if(!u.validate)continue;const c=Xr(u.cause);this.state.validationMetaMap[c]?.lastAbortController.abort();const f=new AbortController;this.state.validationMetaMap[c]={lastAbortController:f},i.push(new Promise(async p=>{let m;try{m=await new Promise((b,x)=>{setTimeout(async()=>{if(f.signal.aborted)return b(void 0);try{b(await this.runValidator({validate:u.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:f.signal},type:"validateAsync"}))}catch(w){x(w)}},u.debounceMs)})}catch(b){m=b}const{formError:g,fieldErrors:y}=Xs(m);y&&(s=s?{...s,...y}:y);const v=Xr(u.cause);for(const b of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[b]===void 0)continue;const x=this.getFieldMeta(b);if(!x)continue;const{errorMap:w,errorSourceMap:$}=x,S=s?.[b],{newErrorValue:E,newSource:A}=vm({newFormValidatorError:S,isPreviousErrorFromFormValidator:$?.[v]==="form",previousErrorValue:w?.[v]});w?.[v]!==E&&this.setFieldMeta(b,B=>({...B,errorMap:{...B.errorMap,[v]:E},errorSourceMap:{...B.errorSourceMap,[v]:A}}))}this.baseStore.setState(b=>({...b,errorMap:{...b.errorMap,[v]:g}})),p(s?{fieldErrors:s,errorMapKey:v}:void 0)}))}let o=[];const l={};if(i.length){o=await Promise.all(i);for(const u of o)if(u?.fieldErrors){const{errorMapKey:c}=u;for(const[d,f]of Object.entries(u.fieldErrors)){const m={...l[d]||{},[c]:f};l[d]=m}}}return this.baseStore.setState(u=>({...u,isFormValidating:!1})),l},this.validate=a=>{const{hasErrored:r,fieldsErrorMap:i}=this.validateSync(a);return r&&!this.options.asyncAlways?i:this.validateAsync(a)},this.getFieldValue=a=>ii(this.state.values,a),this.getFieldMeta=a=>this.state.fieldMeta[a],this.getFieldInfo=a=>this.fieldInfo[a]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(a,r)=>{this.baseStore.setState(i=>({...i,fieldMetaBase:{...i.fieldMetaBase,[a]:Gy(r,i.fieldMetaBase[a])}}))},this.resetFieldMeta=a=>Object.keys(a).reduce((r,i)=>{const s=i;return r[s]=Do,r},{}),this.setFieldValue=(a,r,i)=>{const s=i?.dontUpdateMeta??!1,o=i?.dontRunListeners??!1,l=i?.dontValidate??!1;on(()=>{s||this.setFieldMeta(a,u=>({...u,isTouched:!0,isDirty:!0,errorMap:{...u?.errorMap,onMount:void 0}})),this.baseStore.setState(u=>({...u,values:Ms(u.values,a,r)}))}),o||this.getFieldInfo(a).instance?.triggerOnChangeListener(),l||this.validateField(a,"change")},this.deleteField=a=>{const i=[...Object.keys(this.fieldInfo).filter(s=>{const o=a.toString();return s!==o&&s.startsWith(o)}),a];this.baseStore.setState(s=>{const o={...s};return i.forEach(l=>{o.values=wV(o.values,l),delete this.fieldInfo[l],delete o.fieldMetaBase[l]}),o})},this.pushFieldValue=(a,r,i)=>{this.setFieldValue(a,s=>[...Array.isArray(s)?s:[],r],i)},this.insertFieldValue=async(a,r,i,s)=>{this.setFieldValue(a,l=>[...l.slice(0,r),i,...l.slice(r)],wt(s,{dontValidate:!0}));const o=s?.dontValidate??!1;o||await this.validateField(a,"change"),Os(this).handleArrayFieldMetaShift(a,r,"insert"),o||await this.validateArrayFieldsStartingFrom(a,r,"change")},this.replaceFieldValue=async(a,r,i,s)=>{this.setFieldValue(a,l=>l.map((u,c)=>c===r?i:u),wt(s,{dontValidate:!0})),(s?.dontValidate??!1)||(await this.validateField(a,"change"),await this.validateArrayFieldsStartingFrom(a,r,"change"))},this.removeFieldValue=async(a,r,i)=>{const s=this.getFieldValue(a),o=Array.isArray(s)?Math.max(s.length-1,0):null;if(this.setFieldValue(a,u=>u.filter((c,d)=>d!==r),wt(i,{dontValidate:!0})),Os(this).handleArrayFieldMetaShift(a,r,"remove"),o!==null){const u=`${a}[${o}]`;this.deleteField(u)}(i?.dontValidate??!1)||(await this.validateField(a,"change"),await this.validateArrayFieldsStartingFrom(a,r,"change"))},this.swapFieldValues=(a,r,i,s)=>{this.setFieldValue(a,l=>{const u=l[r],c=l[i];return Ms(Ms(l,`${r}`,c),`${i}`,u)},wt(s,{dontValidate:!0})),Os(this).handleArrayFieldMetaShift(a,r,"swap",i),(s?.dontValidate??!1)||(this.validateField(a,"change"),this.validateField(`${a}[${r}]`,"change"),this.validateField(`${a}[${i}]`,"change"))},this.moveFieldValues=(a,r,i,s)=>{this.setFieldValue(a,l=>{const u=[...l];return u.splice(i,0,u.splice(r,1)[0]),u},wt(s,{dontValidate:!0})),Os(this).handleArrayFieldMetaShift(a,r,"move",i),(s?.dontValidate??!1)||(this.validateField(a,"change"),this.validateField(`${a}[${r}]`,"change"),this.validateField(`${a}[${i}]`,"change"))},this.clearFieldValues=(a,r)=>{const i=this.getFieldValue(a),s=Array.isArray(i)?Math.max(i.length-1,0):null;if(this.setFieldValue(a,[],wt(r,{dontValidate:!0})),s!==null)for(let l=0;l<=s;l++){const u=`${a}[${l}]`;this.deleteField(u)}(r?.dontValidate??!1)||this.validateField(a,"change")},this.resetField=a=>{this.baseStore.setState(r=>({...r,fieldMetaBase:{...r.fieldMetaBase,[a]:Do},values:this.options.defaultValues?Ms(r.values,a,ii(this.options.defaultValues,a)):r.values}))},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((a,[r,i])=>(Object.keys(i).length&&i.errors.length&&(a[r]={errors:i.errors,errorMap:i.errorMap}),a),{})}),this.parseValuesWithSchema=a=>cr.validate({value:this.state.values,validationSource:"form"},a),this.parseValuesWithSchemaAsync=a=>cr.validateAsync({value:this.state.values,validationSource:"form"},a),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??DV(),this._devtoolsSubmissionOverride=!1,this.baseStore=new Mo(au({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values})),this.fieldMetaDerived=new In({deps:[this.baseStore],fn:({prevDepVals:a,currDepVals:r,prevVal:i})=>{const s=i,o=a?.[0],l=r[0];let u=0;const c={};for(const d of Object.keys(l.fieldMetaBase)){const f=l.fieldMetaBase[d],p=o?.fieldMetaBase[d],m=s?.[d],g=ii(l.values,d);let y=m?.errors;if(!p||f.errorMap!==p.errorMap){y=Object.values(f.errorMap??{}).filter($=>$!==void 0);const w=this.getFieldInfo(d)?.instance;w&&!w.options.disableErrorFlat&&(y=y?.flat(1))}const v=!MV(y??[]),b=!f.isDirty,x=tr(g,ii(this.options.defaultValues,d))||tr(g,this.getFieldInfo(d)?.instance?.options.defaultValue);if(m&&m.isPristine===b&&m.isValid===v&&m.isDefaultValue===x&&m.errors===y&&f===p){c[d]=m,u++;continue}c[d]={...f,errors:y,isPristine:b,isValid:v,isDefaultValue:x}}return Object.keys(l.fieldMetaBase).length&&s&&u===Object.keys(l.fieldMetaBase).length?s:c}}),this.store=new In({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:a,currDepVals:r,prevVal:i})=>{const s=i,o=a?.[0],l=r[0],u=r[1],c=Object.values(u).filter(Boolean),d=c.some(N=>N.isValidating),f=c.every(N=>N.isValid),p=c.some(N=>N.isTouched),m=c.some(N=>N.isBlurred),g=c.every(N=>N.isDefaultValue),y=p&&l.errorMap?.onMount,v=c.some(N=>N.isDirty),b=!v,x=!!(l.errorMap?.onMount||c.some(N=>N?.errorMap?.onMount)),w=!!d;let $=s?.errors??[];(!o||l.errorMap!==o.errorMap)&&($=Object.values(l.errorMap).reduce((N,q)=>q===void 0?N:q&&oc(q)?(N.push(q.form),N):(N.push(q),N),[]));const S=$.length===0,E=f&&S,A=this.options.canSubmitWhenInvalid??!1,B=l.submissionAttempts===0&&!p&&!x||!w&&!l.isSubmitting&&E||A;let z=l.errorMap;if(y&&($=$.filter(N=>N!==l.errorMap.onMount),z=Object.assign(z,{onMount:void 0})),s&&o&&s.errorMap===z&&s.fieldMeta===this.fieldMetaDerived.state&&s.errors===$&&s.isFieldsValidating===d&&s.isFieldsValid===f&&s.isFormValid===S&&s.isValid===E&&s.canSubmit===B&&s.isTouched===p&&s.isBlurred===m&&s.isPristine===b&&s.isDefaultValue===g&&s.isDirty===v&&tr(o,l))return s;let W={...l,errorMap:z,fieldMeta:this.fieldMetaDerived.state,errors:$,isFieldsValidating:d,isFieldsValid:f,isFormValid:S,isValid:E,canSubmit:B,isTouched:p,isBlurred:m,isPristine:b,isDefaultValue:g,isDirty:v};const U=this.options.transform?.deps??[];if(U.length!==this.prevTransformArray.length||U.some((N,q)=>N!==this.prevTransformArray[q])){const N=Object.assign({},this,{state:W});this.options.transform?.fn(N),W=N.state,this.prevTransformArray=U}return W}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{});const n=xV(a=>qt.emit("form-state",{id:this._formId,state:a}),{wait:300});this.store.subscribe(()=>{n(this.store.state)}),qt.on("request-form-state",a=>{a.payload.id===this._formId&&qt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),qt.on("request-form-reset",a=>{a.payload.id===this._formId&&this.reset()}),qt.on("request-form-force-submit",a=>{a.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return Zy(e.validate)?cr[e.type](e.value,e.validate):e.validate(e.value)}async handleSubmit(e){this.baseStore.setState(r=>({...r,isSubmitted:!1,submissionAttempts:r.submissionAttempts+1,isSubmitSuccessful:!1})),on(()=>{Object.values(this.fieldInfo).forEach(r=>{r.instance&&(r.instance.state.meta.isTouched||r.instance.setMeta(i=>({...i,isTouched:!0})))})});const n=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n});return}this.baseStore.setState(r=>({...r,isSubmitting:!0}));const a=()=>{this.baseStore.setState(r=>({...r,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){a(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),qt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(r=>r.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){a(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),qt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}on(()=>{Object.values(this.fieldInfo).forEach(r=>{r.instance?.options.listeners?.onSubmit?.({value:r.instance.state.value,fieldApi:r.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:n});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:n}),on(()=>{this.baseStore.setState(r=>({...r,isSubmitted:!0,isSubmitSuccessful:!0})),qt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),a()})}catch(r){throw this.baseStore.setState(i=>({...i,isSubmitSuccessful:!1})),qt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:r}),a(),r}}setErrorMap(e){on(()=>{Object.entries(e).forEach(([n,a])=>{const r=n;if(oc(a)){const{formError:i,fieldErrors:s}=Xs(a);for(const o of Object.keys(this.fieldInfo))this.getFieldMeta(o)&&this.setFieldMeta(o,u=>({...u,errorMap:{...u.errorMap,[r]:s?.[o]},errorSourceMap:{...u.errorSourceMap,[r]:"form"}}));this.baseStore.setState(o=>({...o,errorMap:{...o.errorMap,[r]:i}}))}else this.baseStore.setState(i=>({...i,errorMap:{...i.errorMap,[r]:a}}))})})}}function Xs(t){if(t){if(oc(t)){const e=Xs(t.form).formError,n=t.fields;return{formError:e,fieldErrors:n}}return{formError:t}}return{formError:void 0}}function Xr(t){switch(t){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}class TV{constructor(e){this.options={},this.mount=()=>{const n=this.store.mount();this.options.defaultValue!==void 0&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const a=this.getInfo();a.instance=this,this.update(this.options);const{onMount:r}=this.options.validators||{};if(r){const i=this.runValidator({validate:r,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});i&&this.setMeta(s=>({...s,errorMap:{...s?.errorMap,onMount:i},errorSourceMap:{...s?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),n},this.update=n=>{this.options=n;const a=this.name!==n.name;if(this.name=n.name,this.state.value===void 0){const r=ii(n.form.options.defaultValues,n.name),i=n.defaultValue??r;a?this.setValue(s=>s||i,{dontUpdateMeta:!0}):i!==void 0&&this.setValue(i,{dontUpdateMeta:!0})}this.form.getFieldMeta(this.name)===void 0&&this.setMeta(this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,a)=>{this.form.setFieldValue(this.name,n,wt(a,{dontRunListeners:!0,dontValidate:!0})),a?.dontRunListeners||this.triggerOnChangeListener(),a?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,a)=>{this.form.pushFieldValue(this.name,n,wt(a,{dontRunListeners:!0})),a?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(n,a,r)=>{this.form.insertFieldValue(this.name,n,a,wt(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(n,a,r)=>{this.form.replaceFieldValue(this.name,n,a,wt(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(n,a)=>{this.form.removeFieldValue(this.name,n,wt(a,{dontRunListeners:!0})),a?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(n,a,r)=>{this.form.swapFieldValues(this.name,n,a,wt(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(n,a,r)=>{this.form.moveFieldValues(this.name,n,a,wt(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=n=>{this.form.clearFieldValues(this.name,wt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=n=>{const a=Object.values(this.form.fieldInfo),r=[];for(const i of a){if(!i.instance)continue;const{onChangeListenTo:s,onBlurListenTo:o}=i.instance.options.validators||{};n==="change"&&s?.includes(this.name)&&r.push(i.instance),n==="blur"&&o?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(n,a)=>{const r=ic(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||nr}),s=this.getLinkedFields(n).reduce((u,c)=>{const d=ic(n,{...c.options,form:c.form,validationLogic:c.form.options.validationLogic||nr});return d.forEach(f=>{f.field=c}),u.concat(d)},[]);let o=!1;on(()=>{const u=(c,d)=>{const f=Es(d.cause),p=d.validate?xm(c.runValidator({validate:d.validate,value:{value:c.store.state.value,validationSource:"field",fieldApi:c},type:"validate"})):void 0,m=a[f],{newErrorValue:g,newSource:y}=ym({formLevelError:m,fieldLevelError:p});c.state.meta.errorMap?.[f]!==g&&c.setMeta(v=>({...v,errorMap:{...v.errorMap,[f]:g},errorSourceMap:{...v.errorSourceMap,[f]:y}})),g&&(o=!0)};for(const c of r)u(this,c);for(const c of s)c.validate&&u(c.field,c)});const l=Es("submit");return this.state.meta.errorMap?.[l]&&n!=="submit"&&!o&&this.setMeta(u=>({...u,errorMap:{...u.errorMap,[l]:void 0},errorSourceMap:{...u.errorSourceMap,[l]:void 0}})),{hasErrored:o}},this.validateAsync=async(n,a)=>{const r=sc(n,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||nr}),i=await a,s=this.getLinkedFields(n),o=s.reduce((f,p)=>{const m=sc(n,{...p.options,form:p.form,validationLogic:p.form.options.validationLogic||nr});return m.forEach(g=>{g.field=p}),f.concat(m)},[]);this.state.meta.isValidating||this.setMeta(f=>({...f,isValidating:!0}));for(const f of s)f.setMeta(p=>({...p,isValidating:!0}));const l=[],u=[],c=(f,p,m)=>{const g=Es(p.cause);f.getInfo().validationMetaMap[g]?.lastAbortController.abort();const v=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:v},m.push(new Promise(async b=>{let x;try{x=await new Promise((A,B)=>{this.timeoutIds.validations[p.cause]&&clearTimeout(this.timeoutIds.validations[p.cause]),this.timeoutIds.validations[p.cause]=setTimeout(async()=>{if(v.signal.aborted)return A(void 0);try{A(await this.runValidator({validate:p.validate,value:{value:f.store.state.value,fieldApi:f,signal:v.signal,validationSource:"field"},type:"validateAsync"}))}catch(z){B(z)}},p.debounceMs)})}catch(A){x=A}if(v.signal.aborted)return b(void 0);const w=xm(x),$=i[this.name]?.[g],{newErrorValue:S,newSource:E}=ym({formLevelError:$,fieldLevelError:w});f.setMeta(A=>({...A,errorMap:{...A?.errorMap,[g]:S},errorSourceMap:{...A.errorSourceMap,[g]:E}})),b(S)}))};for(const f of r)f.validate&&c(this,f,l);for(const f of o)f.validate&&c(f.field,f,u);let d=[];(l.length||u.length)&&(d=await Promise.all(l),await Promise.all(u)),this.setMeta(f=>({...f,isValidating:!1}));for(const f of s)f.setMeta(p=>({...p,isValidating:!1}));return d.filter(Boolean)},this.validate=(n,a)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:r}=a?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(n),{hasErrored:i}=this.validateSync(n,r[this.name]??{});if(i&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Es(n)]?.lastAbortController.abort(),this.state.meta.errors;const s=a?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(n);return this.validateAsync(n,s)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(a=>({...a,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(a=>({...a,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.parseValueWithSchema=n=>cr.validate({value:this.state.value,validationSource:"field"},n),this.parseValueWithSchemaAsync=n=>cr.validateAsync({value:this.state.value,validationSource:"field"},n),this.form=e.form,this.name=e.name,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new In({deps:[this.form.store],fn:()=>{const n=this.form.getFieldValue(this.name),a=this.form.getFieldMeta(this.name)??{...Do,...e.defaultMeta};return{value:n,meta:a}}}),this.options=e}get state(){return this.store.state}runValidator(e){return Zy(e.validate)?cr[e.type](e.value,e.validate):e.validate(e.value)}setErrorMap(e){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...e}}))}triggerOnBlurListener(){const e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onBlurDebounceMs;n&&n>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}triggerOnChangeListener(){const e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onChangeDebounceMs;n&&n>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})}}function xm(t){if(t)return t}function Es(t){switch(t){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}function lc(t,e=n=>n){const n=V(e(t.state));return de(()=>t,(a,r,i)=>{const s=a.subscribe(()=>{const o=e(a.state);PV(Pm(n.value),o)||(n.value=o)});i(()=>{s()})},{immediate:!0}),Ai(n)}function PV(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[a,r]of t)if(!e.has(a)||!Object.is(r,e.get(a)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const a of t)if(!e.has(a))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(e,n[a])||!Object.is(t[n[a]],e[n[a]]))return!1;return!0}function Jy(t){const e=(()=>{const i=new TV({...t,form:t.form,name:t.name});return i.Field=Xy,i})(),n=lc(e.store,r=>r);let a;return Ie(()=>{a=e.mount()}),pn(()=>{a()}),de(()=>t,()=>{e.update({...t,form:t.form})}),{api:e,state:n}}const Xy=P((t,e)=>{const n=Jy({...t,...e.attrs});return()=>e.slots.default({field:n.api,state:n.state.value})},{name:"Field",inheritAttrs:!1});function IV(t){const e=(()=>{const n=new EV(t),a=n;return a.Field=P((r,i)=>()=>Ke(Xy,{...r,...i.attrs,form:n},i.slots),{name:"APIField",inheritAttrs:!1}),a.useField=r=>Jy({...r,form:n}),a.useStore=r=>lc(n.store,r),a.Subscribe=P((r,i)=>{const o={...r,...i.attrs}.selector??(u=>u),l=lc(n.store,o);return()=>i.slots.default(l.value)},{name:"Subscribe",inheritAttrs:!1}),a})();return Ie(e.mount),e.update(t),e}const LV=P({__name:"DynamicFormWrapper",props:{configMap:{},baseKey:{},currentStep:{}},setup(t,{expose:e}){const n=t,a=IV({defaultValues:Zo(n.configMap)}),r=vc("formRef");Di(mt,a);async function i(){const s=await r.value.validate();return n.currentStep?gd(s,[...n.currentStep.properties,"credential_guid_body","credential_property_id"]):s}return e({validate:i,form:a}),(s,o)=>{const l=Wy;return _(),D(l,re({ref:"formRef"},n),null,16)}}}),qV=Object.assign(LV,{__name:"DynamicFormWrapper"}),Jt=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),wm=t=>t.length>4&&t.startsWith("{{")&&t.endsWith("}}"),VV=t=>{if(typeof t!="string")return t;const e=t.trim();if(!e||!e.startsWith("{")&&!e.startsWith("["))return t;try{return JSON.parse(e)}catch{return t}},FV=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,VV(n)])),BV=t=>typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?String(t):JSON.stringify(t),uc=(t,e)=>{if(typeof t=="string"){let n=t;for(const[a,r]of Object.entries(e)){const i=`{{${a}}}`;if(n===i)return r;n.includes(i)&&(n=n.replaceAll(i,BV(r)))}return n}return Array.isArray(t)?t.map(n=>uc(n,e)):Jt(t)?Object.fromEntries(Object.entries(t).map(([n,a])=>[n,uc(a,e)])):t},cc=t=>Array.isArray(t)?t.map(cc).filter(e=>!(typeof e=="string"&&wm(e))):Jt(t)?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,cc(n)]).filter(([,e])=>!(typeof e=="string"&&wm(e)))):t,RV=t=>!Jt(t)||!Jt(t.dag)?null:t.dag,dc=t=>!Jt(t)||!Jt(t.inputs)?null:t.inputs,NV=t=>{const e=Object.values(t),n=e.find(a=>{const r=dc(a);return r&&Jt(r.args)&&r.workflow_type!=="PublishWorkflow"})??e.find(a=>{const r=dc(a);return r&&Jt(r.args)});return Jt(n)?n:null};function jV(t,e){const n=RV(t);if(!n)return null;const a=NV(n),r=dc(a);if(!r||!Jt(r.args))return null;const i=FV(e),s=uc(r.args,i),o=cc(s);return Jt(o)?o:null}async function zV(){const t=Bm(),{data:e}=await Ia("configmaps",()=>$fetch("/workflows/v1/configmaps")),n=k(()=>t.query.entrypoint),{data:a}=await Ia("workflow_manifest",()=>$fetch("/workflows/v1/manifest",{query:n.value?{entrypoint:n.value}:void 0}),{watch:[n]}),r=k(()=>{const l=e.value?.data??[];return(Array.isArray(l)?l:l.configmaps).find(c=>!c.startsWith("atlan-connectors-")&&!c.startsWith("csa-connectors-")&&c!=="manifest")??"workflow"}),{credentialConfig:i,data:s}=await ty(r),o=k(()=>{const l=s.value?.data,u=l&&"kind"in l?l.metadata?.name:void 0,c=l&&"kind"in l?l.metadata?.name:l?.name,d=l&&"kind"in l?l.metadata?.logo:l?.logo;return{id:u||r.value,name:i.value?.name||c||r.value,logo:i.value?.logo||d||"",config:i.value}});return{workflowConfig:i,workflowMeta:o,workflowManifest:a}}const WV={class:"min-h-screen bg-gray-50 py-8 flex flex-col"},HV={class:"w-[700px] mx-auto px-4 flex flex-col flex-1"},UV={class:"flex items-center justify-between mb-8"},YV={class:"flex items-center gap-4"},KV=["src"],GV={class:"mb-8 overflow-x-auto pb-3"},ZV={class:"bg-white rounded-lg shadow-sm p-8 flex gap-8 grow"},JV={class:"flex-1 w-full"},XV={class:"flex justify-between py-3 border-t"},QV={key:2,class:"flex ml-auto gap-x-2"},eF={key:3,class:"flex ml-auto gap-x-2"},_F=P({__name:"index",async setup(t){let e,n;const{workflowConfig:a,workflowMeta:r,workflowManifest:i}=([e,n]=Va(()=>zV()),e=await e,n(),e),s=Bm();X0(()=>({title:r.value.name?`${r.value.name} | App Playground`:"App Playground"}));const o=V(1),l=k(()=>a.value.steps||[]),u=k(()=>l.value?l.value[o.value-1]:{}),c=k(()=>l.value.map(b=>({...b,value:b.id}))),d=V(!1),f=V({}),p=V(""),m=V(!1),g=vc("formRef");async function y(){let b=$P(await g.value.validate(),U=>bo(U)||yo(U)?JSON.stringify(U):U);const x=b.credential_guid_body,w=b.credential_property_id;b=Jv(b,["credential_guid_body","credential_property_id",w]),f.value={...f.value,[u.value.id]:b};let $;x&&($={...JSON.parse(x),credentialSource:"direct"});const S=Object.assign({},...Object.values(f.value)),E=S.connection,B=E?.typeName==="Connection"&&!!E.attributes?.qualifiedName?E:{typeName:"Connection",attributes:{qualifiedName:`default/${r.value.id}/${Math.round(Date.now()/1e3)}`,name:E?.name||S.name||"test-connection"}},z={...S,connection:B},W=jV(i.value,z);return{credentialBody:$,startPayload:W??z}}Di(Zv,y);async function v(){d.value=!0,p.value="";try{const{credentialBody:b,startPayload:x}=await y();if(o.value===l.value.length){try{let w,$;if(b)try{const{data:E}=await $fetch("/workflows/v1/dev/local-vault",{method:"POST",body:b});w=E.credential_guid}catch(E){const A=E?.status??E?.statusCode;if(A!==404&&A!==405)throw E;$=b}const S=s.query.entrypoint;await $fetch("/workflows/v1/start",{method:"POST",body:{...x,...S?{entrypoint:S}:{},...w?{credential_guid:w}:{},...$?{credentials:$}:{}}}),o.value=1,f.value={},g.value.form.reset(),lr.success("Workflow started successfully!",{placement:"top",duration:3e3})}catch{lr.failed("Failed to start workflow. Please try again.",{placement:"top",duration:3e3})}return}o.value=o.value+1}catch(b){lr.failed("Failed to validate form: "+b.message,{placement:"top"})}finally{d.value=!1}}return(b,x)=>{const w=qV;return _(),O("div",WV,[T("div",HV,[T("div",UV,[T("div",YV,[T("img",{src:h(r).logo,alt:"App Logo",class:"w-16 h-16"},null,8,KV),R(h(HC),{as:"h1",size:"xl"},{default:C(()=>[xe(Q(h(r).name)+" App ",1)]),_:1})])]),T("div",GV,[R(h(lO),{items:h(c),"model-value":h(o),orientation:"horizontal",type:"default",onStepChange:x[0]||(x[0]=$=>o.value=$)},null,8,["items","model-value"])]),T("div",ZV,[T("div",JV,[R(w,{ref:"formRef","current-step":h(u),"config-map":h(a)},null,8,["current-step","config-map"])])]),T("div",XV,[h(o)>0?(_(),D(h(_t),{key:0,type:"subtle",label:"Back",onClick:x[1]||(x[1]=()=>{o.value=h(o)-1})})):H("",!0),h(o)<h(l).length?(_(),D(h(_t),{key:1,label:"Next",class:"ml-auto","is-loading":h(d),onClick:v},null,8,["is-loading"])):h(o)===h(l).length&&!h(m)?(_(),O("div",QV,[h(p)?(_(),D(h(_t),{key:1,label:"Retry",type:"subtle","is-loading":h(d),onClick:v},null,8,["is-loading"])):(_(),D(h(_t),{key:0,label:"Start Workflow","is-loading":h(d),onClick:v},null,8,["is-loading"]))])):h(m)?(_(),O("div",eF,[R(h(_t),{label:"Workflow Started!",type:"success",disabled:!0})])):H("",!0)])])])}}});export{_F as default};
|