local-serverless-stack 0.0.8 → 0.0.10

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.
@@ -0,0 +1,28 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const r of n.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&a(r)}).observe(document,{childList:!0,subtree:!0});function l(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function a(s){if(s.ep)return;s.ep=!0;const n=l(s);fetch(s.href,n)}})();/**
2
+ * @vue/shared v3.5.34
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function Rs(e){const t=Object.create(null);for(const l of e.split(","))t[l]=1;return l=>l in t}const He={},El=[],Kt=()=>{},Br=()=>!1,za=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ra=e=>e.startsWith("onUpdate:"),qe=Object.assign,Hs=(e,t)=>{const l=e.indexOf(t);l>-1&&e.splice(l,1)},yo=Object.prototype.hasOwnProperty,Le=(e,t)=>yo.call(e,t),ke=Array.isArray,Il=e=>ga(e)==="[object Map]",Lr=e=>ga(e)==="[object Set]",vn=e=>ga(e)==="[object Date]",$e=e=>typeof e=="function",je=e=>typeof e=="string",Tt=e=>typeof e=="symbol",Me=e=>e!==null&&typeof e=="object",Or=e=>(Me(e)||$e(e))&&$e(e.then)&&$e(e.catch),Fr=Object.prototype.toString,ga=e=>Fr.call(e),_o=e=>ga(e).slice(8,-1),Nr=e=>ga(e)==="[object Object]",Ha=e=>je(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ea=Rs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ja=e=>{const t=Object.create(null);return(l=>t[l]||(t[l]=e(l)))},ko=/-\w/g,ht=ja(e=>e.replace(ko,t=>t.slice(1).toUpperCase())),wo=/\B([A-Z])/g,cl=ja(e=>e.replace(wo,"-$1").toLowerCase()),Ka=ja(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=ja(e=>e?`on${Ka(e)}`:""),Ht=(e,t)=>!Object.is(e,t),ns=(e,...t)=>{for(let l=0;l<e.length;l++)e[l](...t)},Pr=(e,t,l,a=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:a,value:l})},To=e=>{const t=parseFloat(e);return isNaN(t)?e:t},xo=e=>{const t=je(e)?Number(e):NaN;return isNaN(t)?e:t};let mn;const Ua=()=>mn||(mn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pe(e){if(ke(e)){const t={};for(let l=0;l<e.length;l++){const a=e[l],s=je(a)?Do(a):Pe(a);if(s)for(const n in s)t[n]=s[n]}return t}else if(je(e)||Me(e))return e}const $o=/;(?![^(]*\))/g,Co=/:([^]+)/,So=/\/\*[^]*?\*\//g;function Do(e){const t={};return e.replace(So,"").split($o).forEach(l=>{if(l){const a=l.split(Co);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function ce(e){let t="";if(je(e))t=e;else if(ke(e))for(let l=0;l<e.length;l++){const a=ce(e[l]);a&&(t+=a+" ")}else if(Me(e))for(const l in e)e[l]&&(t+=l+" ");return t.trim()}function ol(e){if(!e)return null;let{class:t,style:l}=e;return t&&!je(t)&&(e.class=ce(t)),l&&(e.style=Pe(l)),e}const Ao="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Eo=Rs(Ao);function zr(e){return!!e||e===""}function Io(e,t){if(e.length!==t.length)return!1;let l=!0;for(let a=0;l&&a<e.length;a++)l=js(e[a],t[a]);return l}function js(e,t){if(e===t)return!0;let l=vn(e),a=vn(t);if(l||a)return l&&a?e.getTime()===t.getTime():!1;if(l=Tt(e),a=Tt(t),l||a)return e===t;if(l=ke(e),a=ke(t),l||a)return l&&a?Io(e,t):!1;if(l=Me(e),a=Me(t),l||a){if(!l||!a)return!1;const s=Object.keys(e).length,n=Object.keys(t).length;if(s!==n)return!1;for(const r in e){const i=e.hasOwnProperty(r),o=t.hasOwnProperty(r);if(i&&!o||!i&&o||!js(e[r],t[r]))return!1}}return String(e)===String(t)}const Rr=e=>!!(e&&e.__v_isRef===!0),H=e=>je(e)?e:e==null?"":ke(e)||Me(e)&&(e.toString===Fr||!$e(e.toString))?Rr(e)?H(e.value):JSON.stringify(e,Hr,2):String(e),Hr=(e,t)=>Rr(t)?Hr(e,t.value):Il(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((l,[a,s],n)=>(l[rs(a,n)+" =>"]=s,l),{})}:Lr(t)?{[`Set(${t.size})`]:[...t.values()].map(l=>rs(l))}:Tt(t)?rs(t):Me(t)&&!ke(t)&&!Nr(t)?String(t):t,rs=(e,t="")=>{var l;return Tt(e)?`Symbol(${(l=e.description)!=null?l:t})`:e};/**
6
+ * @vue/reactivity v3.5.34
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let lt;class Vo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&lt&&(lt.active?(this.parent=lt,this.index=(lt.scopes||(lt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,l;if(this.scopes)for(t=0,l=this.scopes.length;t<l;t++)this.scopes[t].pause();for(t=0,l=this.effects.length;t<l;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,l;if(this.scopes)for(t=0,l=this.scopes.length;t<l;t++)this.scopes[t].resume();for(t=0,l=this.effects.length;t<l;t++)this.effects[t].resume()}}run(t){if(this._active){const l=lt;try{return lt=this,t()}finally{lt=l}}}on(){++this._on===1&&(this.prevScope=lt,lt=this)}off(){if(this._on>0&&--this._on===0){if(lt===this)lt=this.prevScope;else{let t=lt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let l,a;for(l=0,a=this.effects.length;l<a;l++)this.effects[l].stop();for(this.effects.length=0,l=0,a=this.cleanups.length;l<a;l++)this.cleanups[l]();if(this.cleanups.length=0,this.scopes){for(l=0,a=this.scopes.length;l<a;l++)this.scopes[l].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Mo(){return lt}let Re;const is=new WeakSet;class jr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,lt&&(lt.active?lt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,is.has(this)&&(is.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ur(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hn(this),Wr(this);const t=Re,l=It;Re=this,It=!0;try{return this.fn()}finally{Gr(this),Re=t,It=l,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ws(t);this.deps=this.depsTail=void 0,hn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?is.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){gs(this)&&this.run()}get dirty(){return gs(this)}}let Kr=0,ta,la;function Ur(e,t=!1){if(e.flags|=8,t){e.next=la,la=e;return}e.next=ta,ta=e}function Ks(){Kr++}function Us(){if(--Kr>0)return;if(la){let t=la;for(la=void 0;t;){const l=t.next;t.next=void 0,t.flags&=-9,t=l}}let e;for(;ta;){let t=ta;for(ta=void 0;t;){const l=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(a){e||(e=a)}t=l}}if(e)throw e}function Wr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Gr(e){let t,l=e.depsTail,a=l;for(;a;){const s=a.prevDep;a.version===-1?(a===l&&(l=s),Ws(a),Bo(a)):t=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=s}e.deps=t,e.depsTail=l}function gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ia)||(e.globalVersion=ia,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!gs(e))))return;e.flags|=2;const t=e.dep,l=Re,a=It;Re=e,It=!0;try{Wr(e);const s=e.fn(e._value);(t.version===0||Ht(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Re=l,It=a,Gr(e),e.flags&=-3}}function Ws(e,t=!1){const{dep:l,prevSub:a,nextSub:s}=e;if(a&&(a.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=a,e.nextSub=void 0),l.subs===e&&(l.subs=a,!a&&l.computed)){l.computed.flags&=-5;for(let n=l.computed.deps;n;n=n.nextDep)Ws(n,!0)}!t&&!--l.sc&&l.map&&l.map.delete(l.key)}function Bo(e){const{prevDep:t,nextDep:l}=e;t&&(t.nextDep=l,e.prevDep=void 0),l&&(l.prevDep=t,e.nextDep=void 0)}let It=!0;const Qr=[];function Jt(){Qr.push(It),It=!1}function Xt(){const e=Qr.pop();It=e===void 0?!0:e}function hn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const l=Re;Re=void 0;try{t()}finally{Re=l}}}let ia=0;class Lo{constructor(t,l){this.sub=t,this.dep=l,this.version=l.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Gs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Re||!It||Re===this.computed)return;let l=this.activeLink;if(l===void 0||l.sub!==Re)l=this.activeLink=new Lo(Re,this),Re.deps?(l.prevDep=Re.depsTail,Re.depsTail.nextDep=l,Re.depsTail=l):Re.deps=Re.depsTail=l,Yr(l);else if(l.version===-1&&(l.version=this.version,l.nextDep)){const a=l.nextDep;a.prevDep=l.prevDep,l.prevDep&&(l.prevDep.nextDep=a),l.prevDep=Re.depsTail,l.nextDep=void 0,Re.depsTail.nextDep=l,Re.depsTail=l,Re.deps===l&&(Re.deps=a)}return l}trigger(t){this.version++,ia++,this.notify(t)}notify(t){Ks();try{for(let l=this.subs;l;l=l.prevSub)l.sub.notify()&&l.sub.dep.notify()}finally{Us()}}}function Yr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let a=t.deps;a;a=a.nextDep)Yr(a)}const l=e.dep.subs;l!==e&&(e.prevSub=l,l&&(l.nextSub=e)),e.dep.subs=e}}const Da=new WeakMap,_l=Symbol(""),ys=Symbol(""),oa=Symbol("");function nt(e,t,l){if(It&&Re){let a=Da.get(e);a||Da.set(e,a=new Map);let s=a.get(l);s||(a.set(l,s=new Gs),s.map=a,s.key=l),s.track()}}function Yt(e,t,l,a,s,n){const r=Da.get(e);if(!r){ia++;return}const i=o=>{o&&o.trigger()};if(Ks(),t==="clear")r.forEach(i);else{const o=ke(e),d=o&&Ha(l);if(o&&l==="length"){const u=Number(a);r.forEach((c,p)=>{(p==="length"||p===oa||!Tt(p)&&p>=u)&&i(c)})}else switch((l!==void 0||r.has(void 0))&&i(r.get(l)),d&&i(r.get(oa)),t){case"add":o?d&&i(r.get("length")):(i(r.get(_l)),Il(e)&&i(r.get(ys)));break;case"delete":o||(i(r.get(_l)),Il(e)&&i(r.get(ys)));break;case"set":Il(e)&&i(r.get(_l));break}}Us()}function Oo(e,t){const l=Da.get(e);return l&&l.get(t)}function Cl(e){const t=Ve(e);return t===e?t:(nt(t,"iterate",oa),wt(e)?t:t.map(Mt))}function Wa(e){return nt(e=Ve(e),"iterate",oa),e}function zt(e,t){return Zt(e)?Pl(kl(e)?Mt(t):t):Mt(t)}const Fo={__proto__:null,[Symbol.iterator](){return os(this,Symbol.iterator,e=>zt(this,e))},concat(...e){return Cl(this).concat(...e.map(t=>ke(t)?Cl(t):t))},entries(){return os(this,"entries",e=>(e[1]=zt(this,e[1]),e))},every(e,t){return Gt(this,"every",e,t,void 0,arguments)},filter(e,t){return Gt(this,"filter",e,t,l=>l.map(a=>zt(this,a)),arguments)},find(e,t){return Gt(this,"find",e,t,l=>zt(this,l),arguments)},findIndex(e,t){return Gt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gt(this,"findLast",e,t,l=>zt(this,l),arguments)},findLastIndex(e,t){return Gt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gt(this,"forEach",e,t,void 0,arguments)},includes(...e){return us(this,"includes",e)},indexOf(...e){return us(this,"indexOf",e)},join(e){return Cl(this).join(e)},lastIndexOf(...e){return us(this,"lastIndexOf",e)},map(e,t){return Gt(this,"map",e,t,void 0,arguments)},pop(){return Gl(this,"pop")},push(...e){return Gl(this,"push",e)},reduce(e,...t){return bn(this,"reduce",e,t)},reduceRight(e,...t){return bn(this,"reduceRight",e,t)},shift(){return Gl(this,"shift")},some(e,t){return Gt(this,"some",e,t,void 0,arguments)},splice(...e){return Gl(this,"splice",e)},toReversed(){return Cl(this).toReversed()},toSorted(e){return Cl(this).toSorted(e)},toSpliced(...e){return Cl(this).toSpliced(...e)},unshift(...e){return Gl(this,"unshift",e)},values(){return os(this,"values",e=>zt(this,e))}};function os(e,t,l){const a=Wa(e),s=a[t]();return a!==e&&!wt(e)&&(s._next=s.next,s.next=()=>{const n=s._next();return n.done||(n.value=l(n.value)),n}),s}const No=Array.prototype;function Gt(e,t,l,a,s,n){const r=Wa(e),i=r!==e&&!wt(e),o=r[t];if(o!==No[t]){const c=o.apply(e,n);return i?Mt(c):c}let d=l;r!==e&&(i?d=function(c,p){return l.call(this,zt(e,c),p,e)}:l.length>2&&(d=function(c,p){return l.call(this,c,p,e)}));const u=o.call(r,d,a);return i&&s?s(u):u}function bn(e,t,l,a){const s=Wa(e),n=s!==e&&!wt(e);let r=l,i=!1;s!==e&&(n?(i=a.length===0,r=function(d,u,c){return i&&(i=!1,d=zt(e,d)),l.call(this,d,zt(e,u),c,e)}):l.length>3&&(r=function(d,u,c){return l.call(this,d,u,c,e)}));const o=s[t](r,...a);return i?zt(e,o):o}function us(e,t,l){const a=Ve(e);nt(a,"iterate",oa);const s=a[t](...l);return(s===-1||s===!1)&&Ga(l[0])?(l[0]=Ve(l[0]),a[t](...l)):s}function Gl(e,t,l=[]){Jt(),Ks();const a=Ve(e)[t].apply(e,l);return Us(),Xt(),a}const Po=Rs("__proto__,__v_isRef,__isVue"),Jr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Tt));function zo(e){Tt(e)||(e=String(e));const t=Ve(this);return nt(t,"has",e),t.hasOwnProperty(e)}class Xr{constructor(t=!1,l=!1){this._isReadonly=t,this._isShallow=l}get(t,l,a){if(l==="__v_skip")return t.__v_skip;const s=this._isReadonly,n=this._isShallow;if(l==="__v_isReactive")return!s;if(l==="__v_isReadonly")return s;if(l==="__v_isShallow")return n;if(l==="__v_raw")return a===(s?n?Yo:li:n?ti:ei).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(a)?t:void 0;const r=ke(t);if(!s){let o;if(r&&(o=Fo[l]))return o;if(l==="hasOwnProperty")return zo}const i=Reflect.get(t,l,Je(t)?t:a);if((Tt(l)?Jr.has(l):Po(l))||(s||nt(t,"get",l),n))return i;if(Je(i)){const o=r&&Ha(l)?i:i.value;return s&&Me(o)?Aa(o):o}return Me(i)?s?Aa(i):Nl(i):i}}class Zr extends Xr{constructor(t=!1){super(!1,t)}set(t,l,a,s){let n=t[l];const r=ke(t)&&Ha(l);if(!this._isShallow){const d=Zt(n);if(!wt(a)&&!Zt(a)&&(n=Ve(n),a=Ve(a)),!r&&Je(n)&&!Je(a))return d||(n.value=a),!0}const i=r?Number(l)<t.length:Le(t,l),o=Reflect.set(t,l,a,Je(t)?t:s);return t===Ve(s)&&(i?Ht(a,n)&&Yt(t,"set",l,a):Yt(t,"add",l,a)),o}deleteProperty(t,l){const a=Le(t,l);t[l];const s=Reflect.deleteProperty(t,l);return s&&a&&Yt(t,"delete",l,void 0),s}has(t,l){const a=Reflect.has(t,l);return(!Tt(l)||!Jr.has(l))&&nt(t,"has",l),a}ownKeys(t){return nt(t,"iterate",ke(t)?"length":_l),Reflect.ownKeys(t)}}class Ro extends Xr{constructor(t=!1){super(!0,t)}set(t,l){return!0}deleteProperty(t,l){return!0}}const Ho=new Zr,jo=new Ro,Ko=new Zr(!0);const _s=e=>e,ka=e=>Reflect.getPrototypeOf(e);function Uo(e,t,l){return function(...a){const s=this.__v_raw,n=Ve(s),r=Il(n),i=e==="entries"||e===Symbol.iterator&&r,o=e==="keys"&&r,d=s[e](...a),u=l?_s:t?Pl:Mt;return!t&&nt(n,"iterate",o?ys:_l),qe(Object.create(d),{next(){const{value:c,done:p}=d.next();return p?{value:c,done:p}:{value:i?[u(c[0]),u(c[1])]:u(c),done:p}}})}}function wa(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wo(e,t){const l={get(s){const n=this.__v_raw,r=Ve(n),i=Ve(s);e||(Ht(s,i)&&nt(r,"get",s),nt(r,"get",i));const{has:o}=ka(r),d=t?_s:e?Pl:Mt;if(o.call(r,s))return d(n.get(s));if(o.call(r,i))return d(n.get(i));n!==r&&n.get(s)},get size(){const s=this.__v_raw;return!e&&nt(Ve(s),"iterate",_l),s.size},has(s){const n=this.__v_raw,r=Ve(n),i=Ve(s);return e||(Ht(s,i)&&nt(r,"has",s),nt(r,"has",i)),s===i?n.has(s):n.has(s)||n.has(i)},forEach(s,n){const r=this,i=r.__v_raw,o=Ve(i),d=t?_s:e?Pl:Mt;return!e&&nt(o,"iterate",_l),i.forEach((u,c)=>s.call(n,d(u),d(c),r))}};return qe(l,e?{add:wa("add"),set:wa("set"),delete:wa("delete"),clear:wa("clear")}:{add(s){const n=Ve(this),r=ka(n),i=Ve(s),o=!t&&!wt(s)&&!Zt(s)?i:s;return r.has.call(n,o)||Ht(s,o)&&r.has.call(n,s)||Ht(i,o)&&r.has.call(n,i)||(n.add(o),Yt(n,"add",o,o)),this},set(s,n){!t&&!wt(n)&&!Zt(n)&&(n=Ve(n));const r=Ve(this),{has:i,get:o}=ka(r);let d=i.call(r,s);d||(s=Ve(s),d=i.call(r,s));const u=o.call(r,s);return r.set(s,n),d?Ht(n,u)&&Yt(r,"set",s,n):Yt(r,"add",s,n),this},delete(s){const n=Ve(this),{has:r,get:i}=ka(n);let o=r.call(n,s);o||(s=Ve(s),o=r.call(n,s)),i&&i.call(n,s);const d=n.delete(s);return o&&Yt(n,"delete",s,void 0),d},clear(){const s=Ve(this),n=s.size!==0,r=s.clear();return n&&Yt(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{l[s]=Uo(s,e,t)}),l}function qs(e,t){const l=Wo(e,t);return(a,s,n)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?a:Reflect.get(Le(l,s)&&s in a?l:a,s,n)}const Go={get:qs(!1,!1)},qo={get:qs(!1,!0)},Qo={get:qs(!0,!1)};const ei=new WeakMap,ti=new WeakMap,li=new WeakMap,Yo=new WeakMap;function Jo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xo(e){return e.__v_skip||!Object.isExtensible(e)?0:Jo(_o(e))}function Nl(e){return Zt(e)?e:Qs(e,!1,Ho,Go,ei)}function Zo(e){return Qs(e,!1,Ko,qo,ti)}function Aa(e){return Qs(e,!0,jo,Qo,li)}function Qs(e,t,l,a,s){if(!Me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const n=Xo(e);if(n===0)return e;const r=s.get(e);if(r)return r;const i=new Proxy(e,n===2?a:l);return s.set(e,i),i}function kl(e){return Zt(e)?kl(e.__v_raw):!!(e&&e.__v_isReactive)}function Zt(e){return!!(e&&e.__v_isReadonly)}function wt(e){return!!(e&&e.__v_isShallow)}function Ga(e){return e?!!e.__v_raw:!1}function Ve(e){const t=e&&e.__v_raw;return t?Ve(t):e}function eu(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&Pr(e,"__v_skip",!0),e}const Mt=e=>Me(e)?Nl(e):e,Pl=e=>Me(e)?Aa(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function ee(e){return tu(e,!1)}function tu(e,t){return Je(e)?e:new lu(e,t)}class lu{constructor(t,l){this.dep=new Gs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=l?t:Ve(t),this._value=l?t:Mt(t),this.__v_isShallow=l}get value(){return this.dep.track(),this._value}set value(t){const l=this._rawValue,a=this.__v_isShallow||wt(t)||Zt(t);t=a?t:Ve(t),Ht(t,l)&&(this._rawValue=t,this._value=a?t:Mt(t),this.dep.trigger())}}function y(e){return Je(e)?e.value:e}const au={get:(e,t,l)=>t==="__v_raw"?e:y(Reflect.get(e,t,l)),set:(e,t,l,a)=>{const s=e[t];return Je(s)&&!Je(l)?(s.value=l,!0):Reflect.set(e,t,l,a)}};function ai(e){return kl(e)?e:new Proxy(e,au)}class su{constructor(t,l,a){this._object=t,this._defaultValue=a,this.__v_isRef=!0,this._value=void 0,this._key=Tt(l)?l:String(l),this._raw=Ve(t);let s=!0,n=t;if(!ke(t)||Tt(this._key)||!Ha(this._key))do s=!Ga(n)||wt(n);while(s&&(n=n.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=y(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Je(this._raw[this._key])){const l=this._object[this._key];if(Je(l)){l.value=t;return}}this._object[this._key]=t}get dep(){return Oo(this._raw,this._key)}}class nu{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ot(e,t,l){return Je(e)?e:$e(e)?new nu(e):Me(e)&&arguments.length>1?ru(e,t,l):ee(e)}function ru(e,t,l){return new su(e,t,l)}class iu{constructor(t,l,a){this.fn=t,this.setter=l,this._value=void 0,this.dep=new Gs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ia-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!l,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&Re!==this)return Ur(this,!0),!0}get value(){const t=this.dep.track();return qr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ou(e,t,l=!1){let a,s;return $e(e)?a=e:(a=e.get,s=e.set),new iu(a,s,l)}const Ta={},Ea=new WeakMap;let bl;function uu(e,t=!1,l=bl){if(l){let a=Ea.get(l);a||Ea.set(l,a=[]),a.push(e)}}function du(e,t,l=He){const{immediate:a,deep:s,once:n,scheduler:r,augmentJob:i,call:o}=l,d=v=>s?v:wt(v)||s===!1||s===0?rl(v,1):rl(v);let u,c,p,w,D=!1,$=!1;if(Je(e)?(c=()=>e.value,D=wt(e)):kl(e)?(c=()=>d(e),D=!0):ke(e)?($=!0,D=e.some(v=>kl(v)||wt(v)),c=()=>e.map(v=>{if(Je(v))return v.value;if(kl(v))return d(v);if($e(v))return o?o(v,2):v()})):$e(e)?t?c=o?()=>o(e,2):e:c=()=>{if(p){Jt();try{p()}finally{Xt()}}const v=bl;bl=u;try{return o?o(e,3,[w]):e(w)}finally{bl=v}}:c=Kt,t&&s){const v=c,b=s===!0?1/0:s;c=()=>rl(v(),b)}const S=Mo(),V=()=>{u.stop(),S&&S.active&&Hs(S.effects,u)};if(n&&t){const v=t;t=(...b)=>{v(...b),V()}}let E=$?new Array(e.length).fill(Ta):Ta;const A=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(t){const b=u.run();if(s||D||($?b.some((C,x)=>Ht(C,E[x])):Ht(b,E))){p&&p();const C=bl;bl=u;try{const x=[b,E===Ta?void 0:$&&E[0]===Ta?[]:E,w];E=b,o?o(t,3,x):t(...x)}finally{bl=C}}}else u.run()};return i&&i(A),u=new jr(c),u.scheduler=r?()=>r(A,!1):A,w=v=>uu(v,!1,u),p=u.onStop=()=>{const v=Ea.get(u);if(v){if(o)o(v,4);else for(const b of v)b();Ea.delete(u)}},t?a?A(!0):E=u.run():r?r(A.bind(null,!0),!0):u.run(),V.pause=u.pause.bind(u),V.resume=u.resume.bind(u),V.stop=V,V}function rl(e,t=1/0,l){if(t<=0||!Me(e)||e.__v_skip||(l=l||new Map,(l.get(e)||0)>=t))return e;if(l.set(e,t),t--,Je(e))rl(e.value,t,l);else if(ke(e))for(let a=0;a<e.length;a++)rl(e[a],t,l);else if(Lr(e)||Il(e))e.forEach(a=>{rl(a,t,l)});else if(Nr(e)){for(const a in e)rl(e[a],t,l);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&rl(e[a],t,l)}return e}/**
10
+ * @vue/runtime-core v3.5.34
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function ya(e,t,l,a){try{return a?e(...a):e()}catch(s){qa(s,t,l)}}function Bt(e,t,l,a){if($e(e)){const s=ya(e,t,l,a);return s&&Or(s)&&s.catch(n=>{qa(n,t,l)}),s}if(ke(e)){const s=[];for(let n=0;n<e.length;n++)s.push(Bt(e[n],t,l,a));return s}}function qa(e,t,l,a=!0){const s=t?t.vnode:null,{errorHandler:n,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||He;if(t){let i=t.parent;const o=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${l}`;for(;i;){const u=i.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,o,d)===!1)return}i=i.parent}if(n){Jt(),ya(n,null,10,[e,o,d]),Xt();return}}cu(e,l,s,a,r)}function cu(e,t,l,a=!0,s=!1){if(s)throw e;console.error(e)}const pt=[];let Nt=-1;const Vl=[];let nl=null,Sl=0;const si=Promise.resolve();let Ia=null;function Ke(e){const t=Ia||si;return e?t.then(this?e.bind(this):e):t}function fu(e){let t=Nt+1,l=pt.length;for(;t<l;){const a=t+l>>>1,s=pt[a],n=ua(s);n<e||n===e&&s.flags&2?t=a+1:l=a}return t}function Ys(e){if(!(e.flags&1)){const t=ua(e),l=pt[pt.length-1];!l||!(e.flags&2)&&t>=ua(l)?pt.push(e):pt.splice(fu(t),0,e),e.flags|=1,ni()}}function ni(){Ia||(Ia=si.then(ii))}function pu(e){ke(e)?Vl.push(...e):nl&&e.id===-1?nl.splice(Sl+1,0,e):e.flags&1||(Vl.push(e),e.flags|=1),ni()}function gn(e,t,l=Nt+1){for(;l<pt.length;l++){const a=pt[l];if(a&&a.flags&2){if(e&&a.id!==e.uid)continue;pt.splice(l,1),l--,a.flags&4&&(a.flags&=-2),a(),a.flags&4||(a.flags&=-2)}}}function ri(e){if(Vl.length){const t=[...new Set(Vl)].sort((l,a)=>ua(l)-ua(a));if(Vl.length=0,nl){nl.push(...t);return}for(nl=t,Sl=0;Sl<nl.length;Sl++){const l=nl[Sl];l.flags&4&&(l.flags&=-2),l.flags&8||l(),l.flags&=-2}nl=null,Sl=0}}const ua=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ii(e){try{for(Nt=0;Nt<pt.length;Nt++){const t=pt[Nt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ya(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nt<pt.length;Nt++){const t=pt[Nt];t&&(t.flags&=-2)}Nt=-1,pt.length=0,ri(),Ia=null,(pt.length||Vl.length)&&ii()}}let mt=null,oi=null;function Va(e){const t=mt;return mt=e,oi=e&&e.type.__scopeId||null,t}function N(e,t=mt,l){if(!t||e._n)return e;const a=(...s)=>{a._d&&La(-1);const n=Va(t);let r;try{r=e(...s)}finally{Va(n),a._d&&La(1)}return r};return a._n=!0,a._c=!0,a._d=!0,a}function vl(e,t,l,a){const s=e.dirs,n=t&&t.dirs;for(let r=0;r<s.length;r++){const i=s[r];n&&(i.oldValue=n[r].value);let o=i.dir[a];o&&(Jt(),Bt(o,l,8,[e.el,i,e,t]),Xt())}}function Ul(e,t){if(it){let l=it.provides;const a=it.parent&&it.parent.provides;a===l&&(l=it.provides=Object.create(a)),l[e]=t}}function Vt(e,t,l=!1){const a=fl();if(a||Bl){let s=Bl?Bl._context.provides:a?a.parent==null||a.ce?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return l&&$e(t)?t.call(a&&a.proxy):t}}const vu=Symbol.for("v-scx"),mu=()=>Vt(vu);function Fe(e,t,l){return ui(e,t,l)}function ui(e,t,l=He){const{immediate:a,deep:s,flush:n,once:r}=l,i=qe({},l),o=t&&a||!t&&n!=="post";let d;if(pa){if(n==="sync"){const w=mu();d=w.__watcherHandles||(w.__watcherHandles=[])}else if(!o){const w=()=>{};return w.stop=Kt,w.resume=Kt,w.pause=Kt,w}}const u=it;i.call=(w,D,$)=>Bt(w,u,D,$);let c=!1;n==="post"?i.scheduler=w=>{dt(w,u&&u.suspense)}:n!=="sync"&&(c=!0,i.scheduler=(w,D)=>{D?w():Ys(w)}),i.augmentJob=w=>{t&&(w.flags|=4),c&&(w.flags|=2,u&&(w.id=u.uid,w.i=u))};const p=du(e,t,i);return pa&&(d?d.push(p):o&&p()),p}function hu(e,t,l){const a=this.proxy,s=je(e)?e.includes(".")?di(a,e):()=>a[e]:e.bind(a,a);let n;$e(t)?n=t:(n=t.handler,l=t);const r=_a(this),i=ui(s,n.bind(a),l);return r(),i}function di(e,t){const l=t.split(".");return()=>{let a=e;for(let s=0;s<l.length&&a;s++)a=a[l[s]];return a}}const al=new WeakMap,ci=Symbol("_vte"),fi=e=>e.__isTeleport,gl=e=>e&&(e.disabled||e.disabled===""),bu=e=>e&&(e.defer||e.defer===""),yn=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_n=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ks=(e,t)=>{const l=e&&e.to;return je(l)?t?t(l):null:l},gu={name:"Teleport",__isTeleport:!0,process(e,t,l,a,s,n,r,i,o,d){const{mc:u,pc:c,pbc:p,o:{insert:w,querySelector:D,createText:$,createComment:S,parentNode:V}}=d,E=gl(t.props);let{dynamicChildren:A}=t;const v=(x,B,z)=>{x.shapeFlag&16&&u(x.children,B,z,s,n,r,i,o)},b=(x=t)=>{const B=gl(x.props),z=x.target=ks(x.props,D),M=ws(z,x,$,w);z&&(r!=="svg"&&yn(z)?r="svg":r!=="mathml"&&_n(z)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(z),B||(v(x,z,M),Yl(x,!1)))},C=x=>{const B=()=>{if(al.get(x)===B){if(al.delete(x),gl(x.props)){const z=V(x.el)||l;v(x,z,x.anchor),Yl(x,!0)}b(x)}};al.set(x,B),dt(B,n)};if(e==null){const x=t.el=$(""),B=t.anchor=$("");if(w(x,l,a),w(B,l,a),bu(t.props)||n&&n.pendingBranch){C(t);return}E&&(v(t,l,B),Yl(t,!0)),b()}else{t.el=e.el;const x=t.anchor=e.anchor,B=al.get(e);if(B){B.flags|=8,al.delete(e),C(t);return}t.targetStart=e.targetStart;const z=t.target=e.target,M=t.targetAnchor=e.targetAnchor,J=gl(e.props),I=J?l:z,R=J?x:M;if(r==="svg"||yn(z)?r="svg":(r==="mathml"||_n(z))&&(r="mathml"),A?(p(e.dynamicChildren,A,I,s,n,r,i),en(e,t,!0)):o||c(e,t,I,R,s,n,r,i,!1),E)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):xa(t,l,x,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=ks(t.props,D);K&&xa(t,K,null,d,0)}else J&&xa(t,z,M,d,1);Yl(t,E)}},remove(e,t,l,{um:a,o:{remove:s}},n){const{shapeFlag:r,children:i,anchor:o,targetStart:d,targetAnchor:u,target:c,props:p}=e;let w=n||!gl(p);const D=al.get(e);if(D&&(D.flags|=8,al.delete(e),w=!1),c&&(s(d),s(u)),n&&s(o),r&16)for(let $=0;$<i.length;$++){const S=i[$];a(S,t,l,w,!!S.dynamicChildren)}},move:xa,hydrate:yu};function xa(e,t,l,{o:{insert:a},m:s},n=2){n===0&&a(e.targetAnchor,t,l);const{el:r,anchor:i,shapeFlag:o,children:d,props:u}=e,c=n===2;if(c&&a(r,t,l),!al.has(e)&&(!c||gl(u))&&o&16)for(let p=0;p<d.length;p++)s(d[p],t,l,2);c&&a(i,t,l)}function yu(e,t,l,a,s,n,{o:{nextSibling:r,parentNode:i,querySelector:o,insert:d,createText:u}},c){function p(S,V){let E=V;for(;E;){if(E&&E.nodeType===8){if(E.data==="teleport start anchor")t.targetStart=E;else if(E.data==="teleport anchor"){t.targetAnchor=E,S._lpa=t.targetAnchor&&r(t.targetAnchor);break}}E=r(E)}}function w(S,V){V.anchor=c(r(S),V,i(S),l,a,s,n)}const D=t.target=ks(t.props,o),$=gl(t.props);if(D){const S=D._lpa||D.firstChild;t.shapeFlag&16&&($?(w(e,t),p(D,S),t.targetAnchor||ws(D,t,u,d,i(e)===D?e:null)):(t.anchor=r(e),p(D,S),t.targetAnchor||ws(D,t,u,d),c(S&&r(S),t,D,l,a,s,n))),Yl(t,$)}else $&&t.shapeFlag&16&&(w(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Qa=gu;function Yl(e,t){const l=e.ctx;if(l&&l.ut){let a,s;for(t?(a=e.el,s=e.anchor):(a=e.targetStart,s=e.targetAnchor);a&&a!==s;)a.nodeType===1&&a.setAttribute("data-v-owner",l.uid),a=a.nextSibling;l.ut()}}function ws(e,t,l,a,s=null){const n=t.targetStart=l(""),r=t.targetAnchor=l("");return n[ci]=r,e&&(a(n,e,s),a(r,e,s)),r}const Pt=Symbol("_leaveCb"),ql=Symbol("_enterCb");function pi(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ut(()=>{e.isMounted=!0}),Ge(()=>{e.isUnmounting=!0}),e}const At=[Function,Array],vi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:At,onEnter:At,onAfterEnter:At,onEnterCancelled:At,onBeforeLeave:At,onLeave:At,onAfterLeave:At,onLeaveCancelled:At,onBeforeAppear:At,onAppear:At,onAfterAppear:At,onAppearCancelled:At},mi=e=>{const t=e.subTree;return t.component?mi(t.component):t},_u={name:"BaseTransition",props:vi,setup(e,{slots:t}){const l=fl(),a=pi();return()=>{const s=t.default&&Js(t.default(),!0),n=s&&s.length?hi(s):l.subTree?j():void 0;if(!n)return;const r=Ve(e),{mode:i}=r;if(a.isLeaving)return ds(n);const o=kn(n);if(!o)return ds(n);let d=da(o,r,a,l,c=>d=c);o.type!==rt&&wl(o,d);let u=l.subTree&&kn(l.subTree);if(u&&u.type!==rt&&!yl(u,o)&&mi(l).type!==rt){let c=da(u,r,a,l);if(wl(u,c),i==="out-in"&&o.type!==rt)return a.isLeaving=!0,c.afterLeave=()=>{a.isLeaving=!1,l.job.flags&8||l.update(),delete c.afterLeave,u=void 0},ds(n);i==="in-out"&&o.type!==rt?c.delayLeave=(p,w,D)=>{const $=bi(a,u);$[String(u.key)]=u,p[Pt]=()=>{w(),p[Pt]=void 0,delete d.delayedLeave,u=void 0},d.delayedLeave=()=>{D(),delete d.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return n}}};function hi(e){let t=e[0];if(e.length>1){for(const l of e)if(l.type!==rt){t=l;break}}return t}const ku=_u;function bi(e,t){const{leavingVNodes:l}=e;let a=l.get(t.type);return a||(a=Object.create(null),l.set(t.type,a)),a}function da(e,t,l,a,s){const{appear:n,mode:r,persisted:i=!1,onBeforeEnter:o,onEnter:d,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:p,onLeave:w,onAfterLeave:D,onLeaveCancelled:$,onBeforeAppear:S,onAppear:V,onAfterAppear:E,onAppearCancelled:A}=t,v=String(e.key),b=bi(l,e),C=(z,M)=>{z&&Bt(z,a,9,M)},x=(z,M)=>{const J=M[1];C(z,M),ke(z)?z.every(I=>I.length<=1)&&J():z.length<=1&&J()},B={mode:r,persisted:i,beforeEnter(z){let M=o;if(!l.isMounted)if(n)M=S||o;else return;z[Pt]&&z[Pt](!0);const J=b[v];J&&yl(e,J)&&J.el[Pt]&&J.el[Pt](),C(M,[z])},enter(z){if(b[v]===e)return;let M=d,J=u,I=c;if(!l.isMounted)if(n)M=V||d,J=E||u,I=A||c;else return;let R=!1;z[ql]=pe=>{R||(R=!0,pe?C(I,[z]):C(J,[z]),B.delayedLeave&&B.delayedLeave(),z[ql]=void 0)};const K=z[ql].bind(null,!1);M?x(M,[z,K]):K()},leave(z,M){const J=String(e.key);if(z[ql]&&z[ql](!0),l.isUnmounting)return M();C(p,[z]);let I=!1;z[Pt]=K=>{I||(I=!0,M(),K?C($,[z]):C(D,[z]),z[Pt]=void 0,b[J]===e&&delete b[J])};const R=z[Pt].bind(null,!1);b[J]=e,w?x(w,[z,R]):R()},clone(z){const M=da(z,t,l,a,s);return s&&s(M),M}};return B}function ds(e){if(Ya(e))return e=dl(e),e.children=null,e}function kn(e){if(!Ya(e))return fi(e.type)&&e.children?hi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:l}=e;if(l){if(t&16)return l[0];if(t&32&&$e(l.default))return l.default()}}function wl(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wl(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Js(e,t=!1,l){let a=[],s=0;for(let n=0;n<e.length;n++){let r=e[n];const i=l==null?r.key:String(l)+String(r.key!=null?r.key:n);r.type===_e?(r.patchFlag&128&&s++,a=a.concat(Js(r.children,t,i))):(t||r.type!==rt)&&a.push(i!=null?dl(r,{key:i}):r)}if(s>1)for(let n=0;n<a.length;n++)a[n].patchFlag=-2;return a}function fe(e,t){return $e(e)?qe({name:e.name},t,{setup:e}):e}function wn(){const e=fl();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function gi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Tn(e,t){let l;return!!((l=Object.getOwnPropertyDescriptor(e,t))&&!l.configurable)}const Ma=new WeakMap;function aa(e,t,l,a,s=!1){if(ke(e)){e.forEach(($,S)=>aa($,t&&(ke(t)?t[S]:t),l,a,s));return}if(Ml(a)&&!s){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&aa(e,t,l,a.component.subTree);return}const n=a.shapeFlag&4?ln(a.component):a.el,r=s?null:n,{i,r:o}=e,d=t&&t.r,u=i.refs===He?i.refs={}:i.refs,c=i.setupState,p=Ve(c),w=c===He?Br:$=>Tn(u,$)?!1:Le(p,$),D=($,S)=>!(S&&Tn(u,S));if(d!=null&&d!==o){if(xn(t),je(d))u[d]=null,w(d)&&(c[d]=null);else if(Je(d)){const $=t;D(d,$.k)&&(d.value=null),$.k&&(u[$.k]=null)}}if($e(o))ya(o,i,12,[r,u]);else{const $=je(o),S=Je(o);if($||S){const V=()=>{if(e.f){const E=$?w(o)?c[o]:u[o]:D()||!e.k?o.value:u[e.k];if(s)ke(E)&&Hs(E,n);else if(ke(E))E.includes(n)||E.push(n);else if($)u[o]=[n],w(o)&&(c[o]=u[o]);else{const A=[n];D(o,e.k)&&(o.value=A),e.k&&(u[e.k]=A)}}else $?(u[o]=r,w(o)&&(c[o]=r)):S&&(D(o,e.k)&&(o.value=r),e.k&&(u[e.k]=r))};if(r){const E=()=>{V(),Ma.delete(e)};E.id=-1,Ma.set(e,E),dt(E,l)}else xn(e),V()}}}function xn(e){const t=Ma.get(e);t&&(t.flags|=8,Ma.delete(e))}Ua().requestIdleCallback;Ua().cancelIdleCallback;const Ml=e=>!!e.type.__asyncLoader,Ya=e=>e.type.__isKeepAlive;function wu(e,t){yi(e,"a",t)}function Tu(e,t){yi(e,"da",t)}function yi(e,t,l=it){const a=e.__wdc||(e.__wdc=()=>{let s=l;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ja(t,a,l),l){let s=l.parent;for(;s&&s.parent;)Ya(s.parent.vnode)&&xu(a,t,l,s),s=s.parent}}function xu(e,t,l,a){const s=Ja(t,e,a,!0);ki(()=>{Hs(a[t],s)},l)}function Ja(e,t,l=it,a=!1){if(l){const s=l[e]||(l[e]=[]),n=t.__weh||(t.__weh=(...r)=>{Jt();const i=_a(l),o=Bt(t,l,e,r);return i(),Xt(),o});return a?s.unshift(n):s.push(n),n}}const el=e=>(t,l=it)=>{(!pa||e==="sp")&&Ja(e,(...a)=>t(...a),l)},$u=el("bm"),Ut=el("m"),Cu=el("bu"),_i=el("u"),Ge=el("bum"),ki=el("um"),Su=el("sp"),Du=el("rtg"),Au=el("rtc");function Eu(e,t=it){Ja("ec",e,t)}const wi="components";function Iu(e,t){return xi(wi,e,!0,t)||e}const Ti=Symbol.for("v-ndc");function xt(e){return je(e)?xi(wi,e,!1)||e:e||Ti}function xi(e,t,l=!0,a=!1){const s=mt||it;if(s){const n=s.type;{const i=pd(n,!1);if(i&&(i===t||i===ht(t)||i===Ka(ht(t))))return n}const r=$n(s[e]||n[e],t)||$n(s.appContext[e],t);return!r&&a?n:r}}function $n(e,t){return e&&(e[t]||e[ht(t)]||e[Ka(ht(t))])}function Ae(e,t,l,a){let s;const n=l,r=ke(e);if(r||je(e)){const i=r&&kl(e);let o=!1,d=!1;i&&(o=!wt(e),d=Zt(e),e=Wa(e)),s=new Array(e.length);for(let u=0,c=e.length;u<c;u++)s[u]=t(o?d?Pl(Mt(e[u])):Mt(e[u]):e[u],u,void 0,n)}else if(typeof e=="number"){s=new Array(e);for(let i=0;i<e;i++)s[i]=t(i+1,i,void 0,n)}else if(Me(e))if(e[Symbol.iterator])s=Array.from(e,(i,o)=>t(i,o,void 0,n));else{const i=Object.keys(e);s=new Array(i.length);for(let o=0,d=i.length;o<d;o++){const u=i[o];s[o]=t(e[u],u,o,n)}}else s=[];return s}function Vu(e,t){for(let l=0;l<t.length;l++){const a=t[l];if(ke(a))for(let s=0;s<a.length;s++)e[a[s].name]=a[s].fn;else a&&(e[a.name]=a.key?(...s)=>{const n=a.fn(...s);return n&&(n.key=a.key),n}:a.fn)}return e}function U(e,t,l={},a,s){if(mt.ce||mt.parent&&Ml(mt.parent)&&mt.parent.ce){const d=Object.keys(l).length>0;return t!=="default"&&(l.name=t),f(),he(_e,null,[L("slot",l,a&&a())],d?-2:64)}let n=e[t];n&&n._c&&(n._d=!1),f();const r=n&&$i(n(l)),i=l.key||r&&r.key,o=he(_e,{key:(i&&!Tt(i)?i:`_${t}`)+(!r&&a?"_fb":"")},r||(a?a():[]),r&&e._===1?64:-2);return o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),n&&n._c&&(n._d=!0),o}function $i(e){return e.some(t=>fa(t)?!(t.type===rt||t.type===_e&&!$i(t.children)):!0)?e:null}const Ts=e=>e?Ui(e)?ln(e):Ts(e.parent):null,sa=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ts(e.parent),$root:e=>Ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Di(e),$forceUpdate:e=>e.f||(e.f=()=>{Ys(e.update)}),$nextTick:e=>e.n||(e.n=Ke.bind(e.proxy)),$watch:e=>hu.bind(e)}),cs=(e,t)=>e!==He&&!e.__isScriptSetup&&Le(e,t),Mu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:l,setupState:a,data:s,props:n,accessCache:r,type:i,appContext:o}=e;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return a[t];case 2:return s[t];case 4:return l[t];case 3:return n[t]}else{if(cs(a,t))return r[t]=1,a[t];if(s!==He&&Le(s,t))return r[t]=2,s[t];if(Le(n,t))return r[t]=3,n[t];if(l!==He&&Le(l,t))return r[t]=4,l[t];xs&&(r[t]=0)}}const d=sa[t];let u,c;if(d)return t==="$attrs"&&nt(e.attrs,"get",""),d(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(l!==He&&Le(l,t))return r[t]=4,l[t];if(c=o.config.globalProperties,Le(c,t))return c[t]},set({_:e},t,l){const{data:a,setupState:s,ctx:n}=e;return cs(s,t)?(s[t]=l,!0):a!==He&&Le(a,t)?(a[t]=l,!0):Le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(n[t]=l,!0)},has({_:{data:e,setupState:t,accessCache:l,ctx:a,appContext:s,props:n,type:r}},i){let o;return!!(l[i]||e!==He&&i[0]!=="$"&&Le(e,i)||cs(t,i)||Le(n,i)||Le(a,i)||Le(sa,i)||Le(s.config.globalProperties,i)||(o=r.__cssModules)&&o[i])},defineProperty(e,t,l){return l.get!=null?e._.accessCache[t]=0:Le(l,"value")&&this.set(e,t,l.value,null),Reflect.defineProperty(e,t,l)}};function xl(){return Ci().slots}function Ie(){return Ci().attrs}function Ci(e){const t=fl();return t.setupContext||(t.setupContext=Gi(t))}function Cn(e){return ke(e)?e.reduce((t,l)=>(t[l]=null,t),{}):e}let xs=!0;function Bu(e){const t=Di(e),l=e.proxy,a=e.ctx;xs=!1,t.beforeCreate&&Sn(t.beforeCreate,e,"bc");const{data:s,computed:n,methods:r,watch:i,provide:o,inject:d,created:u,beforeMount:c,mounted:p,beforeUpdate:w,updated:D,activated:$,deactivated:S,beforeDestroy:V,beforeUnmount:E,destroyed:A,unmounted:v,render:b,renderTracked:C,renderTriggered:x,errorCaptured:B,serverPrefetch:z,expose:M,inheritAttrs:J,components:I,directives:R,filters:K}=t;if(d&&Lu(d,a,null),r)for(const T in r){const O=r[T];$e(O)&&(a[T]=O.bind(l))}if(s){const T=s.call(l,l);Me(T)&&(e.data=Nl(T))}if(xs=!0,n)for(const T in n){const O=n[T],se=$e(O)?O.bind(l,l):$e(O.get)?O.get.bind(l,l):Kt,ve=!$e(O)&&$e(O.set)?O.set.bind(l):Kt,W=h({get:se,set:ve});Object.defineProperty(a,T,{enumerable:!0,configurable:!0,get:()=>W.value,set:me=>W.value=me})}if(i)for(const T in i)Si(i[T],a,l,T);if(o){const T=$e(o)?o.call(l):o;Reflect.ownKeys(T).forEach(O=>{Ul(O,T[O])})}u&&Sn(u,e,"c");function Q(T,O){ke(O)?O.forEach(se=>T(se.bind(l))):O&&T(O.bind(l))}if(Q($u,c),Q(Ut,p),Q(Cu,w),Q(_i,D),Q(wu,$),Q(Tu,S),Q(Eu,B),Q(Au,C),Q(Du,x),Q(Ge,E),Q(ki,v),Q(Su,z),ke(M))if(M.length){const T=e.exposed||(e.exposed={});M.forEach(O=>{Object.defineProperty(T,O,{get:()=>l[O],set:se=>l[O]=se,enumerable:!0})})}else e.exposed||(e.exposed={});b&&e.render===Kt&&(e.render=b),J!=null&&(e.inheritAttrs=J),I&&(e.components=I),R&&(e.directives=R),z&&gi(e)}function Lu(e,t,l=Kt){ke(e)&&(e=$s(e));for(const a in e){const s=e[a];let n;Me(s)?"default"in s?n=Vt(s.from||a,s.default,!0):n=Vt(s.from||a):n=Vt(s),Je(n)?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>n.value,set:r=>n.value=r}):t[a]=n}}function Sn(e,t,l){Bt(ke(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,l)}function Si(e,t,l,a){let s=a.includes(".")?di(l,a):()=>l[a];if(je(e)){const n=t[e];$e(n)&&Fe(s,n)}else if($e(e))Fe(s,e.bind(l));else if(Me(e))if(ke(e))e.forEach(n=>Si(n,t,l,a));else{const n=$e(e.handler)?e.handler.bind(l):t[e.handler];$e(n)&&Fe(s,n,e)}}function Di(e){const t=e.type,{mixins:l,extends:a}=t,{mixins:s,optionsCache:n,config:{optionMergeStrategies:r}}=e.appContext,i=n.get(t);let o;return i?o=i:!s.length&&!l&&!a?o=t:(o={},s.length&&s.forEach(d=>Ba(o,d,r,!0)),Ba(o,t,r)),Me(t)&&n.set(t,o),o}function Ba(e,t,l,a=!1){const{mixins:s,extends:n}=t;n&&Ba(e,n,l,!0),s&&s.forEach(r=>Ba(e,r,l,!0));for(const r in t)if(!(a&&r==="expose")){const i=Ou[r]||l&&l[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const Ou={data:Dn,props:An,emits:An,methods:Jl,computed:Jl,beforeCreate:ut,created:ut,beforeMount:ut,mounted:ut,beforeUpdate:ut,updated:ut,beforeDestroy:ut,beforeUnmount:ut,destroyed:ut,unmounted:ut,activated:ut,deactivated:ut,errorCaptured:ut,serverPrefetch:ut,components:Jl,directives:Jl,watch:Nu,provide:Dn,inject:Fu};function Dn(e,t){return t?e?function(){return qe($e(e)?e.call(this,this):e,$e(t)?t.call(this,this):t)}:t:e}function Fu(e,t){return Jl($s(e),$s(t))}function $s(e){if(ke(e)){const t={};for(let l=0;l<e.length;l++)t[e[l]]=e[l];return t}return e}function ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Jl(e,t){return e?qe(Object.create(null),e,t):t}function An(e,t){return e?ke(e)&&ke(t)?[...new Set([...e,...t])]:qe(Object.create(null),Cn(e),Cn(t??{})):t}function Nu(e,t){if(!e)return t;if(!t)return e;const l=qe(Object.create(null),e);for(const a in t)l[a]=ut(e[a],t[a]);return l}function Ai(){return{app:null,config:{isNativeTag:Br,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pu=0;function zu(e,t){return function(a,s=null){$e(a)||(a=qe({},a)),s!=null&&!Me(s)&&(s=null);const n=Ai(),r=new WeakSet,i=[];let o=!1;const d=n.app={_uid:Pu++,_component:a,_props:s,_container:null,_context:n,_instance:null,version:md,get config(){return n.config},set config(u){},use(u,...c){return r.has(u)||(u&&$e(u.install)?(r.add(u),u.install(d,...c)):$e(u)&&(r.add(u),u(d,...c))),d},mixin(u){return n.mixins.includes(u)||n.mixins.push(u),d},component(u,c){return c?(n.components[u]=c,d):n.components[u]},directive(u,c){return c?(n.directives[u]=c,d):n.directives[u]},mount(u,c,p){if(!o){const w=d._ceVNode||L(a,s);return w.appContext=n,p===!0?p="svg":p===!1&&(p=void 0),e(w,u,p),o=!0,d._container=u,u.__vue_app__=d,ln(w.component)}},onUnmount(u){i.push(u)},unmount(){o&&(Bt(i,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,c){return n.provides[u]=c,d},runWithContext(u){const c=Bl;Bl=d;try{return u()}finally{Bl=c}}};return d}}let Bl=null;const Ru=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${cl(t)}Modifiers`];function Hu(e,t,...l){if(e.isUnmounted)return;const a=e.vnode.props||He;let s=l;const n=t.startsWith("update:"),r=n&&Ru(a,t.slice(7));r&&(r.trim&&(s=l.map(u=>je(u)?u.trim():u)),r.number&&(s=l.map(To)));let i,o=a[i=ss(t)]||a[i=ss(ht(t))];!o&&n&&(o=a[i=ss(cl(t))]),o&&Bt(o,e,6,s);const d=a[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Bt(d,e,6,s)}}const ju=new WeakMap;function Ei(e,t,l=!1){const a=l?ju:t.emitsCache,s=a.get(e);if(s!==void 0)return s;const n=e.emits;let r={},i=!1;if(!$e(e)){const o=d=>{const u=Ei(d,t,!0);u&&(i=!0,qe(r,u))};!l&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!n&&!i?(Me(e)&&a.set(e,null),null):(ke(n)?n.forEach(o=>r[o]=null):qe(r,n),Me(e)&&a.set(e,r),r)}function Xa(e,t){return!e||!za(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,cl(t))||Le(e,t))}function En(e){const{type:t,vnode:l,proxy:a,withProxy:s,propsOptions:[n],slots:r,attrs:i,emit:o,render:d,renderCache:u,props:c,data:p,setupState:w,ctx:D,inheritAttrs:$}=e,S=Va(e);let V,E;try{if(l.shapeFlag&4){const v=s||a,b=v;V=Rt(d.call(b,v,u,c,w,p,D)),E=i}else{const v=t;V=Rt(v.length>1?v(c,{attrs:i,slots:r,emit:o}):v(c,null)),E=t.props?i:Ku(i)}}catch(v){na.length=0,qa(v,e,1),V=L(rt)}let A=V;if(E&&$!==!1){const v=Object.keys(E),{shapeFlag:b}=A;v.length&&b&7&&(n&&v.some(Ra)&&(E=Uu(E,n)),A=dl(A,E,!1,!0))}return l.dirs&&(A=dl(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(l.dirs):l.dirs),l.transition&&wl(A,l.transition),V=A,Va(S),V}const Ku=e=>{let t;for(const l in e)(l==="class"||l==="style"||za(l))&&((t||(t={}))[l]=e[l]);return t},Uu=(e,t)=>{const l={};for(const a in e)(!Ra(a)||!(a.slice(9)in t))&&(l[a]=e[a]);return l};function Wu(e,t,l){const{props:a,children:s,component:n}=e,{props:r,children:i,patchFlag:o}=t,d=n.emitsOptions;if(t.dirs||t.transition)return!0;if(l&&o>=0){if(o&1024)return!0;if(o&16)return a?In(a,r,d):!!r;if(o&8){const u=t.dynamicProps;for(let c=0;c<u.length;c++){const p=u[c];if(Ii(r,a,p)&&!Xa(d,p))return!0}}}else return(s||i)&&(!i||!i.$stable)?!0:a===r?!1:a?r?In(a,r,d):!0:!!r;return!1}function In(e,t,l){const a=Object.keys(t);if(a.length!==Object.keys(e).length)return!0;for(let s=0;s<a.length;s++){const n=a[s];if(Ii(t,e,n)&&!Xa(l,n))return!0}return!1}function Ii(e,t,l){const a=e[l],s=t[l];return l==="style"&&Me(a)&&Me(s)?!js(a,s):a!==s}function Gu({vnode:e,parent:t,suspense:l},a){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=a,e=s),s===e)(e=t.vnode).el=a,t=t.parent;else break}l&&l.activeBranch===e&&(l.vnode.el=a)}const Vi={},Mi=()=>Object.create(Vi),Bi=e=>Object.getPrototypeOf(e)===Vi;function qu(e,t,l,a=!1){const s={},n=Mi();e.propsDefaults=Object.create(null),Li(e,t,s,n);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);l?e.props=a?s:Zo(s):e.type.props?e.props=s:e.props=n,e.attrs=n}function Qu(e,t,l,a){const{props:s,attrs:n,vnode:{patchFlag:r}}=e,i=Ve(s),[o]=e.propsOptions;let d=!1;if((a||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let c=0;c<u.length;c++){let p=u[c];if(Xa(e.emitsOptions,p))continue;const w=t[p];if(o)if(Le(n,p))w!==n[p]&&(n[p]=w,d=!0);else{const D=ht(p);s[D]=Cs(o,i,D,w,e,!1)}else w!==n[p]&&(n[p]=w,d=!0)}}}else{Li(e,t,s,n)&&(d=!0);let u;for(const c in i)(!t||!Le(t,c)&&((u=cl(c))===c||!Le(t,u)))&&(o?l&&(l[c]!==void 0||l[u]!==void 0)&&(s[c]=Cs(o,i,c,void 0,e,!0)):delete s[c]);if(n!==i)for(const c in n)(!t||!Le(t,c))&&(delete n[c],d=!0)}d&&Yt(e.attrs,"set","")}function Li(e,t,l,a){const[s,n]=e.propsOptions;let r=!1,i;if(t)for(let o in t){if(ea(o))continue;const d=t[o];let u;s&&Le(s,u=ht(o))?!n||!n.includes(u)?l[u]=d:(i||(i={}))[u]=d:Xa(e.emitsOptions,o)||(!(o in a)||d!==a[o])&&(a[o]=d,r=!0)}if(n){const o=Ve(l),d=i||He;for(let u=0;u<n.length;u++){const c=n[u];l[c]=Cs(s,o,c,d[c],e,!Le(d,c))}}return r}function Cs(e,t,l,a,s,n){const r=e[l];if(r!=null){const i=Le(r,"default");if(i&&a===void 0){const o=r.default;if(r.type!==Function&&!r.skipFactory&&$e(o)){const{propsDefaults:d}=s;if(l in d)a=d[l];else{const u=_a(s);a=d[l]=o.call(null,t),u()}}else a=o;s.ce&&s.ce._setProp(l,a)}r[0]&&(n&&!i?a=!1:r[1]&&(a===""||a===cl(l))&&(a=!0))}return a}const Yu=new WeakMap;function Oi(e,t,l=!1){const a=l?Yu:t.propsCache,s=a.get(e);if(s)return s;const n=e.props,r={},i=[];let o=!1;if(!$e(e)){const u=c=>{o=!0;const[p,w]=Oi(c,t,!0);qe(r,p),w&&i.push(...w)};!l&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!n&&!o)return Me(e)&&a.set(e,El),El;if(ke(n))for(let u=0;u<n.length;u++){const c=ht(n[u]);Vn(c)&&(r[c]=He)}else if(n)for(const u in n){const c=ht(u);if(Vn(c)){const p=n[u],w=r[c]=ke(p)||$e(p)?{type:p}:qe({},p),D=w.type;let $=!1,S=!0;if(ke(D))for(let V=0;V<D.length;++V){const E=D[V],A=$e(E)&&E.name;if(A==="Boolean"){$=!0;break}else A==="String"&&(S=!1)}else $=$e(D)&&D.name==="Boolean";w[0]=$,w[1]=S,($||Le(w,"default"))&&i.push(c)}}const d=[r,i];return Me(e)&&a.set(e,d),d}function Vn(e){return e[0]!=="$"&&!ea(e)}const Xs=e=>e==="_"||e==="_ctx"||e==="$stable",Zs=e=>ke(e)?e.map(Rt):[Rt(e)],Ju=(e,t,l)=>{if(t._n)return t;const a=N((...s)=>Zs(t(...s)),l);return a._c=!1,a},Fi=(e,t,l)=>{const a=e._ctx;for(const s in e){if(Xs(s))continue;const n=e[s];if($e(n))t[s]=Ju(s,n,a);else if(n!=null){const r=Zs(n);t[s]=()=>r}}},Ni=(e,t)=>{const l=Zs(t);e.slots.default=()=>l},Pi=(e,t,l)=>{for(const a in t)(l||!Xs(a))&&(e[a]=t[a])},Xu=(e,t,l)=>{const a=e.slots=Mi();if(e.vnode.shapeFlag&32){const s=t._;s?(Pi(a,t,l),l&&Pr(a,"_",s,!0)):Fi(t,a)}else t&&Ni(e,t)},Zu=(e,t,l)=>{const{vnode:a,slots:s}=e;let n=!0,r=He;if(a.shapeFlag&32){const i=t._;i?l&&i===1?n=!1:Pi(s,t,l):(n=!t.$stable,Fi(t,s)),r=t}else t&&(Ni(e,t),r={default:1});if(n)for(const i in s)!Xs(i)&&r[i]==null&&delete s[i]},dt=sd;function ed(e){return td(e)}function td(e,t){const l=Ua();l.__VUE__=!0;const{insert:a,remove:s,patchProp:n,createElement:r,createText:i,createComment:o,setText:d,setElementText:u,parentNode:c,nextSibling:p,setScopeId:w=Kt,insertStaticContent:D}=e,$=(m,k,F,q=null,G=null,Y=null,ie=void 0,ne=null,le=!!k.dynamicChildren)=>{if(m===k)return;m&&!yl(m,k)&&(q=Oe(m),me(m,G,Y,!0),m=null),k.patchFlag===-2&&(le=!1,k.dynamicChildren=null);const{type:X,ref:ge,shapeFlag:re}=k;switch(X){case Za:S(m,k,F,q);break;case rt:V(m,k,F,q);break;case ps:m==null&&E(k,F,q,ie);break;case _e:I(m,k,F,q,G,Y,ie,ne,le);break;default:re&1?b(m,k,F,q,G,Y,ie,ne,le):re&6?R(m,k,F,q,G,Y,ie,ne,le):(re&64||re&128)&&X.process(m,k,F,q,G,Y,ie,ne,le,ze)}ge!=null&&G?aa(ge,m&&m.ref,Y,k||m,!k):ge==null&&m&&m.ref!=null&&aa(m.ref,null,Y,m,!0)},S=(m,k,F,q)=>{if(m==null)a(k.el=i(k.children),F,q);else{const G=k.el=m.el;k.children!==m.children&&d(G,k.children)}},V=(m,k,F,q)=>{m==null?a(k.el=o(k.children||""),F,q):k.el=m.el},E=(m,k,F,q)=>{[m.el,m.anchor]=D(m.children,k,F,q,m.el,m.anchor)},A=({el:m,anchor:k},F,q)=>{let G;for(;m&&m!==k;)G=p(m),a(m,F,q),m=G;a(k,F,q)},v=({el:m,anchor:k})=>{let F;for(;m&&m!==k;)F=p(m),s(m),m=F;s(k)},b=(m,k,F,q,G,Y,ie,ne,le)=>{if(k.type==="svg"?ie="svg":k.type==="math"&&(ie="mathml"),m==null)C(k,F,q,G,Y,ie,ne,le);else{const X=m.el&&m.el._isVueCE?m.el:null;try{X&&X._beginPatch(),z(m,k,G,Y,ie,ne,le)}finally{X&&X._endPatch()}}},C=(m,k,F,q,G,Y,ie,ne)=>{let le,X;const{props:ge,shapeFlag:re,transition:be,dirs:we}=m;if(le=m.el=r(m.type,Y,ge&&ge.is,ge),re&8?u(le,m.children):re&16&&B(m.children,le,null,q,G,fs(m,Y),ie,ne),we&&vl(m,null,q,"created"),x(le,m,m.scopeId,ie,q),ge){for(const Be in ge)Be!=="value"&&!ea(Be)&&n(le,Be,null,ge[Be],Y,q);"value"in ge&&n(le,"value",null,ge.value,Y),(X=ge.onVnodeBeforeMount)&&Ot(X,q,m)}we&&vl(m,null,q,"beforeMount");const Se=ld(G,be);Se&&be.beforeEnter(le),a(le,k,F),((X=ge&&ge.onVnodeMounted)||Se||we)&&dt(()=>{try{X&&Ot(X,q,m),Se&&be.enter(le),we&&vl(m,null,q,"mounted")}finally{}},G)},x=(m,k,F,q,G)=>{if(F&&w(m,F),q)for(let Y=0;Y<q.length;Y++)w(m,q[Y]);if(G){let Y=G.subTree;if(k===Y||Hi(Y.type)&&(Y.ssContent===k||Y.ssFallback===k)){const ie=G.vnode;x(m,ie,ie.scopeId,ie.slotScopeIds,G.parent)}}},B=(m,k,F,q,G,Y,ie,ne,le=0)=>{for(let X=le;X<m.length;X++){const ge=m[X]=ne?Qt(m[X]):Rt(m[X]);$(null,ge,k,F,q,G,Y,ie,ne)}},z=(m,k,F,q,G,Y,ie)=>{const ne=k.el=m.el;let{patchFlag:le,dynamicChildren:X,dirs:ge}=k;le|=m.patchFlag&16;const re=m.props||He,be=k.props||He;let we;if(F&&ml(F,!1),(we=be.onVnodeBeforeUpdate)&&Ot(we,F,k,m),ge&&vl(k,m,F,"beforeUpdate"),F&&ml(F,!0),(re.innerHTML&&be.innerHTML==null||re.textContent&&be.textContent==null)&&u(ne,""),X?M(m.dynamicChildren,X,ne,F,q,fs(k,G),Y):ie||O(m,k,ne,null,F,q,fs(k,G),Y,!1),le>0){if(le&16)J(ne,re,be,F,G);else if(le&2&&re.class!==be.class&&n(ne,"class",null,be.class,G),le&4&&n(ne,"style",re.style,be.style,G),le&8){const Se=k.dynamicProps;for(let Be=0;Be<Se.length;Be++){const Ne=Se[Be],Ue=re[Ne],Qe=be[Ne];(Qe!==Ue||Ne==="value")&&n(ne,Ne,Ue,Qe,G,F)}}le&1&&m.children!==k.children&&u(ne,k.children)}else!ie&&X==null&&J(ne,re,be,F,G);((we=be.onVnodeUpdated)||ge)&&dt(()=>{we&&Ot(we,F,k,m),ge&&vl(k,m,F,"updated")},q)},M=(m,k,F,q,G,Y,ie)=>{for(let ne=0;ne<k.length;ne++){const le=m[ne],X=k[ne],ge=le.el&&(le.type===_e||!yl(le,X)||le.shapeFlag&198)?c(le.el):F;$(le,X,ge,null,q,G,Y,ie,!0)}},J=(m,k,F,q,G)=>{if(k!==F){if(k!==He)for(const Y in k)!ea(Y)&&!(Y in F)&&n(m,Y,k[Y],null,G,q);for(const Y in F){if(ea(Y))continue;const ie=F[Y],ne=k[Y];ie!==ne&&Y!=="value"&&n(m,Y,ne,ie,G,q)}"value"in F&&n(m,"value",k.value,F.value,G)}},I=(m,k,F,q,G,Y,ie,ne,le)=>{const X=k.el=m?m.el:i(""),ge=k.anchor=m?m.anchor:i("");let{patchFlag:re,dynamicChildren:be,slotScopeIds:we}=k;we&&(ne=ne?ne.concat(we):we),m==null?(a(X,F,q),a(ge,F,q),B(k.children||[],F,ge,G,Y,ie,ne,le)):re>0&&re&64&&be&&m.dynamicChildren&&m.dynamicChildren.length===be.length?(M(m.dynamicChildren,be,F,G,Y,ie,ne),(k.key!=null||G&&k===G.subTree)&&en(m,k,!0)):O(m,k,F,ge,G,Y,ie,ne,le)},R=(m,k,F,q,G,Y,ie,ne,le)=>{k.slotScopeIds=ne,m==null?k.shapeFlag&512?G.ctx.activate(k,F,q,ie,le):K(k,F,q,G,Y,ie,le):pe(m,k,le)},K=(m,k,F,q,G,Y,ie)=>{const ne=m.component=ud(m,q,G);if(Ya(m)&&(ne.ctx.renderer=ze),dd(ne,!1,ie),ne.asyncDep){if(G&&G.registerDep(ne,Q,ie),!m.el){const le=ne.subTree=L(rt);V(null,le,k,F),m.placeholder=le.el}}else Q(ne,m,k,F,G,Y,ie)},pe=(m,k,F)=>{const q=k.component=m.component;if(Wu(m,k,F))if(q.asyncDep&&!q.asyncResolved){T(q,k,F);return}else q.next=k,q.update();else k.el=m.el,q.vnode=k},Q=(m,k,F,q,G,Y,ie)=>{const ne=()=>{if(m.isMounted){let{next:re,bu:be,u:we,parent:Se,vnode:Be}=m;{const Dt=zi(m);if(Dt){re&&(re.el=Be.el,T(m,re,ie)),Dt.asyncDep.then(()=>{dt(()=>{m.isUnmounted||X()},G)});return}}let Ne=re,Ue;ml(m,!1),re?(re.el=Be.el,T(m,re,ie)):re=Be,be&&ns(be),(Ue=re.props&&re.props.onVnodeBeforeUpdate)&&Ot(Ue,Se,re,Be),ml(m,!0);const Qe=En(m),St=m.subTree;m.subTree=Qe,$(St,Qe,c(St.el),Oe(St),m,G,Y),re.el=Qe.el,Ne===null&&Gu(m,Qe.el),we&&dt(we,G),(Ue=re.props&&re.props.onVnodeUpdated)&&dt(()=>Ot(Ue,Se,re,Be),G)}else{let re;const{el:be,props:we}=k,{bm:Se,m:Be,parent:Ne,root:Ue,type:Qe}=m,St=Ml(k);ml(m,!1),Se&&ns(Se),!St&&(re=we&&we.onVnodeBeforeMount)&&Ot(re,Ne,k),ml(m,!0);{Ue.ce&&Ue.ce._hasShadowRoot()&&Ue.ce._injectChildStyle(Qe,m.parent?m.parent.type:void 0);const Dt=m.subTree=En(m);$(null,Dt,F,q,m,G,Y),k.el=Dt.el}if(Be&&dt(Be,G),!St&&(re=we&&we.onVnodeMounted)){const Dt=k;dt(()=>Ot(re,Ne,Dt),G)}(k.shapeFlag&256||Ne&&Ml(Ne.vnode)&&Ne.vnode.shapeFlag&256)&&m.a&&dt(m.a,G),m.isMounted=!0,k=F=q=null}};m.scope.on();const le=m.effect=new jr(ne);m.scope.off();const X=m.update=le.run.bind(le),ge=m.job=le.runIfDirty.bind(le);ge.i=m,ge.id=m.uid,le.scheduler=()=>Ys(ge),ml(m,!0),X()},T=(m,k,F)=>{k.component=m;const q=m.vnode.props;m.vnode=k,m.next=null,Qu(m,k.props,q,F),Zu(m,k.children,F),Jt(),gn(m),Xt()},O=(m,k,F,q,G,Y,ie,ne,le=!1)=>{const X=m&&m.children,ge=m?m.shapeFlag:0,re=k.children,{patchFlag:be,shapeFlag:we}=k;if(be>0){if(be&128){ve(X,re,F,q,G,Y,ie,ne,le);return}else if(be&256){se(X,re,F,q,G,Y,ie,ne,le);return}}we&8?(ge&16&&ye(X,G,Y),re!==X&&u(F,re)):ge&16?we&16?ve(X,re,F,q,G,Y,ie,ne,le):ye(X,G,Y,!0):(ge&8&&u(F,""),we&16&&B(re,F,q,G,Y,ie,ne,le))},se=(m,k,F,q,G,Y,ie,ne,le)=>{m=m||El,k=k||El;const X=m.length,ge=k.length,re=Math.min(X,ge);let be;for(be=0;be<re;be++){const we=k[be]=le?Qt(k[be]):Rt(k[be]);$(m[be],we,F,null,G,Y,ie,ne,le)}X>ge?ye(m,G,Y,!0,!1,re):B(k,F,q,G,Y,ie,ne,le,re)},ve=(m,k,F,q,G,Y,ie,ne,le)=>{let X=0;const ge=k.length;let re=m.length-1,be=ge-1;for(;X<=re&&X<=be;){const we=m[X],Se=k[X]=le?Qt(k[X]):Rt(k[X]);if(yl(we,Se))$(we,Se,F,null,G,Y,ie,ne,le);else break;X++}for(;X<=re&&X<=be;){const we=m[re],Se=k[be]=le?Qt(k[be]):Rt(k[be]);if(yl(we,Se))$(we,Se,F,null,G,Y,ie,ne,le);else break;re--,be--}if(X>re){if(X<=be){const we=be+1,Se=we<ge?k[we].el:q;for(;X<=be;)$(null,k[X]=le?Qt(k[X]):Rt(k[X]),F,Se,G,Y,ie,ne,le),X++}}else if(X>be)for(;X<=re;)me(m[X],G,Y,!0),X++;else{const we=X,Se=X,Be=new Map;for(X=Se;X<=be;X++){const P=k[X]=le?Qt(k[X]):Rt(k[X]);P.key!=null&&Be.set(P.key,X)}let Ne,Ue=0;const Qe=be-Se+1;let St=!1,Dt=0;const pl=new Array(Qe);for(X=0;X<Qe;X++)pl[X]=0;for(X=we;X<=re;X++){const P=m[X];if(Ue>=Qe){me(P,G,Y,!0);continue}let Z;if(P.key!=null)Z=Be.get(P.key);else for(Ne=Se;Ne<=be;Ne++)if(pl[Ne-Se]===0&&yl(P,k[Ne])){Z=Ne;break}Z===void 0?me(P,G,Y,!0):(pl[Z-Se]=X+1,Z>=Dt?Dt=Z:St=!0,$(P,k[Z],F,null,G,Y,ie,ne,le),Ue++)}const $l=St?ad(pl):El;for(Ne=$l.length-1,X=Qe-1;X>=0;X--){const P=Se+X,Z=k[P],Te=k[P+1],at=P+1<ge?Te.el||Ri(Te):q;pl[X]===0?$(null,Z,F,at,G,Y,ie,ne,le):St&&(Ne<0||X!==$l[Ne]?W(Z,F,at,2):Ne--)}}},W=(m,k,F,q,G=null)=>{const{el:Y,type:ie,transition:ne,children:le,shapeFlag:X}=m;if(X&6){W(m.component.subTree,k,F,q);return}if(X&128){m.suspense.move(k,F,q);return}if(X&64){ie.move(m,k,F,ze);return}if(ie===_e){a(Y,k,F);for(let re=0;re<le.length;re++)W(le[re],k,F,q);a(m.anchor,k,F);return}if(ie===ps){A(m,k,F);return}if(q!==2&&X&1&&ne)if(q===0)ne.beforeEnter(Y),a(Y,k,F),dt(()=>ne.enter(Y),G);else{const{leave:re,delayLeave:be,afterLeave:we}=ne,Se=()=>{m.ctx.isUnmounted?s(Y):a(Y,k,F)},Be=()=>{Y._isLeaving&&Y[Pt](!0),re(Y,()=>{Se(),we&&we()})};be?be(Y,Se,Be):Be()}else a(Y,k,F)},me=(m,k,F,q=!1,G=!1)=>{const{type:Y,props:ie,ref:ne,children:le,dynamicChildren:X,shapeFlag:ge,patchFlag:re,dirs:be,cacheIndex:we,memo:Se}=m;if(re===-2&&(G=!1),ne!=null&&(Jt(),aa(ne,null,F,m,!0),Xt()),we!=null&&(k.renderCache[we]=void 0),ge&256){k.ctx.deactivate(m);return}const Be=ge&1&&be,Ne=!Ml(m);let Ue;if(Ne&&(Ue=ie&&ie.onVnodeBeforeUnmount)&&Ot(Ue,k,m),ge&6)De(m.component,F,q);else{if(ge&128){m.suspense.unmount(F,q);return}Be&&vl(m,null,k,"beforeUnmount"),ge&64?m.type.remove(m,k,F,ze,q):X&&!X.hasOnce&&(Y!==_e||re>0&&re&64)?ye(X,k,F,!1,!0):(Y===_e&&re&384||!G&&ge&16)&&ye(le,k,F),q&&ue(m)}const Qe=Se!=null&&we==null;(Ne&&(Ue=ie&&ie.onVnodeUnmounted)||Be||Qe)&&dt(()=>{Ue&&Ot(Ue,k,m),Be&&vl(m,null,k,"unmounted"),Qe&&(m.el=null)},F)},ue=m=>{const{type:k,el:F,anchor:q,transition:G}=m;if(k===_e){ae(F,q);return}if(k===ps){v(m);return}const Y=()=>{s(F),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(m.shapeFlag&1&&G&&!G.persisted){const{leave:ie,delayLeave:ne}=G,le=()=>ie(F,Y);ne?ne(m.el,Y,le):le()}else Y()},ae=(m,k)=>{let F;for(;m!==k;)F=p(m),s(m),m=F;s(k)},De=(m,k,F)=>{const{bum:q,scope:G,job:Y,subTree:ie,um:ne,m:le,a:X}=m;Mn(le),Mn(X),q&&ns(q),G.stop(),Y&&(Y.flags|=8,me(ie,m,k,F)),ne&&dt(ne,k),dt(()=>{m.isUnmounted=!0},k)},ye=(m,k,F,q=!1,G=!1,Y=0)=>{for(let ie=Y;ie<m.length;ie++)me(m[ie],k,F,q,G)},Oe=m=>{if(m.shapeFlag&6)return Oe(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const k=p(m.anchor||m.el),F=k&&k[ci];return F?p(F):k};let oe=!1;const xe=(m,k,F)=>{let q;m==null?k._vnode&&(me(k._vnode,null,null,!0),q=k._vnode.component):$(k._vnode||null,m,k,null,null,null,F),k._vnode=m,oe||(oe=!0,gn(q),ri(),oe=!1)},ze={p:$,um:me,m:W,r:ue,mt:K,mc:B,pc:O,pbc:M,n:Oe,o:e};return{render:xe,hydrate:void 0,createApp:zu(xe)}}function fs({type:e,props:t},l){return l==="svg"&&e==="foreignObject"||l==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:l}function ml({effect:e,job:t},l){l?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ld(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function en(e,t,l=!1){const a=e.children,s=t.children;if(ke(a)&&ke(s))for(let n=0;n<a.length;n++){const r=a[n];let i=s[n];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=s[n]=Qt(s[n]),i.el=r.el),!l&&i.patchFlag!==-2&&en(r,i)),i.type===Za&&(i.patchFlag===-1&&(i=s[n]=Qt(i)),i.el=r.el),i.type===rt&&!i.el&&(i.el=r.el)}}function ad(e){const t=e.slice(),l=[0];let a,s,n,r,i;const o=e.length;for(a=0;a<o;a++){const d=e[a];if(d!==0){if(s=l[l.length-1],e[s]<d){t[a]=s,l.push(a);continue}for(n=0,r=l.length-1;n<r;)i=n+r>>1,e[l[i]]<d?n=i+1:r=i;d<e[l[n]]&&(n>0&&(t[a]=l[n-1]),l[n]=a)}}for(n=l.length,r=l[n-1];n-- >0;)l[n]=r,r=t[r];return l}function zi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zi(t)}function Mn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ri(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ri(t.subTree):null}const Hi=e=>e.__isSuspense;function sd(e,t){t&&t.pendingBranch?ke(e)?t.effects.push(...e):t.effects.push(e):pu(e)}const _e=Symbol.for("v-fgt"),Za=Symbol.for("v-txt"),rt=Symbol.for("v-cmt"),ps=Symbol.for("v-stc"),na=[];let kt=null;function f(e=!1){na.push(kt=e?null:[])}function nd(){na.pop(),kt=na[na.length-1]||null}let ca=1;function La(e,t=!1){ca+=e,e<0&&kt&&t&&(kt.hasOnce=!0)}function ji(e){return e.dynamicChildren=ca>0?kt||El:null,nd(),ca>0&&kt&&kt.push(e),e}function g(e,t,l,a,s,n){return ji(_(e,t,l,a,s,n,!0))}function he(e,t,l,a,s){return ji(L(e,t,l,a,s,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function yl(e,t){return e.type===t.type&&e.key===t.key}const Ki=({key:e})=>e??null,Ca=({ref:e,ref_key:t,ref_for:l})=>(typeof e=="number"&&(e=""+e),e!=null?je(e)||Je(e)||$e(e)?{i:mt,r:e,k:t,f:!!l}:e:null);function _(e,t=null,l=null,a=0,s=null,n=e===_e?0:1,r=!1,i=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ki(t),ref:t&&Ca(t),scopeId:oi,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:a,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:mt};return i?(tn(o,l),n&128&&e.normalize(o)):l&&(o.shapeFlag|=je(l)?8:16),ca>0&&!r&&kt&&(o.patchFlag>0||n&6)&&o.patchFlag!==32&&kt.push(o),o}const L=rd;function rd(e,t=null,l=null,a=0,s=null,n=!1){if((!e||e===Ti)&&(e=rt),fa(e)){const i=dl(e,t,!0);return l&&tn(i,l),ca>0&&!n&&kt&&(i.shapeFlag&6?kt[kt.indexOf(e)]=i:kt.push(i)),i.patchFlag=-2,i}if(vd(e)&&(e=e.__vccOpts),t){t=ul(t);let{class:i,style:o}=t;i&&!je(i)&&(t.class=ce(i)),Me(o)&&(Ga(o)&&!ke(o)&&(o=qe({},o)),t.style=Pe(o))}const r=je(e)?1:Hi(e)?128:fi(e)?64:Me(e)?4:$e(e)?2:0;return _(e,t,l,a,s,r,n,!0)}function ul(e){return e?Ga(e)||Bi(e)?qe({},e):e:null}function dl(e,t,l=!1,a=!1){const{props:s,ref:n,patchFlag:r,children:i,transition:o}=e,d=t?Ce(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ki(d),ref:t&&t.ref?l&&n?ke(n)?n.concat(Ca(t)):[n,Ca(t)]:Ca(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&dl(e.ssContent),ssFallback:e.ssFallback&&dl(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return o&&a&&wl(u,o.clone(u)),u}function de(e=" ",t=0){return L(Za,null,e,t)}function j(e="",t=!1){return t?(f(),he(rt,null,e)):L(rt,null,e)}function Rt(e){return e==null||typeof e=="boolean"?L(rt):ke(e)?L(_e,null,e.slice()):fa(e)?Qt(e):L(Za,null,String(e))}function Qt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:dl(e)}function tn(e,t){let l=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(ke(t))l=16;else if(typeof t=="object")if(a&65){const s=t.default;s&&(s._c&&(s._d=!1),tn(e,s()),s._c&&(s._d=!0));return}else{l=32;const s=t._;!s&&!Bi(t)?t._ctx=mt:s===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $e(t)?(t={default:t,_ctx:mt},l=32):(t=String(t),a&64?(l=16,t=[de(t)]):l=8);e.children=t,e.shapeFlag|=l}function Ce(...e){const t={};for(let l=0;l<e.length;l++){const a=e[l];for(const s in a)if(s==="class")t.class!==a.class&&(t.class=ce([t.class,a.class]));else if(s==="style")t.style=Pe([t.style,a.style]);else if(za(s)){const n=t[s],r=a[s];r&&n!==r&&!(ke(n)&&n.includes(r))?t[s]=n?[].concat(n,r):r:r==null&&n==null&&!Ra(s)&&(t[s]=r)}else s!==""&&(t[s]=a[s])}return t}function Ot(e,t,l,a=null){Bt(e,t,7,[l,a])}const id=Ai();let od=0;function ud(e,t,l){const a=e.type,s=(t?t.appContext:e.appContext)||id,n={uid:od++,vnode:e,type:a,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Vo(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Oi(a,s),emitsOptions:Ei(a,s),emit:null,emitted:null,propsDefaults:He,inheritAttrs:a.inheritAttrs,ctx:He,data:He,props:He,attrs:He,slots:He,refs:He,setupState:He,setupContext:null,suspense:l,suspenseId:l?l.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return n.ctx={_:n},n.root=t?t.root:n,n.emit=Hu.bind(null,n),e.ce&&e.ce(n),n}let it=null;const fl=()=>it||mt;let Oa,Ss;{const e=Ua(),t=(l,a)=>{let s;return(s=e[l])||(s=e[l]=[]),s.push(a),n=>{s.length>1?s.forEach(r=>r(n)):s[0](n)}};Oa=t("__VUE_INSTANCE_SETTERS__",l=>it=l),Ss=t("__VUE_SSR_SETTERS__",l=>pa=l)}const _a=e=>{const t=it;return Oa(e),e.scope.on(),()=>{e.scope.off(),Oa(t)}},Bn=()=>{it&&it.scope.off(),Oa(null)};function Ui(e){return e.vnode.shapeFlag&4}let pa=!1;function dd(e,t=!1,l=!1){t&&Ss(t);const{props:a,children:s}=e.vnode,n=Ui(e);qu(e,a,n,t),Xu(e,s,l||t);const r=n?cd(e,t):void 0;return t&&Ss(!1),r}function cd(e,t){const l=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mu);const{setup:a}=l;if(a){Jt();const s=e.setupContext=a.length>1?Gi(e):null,n=_a(e),r=ya(a,e,0,[e.props,s]),i=Or(r);if(Xt(),n(),(i||e.sp)&&!Ml(e)&&gi(e),i){if(r.then(Bn,Bn),t)return r.then(o=>{Ln(e,o)}).catch(o=>{qa(o,e,0)});e.asyncDep=r}else Ln(e,r)}else Wi(e)}function Ln(e,t,l){$e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Me(t)&&(e.setupState=ai(t)),Wi(e)}function Wi(e,t,l){const a=e.type;e.render||(e.render=a.render||Kt);{const s=_a(e);Jt();try{Bu(e)}finally{Xt(),s()}}}const fd={get(e,t){return nt(e,"get",""),e[t]}};function Gi(e){const t=l=>{e.exposed=l||{}};return{attrs:new Proxy(e.attrs,fd),slots:e.slots,emit:e.emit,expose:t}}function ln(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ai(eu(e.exposed)),{get(t,l){if(l in t)return t[l];if(l in sa)return sa[l](e)},has(t,l){return l in t||l in sa}})):e.proxy}function pd(e,t=!0){return $e(e)?e.displayName||e.name:e.name||t&&e.__name}function vd(e){return $e(e)&&"__vccOpts"in e}const h=(e,t)=>ou(e,t,pa);function Ds(e,t,l){try{La(-1);const a=arguments.length;return a===2?Me(t)&&!ke(t)?fa(t)?L(e,null,[t]):L(e,t):L(e,null,t):(a>3?l=Array.prototype.slice.call(arguments,2):a===3&&fa(l)&&(l=[l]),L(e,t,l))}finally{La(1)}}const md="3.5.34";/**
14
+ * @vue/runtime-dom v3.5.34
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let As;const On=typeof window<"u"&&window.trustedTypes;if(On)try{As=On.createPolicy("vue",{createHTML:e=>e})}catch{}const qi=As?e=>As.createHTML(e):e=>e,hd="http://www.w3.org/2000/svg",bd="http://www.w3.org/1998/Math/MathML",qt=typeof document<"u"?document:null,Fn=qt&&qt.createElement("template"),gd={insert:(e,t,l)=>{t.insertBefore(e,l||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,l,a)=>{const s=t==="svg"?qt.createElementNS(hd,e):t==="mathml"?qt.createElementNS(bd,e):l?qt.createElement(e,{is:l}):qt.createElement(e);return e==="select"&&a&&a.multiple!=null&&s.setAttribute("multiple",a.multiple),s},createText:e=>qt.createTextNode(e),createComment:e=>qt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,l,a,s,n){const r=l?l.previousSibling:t.lastChild;if(s&&(s===n||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),l),!(s===n||!(s=s.nextSibling)););else{Fn.innerHTML=qi(a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e);const i=Fn.content;if(a==="svg"||a==="mathml"){const o=i.firstChild;for(;o.firstChild;)i.appendChild(o.firstChild);i.removeChild(o)}t.insertBefore(i,l)}return[r?r.nextSibling:t.firstChild,l?l.previousSibling:t.lastChild]}},ll="transition",Ql="animation",zl=Symbol("_vtc"),Qi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Yi=qe({},vi,Qi),yd=e=>(e.displayName="Transition",e.props=Yi,e),Lt=yd((e,{slots:t})=>Ds(ku,Ji(e),t)),hl=(e,t=[])=>{ke(e)?e.forEach(l=>l(...t)):e&&e(...t)},Nn=e=>e?ke(e)?e.some(t=>t.length>1):e.length>1:!1;function Ji(e){const t={};for(const I in e)I in Qi||(t[I]=e[I]);if(e.css===!1)return t;const{name:l="v",type:a,duration:s,enterFromClass:n=`${l}-enter-from`,enterActiveClass:r=`${l}-enter-active`,enterToClass:i=`${l}-enter-to`,appearFromClass:o=n,appearActiveClass:d=r,appearToClass:u=i,leaveFromClass:c=`${l}-leave-from`,leaveActiveClass:p=`${l}-leave-active`,leaveToClass:w=`${l}-leave-to`}=e,D=_d(s),$=D&&D[0],S=D&&D[1],{onBeforeEnter:V,onEnter:E,onEnterCancelled:A,onLeave:v,onLeaveCancelled:b,onBeforeAppear:C=V,onAppear:x=E,onAppearCancelled:B=A}=t,z=(I,R,K,pe)=>{I._enterCancelled=pe,sl(I,R?u:i),sl(I,R?d:r),K&&K()},M=(I,R)=>{I._isLeaving=!1,sl(I,c),sl(I,w),sl(I,p),R&&R()},J=I=>(R,K)=>{const pe=I?x:E,Q=()=>z(R,I,K);hl(pe,[R,Q]),Pn(()=>{sl(R,I?o:n),Ft(R,I?u:i),Nn(pe)||zn(R,a,$,Q)})};return qe(t,{onBeforeEnter(I){hl(V,[I]),Ft(I,n),Ft(I,r)},onBeforeAppear(I){hl(C,[I]),Ft(I,o),Ft(I,d)},onEnter:J(!1),onAppear:J(!0),onLeave(I,R){I._isLeaving=!0;const K=()=>M(I,R);Ft(I,c),I._enterCancelled?(Ft(I,p),Es(I)):(Es(I),Ft(I,p)),Pn(()=>{I._isLeaving&&(sl(I,c),Ft(I,w),Nn(v)||zn(I,a,S,K))}),hl(v,[I,K])},onEnterCancelled(I){z(I,!1,void 0,!0),hl(A,[I])},onAppearCancelled(I){z(I,!0,void 0,!0),hl(B,[I])},onLeaveCancelled(I){M(I),hl(b,[I])}})}function _d(e){if(e==null)return null;if(Me(e))return[vs(e.enter),vs(e.leave)];{const t=vs(e);return[t,t]}}function vs(e){return xo(e)}function Ft(e,t){t.split(/\s+/).forEach(l=>l&&e.classList.add(l)),(e[zl]||(e[zl]=new Set)).add(t)}function sl(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const l=e[zl];l&&(l.delete(t),l.size||(e[zl]=void 0))}function Pn(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let kd=0;function zn(e,t,l,a){const s=e._endId=++kd,n=()=>{s===e._endId&&a()};if(l!=null)return setTimeout(n,l);const{type:r,timeout:i,propCount:o}=Xi(e,t);if(!r)return a();const d=r+"end";let u=0;const c=()=>{e.removeEventListener(d,p),n()},p=w=>{w.target===e&&++u>=o&&c()};setTimeout(()=>{u<o&&c()},i+1),e.addEventListener(d,p)}function Xi(e,t){const l=window.getComputedStyle(e),a=D=>(l[D]||"").split(", "),s=a(`${ll}Delay`),n=a(`${ll}Duration`),r=Rn(s,n),i=a(`${Ql}Delay`),o=a(`${Ql}Duration`),d=Rn(i,o);let u=null,c=0,p=0;t===ll?r>0&&(u=ll,c=r,p=n.length):t===Ql?d>0&&(u=Ql,c=d,p=o.length):(c=Math.max(r,d),u=c>0?r>d?ll:Ql:null,p=u?u===ll?n.length:o.length:0);const w=u===ll&&/\b(?:transform|all)(?:,|$)/.test(a(`${ll}Property`).toString());return{type:u,timeout:c,propCount:p,hasTransform:w}}function Rn(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((l,a)=>Hn(l)+Hn(e[a])))}function Hn(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Es(e){return(e?e.ownerDocument:document).body.offsetHeight}function wd(e,t,l){const a=e[zl];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):l?e.setAttribute("class",t):e.className=t}const jn=Symbol("_vod"),Td=Symbol("_vsh"),xd=Symbol(""),$d=/(?:^|;)\s*display\s*:/;function Cd(e,t,l){const a=e.style,s=je(l);let n=!1;if(l&&!s){if(t)if(je(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();l[i]==null&&Xl(a,i,"")}else for(const r in t)l[r]==null&&Xl(a,r,"");for(const r in l){r==="display"&&(n=!0);const i=l[r];i!=null?Dd(e,r,!je(t)&&t?t[r]:void 0,i)||Xl(a,r,i):Xl(a,r,"")}}else if(s){if(t!==l){const r=a[xd];r&&(l+=";"+r),a.cssText=l,n=$d.test(l)}}else t&&e.removeAttribute("style");jn in e&&(e[jn]=n?a.display:"",e[Td]&&(a.display="none"))}const Kn=/\s*!important$/;function Xl(e,t,l){if(ke(l))l.forEach(a=>Xl(e,t,a));else if(l==null&&(l=""),t.startsWith("--"))e.setProperty(t,l);else{const a=Sd(e,t);Kn.test(l)?e.setProperty(cl(a),l.replace(Kn,""),"important"):e[a]=l}}const Un=["Webkit","Moz","ms"],ms={};function Sd(e,t){const l=ms[t];if(l)return l;let a=ht(t);if(a!=="filter"&&a in e)return ms[t]=a;a=Ka(a);for(let s=0;s<Un.length;s++){const n=Un[s]+a;if(n in e)return ms[t]=n}return t}function Dd(e,t,l,a){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&je(a)&&l===a}const Wn="http://www.w3.org/1999/xlink";function Gn(e,t,l,a,s,n=Eo(t)){a&&t.startsWith("xlink:")?l==null?e.removeAttributeNS(Wn,t.slice(6,t.length)):e.setAttributeNS(Wn,t,l):l==null||n&&!zr(l)?e.removeAttribute(t):e.setAttribute(t,n?"":Tt(l)?String(l):l)}function qn(e,t,l,a,s){if(t==="innerHTML"||t==="textContent"){l!=null&&(e[t]=t==="innerHTML"?qi(l):l);return}const n=e.tagName;if(t==="value"&&n!=="PROGRESS"&&!n.includes("-")){const i=n==="OPTION"?e.getAttribute("value")||"":e.value,o=l==null?e.type==="checkbox"?"on":"":String(l);(i!==o||!("_value"in e))&&(e.value=o),l==null&&e.removeAttribute(t),e._value=l;return}let r=!1;if(l===""||l==null){const i=typeof e[t];i==="boolean"?l=zr(l):l==null&&i==="string"?(l="",r=!0):i==="number"&&(l=0,r=!0)}try{e[t]=l}catch{}r&&e.removeAttribute(s||t)}function Ad(e,t,l,a){e.addEventListener(t,l,a)}function Ed(e,t,l,a){e.removeEventListener(t,l,a)}const Qn=Symbol("_vei");function Id(e,t,l,a,s=null){const n=e[Qn]||(e[Qn]={}),r=n[t];if(a&&r)r.value=a;else{const[i,o]=Vd(t);if(a){const d=n[t]=Ld(a,s);Ad(e,i,d,o)}else r&&(Ed(e,i,r,o),n[t]=void 0)}}const Yn=/(?:Once|Passive|Capture)$/;function Vd(e){let t;if(Yn.test(e)){t={};let a;for(;a=e.match(Yn);)e=e.slice(0,e.length-a[0].length),t[a[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):cl(e.slice(2)),t]}let hs=0;const Md=Promise.resolve(),Bd=()=>hs||(Md.then(()=>hs=0),hs=Date.now());function Ld(e,t){const l=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=l.attached)return;Bt(Od(a,l.value),t,5,[a])};return l.value=e,l.attached=Bd(),l}function Od(e,t){if(ke(t)){const l=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{l.call(e),e._stopped=!0},t.map(a=>s=>!s._stopped&&a&&a(s))}else return t}const Jn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fd=(e,t,l,a,s,n)=>{const r=s==="svg";t==="class"?wd(e,a,r):t==="style"?Cd(e,l,a):za(t)?Ra(t)||Id(e,t,l,a,n):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Nd(e,t,a,r))?(qn(e,t,a),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gn(e,t,a,r,n,t!=="value")):e._isVueCE&&(Pd(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!je(a)))?qn(e,ht(t),a,n,t):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),Gn(e,t,a,r))};function Nd(e,t,l,a){if(a)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jn(t)&&$e(l));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Jn(t)&&je(l)?!1:t in e}function Pd(e,t){const l=e._def.props;if(!l)return!1;const a=ht(t);return Array.isArray(l)?l.some(s=>ht(s)===a):Object.keys(l).some(s=>ht(s)===a)}const Zi=new WeakMap,eo=new WeakMap,Fa=Symbol("_moveCb"),Xn=Symbol("_enterCb"),zd=e=>(delete e.props.mode,e),Rd=zd({name:"TransitionGroup",props:qe({},Yi,{tag:String,moveClass:String}),setup(e,{slots:t}){const l=fl(),a=pi();let s,n;return _i(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!Wd(s[0].el,l.vnode.el,r)){s=[];return}s.forEach(jd),s.forEach(Kd);const i=s.filter(Ud);Es(l.vnode.el),i.forEach(o=>{const d=o.el,u=d.style;Ft(d,r),u.transform=u.webkitTransform=u.transitionDuration="";const c=d[Fa]=p=>{p&&p.target!==d||(!p||p.propertyName.endsWith("transform"))&&(d.removeEventListener("transitionend",c),d[Fa]=null,sl(d,r))};d.addEventListener("transitionend",c)}),s=[]}),()=>{const r=Ve(e),i=Ji(r);let o=r.tag||_e;if(s=[],n)for(let d=0;d<n.length;d++){const u=n[d];u.el&&u.el instanceof Element&&(s.push(u),wl(u,da(u,i,a,l)),Zi.set(u,to(u.el)))}n=t.default?Js(t.default()):[];for(let d=0;d<n.length;d++){const u=n[d];u.key!=null&&wl(u,da(u,i,a,l))}return L(o,null,n)}}}),Hd=Rd;function jd(e){const t=e.el;t[Fa]&&t[Fa](),t[Xn]&&t[Xn]()}function Kd(e){eo.set(e,to(e.el))}function Ud(e){const t=Zi.get(e),l=eo.get(e),a=t.left-l.left,s=t.top-l.top;if(a||s){const n=e.el,r=n.style,i=n.getBoundingClientRect();let o=1,d=1;return n.offsetWidth&&(o=i.width/n.offsetWidth),n.offsetHeight&&(d=i.height/n.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(d)||d===0)&&(d=1),Math.abs(o-1)<.01&&(o=1),Math.abs(d-1)<.01&&(d=1),r.transform=r.webkitTransform=`translate(${a/o}px,${s/d}px)`,r.transitionDuration="0s",e}}function to(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Wd(e,t,l){const a=e.cloneNode(),s=e[zl];s&&s.forEach(i=>{i.split(/\s+/).forEach(o=>o&&a.classList.remove(o))}),l.split(/\s+/).forEach(i=>i&&a.classList.add(i)),a.style.display="none";const n=t.nodeType===1?t:t.parentNode;n.appendChild(a);const{hasTransform:r}=Xi(a);return n.removeChild(a),r}const Gd=["ctrl","shift","alt","meta"],qd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gd.some(l=>e[`${l}Key`]&&!t.includes(l))},Sa=(e,t)=>{if(!e)return e;const l=e._withMods||(e._withMods={}),a=t.join(".");return l[a]||(l[a]=((s,...n)=>{for(let r=0;r<t.length;r++){const i=qd[t[r]];if(i&&i(s,t))return}return e(s,...n)}))},Qd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yd=(e,t)=>{const l=e._withKeys||(e._withKeys={}),a=t.join(".");return l[a]||(l[a]=(s=>{if(!("key"in s))return;const n=cl(s.key);if(t.some(r=>r===n||Qd[r]===n))return e(s)}))},Jd=qe({patchProp:Fd},gd);let Zn;function Xd(){return Zn||(Zn=ed(Jd))}const Zd=((...e)=>{const t=Xd().createApp(...e),{mount:l}=t;return t.mount=a=>{const s=tc(a);if(!s)return;const n=t._component;!$e(n)&&!n.render&&!n.template&&(n.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=l(s,!1,ec(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t});function ec(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tc(e){return je(e)?document.querySelector(e):e}var er=0,Xe=(e="treeui")=>(er+=1,`${e}-${er}`),lo=e=>typeof e=="string"?e:e.key,bt=e=>{const t=lo(e);return t==="Enter"||t===" "},gt=e=>lo(e)==="Escape",lc=(e,t,l)=>Math.min(Math.max(e,t),l),Rl=(e,t,l,a=!0)=>{var n;if(!t.length)return-1;let s=e;for(let r=0;r<t.length;r+=1){if(s+=l,s>=t.length){if(!a)return e;s=0}if(s<0){if(!a)return e;s=t.length-1}if(!((n=t[s])!=null&&n.disabled))return s}return e},ac=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(","),es=e=>Array.from(e.querySelectorAll(ac)).filter(t=>!t.hasAttribute("disabled")&&t.getAttribute("aria-hidden")!=="true"),va=e=>{const t=es(e)[0];return t==null||t.focus(),t??null},ao=e=>{const t=es(e),l=t[t.length-1];return l==null||l.focus(),l??null},Et=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),yt=e=>new Date(e.getFullYear(),e.getMonth(),1),ct=(e,t)=>{const l=new Date(e);return l.setDate(l.getDate()+t),Et(l)},Ll=(e,t)=>{const l=Et(e),a=l.getMonth()+t,s=l.getFullYear()+Math.floor(a/12),n=(a%12+12)%12,r=new Date(s,n+1,0).getDate(),i=Math.min(l.getDate(),r);return new Date(s,n,i)},il=(e,t=0)=>{const l=Et(e),a=(l.getDay()-t+7)%7;return ct(l,-a)},Ol=(e,t)=>!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),bs=e=>{if(!e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;const[t,l,a]=e.split("-").map(n=>Number.parseInt(n,10)),s=new Date(t,l-1,a);return Number.isNaN(s.getTime())||s.getFullYear()!==t||s.getMonth()!==l-1||s.getDate()!==a?null:Et(s)},Fl=e=>{const t=`${e.getFullYear()}`,l=`${e.getMonth()+1}`.padStart(2,"0"),a=`${e.getDate()}`.padStart(2,"0");return`${t}-${l}-${a}`},_t={size:16,strokeWidth:1.75,absoluteStrokeWidth:!0},tr=e=>typeof e=="number"?e:Number.parseFloat(e),Wt=(e,t)=>fe({name:e,props:{size:{type:[Number,String],default:_t.size},strokeWidth:{type:[Number,String],default:_t.strokeWidth},absoluteStrokeWidth:{type:Boolean,default:_t.absoluteStrokeWidth}},setup(l,{attrs:a}){return()=>{const s=tr(l.size),n=tr(l.strokeWidth),r=l.absoluteStrokeWidth?n*24/s:n;return Ds("svg",{xmlns:"http://www.w3.org/2000/svg",width:l.size,height:l.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":r,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",...a},t.map(([i,o])=>Ds(i,o)))}}}),sc=Wt("TreeCircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]]),nc=Wt("TreeCheckIcon",[["path",{d:"M20 6 9 17l-5-5"}]]),rc=Wt("TreeCalendarIcon",[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]]),ic=Wt("TreeChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6"}]]),oc=Wt("TreeChevronDownIcon",[["path",{d:"m6 9 6 6 6-6"}]]),uc=Wt("TreeChevronRightIcon",[["path",{d:"m9 18 6-6-6-6"}]]),dc=Wt("TreeInfoIcon",[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]]),cc=Wt("TreeLoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]]),fc=Wt("TreeSearchIcon",[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]]),pc=Wt("TreeXIcon",[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]]),vc={"alert-circle":sc,calendar:rc,check:nc,"chevron-left":ic,"chevron-down":oc,"chevron-right":uc,info:dc,"loader-circle":cc,search:fc,x:pc},We=e=>vc[e];const so=Symbol("tree-accordion"),mc={class:"tree-accordion"},lr=fe({__name:"TreeAccordion",props:{type:{default:"single"},modelValue:{default:void 0},defaultValue:{default:void 0},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>{const v=l.defaultValue;return v===void 0?[]:Array.isArray(v)?v:[v]}),n=Nl(new Set(s.value)),r=h(()=>l.modelValue!==void 0),i=h(()=>{if(r.value){const v=l.modelValue;return new Set(Array.isArray(v)?v:[v])}return n});function o(v){return i.value.has(v)}function d(v){if(l.type==="single"){const b=[...v];a("update:modelValue",b.length>0?b[0]:void 0)}else a("update:modelValue",[...v])}function u(v){const b=o(v);if(l.type==="single")b?l.collapsible&&(r.value||n.delete(v),d(new Set)):(r.value||(n.clear(),n.add(v)),d(new Set([v])));else{const C=new Set(i.value);b?C.delete(v):C.add(v),r.value||(b?n.delete(v):n.add(v)),d(C)}}const c=new Map,p=Nl([]);function w(v,b){c.has(v)||p.push(v),c.set(v,b)}function D(v){c.delete(v);const b=p.indexOf(v);b!==-1&&p.splice(b,1)}function $(){return p.filter(v=>{const b=c.get(v);return b&&!b.hasAttribute("disabled")})}function S(v){var b;const C=$(),x=C.indexOf(v),B=x>0?x-1:C.length-1;(b=c.get(C[B]))==null||b.focus()}function V(v){var b;const C=$(),x=C.indexOf(v),B=x<C.length-1?x+1:0;(b=c.get(C[B]))==null||b.focus()}function E(){var v;const b=$();b.length&&((v=c.get(b[0]))==null||v.focus())}function A(){var v;const b=$();b.length&&((v=c.get(b[b.length-1]))==null||v.focus())}return Ul(so,{type:l.type,disabled:l.disabled,collapsible:l.collapsible,isItemOpen:o,toggleItem:u,registerTrigger:w,unregisterTrigger:D,focusPrev:S,focusNext:V,focusFirst:E,focusLast:A}),(v,b)=>(f(),g("div",mc,[U(v.$slots,"default")]))}}),hc={class:"tree-accordion__heading"},bc=["id","aria-expanded","aria-controls","disabled"],gc=["id","aria-labelledby"],yc={class:"tree-accordion__panel"},ar=fe({__name:"TreeAccordionItem",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const t=e,l=Vt(so);if(!l)throw new Error("[TreeUI] TAccordionItem must be used inside a TAccordion.");const a=l,s=wn(),n=wn(),r=ee(null),i=h(()=>a.isItemOpen(t.value)),o=h(()=>t.disabled||a.disabled),d=h(()=>["tree-accordion__item",{"is-open":i.value,"is-disabled":o.value}]);function u(){o.value||a.toggleItem(t.value)}function c(p){if(!o.value)switch(p.key){case"ArrowDown":p.preventDefault(),a.focusNext(t.value);break;case"ArrowUp":p.preventDefault(),a.focusPrev(t.value);break;case"Home":p.preventDefault(),a.focusFirst();break;case"End":p.preventDefault(),a.focusLast();break}}return Ut(()=>{r.value&&a.registerTrigger(t.value,r.value)}),Ge(()=>{a.unregisterTrigger(t.value)}),(p,w)=>(f(),g("div",{class:ce(d.value)},[_("h3",hc,[_("button",{id:y(s),ref_key:"triggerRef",ref:r,type:"button",class:"tree-accordion__trigger","aria-expanded":i.value,"aria-controls":y(n),disabled:o.value||void 0,onClick:u,onKeydown:c},[U(p.$slots,"trigger",{open:i.value},()=>[de(H(e.value),1)]),(f(),g("svg",{class:ce(["tree-accordion__icon",{"is-open":i.value}]),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...w[0]||(w[0]=[_("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))],40,bc)]),i.value?(f(),g("div",{key:0,id:y(n),role:"region","aria-labelledby":y(s),class:"tree-accordion__content"},[_("div",yc,[U(p.$slots,"default")])],8,gc)):j("",!0)],2))}}),_c={key:0,class:"tree-alert__icon","aria-hidden":"true"},kc={class:"tree-alert__content"},Na=fe({__name:"TreeAlert",props:{variant:{default:"info"},size:{default:"md"},dismissible:{type:Boolean,default:!1}},emits:["dismiss"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>["tree-alert",`tree-alert--${l.variant}`,`tree-alert--${l.size}`]);function n(){a("dismiss")}return(r,i)=>(f(),g("div",{class:ce(s.value),role:"alert"},[r.$slots.icon?(f(),g("span",_c,[U(r.$slots,"icon")])):j("",!0),_("div",kc,[U(r.$slots,"default")]),e.dismissible?(f(),g("button",{key:1,type:"button",class:"tree-alert__dismiss","aria-label":"Dismiss",onClick:n},[U(r.$slots,"dismiss-icon",{},()=>[i[0]||(i[0]=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"M18 6 6 18"}),_("path",{d:"m6 6 12 12"})],-1))])])):j("",!0)],2))}}),wc={key:0,class:"tree-badge__icon","aria-hidden":"true"},Ze=fe({__name:"TreeBadge",props:{variant:{default:"soft"},size:{default:"md"},tone:{default:"neutral"}},setup(e){const t=e,l=h(()=>["tree-badge",`tree-badge--${t.variant}`,`tree-badge--${t.size}`,`tree-badge--tone-${t.tone}`]);return(a,s)=>(f(),g("span",{class:ce(l.value)},[a.$slots.icon?(f(),g("span",wc,[U(a.$slots,"icon")])):j("",!0),U(a.$slots,"default")],2))}}),Tc={"aria-label":"Breadcrumb",class:"tree-breadcrumb"},sr=fe({__name:"TreeBreadcrumb",props:{separator:{default:"/"}},setup(e){const t=e;return(l,a)=>(f(),g("nav",Tc,[_("ol",{class:"tree-breadcrumb__list",style:Pe({"--tree-breadcrumb-separator":`'${t.separator}'`})},[U(l.$slots,"default")],4)]))}}),xc={class:"tree-breadcrumb__item"},$c={key:1,class:"tree-breadcrumb__current","aria-current":"page"},nr=fe({__name:"TreeBreadcrumbItem",props:{href:{default:void 0},to:{default:void 0},current:{type:Boolean,default:!1}},setup(e){const t=e,l=fl(),a=h(()=>t.to?(l==null?void 0:l.appContext.components.RouterLink)??null:null),s=h(()=>!!a.value),n=h(()=>t.href||typeof t.to=="string"?!0:!!(t.to&&s.value)),r=h(()=>t.current||!n.value),i=h(()=>t.to&&a.value?a.value:"a"),o=h(()=>t.to&&s.value?{to:t.to}:{href:t.href??(typeof t.to=="string"?t.to:void 0)});return(d,u)=>(f(),g("li",xc,[r.value?(f(),g("span",$c,[U(d.$slots,"default")])):(f(),he(xt(i.value),Ce({key:0},o.value,{class:"tree-breadcrumb__link"}),{default:N(()=>[U(d.$slots,"default")]),_:3},16))]))}}),Cc=["aria-label"],Sc={class:"tree-visually-hidden"},$t=fe({__name:"TreeSpinner",props:{size:{default:"md"},label:{default:"Loading"}},setup(e){const t=e,l=h(()=>["tree-spinner",`tree-spinner--${t.size}`]);return(a,s)=>(f(),g("span",{class:ce(l.value),role:"status","aria-label":e.label},[s[0]||(s[0]=_("span",{class:"tree-spinner__ring","aria-hidden":"true"},null,-1)),_("span",Sc,H(e.label),1)],10,Cc))}}),Dc={key:0,class:"tree-button__spinner"},Ac={key:1,class:"tree-button__icon","aria-hidden":"true"},Ec={class:"tree-button__label"},et=fe({__name:"TreeButton",props:{as:{default:"button"},variant:{default:"solid"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>l.as==="button"),n=h(()=>l.disabled||l.loading),r=h(()=>["tree-button",`tree-button--${l.variant}`,`tree-button--${l.size}`,{"is-loading":l.loading,"is-disabled":n.value}]),i=o=>{if(n.value){o.preventDefault(),o.stopPropagation();return}a("click",o)};return(o,d)=>(f(),he(xt(e.as),{type:s.value?e.type:void 0,class:ce(r.value),disabled:s.value?n.value:void 0,"aria-disabled":!s.value&&n.value?"true":void 0,"aria-busy":e.loading||void 0,tabindex:!s.value&&n.value?-1:void 0,onClick:i},{default:N(()=>[e.loading?(f(),g("span",Dc,[L($t,{size:"sm",label:"Loading"})])):j("",!0),o.$slots.icon?(f(),g("span",Ac,[U(o.$slots,"icon")])):j("",!0),_("span",Ec,[U(o.$slots,"default")])]),_:3},8,["type","class","disabled","aria-disabled","aria-busy","tabindex"]))}}),Ic={key:0,class:"tree-card__header"},Vc={key:0,class:"tree-card__title"},Mc={key:1,class:"tree-card__actions"},Bc={class:"tree-card__body"},Lc={key:1,class:"tree-card__footer"},Tl=fe({__name:"TreeCard",props:{as:{default:"section"},variant:{default:"outline"},size:{default:"md"},title:{default:void 0}},setup(e){const t=e,l=h(()=>["tree-card",`tree-card--${t.variant}`,`tree-card--${t.size}`]),a=h(()=>!!t.title);return(s,n)=>(f(),he(xt(e.as),{class:ce(l.value)},{default:N(()=>[s.$slots.header||a.value||s.$slots.actions?(f(),g("header",Ic,[U(s.$slots,"header",{},()=>[e.title?(f(),g("span",Vc,H(e.title),1)):j("",!0),s.$slots.actions?(f(),g("span",Mc,[U(s.$slots,"actions")])):j("",!0)])])):j("",!0),_("div",Bc,[U(s.$slots,"default")]),s.$slots.footer?(f(),g("footer",Lc,[U(s.$slots,"footer")])):j("",!0)]),_:3},8,["class"]))}}),Oc=["checked","disabled","aria-checked","aria-invalid"],Fc={class:"tree-checkbox__control","aria-hidden":"true"},Nc={key:0,class:"tree-checkbox__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Pc={key:1,class:"tree-checkbox__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},zc={key:0,class:"tree-checkbox__label"},rr=fe({inheritAttrs:!1,__name:"TreeCheckbox",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=ee(null);Fe(()=>l.indeterminate,u=>{n.value&&(n.value.indeterminate=u)}),Fe(n,u=>{u&&(u.indeterminate=l.indeterminate)});const r=h(()=>["tree-checkbox",`tree-checkbox--${l.size}`,{"is-checked":l.modelValue,"is-indeterminate":l.indeterminate,"is-disabled":l.disabled,"is-invalid":l.invalid},s.class]),i=h(()=>s.style),o=h(()=>{const{class:u,style:c,...p}=s;return p}),d=()=>{a("update:modelValue",!l.modelValue)};return(u,c)=>(f(),g("label",{class:ce(r.value),style:Pe(i.value)},[_("input",Ce({ref_key:"inputRef",ref:n},o.value,{type:"checkbox",class:"tree-checkbox__input",checked:e.modelValue,disabled:e.disabled,"aria-checked":e.indeterminate?"mixed":e.modelValue,"aria-invalid":e.invalid||void 0,onChange:d}),null,16,Oc),_("span",Fc,[e.modelValue&&!e.indeterminate?(f(),g("svg",Nc,[...c[0]||(c[0]=[_("polyline",{points:"3.5 8.5 6.5 11.5 12.5 4.5"},null,-1)])])):e.indeterminate?(f(),g("svg",Pc,[...c[1]||(c[1]=[_("line",{x1:"4",y1:"8",x2:"12",y2:"8"},null,-1)])])):j("",!0)]),u.$slots.default?(f(),g("span",zc,[U(u.$slots,"default")])):j("",!0)],6))}}),Ct=(e,t,l)=>{const a=ee(t),s=h(()=>e.value??a.value);return{value:s,setValue:n=>{n!==s.value&&(e.value===void 0&&(a.value=n),l(n))}}},Rc=["data-state"],Hc={class:"tree-combobox__control"},jc={key:0,class:"tree-combobox__slot tree-combobox__slot--prefix"},Kc=["value","placeholder","disabled","aria-controls","aria-expanded","aria-activedescendant","aria-invalid","aria-busy"],Uc={key:2,class:"tree-combobox__indicator",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Wc=["id","aria-label","aria-labelledby"],Gc={key:0,class:"tree-combobox__empty"},qc=["id","aria-selected","aria-disabled","onMouseenter","onClick"],Qc={class:"tree-combobox__option-copy"},Yc={class:"tree-combobox__option-label"},Jc={key:0,class:"tree-combobox__option-description"},Xc={key:0,class:"tree-combobox__check",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},ir=fe({inheritAttrs:!1,__name:"TreeCombobox",props:{modelValue:{default:""},options:{default:()=>[]},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:""},emptyText:{default:"No results found."}},emits:["update:modelValue","update:open","open-change","input-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-combobox"),r=ee(null),i=ee(-1),o=ee(""),d=W=>W.trim().toLowerCase(),u=W=>`${n}-option-${W}`,c=h(()=>l.options.find(W=>W.value===l.modelValue)),p=h(()=>{var W;return((W=c.value)==null?void 0:W.label)??""}),w=h(()=>{const{class:W,style:me,autocomplete:ue,...ae}=s;return{autocomplete:typeof ue=="string"?ue:"off",...ae}}),D=h(()=>typeof s["aria-label"]=="string"?s["aria-label"]:void 0),$=h(()=>typeof s["aria-labelledby"]=="string"?s["aria-labelledby"]:void 0),{value:S,setValue:V}=Ct(ot(l,"open"),l.defaultOpen,W=>{a("update:open",W),a("open-change",W)}),E=h(()=>["tree-combobox",`tree-combobox--${l.size}`,{"is-disabled":l.disabled,"is-invalid":l.invalid,"is-loading":l.loading,"is-open":S.value},s.class]),A=h(()=>s.style),v=h(()=>{const W=d(o.value);return W?l.options.filter(me=>[me.label,me.description??"",...me.keywords??[]].some(ue=>ue.toLowerCase().includes(W))):l.options}),b=h(()=>v.value.reduce((W,me,ue)=>(me.disabled||W.push(ue),W),[])),C=h(()=>i.value>=0?v.value[i.value]:void 0),x=h(()=>S.value&&C.value?u(C.value.value):void 0),B=()=>{o.value=p.value},z=(W="first")=>{const me=v.value.findIndex(ue=>ue.value===l.modelValue&&!ue.disabled);if(me>=0){i.value=me;return}if(b.value.length===0){i.value=-1;return}i.value=W==="last"?b.value[b.value.length-1]:b.value[0]},M=W=>{if(b.value.length===0){i.value=-1;return}const me=b.value.indexOf(i.value);if(me===-1){i.value=W===1?b.value[0]:b.value[b.value.length-1];return}const ue=me+W;ue<0||ue>=b.value.length||(i.value=b.value[ue])},J=(W="first")=>{l.disabled||(V(!0),z(W))},I=()=>o.value.trim()!==""||!l.modelValue?!1:(a("update:modelValue",""),!0),R=(W=!1)=>{V(!1),i.value=-1,W&&(I()||p.value&&o.value!==p.value&&(o.value=p.value))},K=W=>{W.disabled||(o.value=W.label,a("update:modelValue",W.value),R(!1))},pe=W=>{if(o.value=W.target.value,a("input-change",o.value),!l.disabled){if(!S.value){J("first");return}z("first")}},Q=()=>{J("first")},T=()=>{S.value||J("first")},O=W=>{if(!l.disabled){if(gt(W)){S.value&&(W.preventDefault(),R(!0));return}switch(W.key){case"ArrowDown":W.preventDefault(),S.value?M(1):J("first");break;case"ArrowUp":W.preventDefault(),S.value?M(-1):J("last");break;case"Enter":S.value&&C.value&&!C.value.disabled&&(W.preventDefault(),K(C.value));break;case"Home":if(!S.value)return;W.preventDefault(),z("first");break;case"End":if(!S.value)return;W.preventDefault(),z("last");break;case"Tab":R(!0);break}}},se=W=>{const me=v.value[W];me&&!me.disabled&&(i.value=W)},ve=W=>{var me;if(!S.value)return;const ue=W.target;ue instanceof Node&&((me=r.value)!=null&&me.contains(ue)||R(!0))};return Fe(S,W=>{W?document.addEventListener("pointerdown",ve):document.removeEventListener("pointerdown",ve)}),Fe(()=>l.modelValue,()=>{S.value||B()},{immediate:!0}),Fe(()=>l.options,()=>{if(!S.value){B();return}z("first")},{deep:!0}),Fe(v,()=>{if(!S.value)return;if(v.value.length===0){i.value=-1;return}const W=v.value[i.value];(!W||W.disabled)&&z("first")}),Ge(()=>{document.removeEventListener("pointerdown",ve)}),(W,me)=>(f(),g("div",{ref_key:"rootRef",ref:r,class:ce(E.value),style:Pe(A.value),"data-state":y(S)?"open":"closed"},[_("div",Hc,[W.$slots.prefix?(f(),g("span",jc,[U(W.$slots,"prefix")])):j("",!0),_("input",Ce(w.value,{class:"tree-combobox__input",role:"combobox",type:"text",value:o.value,placeholder:e.placeholder,disabled:e.disabled,"aria-controls":y(S)?y(n):void 0,"aria-expanded":y(S),"aria-activedescendant":x.value,"aria-invalid":e.invalid||void 0,"aria-busy":e.loading||void 0,"aria-autocomplete":"list","aria-haspopup":"listbox",onInput:pe,onFocus:Q,onClick:T,onKeydown:O}),null,16,Kc),e.loading?(f(),he($t,{key:1,size:"sm",label:"Loading"})):(f(),g("svg",Uc,[...me[0]||(me[0]=[_("polyline",{points:"4 6 8 10 12 6"},null,-1)])]))]),L(Lt,{name:"tree-fade"},{default:N(()=>[y(S)&&!e.disabled?(f(),g("ul",{key:0,id:y(n),role:"listbox",class:"tree-combobox__listbox","aria-label":D.value,"aria-labelledby":$.value},[v.value.length===0?(f(),g("li",Gc,[U(W.$slots,"empty",{query:o.value},()=>[de(H(e.emptyText),1)])])):(f(!0),g(_e,{key:1},Ae(v.value,(ue,ae)=>(f(),g("li",{id:u(ue.value),key:ue.value,role:"option",class:ce(["tree-combobox__option",{"is-active":ae===i.value,"is-disabled":ue.disabled,"is-selected":ue.value===e.modelValue}]),"aria-selected":ue.value===e.modelValue,"aria-disabled":ue.disabled||void 0,onMouseenter:De=>se(ae),onClick:De=>K(ue)},[U(W.$slots,"option",{option:ue,selected:ue.value===e.modelValue,active:ae===i.value},()=>[_("span",Qc,[_("span",Yc,H(ue.label),1),ue.description?(f(),g("span",Jc,H(ue.description),1)):j("",!0)]),ue.value===e.modelValue?(f(),g("svg",Xc,[...me[1]||(me[1]=[_("polyline",{points:"3.5 8.5 6.5 11.5 12.5 4.5"},null,-1)])])):j("",!0)])],42,qc))),128))],8,Wc)):j("",!0)]),_:3})],14,Rc))}}),Zc=["data-state"],ef=["aria-disabled"],tf=["data-state"],lf={class:"tree-modal__positioner"},af=["id","aria-labelledby","aria-describedby"],sf={key:0,class:"tree-modal__topbar"},nf={class:"tree-modal__title"},rf=["aria-label"],of={class:"tree-modal__body"},uf={key:2,class:"tree-modal__footer"},ma=fe({inheritAttrs:!1,__name:"TreeModal",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"md"},title:{default:""},description:{default:""},closeOnEscape:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeLabel:{default:"Close modal"},id:{default:void 0}},emits:["update:open","open-change"],setup(e,{emit:t}){const l=We("x"),a=e,s=t,n=Ie(),r=a.id??Xe("tree-modal"),i=`${r}-title`,o=`${r}-description`,d=ee(null),u=ee(null),c=ee(null),p=h(()=>!!(a.title||w.header)),w=xl(),D=h(()=>["tree-modal",n.class]),$=h(()=>n.style),S=h(()=>{const{class:T,style:O,...se}=n;return se}),V=h(()=>["tree-modal__surface",`tree-modal__surface--${a.size}`]),{value:E,setValue:A}=Ct(ot(a,"open"),a.defaultOpen,T=>{s("update:open",T),s("open-change",T)}),v=h(()=>p.value?i:void 0),b=h(()=>a.description?o:void 0);let C=0,x="";const B=()=>{typeof document>"u"||(C===0&&(x=document.body.style.overflow,document.body.style.overflow="hidden"),C+=1)},z=()=>{typeof document>"u"||C===0||(C-=1,C===0&&(document.body.style.overflow=x))},M=()=>{Ke(()=>{u.value&&(va(u.value)||u.value.focus())})},J=()=>{a.disabled||(c.value=document.activeElement,A(!0))},I=()=>{A(!1)},R=T=>{if(a.disabled){T.preventDefault(),T.stopPropagation();return}T.defaultPrevented||J()},K=()=>{a.closeOnOverlay&&I()},pe=T=>{T.stopPropagation()},Q=T=>{if(gt(T)&&a.closeOnEscape){T.preventDefault(),I();return}if(T.key!=="Tab"||!u.value)return;const O=es(u.value);if(!O.length){T.preventDefault(),u.value.focus();return}const se=O[0],ve=O[O.length-1],W=document.activeElement;T.shiftKey&&W===se&&(T.preventDefault(),ao(u.value)),!T.shiftKey&&W===ve&&(T.preventDefault(),va(u.value))};return Fe(E,(T,O)=>{if(T){B(),M();return}O&&(z(),Ke(()=>{var se;(se=c.value)==null||se.focus()}))}),Ge(()=>{E.value&&z()}),(T,O)=>(f(),g("div",{ref_key:"rootRef",ref:d,class:ce(D.value),style:Pe($.value),"data-state":y(E)?"open":"closed"},[T.$slots.trigger?(f(),g("span",Ce({key:0,class:"tree-modal__trigger"},S.value,{"aria-disabled":e.disabled||void 0,onClick:R}),[U(T.$slots,"trigger")],16,ef)):j("",!0),(f(),he(Qa,{to:"body"},[L(Lt,{name:"tree-modal-fade"},{default:N(()=>[y(E)?(f(),g("div",{key:0,class:"tree-modal__portal","data-state":y(E)?"open":"closed"},[_("div",{class:"tree-modal__backdrop","aria-hidden":"true",onClick:K}),_("div",lf,[_("div",{id:y(r),ref_key:"surfaceRef",ref:u,class:ce(V.value),role:"dialog","aria-modal":"true","aria-labelledby":v.value,"aria-describedby":b.value,tabindex:"-1",onClick:pe,onKeydown:Q},[p.value||e.showCloseButton?(f(),g("div",sf,[p.value?(f(),g("div",{key:0,id:i,class:"tree-modal__header"},[U(T.$slots,"header",{},()=>[_("h2",nf,H(e.title),1)])])):j("",!0),e.showCloseButton?(f(),g("button",{key:1,type:"button",class:"tree-modal__close","aria-label":e.closeLabel,onClick:I},[L(y(l),ol(ul(y(_t))),null,16)],8,rf)):j("",!0)])):j("",!0),e.description?(f(),g("p",{key:1,id:o,class:"tree-modal__description"},H(e.description),1)):j("",!0),_("div",of,[U(T.$slots,"content",{},()=>[U(T.$slots,"default")])]),T.$slots.footer?(f(),g("div",uf,[U(T.$slots,"footer")])):j("",!0)],42,af)])],8,tf)):j("",!0)]),_:3})]))],14,Zc))}}),df={key:0,class:"tree-confirm-dialog__icon","aria-hidden":"true"},cf={key:1,class:"tree-confirm-dialog__body"},Is=fe({inheritAttrs:!1,__name:"TreeConfirmDialog",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"sm"},title:{default:""},description:{default:""},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},confirmVariant:{default:"danger"},confirmDisabled:{type:Boolean,default:!1},cancelDisabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!1},showCloseButton:{type:Boolean,default:!1},closeLabel:{default:"Close dialog"},closeOnConfirm:{type:Boolean,default:!0},closeOnCancel:{type:Boolean,default:!0}},emits:["confirm","cancel","update:open","open-change"],setup(e,{emit:t}){const l=xl(),a=e,s=t,n=Ie(),{value:r,setValue:i}=Ct(ot(a,"open"),a.defaultOpen,D=>{s("update:open",D),s("open-change",D)}),o=h(()=>["tree-confirm-dialog",{"tree-confirm-dialog--with-icon":!!l.icon}]),d=h(()=>!!l.default),u=()=>{i(!1)},c=D=>{i(D)},p=()=>{a.cancelDisabled||(s("cancel"),a.closeOnCancel&&u())},w=()=>{a.confirmDisabled||a.loading||(s("confirm"),a.closeOnConfirm&&u())};return(D,$)=>(f(),he(ma,Ce(y(n),{open:y(r),disabled:e.disabled,size:e.size,title:e.title,description:e.description,"close-on-escape":e.closeOnEscape,"close-on-overlay":e.closeOnOverlay,"show-close-button":e.showCloseButton,"close-label":e.closeLabel,"onUpdate:open":c}),Vu({content:N(()=>[_("div",{class:ce(o.value)},[D.$slots.icon?(f(),g("div",df,[U(D.$slots,"icon")])):j("",!0),d.value?(f(),g("div",cf,[U(D.$slots,"default")])):j("",!0)],2)]),footer:N(()=>[U(D.$slots,"actions",{confirm:w,cancel:p,loading:e.loading},()=>[L(et,{variant:"ghost",disabled:e.cancelDisabled,onClick:p},{default:N(()=>[de(H(e.cancelLabel),1)]),_:1},8,["disabled"]),L(et,{variant:e.confirmVariant,loading:e.loading,disabled:e.confirmDisabled,onClick:w},{default:N(()=>[de(H(e.confirmLabel),1)]),_:1},8,["variant","loading","disabled"])])]),_:2},[D.$slots.trigger?{name:"trigger",fn:N(()=>[U(D.$slots,"trigger")]),key:"0"}:void 0]),1040,["open","disabled","size","title","description","close-on-escape","close-on-overlay","show-close-button","close-label"]))}}),Vs=fe({inheritAttrs:!1,__name:"TreeContainer",props:{as:{default:"div"},size:{default:"lg"},padded:{type:Boolean,default:!0},centered:{type:Boolean,default:!0}},setup(e){const t=e,l=Ie(),a=h(()=>["tree-container",`tree-container--${t.size}`,{"is-padded":t.padded,"is-centered":t.centered},l.class]),s=h(()=>l.style),n=h(()=>{const{class:r,style:i,...o}=l;return o});return(r,i)=>(f(),he(xt(e.as),Ce(n.value,{class:a.value,style:s.value}),{default:N(()=>[U(r.$slots,"default")]),_:3},16,["class","style"]))}}),ff=["data-state"],pf=["id"],vf=["aria-disabled","tabindex","onClick","onKeydown"],or=fe({__name:"TreeContextMenu",props:{items:{default:()=>[]},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"md"}},emits:["select","update:open","open-change"],setup(e,{emit:t}){const l=e,a=t,s=Xe("tree-context-menu"),n=ee(null),r=ee(new Map),i=ee(-1),o=ee({x:0,y:0}),{value:d,setValue:u}=Ct(ot(l,"open"),l.defaultOpen,x=>{a("update:open",x),a("open-change",x)}),c=h(()=>["tree-context-menu",`tree-context-menu--${l.size}`,{"is-disabled":l.disabled,"is-open":d.value}]),p=h(()=>l.items.filter(x=>!x.disabled)),w=(x,B)=>{l.disabled||(o.value={x,y:B},i.value=p.value.length>0?l.items.indexOf(p.value[0]):0,u(!0),Ke(()=>S(i.value)))},D=(x=!1)=>{u(!1),i.value=-1,x&&Ke(()=>{var B;return(B=n.value)==null?void 0:B.focus()})},$=x=>{x.disabled||(a("select",x.value),D(!0))},S=x=>{const B=l.items[x];if(!B)return;const z=r.value.get(B.value);z==null||z.focus()},V=(x,B)=>{x instanceof HTMLElement?r.value.set(B,x):r.value.delete(B)},E=x=>{let B=i.value+x;for(;B>=0&&B<l.items.length;){if(!l.items[B].disabled){i.value=B,S(B);return}B+=x}},A=x=>{l.disabled||(x.preventDefault(),w(x.clientX,x.clientY))},v=(x,B)=>{if(gt(x)){x.preventDefault(),D(!0);return}if(bt(x)){x.preventDefault(),$(B);return}switch(x.key){case"ArrowDown":x.preventDefault(),E(1);break;case"ArrowUp":x.preventDefault(),E(-1);break;case"Home":x.preventDefault(),i.value=p.value.length>0?l.items.indexOf(p.value[0]):0,S(i.value);break;case"End":x.preventDefault(),i.value=p.value.length>0?l.items.indexOf(p.value[p.value.length-1]):l.items.length-1,S(i.value);break}},b=x=>{if(!d.value)return;const B=x.target;if(!(B instanceof Node))return;const z=document.getElementById(s);z!=null&&z.contains(B)||D()},C=x=>{var B;if(!d.value)return;const z=x.target;z instanceof Node&&((B=n.value)!=null&&B.contains(z)||D())};return Fe(d,x=>{x?(document.addEventListener("pointerdown",b),document.addEventListener("contextmenu",C)):(document.removeEventListener("pointerdown",b),document.removeEventListener("contextmenu",C))}),Ge(()=>{document.removeEventListener("pointerdown",b),document.removeEventListener("contextmenu",C)}),(x,B)=>(f(),g("div",{ref_key:"rootRef",ref:n,class:ce(c.value),"data-state":y(d)?"open":"closed",onContextmenu:A},[U(x.$slots,"default"),(f(),he(Qa,{to:"body"},[L(Lt,{name:"tree-fade"},{default:N(()=>[y(d)&&!e.disabled?(f(),g("ul",{key:0,id:y(s),role:"menu",class:ce(["tree-context-menu__menu",`tree-context-menu--${e.size}`]),style:Pe({top:`${o.value.y}px`,left:`${o.value.x}px`}),"aria-label":"Context menu"},[(f(!0),g(_e,null,Ae(e.items,(z,M)=>(f(),g("li",{key:z.value,ref_for:!0,ref:J=>V(J,z.value),role:"menuitem",class:ce(["tree-context-menu__item",{"is-disabled":z.disabled,"is-focused":M===i.value}]),"aria-disabled":z.disabled||void 0,tabindex:z.disabled?-1:0,onClick:J=>$(z),onKeydown:J=>v(J,z)},[U(x.$slots,"item",{item:z,index:M},()=>[de(H(z.label),1)])],42,vf))),128))],14,pf)):j("",!0)]),_:3})]))],42,ff))}}),mf=["data-state"],hf=["name","value"],bf=["disabled","aria-controls","aria-expanded","aria-invalid"],gf={key:0,class:"tree-date-picker__slot tree-date-picker__slot--prefix"},yf=["data-placeholder"],_f={class:"tree-date-picker__slot tree-date-picker__slot--suffix"},kf=["id"],wf={class:"tree-date-picker__header"},Tf=["disabled"],xf=["disabled"],$f={class:"tree-date-picker__weekdays","aria-hidden":"true"},Cf=["aria-selected"],Sf=["data-date","disabled","tabindex","aria-current","aria-label","onClick","onKeydown"],ur=fe({inheritAttrs:!1,__name:"TreeDatePicker",props:{modelValue:{default:""},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:"Select date"},locale:{default:"en-US"},min:{default:""},max:{default:""},weekStartsOn:{default:0},id:{default:void 0}},emits:["update:modelValue","update:open","open-change","select"],setup(e,{emit:t}){const l=We("calendar"),a=We("chevron-left"),s=We("chevron-right"),n=e,r=t,i=Ie(),o=Et(new Date),d=h(()=>bs(n.modelValue)),u=h(()=>bs(n.min)),c=h(()=>bs(n.max)),p=n.id??Xe("tree-date-picker"),w=`${p}-caption`,D=ee(null),$=ee(null),S=new Map,V=ee(yt(d.value??o)),E=ee(d.value??o),A=h(()=>{const{class:oe,style:xe,name:ze,...te}=i;return te}),v=h(()=>typeof i.name=="string"?i.name:void 0),b=h(()=>["tree-date-picker",`tree-date-picker--${n.size}`,{"is-disabled":n.disabled,"is-invalid":n.invalid,"is-open":x.value},i.class]),C=h(()=>i.style),{value:x,setValue:B}=Ct(ot(n,"open"),n.defaultOpen,oe=>{r("update:open",oe),r("open-change",oe)}),z=h(()=>d.value?new Intl.DateTimeFormat(n.locale,{day:"numeric",month:"long",year:"numeric"}).format(d.value):n.placeholder),M=h(()=>new Intl.DateTimeFormat(n.locale,{month:"long",year:"numeric"}).format(V.value)),J=h(()=>{const oe=new Intl.DateTimeFormat(n.locale,{weekday:"short"}),xe=il(new Date(2024,0,7),n.weekStartsOn);return Array.from({length:7},(ze,te)=>oe.format(ct(xe,te)))}),I=oe=>!!(n.disabled||u.value&&oe<u.value||c.value&&oe>c.value),R=oe=>{E.value=Et(oe),V.value=yt(oe)};Fe(d,oe=>{if(oe){R(oe);return}x.value||R(o)},{immediate:!0});const K=h(()=>{const oe=il(yt(V.value),n.weekStartsOn);return Array.from({length:6},(xe,ze)=>Array.from({length:7},(te,m)=>{const k=ct(oe,ze*7+m),F=Fl(k);return{date:k,dayLabel:k.getDate(),disabled:I(k),inMonth:k.getMonth()===V.value.getMonth(),isFocused:Ol(k,E.value),isSelected:Ol(k,d.value),isToday:Ol(k,o),key:F}}))}),pe=h(()=>u.value?yt(V.value)>yt(u.value):!0),Q=h(()=>c.value?yt(V.value)<yt(c.value):!0),T=()=>{const oe=Fl(E.value);Ke(()=>{var xe;(xe=S.get(oe))==null||xe.focus()})},O=(oe,xe)=>{if(oe instanceof HTMLButtonElement){S.set(xe,oe);return}S.delete(xe)},se=()=>{n.disabled||(R(d.value??E.value??o),B(!0),T())},ve=(oe=!1)=>{B(!1),oe&&Ke(()=>{var xe;(xe=$.value)==null||xe.focus()})},W=()=>{if(x.value){ve();return}se()},me=oe=>{const xe=Ll(V.value,oe);R(xe),T()},ue=oe=>{I(oe)||(R(oe),T())},ae=oe=>{if(I(oe))return;const xe=Et(oe),ze=Fl(xe);R(xe),r("update:modelValue",ze),r("select",ze),ve(!0)},De=oe=>{if(!n.disabled){if(gt(oe)&&x.value){oe.preventDefault(),ve();return}(bt(oe)||oe.key==="ArrowDown"||oe.key==="ArrowUp")&&(oe.preventDefault(),se())}},ye=(oe,xe)=>{if(gt(oe)){oe.preventDefault(),ve(!0);return}if(bt(oe)){oe.preventDefault(),ae(xe);return}switch(oe.key){case"ArrowLeft":oe.preventDefault(),ue(ct(xe,-1));break;case"ArrowRight":oe.preventDefault(),ue(ct(xe,1));break;case"ArrowUp":oe.preventDefault(),ue(ct(xe,-7));break;case"ArrowDown":oe.preventDefault(),ue(ct(xe,7));break;case"Home":oe.preventDefault(),ue(il(xe,n.weekStartsOn));break;case"End":oe.preventDefault(),ue(ct(il(xe,n.weekStartsOn),6));break;case"PageUp":oe.preventDefault(),ue(Ll(xe,oe.shiftKey?-12:-1));break;case"PageDown":oe.preventDefault(),ue(Ll(xe,oe.shiftKey?12:1));break}},Oe=oe=>{var xe;if(!x.value)return;const ze=oe.target;ze instanceof Node&&((xe=D.value)!=null&&xe.contains(ze)||ve())};return Fe(x,oe=>{if(oe){document.addEventListener("pointerdown",Oe);return}document.removeEventListener("pointerdown",Oe)}),Ge(()=>{document.removeEventListener("pointerdown",Oe)}),(oe,xe)=>(f(),g("div",{ref_key:"rootRef",ref:D,class:ce(b.value),style:Pe(C.value),"data-state":y(x)?"open":"closed"},[v.value?(f(),g("input",{key:0,type:"hidden",name:v.value,value:e.modelValue},null,8,hf)):j("",!0),_("button",Ce({ref_key:"triggerRef",ref:$},A.value,{type:"button",class:"tree-date-picker__trigger",disabled:e.disabled,"aria-controls":y(x)?y(p):void 0,"aria-haspopup":"dialog","aria-expanded":y(x),"aria-invalid":e.invalid||void 0,onClick:W,onKeydown:De}),[oe.$slots.prefix?(f(),g("span",gf,[U(oe.$slots,"prefix")])):j("",!0),_("span",{class:"tree-date-picker__value","data-placeholder":d.value?void 0:!0},H(z.value),9,yf),_("span",_f,[U(oe.$slots,"suffix",{},()=>[L(y(l),ol(ul(y(_t))),null,16)])])],16,bf),L(Lt,{name:"tree-fade"},{default:N(()=>[y(x)&&!e.disabled?(f(),g("div",{key:0,id:y(p),class:"tree-date-picker__content",role:"dialog","aria-modal":"false","aria-labelledby":w},[_("div",wf,[_("button",{type:"button",class:"tree-date-picker__nav",disabled:!pe.value,"aria-label":"Previous month",onClick:xe[0]||(xe[0]=ze=>me(-1))},[L(y(a),ol(ul(y(_t))),null,16)],8,Tf),_("p",{id:w,class:"tree-date-picker__month"},H(M.value),1),_("button",{type:"button",class:"tree-date-picker__nav",disabled:!Q.value,"aria-label":"Next month",onClick:xe[1]||(xe[1]=ze=>me(1))},[L(y(s),ol(ul(y(_t))),null,16)],8,xf)]),_("div",$f,[(f(!0),g(_e,null,Ae(J.value,ze=>(f(),g("span",{key:ze,class:"tree-date-picker__weekday"},H(ze),1))),128))]),_("div",{class:"tree-date-picker__grid",role:"grid","aria-labelledby":w},[(f(!0),g(_e,null,Ae(K.value,(ze,te)=>(f(),g("div",{key:te,class:"tree-date-picker__row",role:"row"},[(f(!0),g(_e,null,Ae(ze,m=>(f(),g("div",{key:m.key,class:"tree-date-picker__cell",role:"gridcell","aria-selected":m.isSelected},[_("button",{ref_for:!0,ref:k=>O(k,m.key),type:"button",class:ce(["tree-date-picker__day",{"is-muted":!m.inMonth,"is-selected":m.isSelected,"is-today":m.isToday}]),"data-date":m.key,disabled:m.disabled,tabindex:m.isFocused?0:-1,"aria-current":m.isToday?"date":void 0,"aria-label":m.key,onClick:k=>ae(m.date),onKeydown:k=>ye(k,m.date)},H(m.dayLabel),43,Sf)],8,Cf))),128))]))),128))])],8,kf)):j("",!0)]),_:1})],14,mf))}}),Df=["data-state"],Af=["name","value"],Ef=["disabled","aria-controls","aria-expanded","aria-invalid"],If={key:0,class:"tree-date-picker__slot tree-date-picker__slot--prefix"},Vf=["data-placeholder"],Mf={class:"tree-date-picker__slot tree-date-picker__slot--suffix"},Bf=["id"],Lf={class:"tree-date-time-picker__calendar"},Of={class:"tree-date-picker__header"},Ff=["disabled"],Nf=["disabled"],Pf={class:"tree-date-picker__weekdays","aria-hidden":"true"},zf=["aria-selected"],Rf=["data-date","tabindex","disabled","aria-pressed","onClick","onKeydown"],Hf={class:"tree-date-time-picker__summary"},jf={class:"tree-date-time-picker__summary-value"},Kf={class:"tree-date-time-picker__time"},Uf={class:"tree-date-time-picker__time-field"},Wf=["value"],Gf=["value","disabled"],qf={class:"tree-date-time-picker__time-field"},Qf=["value"],Yf=["value","disabled"],dr=fe({inheritAttrs:!1,__name:"TreeDateTimePicker",props:{modelValue:{default:""},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:"Select date and time"},locale:{default:"en-US"},min:{default:""},max:{default:""},weekStartsOn:{default:0},id:{default:void 0},step:{default:60}},emits:["update:modelValue","update:open","open-change","change","select"],setup(e,{emit:t}){const l=We("calendar"),a=We("chevron-left"),s=We("chevron-right"),n=/^(\d{4})-(\d{2})-(\d{2})$/,r=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/,i=e,o=t,d=Ie(),u=P=>new Date(P.getTime()),c=P=>`${P}`.padStart(2,"0"),p=P=>new Date(P.getFullYear(),P.getMonth(),P.getDate(),23,59,59,999),w=(P,Z="exact")=>{if(!P)return null;const Te=P.match(n);if(Te){const[,fo,po,vo]=Te,cn=Number.parseInt(fo,10),fn=Number.parseInt(po,10),pn=Number.parseInt(vo,10),mo=Z==="end"?23:0,ho=Z==="end"?59:0,bo=Z==="end"?59:0,go=Z==="end"?999:0,Wl=new Date(cn,fn-1,pn,mo,ho,bo,go);return Number.isNaN(Wl.getTime())||Wl.getFullYear()!==cn||Wl.getMonth()!==fn-1||Wl.getDate()!==pn?null:Wl}const at=P.match(r);if(!at)return null;const[,Ye,tt,as,uo,co,an]=at,sn=Number.parseInt(Ye,10),nn=Number.parseInt(tt,10),rn=Number.parseInt(as,10),on=Number.parseInt(uo,10),un=Number.parseInt(co,10),dn=an?Number.parseInt(an,10):0,tl=new Date(sn,nn-1,rn,on,un,dn,0);return Number.isNaN(tl.getTime())||tl.getFullYear()!==sn||tl.getMonth()!==nn-1||tl.getDate()!==rn||tl.getHours()!==on||tl.getMinutes()!==un||tl.getSeconds()!==dn?null:tl},D=P=>`${Fl(P)}T${c(P.getHours())}:${c(P.getMinutes())}`,$=(P,Z)=>new Date(Z.getFullYear(),Z.getMonth(),Z.getDate(),P.getHours(),P.getMinutes(),0,0),S=(P,Z,Te)=>new Date(P.getFullYear(),P.getMonth(),P.getDate(),Z,Te,0,0),V=P=>{if(!Number.isFinite(P)||P<=0||P%60!==0)return 1;const Z=P/60;return Z>=60?1:Z},E=Et(new Date),A=h(()=>w(i.modelValue,"exact")),v=h(()=>w(i.min,"start")),b=h(()=>w(i.max,"end")),C=i.id??Xe("tree-date-time-picker"),x=`${C}-caption`,B=ee(null),z=ee(null),M=new Map,J=P=>{let Z=u(P);return v.value&&Z<v.value&&(Z=u(v.value)),b.value&&Z>b.value&&(Z=u(b.value)),Z},I=()=>{const P=new Date,Z=Math.max(i.step,60)*1e3,Te=new Date(Math.ceil(P.getTime()/Z)*Z);return Te.setSeconds(0,0),J(Te)},R=A.value??I(),K=ee(R),pe=ee(Et(R)),Q=ee(yt(R)),T=h(()=>{const{class:P,style:Z,name:Te,...at}=d;return at}),O=h(()=>typeof d.name=="string"?d.name:void 0),se=h(()=>["tree-date-picker","tree-date-time-picker",`tree-date-picker--${i.size}`,{"is-disabled":i.disabled,"is-invalid":i.invalid,"is-loading":i.loading,"is-open":W.value},d.class]),ve=h(()=>d.style),{value:W,setValue:me}=Ct(ot(i,"open"),i.defaultOpen,P=>{o("update:open",P),o("open-change",P)}),ue=h(()=>A.value?new Intl.DateTimeFormat(i.locale,{day:"numeric",hour:"2-digit",minute:"2-digit",month:"long",year:"numeric"}).format(A.value):i.placeholder),ae=h(()=>new Intl.DateTimeFormat(i.locale,{day:"numeric",hour:"2-digit",minute:"2-digit",month:"long",year:"numeric"}).format(K.value)),De=h(()=>new Intl.DateTimeFormat(i.locale,{month:"long",year:"numeric"}).format(Q.value)),ye=h(()=>{const P=new Intl.DateTimeFormat(i.locale,{weekday:"short"}),Z=il(new Date(2024,0,7),i.weekStartsOn);return Array.from({length:7},(Te,at)=>P.format(ct(Z,at)))}),Oe=h(()=>V(i.step)),oe=h(()=>{const P=new Set;for(let Z=0;Z<60;Z+=Oe.value)P.add(Z);return P.add(K.value.getMinutes()),[...P].sort((Z,Te)=>Z-Te)}),xe=P=>{if(i.disabled)return!0;const Z=Et(P),Te=p(P);return!!(v.value&&Te<v.value||b.value&&Z>b.value)},ze=P=>!!(i.disabled||v.value&&P<v.value||b.value&&P>b.value),te=P=>{pe.value=Et(P),Q.value=yt(P)},m=P=>{const Z=J(P);K.value=Z,te(Z)};Fe(A,P=>{W.value||m(P??I())},{immediate:!0});const k=h(()=>Et(K.value)),F=h(()=>{const P=il(yt(Q.value),i.weekStartsOn);return Array.from({length:6},(Z,Te)=>Array.from({length:7},(at,Ye)=>{const tt=ct(P,Te*7+Ye),as=Fl(tt);return{date:tt,dayLabel:tt.getDate(),disabled:xe(tt),inMonth:tt.getMonth()===Q.value.getMonth(),isFocused:Ol(tt,pe.value),isSelected:Ol(tt,k.value),isToday:Ol(tt,E),key:as}}))}),q=h(()=>v.value?yt(Q.value)>yt(v.value):!0),G=h(()=>b.value?yt(Q.value)<yt(b.value):!0),Y=(P,Z)=>{const Te=S(K.value,P,Z);return!ze(Te)},ie=h(()=>Array.from({length:24},(P,Z)=>({disabled:!oe.value.some(Te=>Y(Z,Te)),label:c(Z),value:Z}))),ne=h(()=>oe.value.map(P=>({disabled:!Y(K.value.getHours(),P),label:c(P),value:P}))),le=()=>{const P=Fl(pe.value);Ke(()=>{var Z;(Z=M.get(P))==null||Z.focus()})},X=(P,Z)=>{if(P instanceof HTMLButtonElement){M.set(Z,P);return}M.delete(Z)},ge=()=>{i.disabled||(m(A.value??I()),me(!0),le())},re=(P=!1)=>{me(!1),P&&Ke(()=>{var Z;(Z=z.value)==null||Z.focus()})},be=()=>{if(W.value){re();return}ge()},we=P=>{const Z=Ll(Q.value,P);te(Z),le()},Se=P=>{xe(P)||(te(P),le())},Be=P=>{if(xe(P))return;const Z=J($(K.value,P));K.value=Z,te(Z)},Ne=P=>{if(!i.disabled){if(gt(P)&&W.value){P.preventDefault(),re();return}(bt(P)||P.key==="ArrowDown"||P.key==="ArrowUp")&&(P.preventDefault(),ge())}},Ue=(P,Z)=>{if(gt(P)){P.preventDefault(),re(!0);return}if(bt(P)){P.preventDefault(),Be(Z);return}switch(P.key){case"ArrowLeft":P.preventDefault(),Se(ct(Z,-1));break;case"ArrowRight":P.preventDefault(),Se(ct(Z,1));break;case"ArrowUp":P.preventDefault(),Se(ct(Z,-7));break;case"ArrowDown":P.preventDefault(),Se(ct(Z,7));break;case"Home":P.preventDefault(),Se(il(Z,i.weekStartsOn));break;case"End":P.preventDefault(),Se(ct(il(Z,i.weekStartsOn),6));break;case"PageUp":P.preventDefault(),Se(Ll(Z,P.shiftKey?-12:-1));break;case"PageDown":P.preventDefault(),Se(Ll(Z,P.shiftKey?12:1));break}},Qe=P=>{const Z=Number.parseInt(P.target.value,10),Te=K.value.getMinutes();if(Number.isNaN(Z))return;const at=oe.value.filter(tt=>Y(Z,tt));if(!at.length)return;const Ye=at.includes(Te)?Te:at[0];K.value=S(K.value,Z,Ye)},St=P=>{const Z=Number.parseInt(P.target.value,10),Te=K.value.getHours();Number.isNaN(Z)||!Y(Te,Z)||(K.value=S(K.value,Te,Z))},Dt=()=>{const P=D(K.value);o("update:modelValue",P),o("change",P),o("select",P),re(!0)},pl=()=>{o("update:modelValue",""),o("change",""),o("select",""),re(!0)},$l=P=>{var Z;if(!W.value)return;const Te=P.target;Te instanceof Node&&((Z=B.value)!=null&&Z.contains(Te)||re())};return Fe(W,P=>{if(P){document.addEventListener("pointerdown",$l);return}document.removeEventListener("pointerdown",$l)}),Ge(()=>{document.removeEventListener("pointerdown",$l)}),(P,Z)=>(f(),g("div",{ref_key:"rootRef",ref:B,class:ce(se.value),style:Pe(ve.value),"data-state":y(W)?"open":"closed"},[O.value?(f(),g("input",{key:0,type:"hidden",name:O.value,value:e.modelValue},null,8,Af)):j("",!0),_("button",Ce({ref_key:"triggerRef",ref:z},T.value,{type:"button",class:"tree-date-picker__trigger tree-date-time-picker__trigger",disabled:e.disabled,"aria-controls":y(W)?y(C):void 0,"aria-haspopup":"dialog","aria-expanded":y(W),"aria-invalid":e.invalid||void 0,onClick:be,onKeydown:Ne}),[P.$slots.prefix?(f(),g("span",If,[U(P.$slots,"prefix")])):j("",!0),_("span",{class:"tree-date-picker__value","data-placeholder":A.value?void 0:!0},H(ue.value),9,Vf),_("span",Mf,[U(P.$slots,"suffix",{},()=>[e.loading?(f(),he($t,{key:0,size:"sm",label:"Loading"})):(f(),he(y(l),ol(Ce({key:1},y(_t))),null,16))])])],16,Ef),L(Lt,{name:"tree-fade"},{default:N(()=>[y(W)&&!e.disabled?(f(),g("div",{key:0,id:y(C),class:"tree-date-picker__content tree-date-time-picker__content",role:"dialog","aria-modal":"false","aria-labelledby":x},[_("div",Lf,[_("div",Of,[_("button",{type:"button",class:"tree-date-picker__nav",disabled:!q.value,"aria-label":"Previous month",onClick:Z[0]||(Z[0]=Te=>we(-1))},[L(y(a),ol(ul(y(_t))),null,16)],8,Ff),_("p",{id:x,class:"tree-date-picker__month"},H(De.value),1),_("button",{type:"button",class:"tree-date-picker__nav",disabled:!G.value,"aria-label":"Next month",onClick:Z[1]||(Z[1]=Te=>we(1))},[L(y(s),ol(ul(y(_t))),null,16)],8,Nf)]),_("div",Pf,[(f(!0),g(_e,null,Ae(ye.value,Te=>(f(),g("span",{key:Te,class:"tree-date-picker__weekday"},H(Te),1))),128))]),_("div",{class:"tree-date-picker__grid",role:"grid","aria-labelledby":x},[(f(!0),g(_e,null,Ae(F.value,(Te,at)=>(f(),g("div",{key:at,class:"tree-date-picker__row",role:"row"},[(f(!0),g(_e,null,Ae(Te,Ye=>(f(),g("div",{key:Ye.key,class:"tree-date-picker__cell",role:"gridcell","aria-selected":Ye.isSelected},[_("button",{ref_for:!0,ref:tt=>X(tt,Ye.key),type:"button",class:ce(["tree-date-picker__day",{"is-muted":!Ye.inMonth,"is-selected":Ye.isSelected,"is-today":Ye.isToday}]),"data-date":Ye.key,tabindex:Ye.isFocused?0:-1,disabled:Ye.disabled,"aria-pressed":Ye.isSelected,onClick:tt=>Be(Ye.date),onKeydown:tt=>Ue(tt,Ye.date)},H(Ye.dayLabel),43,Rf)],8,zf))),128))]))),128))])]),_("div",Hf,[Z[2]||(Z[2]=_("p",{class:"tree-date-time-picker__eyebrow"}," Selected slot ",-1)),_("p",jf,H(ae.value),1)]),_("div",Kf,[_("label",Uf,[Z[3]||(Z[3]=_("span",{class:"tree-date-time-picker__time-label"},"Hour",-1)),_("select",{class:"tree-date-time-picker__select",value:K.value.getHours(),"aria-label":"Select hour",onChange:Qe},[(f(!0),g(_e,null,Ae(ie.value,Te=>(f(),g("option",{key:Te.value,value:Te.value,disabled:Te.disabled},H(Te.label),9,Gf))),128))],40,Wf)]),_("label",qf,[Z[4]||(Z[4]=_("span",{class:"tree-date-time-picker__time-label"},"Minute",-1)),_("select",{class:"tree-date-time-picker__select",value:K.value.getMinutes(),"aria-label":"Select minute",onChange:St},[(f(!0),g(_e,null,Ae(ne.value,Te=>(f(),g("option",{key:Te.value,value:Te.value,disabled:Te.disabled},H(Te.label),9,Yf))),128))],40,Qf)])]),_("div",{class:"tree-date-time-picker__footer"},[_("button",{type:"button",class:"tree-button tree-button--ghost tree-button--sm",onClick:pl}," Clear "),_("button",{type:"button",class:"tree-button tree-button--solid tree-button--sm",onClick:Dt}," Apply ")])],8,Bf)):j("",!0)]),_:1})],14,Df))}}),Jf=["data-state"],Xf=["aria-disabled"],Zf=["data-state"],ep=["id","aria-labelledby","aria-describedby"],tp={key:0,class:"tree-drawer__topbar"},lp={class:"tree-drawer__title"},ap=["aria-label"],sp={class:"tree-drawer__body"},np={key:2,class:"tree-drawer__footer"},cr=fe({inheritAttrs:!1,__name:"TreeDrawer",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"md"},side:{default:"right"},title:{default:""},description:{default:""},closeOnEscape:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeLabel:{default:"Close drawer"},id:{default:void 0}},emits:["update:open","open-change"],setup(e,{emit:t}){const l=We("x"),a=e,s=t,n=Ie(),r=a.id??Xe("tree-drawer"),i=`${r}-title`,o=`${r}-description`,d=ee(null),u=ee(null),c=ee(null),p=h(()=>!!(a.title||w.header)),w=xl(),D=h(()=>["tree-drawer",n.class]),$=h(()=>n.style),S=h(()=>{const{class:T,style:O,...se}=n;return se}),V=h(()=>["tree-drawer__surface",`tree-drawer__surface--${a.size}`,`tree-drawer__surface--${a.side}`]),{value:E,setValue:A}=Ct(ot(a,"open"),a.defaultOpen,T=>{s("update:open",T),s("open-change",T)}),v=h(()=>p.value?i:void 0),b=h(()=>a.description?o:void 0);let C=0,x="";const B=()=>{typeof document>"u"||(C===0&&(x=document.body.style.overflow,document.body.style.overflow="hidden"),C+=1)},z=()=>{typeof document>"u"||C===0||(C-=1,C===0&&(document.body.style.overflow=x))},M=()=>{Ke(()=>{u.value&&(va(u.value)||u.value.focus())})},J=()=>{a.disabled||(c.value=document.activeElement,A(!0))},I=()=>{A(!1)},R=T=>{if(a.disabled){T.preventDefault(),T.stopPropagation();return}T.defaultPrevented||J()},K=()=>{a.closeOnOverlay&&I()},pe=T=>{T.stopPropagation()},Q=T=>{if(gt(T)&&a.closeOnEscape){T.preventDefault(),I();return}if(T.key!=="Tab"||!u.value)return;const O=es(u.value);if(!O.length){T.preventDefault(),u.value.focus();return}const se=O[0],ve=O[O.length-1],W=document.activeElement;T.shiftKey&&W===se&&(T.preventDefault(),ao(u.value)),!T.shiftKey&&W===ve&&(T.preventDefault(),va(u.value))};return Fe(E,(T,O)=>{if(T){B(),M();return}O&&(z(),Ke(()=>{var se;(se=c.value)==null||se.focus()}))}),Ge(()=>{E.value&&z()}),(T,O)=>(f(),g("div",{ref_key:"rootRef",ref:d,class:ce(D.value),style:Pe($.value),"data-state":y(E)?"open":"closed"},[T.$slots.trigger?(f(),g("span",Ce({key:0,class:"tree-drawer__trigger"},S.value,{"aria-disabled":e.disabled||void 0,onClick:R}),[U(T.$slots,"trigger")],16,Xf)):j("",!0),(f(),he(Qa,{to:"body"},[L(Lt,{name:"tree-drawer-fade"},{default:N(()=>[y(E)?(f(),g("div",{key:0,class:"tree-drawer__portal","data-state":y(E)?"open":"closed"},[_("div",{class:"tree-drawer__backdrop","aria-hidden":"true",onClick:K}),_("div",{id:y(r),ref_key:"surfaceRef",ref:u,class:ce(V.value),role:"dialog","aria-modal":"true","aria-labelledby":v.value,"aria-describedby":b.value,tabindex:"-1",onClick:pe,onKeydown:Q},[p.value||e.showCloseButton?(f(),g("div",tp,[p.value?(f(),g("div",{key:0,id:i,class:"tree-drawer__header"},[U(T.$slots,"header",{},()=>[_("h2",lp,H(e.title),1)])])):j("",!0),e.showCloseButton?(f(),g("button",{key:1,type:"button",class:"tree-drawer__close","aria-label":e.closeLabel,onClick:I},[L(y(l),ol(ul(y(_t))),null,16)],8,ap)):j("",!0)])):j("",!0),e.description?(f(),g("p",{key:1,id:o,class:"tree-drawer__description"},H(e.description),1)):j("",!0),_("div",sp,[U(T.$slots,"content",{},()=>[U(T.$slots,"default")])]),T.$slots.footer?(f(),g("div",np,[U(T.$slots,"footer")])):j("",!0)],42,ep)],8,Zf)):j("",!0)]),_:3})]))],14,Jf))}}),rp=["data-state"],ip={class:"tree-dropdown__trigger-wrapper"},op=["disabled","aria-controls","aria-expanded"],up={class:"tree-dropdown__label"},dp=["id","aria-label"],cp=["aria-disabled","tabindex","onClick","onKeydown"],fr=fe({inheritAttrs:!1,__name:"TreeDropdown",props:{items:{default:()=>[]},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"md"},label:{default:""}},emits:["select","update:open","open-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-dropdown"),r=ee(null),i=ee(null),o=ee(new Map),d=ee(-1),u=h(()=>{const{class:M,style:J,...I}=s;return I}),{value:c,setValue:p}=Ct(ot(l,"open"),l.defaultOpen,M=>{a("update:open",M),a("open-change",M)}),w=h(()=>["tree-dropdown",`tree-dropdown--${l.size}`,{"is-disabled":l.disabled,"is-open":c.value},s.class]),D=h(()=>s.style),$=h(()=>l.items.filter(M=>!M.disabled)),S=()=>{l.disabled||(d.value=$.value.length>0?l.items.indexOf($.value[0]):0,p(!0),Ke(()=>v(d.value)))},V=(M=!1)=>{p(!1),d.value=-1,M&&Ke(()=>{var J;return(J=i.value)==null?void 0:J.focus()})},E=()=>{c.value?V():S()},A=M=>{M.disabled||(a("select",M.value),V(!0))},v=M=>{const J=l.items[M];if(!J)return;const I=o.value.get(J.value);I==null||I.focus()},b=(M,J)=>{M instanceof HTMLElement?o.value.set(J,M):o.value.delete(J)},C=M=>{let J=d.value+M;for(;J>=0&&J<l.items.length;){if(!l.items[J].disabled){d.value=J,v(J);return}J+=M}},x=M=>{if(!l.disabled){if(gt(M)&&c.value){M.preventDefault(),V();return}(bt(M)||M.key==="ArrowDown"||M.key==="ArrowUp")&&(M.preventDefault(),S())}},B=(M,J)=>{if(gt(M)){M.preventDefault(),V(!0);return}if(bt(M)){M.preventDefault(),A(J);return}switch(M.key){case"ArrowDown":M.preventDefault(),C(1);break;case"ArrowUp":M.preventDefault(),C(-1);break;case"Home":M.preventDefault(),d.value=$.value.length>0?l.items.indexOf($.value[0]):0,v(d.value);break;case"End":M.preventDefault(),d.value=$.value.length>0?l.items.indexOf($.value[$.value.length-1]):l.items.length-1,v(d.value);break}},z=M=>{var J;if(!c.value)return;const I=M.target;I instanceof Node&&((J=r.value)!=null&&J.contains(I)||V())};return Fe(c,M=>{M?document.addEventListener("pointerdown",z):document.removeEventListener("pointerdown",z)}),Ge(()=>{document.removeEventListener("pointerdown",z)}),(M,J)=>(f(),g("div",{ref_key:"rootRef",ref:r,class:ce(w.value),style:Pe(D.value),"data-state":y(c)?"open":"closed"},[_("span",ip,[U(M.$slots,"trigger",{isOpen:y(c)},()=>[_("button",Ce({ref_key:"triggerRef",ref:i},u.value,{type:"button",class:"tree-dropdown__trigger",disabled:e.disabled,"aria-controls":y(c)?y(n):void 0,"aria-haspopup":"menu","aria-expanded":y(c),onClick:E,onKeydown:x}),[_("span",up,H(e.label),1),J[0]||(J[0]=_("svg",{class:"tree-dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("polyline",{points:"4 6 8 10 12 6"})],-1))],16,op)])]),L(Lt,{name:"tree-fade"},{default:N(()=>[y(c)&&!e.disabled?(f(),g("ul",{key:0,id:y(n),role:"menu",class:"tree-dropdown__menu","aria-label":e.label||void 0},[(f(!0),g(_e,null,Ae(e.items,(I,R)=>(f(),g("li",{key:I.value,ref_for:!0,ref:K=>b(K,I.value),role:"menuitem",class:ce(["tree-dropdown__item",{"is-disabled":I.disabled,"is-focused":R===d.value}]),"aria-disabled":I.disabled||void 0,tabindex:I.disabled?-1:0,onClick:K=>A(I),onKeydown:K=>B(K,I)},[U(M.$slots,"item",{item:I,index:R},()=>[de(H(I.label),1)])],42,cp))),128))],8,dp)):j("",!0)]),_:3})],14,rp))}}),fp={key:0,class:"tree-empty-state__icon","aria-hidden":"true"},pp={class:"tree-empty-state__content"},vp={key:2,class:"tree-empty-state__body"},mp={key:3,class:"tree-empty-state__actions"},Hl=fe({inheritAttrs:!1,__name:"TreeEmptyState",props:{as:{default:"section"},size:{default:"md"},title:{default:""},description:{default:""}},setup(e){const t=xl(),l=e,a=Ie(),s=Xe("tree-empty-state"),n=`${s}-title`,r=`${s}-description`,i=h(()=>!!(l.title||t.title)),o=h(()=>!!(l.description||t.description)),d=h(()=>["tree-empty-state",`tree-empty-state--${l.size}`,a.class]),u=h(()=>a.style),c=h(()=>{const{class:p,style:w,...D}=a;return D});return(p,w)=>(f(),he(xt(e.as),Ce(c.value,{class:d.value,style:u.value,"aria-labelledby":i.value?n:void 0,"aria-describedby":o.value?r:void 0}),{default:N(()=>[p.$slots.icon?(f(),g("div",fp,[U(p.$slots,"icon")])):j("",!0),_("div",pp,[i.value?(f(),g("h2",{key:0,id:n,class:"tree-empty-state__title"},[U(p.$slots,"title",{},()=>[de(H(e.title),1)])])):j("",!0),o.value?(f(),g("p",{key:1,id:r,class:"tree-empty-state__description"},[U(p.$slots,"description",{},()=>[de(H(e.description),1)])])):j("",!0),p.$slots.default?(f(),g("div",vp,[U(p.$slots,"default")])):j("",!0),p.$slots.actions?(f(),g("div",mp,[U(p.$slots,"actions")])):j("",!0)])]),_:3},16,["class","style","aria-labelledby","aria-describedby"]))}}),hp=["id","accept","multiple","disabled"],bp=["aria-busy","aria-controls","aria-describedby","aria-disabled","aria-invalid","tabindex"],gp={key:0,class:"tree-file-upload__icon","aria-hidden":"true"},yp={class:"tree-file-upload__content"},_p={class:"tree-file-upload__label"},kp={class:"tree-file-upload__browse"},wp={key:1,class:"tree-file-upload__files"},Tp={class:"tree-file-upload__files-header"},xp=["disabled"],$p={class:"tree-file-upload__list"},Cp={class:"tree-file-upload__file-copy"},Sp={class:"tree-file-upload__file-name"},Dp={class:"tree-file-upload__file-meta"},Ap=["disabled","aria-label","onClick"],Ep={key:2,class:"tree-file-upload__actions"},pr=fe({inheritAttrs:!1,__name:"TreeFileUpload",props:{modelValue:{default:()=>[]},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},accept:{default:""},multiple:{type:Boolean,default:!0},maxFiles:{default:null},maxFileSize:{default:null},label:{default:"Drop files here"},description:{default:"Click to browse, drag and drop, or paste with Ctrl+V."},buttonLabel:{default:"Browse files"},filesLabel:{default:"Selected files"},paste:{type:Boolean,default:!0},drop:{type:Boolean,default:!0},showFileList:{type:Boolean,default:!0}},emits:["update:modelValue","files-accepted","files-rejected"],setup(e,{emit:t}){const l=xl(),a=e,s=t,n=Ie(),r=ee(null),i=ee(null),o=ee(!1),d=ee(!1),u=ee(0),c=ee([]),p=Xe("tree-file-upload"),w=`${p}-description`,D=`${p}-feedback`,$=`${p}-files`,S=h(()=>a.disabled||a.loading),V=h(()=>a.modelValue.length>0),E=h(()=>!!l.default),A=h(()=>a.multiple?typeof a.maxFiles!="number"?Number.POSITIVE_INFINITY:Math.max(a.maxFiles,0):1),v=h(()=>["tree-file-upload",`tree-file-upload--${a.size}`,{"is-disabled":S.value,"is-invalid":a.invalid,"is-loading":a.loading,"is-drag-active":o.value,"has-files":V.value},n.class]),b=h(()=>n.style),C=h(()=>{const{class:te,style:m,...k}=n;return k}),x=h(()=>{const te=[];return a.description&&!E.value&&te.push(w),c.value.length>0&&te.push(D),a.showFileList&&V.value&&te.push($),te.length>0?te.join(" "):void 0}),B=h(()=>`${a.filesLabel} (${a.modelValue.length})`),z=te=>{if(te<1024)return`${te} B`;const m=["KB","MB","GB"];let k=te/1024,F=0;for(;k>=1024&&F<m.length-1;)k/=1024,F+=1;return`${k>=10||Number.isInteger(k)?Math.round(k):Number(k.toFixed(1))} ${m[F]}`},M=(te,m)=>`${te.name}-${te.size}-${te.lastModified}-${m}`,J=te=>{if(!a.accept.trim())return!0;const m=a.accept.split(",").map(q=>q.trim().toLowerCase()).filter(Boolean),k=te.name.toLowerCase(),F=te.type.toLowerCase();return m.some(q=>q.startsWith(".")?k.endsWith(q):q.endsWith("/*")?F.startsWith(q.slice(0,-1)):F===q)},I=(te,m)=>{switch(m){case"file-invalid-type":return`${te.name} is not an accepted file type.`;case"file-too-large":return`${te.name} exceeds the ${z(a.maxFileSize??0)} limit.`;case"too-many-files":return`You can only add up to ${A.value} file${A.value===1?"":"s"}.`;default:return`${te.name} could not be added.`}},R=()=>{i.value&&(i.value.value="")},K=()=>{var te;S.value||(te=i.value)==null||te.click()},pe=(te,m,k)=>{c.value=k.map(F=>F.message),k.length>0&&s("files-rejected",k),m.length>0&&(s("update:modelValue",te),s("files-accepted",m))},Q=te=>{if(S.value||te.length===0)return;const m=a.multiple?[...a.modelValue]:[],k=[],F=[];let q=Number.isFinite(A.value)?Math.max(A.value-m.length,0):Number.POSITIVE_INFINITY;for(const G of te){if(q<=0){F.push({file:G,reason:"too-many-files",message:I(G,"too-many-files")});continue}if(!J(G)){F.push({file:G,reason:"file-invalid-type",message:I(G,"file-invalid-type")});continue}if(typeof a.maxFileSize=="number"&&a.maxFileSize>0&&G.size>a.maxFileSize){F.push({file:G,reason:"file-too-large",message:I(G,"file-too-large")});continue}k.push(G),m.push(G),Number.isFinite(q)&&(q-=1)}pe(m,k,F)},T=te=>{S.value||(c.value=[],s("update:modelValue",a.modelValue.filter((m,k)=>k!==te)))},O=()=>{S.value||!V.value||(c.value=[],s("update:modelValue",[]))},se=te=>te?te.files.length>0||Array.from(te.types).includes("Files"):!1,ve=te=>te!=null&&te.items?Array.from(te.items).map(m=>{var k;return((k=m.getAsFile)==null?void 0:k.call(m))??null}).filter(m=>m instanceof File):[],W=te=>{const m=te.target;Q(Array.from(m.files??[])),R()},me=te=>{!bt(te)||S.value||(te.preventDefault(),K())},ue=()=>{d.value=!0},ae=te=>{var m;const k=te.relatedTarget;k&&(m=r.value)!=null&&m.contains(k)||(d.value=!1)},De=te=>{if(!a.paste||S.value)return;const m=ve(te.clipboardData);m.length!==0&&(te.preventDefault(),Q(m))},ye=te=>{!d.value||te.defaultPrevented||De(te)},Oe=te=>{!a.drop||S.value||!se(te.dataTransfer)||(te.preventDefault(),u.value+=1,o.value=!0)},oe=te=>{!a.drop||S.value||!se(te.dataTransfer)||(te.preventDefault(),te.dataTransfer&&(te.dataTransfer.dropEffect="copy"),o.value=!0)},xe=te=>{!a.drop||S.value||!se(te.dataTransfer)||(te.preventDefault(),u.value=Math.max(u.value-1,0),u.value===0&&(o.value=!1))},ze=te=>{var m;!a.drop||S.value||!se(te.dataTransfer)||(te.preventDefault(),u.value=0,o.value=!1,Q(Array.from(((m=te.dataTransfer)==null?void 0:m.files)??[])))};return Ut(()=>{document.addEventListener("paste",ye)}),Ge(()=>{document.removeEventListener("paste",ye)}),(te,m)=>(f(),g("div",Ce({ref_key:"rootRef",ref:r},C.value,{class:v.value,style:b.value,onFocusin:ue,onFocusout:ae,onPaste:De}),[_("input",{id:y(p),ref_key:"inputRef",ref:i,class:"tree-visually-hidden",type:"file",accept:e.accept||void 0,multiple:e.multiple,disabled:S.value,onChange:W},null,40,hp),_("div",{class:"tree-file-upload__dropzone","aria-busy":e.loading||void 0,"aria-controls":e.showFileList&&V.value?$:void 0,"aria-describedby":x.value,"aria-disabled":S.value||void 0,"aria-invalid":e.invalid||void 0,role:"button",tabindex:S.value?-1:0,onClick:K,onKeydown:me,onDragenter:Oe,onDragover:oe,onDragleave:xe,onDrop:ze},[te.$slots.icon||!te.$slots.default?(f(),g("div",gp,[U(te.$slots,"icon",{},()=>[m[0]||(m[0]=_("span",{class:"tree-file-upload__icon-mark"},"+",-1))])])):j("",!0),_("div",yp,[U(te.$slots,"default",{files:e.modelValue,isDragActive:o.value,openFileDialog:K,clearFiles:O},()=>[_("p",_p,H(e.label),1),e.description?(f(),g("p",{key:0,id:w,class:"tree-file-upload__description"},H(e.description),1)):j("",!0),_("span",kp,H(e.buttonLabel),1)])]),e.loading?(f(),he($t,{key:1,class:"tree-file-upload__spinner",size:"sm",label:"Uploading files"})):j("",!0)],40,bp),c.value.length>0?(f(),g("ul",{key:0,id:D,class:"tree-file-upload__feedback","aria-live":"polite"},[(f(!0),g(_e,null,Ae(c.value,k=>(f(),g("li",{key:k},H(k),1))),128))])):j("",!0),e.showFileList&&V.value?(f(),g("div",wp,[_("div",Tp,[_("p",{id:$,class:"tree-file-upload__files-label"},H(B.value),1),_("button",{class:"tree-file-upload__clear",type:"button",disabled:S.value,onClick:O}," Clear all ",8,xp)]),_("ul",$p,[(f(!0),g(_e,null,Ae(e.modelValue,(k,F)=>(f(),g("li",{key:M(k,F),class:"tree-file-upload__file"},[U(te.$slots,"file",{file:k,index:F,removeFile:()=>T(F)},()=>[_("div",Cp,[_("p",Sp,H(k.name),1),_("p",Dp,H(z(k.size)),1)]),_("button",{class:"tree-file-upload__remove",type:"button",disabled:S.value,"aria-label":`Remove ${k.name}`,onClick:q=>T(F)}," Remove ",8,Ap)])]))),128))])])):j("",!0),te.$slots.actions?(f(),g("div",Ep,[U(te.$slots,"actions",{files:e.modelValue,openFileDialog:K,clearFiles:O})])):j("",!0)],16))}}),Ip={key:0,class:"tree-multi-select__slot"},Vp={class:"tree-multi-select__values"},Mp={class:"tree-multi-select__tag-label"},Bp=["disabled","onClick"],Lp={key:0,class:"tree-multi-select__overflow"},Op=["value","aria-expanded","aria-controls","aria-activedescendant","aria-invalid","aria-busy","disabled","placeholder"],Fp=["id"],Np={key:0,class:"tree-multi-select__empty"},Pp=["id","aria-selected","aria-disabled","disabled","onClick"],zp={class:"tree-multi-select__option-copy"},Rp={class:"tree-multi-select__option-label"},Hp={key:0,class:"tree-multi-select__option-description"},jp={class:"tree-multi-select__check","aria-hidden":"true"},vr=fe({inheritAttrs:!1,__name:"TreeMultiSelect",props:{modelValue:{default:()=>[]},options:{default:()=>[]},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:""},emptyText:{default:"No results found."},maxVisibleTags:{default:2}},emits:["update:modelValue","update:open","open-change","input-change"],setup(e,{emit:t}){const l=We("chevron-down"),a=We("check"),s=We("x"),n=e,r=t,i=Ie(),o=Xe("tree-multi-select"),d=ee(null),u=ee(null),c=ee(""),p=ee(-1),w=h(()=>{const{class:ae,style:De,autocomplete:ye,...Oe}=i;return{autocomplete:typeof ye=="string"?ye:"off",...Oe}}),{value:D,setValue:$}=Ct(ot(n,"open"),n.defaultOpen,ae=>{r("update:open",ae),r("open-change",ae)}),S=h(()=>["tree-multi-select",`tree-multi-select--${n.size}`,{"is-disabled":n.disabled,"is-invalid":n.invalid,"is-loading":n.loading,"is-open":D.value},i.class]),V=h(()=>i.style),E=ae=>ae.trim().toLowerCase(),A=h(()=>{const ae=E(c.value);return ae?n.options.filter(De=>[De.label,De.description??"",...De.keywords??[]].some(ye=>ye.toLowerCase().includes(ae))):n.options}),v=h(()=>n.options.filter(ae=>n.modelValue.includes(ae.value))),b=h(()=>v.value.slice(0,n.maxVisibleTags)),C=h(()=>Math.max(v.value.length-b.value.length,0)),x=h(()=>A.value.filter(ae=>!ae.disabled)),B=h(()=>p.value>=0?A.value[p.value]:void 0),z=h(()=>D.value&&B.value?`${o}-option-${B.value.value}`:void 0),M=h(()=>n.modelValue.length===0&&!c.value?n.placeholder:""),J=ae=>n.modelValue.includes(ae),I=(ae="first")=>{const De=A.value.findIndex(Oe=>J(Oe.value)&&!Oe.disabled);if(De>=0){p.value=De;return}if(x.value.length===0){p.value=-1;return}const ye=ae==="last"?x.value[x.value.length-1]:x.value[0];p.value=A.value.findIndex(Oe=>Oe.value===ye.value)},R=(ae="first")=>{n.disabled||($(!0),I(ae))},K=()=>{$(!1),p.value=-1},pe=()=>{Ke(()=>{var ae;return(ae=u.value)==null?void 0:ae.focus()})},Q=ae=>{r("update:modelValue",ae)},T=ae=>{if(n.disabled||ae.disabled)return;const De=J(ae.value)?n.modelValue.filter(ye=>ye!==ae.value):[...n.modelValue,ae.value];Q(De),c.value="",I("first"),pe()},O=ae=>{n.disabled||(Q(n.modelValue.filter(De=>De!==ae)),pe())},se=ae=>{if(A.value.length===0){p.value=-1;return}const De=Rl(p.value,A.value,ae);p.value=De},ve=ae=>{if(c.value=ae.target.value,r("input-change",c.value),!n.disabled&&!D.value){R("first");return}I("first")},W=()=>{R("first")},me=ae=>{if(!n.disabled){if(ae.key==="Tab"){K();return}if(gt(ae)){ae.preventDefault(),K();return}if(ae.key==="Backspace"&&!c.value&&n.modelValue.length>0){ae.preventDefault(),O(n.modelValue[n.modelValue.length-1]);return}if(ae.key==="ArrowDown"){if(ae.preventDefault(),!D.value){R("first");return}se(1);return}if(ae.key==="ArrowUp"){if(ae.preventDefault(),!D.value){R("last");return}se(-1);return}if(ae.key==="Home"&&D.value){ae.preventDefault(),I("first");return}if(ae.key==="End"&&D.value){ae.preventDefault(),I("last");return}ae.key==="Enter"&&B.value&&(ae.preventDefault(),T(B.value))}},ue=ae=>{var De;if(!D.value)return;const ye=ae.target;ye instanceof Node&&((De=d.value)!=null&&De.contains(ye)||K())};return Fe(D,ae=>{ae?document.addEventListener("pointerdown",ue):document.removeEventListener("pointerdown",ue)}),Ge(()=>{document.removeEventListener("pointerdown",ue)}),(ae,De)=>(f(),g("div",{ref_key:"rootRef",ref:d,class:ce(S.value),style:Pe(V.value)},[_("div",{class:"tree-multi-select__control",onClick:pe},[ae.$slots.prefix?(f(),g("span",Ip,[U(ae.$slots,"prefix")])):j("",!0),_("div",Vp,[(f(!0),g(_e,null,Ae(b.value,ye=>(f(),g("span",{key:ye.value,class:"tree-multi-select__tag"},[U(ae.$slots,"tag",{option:ye,remove:()=>O(ye.value)},()=>[_("span",Mp,H(ye.label),1),_("button",{type:"button",class:"tree-multi-select__tag-remove",disabled:e.disabled,"aria-label":"Remove selection",onMousedown:De[0]||(De[0]=Sa(()=>{},["prevent"])),onClick:Sa(Oe=>O(ye.value),["stop"])},[L(y(s),{size:12})],40,Bp)])]))),128)),C.value>0?(f(),g("span",Lp," +"+H(C.value),1)):j("",!0),_("input",Ce({ref_key:"inputRef",ref:u},w.value,{value:c.value,type:"text",class:"tree-multi-select__input",role:"combobox","aria-autocomplete":"list","aria-expanded":y(D),"aria-controls":y(D)?y(o):void 0,"aria-activedescendant":z.value,"aria-invalid":e.invalid||void 0,"aria-busy":e.loading||void 0,disabled:e.disabled,placeholder:M.value,onFocus:W,onInput:ve,onKeydown:me}),null,16,Op)]),e.loading?(f(),he($t,{key:1,class:"tree-multi-select__indicator",size:"sm"})):(f(),he(y(l),{key:2,class:"tree-multi-select__indicator",size:16}))]),L(Lt,{name:"tree-fade"},{default:N(()=>[y(D)?(f(),g("ul",{key:0,id:y(o),class:"tree-multi-select__listbox",role:"listbox","aria-multiselectable":"true"},[A.value.length===0?(f(),g("li",Np,[U(ae.$slots,"empty",{query:c.value},()=>[de(H(e.emptyText),1)])])):(f(!0),g(_e,{key:1},Ae(A.value,(ye,Oe)=>(f(),g("li",{key:ye.value},[_("button",{id:`${y(o)}-option-${ye.value}`,type:"button",class:ce(["tree-multi-select__option",{"is-active":Oe===p.value,"is-selected":J(ye.value),"is-disabled":ye.disabled}]),role:"option","aria-selected":J(ye.value),"aria-disabled":ye.disabled||void 0,disabled:ye.disabled,onMousedown:De[1]||(De[1]=Sa(()=>{},["prevent"])),onClick:oe=>T(ye)},[U(ae.$slots,"option",{option:ye,selected:J(ye.value),active:Oe===p.value},()=>[_("span",zp,[_("span",Rp,H(ye.label),1),ye.description?(f(),g("span",Hp,H(ye.description),1)):j("",!0)]),_("span",jp,[J(ye.value)?(f(),he(y(a),{key:0,size:16})):j("",!0)])])],42,Pp)]))),128))],8,Fp)):j("",!0)]),_:3})],6))}}),jl=fe({inheritAttrs:!1,__name:"TreeGrid",props:{as:{default:"div"},columns:{default:void 0},minItemWidth:{default:"16rem"},gap:{default:"var(--tree-space-4)"},rowGap:{default:void 0},align:{default:"stretch"},justify:{default:"stretch"},dense:{type:Boolean,default:!1}},setup(e){const t=e,l=Ie(),a=h(()=>["tree-grid",{"is-dense":t.dense},l.class]),s=h(()=>[{gap:t.gap,rowGap:t.rowGap??t.gap,alignItems:t.align,justifyItems:t.justify,gridTemplateColumns:typeof t.columns=="number"&&t.columns>0?`repeat(${t.columns}, minmax(0, 1fr))`:`repeat(auto-fit, minmax(min(${t.minItemWidth}, 100%), 1fr))`,gridAutoFlow:t.dense?"dense":"row"},l.style]),n=h(()=>{const{class:r,style:i,...o}=l;return o});return(r,i)=>(f(),he(xt(e.as),Ce(n.value,{class:a.value,style:s.value}),{default:N(()=>[U(r.$slots,"default")]),_:3},16,["class","style"]))}}),Kp={class:"tree-navbar__inner"},Up={key:0,class:"tree-navbar__section tree-navbar__section--start"},Wp={key:1,class:"tree-navbar__section tree-navbar__section--center"},Gp={key:2,class:"tree-navbar__section tree-navbar__section--end"},Zl=fe({inheritAttrs:!1,__name:"TreeNavbar",props:{as:{default:"header"},size:{default:"md"},sticky:{type:Boolean,default:!1},bordered:{type:Boolean,default:!0},elevated:{type:Boolean,default:!1}},setup(e){const t=e,l=Ie(),a=h(()=>["tree-navbar",`tree-navbar--${t.size}`,{"is-sticky":t.sticky,"is-bordered":t.bordered,"is-elevated":t.elevated},l.class]),s=h(()=>l.style),n=h(()=>{const{class:r,style:i,...o}=l;return o});return(r,i)=>(f(),he(xt(e.as),Ce(n.value,{class:a.value,style:s.value}),{default:N(()=>[_("div",Kp,[r.$slots.start?(f(),g("div",Up,[U(r.$slots,"start")])):j("",!0),r.$slots.default||r.$slots.center?(f(),g("div",Wp,[U(r.$slots,"center",{},()=>[U(r.$slots,"default")])])):j("",!0),r.$slots.end?(f(),g("div",Gp,[U(r.$slots,"end")])):j("",!0)])]),_:3},16,["class","style"]))}}),mr=fe({__name:"TreeLink",props:{to:{default:void 0},href:{default:void 0},external:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},variant:{default:"default"}},setup(e){const t=e,l=fl(),a=h(()=>t.to?(l==null?void 0:l.appContext.components.RouterLink)??null:null),s=h(()=>!!a.value),n=h(()=>t.disabled?"span":t.to&&a.value?a.value:"a"),r=h(()=>t.disabled?{}:t.to&&s.value?{to:t.to}:{href:t.href??(typeof t.to=="string"?t.to:void 0),...t.external?{target:"_blank",rel:"noopener noreferrer"}:{}}),i=h(()=>["tree-link",`tree-link--${t.variant}`,{"is-disabled":t.disabled}]);return(o,d)=>(f(),he(xt(n.value),Ce(r.value,{class:i.value,"aria-disabled":e.disabled||void 0,tabindex:e.disabled?-1:void 0}),{default:N(()=>[U(o.$slots,"default")]),_:3},16,["class","aria-disabled","tabindex"]))}}),no=Symbol("tree-sidebar"),qp={key:0,class:"tree-nav-menu__list"},Qp={key:1,class:"tree-nav-menu__marker","aria-hidden":"true"},Yp={class:"tree-nav-menu__copy"},Jp={class:"tree-nav-menu__label"},Xp={key:0,class:"tree-nav-menu__description"},Zp={key:2,class:"tree-nav-menu__badge"},ev={key:1,class:"tree-nav-menu__empty"},hr=fe({inheritAttrs:!1,__name:"TreeNavMenu",props:{modelValue:{default:void 0},defaultValue:{default:""},items:{default:()=>[]},size:{default:"md"},collapsed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","select"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Vt(no,null),r=ee(l.defaultValue),i=ee(new Map),o=fl(),d=h(()=>l.modelValue??r.value),u=h(()=>l.collapsed??(n==null?void 0:n.collapsed.value)??!1),c=h(()=>(o==null?void 0:o.appContext.components.RouterLink)??null),p=B=>B.to&&c.value?c.value:"button",w=()=>{const B=l.items.findIndex(z=>z.value===d.value&&!z.disabled);return B>=0?B:l.items.findIndex(z=>!z.disabled)},D=ee(w()),$=h(()=>["tree-nav-menu",`tree-nav-menu--${l.size}`,{"is-collapsed":u.value,"is-disabled":l.disabled},s.class]),S=h(()=>s.style),V=h(()=>{const{class:B,style:z,...M}=s;return M}),E=B=>d.value===B,A=(B,z)=>{const M=B instanceof HTMLElement?B:B&&"$el"in B&&B.$el instanceof HTMLElement?B.$el:null;M?i.value.set(z,M):i.value.delete(z)},v=B=>{const z=l.items[B];z&&(D.value=B,Ke(()=>{var M;return(M=i.value.get(z.value))==null?void 0:M.focus()}))},b=B=>{l.disabled||B.disabled||(l.modelValue===void 0&&(r.value=B.value),a("update:modelValue",B.value),a("select",B.value,B))},C=(B,z)=>{if(!l.disabled){if(B.key==="Home"){B.preventDefault();const M=l.items.findIndex(J=>!J.disabled);M>=0&&v(M);return}if(B.key==="End"){B.preventDefault();const M=[...l.items].reverse().findIndex(J=>!J.disabled);M>=0&&v(l.items.length-1-M);return}if(B.key==="ArrowDown"||B.key==="ArrowRight"){B.preventDefault();const M=Rl(z,l.items,1);M>=0&&v(M);return}if(B.key==="ArrowUp"||B.key==="ArrowLeft"){B.preventDefault();const M=Rl(z,l.items,-1);M>=0&&v(M);return}bt(B)&&(B.preventDefault(),b(l.items[z]))}},x=B=>D.value===B?0:-1;return Fe(()=>[l.items,l.modelValue],()=>{const B=w();D.value=B>=0?B:-1},{deep:!0}),(B,z)=>(f(),g("nav",Ce(V.value,{class:$.value,style:S.value}),[e.items.length>0?(f(),g("ul",qp,[(f(!0),g(_e,null,Ae(e.items,(M,J)=>(f(),g("li",{key:M.value,class:"tree-nav-menu__entry"},[(f(),he(xt(p(M)),{ref_for:!0,ref:I=>A(I,M.value),type:M.to?void 0:"button",to:M.to||void 0,class:ce(["tree-nav-menu__item",{"is-selected":E(M.value),"is-disabled":e.disabled||M.disabled}]),disabled:!M.to&&(e.disabled||M.disabled)||void 0,"aria-disabled":M.to&&(e.disabled||M.disabled)||void 0,"aria-current":E(M.value)?"page":void 0,tabindex:e.disabled||M.disabled?-1:x(J),title:u.value?M.label:void 0,onClick:I=>b(M),onKeydown:I=>C(I,J),onFocus:I=>D.value=J},{default:N(()=>[U(B.$slots,"item",{item:M,selected:E(M.value),focused:D.value===J,collapsed:u.value},()=>[M.icon?(f(),he(xt(M.icon),{key:0,class:"tree-nav-menu__icon","aria-hidden":"true"})):(f(),g("span",Qp,H((M.shortLabel??M.label.charAt(0)).toUpperCase()),1)),_("span",Yp,[_("span",Jp,H(M.label),1),M.description?(f(),g("span",Xp,H(M.description),1)):j("",!0)]),M.badge!==void 0&&M.badge!==null?(f(),g("span",Zp,H(M.badge),1)):j("",!0)])]),_:2},1064,["type","to","class","disabled","aria-disabled","aria-current","tabindex","title","onClick","onKeydown","onFocus"]))]))),128))])):(f(),g("div",ev,[U(B.$slots,"empty",{},()=>[z[0]||(z[0]=de(" No navigation items. ",-1))])]))],16))}}),tv=["value","checked","disabled","name","aria-checked","aria-invalid"],lv={class:"tree-radio__control","aria-hidden":"true"},av={key:0,class:"tree-radio__dot"},sv={key:0,class:"tree-radio__label"},br=fe({inheritAttrs:!1,__name:"TreeRadio",props:{value:{},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},size:{default:void 0}},setup(e){const t=e,l=Vt("tree-radio-group",null),a=Ie(),s=h(()=>l?l.modelValue()===t.value:!1),n=h(()=>t.disabled||((l==null?void 0:l.disabled())??!1)),r=h(()=>t.invalid||((l==null?void 0:l.invalid())??!1)),i=h(()=>t.size??(l==null?void 0:l.size())??"md"),o=h(()=>["tree-radio",`tree-radio--${i.value}`,{"is-checked":s.value,"is-disabled":n.value,"is-invalid":r.value},a.class]),d=h(()=>a.style),u=h(()=>{const{class:p,style:w,...D}=a;return D}),c=()=>{l&&l.onChange(t.value)};return(p,w)=>{var D;return f(),g("label",{class:ce(o.value),style:Pe(d.value)},[_("input",Ce(u.value,{type:"radio",class:"tree-radio__input",value:e.value,checked:s.value,disabled:n.value,name:(D=y(l))==null?void 0:D.name(),"aria-checked":s.value,"aria-invalid":r.value||void 0,onChange:c}),null,16,tv),_("span",lv,[s.value?(f(),g("span",av)):j("",!0)]),p.$slots.default?(f(),g("span",sv,[U(p.$slots,"default")])):j("",!0)],6)}}}),gr=fe({inheritAttrs:!1,__name:"TreeRadioGroup",props:{modelValue:{default:void 0},name:{default:void 0},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},size:{default:"md"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie();Ul("tree-radio-group",{modelValue:()=>l.modelValue,name:()=>l.name,disabled:()=>l.disabled,invalid:()=>l.invalid,size:()=>l.size,onChange:o=>{a("update:modelValue",o)}});const n=h(()=>["tree-radio-group",s.class]),r=h(()=>s.style),i=h(()=>{const{class:o,style:d,...u}=s;return u});return(o,d)=>(f(),g("div",Ce(i.value,{class:n.value,style:r.value,role:"radiogroup"}),[U(o.$slots,"default")],16))}}),nv=["data-state"],rv=["disabled","aria-controls","aria-expanded","aria-invalid","aria-busy"],iv={key:0,class:"tree-select__slot tree-select__slot--prefix"},ov=["data-placeholder"],uv={key:2,class:"tree-select__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},dv=["id","aria-label"],cv=["aria-selected","aria-disabled","tabindex","onClick","onKeydown"],fv={key:0,class:"tree-select__check",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},yr=fe({inheritAttrs:!1,__name:"TreeSelect",props:{modelValue:{default:""},options:{default:()=>[]},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:modelValue","update:open","open-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-select"),r=ee(null),i=ee(null),o=ee(new Map),d=ee(-1),u=h(()=>{const{class:I,style:R,...K}=s;return K}),{value:c,setValue:p}=Ct(ot(l,"open"),l.defaultOpen,I=>{a("update:open",I),a("open-change",I)}),w=h(()=>["tree-select",`tree-select--${l.size}`,{"is-disabled":l.disabled,"is-invalid":l.invalid,"is-loading":l.loading,"is-open":c.value},s.class]),D=h(()=>s.style),$=h(()=>{const I=l.options.find(R=>R.value===l.modelValue);return(I==null?void 0:I.label)??""}),S=h(()=>l.options.filter(I=>!I.disabled)),V=()=>{if(l.disabled)return;const I=l.options.findIndex(R=>R.value===l.modelValue);d.value=I>=0?I:0,p(!0),Ke(()=>b(d.value))},E=(I=!1)=>{p(!1),d.value=-1,I&&Ke(()=>{var R;return(R=i.value)==null?void 0:R.focus()})},A=()=>{c.value?E():V()},v=I=>{I.disabled||(a("update:modelValue",I.value),E(!0))},b=I=>{const R=l.options[I];if(!R)return;const K=o.value.get(R.value);K==null||K.focus()},C=(I,R)=>{I instanceof HTMLElement?o.value.set(R,I):o.value.delete(R)},x=I=>{let R=d.value+I;for(;R>=0&&R<l.options.length;){if(!l.options[R].disabled){d.value=R,b(R);return}R+=I}},B=I=>{if(!l.disabled){if(gt(I)&&c.value){I.preventDefault(),E();return}(bt(I)||I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),V())}},z=(I,R,K)=>{if(gt(I)){I.preventDefault(),E(!0);return}if(bt(I)){I.preventDefault(),v(R);return}switch(I.key){case"ArrowDown":I.preventDefault(),x(1);break;case"ArrowUp":I.preventDefault(),x(-1);break;case"Home":I.preventDefault(),d.value=S.value.length>0?l.options.indexOf(S.value[0]):0,b(d.value);break;case"End":I.preventDefault(),d.value=S.value.length>0?l.options.indexOf(S.value[S.value.length-1]):l.options.length-1,b(d.value);break}},M=I=>{var R;if(!c.value)return;const K=I.target;K instanceof Node&&((R=r.value)!=null&&R.contains(K)||E())},J=h(()=>l.modelValue!==""&&l.modelValue!==null&&l.modelValue!==void 0);return Fe(c,I=>{I?document.addEventListener("pointerdown",M):document.removeEventListener("pointerdown",M)}),Ge(()=>{document.removeEventListener("pointerdown",M)}),(I,R)=>(f(),g("div",{ref_key:"rootRef",ref:r,class:ce(w.value),style:Pe(D.value),"data-state":y(c)?"open":"closed"},[_("button",Ce({ref_key:"triggerRef",ref:i},u.value,{type:"button",class:"tree-select__trigger",disabled:e.disabled,"aria-controls":y(c)?y(n):void 0,"aria-haspopup":"listbox","aria-expanded":y(c),"aria-invalid":e.invalid||void 0,"aria-busy":e.loading||void 0,onClick:A,onKeydown:B}),[I.$slots.prefix?(f(),g("span",iv,[U(I.$slots,"prefix")])):j("",!0),_("span",{class:"tree-select__value","data-placeholder":J.value?void 0:!0},H($.value||e.placeholder),9,ov),e.loading?(f(),he($t,{key:1,size:"sm",label:"Loading"})):(f(),g("svg",uv,[...R[0]||(R[0]=[_("polyline",{points:"4 6 8 10 12 6"},null,-1)])]))],16,rv),L(Lt,{name:"tree-fade"},{default:N(()=>[y(c)&&!e.disabled?(f(),g("ul",{key:0,id:y(n),role:"listbox",class:"tree-select__listbox","aria-label":typeof u.value["aria-label"]=="string"?u.value["aria-label"]:void 0},[(f(!0),g(_e,null,Ae(e.options,(K,pe)=>(f(),g("li",{key:K.value,ref_for:!0,ref:Q=>C(Q,K.value),role:"option",class:ce(["tree-select__option",{"is-selected":K.value===e.modelValue,"is-disabled":K.disabled,"is-focused":pe===d.value}]),"aria-selected":K.value===e.modelValue,"aria-disabled":K.disabled||void 0,tabindex:K.disabled?-1:0,onClick:Q=>v(K),onKeydown:Q=>z(Q,K)},[de(H(K.label)+" ",1),K.value===e.modelValue?(f(),g("svg",fv,[...R[1]||(R[1]=[_("polyline",{points:"3.5 8.5 6.5 11.5 12.5 4.5"},null,-1)])])):j("",!0)],42,cv))),128))],8,dv)):j("",!0)]),_:1})],14,nv))}}),pv={key:0,class:"tree-sidebar__header"},vv={class:"tree-sidebar__body"},mv={key:1,class:"tree-sidebar__footer"},hv=["aria-label","aria-expanded"],bv={key:0},_r=fe({inheritAttrs:!1,__name:"TreeSidebar",props:{as:{default:"aside"},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!0},size:{default:"md"},side:{default:"left"},sticky:{type:Boolean,default:!1},bordered:{type:Boolean,default:!0},width:{default:"17.5rem"},collapsedWidth:{default:"4.75rem"},collapseLabel:{default:"Collapse sidebar"},expandLabel:{default:"Expand sidebar"}},emits:["update:collapsed","collapse-change"],setup(e,{emit:t}){const l=We("chevron-left"),a=We("chevron-right"),s=e,n=t,r=Ie(),{value:i,setValue:o}=Ct(ot(s,"collapsed"),s.defaultCollapsed,$=>{n("update:collapsed",$),n("collapse-change",$)}),d=h(()=>["tree-sidebar",`tree-sidebar--${s.size}`,`tree-sidebar--${s.side}`,{"is-collapsed":i.value,"is-sticky":s.sticky,"is-bordered":s.bordered},r.class]),u=h(()=>[{"--tree-sidebar-width":s.width,"--tree-sidebar-collapsed-width":s.collapsedWidth},r.style]),c=h(()=>{const{class:$,style:S,...V}=r;return V}),p=()=>{s.collapsible&&o(!i.value)},w=h(()=>s.side==="right"?i.value?l:a:i.value?a:l),D=h(()=>i.value?s.expandLabel:s.collapseLabel);return Ul(no,{collapsed:h(()=>i.value)}),($,S)=>(f(),he(xt(e.as),Ce(c.value,{class:d.value,style:u.value,"data-state":y(i)?"collapsed":"expanded"}),{default:N(()=>[$.$slots.header?(f(),g("div",pv,[U($.$slots,"header",{collapsed:y(i)})])):j("",!0),_("div",vv,[U($.$slots,"default",{collapsed:y(i)})]),$.$slots.footer||e.collapsible?(f(),g("div",mv,[$.$slots.footer?U($.$slots,"footer",{key:0,collapsed:y(i)}):j("",!0),e.collapsible?(f(),g("button",{key:1,type:"button",class:"tree-sidebar__toggle","aria-label":D.value,"aria-expanded":!y(i),onClick:p},[U($.$slots,"toggle",{collapsed:y(i)},()=>[(f(),he(xt(w.value),{size:16})),y(i)?j("",!0):(f(),g("span",bv,H(D.value),1))])],8,hv)):j("",!0)])):j("",!0)]),_:3},16,["class","style","data-state"]))}}),gv={key:0,class:"tree-input__slot tree-input__slot--prefix"},yv=["type","value","placeholder","disabled","aria-invalid"],_v={key:2,class:"tree-input__slot tree-input__slot--suffix"},Ms=fe({inheritAttrs:!1,__name:"TreeInput",props:{modelValue:{default:""},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},type:{default:"text"},placeholder:{default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=h(()=>["tree-input",`tree-input--${l.size}`,{"is-disabled":l.disabled,"is-invalid":l.invalid,"is-loading":l.loading},s.class]),r=h(()=>s.style),i=h(()=>{const{class:u,style:c,...p}=s;return p}),o=h(()=>`${l.modelValue??""}`),d=u=>{a("update:modelValue",u.target.value)};return(u,c)=>(f(),g("label",{class:ce(n.value),style:Pe(r.value)},[u.$slots.prefix?(f(),g("span",gv,[U(u.$slots,"prefix")])):j("",!0),_("input",Ce(i.value,{class:"tree-input__field",type:e.type,value:o.value,placeholder:e.placeholder,disabled:e.disabled,"aria-invalid":e.invalid||void 0,onInput:d}),null,16,yv),e.loading?(f(),he($t,{key:1,size:"sm",label:"Loading"})):j("",!0),u.$slots.suffix?(f(),g("span",_v,[U(u.$slots,"suffix")])):j("",!0)],6))}}),kv=["disabled"],wv=["value","placeholder","disabled","aria-invalid"],Tv=["disabled"],kr=fe({inheritAttrs:!1,__name:"TreeNumberInput",props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},size:{default:"md"},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:""},controls:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=ee(l.modelValue===null||l.modelValue===void 0?"":`${l.modelValue}`),r=h(()=>{const b=`${l.step}`.split(".")[1];return b?b.length:0}),i=h(()=>["tree-number-input",`tree-number-input--${l.size}`,{"is-disabled":l.disabled,"is-invalid":l.invalid,"has-controls":l.controls},s.class]),o=h(()=>s.style),d=h(()=>{const{class:b,style:C,...x}=s;return x}),u=b=>b==null?"":`${b}`,c=b=>{const C=lc(b,l.min??Number.NEGATIVE_INFINITY,l.max??Number.POSITIVE_INFINITY);return Number(C.toFixed(r.value))},p=b=>{const C=b.trim().replace(",",".");if(!C)return null;const x=Number(C);return Number.isNaN(x)?null:x},w=h(()=>p(n.value)??l.modelValue??null),D=h(()=>l.disabled?!1:l.min===void 0||w.value===null?!0:c(w.value)>l.min),$=h(()=>l.disabled?!1:l.max===void 0||w.value===null?!0:c(w.value)<l.max),S=b=>{if(b===null){n.value="",a("update:modelValue",null);return}const C=c(b);n.value=`${C}`,a("update:modelValue",C)},V=b=>{if(l.disabled)return;let C=w.value??0;w.value===null&&(b===1&&l.min!==void 0&&(C=l.min-l.step),b===-1&&l.max!==void 0&&(C=l.max+l.step)),S(C+b*l.step)},E=b=>{const C=b.target.value;if(n.value=C,!C.trim()){a("update:modelValue",null);return}const x=p(C);x!==null&&a("update:modelValue",c(x))},A=()=>{if(!n.value.trim()){n.value="";return}const b=p(n.value);if(b===null){n.value=u(l.modelValue);return}n.value=`${c(b)}`},v=b=>{if(!l.disabled){if(b.key==="ArrowUp"){b.preventDefault(),V(1);return}if(b.key==="ArrowDown"){b.preventDefault(),V(-1);return}if(b.key==="Home"&&l.min!==void 0){b.preventDefault(),S(l.min);return}b.key==="End"&&l.max!==void 0&&(b.preventDefault(),S(l.max))}};return Fe(()=>l.modelValue,b=>{const C=u(b);C!==n.value&&(n.value=C)}),(b,C)=>(f(),g("div",{class:ce(i.value),style:Pe(o.value)},[e.controls?(f(),g("button",{key:0,type:"button",class:"tree-number-input__stepper tree-number-input__stepper--decrement",disabled:!D.value,"aria-label":"Decrease value",onClick:C[0]||(C[0]=x=>V(-1))},[...C[2]||(C[2]=[_("span",{"aria-hidden":"true"},"-",-1)])],8,kv)):j("",!0),_("input",Ce(d.value,{value:n.value,type:"text",inputmode:"decimal",class:"tree-number-input__field",placeholder:e.placeholder,disabled:e.disabled,"aria-invalid":e.invalid||void 0,onInput:E,onBlur:A,onKeydown:v}),null,16,wv),e.controls?(f(),g("button",{key:1,type:"button",class:"tree-number-input__stepper tree-number-input__stepper--increment",disabled:!$.value,"aria-label":"Increase value",onClick:C[1]||(C[1]=x=>V(1))},[...C[3]||(C[3]=[_("span",{"aria-hidden":"true"},"+",-1)])],8,Tv)):j("",!0)],6))}}),xv=["aria-disabled"],$v=["id","aria-selected","tabindex","disabled","onClick","onKeydown","onFocus"],Cv={class:"tree-selectable-list__copy"},Sv={class:"tree-selectable-list__label"},Dv={key:0,class:"tree-selectable-list__description"},Av={key:0,class:"tree-selectable-list__meta"},Ev={key:1,class:"tree-selectable-list__empty"},wr=fe({inheritAttrs:!1,__name:"TreeSelectableList",props:{modelValue:{default:void 0},defaultValue:{default:""},items:{default:()=>[]},size:{default:"md"},disabled:{type:Boolean,default:!1},emptyText:{default:"No items available."}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-selectable-list"),r=ee(new Map),i=ee(l.defaultValue),o=h(()=>l.modelValue??i.value),d=()=>{const v=l.items.findIndex(b=>b.value===o.value&&!b.disabled);return v>=0?v:l.items.findIndex(b=>!b.disabled)},u=ee(d()),c=h(()=>["tree-selectable-list",`tree-selectable-list--${l.size}`,{"is-disabled":l.disabled},s.class]),p=h(()=>s.style),w=h(()=>{const{class:v,style:b,...C}=s;return C}),D=v=>o.value===v,$=(v,b)=>{const C=v instanceof HTMLButtonElement?v:v&&"$el"in v&&v.$el instanceof HTMLButtonElement?v.$el:null;C instanceof HTMLButtonElement?r.value.set(b,C):r.value.delete(b)},S=v=>{const b=l.items[v];b&&(u.value=v,Ke(()=>{var C;return(C=r.value.get(b.value))==null?void 0:C.focus()}))},V=(v,b=!1)=>{if(!(l.disabled||v.disabled)&&(l.modelValue===void 0&&(i.value=v.value),a("update:modelValue",v.value),b)){const C=l.items.findIndex(x=>x.value===v.value);C>=0&&S(C)}},E=(v,b)=>{if(!l.disabled){if(v.key==="Home"){v.preventDefault();const C=l.items.findIndex(x=>!x.disabled);C>=0&&V(l.items[C],!0);return}if(v.key==="End"){v.preventDefault();const C=[...l.items].reverse().findIndex(x=>!x.disabled);if(C>=0){const x=l.items.length-1-C;V(l.items[x],!0)}return}if(v.key==="ArrowDown"||v.key==="ArrowRight"){v.preventDefault();const C=Rl(b,l.items,1);C>=0&&V(l.items[C],!0);return}if(v.key==="ArrowUp"||v.key==="ArrowLeft"){v.preventDefault();const C=Rl(b,l.items,-1);C>=0&&V(l.items[C],!0);return}bt(v)&&(v.preventDefault(),V(l.items[b],!0))}},A=v=>u.value===v?0:-1;return Fe(()=>[l.items,l.modelValue],()=>{const v=d();u.value=v>=0?v:-1},{deep:!0}),(v,b)=>(f(),g("div",Ce(w.value,{class:c.value,style:p.value,role:"listbox","aria-disabled":e.disabled||void 0}),[e.items.length>0?(f(!0),g(_e,{key:0},Ae(e.items,(C,x)=>(f(),g("button",{id:`${y(n)}-${C.value}`,ref_for:!0,ref:B=>$(B,C.value),key:C.value,type:"button",class:ce(["tree-selectable-list__item",{"is-selected":D(C.value),"is-disabled":e.disabled||C.disabled}]),role:"option","aria-selected":D(C.value),tabindex:e.disabled||C.disabled?-1:A(x),disabled:e.disabled||C.disabled,onClick:B=>V(C),onKeydown:B=>E(B,x),onFocus:B=>u.value=x},[U(v.$slots,"item",{item:C,selected:D(C.value),focused:u.value===x},()=>[b[0]||(b[0]=_("span",{class:"tree-selectable-list__indicator","aria-hidden":"true"},null,-1)),_("span",Cv,[_("span",Sv,H(C.label),1),C.description?(f(),g("span",Dv,H(C.description),1)):j("",!0)]),C.meta?(f(),g("span",Av,H(C.meta),1)):j("",!0)])],42,$v))),128)):(f(),g("div",Ev,[U(v.$slots,"empty",{},()=>[de(H(e.emptyText),1)])]))],16,xv))}}),Ee=fe({inheritAttrs:!1,__name:"TreeStack",props:{as:{default:"div"},direction:{default:"vertical"},gap:{default:"var(--tree-space-4)"},align:{default:"stretch"},justify:{default:"flex-start"},wrap:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1}},setup(e){const t=e,l=Ie(),a=h(()=>["tree-stack",`tree-stack--${t.direction}`,{"is-wrapping":t.wrap,"is-reversed":t.reverse},l.class]),s=h(()=>[{gap:t.gap,alignItems:t.align,justifyContent:t.justify},l.style]),n=h(()=>{const{class:r,style:i,...o}=l;return o});return(r,i)=>(f(),he(xt(e.as),Ce(n.value,{class:a.value,style:s.value}),{default:N(()=>[U(r.$slots,"default")]),_:3},16,["class","style"]))}}),ro=Symbol("tree-tree-view"),Iv={class:"tree-tree-view__node",role:"none"},Vv=["id","aria-level","aria-expanded","aria-selected","aria-disabled","tabindex"],Mv=["disabled","aria-label"],Bv={key:1,class:"tree-tree-view__spacer","aria-hidden":"true"},Lv={class:"tree-tree-view__copy"},Ov={class:"tree-tree-view__label"},Fv={key:0,class:"tree-tree-view__description"},Nv={key:2,class:"tree-tree-view__meta"},Pv={key:0,class:"tree-tree-view__group",role:"group"},zv=fe({name:"TreeTreeViewItem",__name:"TreeTreeViewItem",props:{node:{},level:{}},setup(e){const t=We("chevron-right"),l=We("check"),a=e,s=Vt(ro);if(!s)throw new Error("[TreeUI] TTreeView items must be rendered inside a TTreeView.");const n=h(()=>{var $;return!!(($=a.node.children)!=null&&$.length)}),r=h(()=>n.value?s.isExpanded(a.node.id):!1),i=h(()=>s.isSelected(a.node.id)),o=h(()=>s.disabled.value||a.node.disabled),d=h(()=>s.focusedId.value===a.node.id),u=h(()=>`${s.baseId}-${a.node.id}`),c=h(()=>({"is-expanded":r.value,"is-selected":i.value,"is-disabled":o.value,"is-focused":d.value})),p=$=>{const S=$ instanceof HTMLElement?$:$&&"$el"in $&&$.$el instanceof HTMLElement?$.$el:null;S instanceof HTMLElement?s.registerItem(a.node.id,S):s.unregisterItem(a.node.id)},w=()=>{s.setFocusedId(a.node.id),s.toggleSelected(a.node.id)},D=()=>{o.value||!n.value||(s.toggleExpanded(a.node.id),s.setFocusedId(a.node.id))};return($,S)=>{const V=Iu("TreeTreeViewItem",!0);return f(),g("li",Iv,[_("div",{id:u.value,ref:p,class:ce(["tree-tree-view__row",c.value]),style:Pe({"--tree-tree-view-level":`${e.level}`}),role:"treeitem","aria-level":e.level,"aria-expanded":n.value?r.value:void 0,"aria-selected":i.value,"aria-disabled":o.value||void 0,tabindex:o.value?-1:d.value?0:-1,onClick:w,onKeydown:S[0]||(S[0]=E=>y(s).onItemKeydown(E,e.node.id)),onFocus:S[1]||(S[1]=E=>y(s).setFocusedId(e.node.id))},[n.value?(f(),g("button",{key:0,type:"button",class:ce(["tree-tree-view__toggle",{"is-expanded":r.value}]),tabindex:"-1",disabled:o.value,"aria-label":r.value?"Collapse node":"Expand node",onClick:Sa(D,["stop"])},[L(y(t),{size:16})],10,Mv)):(f(),g("span",Bv)),_("span",{class:ce(["tree-tree-view__marker",{"is-selected":i.value,"is-multiple":y(s).selectionMode.value==="multiple"}]),"aria-hidden":"true"},[y(s).selectionMode.value==="multiple"&&i.value?(f(),he(y(l),{key:0,size:14})):j("",!0)],2),_("span",Lv,[_("span",Ov,H(e.node.label),1),e.node.description?(f(),g("span",Fv,H(e.node.description),1)):j("",!0)]),e.node.meta?(f(),g("span",Nv,H(e.node.meta),1)):j("",!0)],46,Vv),n.value&&r.value?(f(),g("ul",Pv,[(f(!0),g(_e,null,Ae(e.node.children,E=>(f(),he(V,{key:E.id,node:E,level:e.level+1},null,8,["node","level"]))),128))])):j("",!0)])}}}),Rv=["aria-multiselectable"],Hv={key:1,class:"tree-tree-view__empty"},Tr=fe({inheritAttrs:!1,__name:"TreeTreeView",props:{modelValue:{default:void 0},defaultValue:{default:void 0},nodes:{default:()=>[]},selectionMode:{default:"single"},expanded:{default:void 0},defaultExpanded:{default:()=>[]},disabled:{type:Boolean,default:!1},emptyText:{default:"No items available."}},emits:["update:modelValue","update:expanded","selection-change","expanded-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-tree-view"),r=ee(l.defaultValue),i=ee(l.defaultExpanded),o=ee(new Map),d=h(()=>["tree-tree-view",{"is-disabled":l.disabled},s.class]),u=h(()=>s.style),c=h(()=>{const{class:T,style:O,...se}=s;return se}),p=h(()=>{const T=l.modelValue??r.value;return T==null||T===""?[]:Array.isArray(T)?T:[T]}),w=h(()=>l.expanded??i.value),D=T=>{if(l.selectionMode==="multiple"){l.modelValue===void 0&&(r.value=T),a("update:modelValue",T),a("selection-change",T);return}const O=T[0];l.modelValue===void 0&&(r.value=O),a("update:modelValue",O),a("selection-change",O)},$=T=>{l.expanded===void 0&&(i.value=T),a("update:expanded",T),a("expanded-change",T)},S=T=>p.value.includes(T),V=T=>w.value.includes(T),E=(T,O=1,se)=>T.reduce((ve,W)=>{var me;return ve.push({node:W,level:O,parentId:se}),(me=W.children)!=null&&me.length&&V(W.id)&&ve.push(...E(W.children,O+1,W.id)),ve},[]),A=h(()=>E(l.nodes)),v=h(()=>A.value.filter(T=>!T.node.disabled)),b=()=>{var T;return p.value.find(se=>A.value.some(ve=>ve.node.id===se&&!ve.node.disabled))||(((T=v.value[0])==null?void 0:T.node.id)??"")},C=ee(b()),x=(T,O)=>{o.value.set(T,O)},B=T=>{o.value.delete(T)},z=T=>{Ke(()=>{var O;return(O=o.value.get(T))==null?void 0:O.focus()})},M=(T,O=!1)=>{C.value=T,O&&z(T)},J=T=>A.value.find(O=>O.node.id===T),I=T=>{const O=T==="first"?v.value[0]:v.value[v.value.length-1];O&&M(O.node.id,!0)},R=T=>{const O=v.value.findIndex(ve=>ve.node.id===C.value);if(O===-1){I(T===1?"first":"last");return}const se=O+T;se<0||se>=v.value.length||M(v.value[se].node.id,!0)},K=T=>{const O=V(T)?w.value.filter(se=>se!==T):[...w.value,T];$(O)},pe=T=>{const O=J(T);if(!(!O||O.node.disabled||l.disabled)){if(l.selectionMode==="multiple"){const se=S(T)?p.value.filter(ve=>ve!==T):[...p.value,T];D(se);return}D([T])}},Q=(T,O)=>{var se;const ve=J(O);if(!ve||ve.node.disabled||l.disabled)return;const W=!!((se=ve.node.children)!=null&&se.length);switch(T.key){case"ArrowDown":T.preventDefault(),R(1);break;case"ArrowUp":T.preventDefault(),R(-1);break;case"ArrowRight":if(T.preventDefault(),W&&!V(O)){K(O);return}if(W){const me=A.value.find(ue=>ue.parentId===O&&!ue.node.disabled);me&&M(me.node.id,!0)}break;case"ArrowLeft":if(T.preventDefault(),W&&V(O)){K(O);return}ve.parentId&&M(ve.parentId,!0);break;case"Home":T.preventDefault(),I("first");break;case"End":T.preventDefault(),I("last");break;default:bt(T)&&(T.preventDefault(),pe(O));break}};return Fe(()=>[A.value,l.modelValue],()=>{A.value.find(T=>T.node.id===C.value&&!T.node.disabled)||(C.value=b())},{deep:!0,immediate:!0}),Ul(ro,{baseId:n,disabled:h(()=>l.disabled),selectionMode:h(()=>l.selectionMode),focusedId:C,isExpanded:V,toggleExpanded:K,isSelected:S,toggleSelected:pe,setFocusedId:M,onItemKeydown:Q,registerItem:x,unregisterItem:B}),(T,O)=>(f(),g("div",{class:ce(d.value),style:Pe(u.value)},[e.nodes.length>0?(f(),g("ul",Ce({key:0},c.value,{class:"tree-tree-view__root",role:"tree","aria-multiselectable":e.selectionMode==="multiple"||void 0}),[(f(!0),g(_e,null,Ae(e.nodes,se=>(f(),he(zv,{key:se.id,node:se,level:1},null,8,["node"]))),128))],16,Rv)):(f(),g("div",Hv,H(e.emptyText),1))],6))}}),jv=["disabled","aria-current","onClick"],Kv={class:"tree-steps__indicator","aria-hidden":"true"},Uv={key:1},Wv={key:2},Gv={class:"tree-steps__copy"},qv={class:"tree-steps__label"},Qv={key:0,class:"tree-steps__description"},Yv={key:0,class:"tree-steps__meta"},$a=fe({inheritAttrs:!1,__name:"TreeSteps",props:{modelValue:{default:void 0},defaultValue:{default:""},items:{default:()=>[]},size:{default:"md"},orientation:{default:"horizontal"},interactive:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){var l;const a=We("check"),s=e,n=t,r=Ie(),i=ee(s.defaultValue||((l=s.items[0])==null?void 0:l.value)||""),o=h(()=>s.modelValue??i.value),d=h(()=>{const $=s.items.findIndex(S=>S.value===o.value);return $>=0?$:0}),u=h(()=>["tree-steps",`tree-steps--${s.size}`,`tree-steps--${s.orientation}`,{"is-interactive":s.interactive},r.class]),c=h(()=>r.style),p=h(()=>{const{class:$,style:S,...V}=r;return V}),w=($,S)=>$.status?$.status:S<d.value?"complete":S===d.value?"current":"upcoming",D=$=>{!s.interactive||$.disabled||(s.modelValue===void 0&&(i.value=$.value),n("update:modelValue",$.value))};return Fe(()=>s.items,$=>{!$.some(S=>S.value===o.value)&&$[0]&&s.modelValue===void 0&&(i.value=$[0].value)},{deep:!0}),($,S)=>(f(),g("ol",Ce(p.value,{class:u.value,style:c.value}),[(f(!0),g(_e,null,Ae(e.items,(V,E)=>(f(),g("li",{key:V.value,class:ce(["tree-steps__item",`is-${w(V,E)}`])},[_("button",{type:"button",class:ce(["tree-steps__button",{"is-current":w(V,E)==="current","is-disabled":V.disabled}]),disabled:!e.interactive||V.disabled,"aria-current":w(V,E)==="current"?"step":void 0,onClick:A=>D(V)},[U($.$slots,"item",{item:V,index:E,status:w(V,E),current:w(V,E)==="current"},()=>[_("span",Kv,[w(V,E)==="complete"?(f(),he(y(a),Ce({key:0,ref_for:!0},y(_t)),null,16)):w(V,E)==="error"?(f(),g("span",Uv,"!")):(f(),g("span",Wv,H(E+1),1))]),_("span",Gv,[_("span",qv,H(V.label),1),V.description?(f(),g("span",Qv,H(V.description),1)):j("",!0)]),V.meta?(f(),g("span",Yv,H(V.meta),1)):j("",!0)])],10,jv)],2))),128))],16))}}),Jv=["role"],Xv=["id","role","aria-checked","aria-pressed","tabindex","disabled","onClick","onKeydown","onFocus"],xr=fe({inheritAttrs:!1,__name:"TreeToggleGroup",props:{modelValue:{default:void 0},options:{default:()=>[]},selectionMode:{default:"single"},size:{default:"md"},variant:{default:"outline"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=Xe("tree-toggle-group"),r=ee(new Map),i=h(()=>l.selectionMode==="multiple"?Array.isArray(l.modelValue)?l.modelValue:[]:typeof l.modelValue=="string"&&l.modelValue?[l.modelValue]:[]),o=()=>{const A=l.options.findIndex(v=>i.value.includes(v.value)&&!v.disabled);return A>=0?A:l.options.findIndex(v=>!v.disabled)},d=ee(o()),u=h(()=>["tree-toggle-group",`tree-toggle-group--${l.size}`,`tree-toggle-group--${l.variant}`,`tree-toggle-group--${l.selectionMode}`,{"is-disabled":l.disabled},s.class]),c=h(()=>s.style),p=h(()=>{const{class:A,style:v,...b}=s;return b}),w=A=>i.value.includes(A),D=(A,v)=>{const b=A instanceof HTMLButtonElement?A:A&&"$el"in A&&A.$el instanceof HTMLButtonElement?A.$el:null;b instanceof HTMLButtonElement?r.value.set(v,b):r.value.delete(v)},$=A=>{const v=l.options[A];v&&(d.value=A,Ke(()=>{var b;return(b=r.value.get(v.value))==null?void 0:b.focus()}))},S=A=>{const v=l.options.find(b=>b.value===A);if(!(!v||v.disabled||l.disabled)){if(l.selectionMode==="multiple"){const b=w(A)?i.value.filter(C=>C!==A):[...i.value,A];a("update:modelValue",b);return}a("update:modelValue",A)}},V=(A,v)=>{if(!l.disabled){if(A.key==="Home"){A.preventDefault();const b=l.options.findIndex(C=>!C.disabled);b>=0&&($(b),l.selectionMode==="single"&&S(l.options[b].value));return}if(A.key==="End"){A.preventDefault();const b=[...l.options].reverse().findIndex(C=>!C.disabled);if(b>=0){const C=l.options.length-1-b;$(C),l.selectionMode==="single"&&S(l.options[C].value)}return}if(A.key==="ArrowRight"||A.key==="ArrowDown"||A.key==="ArrowLeft"||A.key==="ArrowUp"){A.preventDefault();const b=A.key==="ArrowRight"||A.key==="ArrowDown"?1:-1,C=Rl(v,l.options,b);C>=0&&($(C),l.selectionMode==="single"&&S(l.options[C].value));return}bt(A)&&(A.preventDefault(),S(l.options[v].value))}},E=A=>d.value===A?0:-1;return Fe(()=>[l.modelValue,l.options],()=>{const A=o();d.value=A>=0?A:-1},{deep:!0}),(A,v)=>(f(),g("div",Ce(p.value,{class:u.value,style:c.value,role:e.selectionMode==="single"?"radiogroup":"group"}),[(f(!0),g(_e,null,Ae(e.options,(b,C)=>(f(),g("button",{id:`${y(n)}-${b.value}`,ref_for:!0,ref:x=>D(x,b.value),key:b.value,type:"button",class:ce(["tree-toggle-group__item",{"is-selected":w(b.value),"is-disabled":e.disabled||b.disabled}]),role:e.selectionMode==="single"?"radio":void 0,"aria-checked":e.selectionMode==="single"?w(b.value):void 0,"aria-pressed":e.selectionMode==="multiple"?w(b.value):void 0,tabindex:b.disabled||e.disabled?-1:E(C),disabled:e.disabled||b.disabled,onClick:x=>S(b.value),onKeydown:x=>V(x,C),onFocus:x=>d.value=C},[U(A.$slots,"option",{option:b,selected:w(b.value)},()=>[de(H(b.label),1)])],42,Xv))),128))],16,Jv))}}),Zv=["value","placeholder","disabled","rows","aria-invalid"],$r=fe({inheritAttrs:!1,__name:"TreeTextarea",props:{modelValue:{default:""},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{default:""},rows:{default:3},autoGrow:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=ee(null),r=h(()=>["tree-textarea",`tree-textarea--${l.size}`,{"is-disabled":l.disabled,"is-invalid":l.invalid,"is-loading":l.loading},s.class]),i=h(()=>s.style),o=h(()=>{const{class:p,style:w,...D}=s;return D}),d=h(()=>`${l.modelValue??""}`),u=p=>{a("update:modelValue",p.target.value)},c=()=>{const p=n.value;!p||!l.autoGrow||(p.style.height="auto",p.style.height=`${p.scrollHeight}px`)};return Fe(()=>l.modelValue,async()=>{l.autoGrow&&(await Ke(),c())}),(p,w)=>(f(),g("label",{class:ce(r.value),style:Pe(i.value)},[_("textarea",Ce({ref_key:"textareaRef",ref:n},o.value,{class:"tree-textarea__field",value:d.value,placeholder:e.placeholder,disabled:e.disabled,rows:e.rows,"aria-invalid":e.invalid||void 0,onInput:u}),null,16,Zv),e.loading?(f(),he($t,{key:0,size:"sm",label:"Loading"})):j("",!0)],6))}}),ra=fe({__name:"TreeSkeleton",props:{width:{default:"100%"},height:{default:void 0},animation:{default:"pulse"}},setup(e){const t=e,l=h(()=>["tree-skeleton",t.animation!=="none"?`tree-skeleton--${t.animation}`:""]),a=h(()=>({width:t.width,height:t.height}));return(s,n)=>(f(),g("span",{class:ce(l.value),style:Pe(a.value),"aria-hidden":"true"},[U(s.$slots,"default")],6))}}),em={key:0,class:"tree-stat__loading"},tm={key:0,class:"tree-stat__icon"},lm={class:"tree-stat__body"},am={key:0,class:"tree-stat__topline"},sm={key:0,class:"tree-stat__label"},nm={key:1,class:"tree-stat__meta"},rm={class:"tree-stat__content"},im={key:0,class:"tree-stat__value"},om={key:1,class:"tree-stat__trend"},um={class:"tree-stat__trend-indicator","aria-hidden":"true"},ft=fe({inheritAttrs:!1,__name:"TreeStat",props:{label:{default:""},value:{default:""},trend:{default:""},meta:{default:""},tone:{default:"neutral"},trendDirection:{default:"neutral"},loading:{type:Boolean,default:!1}},setup(e){const t=e,l=Ie(),a=xl(),s=h(()=>["tree-stat",`tree-stat--${t.tone}`,{"has-icon":!!a.icon&&!t.loading,"is-loading":t.loading},l.class]),n=h(()=>l.style),r=h(()=>{const{class:w,style:D,...$}=l;return $}),i=h(()=>({...r.value,"aria-busy":t.loading||void 0})),o=h(()=>t.value!==""&&t.value!==null&&t.value!==void 0),d=h(()=>!!(a.trend||t.trend)),u=h(()=>!!(a.meta||t.meta)),c=h(()=>!!(a.label||t.label)),p=h(()=>t.trendDirection==="up"?"+":t.trendDirection==="down"?"-":"•");return(w,D)=>(f(),g("div",Ce(i.value,{class:s.value,style:n.value}),[e.loading?(f(),g("div",em,[L(ra,{class:"tree-stat__loading-label"}),L(ra,{class:"tree-stat__loading-value"}),L(ra,{class:"tree-stat__loading-trend"})])):(f(),g(_e,{key:1},[w.$slots.icon?(f(),g("div",tm,[U(w.$slots,"icon")])):j("",!0),_("div",lm,[c.value||u.value?(f(),g("div",am,[c.value?(f(),g("p",sm,[U(w.$slots,"label",{},()=>[de(H(e.label),1)])])):j("",!0),u.value?(f(),g("p",nm,[U(w.$slots,"meta",{},()=>[de(H(e.meta),1)])])):j("",!0)])):j("",!0),_("div",rm,[o.value||w.$slots.value?(f(),g("p",im,[U(w.$slots,"value",{},()=>[de(H(e.value),1)])])):j("",!0),d.value?(f(),g("p",om,[U(w.$slots,"trend",{},()=>[_("span",um,H(p.value),1),_("span",null,H(e.trend),1)])])):j("",!0)])])],64))],16))}}),dm=["checked","disabled","aria-checked","aria-invalid"],cm={key:0,class:"tree-switch__label"},Cr=fe({inheritAttrs:!1,__name:"TreeSwitch",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=h(()=>["tree-switch",`tree-switch--${l.size}`,{"is-checked":l.modelValue,"is-disabled":l.disabled,"is-invalid":l.invalid},s.class]),r=h(()=>s.style),i=h(()=>{const{class:d,style:u,...c}=s;return c}),o=()=>{a("update:modelValue",!l.modelValue)};return(d,u)=>(f(),g("label",{class:ce(n.value),style:Pe(r.value)},[_("input",Ce(i.value,{type:"checkbox",role:"switch",class:"tree-switch__input",checked:e.modelValue,disabled:e.disabled,"aria-checked":e.modelValue,"aria-invalid":e.invalid||void 0,onChange:o}),null,16,dm),u[0]||(u[0]=_("span",{class:"tree-switch__track","aria-hidden":"true"},[_("span",{class:"tree-switch__thumb"})],-1)),d.$slots.default?(f(),g("span",cm,[U(d.$slots,"default")])):j("",!0)],6))}}),fm=["data-state"],pm=["aria-describedby"],vm=["id","data-state"],Sr=fe({inheritAttrs:!1,__name:"TreeTooltip",props:{open:{type:Boolean},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},content:{default:""},side:{default:"top"},delay:{default:80},id:{default:void 0}},emits:["update:open","open-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=l.id??Xe("tree-tooltip"),r=h(()=>{const{class:E,style:A,...v}=s;return v}),i=h(()=>["tree-tooltip",s.class]),o=h(()=>s.style),{value:d,setValue:u}=Ct(ot(l,"open"),l.defaultOpen,E=>{a("update:open",E),a("open-change",E)});let c;const p=()=>{c&&(clearTimeout(c),c=void 0)},w=(E=!1)=>{if(!l.disabled){if(p(),E){u(!0);return}c=setTimeout(()=>{u(!0)},l.delay)}},D=()=>{w(!0)},$=()=>{w()},S=()=>{p(),u(!1)},V=h(()=>["tree-tooltip__content",`tree-tooltip__content--${l.side}`]);return Ge(p),(E,A)=>(f(),g("span",{class:ce(i.value),style:Pe(o.value),"data-state":y(d)?"open":"closed",onMouseenter:$,onMouseleave:S,onFocusCapture:D,onBlurCapture:S},[_("span",Ce({class:"tree-tooltip__trigger","aria-describedby":y(d)?y(n):void 0},r.value),[U(E.$slots,"trigger",{},()=>[U(E.$slots,"default")])],16,pm),L(Lt,{name:"tree-fade"},{default:N(()=>[y(d)&&!e.disabled?(f(),g("span",{key:0,id:y(n),role:"tooltip",class:ce(V.value),"data-state":y(d)?"open":"closed"},[U(E.$slots,"content",{},()=>[de(H(e.content),1)])],10,vm)):j("",!0)]),_:3})],46,fm))}}),mm=["for"],hm={key:0,class:"tree-form-field__required","aria-hidden":"true"},bm={class:"tree-form-field__control"},gm={key:1,class:"tree-form-field__error",role:"alert"},ym={key:2,class:"tree-form-field__hint"},Bs=fe({inheritAttrs:!1,__name:"TreeFormField",props:{label:{default:void 0},htmlFor:{default:void 0},error:{default:void 0},hint:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"md"}},setup(e){const t=e,l=Ie(),a=h(()=>!!t.error||!!s.error),s=xl(),n=h(()=>["tree-form-field",`tree-form-field--${t.size}`,{"is-disabled":t.disabled,"is-invalid":a.value,"is-required":t.required},l.class]),r=h(()=>l.style),i=h(()=>{const{class:o,style:d,...u}=l;return u});return(o,d)=>(f(),g("div",Ce(i.value,{class:n.value,style:r.value}),[e.label||o.$slots.label?(f(),g("label",{key:0,class:"tree-form-field__label",for:e.htmlFor},[U(o.$slots,"label",{},()=>[de(H(e.label),1)]),e.required?(f(),g("span",hm,"*")):j("",!0)],8,mm)):j("",!0),_("div",bm,[U(o.$slots,"default")]),a.value?(f(),g("p",gm,[U(o.$slots,"error",{},()=>[de(H(e.error),1)])])):e.hint||o.$slots.hint?(f(),g("p",ym,[U(o.$slots,"hint",{},()=>[de(H(e.hint),1)])])):j("",!0)],16))}}),_m=["aria-label"],km={class:"tree-pagination__list"},wm={class:"tree-pagination__item"},Tm=["disabled"],xm={key:0,class:"tree-pagination__ellipsis","aria-hidden":"true"},$m=["disabled","aria-label","aria-current","onClick","onKeydown"],Cm={class:"tree-pagination__item"},Sm=["disabled"],Dr=fe({__name:"TreePagination",props:{modelValue:{default:1},totalPages:{},siblings:{default:1},size:{default:"md"},disabled:{type:Boolean,default:!1},label:{default:"Pagination"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>Math.min(Math.max(1,l.modelValue),l.totalPages)),n=h(()=>{const d=l.totalPages,u=s.value,c=l.siblings,p=[],w=Math.max(2,u-c),D=Math.min(d-1,u+c);p.push(1),w>2&&p.push("ellipsis");for(let $=w;$<=D;$++)p.push($);return D<d-1&&p.push("ellipsis"),d>1&&p.push(d),p}),r=h(()=>["tree-pagination",`tree-pagination--${l.size}`,{"is-disabled":l.disabled}]);function i(d){if(l.disabled)return;const u=Math.min(Math.max(1,d),l.totalPages);u!==s.value&&a("update:modelValue",u)}function o(d,u){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(u))}return(d,u)=>(f(),g("nav",{class:ce(r.value),"aria-label":e.label},[_("ul",km,[_("li",wm,[_("button",{class:"tree-pagination__button tree-pagination__button--prev",type:"button",disabled:e.disabled||s.value<=1,"aria-label":"Go to previous page",onClick:u[0]||(u[0]=c=>i(s.value-1))},[U(d.$slots,"previous",{},()=>[u[2]||(u[2]=_("svg",{class:"tree-pagination__icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[_("path",{d:"M10 12L6 8l4-4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])],8,Tm)]),(f(!0),g(_e,null,Ae(n.value,(c,p)=>(f(),g("li",{key:c==="ellipsis"?`ellipsis-${p}`:c,class:"tree-pagination__item"},[c==="ellipsis"?(f(),g("span",xm," … ")):(f(),g("button",{key:1,class:ce(["tree-pagination__button",{"is-active":c===s.value}]),type:"button",disabled:e.disabled,"aria-label":`Go to page ${c}`,"aria-current":c===s.value?"page":void 0,onClick:w=>i(c),onKeydown:w=>o(w,c)},H(c),43,$m))]))),128)),_("li",Cm,[_("button",{class:"tree-pagination__button tree-pagination__button--next",type:"button",disabled:e.disabled||s.value>=e.totalPages,"aria-label":"Go to next page",onClick:u[1]||(u[1]=c=>i(s.value+1))},[U(d.$slots,"next",{},()=>[u[3]||(u[3]=_("svg",{class:"tree-pagination__icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[_("path",{d:"M6 4l4 4-4 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])],8,Sm)])])],10,_m))}}),Dm=["data-state"],Am=["disabled","aria-expanded","aria-controls"],Em=["id","data-state"],Ar=fe({inheritAttrs:!1,__name:"TreePopover",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},side:{default:"bottom"},align:{default:"center"},id:{default:void 0}},emits:["update:open","open-change"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=l.id??Xe("tree-popover"),r=ee(null),i=ee(null),o=ee(null),d=h(()=>{const{class:b,style:C,...x}=s;return x}),{value:u,setValue:c}=Ct(ot(l,"open"),l.defaultOpen,b=>{a("update:open",b),a("open-change",b)}),p=h(()=>["tree-popover",{"is-open":u.value,"is-disabled":l.disabled},s.class]),w=h(()=>s.style),D=h(()=>["tree-popover__content",`tree-popover__content--${l.side}`,`tree-popover__content--align-${l.align}`]),$=()=>{l.disabled||(c(!0),Ke(()=>{o.value&&(va(o.value)||o.value.focus())}))},S=(b=!1)=>{c(!1),b&&Ke(()=>{var C;return(C=i.value)==null?void 0:C.focus()})},V=()=>{u.value?S():$()},E=b=>{l.disabled||gt(b)&&u.value&&(b.preventDefault(),S())},A=b=>{gt(b)&&(b.preventDefault(),S(!0))},v=b=>{var C;if(!u.value)return;const x=b.target;x instanceof Node&&((C=r.value)!=null&&C.contains(x)||S())};return Fe(u,b=>{b?document.addEventListener("pointerdown",v):document.removeEventListener("pointerdown",v)}),Ge(()=>{document.removeEventListener("pointerdown",v)}),(b,C)=>(f(),g("div",{ref_key:"rootRef",ref:r,class:ce(p.value),style:Pe(w.value),"data-state":y(u)?"open":"closed"},[_("div",{class:"tree-popover__anchor",onClick:V,onKeydown:E},[U(b.$slots,"trigger",{isOpen:y(u)},()=>[_("button",Ce({ref_key:"triggerRef",ref:i,type:"button",class:"tree-popover__trigger",disabled:e.disabled,"aria-expanded":y(u),"aria-controls":y(u)?y(n):void 0,"aria-haspopup":"dialog"},d.value),null,16,Am)])],32),L(Lt,{name:"tree-popover-fade"},{default:N(()=>[y(u)&&!e.disabled?(f(),g("div",{key:0,id:y(n),ref_key:"contentRef",ref:o,role:"dialog",class:ce(D.value),"data-state":y(u)?"open":"closed",tabindex:"-1",onKeydown:A},[U(b.$slots,"default")],42,Em)):j("",!0)]),_:3})],14,Dm))}}),Im=["aria-valuenow","aria-label"],Vm={class:"tree-progress__track"},Mm={class:"tree-visually-hidden"},Ls=fe({__name:"TreeProgress",props:{value:{default:void 0},max:{default:100},size:{default:"md"},label:{default:"Progress"}},setup(e){const t=e,l=h(()=>t.value===void 0||t.value===null),a=h(()=>l.value?0:Math.min(100,Math.max(0,t.value/t.max*100))),s=h(()=>["tree-progress",`tree-progress--${t.size}`,{"tree-progress--indeterminate":l.value}]);return(n,r)=>(f(),g("div",{class:ce(s.value),role:"progressbar","aria-valuenow":l.value?void 0:a.value,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e.label},[_("div",Vm,[_("div",{class:"tree-progress__fill",style:Pe(l.value?void 0:{width:`${a.value}%`})},null,4)]),_("span",Mm,H(e.label),1)],10,Im))}}),ts=Symbol("TreeTabs"),Os=fe({__name:"TreeTabs",props:{modelValue:{default:void 0},defaultValue:{default:""},size:{default:"md"},activationMode:{default:"automatic"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,s=Xe("tree-tabs"),n=ee(l.defaultValue),r=ee([]),i=Nl({}),o=h(()=>l.modelValue??n.value),d=S=>{S!==o.value&&(l.modelValue===void 0&&(n.value=S),a("update:modelValue",S))},u=S=>{r.value.includes(S)||r.value.push(S)},c=S=>{const V=r.value.indexOf(S);V>=0&&r.value.splice(V,1),delete i[S]},p=()=>r.value,w=S=>l.disabled||!!i[S],D=(S,V)=>{V?i[S]=!0:delete i[S]};Fe(()=>l.modelValue,S=>{S!==void 0&&(n.value=S)}),Ul(ts,{activeValue:o,setActiveValue:d,size:ot(l,"size"),activationMode:ot(l,"activationMode"),disabled:ot(l,"disabled"),baseId:s,registerTab:u,unregisterTab:c,getTabValues:p,isTabDisabled:w,setTabDisabled:D});const $=h(()=>["tree-tabs",`tree-tabs--${l.size}`]);return(S,V)=>(f(),g("div",{class:ce($.value)},[U(S.$slots,"default")],2))}}),Fs=fe({__name:"TreeTabList",setup(e){const t=Vt(ts);if(!t)throw new Error("TTabList must be used inside TTabs");const l=ee(null),a=()=>l.value?Array.from(l.value.querySelectorAll('[role="tab"]')):[],s=()=>a().filter(u=>{const c=u.dataset.tabValue;return c?!t.isTabDisabled(c):!1}),n=u=>{const c=s();if(!c.length)return;const p=document.activeElement;let w=c.indexOf(p)+u;w<0&&(w=c.length-1),w>=c.length&&(w=0);const D=c[w];if(D.focus(),t.activationMode.value==="automatic"){const $=D.dataset.tabValue;$&&t.setActiveValue($)}},r=()=>{const u=s();if(u.length&&(u[0].focus(),t.activationMode.value==="automatic")){const c=u[0].dataset.tabValue;c&&t.setActiveValue(c)}},i=()=>{const u=s();if(!u.length)return;const c=u[u.length-1];if(c.focus(),t.activationMode.value==="automatic"){const p=c.dataset.tabValue;p&&t.setActiveValue(p)}},o=u=>{var c;switch(u.key){case"ArrowRight":u.preventDefault(),n(1);break;case"ArrowLeft":u.preventDefault(),n(-1);break;case"Home":u.preventDefault(),r();break;case"End":u.preventDefault(),i();break;default:if(t.activationMode.value==="manual"&&bt(u)){u.preventDefault();const p=(c=u.target.dataset)==null?void 0:c.tabValue;p&&t.setActiveValue(p)}break}},d=h(()=>["tree-tabs__list"]);return(u,c)=>(f(),g("div",{ref_key:"listRef",ref:l,role:"tablist","aria-orientation":"horizontal",class:ce(d.value),onKeydown:o},[U(u.$slots,"default")],34))}}),Bm=["id","aria-selected","aria-controls","tabindex","disabled","data-tab-value"],Dl=fe({__name:"TreeTab",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const t=e,l=Vt(ts);if(!l)throw new Error("TTab must be used inside TTabs");Ut(()=>{l.registerTab(t.value),l.setTabDisabled(t.value,t.disabled)}),Fe(()=>t.disabled,d=>l.setTabDisabled(t.value,d)),Ge(()=>{l.unregisterTab(t.value)});const a=h(()=>l.activeValue.value===t.value),s=h(()=>l.isTabDisabled(t.value)),n=h(()=>`${l.baseId}-tab-${t.value}`),r=h(()=>`${l.baseId}-panel-${t.value}`),i=()=>{s.value||l.setActiveValue(t.value)},o=h(()=>["tree-tabs__tab",`tree-tabs__tab--${l.size.value}`,{"is-active":a.value,"is-disabled":s.value}]);return(d,u)=>(f(),g("button",{id:n.value,role:"tab",type:"button",class:ce(o.value),"aria-selected":a.value,"aria-controls":r.value,tabindex:a.value?0:-1,disabled:s.value||void 0,"data-tab-value":e.value,onClick:i},[U(d.$slots,"default")],10,Bm))}}),Lm=["id","aria-labelledby"],Al=fe({__name:"TreeTabPanel",props:{value:{}},setup(e){const t=e,l=Vt(ts);if(!l)throw new Error("TTabPanel must be used inside TTabs");const a=h(()=>l.activeValue.value===t.value),s=h(()=>`${l.baseId}-panel-${t.value}`),n=h(()=>`${l.baseId}-tab-${t.value}`);return(r,i)=>a.value?(f(),g("div",{key:0,id:s.value,role:"tabpanel","aria-labelledby":n.value,tabindex:"0",class:"tree-tabs__panel"},[U(r.$slots,"default")],8,Lm)):j("",!0)}}),Om=["aria-describedby"],Fm={class:"tree-toast__icon","aria-hidden":"true"},Nm={class:"tree-toast__content"},Ns=fe({__name:"TreeToast",props:{toast:{}},emits:["close"],setup(e,{emit:t}){const l=We("x"),a={info:We("info"),success:We("check"),warning:We("alert-circle"),danger:We("alert-circle")},s=e,n=t,r=Xe("tree-toast-item"),i=`${r}-title`,o=`${r}-description`,d=h(()=>["tree-toast",`tree-toast--${s.toast.variant}`]),u=h(()=>a[s.toast.variant]);function c(){n("close",s.toast.id)}return(p,w)=>(f(),g("div",{class:ce(d.value),role:"status","aria-labelledby":i,"aria-describedby":e.toast.description?o:void 0},[_("span",Fm,[L(y(u),Ce(y(_t),{size:18}),null,16)]),_("div",Nm,[_("p",{id:i,class:"tree-toast__title"},H(e.toast.title),1),e.toast.description?(f(),g("p",{key:0,id:o,class:"tree-toast__description"},H(e.toast.description),1)):j("",!0)]),e.toast.closable?(f(),g("button",{key:0,type:"button",class:"tree-toast__close","aria-label":"Dismiss notification",onClick:c},[L(y(l),Ce(y(_t),{size:16}),null,16)])):j("",!0)],10,Om))}}),Kl=ee([]),ha=new Map;function Pm(e){const t=Xe("tree-toast"),l={id:t,title:e.title,description:e.description,variant:e.variant??"info",duration:e.duration??5e3,closable:e.closable??!0};if(Kl.value=[...Kl.value,l],l.duration>0){const a=setTimeout(()=>{io(t)},l.duration);ha.set(t,a)}return t}function io(e){const t=ha.get(e);t&&(clearTimeout(t),ha.delete(e)),Kl.value=Kl.value.filter(l=>l.id!==e)}function zm(){for(const e of ha.values())clearTimeout(e);ha.clear(),Kl.value=[]}function ls(){return{toasts:Aa(Kl),add:Pm,remove:io,clear:zm}}const Ps=fe({__name:"TreeToastProvider",props:{position:{default:"bottom-right"},max:{default:5}},setup(e){const t=e,{toasts:l,remove:a}=ls(),s=h(()=>l.value.slice(-t.max)),n=h(()=>["tree-toast-provider",`tree-toast-provider--${t.position}`]);function r(i){a(i)}return(i,o)=>(f(),g(_e,null,[U(i.$slots,"default"),(f(),he(Qa,{to:"body"},[_("div",{class:ce(n.value),"aria-live":"polite","aria-relevant":"additions removals"},[L(Hd,{name:"tree-toast"},{default:N(()=>[(f(!0),g(_e,null,Ae(s.value,d=>(f(),he(Ns,{key:d.id,toast:d,onClose:r},null,8,["toast"]))),128))]),_:1})],2)]))],64))}}),Rm=["aria-label"],Hm=["src","alt"],jm={key:1,class:"tree-avatar__initials","aria-hidden":"true"},Km=["aria-label"],Er=fe({__name:"TreeAvatar",props:{src:{default:void 0},alt:{default:""},initials:{default:void 0},size:{default:"md"},status:{default:void 0}},setup(e){const t=e,l=h(()=>["tree-avatar",`tree-avatar--${t.size}`]),a=h(()=>t.initials?t.initials:t.alt?t.alt.split(" ").filter(Boolean).map(n=>n[0]).slice(0,2).join("").toUpperCase():"");function s(n){const r=n.target;r.style.display="none"}return(n,r)=>(f(),g("span",{class:ce(l.value),role:"img","aria-label":e.alt||void 0},[e.src?(f(),g("img",{key:0,src:e.src,alt:e.alt,class:"tree-avatar__image",onError:s},null,40,Hm)):(f(),g("span",jm,H(a.value),1)),U(n.$slots,"default"),e.status?(f(),g("span",{key:2,class:ce(["tree-avatar__status",`tree-avatar__status--${e.status}`]),"aria-label":e.status},null,10,Km)):j("",!0)],10,Rm))}}),Um=["role","aria-orientation","aria-label"],Pa=fe({__name:"TreeDivider",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},label:{default:void 0}},setup(e){const t=e,l=h(()=>["tree-divider",`tree-divider--${t.orientation}`]);return(a,s)=>(f(),g("hr",{class:ce(l.value),role:e.decorative?"none":"separator","aria-orientation":e.decorative?void 0:e.orientation,"aria-label":e.decorative?void 0:e.label},null,10,Um))}}),Wm={class:"tree-table-wrapper"},Gm={class:"tree-table__head"},qm={class:"tree-table__row"},Qm=["aria-sort","tabindex","onClick","onKeydown"],Ym={class:"tree-table__header-content"},Jm={key:0,class:"tree-table__sort-icon","aria-hidden":"true"},Xm={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Zm={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},eh={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"0.4"}},th={class:"tree-table__body"},lh={key:0,class:"tree-table__row tree-table__row--empty"},ah=["colspan"],ba=fe({__name:"TreeTable",props:{columns:{},rows:{},size:{default:"md"},sortBy:{default:void 0}},emits:["sort"],setup(e,{emit:t}){const l=e,a=t,s=ee(void 0),n=h(()=>l.sortBy??s.value),r=h(()=>["tree-table",`tree-table--${l.size}`]),i=h(()=>{const c=n.value;return!c||c.direction==="none"?l.rows:[...l.rows].sort((p,w)=>{const D=p[c.key],$=w[c.key];if(D==null&&$==null)return 0;if(D==null)return 1;if($==null)return-1;const S=typeof D=="number"&&typeof $=="number"?D-$:String(D).localeCompare(String($));return c.direction==="desc"?-S:S})});function o(c){if(!c.sortable)return;const p=n.value;let w="asc";(p==null?void 0:p.key)===c.key&&(p.direction==="asc"?w="desc":p.direction==="desc"?w="none":w="asc");const D={key:c.key,direction:w};s.value=D,a("sort",D)}function d(c){if(!c.sortable)return;const p=n.value;return(p==null?void 0:p.key)!==c.key||p.direction==="none"?"none":p.direction==="asc"?"ascending":"descending"}function u(c,p){p.sortable&&(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(p))}return(c,p)=>(f(),g("div",Wm,[_("table",{class:ce(r.value),role:"grid"},[_("thead",Gm,[_("tr",qm,[(f(!0),g(_e,null,Ae(e.columns,w=>(f(),g("th",{key:w.key,class:ce(["tree-table__header",[w.sortable?"tree-table__header--sortable":"",w.align?`tree-table__header--${w.align}`:""]]),style:Pe(w.width?{width:w.width}:void 0),"aria-sort":d(w),tabindex:w.sortable?0:void 0,scope:"col",onClick:D=>o(w),onKeydown:D=>u(D,w)},[U(c.$slots,`header-${w.key}`,{column:w},()=>{var D,$;return[_("span",Ym,[de(H(w.label)+" ",1),w.sortable?(f(),g("span",Jm,[((D=n.value)==null?void 0:D.key)===w.key&&n.value.direction==="asc"?(f(),g("svg",Xm,[...p[0]||(p[0]=[_("path",{d:"m18 15-6-6-6 6"},null,-1)])])):(($=n.value)==null?void 0:$.key)===w.key&&n.value.direction==="desc"?(f(),g("svg",Zm,[...p[1]||(p[1]=[_("path",{d:"m6 9 6 6 6-6"},null,-1)])])):(f(),g("svg",eh,[...p[2]||(p[2]=[_("path",{d:"m7 15 5 5 5-5"},null,-1),_("path",{d:"m7 9 5-5 5 5"},null,-1)])]))])):j("",!0)])]})],46,Qm))),128))])]),_("tbody",th,[i.value.length===0?(f(),g("tr",lh,[_("td",{colspan:e.columns.length,class:"tree-table__cell tree-table__cell--empty"},[U(c.$slots,"empty",{},()=>[p[3]||(p[3]=de(" No data available. ",-1))])],8,ah)])):j("",!0),(f(!0),g(_e,null,Ae(i.value,(w,D)=>(f(),g("tr",{key:D,class:"tree-table__row"},[(f(!0),g(_e,null,Ae(e.columns,$=>(f(),g("td",{key:$.key,class:ce(["tree-table__cell",$.align?`tree-table__cell--${$.align}`:""])},[U(c.$slots,`cell-${$.key}`,{row:w,value:w[$.key]},()=>[de(H(w[$.key]??""),1)])],2))),128))]))),128))])],2)]))}}),sh={key:0,class:"tree-tag__icon","aria-hidden":"true"},nh={class:"tree-tag__label"},rh=["disabled"],jt=fe({__name:"TreeTag",props:{variant:{default:"soft"},size:{default:"md"},removable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["remove"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>["tree-tag",`tree-tag--${l.variant}`,`tree-tag--${l.size}`,l.disabled?"is-disabled":""]);function n(){l.disabled||a("remove")}return(r,i)=>(f(),g("span",{class:ce(s.value)},[r.$slots.icon?(f(),g("span",sh,[U(r.$slots,"icon")])):j("",!0),_("span",nh,[U(r.$slots,"default")]),e.removable?(f(),g("button",{key:1,type:"button",class:"tree-tag__remove",disabled:e.disabled,"aria-label":"Remove",onClick:n},[...i[0]||(i[0]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"M18 6 6 18"}),_("path",{d:"m6 6 12 12"})],-1)])],8,rh)):j("",!0)],2))}}),ih={class:"tree-timeline__rail"},oh={key:0,class:"tree-timeline__line","aria-hidden":"true"},uh={class:"tree-timeline__content"},dh={key:0,class:"tree-timeline__meta"},ch={class:"tree-timeline__header"},fh={class:"tree-timeline__title"},ph=["datetime"],vh={key:1,class:"tree-timeline__description"},Ir=fe({inheritAttrs:!1,__name:"TreeTimeline",props:{items:{default:()=>[]},size:{default:"md"}},setup(e){const t=e,l=Ie(),a=h(()=>["tree-timeline",`tree-timeline--${t.size}`,l.class]),s=h(()=>l.style),n=h(()=>{const{class:o,style:d,...u}=l;return u}),r=o=>o??"neutral",i=(o,d)=>o.id??`${o.title}-${d}`;return(o,d)=>(f(),g("ol",Ce(n.value,{class:a.value,style:s.value}),[(f(!0),g(_e,null,Ae(e.items,(u,c)=>(f(),g("li",{key:i(u,c),class:"tree-timeline__item"},[_("div",ih,[c<e.items.length-1?(f(),g("span",oh)):j("",!0),_("div",{class:ce(["tree-timeline__marker",`tree-timeline__marker--${r(u.tone)}`]),"aria-hidden":"true"},[U(o.$slots,"marker",{item:u,index:c})],2)]),_("div",uh,[U(o.$slots,"item",{item:u,index:c},()=>[u.meta?(f(),g("div",dh,H(u.meta),1)):j("",!0),_("div",ch,[_("p",fh,H(u.title),1),u.timestamp?(f(),g("time",{key:0,class:"tree-timeline__timestamp",datetime:u.datetime||void 0},H(u.timestamp),9,ph)):j("",!0)]),u.description?(f(),g("p",vh,H(u.description),1)):j("",!0)])])]))),128))],16))}}),mh={key:0,class:"tree-pricing-card__badge"},hh={class:"tree-pricing-card__header"},bh={class:"tree-pricing-card__title"},gh={key:0,class:"tree-pricing-card__description"},yh={class:"tree-pricing-card__price"},_h={class:"tree-pricing-card__currency"},kh={class:"tree-pricing-card__amount"},wh={key:0,class:"tree-pricing-card__period"},Th={key:1,class:"tree-pricing-card__features"},xh={class:"tree-pricing-card__feature-list",role:"list"},$h={class:"tree-pricing-card__feature-icon","aria-hidden":"true"},Ch={key:2,class:"tree-pricing-card__action"},zs=fe({__name:"TreePricingCard",props:{title:{},description:{default:void 0},price:{},currency:{default:"$"},period:{default:void 0},features:{default:()=>[]},highlighted:{type:Boolean,default:!1},badge:{default:void 0},buttonText:{default:void 0},size:{default:"md"},disabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>["tree-pricing-card",`tree-pricing-card--${l.size}`,{"tree-pricing-card--highlighted":l.highlighted}]),n=()=>{l.disabled||a("select")};return(r,i)=>(f(),g("article",{class:ce(s.value)},[e.badge||r.$slots.badge?(f(),g("div",mh,[U(r.$slots,"badge",{},()=>[L(Ze,{variant:"solid",size:"sm"},{default:N(()=>[de(H(e.badge),1)]),_:1})])])):j("",!0),_("header",hh,[U(r.$slots,"header",{},()=>[_("h3",bh,H(e.title),1),e.description?(f(),g("p",gh,H(e.description),1)):j("",!0)])]),_("div",yh,[U(r.$slots,"price",{},()=>[_("span",_h,H(e.currency),1),_("span",kh,H(e.price),1),e.period?(f(),g("span",wh,H(e.period),1)):j("",!0)])]),e.features.length>0||r.$slots.features?(f(),g("div",Th,[U(r.$slots,"features",{},()=>[_("ul",xh,[(f(!0),g(_e,null,Ae(e.features,(o,d)=>(f(),g("li",{key:d,class:ce(["tree-pricing-card__feature-item",{"tree-pricing-card__feature-item--excluded":o.included===!1}])},[_("span",$h,H(o.included===!1?"✕":"✓"),1),_("span",null,H(o.text),1)],2))),128))])])])):j("",!0),e.buttonText||r.$slots.action?(f(),g("footer",Ch,[U(r.$slots,"action",{},()=>[L(et,{variant:e.highlighted?"solid":"outline",size:e.size,disabled:e.disabled,onClick:n},{default:N(()=>[de(H(e.buttonText),1)]),_:1},8,["variant","size","disabled"])])])):j("",!0)],2))}}),Vr=fe({__name:"TreePricing",props:{plans:{},size:{default:"md"},columns:{default:void 0}},emits:["select"],setup(e,{emit:t}){const l=e,a=t,s=h(()=>l.columns?{gridTemplateColumns:`repeat(${l.columns}, 1fr)`}:{gridTemplateColumns:`repeat(${l.plans.length}, 1fr)`});return(n,r)=>(f(),g("div",{class:"tree-pricing",style:Pe(s.value),role:"list"},[(f(!0),g(_e,null,Ae(e.plans,(i,o)=>(f(),g("div",{key:o,role:"listitem"},[U(n.$slots,"plan",{plan:i,index:o},()=>[L(zs,Ce({ref_for:!0},i,{size:e.size,onSelect:d=>a("select",i,o)}),null,16,["size","onSelect"])])]))),128))],4))}}),Sh={class:"tree-md-editor__toolbar",role:"toolbar","aria-label":"Markdown formatting"},Dh={class:"tree-md-editor__toolbar-group"},Ah=["disabled"],Eh=["disabled"],Ih=["disabled"],Vh={class:"tree-md-editor__toolbar-group"},Mh=["disabled"],Bh=["disabled"],Lh=["disabled"],Oh={class:"tree-md-editor__toolbar-group"},Fh=["disabled"],Nh=["disabled"],Ph=["disabled"],zh={class:"tree-md-editor__toolbar-group"},Rh=["disabled"],Hh=["disabled"],jh=["disabled"],Kh=["disabled"],Uh={class:"tree-md-editor__body"},Wh={class:"tree-md-editor__pane tree-md-editor__pane--write"},Gh=["value","placeholder","disabled","aria-label"],qh={class:"tree-md-editor__pane tree-md-editor__pane--preview","aria-label":"Markdown preview"},Qh=["innerHTML"],Yh={key:0,class:"tree-md-editor__upload-bar",role:"status","aria-live":"polite"},Mr=fe({inheritAttrs:!1,__name:"TreeMarkdownEditor",props:{modelValue:{default:""},size:{default:"md"},disabled:{type:Boolean,default:!1},placeholder:{default:"Write your markdown here..."},uploadImage:{type:Function,default:void 0}},emits:["update:modelValue","image-upload","image-upload-error"],setup(e,{emit:t}){const l=e,a=t,s=Ie(),n=ee(null),r=ee(!1),i=h(()=>["tree-md-editor",`tree-md-editor--${l.size}`,{"is-disabled":l.disabled,"is-uploading":r.value},s.class]),o=h(()=>s.style),d=h(()=>{const{class:Q,style:T,...O}=s;return O}),u=h(()=>`${l.modelValue??""}`),c=Q=>{a("update:modelValue",Q.target.value)},p=(Q,T="")=>{const O=n.value;if(!O)return;const se=O.selectionStart,ve=O.selectionEnd,W=u.value,me=W.slice(se,ve),ue=W.slice(0,se)+Q+me+T+W.slice(ve);a("update:modelValue",ue),Ke(()=>{O.focus();const ae=me?se+Q.length+me.length+T.length:se+Q.length;O.setSelectionRange(ae,ae)})},w=Q=>{const T="#".repeat(Q)+" ",O=n.value;if(!O)return;const se=O.selectionStart,ve=u.value,W=ve.lastIndexOf(`
18
+ `,se-1)+1,me=ve.indexOf(`
19
+ `,se),ue=me===-1?ve.length:me,ae=ve.slice(W,ue).replace(/^#{1,6}\s*/,""),De=T+ae,ye=ve.slice(0,W)+De+ve.slice(ue);a("update:modelValue",ye),Ke(()=>{O.focus(),O.setSelectionRange(W+De.length,W+De.length)})},D=()=>p("**","**"),$=()=>p("_","_"),S=()=>p("`","`"),V=()=>p("\n```\n","\n```\n"),E=()=>p("[","](url)"),A=()=>p(`
20
+ - `),v=()=>p(`
21
+ 1. `),b=()=>p(`
22
+ > `),C=()=>p(`
23
+ ---
24
+ `),x=h(()=>z(u.value));function B(Q){return Q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function z(Q){if(!Q)return"";const T=Q.split(`
25
+ `),O=[];let se=!1,ve=!1,W=!1;for(let me=0;me<T.length;me++){const ue=T[me];if(ue.trim().startsWith("```")){se?(O.push("</code></pre>"),se=!1):(se=!0,O.push('<pre class="tree-md-editor__code-block"><code>'));continue}if(se){O.push(B(ue)),O.push(`
26
+ `);continue}const ae=/^[-*+]\s/.test(ue.trim()),De=/^\d+\.\s/.test(ue.trim());if(ve&&!ae&&(O.push("</ul>"),ve=!1),W&&!De&&(O.push("</ol>"),W=!1),/^(-{3,}|_{3,}|\*{3,})$/.test(ue.trim())){O.push('<hr class="tree-md-editor__hr" />');continue}const ye=ue.match(/^(#{1,6})\s+(.+)$/);if(ye){const Oe=ye[1].length;O.push(`<h${Oe} class="tree-md-editor__heading tree-md-editor__heading--${Oe}">${M(B(ye[2]))}</h${Oe}>`);continue}if(ue.trim().startsWith("> ")){O.push(`<blockquote class="tree-md-editor__blockquote">${M(B(ue.trim().slice(2)))}</blockquote>`);continue}if(ae){ve||(O.push('<ul class="tree-md-editor__list">'),ve=!0),O.push(`<li>${M(B(ue.trim().slice(2)))}</li>`);continue}if(De){W||(O.push('<ol class="tree-md-editor__list tree-md-editor__list--ordered">'),W=!0);const Oe=ue.trim().replace(/^\d+\.\s/,"");O.push(`<li>${M(B(Oe))}</li>`);continue}if(ue.trim()===""){O.push("<br />");continue}O.push(`<p class="tree-md-editor__paragraph">${M(B(ue))}</p>`)}return se&&O.push("</code></pre>"),ve&&O.push("</ul>"),W&&O.push("</ol>"),O.join(`
27
+ `)}function M(Q){return Q=Q.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" class="tree-md-editor__image" loading="lazy" />'),Q=Q.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),Q=Q.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),Q=Q.replace(/_(.+?)_/g,"<em>$1</em>"),Q=Q.replace(new RegExp("(?<!\\*)\\*(?!\\*)(.+?)(?<!\\*)\\*(?!\\*)","g"),"<em>$1</em>"),Q=Q.replace(/`(.+?)`/g,'<code class="tree-md-editor__inline-code">$1</code>'),Q=Q.replace(/~~(.+?)~~/g,"<del>$1</del>"),Q}const J=async Q=>{var T;if(l.disabled)return;const O=(T=Q.clipboardData)==null?void 0:T.items;if(O){for(const se of O)if(se.type.startsWith("image/")){Q.preventDefault();const ve=se.getAsFile();ve&&await K(ve);return}}},I=async Q=>{var T;if(l.disabled)return;const O=(T=Q.dataTransfer)==null?void 0:T.files;if(O)for(const se of O)se.type.startsWith("image/")&&(Q.preventDefault(),await K(se))},R=Q=>{l.disabled||Q.preventDefault()},K=async Q=>{if(!l.uploadImage){p(`![${Q.name}]()`);return}const T=`![Uploading ${Q.name}...]()`;p(T),r.value=!0;try{const O=l.uploadImage(Q),se=O instanceof Promise?await O:O,ve=u.value.replace(T,`![${Q.name}](${se})`);a("update:modelValue",ve),a("image-upload",Q,se)}catch(O){const se=u.value.replace(T,"");a("update:modelValue",se),a("image-upload-error",Q,O instanceof Error?O:new Error(String(O)))}finally{r.value=!1}},pe=Q=>{if(!(l.disabled||!(Q.metaKey||Q.ctrlKey)))switch(Q.key){case"b":Q.preventDefault(),D();break;case"i":Q.preventDefault(),$();break;case"k":Q.preventDefault(),E();break;case"e":Q.preventDefault(),S();break}};return(Q,T)=>(f(),g("div",Ce(d.value,{class:i.value,style:o.value}),[_("div",Sh,[_("div",Dh,[_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Heading 1 (H1)",disabled:e.disabled,onClick:T[0]||(T[0]=O=>w(1))}," H1 ",8,Ah),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Heading 2 (H2)",disabled:e.disabled,onClick:T[1]||(T[1]=O=>w(2))}," H2 ",8,Eh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Heading 3 (H3)",disabled:e.disabled,onClick:T[2]||(T[2]=O=>w(3))}," H3 ",8,Ih)]),T[7]||(T[7]=_("div",{class:"tree-md-editor__toolbar-divider",role:"separator"},null,-1)),_("div",Vh,[_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Bold (Ctrl+B)",disabled:e.disabled,onClick:D},[...T[4]||(T[4]=[_("strong",null,"B",-1)])],8,Mh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Italic (Ctrl+I)",disabled:e.disabled,onClick:$},[...T[5]||(T[5]=[_("em",null,"I",-1)])],8,Bh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Strikethrough",disabled:e.disabled,onClick:T[3]||(T[3]=O=>p("~~","~~"))},[...T[6]||(T[6]=[_("del",null,"S",-1)])],8,Lh)]),T[8]||(T[8]=_("div",{class:"tree-md-editor__toolbar-divider",role:"separator"},null,-1)),_("div",Oh,[_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Inline code (Ctrl+E)",disabled:e.disabled,onClick:S}," </> ",8,Fh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Code block",disabled:e.disabled,onClick:V}," { } ",8,Nh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Link (Ctrl+K)",disabled:e.disabled,onClick:E}," 🔗 ",8,Ph)]),T[9]||(T[9]=_("div",{class:"tree-md-editor__toolbar-divider",role:"separator"},null,-1)),_("div",zh,[_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Unordered list",disabled:e.disabled,onClick:A}," • List ",8,Rh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Ordered list",disabled:e.disabled,onClick:v}," 1. List ",8,Hh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Blockquote",disabled:e.disabled,onClick:b}," > ",8,jh),_("button",{type:"button",class:"tree-md-editor__toolbar-btn",title:"Horizontal rule",disabled:e.disabled,onClick:C}," ― ",8,Kh)]),U(Q.$slots,"toolbar")]),_("div",Uh,[_("div",Wh,[_("textarea",{ref_key:"textareaRef",ref:n,class:"tree-md-editor__textarea",value:u.value,placeholder:e.placeholder,disabled:e.disabled,"aria-label":e.placeholder,onInput:c,onPaste:J,onDrop:I,onDragover:R,onKeydown:pe},null,40,Gh)]),_("div",qh,[_("div",{class:"tree-md-editor__preview",innerHTML:x.value},null,8,Qh)])]),r.value?(f(),g("div",Yh," Uploading image… ")):j("",!0)],16))}}),Jh={TAccordion:lr,TAccordionItem:ar,TAlert:Na,TBadge:Ze,TBreadcrumb:sr,TBreadcrumbItem:nr,TButton:et,TCard:Tl,TCheckbox:rr,TCombobox:ir,TConfirmDialog:Is,TContainer:Vs,TContextMenu:or,TDatePicker:ur,TDateTimePicker:dr,TDrawer:cr,TDropdown:fr,TEmptyState:Hl,TFileUpload:pr,TFormField:Bs,TGrid:jl,TAppBar:Zl,TInput:Ms,TLink:mr,TNavMenu:hr,TNavbar:Zl,TMultiSelect:vr,TModal:ma,TNumberInput:kr,TRadio:br,TRadioGroup:gr,TSelectableList:wr,TSelect:yr,TSidebar:_r,TSkeleton:ra,TSpinner:$t,TStack:Ee,TStat:ft,TStepper:$a,TSteps:$a,TSwitch:Cr,TTextarea:$r,TTabs:Os,TTabList:Fs,TTab:Dl,TTabPanel:Al,TToggleGroup:xr,TToast:Ns,TToastProvider:Ps,TPagination:Dr,TPopover:Ar,TProgress:Ls,TTooltip:Sr,TAvatar:Er,TDivider:Pa,TTable:ba,TTag:jt,TTreeView:Tr,TTimeline:Ir,TPricing:Vr,TPricingCard:zs,TMarkdownEditor:Mr,TreeAccordion:lr,TreeAccordionItem:ar,TreeAlert:Na,TreeBadge:Ze,TreeBreadcrumb:sr,TreeBreadcrumbItem:nr,TreeButton:et,TreeCard:Tl,TreeCheckbox:rr,TreeCombobox:ir,TreeConfirmDialog:Is,TreeContainer:Vs,TreeContextMenu:or,TreeDatePicker:ur,TreeDateTimePicker:dr,TreeDrawer:cr,TreeDropdown:fr,TreeEmptyState:Hl,TreeFileUpload:pr,TreeGrid:jl,TreeNavbar:Zl,TreeAppBar:Zl,TreeLink:mr,TreeNavMenu:hr,TreeMultiSelect:vr,TreeRadio:br,TreeRadioGroup:gr,TreeSelect:yr,TreeSkeleton:ra,TreeSidebar:_r,TreeInput:Ms,TreeNumberInput:kr,TreeSelectableList:wr,TreeStack:Ee,TreeTreeView:Tr,TreeSteps:$a,TreeStepper:$a,TreeToggleGroup:xr,TreeTextarea:$r,TreeModal:ma,TreePagination:Dr,TreePopover:Ar,TreeSpinner:$t,TreeFormField:Bs,TreeProgress:Ls,TreeStat:ft,TreeSwitch:Cr,TreeTabs:Os,TreeTabList:Fs,TreeTab:Dl,TreeTabPanel:Al,TreeToast:Ns,TreeToastProvider:Ps,TreeTooltip:Sr,TreeAvatar:Er,TreeDivider:Pa,TreeTable:ba,TreeTag:jt,TreeTimeline:Ir,TreePricing:Vr,TreePricingCard:zs,TreeMarkdownEditor:Mr},oo={install(e){Object.entries(Jh).forEach(([t,l])=>{e.component(t,l)})}};oo.install;const Xh="";async function st(e,t){const l=await fetch(`${Xh}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t});if(!l.ok){const a=await l.json().catch(()=>({error:l.statusText}));throw new Error(a.error||"Request failed")}return l.json()}const vt={checkHealth:()=>st("/api/health"),listServices:()=>st("/api/services"),getService:e=>st(`/api/services/${e}`),registerService:e=>st("/api/services/register",{method:"POST",body:JSON.stringify({servicePath:e})}),deleteService:e=>st(`/api/services/${e}`,{method:"DELETE"}),updateServiceStatus:(e,t,l)=>st(`/api/services/${e}/status`,{method:"PATCH",body:JSON.stringify({status:t,pid:l})}),startService:(e,t)=>st(`/api/services/${e}/start`,{method:"POST",body:JSON.stringify(t||{})}),stopService:e=>st(`/api/services/${e}/stop`,{method:"POST"}),getServiceLogs:e=>st(`/api/services/${e}/logs`),listResources:()=>st("/api/resources"),listQueues:()=>st("/api/queues"),getQueue:e=>st(`/api/queues/${e}`),resetQueueProcessed:e=>st(`/api/queues/${e}/reset-processed`,{method:"POST"}),listSeeds:()=>st("/api/seeds"),runSeed:e=>st("/api/seeds/run",{method:"POST",body:JSON.stringify(e?{tableName:e}:{})}),clearSeed:e=>st("/api/seeds/clear",{method:"POST",body:JSON.stringify(e?{tableName:e}:{})})},Zh={key:0,style:{display:"flex","justify-content":"center",padding:"2rem"}},eb={class:"mono"},tb={class:"logs-pre"},lb=fe({__name:"ServicesList",setup(e){const t=ls(),l=ee([]),a=ee(!0),s=ee(!1),n=ee(""),r=ee(null),i=ee([]),o=ee("stopped"),d=ee(null),u=ee({}),c=ee({}),p=ee(null),w=ee(!1);let D=null;const $=[{key:"name",label:"Name"},{key:"status",label:"Status"},{key:"root",label:"Path"},{key:"resourcesCount",label:"Resources",align:"right"},{key:"lastUpdated",label:"Last updated"},{key:"actions",label:"Actions",align:"right"}],S=h(()=>l.value.map(R=>({...R}))),V=h({get:()=>r.value!==null,set:R=>{R||x()}});async function E(){try{l.value=await vt.listServices()}catch(R){console.error("Failed to load services:",R)}finally{a.value=!1}}async function A(R){if(!u.value[R]){u.value={...u.value,[R]:!0};try{await vt.startService(R),t.add({title:"Service started",description:R,variant:"success"}),await E()}catch(K){t.add({title:"Failed to start service",description:K.message,variant:"danger"})}finally{u.value={...u.value,[R]:!1}}}}async function v(R){if(!c.value[R]){c.value={...c.value,[R]:!0};try{await vt.stopService(R),t.add({title:"Service stopped",description:R,variant:"info"}),await E()}catch(K){t.add({title:"Failed to stop service",description:K.message,variant:"danger"})}finally{c.value={...c.value,[R]:!1}}}}async function b(R){try{const K=await vt.getServiceLogs(R);i.value=K.logs||[],o.value=K.status||"stopped"}catch(K){console.error("Failed to fetch logs:",K)}}function C(R){r.value=R,b(R),d.value&&window.clearInterval(d.value),d.value=window.setInterval(()=>b(R),2e3)}function x(){r.value=null,i.value=[],d.value&&window.clearInterval(d.value),d.value=null}async function B(){if(n.value.trim()){s.value=!0;try{await vt.registerService(n.value),t.add({title:"Service registered",description:n.value,variant:"success"}),n.value="",await E()}catch(R){t.add({title:"Failed to register service",description:R.message,variant:"danger"})}finally{s.value=!1}}}function z(R){p.value=R,w.value=!0}async function M(){if(!p.value)return;const R=p.value;try{await vt.deleteService(R),t.add({title:"Service deleted",description:R,variant:"info"}),await E()}catch(K){t.add({title:"Failed to delete service",description:K.message,variant:"danger"})}finally{p.value=null,w.value=!1}}function J(R){return new Date(R).toLocaleString()}function I(R){switch(R){case"running":return"success";case"registered":return"warning";case"stopped":return"neutral";default:return"danger"}}return Ut(()=>{E(),D=window.setInterval(E,1e4)}),Ge(()=>{D&&window.clearInterval(D),d.value&&window.clearInterval(d.value)}),(R,K)=>(f(),he(y(Tl),{variant:"outline"},{header:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.75rem",align:"center",justify:"space-between"},{default:N(()=>[K[4]||(K[4]=_("strong",null,"Microservices",-1)),L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center"},{default:N(()=>[L(y(Bs),{hint:"Absolute path to a Serverless project",htmlFor:"register-path"},{default:N(()=>[L(y(Ms),{modelValue:n.value,"onUpdate:modelValue":K[0]||(K[0]=pe=>n.value=pe),placeholder:"/path/to/microservice",disabled:s.value,onKeyup:Yd(B,["enter"])},null,8,["modelValue","disabled"])]),_:1}),L(y(et),{variant:"solid",loading:s.value,disabled:!n.value.trim(),onClick:B},{default:N(()=>[...K[3]||(K[3]=[de(" Register ",-1)])]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),default:N(()=>[a.value?(f(),g("div",Zh,[L(y($t),{label:"Loading services..."})])):l.value.length?(f(),he(y(ba),{key:2,columns:$,rows:S.value},{"cell-name":N(({row:pe})=>[_("strong",null,H(pe.name),1)]),"cell-status":N(({row:pe})=>[L(y(Ze),{tone:I(String(pe.status)),variant:"soft"},{default:N(()=>[de(H(pe.status),1)]),_:2},1032,["tone"])]),"cell-root":N(({row:pe})=>[_("span",eb,H(pe.root),1)]),"cell-resourcesCount":N(({row:pe})=>[de(H(pe.resourcesCount||0),1)]),"cell-lastUpdated":N(({row:pe})=>[de(H(J(Number(pe.lastUpdated))),1)]),"cell-actions":N(({row:pe})=>[L(y(Ee),{direction:"horizontal",gap:"0.375rem",justify:"flex-end",wrap:""},{default:N(()=>[L(y(et),{size:"sm",variant:"soft",disabled:pe.status==="running"||u.value[String(pe.name)],loading:u.value[String(pe.name)],onClick:Q=>A(String(pe.name))},{default:N(()=>[...K[5]||(K[5]=[de(" Start ",-1)])]),_:1},8,["disabled","loading","onClick"]),L(y(et),{size:"sm",variant:"soft",disabled:pe.status!=="running"||c.value[String(pe.name)],loading:c.value[String(pe.name)],onClick:Q=>v(String(pe.name))},{default:N(()=>[...K[6]||(K[6]=[de(" Stop ",-1)])]),_:1},8,["disabled","loading","onClick"]),L(y(et),{size:"sm",variant:"ghost",onClick:Q=>C(String(pe.name))},{default:N(()=>[...K[7]||(K[7]=[de(" Logs ",-1)])]),_:1},8,["onClick"]),L(y(et),{size:"sm",variant:"danger",onClick:Q=>z(String(pe.name))},{default:N(()=>[...K[8]||(K[8]=[de(" Delete ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:1},8,["rows"])):(f(),he(y(Hl),{key:1,title:"No services registered",description:"Register your first microservice using the form above."})),L(y(ma),{open:V.value,"onUpdate:open":K[1]||(K[1]=pe=>V.value=pe),title:r.value?`Logs — ${r.value}`:"Logs",description:r.value?`Status: ${o.value}`:"",size:"lg"},{default:N(()=>[_("pre",tb,H(i.value.join(`
28
+ `)||"— no output yet —"),1)]),_:1},8,["open","title","description"]),L(y(Is),{open:w.value,"onUpdate:open":K[2]||(K[2]=pe=>w.value=pe),title:`Delete service${p.value?` “${p.value}”`:""}?`,description:"This removes the service from the cache and cleans up its provisioned resources in LocalStack.","confirm-label":"Delete","cancel-label":"Cancel","confirm-variant":"danger",onConfirm:M},null,8,["open","title"])]),_:1}))}}),ab={key:0,class:"muted"},sb={key:0,class:"muted"},nb={key:0,class:"muted"},rb=fe({__name:"ResourcesOverview",setup(e){const t=ee({tables:[],queues:[],topics:[]}),l=ee(!0);let a=null;async function s(){try{t.value=await vt.listResources()}catch(n){console.error("Failed to load resources:",n)}finally{l.value=!1}}return Ut(()=>{s(),a=window.setInterval(s,15e3)}),Ge(()=>{a&&window.clearInterval(a)}),(n,r)=>(f(),he(y(Ee),{direction:"vertical",gap:"1.25rem"},{default:N(()=>[L(y(jl),{columns:3,gap:"1rem"},{default:N(()=>[L(y(ft),{label:"DynamoDB Tables",value:t.value.tables.length,tone:"info",loading:l.value},null,8,["value","loading"]),L(y(ft),{label:"SQS Queues",value:t.value.queues.length,tone:"success",loading:l.value},null,8,["value","loading"]),L(y(ft),{label:"SNS Topics",value:t.value.topics.length,tone:"warning",loading:l.value},null,8,["value","loading"])]),_:1}),L(y(Tl),{title:"Provisioned resources",variant:"outline"},{header:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center"},{default:N(()=>[r[0]||(r[0]=_("strong",null,"Provisioned resources",-1)),L(y(Ze),{tone:"neutral",variant:"soft"},{default:N(()=>[de(H(t.value.tables.length+t.value.queues.length+t.value.topics.length)+" total ",1)]),_:1})]),_:1})]),default:N(()=>[L(y(Ee),{direction:"vertical",gap:"0.75rem"},{default:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",wrap:""},{default:N(()=>[L(y(Ze),{tone:"info"},{default:N(()=>[...r[1]||(r[1]=[de("Tables",-1)])]),_:1}),(f(!0),g(_e,null,Ae(t.value.tables,i=>(f(),he(y(jt),{key:`tbl-${i}`,variant:"soft",size:"sm"},{default:N(()=>[de(H(i),1)]),_:2},1024))),128)),t.value.tables.length?j("",!0):(f(),g("span",ab,"none"))]),_:1}),L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",wrap:""},{default:N(()=>[L(y(Ze),{tone:"success"},{default:N(()=>[...r[2]||(r[2]=[de("Queues",-1)])]),_:1}),(f(!0),g(_e,null,Ae(t.value.queues,i=>(f(),he(y(jt),{key:`q-${i}`,variant:"soft",size:"sm"},{default:N(()=>[de(H(i),1)]),_:2},1024))),128)),t.value.queues.length?j("",!0):(f(),g("span",sb,"none"))]),_:1}),L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",wrap:""},{default:N(()=>[L(y(Ze),{tone:"warning"},{default:N(()=>[...r[3]||(r[3]=[de("Topics",-1)])]),_:1}),(f(!0),g(_e,null,Ae(t.value.topics,i=>(f(),he(y(jt),{key:`tp-${i}`,variant:"soft",size:"sm"},{default:N(()=>[de(H(i),1)]),_:2},1024))),128)),t.value.topics.length?j("",!0):(f(),g("span",nb,"none"))]),_:1})]),_:1})]),_:1})]),_:1}))}}),ib={key:0,style:{display:"flex","justify-content":"center",padding:"2rem"}},ob={class:"muted mono",style:{"font-size":"0.75rem"}},ub={class:"mono"},db={class:"mono"},cb={class:"muted",style:{"font-size":"0.75rem"}},fb={class:"muted",style:{"font-size":"0.75rem"}},pb=fe({__name:"QueuesView",setup(e){const t=ls(),l=ee([]),a=ee(!0),s=ee(null),n=ee(null);let r=null;const i=[{key:"name",label:"Queue"},{key:"available",label:"Available",align:"right"},{key:"inFlight",label:"In flight",align:"right"},{key:"processed",label:"Processed",align:"right"},{key:"consumers",label:"Consumers"},{key:"actions",label:"",align:"right"}],o=h(()=>l.value.map(v=>({...v,consumersCount:v.consumers.length}))),d=h(()=>({queues:l.value.length,available:l.value.reduce((v,b)=>v+b.available,0),inFlight:l.value.reduce((v,b)=>v+b.inFlight,0),processed:l.value.reduce((v,b)=>v+b.processed,0)})),u=h(()=>n.value&&l.value.find(v=>v.name===n.value)||null),c=h({get:()=>n.value!==null,set:v=>{v||(n.value=null)}}),p=h(()=>{const v=u.value;if(!v)return 0;const b=v.available+v.inFlight+v.processed;return b?Math.round(v.processed/b*100):0});async function w(){try{l.value=await vt.listQueues(),s.value=null}catch(v){s.value=v.message||"Failed to load queues"}finally{a.value=!1}}function D(v){n.value=v}async function $(v){try{await vt.resetQueueProcessed(v),t.add({title:"Processed counter reset",description:v,variant:"info"}),await w()}catch(b){t.add({title:"Failed to reset counter",description:b.message,variant:"danger"})}}function S(v){return v.available>0?"warning":v.inFlight>0?"info":v.consumers.some(b=>b.enabled)?"success":"neutral"}function V(v){return v.available>0?"Backlog":v.inFlight>0?"Processing":v.consumers.length?"Idle":"No consumers"}function E(v){return v===void 0?"—":v<60?`${v}s`:v<3600?`${Math.round(v/60)}m`:v<86400?`${Math.round(v/3600)}h`:`${Math.round(v/86400)}d`}function A(v){return v?new Date(v).toLocaleString():"—"}return Ut(()=>{w(),r=window.setInterval(w,4e3)}),Ge(()=>{r&&window.clearInterval(r)}),(v,b)=>(f(),he(y(Ee),{direction:"vertical",gap:"1.25rem"},{default:N(()=>{var C;return[L(y(jl),{columns:4,gap:"1rem"},{default:N(()=>[L(y(ft),{label:"Queues",value:d.value.queues,tone:"info",loading:a.value},null,8,["value","loading"]),L(y(ft),{label:"Available messages",value:d.value.available,tone:"warning",loading:a.value},null,8,["value","loading"]),L(y(ft),{label:"In flight",value:d.value.inFlight,tone:"info",loading:a.value},null,8,["value","loading"]),L(y(ft),{label:"Processed",value:d.value.processed,tone:"success",loading:a.value},null,8,["value","loading"])]),_:1}),s.value?(f(),he(y(Na),{key:0,variant:"danger",dismissible:"",onDismiss:b[0]||(b[0]=x=>s.value=null)},{default:N(()=>[de(H(s.value),1)]),_:1})):j("",!0),L(y(Tl),{variant:"outline"},{header:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",justify:"space-between"},{default:N(()=>[...b[4]||(b[4]=[_("strong",null,"SQS Queues",-1),_("span",{class:"muted"},"Live · refreshes every 4s",-1)])]),_:1})]),default:N(()=>[a.value?(f(),g("div",ib,[L(y($t),{label:"Loading queues..."})])):l.value.length?(f(),he(y(ba),{key:2,columns:i,rows:o.value},{"cell-name":N(({row:x})=>[L(y(Ee),{direction:"vertical",gap:"0.125rem"},{default:N(()=>[_("strong",null,H(x.name),1),_("span",ob,H(String(x.arn||x.url||"")),1)]),_:2},1024)]),"cell-available":N(({row:x})=>[L(y(Ze),{tone:Number(x.available)>0?"warning":"neutral",variant:"soft"},{default:N(()=>[de(H(x.available),1)]),_:2},1032,["tone"])]),"cell-inFlight":N(({row:x})=>[L(y(Ze),{tone:Number(x.inFlight)>0?"info":"neutral",variant:"soft"},{default:N(()=>[de(H(x.inFlight),1)]),_:2},1032,["tone"])]),"cell-processed":N(({row:x})=>[L(y(Ze),{tone:"success",variant:"soft"},{default:N(()=>[de(H(x.processed),1)]),_:2},1024)]),"cell-consumers":N(({row:x})=>[L(y(Ee),{direction:"horizontal",gap:"0.25rem",wrap:""},{default:N(()=>[x.consumers.length?(f(!0),g(_e,{key:0},Ae(x.consumers,B=>(f(),he(y(jt),{key:B.uuid||B.functionName,size:"sm",variant:B.enabled?"solid":"outline"},{default:N(()=>[de(H(B.functionName),1)]),_:2},1032,["variant"]))),128)):(f(),he(y(Ze),{key:1,tone:"neutral",variant:"soft"},{default:N(()=>[...b[5]||(b[5]=[de("No consumers",-1)])]),_:1}))]),_:2},1024)]),"cell-actions":N(({row:x})=>[L(y(Ee),{direction:"horizontal",gap:"0.375rem",justify:"flex-end"},{default:N(()=>[L(y(Ze),{tone:S(x),variant:"solid"},{default:N(()=>[de(H(V(x)),1)]),_:2},1032,["tone"]),L(y(et),{size:"sm",variant:"ghost",onClick:B=>D(String(x.name))},{default:N(()=>[...b[6]||(b[6]=[de(" Details ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:1},8,["rows"])):(f(),he(y(Hl),{key:1,title:"No queues found",description:"Register a microservice that defines SQS resources or create queues directly in LocalStack."}))]),_:1}),L(y(ma),{open:c.value,"onUpdate:open":b[3]||(b[3]=x=>c.value=x),size:"lg",title:u.value?u.value.name:"Queue details",description:((C=u.value)==null?void 0:C.arn)||""},{footer:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",justify:"flex-end"},{default:N(()=>[u.value?(f(),he(y(et),{key:0,variant:"ghost",size:"sm",onClick:b[1]||(b[1]=x=>$(u.value.name))},{default:N(()=>[...b[10]||(b[10]=[de(" Reset processed counter ",-1)])]),_:1})):j("",!0),L(y(et),{variant:"soft",size:"sm",onClick:b[2]||(b[2]=x=>c.value=!1)},{default:N(()=>[...b[11]||(b[11]=[de(" Close ",-1)])]),_:1})]),_:1})]),default:N(()=>[u.value?(f(),he(y(Ee),{key:0,direction:"vertical",gap:"1rem"},{default:N(()=>[L(y(jl),{columns:3,gap:"0.75rem"},{default:N(()=>[L(y(ft),{label:"Available",value:u.value.available,tone:"warning"},null,8,["value"]),L(y(ft),{label:"In flight",value:u.value.inFlight,tone:"info"},null,8,["value"]),L(y(ft),{label:"Processed (this session)",value:u.value.processed,tone:"success"},null,8,["value"])]),_:1}),L(y(Ee),{direction:"vertical",gap:"0.25rem"},{default:N(()=>[L(y(Ee),{direction:"horizontal",justify:"space-between",align:"center"},{default:N(()=>[b[7]||(b[7]=_("span",{class:"muted"},"Throughput share (processed)",-1)),_("span",ub,H(p.value)+"%",1)]),_:1}),L(y(Ls),{value:p.value},null,8,["value"])]),_:1}),L(y(Pa)),L(y(Ee),{direction:"vertical",gap:"0.5rem"},{default:N(()=>[b[8]||(b[8]=_("strong",null,"Consumers",-1)),u.value.consumers.length?(f(),he(y(Ee),{key:0,direction:"vertical",gap:"0.5rem"},{default:N(()=>[(f(!0),g(_e,null,Ae(u.value.consumers,x=>(f(),he(y(Tl),{key:x.uuid||x.functionName,variant:"soft"},{default:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",justify:"space-between"},{default:N(()=>[L(y(Ee),{direction:"vertical",gap:"0.125rem"},{default:N(()=>[_("span",db,H(x.functionName),1),_("span",cb," UUID: "+H(x.uuid||"—")+" · batch size "+H(x.batchSize??"—"),1)]),_:2},1024),L(y(Ze),{tone:x.enabled?"success":"neutral",variant:"soft"},{default:N(()=>[de(H(x.state||(x.enabled?"Enabled":"Disabled")),1)]),_:2},1032,["tone"])]),_:2},1024)]),_:2},1024))),128))]),_:1})):(f(),he(y(Hl),{key:1,title:"No consumers attached",description:"No Lambda event-source mapping currently points at this queue."}))]),_:1}),L(y(Pa)),L(y(Ee),{direction:"vertical",gap:"0.25rem"},{default:N(()=>[b[9]||(b[9]=_("strong",null,"Attributes",-1)),L(y(Ee),{direction:"horizontal",gap:"0.5rem",wrap:""},{default:N(()=>[L(y(jt),{size:"sm",variant:"soft"},{default:N(()=>[de(" FIFO: "+H(u.value.fifo?"yes":"no"),1)]),_:1}),L(y(jt),{size:"sm",variant:"soft"},{default:N(()=>[de(" Visibility timeout: "+H(E(u.value.visibilityTimeout)),1)]),_:1}),L(y(jt),{size:"sm",variant:"soft"},{default:N(()=>[de(" Retention: "+H(E(u.value.messageRetentionPeriod)),1)]),_:1}),L(y(jt),{size:"sm",variant:"soft"},{default:N(()=>[de(" Delayed: "+H(u.value.delayed),1)]),_:1})]),_:1}),_("span",fb," Created "+H(A(u.value.createdAt))+" · last polled "+H(A(u.value.lastPolledAt)),1)]),_:1})]),_:1})):j("",!0)]),_:1},8,["open","title","description"])]}),_:1}))}}),vb={class:"muted mono",style:{"font-size":"0.75rem"}},mb={key:0,style:{display:"flex","justify-content":"center",padding:"2rem"}},hb={class:"muted mono",style:{"font-size":"0.75rem"}},bb=fe({__name:"SeedsPanel",setup(e){const t=ls(),l=ee(""),a=ee([]),s=ee(!0),n=ee(null),r=ee({}),i=ee(null);let o=null;const d=[{key:"tableName",label:"Table"},{key:"itemCount",label:"Items in file",align:"right"},{key:"tableExists",label:"Table"},{key:"actions",label:"",align:"right"}],u=h(()=>({files:a.value.length,tablesReady:a.value.filter(V=>V.tableExists).length,totalItems:a.value.reduce((V,E)=>V+Math.max(0,E.itemCount),0)}));async function c(){try{const V=await vt.listSeeds();l.value=V.seedsDir,a.value=V.entries,n.value=null}catch(V){n.value=V.message||"Failed to load seeds"}finally{s.value=!1}}function p(V,E){const A=[];let v=0;for(const b of V)if(b.skipped)A.push(`${b.tableName} skipped (${b.reason})`);else{const C=(E==="inserted"?b.inserted:b.deleted)??0;v+=C,A.push(`${b.tableName}: ${C}`)}return{summary:`${v} item(s) ${E}`,detail:A.join(" · ")}}async function w(V){r.value[V]="run";try{const E=await vt.runSeed(V),{summary:A,detail:v}=p(E.results,"inserted");t.add({title:`Seeded ${V}`,description:`${A} — ${v}`,variant:"success"}),await c()}catch(E){t.add({title:"Seed failed",description:E.message,variant:"danger"})}finally{r.value[V]=null}}async function D(V){r.value[V]="clear";try{const E=await vt.clearSeed(V),{summary:A,detail:v}=p(E.results,"deleted");t.add({title:`Cleared ${V}`,description:`${A} — ${v}`,variant:"info"}),await c()}catch(E){t.add({title:"Clear failed",description:E.message,variant:"danger"})}finally{r.value[V]=null}}async function $(){i.value="run";try{const V=await vt.runSeed(),{summary:E,detail:A}=p(V.results,"inserted");t.add({title:"Seeded all tables",description:`${E} — ${A}`,variant:"success"}),await c()}catch(V){t.add({title:"Seed all failed",description:V.message,variant:"danger"})}finally{i.value=null}}async function S(){if(confirm("Delete every item from all tables that have a seed file?")){i.value="clear";try{const V=await vt.clearSeed(),{summary:E,detail:A}=p(V.results,"deleted");t.add({title:"Cleared all seeded tables",description:`${E} — ${A}`,variant:"info"}),await c()}catch(V){t.add({title:"Clear all failed",description:V.message,variant:"danger"})}finally{i.value=null}}}return Ut(()=>{c(),o=window.setInterval(c,15e3)}),Ge(()=>{o&&window.clearInterval(o)}),(V,E)=>(f(),he(y(Ee),{direction:"vertical",gap:"1.25rem"},{default:N(()=>[L(y(jl),{columns:3,gap:"1rem"},{default:N(()=>[L(y(ft),{label:"Seed files",value:u.value.files,tone:"info",loading:s.value},null,8,["value","loading"]),L(y(ft),{label:"Tables ready",value:u.value.tablesReady,tone:"success",loading:s.value},null,8,["value","loading"]),L(y(ft),{label:"Items across files",value:u.value.totalItems,tone:"warning",loading:s.value},null,8,["value","loading"])]),_:1}),n.value?(f(),he(y(Na),{key:0,variant:"danger",dismissible:"",onDismiss:E[0]||(E[0]=A=>n.value=null)},{default:N(()=>[de(H(n.value),1)]),_:1})):j("",!0),L(y(Tl),{variant:"outline"},{header:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center",justify:"space-between"},{default:N(()=>[L(y(Ee),{direction:"vertical",gap:"0.125rem"},{default:N(()=>[E[1]||(E[1]=_("strong",null,"DynamoDB seeds",-1)),_("span",vb,H(l.value||"—"),1)]),_:1}),L(y(Ee),{direction:"horizontal",gap:"0.5rem"},{default:N(()=>[L(y(et),{size:"sm",variant:"soft",disabled:s.value||!a.value.length||i.value!==null,loading:i.value==="run",onClick:$},{default:N(()=>[...E[2]||(E[2]=[de(" Re-apply all ",-1)])]),_:1},8,["disabled","loading"]),L(y(et),{size:"sm",variant:"ghost",tone:"danger",disabled:s.value||!a.value.length||i.value!==null,loading:i.value==="clear",onClick:S},{default:N(()=>[...E[3]||(E[3]=[de(" Clear all ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),default:N(()=>[s.value?(f(),g("div",mb,[L(y($t),{label:"Loading seeds..."})])):a.value.length?(f(),he(y(ba),{key:2,columns:d,rows:a.value},{"cell-tableName":N(({row:A})=>[L(y(Ee),{direction:"vertical",gap:"0.125rem"},{default:N(()=>[_("strong",null,H(A.tableName),1),_("span",hb,H(String(A.file)),1)]),_:2},1024)]),"cell-itemCount":N(({row:A})=>[Number(A.itemCount)>=0?(f(),he(y(Ze),{key:0,tone:Number(A.itemCount)>0?"info":"neutral",variant:"soft"},{default:N(()=>[de(H(A.itemCount),1)]),_:2},1032,["tone"])):(f(),he(y(Ze),{key:1,tone:"danger",variant:"soft"},{default:N(()=>[...E[4]||(E[4]=[de("parse error",-1)])]),_:1}))]),"cell-tableExists":N(({row:A})=>[L(y(Ze),{tone:A.tableExists?"success":"warning",variant:"soft"},{default:N(()=>[de(H(A.tableExists?"exists":"not created"),1)]),_:2},1032,["tone"])]),"cell-actions":N(({row:A})=>[L(y(Ee),{direction:"horizontal",gap:"0.375rem",justify:"flex-end"},{default:N(()=>[L(y(et),{size:"sm",variant:"soft",disabled:!A.tableExists||Number(A.itemCount)<=0||r.value[String(A.tableName)]!==void 0&&r.value[String(A.tableName)]!==null,loading:r.value[String(A.tableName)]==="run",onClick:v=>w(String(A.tableName))},{default:N(()=>[...E[5]||(E[5]=[de(" Apply ",-1)])]),_:1},8,["disabled","loading","onClick"]),L(y(et),{size:"sm",variant:"ghost",tone:"danger",disabled:!A.tableExists||r.value[String(A.tableName)]!==void 0&&r.value[String(A.tableName)]!==null,loading:r.value[String(A.tableName)]==="clear",onClick:v=>D(String(A.tableName))},{default:N(()=>[...E[6]||(E[6]=[de(" Clear ",-1)])]),_:1},8,["disabled","loading","onClick"])]),_:2},1024)]),_:1},8,["rows"])):(f(),he(y(Hl),{key:1,title:"No seed files found",description:`Drop {tableName}.json files into ${l.value} to seed DynamoDB tables automatically.`},null,8,["description"]))]),_:1})]),_:1}))}}),gb={class:"app-shell"},yb={class:"app-main"},_b={style:{"padding-top":"1.25rem"}},kb={style:{"padding-top":"1.25rem"}},wb={style:{"padding-top":"1.25rem"}},Tb={style:{"padding-top":"1.25rem"}},xb=fe({__name:"App",setup(e){const t=ee({status:"unknown",localstack:!1}),l=ee("overview"),a=ee(document.documentElement.getAttribute("data-tree-theme")||"dark");let s=null;async function n(){try{t.value=await vt.checkHealth()}catch(i){console.error("Health check failed:",i)}}function r(){a.value=a.value==="dark"?"light":"dark",document.documentElement.setAttribute("data-tree-theme",a.value)}return Ut(()=>{n(),s=window.setInterval(n,1e4)}),Ge(()=>{s&&window.clearInterval(s)}),(i,o)=>(f(),he(y(Ps),{position:"top-right"},{default:N(()=>[_("div",gb,[L(y(Zl),{sticky:"",bordered:""},{start:N(()=>[L(y(Ee),{direction:"vertical",gap:"0.125rem"},{default:N(()=>[...o[1]||(o[1]=[_("strong",null,"Local Serverless Stack",-1),_("span",{class:"muted",style:{"font-size":"0.75rem"}}," Local development control plane ",-1)])]),_:1})]),end:N(()=>[L(y(Ee),{direction:"horizontal",gap:"0.5rem",align:"center"},{default:N(()=>[L(y(Ze),{tone:t.value.localstack?"success":"danger",variant:"soft"},{default:N(()=>[de(" LocalStack: "+H(t.value.localstack?"Running":"Offline"),1)]),_:1},8,["tone"]),L(y(et),{size:"sm",variant:"ghost",onClick:r},{default:N(()=>[de(H(a.value==="dark"?"Light":"Dark"),1)]),_:1})]),_:1})]),_:1}),_("main",yb,[L(y(Vs),{size:"xl",padded:""},{default:N(()=>[L(y(Os),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=d=>l.value=d)},{default:N(()=>[L(y(Fs),null,{default:N(()=>[L(y(Dl),{value:"overview"},{default:N(()=>[...o[2]||(o[2]=[de("Overview",-1)])]),_:1}),L(y(Dl),{value:"services"},{default:N(()=>[...o[3]||(o[3]=[de("Services",-1)])]),_:1}),L(y(Dl),{value:"queues"},{default:N(()=>[...o[4]||(o[4]=[de("Queues",-1)])]),_:1}),L(y(Dl),{value:"seeds"},{default:N(()=>[...o[5]||(o[5]=[de("Seeds",-1)])]),_:1})]),_:1}),L(y(Al),{value:"overview"},{default:N(()=>[_("div",_b,[L(rb)])]),_:1}),L(y(Al),{value:"services"},{default:N(()=>[_("div",kb,[L(lb)])]),_:1}),L(y(Al),{value:"queues"},{default:N(()=>[_("div",wb,[L(pb)])]),_:1}),L(y(Al),{value:"seeds"},{default:N(()=>[_("div",Tb,[L(bb)])]),_:1})]),_:1},8,["modelValue"])]),_:1})])])]),_:1}))}});document.documentElement.setAttribute("data-tree-theme","dark");Zd(xb).use(oo).mount("#app");