(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/** * @vue/shared v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function no(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const be={},ln=[],_t=()=>{},_r=()=>!1,ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fs=e=>e.startsWith("onUpdate:"),Ue=Object.assign,so=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ki=Object.prototype.hasOwnProperty,ge=(e,t)=>Ki.call(e,t),Z=Array.isArray,an=e=>Ln(e)==="[object Map]",bn=e=>Ln(e)==="[object Set]",So=e=>Ln(e)==="[object Date]",te=e=>typeof e=="function",$e=e=>typeof e=="string",dt=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",yr=e=>(ve(e)||te(e))&&te(e.then)&&te(e.catch),wr=Object.prototype.toString,Ln=e=>wr.call(e),Gi=e=>Ln(e).slice(8,-1),Cr=e=>Ln(e)==="[object Object]",oo=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sn=no(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ps=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Wi=/-\w/g,Ye=ps(e=>e.replace(Wi,t=>t.slice(1).toUpperCase())),zi=/\B([A-Z])/g,nn=ps(e=>e.replace(zi,"-$1").toLowerCase()),hs=ps(e=>e.charAt(0).toUpperCase()+e.slice(1)),ks=ps(e=>e?`on${hs(e)}`:""),xt=(e,t)=>!Object.is(e,t),Zn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ms=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ao;const gs=()=>Ao||(Ao=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function tn(e){if(Z(e)){const t={};for(let n=0;n{if(n){const s=n.split(Qi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ae(e){let t="";if($e(e))t=e;else if(Z(e))for(let n=0;nGt(n,t))}const Ar=e=>!!(e&&e.__v_isRef===!0),P=e=>$e(e)?e:e==null?"":Z(e)||ve(e)&&(e.toString===wr||!te(e.toString))?Ar(e)?P(e.value):JSON.stringify(e,kr,2):String(e),kr=(e,t)=>Ar(t)?kr(e,t.value):an(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[Rs(s,r)+" =>"]=o,n),{})}:bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rs(n))}:dt(t)?Rs(t):ve(t)&&!Z(t)&&!Cr(t)?String(t):t,Rs=(e,t="")=>{var n;return dt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Ve;class nl{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&&Ve&&(Ve.active?(this.parent=Ve,this.index=(Ve.scopes||(Ve.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Ve===this)Ve=this.prevScope;else{let t=Ve;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 n,s;for(n=0,s=this.effects.length;n0)return;if(kn){let t=kn;for(kn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;An;){let t=An;for(An=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function $r(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Or(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),ao(s),ol(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Hs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Tr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Tr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$n)||(e.globalVersion=$n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Hs(e))))return;e.flags|=2;const t=e.dep,n=_e,s=ut;_e=e,ut=!0;try{$r(e);const o=e.fn(e._value);(t.version===0||xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{_e=n,ut=s,Or(e),e.flags&=-3}}function ao(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)ao(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ol(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ut=!0;const Nr=[];function Tt(){Nr.push(ut),ut=!1}function Nt(){const e=Nr.pop();ut=e===void 0?!0:e}function ko(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_e;_e=void 0;try{t()}finally{_e=n}}}let $n=0;class rl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class uo{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(!_e||!ut||_e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_e)n=this.activeLink=new rl(_e,this),_e.deps?(n.prevDep=_e.depsTail,_e.depsTail.nextDep=n,_e.depsTail=n):_e.deps=_e.depsTail=n,Dr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=_e.depsTail,n.nextDep=void 0,_e.depsTail.nextDep=n,_e.depsTail=n,_e.deps===n&&(_e.deps=s)}return n}trigger(t){this.version++,$n++,this.notify(t)}notify(t){io();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{lo()}}}function Dr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Dr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Bs=new WeakMap,Zt=Symbol(""),qs=Symbol(""),On=Symbol("");function He(e,t,n){if(ut&&_e){let s=Bs.get(e);s||Bs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new uo),o.map=s,o.key=n),o.track()}}function It(e,t,n,s,o,r){const i=Bs.get(e);if(!i){$n++;return}const l=u=>{u&&u.trigger()};if(io(),t==="clear")i.forEach(l);else{const u=Z(e),f=u&&oo(n);if(u&&n==="length"){const c=Number(s);i.forEach((h,g)=>{(g==="length"||g===On||!dt(g)&&g>=c)&&l(h)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),f&&l(i.get(On)),t){case"add":u?f&&l(i.get("length")):(l(i.get(Zt)),an(e)&&l(i.get(qs)));break;case"delete":u||(l(i.get(Zt)),an(e)&&l(i.get(qs)));break;case"set":an(e)&&l(i.get(Zt));break}}lo()}function sn(e){const t=me(e);return t===e?t:(He(t,"iterate",On),lt(e)?t:t.map(ft))}function vs(e){return He(e=me(e),"iterate",On),e}function vt(e,t){return Dt(e)?pn(en(e)?ft(t):t):ft(t)}const il={__proto__:null,[Symbol.iterator](){return Ps(this,Symbol.iterator,e=>vt(this,e))},concat(...e){return sn(this).concat(...e.map(t=>Z(t)?sn(t):t))},entries(){return Ps(this,"entries",e=>(e[1]=vt(this,e[1]),e))},every(e,t){return Et(this,"every",e,t,void 0,arguments)},filter(e,t){return Et(this,"filter",e,t,n=>n.map(s=>vt(this,s)),arguments)},find(e,t){return Et(this,"find",e,t,n=>vt(this,n),arguments)},findIndex(e,t){return Et(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Et(this,"findLast",e,t,n=>vt(this,n),arguments)},findLastIndex(e,t){return Et(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Et(this,"forEach",e,t,void 0,arguments)},includes(...e){return $s(this,"includes",e)},indexOf(...e){return $s(this,"indexOf",e)},join(e){return sn(this).join(e)},lastIndexOf(...e){return $s(this,"lastIndexOf",e)},map(e,t){return Et(this,"map",e,t,void 0,arguments)},pop(){return xn(this,"pop")},push(...e){return xn(this,"push",e)},reduce(e,...t){return Ro(this,"reduce",e,t)},reduceRight(e,...t){return Ro(this,"reduceRight",e,t)},shift(){return xn(this,"shift")},some(e,t){return Et(this,"some",e,t,void 0,arguments)},splice(...e){return xn(this,"splice",e)},toReversed(){return sn(this).toReversed()},toSorted(e){return sn(this).toSorted(e)},toSpliced(...e){return sn(this).toSpliced(...e)},unshift(...e){return xn(this,"unshift",e)},values(){return Ps(this,"values",e=>vt(this,e))}};function Ps(e,t,n){const s=vs(e),o=s[t]();return s!==e&&!lt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const ll=Array.prototype;function Et(e,t,n,s,o,r){const i=vs(e),l=i!==e&&!lt(e),u=i[t];if(u!==ll[t]){const h=u.apply(e,r);return l?ft(h):h}let f=n;i!==e&&(l?f=function(h,g){return n.call(this,vt(e,h),g,e)}:n.length>2&&(f=function(h,g){return n.call(this,h,g,e)}));const c=u.call(i,f,s);return l&&o?o(c):c}function Ro(e,t,n,s){const o=vs(e),r=o!==e&&!lt(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(f,c,h){return l&&(l=!1,f=vt(e,f)),n.call(this,f,vt(e,c),h,e)}):n.length>3&&(i=function(f,c,h){return n.call(this,f,c,h,e)}));const u=o[t](i,...s);return l?vt(e,u):u}function $s(e,t,n){const s=me(e);He(s,"iterate",On);const o=s[t](...n);return(o===-1||o===!1)&&po(n[0])?(n[0]=me(n[0]),s[t](...n)):o}function xn(e,t,n=[]){Tt(),io();const s=me(e)[t].apply(e,n);return lo(),Nt(),s}const al=no("__proto__,__v_isRef,__isVue"),Mr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dt));function ul(e){dt(e)||(e=String(e));const t=me(this);return He(t,"has",e),t.hasOwnProperty(e)}class Vr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?xl:Fr:r?Lr:Ur).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Z(t);if(!o){let u;if(i&&(u=il[n]))return u;if(n==="hasOwnProperty")return ul}const l=Reflect.get(t,n,qe(t)?t:s);if((dt(n)?Mr.has(n):al(n))||(o||He(t,"get",n),r))return l;if(qe(l)){const u=i&&oo(n)?l:l.value;return o&&ve(u)?Gs(u):u}return ve(l)?o?Gs(l):bs(l):l}}class jr extends Vr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=Z(t)&&oo(n);if(!this._isShallow){const f=Dt(r);if(!lt(s)&&!Dt(s)&&(r=me(r),s=me(s)),!i&&qe(r)&&!qe(s))return f||(r.value=s),!0}const l=i?Number(n)e,Wn=e=>Reflect.getPrototypeOf(e);function hl(e,t,n){return function(...s){const o=this.__v_raw,r=me(o),i=an(r),l=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,f=o[e](...s),c=n?Ks:t?pn:ft;return!t&&He(r,"iterate",u?qs:Zt),Ue(Object.create(f),{next(){const{value:h,done:g}=f.next();return g?{value:h,done:g}:{value:l?[c(h[0]),c(h[1])]:c(h),done:g}}})}}function zn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ml(e,t){const n={get(o){const r=this.__v_raw,i=me(r),l=me(o);e||(xt(o,l)&&He(i,"get",o),He(i,"get",l));const{has:u}=Wn(i),f=t?Ks:e?pn:ft;if(u.call(i,o))return f(r.get(o));if(u.call(i,l))return f(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&He(me(o),"iterate",Zt),o.size},has(o){const r=this.__v_raw,i=me(r),l=me(o);return e||(xt(o,l)&&He(i,"has",o),He(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,u=me(l),f=t?Ks:e?pn:ft;return!e&&He(u,"iterate",Zt),l.forEach((c,h)=>o.call(r,f(c),f(h),i))}};return Ue(n,e?{add:zn("add"),set:zn("set"),delete:zn("delete"),clear:zn("clear")}:{add(o){const r=me(this),i=Wn(r),l=me(o),u=!t&&!lt(o)&&!Dt(o)?l:o;return i.has.call(r,u)||xt(o,u)&&i.has.call(r,o)||xt(l,u)&&i.has.call(r,l)||(r.add(u),It(r,"add",u,u)),this},set(o,r){!t&&!lt(r)&&!Dt(r)&&(r=me(r));const i=me(this),{has:l,get:u}=Wn(i);let f=l.call(i,o);f||(o=me(o),f=l.call(i,o));const c=u.call(i,o);return i.set(o,r),f?xt(r,c)&&It(i,"set",o,r):It(i,"add",o,r),this},delete(o){const r=me(this),{has:i,get:l}=Wn(r);let u=i.call(r,o);u||(o=me(o),u=i.call(r,o)),l&&l.call(r,o);const f=r.delete(o);return u&&It(r,"delete",o,void 0),f},clear(){const o=me(this),r=o.size!==0,i=o.clear();return r&&It(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=hl(o,e,t)}),n}function co(e,t){const n=ml(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ge(n,o)&&o in s?n:s,o,r)}const gl={get:co(!1,!1)},vl={get:co(!1,!0)},bl={get:co(!0,!1)};const Ur=new WeakMap,Lr=new WeakMap,Fr=new WeakMap,xl=new WeakMap;function _l(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bs(e){return Dt(e)?e:fo(e,!1,dl,gl,Ur)}function Hr(e){return fo(e,!1,pl,vl,Lr)}function Gs(e){return fo(e,!0,fl,bl,Fr)}function fo(e,t,n,s,o){if(!ve(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=o.get(e);if(r)return r;const i=_l(Gi(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function en(e){return Dt(e)?en(e.__v_raw):!!(e&&e.__v_isReactive)}function Dt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function po(e){return e?!!e.__v_raw:!1}function me(e){const t=e&&e.__v_raw;return t?me(t):e}function yl(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&Er(e,"__v_skip",!0),e}const ft=e=>ve(e)?bs(e):e,pn=e=>ve(e)?Gs(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function z(e){return Br(e,!1)}function wl(e){return Br(e,!0)}function Br(e,t){return qe(e)?e:new Cl(e,t)}class Cl{constructor(t,n){this.dep=new uo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:me(t),this._value=n?t:ft(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||lt(t)||Dt(t);t=s?t:me(t),xt(t,n)&&(this._rawValue=t,this._value=s?t:ft(t),this.dep.trigger())}}function De(e){return qe(e)?e.value:e}const El={get:(e,t,n)=>t==="__v_raw"?e:De(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function qr(e){return en(e)?e:new Proxy(e,El)}class Sl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new uo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return Pr(this,!0),!0}get value(){const t=this.dep.track();return Tr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Al(e,t,n=!1){let s,o;return te(e)?s=e:(s=e.get,o=e.set),new Sl(s,o,n)}const Jn={},ss=new WeakMap;let Yt;function kl(e,t=!1,n=Yt){if(n){let s=ss.get(n);s||ss.set(n,s=[]),s.push(e)}}function Rl(e,t,n=be){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:u}=n,f=I=>o?I:lt(I)||o===!1||o===0?Pt(I,1):Pt(I);let c,h,g,x,j=!1,$=!1;if(qe(e)?(h=()=>e.value,j=lt(e)):en(e)?(h=()=>f(e),j=!0):Z(e)?($=!0,j=e.some(I=>en(I)||lt(I)),h=()=>e.map(I=>{if(qe(I))return I.value;if(en(I))return f(I);if(te(I))return u?u(I,2):I()})):te(e)?t?h=u?()=>u(e,2):e:h=()=>{if(g){Tt();try{g()}finally{Nt()}}const I=Yt;Yt=c;try{return u?u(e,3,[x]):e(x)}finally{Yt=I}}:h=_t,t&&o){const I=h,A=o===!0?1/0:o;h=()=>Pt(I(),A)}const W=sl(),q=()=>{c.stop(),W&&W.active&&so(W.effects,c)};if(r&&t){const I=t;t=(...A)=>{const M=I(...A);return q(),M}}let D=$?new Array(e.length).fill(Jn):Jn;const K=I=>{if(!(!(c.flags&1)||!c.dirty&&!I))if(t){const A=c.run();if(I||o||j||($?A.some((M,ne)=>xt(M,D[ne])):xt(A,D))){g&&g();const M=Yt;Yt=c;try{const ne=[A,D===Jn?void 0:$&&D[0]===Jn?[]:D,x];D=A,u?u(t,3,ne):t(...ne)}finally{Yt=M}}}else c.run()};return l&&l(K),c=new Rr(h),c.scheduler=i?()=>i(K,!1):K,x=I=>kl(I,!1,c),g=c.onStop=()=>{const I=ss.get(c);if(I){if(u)u(I,4);else for(const A of I)A();ss.delete(c)}},t?s?K(!0):D=c.run():i?i(K.bind(null,!0),!0):c.run(),q.pause=c.pause.bind(c),q.resume=c.resume.bind(c),q.stop=q,q}function Pt(e,t=1/0,n){if(t<=0||!ve(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qe(e))Pt(e.value,t,n);else if(Z(e))for(let s=0;s{Pt(s,t,n)});else if(Cr(e)){for(const s in e)Pt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Pt(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Fn(e,t,n,s){try{return s?e(...s):e()}catch(o){xs(o,t,n)}}function pt(e,t,n,s){if(te(e)){const o=Fn(e,t,n,s);return o&&yr(o)&&o.catch(r=>{xs(r,t,n)}),o}if(Z(e)){const o=[];for(let r=0;r>>1,o=Je[s],r=Tn(o);r=Tn(n)?Je.push(e):Je.splice(Pl(t),0,e),e.flags|=1,Gr()}}function Gr(){os||(os=Kr.then(zr))}function $l(e){if(!Z(e))Ft&&e.id===-1?Ft.splice(on+1,0,e):e.flags&1||(un.push(e),e.flags|=1);else for(let t=0;tTn(n)-Tn(s));if(un.length=0,Ft){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function zr(e){try{for(gt=0;gt{s._d&&as(-1);const r=rs(t),i=Ot.length;let l;try{l=e(...o)}finally{for(let u=Ot.length;u>i;u--)yo();rs(r),s._d&&as(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function se(e,t){if(je===null)return e;const n=Es(je),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&te(t)?t.call(s&&s.proxy):t}}const Ol=Symbol.for("v-scx"),Tl=()=>ct(Ol);function Kt(e,t,n){return Qr(e,t,n)}function Qr(e,t,n=be){const{immediate:s,deep:o,flush:r,once:i}=n,l=Ue({},n),u=t&&s||!t&&r!=="post";let f;if(Vn){if(r==="sync"){const x=Tl();f=x.__watcherHandles||(x.__watcherHandles=[])}else if(!u){const x=()=>{};return x.stop=_t,x.resume=_t,x.pause=_t,x}}const c=Be;l.call=(x,j,$)=>pt(x,c,j,$);let h=!1;r==="post"?l.scheduler=x=>{tt(x,c&&c.suspense)}:r!=="sync"&&(h=!0,l.scheduler=(x,j)=>{j?x():mo(x)}),l.augmentJob=x=>{t&&(x.flags|=4),h&&(x.flags|=2,c&&(x.id=c.uid,x.i=c))};const g=Rl(e,t,l);return Vn&&(f?f.push(g):u&&g()),g}function Nl(e,t,n){const s=this.proxy,o=$e(e)?e.includes(".")?Yr(s,e):()=>s[e]:e.bind(s,s);let r;te(t)?r=t:(r=t.handler,n=t);const i=Bn(this),l=Qr(o,r.bind(s),n);return i(),l}function Yr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Os=Symbol("_leaveCb");function Ml(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==yt){t=n;break}}return t}function Xr(e){if(!vo(e))return _s(e.type)&&e.children?Ml(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&te(n.default))return n.default()}}function go(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;go(_s(n.type)&&Xr(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Zr(e,t){return te(e)?Ue({name:e.name},t,{setup:e}):e}function ei(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Po(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const is=new WeakMap;function Rn(e,t,n,s,o=!1){if(Z(e)){e.forEach(($,W)=>Rn($,t&&(Z(t)?t[W]:t),n,s,o));return}if(cn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Rn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?Es(s.component):s.el,i=o?null:r,{i:l,r:u}=e,f=t&&t.r,c=l.refs===be?l.refs={}:l.refs,h=l.setupState,g=me(h),x=h===be?_r:$=>Po(c,$)?!1:ge(g,$),j=($,W)=>!(W&&Po(c,W));if(f!=null&&f!==u){if($o(t),$e(f))c[f]=null,x(f)&&(h[f]=null);else if(qe(f)){const $=t;j(f,$.k)&&(f.value=null),$.k&&(c[$.k]=null)}}if(te(u))Fn(u,l,12,[i,c]);else{const $=$e(u),W=qe(u);if($||W){const q=()=>{if(e.f){const D=$?x(u)?h[u]:c[u]:j()||!e.k?u.value:c[e.k];if(o)Z(D)&&so(D,r);else if(Z(D))D.includes(r)||D.push(r);else if($)c[u]=[r],x(u)&&(h[u]=c[u]);else{const K=[r];j(u,e.k)&&(u.value=K),e.k&&(c[e.k]=K)}}else $?(c[u]=i,x(u)&&(h[u]=i)):W&&(j(u,e.k)&&(u.value=i),e.k&&(c[e.k]=i))};if(i){const D=()=>{q(),is.delete(e)};D.id=-1,is.set(e,D),tt(D,n)}else $o(e),q()}}}function $o(e){const t=is.get(e);t&&(t.flags|=8,is.delete(e))}gs().requestIdleCallback;gs().cancelIdleCallback;const cn=e=>!!e.type.__asyncLoader,vo=e=>e.type.__isKeepAlive;function Vl(e,t){ti(e,"a",t)}function jl(e,t){ti(e,"da",t)}function ti(e,t,n=Be){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ys(t,s,n),n){let o=n.parent;for(;o&&o.parent;)vo(o.parent.vnode)&&Ul(s,t,n,o),o=o.parent}}function Ul(e,t,n,s){const o=ys(t,e,s,!0);ni(()=>{so(s[t],o)},n)}function ys(e,t,n=Be,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Tt();const l=Bn(n),u=pt(t,n,e,i);return l(),Nt(),u});return s?o.unshift(r):o.push(r),r}}const Mt=e=>(t,n=Be)=>{(!Vn||e==="sp")&&ys(e,(...s)=>t(...s),n)},Ll=Mt("bm"),bo=Mt("m"),Fl=Mt("bu"),Hl=Mt("u"),Bl=Mt("bum"),ni=Mt("um"),ql=Mt("sp"),Kl=Mt("rtg"),Gl=Mt("rtc");function Wl(e,t=Be){ys("ec",e,t)}const zl="components";function Hn(e,t){return Ql(zl,e,!0,t)||e}const Jl=Symbol.for("v-ndc");function Ql(e,t,n=!0,s=!1){const o=je||Be;if(o){const r=o.type;{const l=Da(r,!1);if(l&&(l===t||l===Ye(t)||l===hs(Ye(t))))return r}const i=Oo(o[e]||r[e],t)||Oo(o.appContext[e],t);return!i&&s?r:i}}function Oo(e,t){return e&&(e[t]||e[Ye(t)]||e[hs(Ye(t))])}function Te(e,t,n,s){let o;const r=n,i=Z(e);if(i||$e(e)){const l=i&&en(e);let u=!1,f=!1;l&&(u=!lt(e),f=Dt(e),e=vs(e)),o=new Array(e.length);for(let c=0,h=e.length;ct(l,u,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let u=0,f=l.length;u0;return _(),nt(ae,null,[ke("slot",f,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Ot.length;_();let u;try{const f=i&&si(i(n)),c=n.key||r||f&&f.key;u=nt(ae,{key:(c&&!dt(c)?c:`_${t}`)+(!f&&s?"_fb":"")},f||(s?s():[]),f&&e._===1?64:-2)}catch(f){for(let c=Ot.length;c>l;c--)yo();throw f}finally{i&&i._c&&(i._d=!0)}return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),u}function si(e){return e.some(t=>Dn(t)?!(t.type===yt||t.type===ae&&!si(t.children)):!0)?e:null}const Ws=e=>e?Ei(e)?Es(e):Ws(e.parent):null,In=Ue(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=>Ws(e.parent),$root:e=>Ws(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ri(e),$forceUpdate:e=>e.f||(e.f=()=>{mo(e.update)}),$nextTick:e=>e.n||(e.n=ho.bind(e.proxy)),$watch:e=>Nl.bind(e)}),Ts=(e,t)=>e!==be&&!e.__isScriptSetup&&ge(e,t),Xl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:u}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Ts(s,t))return i[t]=1,s[t];if(o!==be&&ge(o,t))return i[t]=2,o[t];if(ge(r,t))return i[t]=3,r[t];if(n!==be&&ge(n,t))return i[t]=4,n[t];zs&&(i[t]=0)}}const f=In[t];let c,h;if(f)return t==="$attrs"&&He(e.attrs,"get",""),f(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==be&&ge(n,t))return i[t]=4,n[t];if(h=u.config.globalProperties,ge(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Ts(o,t)?(o[t]=n,!0):s!==be&&ge(s,t)?(s[t]=n,!0):ge(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:i}},l){let u;return!!(n[l]||e!==be&&l[0]!=="$"&&ge(e,l)||Ts(t,l)||ge(r,l)||ge(s,l)||ge(In,l)||ge(o.config.globalProperties,l)||(u=i.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function To(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let zs=!0;function Zl(e){const t=ri(e),n=e.proxy,s=e.ctx;zs=!1,t.beforeCreate&&No(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:u,inject:f,created:c,beforeMount:h,mounted:g,beforeUpdate:x,updated:j,activated:$,deactivated:W,beforeDestroy:q,beforeUnmount:D,destroyed:K,unmounted:I,render:A,renderTracked:M,renderTriggered:ne,errorCaptured:F,serverPrefetch:Re,expose:ee,inheritAttrs:V,components:Oe,directives:G,filters:Xe}=t;if(f&&ea(f,s,null),i)for(const de in i){const ue=i[de];te(ue)&&(s[de]=ue.bind(n))}if(o){const de=o.call(n,n);ve(de)&&(e.data=bs(de))}if(zs=!0,r)for(const de in r){const ue=r[de],oe=te(ue)?ue.bind(n,n):te(ue.get)?ue.get.bind(n,n):_t,at=!te(ue)&&te(ue.set)?ue.set.bind(n):_t,Ze=ye({get:oe,set:at});Object.defineProperty(s,de,{enumerable:!0,configurable:!0,get:()=>Ze.value,set:Le=>Ze.value=Le})}if(l)for(const de in l)oi(l[de],s,n,de);if(u){const de=te(u)?u.call(n):u;Reflect.ownKeys(de).forEach(ue=>{es(ue,de[ue])})}c&&No(c,e,"c");function Ce(de,ue){Z(ue)?ue.forEach(oe=>de(oe.bind(n))):ue&&de(ue.bind(n))}if(Ce(Ll,h),Ce(bo,g),Ce(Fl,x),Ce(Hl,j),Ce(Vl,$),Ce(jl,W),Ce(Wl,F),Ce(Gl,M),Ce(Kl,ne),Ce(Bl,D),Ce(ni,I),Ce(ql,Re),Z(ee))if(ee.length){const de=e.exposed||(e.exposed={});ee.forEach(ue=>{Object.defineProperty(de,ue,{get:()=>n[ue],set:oe=>n[ue]=oe,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===_t&&(e.render=A),V!=null&&(e.inheritAttrs=V),Oe&&(e.components=Oe),G&&(e.directives=G),Re&&ei(e)}function ea(e,t,n=_t){Z(e)&&(e=Js(e));for(const s in e){const o=e[s];let r;ve(o)?"default"in o?r=ct(o.from||s,o.default,!0):r=ct(o.from||s):r=ct(o),qe(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function No(e,t,n){pt(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function oi(e,t,n,s){let o=s.includes(".")?Yr(n,s):()=>n[s];if($e(e)){const r=t[e];te(r)&&Kt(o,r)}else if(te(e))Kt(o,e.bind(n));else if(ve(e))if(Z(e))e.forEach(r=>oi(r,t,n,s));else{const r=te(e.handler)?e.handler.bind(n):t[e.handler];te(r)&&Kt(o,r,e)}}function ri(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let u;return l?u=l:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(f=>ls(u,f,i,!0)),ls(u,t,i)),ve(t)&&r.set(t,u),u}function ls(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&ls(e,r,n,!0),o&&o.forEach(i=>ls(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=ta[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ta={data:Do,props:Mo,emits:Mo,methods:wn,computed:wn,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:wn,directives:wn,watch:sa,provide:Do,inject:na};function Do(e,t){return t?e?function(){return Ue(te(e)?e.call(this,this):e,te(t)?t.call(this,this):t)}:t:e}function na(e,t){return wn(Js(e),Js(t))}function Js(e){if(Z(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ye(t)}Modifiers`]||e[`${nn(t)}Modifiers`];function la(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||be;let o=n;const r=t.startsWith("update:"),i=r&&ia(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>$e(c)?c.trim():c)),i.number&&(o=n.map(ms)));let l,u=s[l=ks(t)]||s[l=ks(Ye(t))];!u&&r&&(u=s[l=ks(nn(t))]),u&&pt(u,e,6,o);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,pt(f,e,6,o)}}const aa=new WeakMap;function li(e,t,n=!1){const s=n?aa:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!te(e)){const u=f=>{const c=li(f,t,!0);c&&(l=!0,Ue(i,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!l?(ve(e)&&s.set(e,null),null):(Z(r)?r.forEach(u=>i[u]=null):Ue(i,r),ve(e)&&s.set(e,i),i)}function ws(e,t){return!e||!ds(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,nn(t))||ge(e,t))}function Vo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:u,render:f,renderCache:c,props:h,data:g,setupState:x,ctx:j,inheritAttrs:$}=e,W=rs(e);let q,D;try{if(n.shapeFlag&4){const I=o||s,A=I;q=bt(f.call(A,I,c,h,x,g,j)),D=l}else{const I=t;q=bt(I.length>1?I(h,{attrs:l,slots:i,emit:u}):I(h,null)),D=t.props?l:ua(l)}}catch(I){Ot.length=0,xs(I,e,1),q=ke(yt)}let K=q;if(D&&$!==!1){const I=Object.keys(D),{shapeFlag:A}=K;I.length&&A&7&&(r&&I.some(fs)&&(D=ca(D,r)),K=hn(K,D,!1,!0))}if(n.dirs&&(K=hn(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition){const I=_s(K.type)&&Xr(K)||K;go(I,n.transition)}return q=K,rs(W),q}const ua=e=>{let t;for(const n in e)(n==="class"||n==="style"||ds(n))&&((t||(t={}))[n]=e[n]);return t},ca=(e,t)=>{const n={};for(const s in e)(!fs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function da(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:u}=t,f=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?jo(s,i,f):!!i;if(u&8){const c=t.dynamicProps;for(let h=0;hObject.create(ui),di=e=>Object.getPrototypeOf(e)===ui;function pa(e,t,n,s=!1){const o={},r=ci();e.propsDefaults=Object.create(null),fi(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Hr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ha(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=me(o),[u]=e.propsOptions;let f=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let h=0;h{u=!0;const[g,x]=pi(h,t,!0);Ue(i,g),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!u)return ve(e)&&s.set(e,ln),ln;if(Z(r))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",_o=e=>Z(e)?e.map(bt):[bt(e)],ga=(e,t,n)=>{if(t._n)return t;const s=qt((...o)=>_o(t(...o)),n);return s._c=!1,s},hi=(e,t,n)=>{const s=e._ctx;for(const o in e){if(xo(o))continue;const r=e[o];if(te(r))t[o]=ga(o,r,s);else if(r!=null){const i=_o(r);t[o]=()=>i}}},mi=(e,t)=>{const n=_o(t);e.slots.default=()=>n},gi=(e,t,n)=>{for(const s in t)(n||!xo(s))&&(e[s]=t[s])},va=(e,t,n)=>{const s=e.slots=ci();if(e.vnode.shapeFlag&32){const o=t._;o?(gi(s,t,n),n&&Er(s,"_",o,!0)):hi(t,s)}else t&&mi(e,t)},ba=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=be;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:gi(o,t,n):(r=!t.$stable,hi(t,o)),i=t}else t&&(mi(e,t),i={default:1});if(r)for(const l in o)!xo(l)&&i[l]==null&&delete o[l]},tt=Ca;function xa(e){return _a(e)}function _a(e,t){const n=gs();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:u,setText:f,setElementText:c,parentNode:h,nextSibling:g,setScopeId:x=_t,insertStaticContent:j}=e,$=(d,p,m,w=null,S=null,y=null,L=void 0,T=null,N=!!p.dynamicChildren)=>{if(d===p)return;d&&!_n(d,p)&&(w=C(d),Le(d,S,y,!0),d=null),p.patchFlag===-2&&(N=!1,p.dynamicChildren=null);const{type:k,ref:Q,shapeFlag:H}=p;switch(k){case Cs:W(d,p,m,w);break;case yt:q(d,p,m,w);break;case ts:d==null&&D(p,m,w,L);break;case ae:Oe(d,p,m,w,S,y,L,T,N);break;default:H&1?A(d,p,m,w,S,y,L,T,N):H&6?G(d,p,m,w,S,y,L,T,N):(H&64||H&128)&&k.process(d,p,m,w,S,y,L,T,N,O)}Q!=null&&S?Rn(Q,d&&d.ref,y,p||d,!p):Q==null&&d&&d.ref!=null&&Rn(d.ref,null,y,d,!0)},W=(d,p,m,w)=>{if(d==null)s(p.el=l(p.children),m,w);else{const S=p.el=d.el;p.children!==d.children&&f(S,p.children)}},q=(d,p,m,w)=>{d==null?s(p.el=u(p.children||""),m,w):p.el=d.el},D=(d,p,m,w)=>{[d.el,d.anchor]=j(d.children,p,m,w,d.el,d.anchor)},K=({el:d,anchor:p},m,w)=>{let S;for(;d&&d!==p;)S=g(d),s(d,m,w),d=S;s(p,m,w)},I=({el:d,anchor:p})=>{let m;for(;d&&d!==p;)m=g(d),o(d),d=m;o(p)},A=(d,p,m,w,S,y,L,T,N)=>{if(p.type==="svg"?L="svg":p.type==="math"&&(L="mathml"),d==null)M(p,m,w,S,y,L,T,N);else{const k=d.el&&d.el._isVueCE?d.el:null;try{k&&k._beginPatch(),Re(d,p,S,y,L,T,N)}finally{k&&k._endPatch()}}},M=(d,p,m,w,S,y,L,T)=>{let N,k;const{props:Q,shapeFlag:H,transition:J,dirs:Y}=d;if(N=d.el=i(d.type,y,Q&&Q.is,Q),H&8?c(N,d.children):H&16&&F(d.children,N,null,w,S,Ns(d,y),L,T),Y&&Jt(d,null,w,"created"),ne(N,d,d.scopeId,L,w),Q){for(const fe in Q)fe!=="value"&&!Sn(fe)&&r(N,fe,null,Q[fe],y,w);"value"in Q&&r(N,"value",null,Q.value,y),(k=Q.onVnodeBeforeMount)&&mt(k,w,d)}Y&&Jt(d,null,w,"beforeMount");const ce=ya(S,J);ce&&J.beforeEnter(N),s(N,p,m),((k=Q&&Q.onVnodeMounted)||ce||Y)&&tt(()=>{try{k&&mt(k,w,d),ce&&J.enter(N),Y&&Jt(d,null,w,"mounted")}finally{}},S)},ne=(d,p,m,w,S)=>{if(m&&x(d,m),w)for(let y=0;y{for(let k=N;k{const T=p.el=d.el;let{patchFlag:N,dynamicChildren:k,dirs:Q}=p;N|=d.patchFlag&16;const H=d.props||be,J=p.props||be;let Y;if(m&&Qt(m,!1),(Y=J.onVnodeBeforeUpdate)&&mt(Y,m,p,d),Q&&Jt(p,d,m,"beforeUpdate"),m&&Qt(m,!0),k&&(!d.dynamicChildren||d.dynamicChildren.length!==k.length)&&(N=0,L=!1,k=null),(H.innerHTML&&J.innerHTML==null||H.textContent&&J.textContent==null)&&c(T,""),k?ee(d.dynamicChildren,k,T,m,w,Ns(p,S),y):L||ue(d,p,T,null,m,w,Ns(p,S),y,!1),N>0){if(N&16)V(T,H,J,m,S);else if(N&2&&H.class!==J.class&&r(T,"class",null,J.class,S),N&4&&r(T,"style",H.style,J.style,S),N&8){const ce=p.dynamicProps;for(let fe=0;fe{Y&&mt(Y,m,p,d),Q&&Jt(p,d,m,"updated")},w)},ee=(d,p,m,w,S,y,L)=>{for(let T=0;T{if(p!==m){if(p!==be)for(const y in p)!Sn(y)&&!(y in m)&&r(d,y,p[y],null,S,w);for(const y in m){if(Sn(y))continue;const L=m[y],T=p[y];L!==T&&y!=="value"&&r(d,y,T,L,S,w)}"value"in m&&r(d,"value",p.value,m.value,S)}},Oe=(d,p,m,w,S,y,L,T,N)=>{const k=p.el=d?d.el:l(""),Q=p.anchor=d?d.anchor:l("");let{patchFlag:H,dynamicChildren:J,slotScopeIds:Y}=p;Y&&(T=T?T.concat(Y):Y),d==null?(s(k,m,w),s(Q,m,w),F(p.children||[],m,Q,S,y,L,T,N)):H>0&&H&64&&J&&d.dynamicChildren&&d.dynamicChildren.length===J.length?(ee(d.dynamicChildren,J,m,S,y,L,T),(p.key!=null||S&&p===S.subTree)&&vi(d,p,!0)):ue(d,p,m,Q,S,y,L,T,N)},G=(d,p,m,w,S,y,L,T,N)=>{p.slotScopeIds=T,d==null?p.shapeFlag&512?S.ctx.activate(p,m,w,L,N):Xe(p,m,w,S,y,L,N):Vt(d,p,N)},Xe=(d,p,m,w,S,y,L)=>{const T=d.component=Ia(d,w,S);if(vo(d)&&(T.ctx.renderer=O),$a(T,!1,L),T.asyncDep){if(S&&S.registerDep(T,Ce,L),!d.el){const N=T.subTree=ke(yt);q(null,N,p,m),d.placeholder=N.el}}else Ce(T,d,p,m,S,y,L)},Vt=(d,p,m)=>{const w=p.component=d.component;if(da(d,p,m))if(w.asyncDep&&!w.asyncResolved){de(w,p,m);return}else w.next=p,w.update();else p.el=d.el,w.vnode=p},Ce=(d,p,m,w,S,y,L)=>{const T=()=>{if(d.isMounted){let{next:H,bu:J,u:Y,parent:ce,vnode:fe}=d;{const Fe=bi(d);if(Fe){H&&(H.el=fe.el,de(d,H,L)),Fe.asyncDep.then(()=>{tt(()=>{d.isUnmounted||k()},S)});return}}let pe=H,Ie;Qt(d,!1),H?(H.el=fe.el,de(d,H,L)):H=fe,J&&Zn(J),(Ie=H.props&&H.props.onVnodeBeforeUpdate)&&mt(Ie,ce,H,fe),Qt(d,!0);const Ee=Vo(d),Ke=d.subTree;d.subTree=Ee,$(Ke,Ee,h(Ke.el),C(Ke),d,S,y),H.el=Ee.el,pe===null&&fa(d,Ee.el),Y&&tt(Y,S),(Ie=H.props&&H.props.onVnodeUpdated)&&tt(()=>mt(Ie,ce,H,fe),S)}else{let H;const{el:J,props:Y}=p,{bm:ce,m:fe,parent:pe,root:Ie,type:Ee}=d,Ke=cn(p);Qt(d,!1),ce&&Zn(ce),!Ke&&(H=Y&&Y.onVnodeBeforeMount)&&mt(H,pe,p),Qt(d,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(Ee,d.parent?d.parent.type:void 0);const Fe=d.subTree=Vo(d);$(null,Fe,m,w,d,S,y),p.el=Fe.el}if(fe&&tt(fe,S),!Ke&&(H=Y&&Y.onVnodeMounted)){const Fe=p;tt(()=>mt(H,pe,Fe),S)}(p.shapeFlag&256||pe&&cn(pe.vnode)&&pe.vnode.shapeFlag&256)&&d.a&&tt(d.a,S),d.isMounted=!0,p=m=w=null}};d.scope.on();const N=d.effect=new Rr(T);d.scope.off();const k=d.update=N.run.bind(N),Q=d.job=N.runIfDirty.bind(N);Q.i=d,Q.id=d.uid,N.scheduler=()=>mo(Q),Qt(d,!0),k()},de=(d,p,m)=>{p.component=d;const w=d.vnode.props;d.vnode=p,d.next=null,ha(d,p.props,w,m),ba(d,p.children,m),Tt(),Io(d),Nt()},ue=(d,p,m,w,S,y,L,T,N=!1)=>{const k=d&&d.children,Q=d?d.shapeFlag:0,H=p.children,{patchFlag:J,shapeFlag:Y}=p;if(J>0){if(J&128){at(k,H,m,w,S,y,L,T,N);return}else if(J&256){oe(k,H,m,w,S,y,L,T,N);return}}Y&8?(Q&16&&et(k,S,y),H!==k&&c(m,H)):Q&16?Y&16?at(k,H,m,w,S,y,L,T,N):et(k,S,y,!0):(Q&8&&c(m,""),Y&16&&F(H,m,w,S,y,L,T,N))},oe=(d,p,m,w,S,y,L,T,N)=>{d=d||ln,p=p||ln;const k=d.length,Q=p.length,H=Math.min(k,Q);let J;for(J=0;JQ?et(d,S,y,!0,!1,H):F(p,m,w,S,y,L,T,N,H)},at=(d,p,m,w,S,y,L,T,N)=>{let k=0;const Q=p.length;let H=d.length-1,J=Q-1;for(;k<=H&&k<=J;){const Y=d[k],ce=p[k]=N?Rt(p[k]):bt(p[k]);if(_n(Y,ce))$(Y,ce,m,null,S,y,L,T,N);else break;k++}for(;k<=H&&k<=J;){const Y=d[H],ce=p[J]=N?Rt(p[J]):bt(p[J]);if(_n(Y,ce))$(Y,ce,m,null,S,y,L,T,N);else break;H--,J--}if(k>H){if(k<=J){const Y=J+1,ce=YJ)for(;k<=H;)Le(d[k],S,y,!0),k++;else{const Y=k,ce=k,fe=new Map;for(k=ce;k<=J;k++){const Me=p[k]=N?Rt(p[k]):bt(p[k]);Me.key!=null&&fe.set(Me.key,k)}let pe,Ie=0;const Ee=J-ce+1;let Ke=!1,Fe=0;const zt=new Array(Ee);for(k=0;k=Ee){Le(Me,S,y,!0);continue}let rt;if(Me.key!=null)rt=fe.get(Me.key);else for(pe=ce;pe<=J;pe++)if(zt[pe-ce]===0&&_n(Me,p[pe])){rt=pe;break}rt===void 0?Le(Me,S,y,!0):(zt[rt-ce]=k+1,rt>=Fe?Fe=rt:Ke=!0,$(Me,p[rt],m,null,S,y,L,T,N),Ie++)}const qn=Ke?wa(zt):ln;for(pe=qn.length-1,k=Ee-1;k>=0;k--){const Me=ce+k,rt=p[Me],Kn=p[Me+1],Gn=Me+1{const{el:y,type:L,transition:T,children:N,shapeFlag:k}=d;if(k&6){Ze(d.component.subTree,p,m,w);return}if(k&128){d.suspense.move(p,m,w);return}if(k&64){L.move(d,p,m,O);return}if(L===ae){s(y,p,m);for(let H=0;HT.enter(y),S));else{const{leave:H,delayLeave:J,afterLeave:Y}=T,ce=()=>{d.ctx.isUnmounted?o(y):s(y,p,m)},fe=()=>{const pe=y._isLeaving||!!y[Os];y._isLeaving&&y[Os](!0),T.persisted&&!pe?ce():H(y,()=>{ce(),Y&&Y()})};J?J(y,ce,fe):fe()}else s(y,p,m)},Le=(d,p,m,w=!1,S=!1)=>{const{type:y,props:L,ref:T,children:N,dynamicChildren:k,shapeFlag:Q,patchFlag:H,dirs:J,cacheIndex:Y,memo:ce}=d;if(H===-2&&(S=!1),T!=null&&(Tt(),Rn(T,null,m,d,!0),Nt()),Y!=null&&(p.renderCache[Y]=void 0),Q&256){p.ctx.deactivate(d);return}const fe=Q&1&&J,pe=!cn(d);let Ie;if(pe&&(Ie=L&&L.onVnodeBeforeUnmount)&&mt(Ie,p,d),Q&6)wt(d.component,m,w);else{if(Q&128){d.suspense.unmount(m,w);return}fe&&Jt(d,null,p,"beforeUnmount"),Q&64?d.type.remove(d,p,m,O,w):k&&!k.hasOnce&&(y!==ae||H>0&&H&64)?et(k,p,m,!1,!0):(y===ae&&H&384||!S&&Q&16)&&et(N,p,m),w&&jt(d)}const Ee=ce!=null&&Y==null;(pe&&(Ie=L&&L.onVnodeUnmounted)||fe||Ee)&&tt(()=>{Ie&&mt(Ie,p,d),fe&&Jt(d,null,p,"unmounted"),Ee&&(d.el=null)},m)},jt=d=>{const{type:p,el:m,anchor:w,transition:S}=d;if(p===ae){Ut(m,w);return}if(p===ts){I(d);return}const y=()=>{o(m),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(d.shapeFlag&1&&S&&!S.persisted){const{leave:L,delayLeave:T}=S,N=()=>L(m,y);T?T(d.el,y,N):N()}else y()},Ut=(d,p)=>{let m;for(;d!==p;)m=g(d),o(d),d=m;o(p)},wt=(d,p,m)=>{const{bum:w,scope:S,job:y,subTree:L,um:T,m:N,a:k}=d;Lo(N),Lo(k),w&&Zn(w),S.stop(),y&&(y.flags|=8,Le(L,d,p,m)),T&&tt(T,p),tt(()=>{d.isUnmounted=!0},p)},et=(d,p,m,w=!1,S=!1,y=0)=>{for(let L=y;L{if(d.shapeFlag&6)return C(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=g(d.anchor||d.el),m=p&&p[Dl];return m?g(m):p};let B=!1;const U=(d,p,m)=>{let w;d==null?p._vnode&&(Le(p._vnode,null,null,!0),w=p._vnode.component):$(p._vnode||null,d,p,null,null,null,m),p._vnode=d,B||(B=!0,Io(w),Wr(),B=!1)},O={p:$,um:Le,m:Ze,r:jt,mt:Xe,mc:F,pc:ue,pbc:ee,n:C,o:e};return{render:U,hydrate:void 0,createApp:ra(U)}}function Ns({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Qt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ya(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vi(e,t,n=!1){const s=e.children,o=t.children;if(Z(s)&&Z(o))for(let r=0;r>1,e[n[l]]0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-- >0;)n[r]=i,i=t[i];return n}function bi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:bi(t)}function Lo(e){if(e)for(let t=0;te.__isSuspense;function Ca(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):$l(e)}const ae=Symbol.for("v-fgt"),Cs=Symbol.for("v-txt"),yt=Symbol.for("v-cmt"),ts=Symbol.for("v-stc"),Ot=[];let st=null;function _(e=!1){Ot.push(st=e?null:[])}function yo(){Ot.pop(),st=Ot[Ot.length-1]||null}let Nn=1;function as(e,t=!1){Nn+=e,e<0&&st&&t&&(st.hasOnce=!0)}function yi(e){return e.dynamicChildren=Nn>0?st||ln:null,yo(),Nn>0&&st&&st.push(e),e}function E(e,t,n,s,o,r){return yi(a(e,t,n,s,o,r,!0))}function nt(e,t,n,s,o){return yi(ke(e,t,n,s,o,!0))}function Dn(e){return e?e.__v_isVNode===!0:!1}function _n(e,t){return e.type===t.type&&e.key===t.key}const wi=({key:e})=>e??null,ns=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||qe(e)||te(e)?{i:je,r:e,k:t,f:!!n}:e:null);function a(e,t=null,n=null,s=0,o=null,r=e===ae?0:1,i=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&wi(t),ref:t&&ns(t),scopeId:Jr,slotScopeIds:null,children:n,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:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:je};return l?(us(u,n),r&128&&e.normalize(u)):n&&(u.shapeFlag|=$e(n)?8:16),Nn>0&&!i&&st&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&st.push(u),u}const ke=Ea;function Ea(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Jl)&&(e=yt),Dn(e)){const l=hn(e,t,!0);return n&&us(l,n),Nn>0&&!r&&st&&(l.shapeFlag&6?st[st.indexOf(e)]=l:st.push(l)),l.patchFlag=-2,l}if(Ma(e)&&(e=e.__vccOpts),t){t=Sa(t);let{class:l,style:u}=t;l&&!$e(l)&&(t.class=Ae(l)),ve(u)&&(po(u)&&!Z(u)&&(u=Ue({},u)),t.style=tn(u))}const i=$e(e)?1:_i(e)?128:_s(e)?64:ve(e)?4:te(e)?2:0;return a(e,t,n,s,o,i,r,!0)}function Sa(e){return e?po(e)||di(e)?Ue({},e):e:null}function hn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:u}=e,f=t?Aa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&wi(f),ref:t&&t.ref?n&&r?Z(r)?r.concat(ns(t)):[r,ns(t)]:ns(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ae?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hn(e.ssContent),ssFallback:e.ssFallback&&hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&go(c,u.clone(c)),c}function we(e=" ",t=0){return ke(Cs,null,e,t)}function Ci(e,t){const n=ke(ts,null,e);return n.staticCount=t,n}function X(e="",t=!1){return t?(_(),nt(yt,null,e)):ke(yt,null,e)}function bt(e){return e==null||typeof e=="boolean"?ke(yt):Z(e)?ke(ae,null,e.slice()):Dn(e)?Rt(e):ke(Cs,null,String(e))}function Rt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hn(e)}function us(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),us(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!di(t)?t._ctx=je:o===3&&je&&(je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(te(t)){if(s&65){us(e,{default:t});return}t={default:t,_ctx:je},n=32}else t=String(t),s&64?(n=16,t=[we(t)]):n=8;e.children=t,e.shapeFlag|=n}function Aa(...e){const t={};for(let n=0;nBe||je;let cs,Mn;{const e=gs(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};cs=t("__VUE_INSTANCE_SETTERS__",n=>Be=n),Mn=t("__VUE_SSR_SETTERS__",n=>Vn=n)}const Bn=e=>{const t=Be;return cs(e),e.scope.on(),()=>{e.scope.off(),cs(t)}},Fo=()=>{Be&&Be.scope.off(),cs(null)};function Ei(e){return e.vnode.shapeFlag&4}let Vn=!1;function $a(e,t=!1,n=!1){t&&Mn(t);const{props:s,children:o}=e.vnode,r=Ei(e);pa(e,s,r,t),va(e,o,n||t);const i=r?Oa(e,t):void 0;return t&&Mn(!1),i}function Oa(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xl);const{setup:s}=n;if(s){Tt();const o=e.setupContext=s.length>1?Na(e):null,r=Bn(e),i=Fn(s,e,0,[e.props,o]),l=yr(i);if(Nt(),r(),(l||e.sp)&&!cn(e)&&ei(e),l){if(i.then(Fo,Fo),t)return i.then(u=>{Mn(!0);try{Ho(e,u,t)}finally{Mn(!1)}}).catch(u=>{xs(u,e,0)});e.asyncDep=i}else Ho(e,i)}else Si(e)}function Ho(e,t,n){te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ve(t)&&(e.setupState=qr(t)),Si(e)}function Si(e,t,n){const s=e.type;e.render||(e.render=s.render||_t);{const o=Bn(e);Tt();try{Zl(e)}finally{Nt(),o()}}}const Ta={get(e,t){return He(e,"get",""),e[t]}};function Na(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ta),slots:e.slots,emit:e.emit,expose:t}}function Es(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(qr(yl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in In)return In[n](e)},has(t,n){return n in t||n in In}})):e.proxy}function Da(e,t=!0){return te(e)?e.displayName||e.name:e.name||t&&e.__name}function Ma(e){return te(e)&&"__vccOpts"in e}const ye=(e,t)=>Al(e,t,Vn);function Ai(e,t,n){try{as(-1);const s=arguments.length;return s===2?ve(t)&&!Z(t)?Dn(t)?ke(e,null,[t]):ke(e,t):ke(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Dn(n)&&(n=[n]),ke(e,t,n))}finally{as(1)}}const Va="3.5.41";/** * @vue/runtime-dom v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Ys;const Bo=typeof window<"u"&&window.trustedTypes;if(Bo)try{Ys=Bo.createPolicy("vue",{createHTML:e=>e})}catch{}const ki=Ys?e=>Ys.createHTML(e):e=>e,ja="http://www.w3.org/2000/svg",Ua="http://www.w3.org/1998/Math/MathML",At=typeof document<"u"?document:null,qo=At&&At.createElement("template"),La={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?At.createElementNS(ja,e):t==="mathml"?At.createElementNS(Ua,e):n?At.createElement(e,{is:n}):At.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>At.createTextNode(e),createComment:e=>At.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>At.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{qo.innerHTML=ki(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=qo.content;if(s==="svg"||s==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Fa=Symbol("_vtc");function Ha(e,t,n){const s=e[Fa];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ko=Symbol("_vod"),Ba=Symbol("_vsh"),qa=Symbol(""),Ka=/(?:^|;)\s*display\s*:/;function Ga(e,t,n){const s=e.style,o=$e(n);let r=!1;if(n&&!o){if(t)if($e(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Cn(s,l,"")}else for(const i in t)n[i]==null&&Cn(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?za(e,i,!$e(t)&&t?t[i]:void 0,l)||Cn(s,i,l):Cn(s,i,"")}}else if(o){if(t!==n){const i=s[qa];i&&(n+=";"+i),s.cssText=n,r=Ka.test(n)}}else t&&e.removeAttribute("style");Ko in e&&(e[Ko]=r?s.display:"",e[Ba]&&(s.display="none"))}const Go=/\s*!important$/;function Cn(e,t,n){if(Z(n))n.forEach(s=>Cn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Wa(e,t);Go.test(n)?e.setProperty(nn(s),n.replace(Go,""),"important"):e[s]=n}}const Wo=["Webkit","Moz","ms"],Ds={};function Wa(e,t){const n=Ds[t];if(n)return n;let s=Ye(t);if(s!=="filter"&&s in e)return Ds[t]=s;s=hs(s);for(let o=0;oMs||(eu.then(()=>Ms=0),Ms=Date.now());function nu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Z(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,su=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?Ha(e,s,i):t==="style"?Ga(e,n,s):ds(t)?fs(t)||Qa(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ou(e,t,s,i))?(Qo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jo(e,t,s,i,r,t!=="value")):e._isVueCE&&(ru(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$e(s)))?Qo(e,Ye(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Jo(e,t,s,i))};function ou(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xo(t)&&te(n));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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Xo(t)&&$e(n)?!1:t in e}function ru(e,t){const n=e._def.props;if(!n)return!1;const s=Ye(t);return Array.isArray(n)?n.some(o=>Ye(o)===s):Object.keys(n).some(o=>Ye(o)===s)}const Wt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>Zn(t,n):t};function iu(e){e.target.composing=!0}function Zo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ot=Symbol("_assign"),Qn=Symbol("_initialValue");function Vs(e,t,n){return t&&(e=e.trim()),n&&(e=ms(e)),e}const xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Qn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Qn]=e.defaultValue.replace(/\r\n?/g,` `))),e[ot]=Wt(o);const r=s||o.props&&o.props.type==="number";$t(e,t?"change":"input",i=>{i.target.composing||e[ot](Vs(e.value,n,r))}),(n||r)&&$t(e,"change",()=>{e.value=Vs(e.value,n,r)}),t||($t(e,"compositionstart",iu),$t(e,"compositionend",Zo),$t(e,"change",Zo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Qn];delete e[Qn],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[ot](Vs(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[ot]=Wt(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ms(e.value):e.value,u=t??"";if(l===u)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},kt={deep:!0,created(e,t,n){e[ot]=Wt(n),$t(e,"change",()=>{const s=e._modelValue,o=mn(e),r=e.checked,i=e[ot];if(Z(s)){const l=ro(s,o),u=l!==-1;if(r&&!u)i(s.concat(o));else if(!r&&u){const f=[...s];f.splice(l,1),i(f)}}else if(bn(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(Ri(e,r))})},mounted:er,beforeUpdate(e,t,n){e[ot]=Wt(n),er(e,t,n)}};function er(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Z(t))o=ro(t,s.props.value)>-1;else if(bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Gt(t,Ri(e,!0))}e.checked!==o&&(e.checked=o)}const lu={created(e,{value:t},n){e.checked=Gt(t,n.props.value),e[ot]=Wt(n),$t(e,"change",()=>{e[ot](mn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[ot]=Wt(s),t!==n&&(e.checked=Gt(t,s.props.value))}},jn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,$t(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?ms(mn(r)):mn(r));e[ot](e.multiple?bn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,ho(()=>{e._assigning=!1})}),e[ot]=Wt(s)},mounted(e,{value:t}){tr(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[ot]=Wt(n)},updated(e,{value:t}){e._assigning||tr(e,t)}};function tr(e,t){const n=e.multiple,s=Z(t);if(!(n&&!s&&!bn(t))){for(let o=0,r=e.options.length;oString(f)===String(l)):i.selected=ro(t,l)>-1}else i.selected=t.has(l);else if(Gt(mn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function mn(e){return"_value"in e?e._value:e.value}function Ri(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const au=["ctrl","shift","alt","meta"],uu={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)=>au.some(n=>e[`${n}Key`]&&!t.includes(n))},ze=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...r)=>{for(let i=0;i{const t=du().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=hu(s);if(!o)return;const r=t._component;!te(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,pu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function pu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hu(e){return $e(e)?document.querySelector(e):e}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */const rn=typeof document<"u";function Ii(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function mu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ii(e.default)}const he=Object.assign;function js(e,t){const n={};for(const s in t){const o=t[s];n[s]=ht(o)?o.map(e):e(o)}return n}const Pn=()=>{},ht=Array.isArray;function sr(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Pi=/#/g,gu=/&/g,vu=/\//g,bu=/=/g,xu=/\?/g,$i=/\+/g,_u=/%5B/g,yu=/%5D/g,Oi=/%5E/g,wu=/%60/g,Ti=/%7B/g,Cu=/%7C/g,Ni=/%7D/g,Eu=/%20/g;function wo(e){return e==null?"":encodeURI(""+e).replace(Cu,"|").replace(_u,"[").replace(yu,"]")}function Su(e){return wo(e).replace(Ti,"{").replace(Ni,"}").replace(Oi,"^")}function Xs(e){return wo(e).replace($i,"%2B").replace(Eu,"+").replace(Pi,"%23").replace(gu,"%26").replace(wu,"`").replace(Ti,"{").replace(Ni,"}").replace(Oi,"^")}function Au(e){return Xs(e).replace(bu,"%3D")}function ku(e){return wo(e).replace(Pi,"%23").replace(xu,"%3F")}function Ru(e){return ku(e).replace(vu,"%2F")}function Un(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Iu=/\/$/,Pu=e=>e.replace(Iu,"");function Us(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let u=t.indexOf("?");return u=l>=0&&u>l?-1:u,u>=0&&(s=t.slice(0,u),r=t.slice(u,l>0?l:t.length),o=e(r.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Nu(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:Un(i)}}function $u(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function or(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ou(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&gn(t.matched[s],n.matched[o])&&Di(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function gn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Di(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Tu(e[n],t[n]))return!1;return!0}function Tu(e,t){return ht(e)?rr(e,t):ht(t)?rr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function rr(e,t){return ht(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Nu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,i,l;for(i=0;i1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const Lt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Zs=(function(e){return e.pop="pop",e.push="push",e})({}),Ls=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Du(e){if(!e)if(rn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Pu(e)}const Mu=/^[^#]+#/;function Vu(e,t){return e.replace(Mu,"#")+t}function ju(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Ss=()=>({left:window.scrollX,top:window.scrollY});function Uu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=ju(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ir(e,t){return(history.state?history.state.position-t:-1)+e}const eo=new Map;function Lu(e,t){eo.set(e,t)}function Fu(e){const t=eo.get(e);return eo.delete(e),t}function Hu(e){return typeof e=="string"||e&&typeof e=="object"}function Mi(e){return typeof e=="string"||typeof e=="symbol"}let Pe=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Vi=Symbol("");Pe.MATCHER_NOT_FOUND+"",Pe.NAVIGATION_GUARD_REDIRECT+"",Pe.NAVIGATION_ABORTED+"",Pe.NAVIGATION_CANCELLED+"",Pe.NAVIGATION_DUPLICATED+"";function vn(e,t){return he(new Error,{type:e,[Vi]:!0},t)}function St(e,t){return e instanceof Error&&Vi in e&&(t==null||!!(e.type&t))}const Bu=["params","query","hash"];function qu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Bu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ku(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Xs(o)):[s&&Xs(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Gu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ht(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Wu=Symbol(""),ar=Symbol(""),As=Symbol(""),Co=Symbol(""),to=Symbol("");function yn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ht(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,u)=>{const f=g=>{g===!1?u(vn(Pe.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?u(g):Hu(g)?u(vn(Pe.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&s.enterCallbacks[o]===i&&typeof g=="function"&&i.push(g),l())},c=r(()=>e.call(s&&s.instances[o],t,n,f));let h=Promise.resolve(c);e.length<3&&(h=h.then(f)),h.catch(g=>u(g))})}function Fs(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let u=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Ii(u)){const f=(u.__vccOpts||u)[t];f&&r.push(Ht(f,n,s,i,l,o))}else{let f=u();r.push(()=>f.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const h=mu(c)?c.default:c;i.mods[l]=c,i.components[l]=h;const g=(h.__vccOpts||h)[t];return g&&Ht(g,n,s,i,l,o)()}))}}return r}function zu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;ign(f,l))?s.push(l):n.push(l));const u=e.matched[i];u&&(t.matched.find(f=>gn(f,u))||o.push(u))}return[n,s,o]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */let Ju=()=>location.protocol+"//"+location.host;function ji(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),or(l,"")}return or(n,e)+s+o}function Qu(e,t,n,s){let o=[],r=[],i=null;const l=({state:g})=>{const x=ji(e,location),j=n.value,$=t.value;let W=0;if(g){if(n.value=x,t.value=g,i&&i===j){i=null;return}W=$?g.position-$.position:0}else s(x);o.forEach(q=>{q(n.value,j,{delta:W,type:Zs.pop,direction:W?W>0?Ls.forward:Ls.back:Ls.unknown})})};function u(){i=n.value}function f(g){o.push(g);const x=()=>{const j=o.indexOf(g);j>-1&&o.splice(j,1)};return r.push(x),x}function c(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(he({},g.state,{scroll:Ss()}),"")}}function h(){for(const g of r)g();r=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:u,listen:f,destroy:h}}function ur(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Ss():null}}function Yu(e){const{history:t,location:n}=window,s={value:ji(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,f,c){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+u:Ju()+e+u;try{t[c?"replaceState":"pushState"](f,"",g),o.value=f}catch(x){console.error(x),n[c?"replace":"assign"](g)}}function i(u,f){r(u,he({},t.state,ur(o.value.back,u,o.value.forward,!0),f,{position:o.value.position}),!0),s.value=u}function l(u,f){const c=he({},o.value,t.state,{forward:u,scroll:Ss()});r(c.current,c,!0),r(u,he({},ur(s.value,u,null),{position:c.position+1},f),!1),s.value=u}return{location:s,state:o,push:l,replace:i}}function Xu(e){e=Du(e);const t=Yu(e),n=Qu(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=he({location:"",base:e,go:s,createHref:Vu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Xt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ne=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Ne||{});const Zu={type:Xt.Static,value:""},ec=/[a-zA-Z0-9_]/;function tc(e){if(!e)return[[]];if(e==="/")return[[Zu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${n})/"${f}": ${x}`)}let n=Ne.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,u,f="",c="";function h(){f&&(n===Ne.Static?r.push({type:Xt.Static,value:f}):n===Ne.Param||n===Ne.ParamRegExp||n===Ne.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Xt.Param,value:f,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=u}for(;lt.length?t.length===1&&t[0]===We.Static+We.Segment?1:-1:0}function Ui(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const ic={strict:!1,end:!0,sensitive:!1};function lc(e,t,n){const s=oc(tc(e.path),n),o=he(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function ac(e,t){const n=[],s=new Map;t=sr(ic,t);function o(h){return s.get(h)}function r(h,g,x){const j=!x,$=pr(h);$.aliasOf=x&&x.record;const W=sr(t,h),q=[$];if("alias"in h){const I=typeof h.alias=="string"?[h.alias]:h.alias;for(const A of I)q.push(pr(he({},$,{components:x?x.record.components:$.components,path:A,aliasOf:x?x.record:$})))}let D,K;for(const I of q){const{path:A}=I;if(g&&A[0]!=="/"){const M=g.record.path,ne=M[M.length-1]==="/"?"":"/";I.path=g.record.path+(A&&ne+A)}if(D=lc(I,g,W),x?x.alias.push(D):(K=K||D,K!==D&&K.alias.push(D),j&&h.name&&!hr(D)&&i(h.name)),Li(D)&&u(D),$.children){const M=$.children;for(let ne=0;ne{i(K)}:Pn}function i(h){if(Mi(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(i),h.alias.forEach(i))}}function l(){return n}function u(h){const g=dc(h,n);n.splice(g,0,h),h.record.name&&!hr(h)&&s.set(h.record.name,h)}function f(h,g){let x,j={},$,W;if("name"in h&&h.name){if(x=s.get(h.name),!x)throw vn(Pe.MATCHER_NOT_FOUND,{location:h});W=x.record.name,j=he(fr(g.params,x.keys.filter(K=>!K.optional).concat(x.parent?x.parent.keys.filter(K=>K.optional):[]).map(K=>K.name)),h.params&&fr(h.params,x.keys.map(K=>K.name))),$=x.stringify(j)}else if(h.path!=null)$=h.path,x=n.find(K=>K.re.test($)),x&&(j=x.parse($),W=x.record.name);else{if(x=g.name?s.get(g.name):n.find(K=>K.re.test(g.path)),!x)throw vn(Pe.MATCHER_NOT_FOUND,{location:h,currentLocation:g});W=x.record.name,j=he({},g.params,h.params),$=x.stringify(j)}const q=[];let D=x;for(;D;)q.unshift(D.record),D=D.parent;return{name:W,path:$,params:j,matched:q,meta:cc(q)}}e.forEach(h=>r(h));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:f,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:o}}function fr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function pr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:uc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function uc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function hr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function cc(e){return e.reduce((t,n)=>he(t,n.meta),{})}function dc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Ui(e,t[r])<0?s=r:n=r+1}const o=fc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function fc(e){let t=e;for(;t=t.parent;)if(Li(t)&&Ui(e,t)===0)return t}function Li({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mr(e){const t=ct(As),n=ct(Co),s=ye(()=>{const u=De(e.to);return t.resolve(u)}),o=ye(()=>{const{matched:u}=s.value,{length:f}=u,c=u[f-1],h=n.matched;if(!c||!h.length)return-1;const g=h.findIndex(gn.bind(null,c));if(g>-1)return g;const x=gr(u[f-2]);return f>1&&gr(c)===x&&h[h.length-1].path!==x?h.findIndex(gn.bind(null,u[f-2])):g}),r=ye(()=>o.value>-1&&vc(n.params,s.value.params)),i=ye(()=>o.value>-1&&o.value===n.matched.length-1&&Di(n.params,s.value.params));function l(u={}){if(gc(u)){const f=t[De(e.replace)?"replace":"push"](De(e.to)).catch(Pn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:ye(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function pc(e){return e.length===1?e[0]:e}const hc=Zr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:mr,setup(e,{slots:t}){const n=bs(mr(e)),{options:s}=ct(As),o=ye(()=>({[vr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[vr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&pc(t.default(n));return e.custom?r:Ai("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),mc=hc;function gc(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vc(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!ht(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function gr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vr=(e,t,n)=>e??t??n,bc=Zr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ct(to),o=ye(()=>e.route||s.value),r=ct(ar,0),i=ye(()=>{let f=De(r);const{matched:c}=o.value;let h;for(;(h=c[f])&&!h.components;)f++;return f}),l=ye(()=>o.value.matched[i.value]);es(ar,ye(()=>i.value+1)),es(Wu,l),es(to,o);const u=z();return Kt(()=>[u.value,l.value,e.name],([f,c,h],[g,x,j])=>{c&&(c.instances[h]=f,x&&x!==c&&f&&f===g&&(c.leaveGuards.size||(c.leaveGuards=x.leaveGuards),c.updateGuards.size||(c.updateGuards=x.updateGuards))),f&&c&&(!x||!gn(c,x)||!g)&&(c.enterCallbacks[h]||[]).forEach($=>$(f))},{flush:"post"}),()=>{const f=o.value,c=e.name,h=l.value,g=h&&h.components[c];if(!g)return br(n.default,{Component:g,route:f});const x=h.props[c],j=x?x===!0?f.params:typeof x=="function"?x(f):x:null,W=Ai(g,he({},j,t,{onVnodeUnmounted:q=>{q.component.isUnmounted&&(h.instances[c]=null)},ref:u}));return br(n.default,{Component:W,route:f})||W}}});function br(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xc=bc;function _c(e){const t=ac(e.routes,e),n=e.parseQuery||Ku,s=e.stringifyQuery||lr,o=e.history,r=yn(),i=yn(),l=yn(),u=wl(Lt);let f=Lt;rn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=js.bind(null,C=>""+C),h=js.bind(null,Ru),g=js.bind(null,Un);function x(C,B){let U,O;return Mi(C)?(U=t.getRecordMatcher(C),O=B):O=C,t.addRoute(O,U)}function j(C){const B=t.getRecordMatcher(C);B&&t.removeRoute(B)}function $(){return t.getRoutes().map(C=>C.record)}function W(C){return!!t.getRecordMatcher(C)}function q(C,B){if(B=he({},B||u.value),typeof C=="string"){const m=Us(n,C,B.path),w=t.resolve({path:m.path},B),S=o.createHref(m.fullPath);return he(m,w,{params:g(w.params),hash:Un(m.hash),redirectedFrom:void 0,href:S})}let U;if(C.path!=null)U=he({},C,{path:Us(n,C.path,B.path).path});else{const m=he({},C.params);for(const w in m)m[w]==null&&delete m[w];U=he({},C,{params:h(m)}),B.params=h(B.params)}const O=t.resolve(U,B),re=C.hash||"";O.params=c(g(O.params));const d=$u(s,he({},C,{hash:Su(re),path:O.path})),p=o.createHref(d);return he({fullPath:d,hash:re,query:s===lr?Gu(C.query):C.query||{}},O,{redirectedFrom:void 0,href:p})}function D(C){return typeof C=="string"?Us(n,C,u.value.path):he({},C)}function K(C,B){if(f!==C)return vn(Pe.NAVIGATION_CANCELLED,{from:B,to:C})}function I(C){return ne(C)}function A(C){return I(he(D(C),{replace:!0}))}function M(C,B){const U=C.matched[C.matched.length-1];if(U&&U.redirect){const{redirect:O}=U;let re=typeof O=="function"?O(C,B):O;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=D(re):{path:re},re.params={}),he({query:C.query,hash:C.hash,params:re.path!=null?{}:C.params},re)}}function ne(C,B){const U=f=q(C),O=u.value,re=C.state,d=C.force,p=C.replace===!0,m=M(U,O);if(m)return ne(he(D(m),{state:typeof m=="object"?he({},re,m.state):re,force:d,replace:p}),B||U);const w=U;w.redirectedFrom=B;let S;return!d&&Ou(s,O,U)&&(S=vn(Pe.NAVIGATION_DUPLICATED,{to:w,from:O}),Ze(O,O,!0,!1)),(S?Promise.resolve(S):ee(w,O)).catch(y=>St(y)?St(y,Pe.NAVIGATION_GUARD_REDIRECT)?y:at(y):ue(y,w,O)).then(y=>{if(y){if(St(y,Pe.NAVIGATION_GUARD_REDIRECT))return ne(he({replace:p},D(y.to),{state:typeof y.to=="object"?he({},re,y.to.state):re,force:d}),B||w)}else y=Oe(w,O,!0,p,re);return V(w,O,y),y})}function F(C,B){const U=K(C,B);return U?Promise.reject(U):Promise.resolve()}function Re(C){const B=Ut.values().next().value;return B&&typeof B.runWithContext=="function"?B.runWithContext(C):C()}function ee(C,B){let U;const[O,re,d]=zu(C,B);U=Fs(O.reverse(),"beforeRouteLeave",C,B);for(const m of O)m.leaveGuards.forEach(w=>{U.push(Ht(w,C,B))});const p=F.bind(null,C,B);return U.push(p),et(U).then(()=>{U=[];for(const m of r.list())U.push(Ht(m,C,B));return U.push(p),et(U)}).then(()=>{U=Fs(re,"beforeRouteUpdate",C,B);for(const m of re)m.updateGuards.forEach(w=>{U.push(Ht(w,C,B))});return U.push(p),et(U)}).then(()=>{U=[];for(const m of d)if(m.beforeEnter)if(ht(m.beforeEnter))for(const w of m.beforeEnter)U.push(Ht(w,C,B));else U.push(Ht(m.beforeEnter,C,B));return U.push(p),et(U)}).then(()=>(C.matched.forEach(m=>m.enterCallbacks={}),U=Fs(d,"beforeRouteEnter",C,B,Re),U.push(p),et(U))).then(()=>{U=[];for(const m of i.list())U.push(Ht(m,C,B));return U.push(p),et(U)}).catch(m=>St(m,Pe.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function V(C,B,U){l.list().forEach(O=>Re(()=>O(C,B,U)))}function Oe(C,B,U,O,re){const d=K(C,B);if(d)return d;const p=B===Lt,m=rn?history.state:{};U&&(O||p?o.replace(C.fullPath,he({scroll:p&&m&&m.scroll},re)):o.push(C.fullPath,re)),u.value=C,Ze(C,B,U,p),at()}let G;function Xe(){G||(G=o.listen((C,B,U)=>{if(!wt.listening)return;const O=q(C),re=M(O,wt.currentRoute.value);if(re){ne(he(re,{replace:!0,force:!0}),O).catch(Pn);return}f=O;const d=u.value;rn&&Lu(ir(d.fullPath,U.delta),Ss()),ee(O,d).catch(p=>St(p,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_CANCELLED)?p:St(p,Pe.NAVIGATION_GUARD_REDIRECT)?(ne(he(D(p.to),{force:!0}),O).then(m=>{St(m,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&!U.delta&&U.type===Zs.pop&&o.go(-1,!1)}).catch(Pn),Promise.reject()):(U.delta&&o.go(-U.delta,!1),ue(p,O,d))).then(p=>{p=p||Oe(O,d,!1),p&&(U.delta&&!St(p,Pe.NAVIGATION_CANCELLED)?o.go(-U.delta,!1):U.type===Zs.pop&&St(p,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),V(O,d,p)}).catch(Pn)}))}let Vt=yn(),Ce=yn(),de;function ue(C,B,U){at(C);const O=Ce.list();return O.length?O.forEach(re=>re(C,B,U)):console.error(C),Promise.reject(C)}function oe(){return de&&u.value!==Lt?Promise.resolve():new Promise((C,B)=>{Vt.add([C,B])})}function at(C){return de||(de=!C,Xe(),Vt.list().forEach(([B,U])=>C?U(C):B()),Vt.reset()),C}function Ze(C,B,U,O){const{scrollBehavior:re}=e;if(!rn||!re)return Promise.resolve();const d=!U&&Fu(ir(C.fullPath,0))||(O||!U)&&history.state&&history.state.scroll||null;return ho().then(()=>re(C,B,d)).then(p=>p&&Uu(p)).catch(p=>ue(p,C,B))}const Le=C=>o.go(C);let jt;const Ut=new Set,wt={currentRoute:u,listening:!0,addRoute:x,removeRoute:j,clearRoutes:t.clearRoutes,hasRoute:W,getRoutes:$,resolve:q,options:e,push:I,replace:A,go:Le,back:()=>Le(-1),forward:()=>Le(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:Ce.add,isReady:oe,install(C){C.component("RouterLink",mc),C.component("RouterView",xc),C.config.globalProperties.$router=wt,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>De(u)}),rn&&!jt&&u.value===Lt&&(jt=!0,I(o.location).catch(O=>{}));const B={};for(const O in Lt)Object.defineProperty(B,O,{get:()=>u.value[O],enumerable:!0});C.provide(As,wt),C.provide(Co,Hr(B)),C.provide(to,u);const U=C.unmount;Ut.add(C),C.unmount=function(){Ut.delete(C),Ut.size<1&&(f=Lt,G&&G(),G=null,u.value=Lt,jt=!1,de=!1),U()}}};function et(C){return C.reduce((B,U)=>B.then(()=>Re(U)),Promise.resolve())}return wt}function Eo(){return ct(As)}function Fi(e){return ct(Co)}const Yn=window.location.pathname.startsWith("/portal/"),Qe={esPortal:Yn,baseRuta:Yn?"/portal/studio/":"/studio/",apiBase:Yn?"/portal":"/app",urlLogin:Yn?"/portal/login":"/login"};function ie(e){return Qe.apiBase+e}async function Xn(e,t={}){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t.headers}}),s=n.headers.get("content-type")||"";if(n.redirected||!s.includes("application/json"))throw window.location.href=Qe.urlLogin,new Error("Sesión expirada");const o=await n.json();if(!n.ok){const r=typeof(o==null?void 0:o.error)=="string"?o.error:o==null?void 0:o.message;throw new Error(r||"Error de servidor")}return o}const le={get:e=>Xn(e),post:(e,t)=>Xn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Xn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Xn(e,{method:"DELETE"})},En=z(!1),yc={class:"h-14 px-4 flex items-center gap-2 border-b border-borde"},wc={key:0,class:"px-3 pt-3"},Cc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},Ec={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},Sc={key:0,class:"px-2 text-xs text-tenue"},Ac={key:1,class:"px-2 text-xs text-tenue"},kc={class:"truncate"},Rc={class:"flex items-center gap-1 mt-0.5"},Ic={class:"text-[11px] text-tenue"},Pc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},$c=["onClick"],Oc=["onClick"],Tc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Nc={class:"font-semibold text-texto mb-4"},Dc={key:0,class:"grid grid-cols-2 gap-3"},Mc=["value"],Vc={class:"text-[11px] text-tenue mt-1"},jc=["value"],Uc={class:"text-[11px] text-tenue mt-1"},Lc={class:"flex items-center gap-2 text-sm text-texto"},Fc={class:"flex justify-end gap-2 pt-2"},Hc={__name:"Sidebar",setup(e,{expose:t}){const n=Fi(),s=Eo(),o=z([]),r=z([]),i=z([]),l=z(!0),u=z(""),f=z(!1),c=z(null),h=z(x()),g=ye(()=>n.params.tenantId||n.params.id);Kt(()=>n.fullPath,()=>{En.value=!1});function x(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function j(){l.value=!0,u.value="";try{const A=await le.get(ie("/umind/tenants"));o.value=A.items||[]}catch(A){u.value=A.message}finally{l.value=!1}}function $(A){return Array.isArray(A)?A:(A==null?void 0:A.items)||(A==null?void 0:A.registros)||[]}async function W(){if(Qe.esPortal)return;const[A,M]=await Promise.allSettled([le.get("/app/api/clientes/select"),le.get("/app/umind-planes/list")]);r.value=A.status==="fulfilled"?$(A.value):[],i.value=M.status==="fulfilled"?$(M.value):[];const ne=[];A.status==="rejected"&&ne.push("clientes"),M.status==="rejected"&&ne.push("planes"),ne.length&&(u.value=`No se pudo cargar la lista de ${ne.join(" ni ")}.`)}function q(){c.value=null,h.value=x(),f.value=!0}function D(A){c.value=A,h.value={nombre:A.nombre,dominios_permitidos:A.dominios_permitidos,activo:A.activo,cliente_id:A.cliente_id??null,plan_id:A.plan_id??null},f.value=!0}async function K(){const A={...h.value,dominios_permitidos:h.value.dominios_permitidos.split(",").map(M=>M.trim()).filter(Boolean)};try{if(c.value)await le.put(ie(`/umind/tenants/${c.value.ID}`),A),f.value=!1,await j();else{const M=await le.post(ie("/umind/tenants"),A);f.value=!1,await j(),s.push(`/tenants/${M.id}`)}}catch(M){u.value=M.message}}async function I(A){confirm(`¿Eliminar el espacio "${A.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await le.del(ie(`/umind/tenants/${A.ID}`)),g.value===String(A.ID)&&s.push("/"),await j())}return t({recargar:j}),bo(()=>{j(),W()}),(A,M)=>{const ne=Hn("router-link");return _(),E(ae,null,[De(En)?(_(),E("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:M[0]||(M[0]=F=>En.value=!1)})):X("",!0),a("aside",{class:Ae(["w-64 shrink-0 flex flex-col border-r border-borde bg-superficie fixed inset-y-0 left-0 z-40 transition-transform duration-200 md:static md:h-screen md:sticky md:top-0 md:translate-x-0",De(En)?"translate-x-0":"-translate-x-full"])},[a("div",yc,[ke(ne,{to:"/",class:"flex items-center gap-2 text-base font-semibold text-texto"},{default:qt(()=>[...M[8]||(M[8]=[a("svg",{viewBox:"0 0 96 96",class:"w-6 h-6 shrink-0","aria-hidden":"true"},[a("rect",{width:"96",height:"96",rx:"22",fill:"#8eb02f"}),a("path",{d:"M32,42 V58 A14,14 0 0 0 60,58 V42",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M60,58 V64",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round"}),a("circle",{cx:"60",cy:"28",r:"7",fill:"#fff"})],-1),a("span",null,[we("uMind "),a("span",{class:"text-brand"},"Studio")],-1)])]),_:1})]),De(Qe).esPortal?X("",!0):(_(),E("div",wc,[a("button",{class:"btn-primary w-full",onClick:q}," + Nuevo espacio ")])),u.value?(_(),E("p",Cc,P(u.value),1)):X("",!0),a("nav",Ec,[l.value?(_(),E("p",Sc,"Cargando...")):o.value.length===0?(_(),E("p",Ac,P(De(Qe).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin espacios todavía."),1)):X("",!0),(_(!0),E(ae,null,Te(o.value,F=>(_(),E("div",{key:F.ID,class:Ae(["group flex items-center rounded-lg transition-colors",g.value===String(F.ID)?"bg-brand/10":"hover:bg-elevado"])},[ke(ne,{to:`/tenants/${F.ID}`,class:Ae(["flex-1 min-w-0 px-2.5 py-2 text-sm",g.value===String(F.ID)?"text-brand font-medium":"text-texto"])},{default:qt(()=>[a("div",kc,P(F.nombre),1),a("div",Rc,[a("span",{class:Ae(["w-1.5 h-1.5 rounded-full",F.activo?"bg-green-500":"bg-tenue/40"])},null,2),a("span",Ic,P(F.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),De(Qe).esPortal?X("",!0):(_(),E("div",Pc,[a("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Re=>D(F)}," ✎ ",8,$c),a("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Re=>I(F)}," ✕ ",8,Oc)]))],2))),128))])],2),f.value?(_(),E("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:M[7]||(M[7]=ze(F=>f.value=!1,["self"]))},[a("div",Tc,[a("h2",Nc,P(c.value?"Editar espacio":"Nuevo espacio"),1),M[17]||(M[17]=a("p",{class:"text-xs text-tenue mb-3"}," Un espacio es el negocio o sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),a("form",{class:"space-y-3",onSubmit:ze(K,["prevent"])},[a("div",null,[M[9]||(M[9]=a("label",{class:"label"},"Nombre",-1)),se(a("input",{"onUpdate:modelValue":M[1]||(M[1]=F=>h.value.nombre=F),required:"",class:"input"},null,512),[[xe,h.value.nombre]])]),a("div",null,[M[10]||(M[10]=a("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),se(a("input",{"onUpdate:modelValue":M[2]||(M[2]=F=>h.value.dominios_permitidos=F),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[xe,h.value.dominios_permitidos]])]),De(Qe).esPortal?X("",!0):(_(),E("div",Dc,[a("div",null,[M[12]||(M[12]=a("label",{class:"label"},"Cliente",-1)),se(a("select",{"onUpdate:modelValue":M[3]||(M[3]=F=>h.value.cliente_id=F),class:"input"},[M[11]||(M[11]=a("option",{value:null},"— sin asignar —",-1)),(_(!0),E(ae,null,Te(r.value,F=>(_(),E("option",{key:F.ID,value:F.ID},P(F.nombre),9,Mc))),128))],512),[[jn,h.value.cliente_id]]),a("p",Vc,P(r.value.length?"Define quién ve este espacio desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),a("div",null,[M[14]||(M[14]=a("label",{class:"label"},"Plan",-1)),se(a("select",{"onUpdate:modelValue":M[4]||(M[4]=F=>h.value.plan_id=F),class:"input"},[M[13]||(M[13]=a("option",{value:null},"— sin plan —",-1)),(_(!0),E(ae,null,Te(i.value,F=>(_(),E("option",{key:F.ID,value:F.ID},P(F.nombre)+" ("+P(F.max_agentes===0?"∞":F.max_agentes)+" agentes) ",9,jc))),128))],512),[[jn,h.value.plan_id]]),a("p",Uc,P(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),a("label",Lc,[se(a("input",{"onUpdate:modelValue":M[5]||(M[5]=F=>h.value.activo=F),type:"checkbox"},null,512),[[kt,h.value.activo]]),M[15]||(M[15]=we(" Activo ",-1))]),a("div",Fc,[a("button",{type:"button",class:"btn-ghost",onClick:M[6]||(M[6]=F=>f.value=!1)}," Cancelar "),M[16]||(M[16]=a("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):X("",!0)],64)}}},Hi="umind-tema";function Bc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const fn=z(localStorage.getItem(Hi)||Bc());function Bi(){document.documentElement.classList.toggle("dark",fn.value==="oscuro")}function xr(){fn.value=fn.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Hi,fn.value),Bi()}Bi();const qc={class:"min-h-screen flex"},Kc={class:"flex-1 min-w-0 flex flex-col"},Gc={class:"h-14 shrink-0 flex items-center gap-1 px-4 sm:px-6 border-b border-borde"},Wc=["title"],zc={class:"text-base leading-none"},Jc={class:"flex-1 max-w-5xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8 animate-aparecer"},Qc={__name:"App",setup(e){return(t,n)=>{const s=Hn("router-view");return _(),E("div",qc,[ke(Hc),a("main",Kc,[a("header",Gc,[a("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>En.value=!0)},[...n[2]||(n[2]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=a("span",{class:"flex-1"},null,-1)),a("button",{class:"btn-ghost !px-2.5 !py-1.5",title:De(fn)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>De(xr)&&De(xr)(...o))},[a("span",zc,P(De(fn)==="oscuro"?"☀️":"🌙"),1)],8,Wc)]),a("div",Jc,[ke(s)])])])}}},Yc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Xc=["width","height","aria-label"],Zc=["fill"],ed=["stroke"],td=["cy"],nd=["cy"],sd=["cy"],od=["cy"],rd={key:1,d:"M41,66 h12 M67,66 h12",class:"umi-linea","stroke-width":"5","stroke-linecap":"round",fill:"none"},id={key:4,d:"M50,78 q10,8 20,0",class:"umi-linea","stroke-width":"4",fill:"none","stroke-linecap":"round"},ld={__name:"UiMascota",props:{estado:{type:String,default:"normal"},tam:{type:[Number,String],default:72}},setup(e){return(t,n)=>(_(),E("svg",{width:e.tam,height:e.tam,viewBox:"0 0 120 120",class:"shrink-0",role:"img","aria-label":`Umi, la mascota de uMind (${e.estado})`},[a("circle",{cx:"60",cy:"26",r:"6",fill:e.estado==="alerta"?"#dc2626":"currentColor",class:Ae(e.estado==="pensando"?"umi-late":"")},null,10,Zc),a("line",{x1:"60",y1:"32",x2:"60",y2:"44",stroke:e.estado==="alerta"?"#dc2626":"currentColor","stroke-width":"4","stroke-linecap":"round"},null,8,ed),n[7]||(n[7]=a("path",{d:"M30,46 V76 A30,30 0 0 0 90,76 V46 Z",fill:"currentColor"},null,-1)),e.estado==="normal"||e.estado==="contenta"||e.estado==="alerta"?(_(),E(ae,{key:0},[a("circle",{cx:"47",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,td),a("circle",{cx:"73",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,nd),a("circle",{cx:"48",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,sd),a("circle",{cx:"74",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,od)],64)):e.estado==="durmiendo"?(_(),E("path",rd)):e.estado==="pensando"?(_(),E(ae,{key:2},[n[0]||(n[0]=a("circle",{cx:"45",cy:"66",r:"4.5",class:"umi-ojo umi-p1"},null,-1)),n[1]||(n[1]=a("circle",{cx:"60",cy:"66",r:"4.5",class:"umi-ojo umi-p2"},null,-1)),n[2]||(n[2]=a("circle",{cx:"75",cy:"66",r:"4.5",class:"umi-ojo umi-p3"},null,-1))],64)):e.estado==="buscando"?(_(),E(ae,{key:3},[n[3]||(n[3]=a("circle",{cx:"47",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[4]||(n[4]=a("circle",{cx:"73",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[5]||(n[5]=a("circle",{cx:"50",cy:"66",r:"3",class:"umi-pupila"},null,-1)),n[6]||(n[6]=a("circle",{cx:"76",cy:"66",r:"3",class:"umi-pupila"},null,-1))],64)):X("",!0),e.estado==="contenta"?(_(),E("path",id)):X("",!0)],8,Xc))}},qi=Yc(ld,[["__scopeId","data-v-551897a0"]]),ad={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},ud={key:1,class:"max-w-md mx-auto text-center py-20"},cd={key:2,class:"flex flex-col items-center justify-center text-center py-24"},dd={class:"text-lg font-medium text-texto"},fd={class:"text-sm text-tenue mt-1"},pd={__name:"Home",setup(e){const t=Eo(),n=z(Qe.esPortal),s=z(!1);async function o(){if(Qe.esPortal)try{const i=(await le.get(ie("/umind/tenants"))).items||[];if(i.length===0){s.value=!0;return}if(i.length!==1)return;const l=i[0].ID,f=(await le.get(ie(`/umind/agentes?tenant_id=${l}`))).items||[];if(f.length===1){t.replace(`/tenants/${l}/agentes/${f[0].ID}`);return}t.replace(`/tenants/${l}`)}catch{}finally{n.value=!1}}return bo(o),(r,i)=>n.value?(_(),E("div",ad," Abriendo tu asistente… ")):s.value?(_(),E("div",ud,[ke(qi,{estado:"durmiendo",tam:80,class:"mx-auto mb-4 text-brand"}),i[0]||(i[0]=Ci('

Todavía no tenés un asistente activo

uMind contesta por vos en WhatsApp y en tu sitio, con la información de tu negocio. Entiende las notas de voz y lee las fotos y archivos que te mandan tus clientes.

Quiero activarlo

Volver al portal

',4))])):(_(),E("div",cd,[i[1]||(i[1]=a("div",{class:"text-4xl mb-4"},"💬",-1)),a("h1",dd,P(De(Qe).esPortal?"Elegí tu espacio de la izquierda":"Elegí un espacio de la izquierda"),1),a("p",fd,P(De(Qe).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},hd={class:"flex flex-col items-center justify-center text-center py-12 px-6"},md={key:0,class:"text-3xl mb-3 opacity-70"},gd={class:"text-sm font-medium text-texto"},vd={key:2,class:"text-xs text-tenue mt-1.5 max-w-sm leading-relaxed"},bd={key:3,class:"mt-4"},Bt={__name:"UiEmptyState",props:{estado:{type:String,default:"durmiendo"},titulo:String,detalle:String,icono:{type:String,default:""}},setup(e){return(t,n)=>(_(),E("div",hd,[e.icono?(_(),E("div",md,P(e.icono),1)):(_(),nt(qi,{key:1,estado:e.estado,tam:64,class:"mb-3 text-brand"},null,8,["estado"])),a("p",gd,P(e.titulo),1),e.detalle?(_(),E("p",vd,P(e.detalle),1)):X("",!0),t.$slots.default?(_(),E("div",bd,[Yl(t.$slots,"default")])):X("",!0)]))}},xd={key:0,class:"mb-6"},_d={class:"flex items-start justify-between gap-4"},yd={class:"text-xl font-semibold text-texto"},wd={class:"text-xs text-tenue mt-1"},Cd={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Ed={class:"flex items-center justify-between mb-4"},Sd={class:"flex items-center gap-2"},Ad={key:0,class:"badge-alerta"},kd={key:1,class:"badge-neutro"},Rd=["disabled"],Id={key:2,class:"text-xs text-tenue -mt-2 mb-4"},Pd={key:3,class:"text-xs text-tenue -mt-2 mb-4"},$d={key:4,class:"grid gap-3 sm:grid-cols-2"},Od=["disabled"],Td={key:6,class:"grid gap-3 sm:grid-cols-2"},Nd={class:"flex items-start gap-3"},Dd={class:"min-w-0 flex-1"},Md={class:"flex items-center gap-2"},Vd={class:"font-medium text-texto truncate"},jd={class:"text-xs text-tenue mt-0.5 truncate"},Ud={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},Ld=["onClick"],Fd=["onClick"],Hd=["onClick"],Bd={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},qd={class:"tabular-nums"},Kd={class:"text-texto font-medium"},Gd={class:"tabular-nums"},Wd={class:"text-texto font-medium"},zd={class:"tabular-nums"},Jd={class:"text-texto font-medium"},Qd={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg max-h-[calc(100vh-2rem)] overflow-y-auto"},Yd={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Xd={key:0},Zd={class:"grid gap-1.5"},ef=["value"],tf={class:"min-w-0"},nf={class:"block text-sm text-texto"},sf={class:"block text-xs text-tenue"},of={key:0,class:"block text-xs text-tenue mt-0.5"},rf=["value"],lf={class:"flex items-center gap-2"},af={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},uf={class:"flex justify-end gap-2 pt-2"},cf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},df={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=ye(()=>Number(t.id)),s=Eo(),o=z(null),r=z([]),i=z([]),l=z(""),u=z(!1),f=z(null),c=z(D()),h=z(null),g=z({}),x=z(!0);function j(ee){const V=g.value[ee.ID]||{};return ee.activo?V.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function $(ee){const V=g.value[ee.ID]||{};return{documentos:V.documentos||0,canales:V.canales||0,conversaciones:V.conversaciones_7d||0}}function W(ee){return String(ee||"?").trim().split(/\s+/).slice(0,2).map(V=>V[0]).join("").toUpperCase()}const q=ye(()=>{if(!h.value)return{sinPlan:!0};const ee=h.value.max_agentes||0;return{sinPlan:!1,nombre:h.value.nombre,ilimitado:ee<=0,max:ee,usados:r.value.length,lleno:ee>0&&r.value.length>=ee}});function D(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0,plantilla_rubro:""}}const K=z([]);async function I(){l.value="",x.value=!0;try{const[ee,V,Oe,G]=await Promise.all([le.get(ie("/umind/tenants")),le.get(ie(`/umind/agentes?tenant_id=${t.id}`)),le.get(ie("/umind/ai-configs")),le.get(ie("/umind/plantillas-rubro"))]);o.value=(ee.items||[]).find(Xe=>String(Xe.ID)===t.id)||null,r.value=V.items||[],h.value=V.plan||null,g.value=V.resumen||{},i.value=Oe.items||[],K.value=G.items||[]}catch(ee){l.value=ee.message}finally{x.value=!1}}async function A(ee){const V=prompt(`Nombre de la copia de "${ee.nombre}":`,`${ee.nombre} (copia)`);if(V!==null){l.value="";try{const Oe=await le.post(ie(`/umind/agentes/${ee.ID}/duplicar`),{tenant_id:Number(n.value),nombre:V.trim()});await I(),Oe.aviso&&alert(Oe.aviso)}catch(Oe){l.value=Oe.message}}}function M(){f.value=null,c.value=D(),u.value=!0}function ne(ee){f.value=ee,c.value={nombre:ee.nombre,ai_config_id:ee.ai_config_id,tono:ee.tono,mensaje_bienvenida:ee.mensaje_bienvenida,color:ee.color||"#8eb02f",activo:ee.activo},u.value=!0}async function F(){try{if(f.value)await le.put(ie(`/umind/agentes/${f.value.ID}`),{tenant_id:n.value,...c.value}),u.value=!1,await I();else{const ee=await le.post(ie("/umind/agentes"),{tenant_id:n.value,...c.value});u.value=!1,s.push(`/tenants/${n.value}/agentes/${ee.id}`)}}catch(ee){l.value=ee.message}}async function Re(ee){confirm(`¿Eliminar el agente "${ee.nombre}"? Esto no se puede deshacer.`)&&(await le.del(ie(`/umind/agentes/${ee.ID}`)),await I())}return Kt(()=>t.id,I,{immediate:!0}),(ee,V)=>{const Oe=Hn("router-link");return _(),E("div",null,[o.value?(_(),E("div",xd,[a("div",_d,[a("div",null,[a("h1",yd,P(o.value.nombre),1),a("p",wd,P(o.value.dominios_permitidos||"sin dominios configurados"),1)]),ke(Oe,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost"},{default:qt(()=>[...V[10]||(V[10]=[we("📊 Consumo",-1)])]),_:1},8,["to"])])])):X("",!0),l.value?(_(),E("p",Cd,P(l.value),1)):X("",!0),a("div",Ed,[a("div",Sd,[V[11]||(V[11]=a("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),q.value.sinPlan?(_(),E("span",Ad,"sin plan · sin límite")):q.value.ilimitado?(_(),E("span",kd,P(q.value.nombre)+" · ilimitado",1)):(_(),E("span",{key:2,class:Ae(q.value.lleno?"badge-alerta":"badge-neutro")},P(q.value.nombre)+" · "+P(q.value.usados)+" de "+P(q.value.max),3))]),a("button",{class:"btn-primary",disabled:q.value.lleno,onClick:M},"+ Nuevo agente",8,Rd)]),q.value.sinPlan&&!De(Qe).esPortal?(_(),E("p",Id," Este espacio no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del espacio, en la barra izquierda. ")):q.value.lleno?(_(),E("p",Pd," Alcanzaste el máximo de agentes de tu plan. ")):X("",!0),x.value?(_(),E("div",$d,[(_(),E(ae,null,Te(2,G=>a("div",{key:G,class:"card p-4 animate-pulse"},[...V[12]||(V[12]=[Ci('
',2)])])),64))])):r.value.length===0?(_(),nt(Bt,{key:5,class:"card",estado:"durmiendo",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:qt(()=>[a("button",{class:"btn-primary",disabled:q.value.lleno,onClick:M},"+ Crear el primer agente",8,Od)]),_:1})):(_(),E("div",Td,[(_(!0),E(ae,null,Te(r.value,G=>(_(),nt(Oe,{key:G.ID,to:`/tenants/${n.value}/agentes/${G.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:qt(()=>[a("span",{class:"absolute inset-x-0 top-0 h-1",style:tn({background:G.color||"#8eb02f"})},null,4),a("div",Nd,[a("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:tn({background:G.color||"#8eb02f",opacity:G.activo?1:.4})},P(W(G.nombre)),5),a("div",Dd,[a("div",Md,[a("span",Vd,P(G.nombre),1),a("span",{class:Ae(`badge-${j(G).tipo}`)},P(j(G).texto),3)]),a("p",jd,P(G.tono||"sin tono definido"),1)]),a("div",Ud,[a("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:ze(Xe=>ne(G),["prevent","stop"])},"✎",8,Ld),a("button",{class:"p-1 text-tenue hover:text-texto",title:"Duplicar: copia el conocimiento y las herramientas a un agente nuevo",onClick:ze(Xe=>A(G),["prevent","stop"])},"⧉",8,Fd),a("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:ze(Xe=>Re(G),["prevent","stop"])},"✕",8,Hd)])]),a("div",Bd,[a("span",qd,[a("b",Kd,P($(G).conversaciones),1),V[13]||(V[13]=we(" conversaciones · 7d",-1))]),a("span",Gd,[a("b",Wd,P($(G).documentos),1),V[14]||(V[14]=we(" fuentes",-1))]),a("span",zd,[a("b",Jd,P($(G).canales),1),V[15]||(V[15]=we(" canales",-1))])])]),_:2},1032,["to"]))),128))])),u.value?(_(),E("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:V[9]||(V[9]=ze(G=>u.value=!1,["self"]))},[a("div",Qd,[a("h2",Yd,P(f.value?"Editar agente":"Nuevo agente"),1),a("form",{class:"space-y-3",onSubmit:ze(F,["prevent"])},[a("div",null,[V[16]||(V[16]=a("label",{class:"label"},"Nombre",-1)),se(a("input",{"onUpdate:modelValue":V[0]||(V[0]=G=>c.value.nombre=G),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[xe,c.value.nombre]])]),!f.value&&K.value.length?(_(),E("div",Xd,[V[17]||(V[17]=a("label",{class:"label"},"Arrancar con",-1)),a("div",Zd,[(_(!0),E(ae,null,Te([{clave:"",nombre:"Agente en blanco",descripcion:"Sin conocimiento cargado. Lo escribís vos desde cero."},...K.value],G=>(_(),E("label",{key:G.clave,class:Ae(["flex gap-2.5 p-2.5 rounded-lg border cursor-pointer transition-colors",c.value.plantilla_rubro===G.clave?"border-brand bg-brand/5":"border-borde hover:border-brand/40"])},[se(a("input",{"onUpdate:modelValue":V[1]||(V[1]=Xe=>c.value.plantilla_rubro=Xe),type:"radio",value:G.clave,class:"mt-1 text-brand focus:ring-brand"},null,8,ef),[[lu,c.value.plantilla_rubro]]),a("span",tf,[a("span",nf,P(G.nombre),1),a("span",sf,P(G.descripcion),1),G.notas?(_(),E("span",of,P(G.notas)+" notas listas para editar · "+P(G.resumen),1)):X("",!0)])],2))),128))]),V[18]||(V[18]=a("p",{class:"text-xs text-tenue mt-1.5"}," Las notas vienen con ejemplos entre corchetes — abrilas y reemplazalas por tus datos reales. ",-1))])):X("",!0),a("div",null,[V[20]||(V[20]=a("label",{class:"label"},"Config de IA",-1)),se(a("select",{"onUpdate:modelValue":V[2]||(V[2]=G=>c.value.ai_config_id=G),class:"input"},[V[19]||(V[19]=a("option",{value:null},"— sin asignar —",-1)),(_(!0),E(ae,null,Te(i.value,G=>(_(),E("option",{key:G.ID,value:G.ID},P(G.nombre)+" ("+P(G.provider)+")",9,rf))),128))],512),[[jn,c.value.ai_config_id]])]),a("div",null,[V[21]||(V[21]=a("label",{class:"label"},"Tono / personalidad",-1)),se(a("textarea",{"onUpdate:modelValue":V[3]||(V[3]=G=>c.value.tono=G),rows:"2",class:"input"},null,512),[[xe,c.value.tono]])]),a("div",null,[V[22]||(V[22]=a("label",{class:"label"},"Mensaje de bienvenida",-1)),se(a("input",{"onUpdate:modelValue":V[4]||(V[4]=G=>c.value.mensaje_bienvenida=G),class:"input"},null,512),[[xe,c.value.mensaje_bienvenida]])]),a("div",null,[V[23]||(V[23]=a("label",{class:"label"},"Color del widget",-1)),a("div",lf,[se(a("input",{"onUpdate:modelValue":V[5]||(V[5]=G=>c.value.color=G),type:"color",class:"w-10 h-9 border border-gray-300 dark:border-gray-700 rounded cursor-pointer bg-white dark:bg-gray-800"},null,512),[[xe,c.value.color]]),se(a("input",{"onUpdate:modelValue":V[6]||(V[6]=G=>c.value.color=G),type:"text",pattern:"#[0-9a-fA-F]{6}",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm font-mono"},null,512),[[xe,c.value.color]])])]),a("label",af,[se(a("input",{"onUpdate:modelValue":V[7]||(V[7]=G=>c.value.activo=G),type:"checkbox"},null,512),[[kt,c.value.activo]]),V[24]||(V[24]=we(" Activo ",-1))]),a("div",uf,[a("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:V[8]||(V[8]=G=>u.value=!1)},"Cancelar"),a("button",cf,P(f.value?"Guardar":"Crear"),1)])],32)])])):X("",!0)])}}},ff={key:0,class:"mb-6 mt-1 flex items-start justify-between gap-4"},pf={class:"min-w-0"},hf={class:"text-xl font-semibold text-texto"},mf={class:"text-xs text-tenue mt-1"},gf={class:"bg-elevado px-1.5 py-0.5 rounded"},vf=["href"],bf={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},xf={class:"flex gap-1.5 mb-6 overflow-x-auto sin-barra pb-1"},_f=["onClick"],yf={key:2},wf={class:"card p-4 mb-4"},Cf={class:"flex gap-1 mb-3"},Ef=["onClick"],Sf={class:"flex items-center justify-between"},Af=["disabled"],kf={class:"flex items-center justify-between"},Rf=["disabled"],If={class:"flex gap-2"},Pf={class:"flex items-center justify-between"},$f={class:"flex items-center gap-2 text-xs text-tenue cursor-pointer"},Of=["disabled"],Tf={class:"card divide-y divide-borde"},Nf={class:"text-sm text-texto"},Df={class:"text-xs text-tenue mt-0.5"},Mf={key:0},Vf={key:1},jf={key:2},Uf={key:3,class:"text-red-600 dark:text-red-400"},Lf={class:"flex items-center gap-3 shrink-0"},Ff=["title","onClick"],Hf=["disabled","onClick"],Bf=["onClick"],qf={key:3},Kf={class:"card divide-y divide-borde"},Gf={class:"text-sm text-texto font-mono"},Wf={class:"label mt-0.5"},zf={class:"text-xs text-tenue mt-0.5"},Jf={key:0,class:"ml-1 text-green-600 dark:text-green-400"},Qf={key:1,class:"ml-1 text-gray-400"},Yf={class:"flex gap-3 text-sm shrink-0"},Xf=["onClick"],Zf=["onClick"],ep={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},tp={class:"font-semibold text-texto mb-4"},np={class:"border border-borde rounded-lg p-3 space-y-2"},sp=["onUpdate:modelValue"],op=["onUpdate:modelValue"],rp=["onUpdate:modelValue"],ip={class:"label flex items-center gap-1"},lp=["onUpdate:modelValue"],ap=["onClick"],up={key:0,class:"text-xs text-gray-400"},cp={class:"border border-borde rounded-lg p-3 space-y-2"},dp={class:"flex items-center gap-2 label"},fp={class:"flex items-center gap-2 text-sm text-texto"},pp={class:"flex justify-end gap-2 pt-2"},hp={key:4},mp={class:"card p-4 mb-4"},gp={class:"flex items-center justify-between mb-2"},vp={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},bp={class:"card divide-y divide-borde"},xp={class:"flex items-center justify-between"},_p={class:"font-medium text-texto capitalize"},yp={class:"flex gap-3 text-sm"},wp=["onClick"],Cp=["onClick"],Ep={class:"flex gap-4 mt-2 text-xs"},Sp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Ap=["checked","onChange"],kp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Rp=["checked","onChange"],Ip={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Pp=["checked","onChange"],$p={class:"label mt-1 break-all"},Op={class:"bg-elevado px-1 rounded"},Tp={key:0,class:"text-xs text-tenue mt-1"},Np={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Dp={class:"card p-6 w-full max-w-md"},Mp={key:0},Vp={class:"flex flex-col gap-2 pt-1"},jp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Up={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Lp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Fp={class:"flex justify-end gap-2 pt-2"},Hp={key:5},Bp={class:"flex gap-2 mb-4"},qp={class:"card divide-y divide-borde"},Kp={class:"font-medium text-texto capitalize"},Gp={class:"ml-2 text-sm text-tenue"},Wp=["onClick"],zp={key:6,class:"card p-4 flex flex-col h-[28rem]"},Jp={class:"flex-1 overflow-y-auto space-y-2 mb-3"},Qp={key:0,class:"text-sm text-tenue"},Yp={key:1,class:"text-xs text-tenue"},Xp=["disabled"],Zp={key:7,class:"grid grid-cols-3 gap-4"},eh={class:"col-span-1 card divide-y divide-borde max-h-[28rem] overflow-y-auto"},th=["onClick"],nh={class:"text-texto truncate"},sh={class:"text-xs text-tenue mt-0.5"},oh={class:"col-span-2 card p-4 max-h-[28rem] overflow-y-auto space-y-2"},rh={key:0,class:"text-sm text-tenue"},ih={key:8},lh={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},ah={class:"cursor-pointer flex items-center gap-2 text-sm"},uh={class:"text-tenue text-xs shrink-0"},ch={class:"text-texto truncate"},dh={class:"text-tenue text-xs ml-auto shrink-0"},fh={key:0,class:"mt-2 bg-elevado border border-borde rounded-lg p-2 text-xs text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap"},ph={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=ye(()=>Number(t.agenteId)),s=Fi(),o=z(null),r=z(""),i=z(typeof s.query.tab=="string"?s.query.tab:Qe.esPortal?"conversaciones":"conocimiento"),l=z([]),u=z(""),f=z(30),c=z(!1);async function h(){const R=await le.get(ie(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(R.items||[]).find(v=>String(v.ID)===t.agenteId)||null}async function g(){const R=await le.get(ie(`/umind/documentos?agente_id=${t.agenteId}`));l.value=R.items||[]}const x=z("texto"),j=z(!0),$=z(""),W=z(""),q=z(null);async function D(){if(u.value.trim()){c.value=!0,r.value="";try{await le.post(ie("/umind/documentos"),{agente_id:n.value,url:u.value.trim(),max_paginas:Number(f.value)||30,auto_actualizar:j.value}),u.value="",await g()}catch(R){r.value=R.message}finally{c.value=!1}}}async function K(){if(W.value.trim()){c.value=!0,r.value="";try{await le.post(ie("/umind/documentos/texto"),{agente_id:n.value,titulo:$.value.trim(),contenido:W.value}),$.value="",W.value="",await g()}catch(R){r.value=R.message}finally{c.value=!1}}}async function I(){var v,Ct;const R=(Ct=(v=q.value)==null?void 0:v.files)==null?void 0:Ct[0];if(R){c.value=!0,r.value="";try{const b=new FormData;b.append("agente_id",String(n.value)),b.append("archivo",R);const Se=await fetch(ie("/umind/documentos/archivo"),{method:"POST",body:b}),it=await Se.json();if(!Se.ok)throw new Error(it.error||"No se pudo subir");q.value.value="",await g()}catch(b){r.value=b.message}finally{c.value=!1}}}async function A(R){r.value="";try{await le.post(ie(`/umind/documentos/${R.ID}/reprocesar`),{}),await g()}catch(v){r.value=v.message}}async function M(R){try{await le.put(ie(`/umind/documentos/${R.ID}`),{auto_actualizar:!R.auto_actualizar}),await g()}catch(v){r.value=v.message}}function ne(R){if(!R)return"sin procesar";const v=Math.floor((Date.now()-new Date(R))/864e5);if(v<=0)return"hoy";if(v===1)return"ayer";if(v<30)return`hace ${v} días`;const Ct=Math.floor(v/30);return Ct===1?"hace un mes":`hace ${Ct} meses`}function F(R){return R.procesado_at?Date.now()-new Date(R.procesado_at)>60*864e5:!1}async function Re(R){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await le.del(ie(`/umind/documentos/${R}`)),await g())}const ee=ye(()=>R=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[R]||"badge-neutro"),V=z([]),Oe=z([]),G=z(null);async function Xe(){const R=await le.get(ie(`/umind/sesiones?agente_id=${t.agenteId}`));V.value=R.items||[]}async function Vt(R){G.value=R;const v=await le.get(ie(`/umind/historial?agente_id=${t.agenteId}&session_id=${R}`));Oe.value=v.items||[]}const Ce=z([]),de=z(!1),ue=z(null),oe=z(at());function at(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}async function Ze(){const R=await le.get(ie(`/umind/tools?agente_id=${t.agenteId}`));Ce.value=R.items||[]}function Le(){ue.value=null,oe.value=at(),de.value=!0}function jt(R){ue.value=R;let v=[];try{v=JSON.parse(R.parametros_json||"[]")||[]}catch{v=[]}oe.value={nombre:R.nombre,descripcion:R.descripcion,url:R.url,auth_header_nombre:R.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:v,activa:R.activa},de.value=!0}function Ut(){oe.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function wt(R){oe.value.parametros.splice(R,1)}async function et(){const R={agente_id:n.value,nombre:oe.value.nombre.trim(),descripcion:oe.value.descripcion,url:oe.value.url.trim(),auth_header_nombre:oe.value.auth_header_nombre,parametros:oe.value.parametros,activa:oe.value.activa};oe.value.tocarAuth&&(R.auth_header_valor=oe.value.auth_header_valor);try{ue.value?await le.put(ie(`/umind/tools/${ue.value.ID}`),R):await le.post(ie("/umind/tools"),R),de.value=!1,await Ze()}catch(v){r.value=v.message}}async function C(R){confirm(`¿Eliminar la herramienta "${R.nombre}"?`)&&(await le.del(ie(`/umind/tools/${R.ID}`)),await Ze())}const B=z([]),U=z(!1),O=z(w()),re=z(!1),d=ye(()=>{const R=new Date,v=new Date(R.getFullYear(),R.getMonth(),1).toISOString().slice(0,10),Ct=R.toISOString().slice(0,10);return ie(`/umind/reporte.xlsx?agente_id=${t.agenteId}&desde=${v}&hasta=${Ct}`)}),p=ye(()=>{var v;const R=((v=o.value)==null?void 0:v.site_key)||"TU_SITE_KEY";return`