Files
soft_usite/public/orchestrator/assets/index-Da7ZrNMD.js
T
Lizandro GuarnizoandClaude Opus 5 3ceb61c035 feat(umind): Umi, la mascota, y un solo vocabulario en toda la interfaz
La mascota. Umi sale del logo, no es un dibujo aparte: su cuerpo es la "u" del
monograma y el punto del logo pasa a ser su antena, así que símbolo y personaje
son la misma forma vista dos veces. Por eso puede estar al lado del logo sin
competirle.

Tiene estados, y no son decoración: cada pantalla vacía dice algo distinto y la
cara lo dice antes que el texto. Dormida cuando todavía no pasó nada, buscando
cuando falta cargarle información, contenta cuando no hay errores, alerta
cuando algo se rompió. Los ojos toman el color de la superficie de atrás en vez
de ser blancos, así se apoya sobre cualquier tarjeta y en modo oscuro no quedan
dos puntos flotando.

Las pantallas vacías. Había una buena y ocho que decían "Sin canales
configurados." y nada más — el usuario quedaba resolviendo solo qué significa
eso y qué hacer. Ahora las ocho explican qué va ahí y por qué importa: "No está
atendiendo en ningún lado", "Todavía no sabe nada de tu negocio".

El vocabulario. La misma cosa tenía dos nombres según la pantalla: tenant y
espacio, tool y herramienta. Un producto que se llama distinto a sí mismo en
cada lugar se siente como varios productos pegados. Queda: espacio, agente,
herramienta, fuente. Y "al AI" pasa a "a la IA", que además es el género que ya
usaba el resto del panel.

Y la barra de scroll de las pestañas, que se veía gris y gruesa sobre el
contenido: en escritorio las siete entran holgadas y no hacía falta, en móvil
siguen deslizándose pero sin la barra encima.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 19:19:01 -05:00

27 lines
154 KiB
JavaScript

(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<e.length;n++)e[n](...t)},Er=(e,t,n,s=!1)=>{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<e.length;n++){const s=e[n],o=$e(s)?Xi(s):tn(s);if(o)for(const r in o)t[r]=o[r]}return t}else if($e(e)||ve(e))return e}const Ji=/;(?![^(]*\))/g,Qi=/:([^]+)/,Yi=/\/\*[^]*?\*\//g;function Xi(e){const t={};return e.replace(Yi,"").split(Ji).forEach(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;n<e.length;n++){const s=Ae(e[n]);s&&(t+=s+" ")}else if(ve(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Zi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",el=no(Zi);function Sr(e){return!!e||e===""}function tl(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Gt(e[s],t[s]);return n}function Gt(e,t){if(e===t)return!0;let n=So(e),s=So(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=dt(e),s=dt(t),n||s)return e===t;if(n=Z(e),s=Z(t),n||s)return n&&s?tl(e,t):!1;if(n=ve(e),s=ve(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const l=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(l&&!u||!l&&u||!Gt(e[i],t[i]))return!1}}return String(e)===String(t)}function ro(e,t){return e.findIndex(n=>Gt(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;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Ve;try{return Ve=this,t()}finally{Ve=n}}}on(){++this._on===1&&(this.prevScope=Ve,Ve=this)}off(){if(this._on>0&&--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;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,s=o.length;n<s;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function sl(){return Ve}let _e;const Is=new WeakSet;class Rr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ve&&(Ve.active?Ve.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Is.has(this)&&(Is.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Pr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ko(this),$r(this);const t=_e,n=ut;_e=this,ut=!0;try{return this.fn()}finally{Or(this),_e=t,ut=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ao(t);this.deps=this.depsTail=void 0,ko(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Is.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Hs(this)&&this.run()}get dirty(){return Hs(this)}}let Ir=0,An,kn;function Pr(e,t=!1){if(e.flags|=8,t){e.next=kn,kn=e;return}e.next=An,An=e}function io(){Ir++}function lo(){if(--Ir>0)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)<t.length:ge(t,n),u=Reflect.set(t,n,s,qe(t)?t:o);return t===me(o)&&u&&(l?xt(s,r)&&It(t,"set",n,s):It(t,"add",n,s)),u}deleteProperty(t,n){const s=ge(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&It(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!dt(n)||!Mr.has(n))&&He(t,"has",n),s}ownKeys(t){return He(t,"iterate",Z(t)?"length":Zt),Reflect.ownKeys(t)}}class cl extends Vr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const dl=new jr,fl=new cl,pl=new jr(!0);const Ks=e=>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<e.length;s++)Pt(e[s],t,n);else if(bn(e)||an(e))e.forEach(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<e.length;r++)o.push(pt(e[r],t,n,s));return o}}function xs(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||be;if(t){let l=t.parent;const u=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let h=0;h<c.length;h++)if(c[h](e,u,f)===!1)return}l=l.parent}if(r){Tt(),Fn(r,null,10,[e,u,f]),Nt();return}}Il(e,n,o,s,i)}function Il(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const Je=[];let gt=-1;const un=[];let Ft=null,on=0;const Kr=Promise.resolve();let os=null;function ho(e){const t=os||Kr;return e?t.then(this?e.bind(this):e):t}function Pl(e){let t=gt+1,n=Je.length;for(;t<n;){const s=t+n>>>1,o=Je[s],r=Tn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function mo(e){if(!(e.flags&1)){const t=Tn(e),n=Je[Je.length-1];!n||!(e.flags&2)&&t>=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;t<e.length;t++)un.push(e[t]);Gr()}function Io(e,t,n=gt+1){for(;n<Je.length;n++){const s=Je[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Je.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Wr(e){if(un.length){const t=[...new Set(un)].sort((n,s)=>Tn(n)-Tn(s));if(un.length=0,Ft){for(let n=0;n<t.length;n++)Ft.push(t[n]);return}for(Ft=t,on=0;on<Ft.length;on++){const n=Ft[on];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ft=null,on=0}}const Tn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zr(e){try{for(gt=0;gt<Je.length;gt++){const t=Je[gt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Fn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;gt<Je.length;gt++){const t=Je[gt];t&&(t.flags&=-2)}gt=-1,Je.length=0,Wr(),os=null,(Je.length||un.length)&&zr()}}let je=null,Jr=null;function rs(e){const t=je;return je=e,Jr=e&&e.type.__scopeId||null,t}function qt(e,t=je,n){if(!t||e._n)return e;const s=(...o)=>{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;o<t.length;o++){let[r,i,l,u=be]=t[o];r&&(te(r)&&(r={mounted:r,updated:r}),r.deep&&Pt(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:l,modifiers:u}))}return e}function Jt(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let u=l.dir[s];u&&(Tt(),pt(u,n,8,[e.el,l,e,t]),Nt())}}function es(e,t){if(Be){let n=Be.provides;const s=Be.parent&&Be.parent.provides;s===n&&(n=Be.provides=Object.create(s)),n[e]=t}}function ct(e,t,n=!1){const s=Pa();if(s||dn){let o=dn?dn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)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;o<n.length&&s;o++)s=s[n[o]];return s}}const Dl=Symbol("_vte"),_s=e=>e.__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;c<h;c++)o[c]=t(u?f?pn(ft(e[c])):ft(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,r)}else if(ve(e))if(e[Symbol.iterator])o=Array.from(e,(l,u)=>t(l,u,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let u=0,f=l.length;u<f;u++){const c=l[u];o[u]=t(e[c],c,u,r)}}else o=[];return o}function Yl(e,t,n,s,o,r){if(n==null&&(n={}),je.ce||je.parent&&cn(je.parent)&&je.parent.ce){const f=n,c=Object.keys(f).length>0;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;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ge(e,t){return e?[...new Set([].concat(e,t))]:t}function wn(e,t){return e?Ue(Object.create(null),e,t):t}function Mo(e,t){return e?Z(e)&&Z(t)?[...new Set([...e,...t])]:Ue(Object.create(null),To(e),To(t??{})):t}function sa(e,t){if(!e)return t;if(!t)return e;const n=Ue(Object.create(null),e);for(const s in t)n[s]=Ge(e[s],t[s]);return n}function ii(){return{app:null,config:{isNativeTag:_r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let oa=0;function ra(e,t){return function(s,o=null){te(s)||(s=Ue({},s)),o!=null&&!ve(o)&&(o=null);const r=ii(),i=new WeakSet,l=[];let u=!1;const f=r.app={_uid:oa++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Va,get config(){return r.config},set config(c){},use(c,...h){return i.has(c)||(c&&te(c.install)?(i.add(c),c.install(f,...h)):te(c)&&(i.add(c),c(f,...h))),f},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),f},component(c,h){return h?(r.components[c]=h,f):r.components[c]},directive(c,h){return h?(r.directives[c]=h,f):r.directives[c]},mount(c,h,g){if(!u){const x=f._ceVNode||ke(s,o);return x.appContext=r,g===!0?g="svg":g===!1&&(g=void 0),e(x,c,g),u=!0,f._container=c,c.__vue_app__=f,Es(x.component)}},onUnmount(c){l.push(c)},unmount(){u&&(pt(l,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(c,h){return r.provides[c]=h,f},runWithContext(c){const h=dn;dn=f;try{return c()}finally{dn=h}}};return f}}let dn=null;const ia=(e,t)=>t==="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;h<c.length;h++){const g=c[h];if(ai(i,s,g)&&!ws(f,g))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?jo(s,i,f):!0:!!i;return!1}function jo(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(ai(t,e,r)&&!ws(n,r))return!0}return!1}function ai(e,t,n){const s=e[n],o=t[n];return n==="style"&&ve(s)&&ve(o)?!Gt(s,o):s!==o}function fa({vnode:e,parent:t,suspense:n},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=s,e=o),o===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ui={},ci=()=>Object.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<c.length;h++){let g=c[h];if(ws(e.emitsOptions,g))continue;const x=t[g];if(u)if(ge(r,g))x!==r[g]&&(r[g]=x,f=!0);else{const j=Ye(g);o[j]=Qs(u,l,j,x,e,!1)}else x!==r[g]&&(r[g]=x,f=!0)}}}else{fi(e,t,o,r)&&(f=!0);let c;for(const h in l)(!t||!ge(t,h)&&((c=nn(h))===h||!ge(t,c)))&&(u?n&&(n[h]!==void 0||n[c]!==void 0)&&(o[h]=Qs(u,l,h,void 0,e,!0)):delete o[h]);if(r!==l)for(const h in r)(!t||!ge(t,h))&&(delete r[h],f=!0)}f&&It(e.attrs,"set","")}function fi(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let u in t){if(Sn(u))continue;const f=t[u];let c;o&&ge(o,c=Ye(u))?!r||!r.includes(c)?n[c]=f:(l||(l={}))[c]=f:ws(e.emitsOptions,u)||(!(u in s)||f!==s[u])&&(s[u]=f,i=!0)}if(r){const u=me(n),f=l||be;for(let c=0;c<r.length;c++){const h=r[c];n[h]=Qs(o,u,h,f[h],e,!ge(f,h))}}return i}function Qs(e,t,n,s,o,r){const i=e[n];if(i!=null){const l=ge(i,"default");if(l&&s===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&te(u)){const{propsDefaults:f}=o;if(n in f)s=f[n];else{const c=Bn(o);s=f[n]=u.call(null,t),c()}}else s=u;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!l?s=!1:i[1]&&(s===""||s===nn(n))&&(s=!0))}return s}const ma=new WeakMap;function pi(e,t,n=!1){const s=n?ma:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},l=[];let u=!1;if(!te(e)){const c=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;c<r.length;c++){const h=Ye(r[c]);Uo(h)&&(i[h]=be)}else if(r)for(const c in r){const h=Ye(c);if(Uo(h)){const g=r[c],x=i[h]=Z(g)||te(g)?{type:g}:Ue({},g),j=x.type;let $=!1,W=!0;if(Z(j))for(let q=0;q<j.length;++q){const D=j[q],K=te(D)&&D.name;if(K==="Boolean"){$=!0;break}else K==="String"&&(W=!1)}else $=te(j)&&j.name==="Boolean";x[0]=$,x[1]=W,($||ge(x,"default"))&&l.push(h)}}const f=[i,l];return ve(e)&&s.set(e,f),f}function Uo(e){return e[0]!=="$"&&!Sn(e)}const xo=e=>e==="_"||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<w.length;y++)x(d,w[y]);if(S){let y=S.subTree;if(p===y||_i(y.type)&&(y.ssContent===p||y.ssFallback===p)){const L=S.vnode;ne(d,L,L.scopeId,L.slotScopeIds,S.parent)}}},F=(d,p,m,w,S,y,L,T,N=0)=>{for(let k=N;k<d.length;k++){const Q=d[k]=T?Rt(d[k]):bt(d[k]);$(null,Q,p,m,w,S,y,L,T)}},Re=(d,p,m,w,S,y,L)=>{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<ce.length;fe++){const pe=ce[fe],Ie=H[pe],Ee=J[pe];(Ee!==Ie||pe==="value")&&r(T,pe,Ie,Ee,S,m)}}N&1&&d.children!==p.children&&c(T,p.children)}else!L&&k==null&&V(T,H,J,m,S);((Y=J.onVnodeUpdated)||Q)&&tt(()=>{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<p.length;T++){const N=d[T],k=p[T],Q=N.el&&(N.type===ae||!_n(N,k)||N.shapeFlag&198)?h(N.el):m;$(N,k,Q,null,w,S,y,L,!0)}},V=(d,p,m,w,S)=>{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;J<H;J++){const Y=p[J]=N?Rt(p[J]):bt(p[J]);$(d[J],Y,m,null,S,y,L,T,N)}k>Q?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=Y<Q?p[Y].el:w;for(;k<=J;)$(null,p[k]=N?Rt(p[k]):bt(p[k]),m,ce,S,y,L,T,N),k++}}else if(k>J)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;k++)zt[k]=0;for(k=Y;k<=H;k++){const Me=d[k];if(Ie>=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<Q?Kn.el||xi(Kn):w;zt[k]===0?$(null,rt,m,Gn,S,y,L,T,N):Ke&&(pe<0||k!==qn[pe]?Ze(rt,m,Gn,2):pe--)}}},Ze=(d,p,m,w,S=null)=>{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;H<N.length;H++)Ze(N[H],p,m,w);s(d.anchor,p,m);return}if(L===ts){K(d,p,m);return}if(w!==2&&k&1&&T)if(w===0)T.persisted&&!y[Os]?s(y,p,m):(T.beforeEnter(y),s(y,p,m),tt(()=>T.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<d.length;L++)Le(d[L],p,m,w,S)},C=d=>{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<s.length;r++){const i=s[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=Rt(o[r]),l.el=i.el),!n&&l.patchFlag!==-2&&vi(i,l)),l.type===Cs&&(l.patchFlag===-1&&(l=o[r]=Rt(l)),l.el=i.el),l.type===yt&&!l.el&&(l.el=i.el)}}function wa(e){const t=e.slice(),n=[0];let s,o,r,i,l;const u=e.length;for(s=0;s<u;s++){const f=e[s];if(f!==0){if(o=n[n.length-1],e[o]<f){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<f?r=l+1:i=l;f<e[n[r]]&&(r>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;t<e.length;t++)e[t].flags|=8}function xi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?xi(t.subTree):null}const _i=e=>e.__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;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=Ae([t.class,s.class]));else if(o==="style")t.style=tn([t.style,s.style]);else if(ds(o)){const r=t[o],i=s[o];i&&r!==i&&!(Z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!fs(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function mt(e,t,n,s=null){pt(e,t,7,[n,s])}const ka=ii();let Ra=0;function Ia(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||ka,r={uid:Ra++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new nl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:pi(s,o),emitsOptions:li(s,o),emit:null,emitted:null,propsDefaults:be,inheritAttrs:s.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=la.bind(null,r),e.ce&&e.ce(r),r}let Be=null;const Pa=()=>Be||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"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`: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;o<Wo.length;o++){const r=Wo[o]+s;if(r in e)return Ds[t]=r}return t}function za(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&$e(s)&&n===s}const zo="http://www.w3.org/1999/xlink";function Jo(e,t,n,s,o,r=el(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zo,t.slice(6,t.length)):e.setAttributeNS(zo,t,n):n==null||r&&!Sr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":dt(n)?String(n):n)}function Qo(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ki(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(l!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Sr(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(o||t)}function $t(e,t,n,s){e.addEventListener(t,n,s)}function Ja(e,t,n,s){e.removeEventListener(t,n,s)}const Yo=Symbol("_vei");function Qa(e,t,n,s,o=null){const r=e[Yo]||(e[Yo]={}),i=r[t];if(s&&i)i.value=s;else{const[l,u]=Za(t);if(s){const f=r[t]=nu(s,o);$t(e,l,f,u)}else i&&(Ja(e,l,i,u),r[t]=void 0)}}const Ya=/(Once|Passive|Capture)$/,Xa=/^on:?(?:Once|Passive|Capture)$/;function Za(e){let t,n;for(;(n=e.match(Ya))&&!Xa.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):nn(e.slice(2)),t]}let Ms=0;const eu=Promise.resolve(),tu=()=>Ms||(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;u<i.length&&!s._stopped;u++){const f=i[u];f&&pt(f,t,5,l)}}else pt(o,t,5,[s])};return n.value=e,n.attached=tu(),n}const Xo=e=>e.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;o<r;o++){const i=e.options[o],l=mn(i);if(n)if(s){const u=typeof l;u==="string"||u==="number"?i.selected=t.some(f=>String(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<t.length;i++){const l=uu[t[i]];if(l&&l(o,t))return}return e(o,...r)}))},cu=Ue({patchProp:su},La);let nr;function du(){return nr||(nr=xa(cu))}const fu=((...e)=>{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;i<s.length;i++)if(l=s[i],l!==".")if(l==="..")r>1&&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;s<n.length;++s){const o=n[s].replace($i," "),r=o.indexOf("="),i=Un(r<0?o:o.slice(0,r)),l=r<0?null:Un(o.slice(r+1));if(i in t){let u=t[i];ht(u)||(u=t[i]=[u]),u.push(l)}else t[i]=l}return t}function lr(e){let t="";for(let n in e){const s=e[n];if(n=Au(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ht(s)?s.map(o=>o&&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;i<r;i++){const l=t.matched[i];l&&(e.matched.find(f=>gn(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(;l<e.length;){if(u=e[l++],u==="\\"&&n!==Ne.ParamRegExp){s=n,n=Ne.EscapeNext;continue}switch(n){case Ne.Static:u==="/"?(f&&h(),i()):u===":"?(h(),n=Ne.Param):g();break;case Ne.EscapeNext:g(),n=s;break;case Ne.Param:u==="("?n=Ne.ParamRegExp:ec.test(u)?g():(h(),n=Ne.Static,u!=="*"&&u!=="?"&&u!=="+"&&l--);break;case Ne.ParamRegExp:u===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+u:n=Ne.ParamRegExpEnd:c+=u;break;case Ne.ParamRegExpEnd:h(),n=Ne.Static,u!=="*"&&u!=="?"&&u!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===Ne.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),h(),i(),o}const cr="[^/]+?",nc={sensitive:!1,strict:!1,start:!0,end:!0};var We=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(We||{});const sc=/[.+*?^${}()[\]/\\]/g;function oc(e,t){const n=he({},nc,t),s=[];let o=n.start?"^":"";const r=[];for(const f of e){const c=f.length?[]:[We.Root];n.strict&&!f.length&&(o+="/");for(let h=0;h<f.length;h++){const g=f[h];let x=We.Segment+(n.sensitive?We.BonusCaseSensitive:0);if(g.type===Xt.Static)h||(o+="/"),o+=g.value.replace(sc,"\\$&"),x+=We.Static;else if(g.type===Xt.Param){const{value:j,repeatable:$,optional:W,regexp:q}=g;r.push({name:j,repeatable:$,optional:W});const D=q||cr;if(D!==cr){x+=We.BonusCustomRegExp;try{`${D}`}catch(I){throw new Error(`Invalid custom RegExp for param "${j}" (${D}): `+I.message)}}let K=$?`((?:${D})(?:/(?:${D}))*)`:`(${D})`;h||(K=W&&f.length<2?`(?:/${K})`:"/"+K),W&&(K+="?"),o+=K,x+=We.Dynamic,W&&(x+=We.BonusOptional),$&&(x+=We.BonusRepeatable),D===".*"&&(x+=We.BonusWildcard)}c.push(x)}s.push(c)}if(n.strict&&n.end){const f=s.length-1;s[f][s[f].length-1]+=We.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(f){const c=f.match(i),h={};if(!c)return null;for(let g=1;g<c.length;g++){const x=c[g]||"",j=r[g-1];h[j.name]=x&&j.repeatable?x.split("/"):x}return h}function u(f){let c="",h=!1;for(const g of e){(!h||!c.endsWith("/"))&&(c+="/"),h=!1;for(const x of g)if(x.type===Xt.Static)c+=x.value;else if(x.type===Xt.Param){const{value:j,repeatable:$,optional:W}=x,q=j in f?f[j]:"";if(ht(q)&&!$)throw new Error(`Provided param "${j}" is an array but it is not repeatable (* or + modifiers)`);const D=ht(q)?q.join("/"):q;if(!D)if(W)g.length<2&&(c.endsWith("/")?c=c.slice(0,-1):h=!0);else throw new Error(`Missing required param "${j}"`);c+=D}}return c||"/"}return{re:i,score:s,keys:r,parse:l,stringify:u}}function rc(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===We.Static+We.Segment?-1:1:e.length>t.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(;n<s.length&&n<o.length;){const r=rc(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(dr(s))return 1;if(dr(o))return-1}return o.length-s.length}function dr(e){const t=e[e.length-1];return e.length>0&&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<M.length;ne++)r(M[ne],D,x&&x.children[ne])}x=x||D}return K?()=>{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('<h1 class="text-lg font-medium text-texto">Todavía no tenés un asistente activo</h1><p class="text-sm text-tenue mt-2"> 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. </p><a class="btn-primary inline-block mt-5" href="mailto:soporte@u-site.app?subject=Quiero%20activar%20uMind">Quiero activarlo</a><p class="text-xs text-tenue mt-4"><a href="/portal/dashboard" class="underline">Volver al portal</a></p>',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('<div class="flex items-center gap-3"><div class="w-10 h-10 rounded-xl bg-elevado"></div><div class="flex-1"><div class="h-3.5 w-28 rounded bg-elevado"></div><div class="h-2.5 w-16 rounded bg-elevado mt-2"></div></div></div><div class="h-2.5 w-full rounded bg-elevado mt-4"></div>',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`<script src="${window.location.origin}/widget/umind.js" data-site="${R}" defer><\/script>`});async function m(){try{await navigator.clipboard.writeText(p.value),re.value=!0,setTimeout(()=>re.value=!1,2e3)}catch{r.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function w(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1,usar_archivos_docs:!1}}async function S(){const R=await le.get(ie(`/umind/canales?agente_id=${t.agenteId}`));B.value=R.items||[]}function y(){O.value=w(),U.value=!0}async function L(){const R=O.value.tipo==="telegram"?{bot_token:O.value.bot_token}:{phone_number_id:O.value.phone_number_id,access_token:O.value.access_token,app_secret:O.value.app_secret,verify_token:O.value.verify_token};try{await le.post(ie("/umind/canales"),{agente_id:n.value,tipo:O.value.tipo,credenciales:R,activo:!0,usar_whisper_audio:O.value.usar_whisper_audio,usar_ocr_imagenes:O.value.usar_ocr_imagenes,usar_archivos_docs:O.value.usar_archivos_docs}),U.value=!1,await S()}catch(v){r.value=v.message}}async function T(R,v){await le.put(ie(`/umind/canales/${R.ID}`),{activo:R.activo,credenciales:{},usar_whisper_audio:R.usar_whisper_audio,usar_ocr_imagenes:R.usar_ocr_imagenes,usar_archivos_docs:R.usar_archivos_docs,...v}),await S()}const N=R=>T(R,{activo:!R.activo}),k=R=>T(R,{usar_whisper_audio:!R.usar_whisper_audio}),Q=R=>T(R,{usar_ocr_imagenes:!R.usar_ocr_imagenes}),H=R=>T(R,{usar_archivos_docs:!R.usar_archivos_docs});async function J(R){confirm(`¿Eliminar el canal ${R.tipo}?`)&&(await le.del(ie(`/umind/canales/${R.ID}`)),await S())}const Y=z([]);async function ce(){const R=await le.get(ie(`/umind/conexiones?agente_id=${t.agenteId}`));Y.value=R.items||[]}function fe(R){window.location.href=ie(`/umind/conexiones/conectar?agente_id=${n.value}&proveedor=${R}`)}async function pe(R){confirm(`¿Desconectar la cuenta ${R.email||R.proveedor}?`)&&(await le.del(ie(`/umind/conexiones/${R.ID}`)),await ce())}const Ie=`staff-preview-${Math.random().toString(36).slice(2)}`,Ee=z([]),Ke=z(""),Fe=z(!1);async function zt(){const R=Ke.value.trim();if(!(!R||Fe.value)){Ke.value="",Ee.value.push({role:"user",content:R}),Fe.value=!0;try{const v=await le.post(ie("/umind/chat"),{agente_id:n.value,session_id:Ie,mensaje:R});Ee.value.push({role:"assistant",content:v.respuesta})}catch(v){Ee.value.push({role:"assistant",content:`⚠️ ${v.message}`})}finally{Fe.value=!1}}}const qn=ye(()=>Qe.esPortal?[["conversaciones","Conversaciones"],["chat","Probar"],["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["auditoria","Auditoría"]]:[["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["chat","Chat de prueba"],["conversaciones","Conversaciones"],["auditoria","Auditoría"]]),Me=z([]);async function rt(){const R=await le.get(ie(`/umind/eventos?agente_id=${t.agenteId}`));Me.value=R.items||[]}const Kn=ye(()=>R=>({error:"badge-error",warn:"badge-alerta"})[R]||"badge-neutro");function Gn(R){try{return new Date(R).toLocaleString()}catch{return R}}return Kt(()=>[t.tenantId,t.agenteId],async()=>{r.value="",o.value=null,l.value=[],V.value=[],Oe.value=[],G.value=null,Ce.value=[],B.value=[],Y.value=[],Me.value=[];try{await Promise.all([h(),g(),Xe(),Ze(),S(),ce(),rt()])}catch(R){r.value=R.message}},{immediate:!0}),(R,v)=>{const Ct=Hn("router-link");return _(),E("div",null,[ke(Ct,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:qt(()=>[...v[28]||(v[28]=[we("← Agentes",-1)])]),_:1},8,["to"]),o.value?(_(),E("div",ff,[a("div",pf,[a("h1",hf,P(o.value.nombre),1),a("p",mf,[v[29]||(v[29]=we(" site_key: ",-1)),a("code",gf,P(o.value.site_key),1)])]),a("a",{href:d.value,class:"btn-ghost shrink-0",title:"Conversaciones y consumo del mes en Excel"}," ⬇ Reporte del mes ",8,vf)])):X("",!0),r.value?(_(),E("p",bf,P(r.value),1)):X("",!0),a("div",xf,[(_(!0),E(ae,null,Te(qn.value,([b,Se])=>(_(),E("button",{key:b,class:Ae(["px-3 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",i.value===b?"bg-brand text-white font-medium":"bg-white dark:bg-gray-900 text-gray-600 dark:text-gray-400 border border-borde hover:border-brand/50"]),onClick:it=>i.value=b},P(Se),11,_f))),128))]),i.value==="conocimiento"?(_(),E("div",yf,[a("div",wf,[a("div",Cf,[(_(),E(ae,null,Te([["texto","✍️ Escribir"],["archivo","📄 Subir archivo"],["url","🌐 Sitio web"]],([b,Se])=>a("button",{key:b,class:Ae(["px-3 py-1.5 rounded-lg text-sm",x.value===b?"bg-brand text-white font-medium":"text-tenue hover:text-texto"]),onClick:it=>x.value=b},P(Se),11,Ef)),64))]),x.value==="texto"?(_(),E("form",{key:0,class:"space-y-2",onSubmit:ze(K,["prevent"])},[se(a("input",{"onUpdate:modelValue":v[0]||(v[0]=b=>$.value=b),placeholder:"Título (ej: Horarios y zonas de entrega)",class:"input"},null,512),[[xe,$.value]]),se(a("textarea",{"onUpdate:modelValue":v[1]||(v[1]=b=>W.value=b),rows:"5",required:"",placeholder:"Atendemos de lunes a viernes de 9 a 18. No hacemos envíos fuera de la ciudad. La garantía es de 6 meses y cubre…",class:"input font-normal"},null,512),[[xe,W.value]]),a("div",Sf,[v[30]||(v[30]=a("p",{class:"text-xs text-tenue"},"Lo que te preguntan todos los días y no está en tu web.",-1)),a("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},P(c.value?"Guardando…":"Guardar"),9,Af)])],32)):x.value==="archivo"?(_(),E("form",{key:1,class:"space-y-2",onSubmit:ze(I,["prevent"])},[a("input",{ref_key:"archivoRef",ref:q,type:"file",accept:".pdf,.docx,.txt,.md,.csv,.html,image/*",class:"text-sm text-texto"},null,512),a("div",kf,[v[31]||(v[31]=a("p",{class:"text-xs text-tenue"},"PDF, Word, texto o una foto. Ej: tu lista de precios.",-1)),a("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},P(c.value?"Leyendo…":"Subir"),9,Rf)])],32)):(_(),E("form",{key:2,class:"space-y-2",onSubmit:ze(D,["prevent"])},[a("div",If,[se(a("input",{"onUpdate:modelValue":v[2]||(v[2]=b=>u.value=b),type:"url",placeholder:"https://ejemplo.com",required:"",class:"input flex-1"},null,512),[[xe,u.value]]),se(a("input",{"onUpdate:modelValue":v[3]||(v[3]=b=>f.value=b),type:"number",min:"1",max:"200",class:"input w-24",title:"Máximo de páginas a leer"},null,512),[[xe,f.value]])]),a("div",Pf,[a("label",$f,[se(a("input",{"onUpdate:modelValue":v[4]||(v[4]=b=>j.value=b),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[kt,j.value]]),v[32]||(v[32]=we(" Releer el sitio cada semana ",-1))]),a("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},P(c.value?"Leyendo…":"Leer sitio"),9,Of)])],32))]),a("div",Tf,[l.value.length===0?(_(),nt(Bt,{key:0,estado:"buscando",titulo:"Todavía no sabe nada de tu negocio",detalle:"Sin información cargada va a contestar que no sabe. Empezá por escribir tus horarios y lo que te preguntan todos los días — es lo más rápido y lo que más se nota."})):X("",!0),(_(!0),E(ae,null,Te(l.value,b=>(_(),E("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("div",Nf,P(b.origen),1),a("div",Df,[a("span",{class:Ae(["px-1.5 py-0.5 rounded",ee.value(b.estado)])},P(b.estado),3),b.tipo?(_(),E("span",Mf," · "+P({url:"sitio",archivo:"archivo",texto:"nota"}[b.tipo]||b.tipo),1)):X("",!0),b.total_chunks?(_(),E("span",Vf," · "+P(b.total_chunks)+" fragmentos",1)):X("",!0),a("span",{class:Ae(F(b)?"text-amber-600 dark:text-amber-400 font-medium":"")}," · leído "+P(ne(b.procesado_at)),3),b.auto_actualizar?(_(),E("span",jf," · se actualiza sola")):X("",!0),b.error?(_(),E("span",Uf," · "+P(b.error),1)):X("",!0)])]),a("div",Lf,[b.tipo==="url"?(_(),E("button",{key:0,class:"text-xs text-tenue hover:text-texto",title:b.auto_actualizar?"Dejar de releer sola":"Releer el sitio cada semana",onClick:Se=>M(b)},P(b.auto_actualizar?"🔁 auto":"↻ manual"),9,Ff)):X("",!0),a("button",{class:"text-sm text-brand hover:underline disabled:opacity-40",disabled:b.estado==="procesando",onClick:Se=>A(b)},"Actualizar",8,Hf),a("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:Se=>Re(b.ID)},"Eliminar",8,Bf)])]))),128))])])):i.value==="herramientas"?(_(),E("div",qf,[a("div",{class:"flex justify-between items-center mb-4"},[v[33]||(v[33]=a("p",{class:"label"},"Máximo 10 herramientas activas por agente.",-1)),a("button",{class:"btn-primary",onClick:Le}," + Nueva herramienta ")]),a("div",Kf,[Ce.value.length===0?(_(),nt(Bt,{key:0,titulo:"Sin herramientas conectadas",detalle:"Las herramientas le dejan consultar tus sistemas mientras conversa: stock, estado de un pedido, disponibilidad de turnos. Sin ninguna, responde solo con lo que tiene cargado."})):X("",!0),(_(!0),E(ae,null,Te(Ce.value,b=>(_(),E("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("div",Gf,P(b.nombre),1),a("div",Wf,P(b.descripcion),1),a("div",zf,[we(P(b.url)+" ",1),b.auth_configurado?(_(),E("span",Jf,"· auth configurada")):X("",!0),b.activa?X("",!0):(_(),E("span",Qf,"· inactiva"))])]),a("div",Yf,[a("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:Se=>jt(b)},"Editar",8,Xf),a("button",{class:"text-red-500 hover:text-red-700",onClick:Se=>C(b)},"Eliminar",8,Zf)])]))),128))]),de.value?(_(),E("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:v[13]||(v[13]=ze(b=>de.value=!1,["self"]))},[a("div",ep,[a("h2",tp,P(ue.value?"Editar herramienta":"Nueva herramienta"),1),a("form",{class:"space-y-3",onSubmit:ze(et,["prevent"])},[a("div",null,[v[34]||(v[34]=a("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),se(a("input",{"onUpdate:modelValue":v[5]||(v[5]=b=>oe.value.nombre=b),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[xe,oe.value.nombre]])]),a("div",null,[v[35]||(v[35]=a("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),se(a("textarea",{"onUpdate:modelValue":v[6]||(v[6]=b=>oe.value.descripcion=b),rows:"2",required:"",class:"input"},null,512),[[xe,oe.value.descripcion]])]),a("div",null,[v[36]||(v[36]=a("label",{class:"label"},"URL del webhook (https)",-1)),se(a("input",{"onUpdate:modelValue":v[7]||(v[7]=b=>oe.value.url=b),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[xe,oe.value.url]])]),a("div",np,[a("div",{class:"flex items-center justify-between"},[v[37]||(v[37]=a("label",{class:"label"},"Parámetros que completa el modelo",-1)),a("button",{type:"button",class:"text-xs text-brand",onClick:Ut},"+ agregar")]),(_(!0),E(ae,null,Te(oe.value.parametros,(b,Se)=>(_(),E("div",{key:Se,class:"flex gap-2 items-center"},[se(a("input",{"onUpdate:modelValue":it=>b.nombre=it,placeholder:"nombre",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs font-mono"},null,8,sp),[[xe,b.nombre]]),se(a("select",{"onUpdate:modelValue":it=>b.tipo=it,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...v[38]||(v[38]=[a("option",{value:"string"},"string",-1),a("option",{value:"number"},"number",-1),a("option",{value:"boolean"},"boolean",-1)])],8,op),[[jn,b.tipo]]),se(a("input",{"onUpdate:modelValue":it=>b.descripcion=it,placeholder:"descripción",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},null,8,rp),[[xe,b.descripcion]]),a("label",ip,[se(a("input",{"onUpdate:modelValue":it=>b.requerido=it,type:"checkbox"},null,8,lp),[[kt,b.requerido]]),v[39]||(v[39]=we(" req. ",-1))]),a("button",{type:"button",class:"text-red-400 text-xs",onClick:it=>wt(Se)},"✕",8,ap)]))),128)),oe.value.parametros.length===0?(_(),E("p",up,"Sin parámetros.")):X("",!0)]),a("div",cp,[v[40]||(v[40]=a("label",{class:"label"},"Autenticación saliente (opcional)",-1)),se(a("input",{"onUpdate:modelValue":v[8]||(v[8]=b=>oe.value.auth_header_nombre=b),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[xe,oe.value.auth_header_nombre]]),a("label",dp,[se(a("input",{"onUpdate:modelValue":v[9]||(v[9]=b=>oe.value.tocarAuth=b),type:"checkbox"},null,512),[[kt,oe.value.tocarAuth]]),we(" "+P(ue.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),oe.value.tocarAuth?se((_(),E("input",{key:0,"onUpdate:modelValue":v[10]||(v[10]=b=>oe.value.auth_header_valor=b),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[xe,oe.value.auth_header_valor]]):X("",!0)]),a("label",fp,[se(a("input",{"onUpdate:modelValue":v[11]||(v[11]=b=>oe.value.activa=b),type:"checkbox"},null,512),[[kt,oe.value.activa]]),v[41]||(v[41]=we(" Activa ",-1))]),a("div",pp,[a("button",{type:"button",class:"btn-ghost",onClick:v[12]||(v[12]=b=>de.value=!1)},"Cancelar"),v[42]||(v[42]=a("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):X("",!0)])):i.value==="canales"?(_(),E("div",hp,[a("div",mp,[a("div",gp,[v[43]||(v[43]=a("div",null,[a("span",{class:"font-medium text-texto"},"Web (widget)"),a("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),a("button",{class:Ae(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",re.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:m},P(re.value?"✓ Copiado":"Copiar código"),3)]),v[44]||(v[44]=a("p",{class:"label mb-2"},[we(" Pegá esto antes de "),a("code",{class:"bg-elevado px-1 rounded"},"</body>"),we(" en las páginas de tu sitio. ")],-1)),a("pre",vp,[a("code",null,P(p.value),1)])]),a("div",{class:"flex justify-end mb-4"},[a("button",{class:"btn-primary",onClick:y}," + Nuevo canal ")]),a("div",bp,[B.value.length===0?(_(),nt(Bt,{key:0,titulo:"No está atendiendo en ningún lado",detalle:"Conectá WhatsApp o Telegram para que empiece a responderle a tus clientes. El widget de tu web funciona aparte, con la clave de sitio de arriba."})):X("",!0),(_(!0),E(ae,null,Te(B.value,b=>(_(),E("div",{key:b.ID,class:"p-4"},[a("div",xp,[a("div",null,[a("span",_p,P(b.tipo),1),a("span",{class:Ae(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},P(b.activo?"activo":"inactivo"),3)]),a("div",yp,[a("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:Se=>N(b)},P(b.activo?"Desactivar":"Activar"),9,wp),a("button",{class:"text-red-500 hover:text-red-700",onClick:Se=>J(b)},"Eliminar",8,Cp)])]),a("div",Ep,[a("label",Sp,[a("input",{type:"checkbox",checked:b.usar_whisper_audio,onChange:Se=>k(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Ap),v[45]||(v[45]=we(" Transcribir audios (Whisper) ",-1))]),a("label",kp,[a("input",{type:"checkbox",checked:b.usar_ocr_imagenes,onChange:Se=>Q(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Rp),v[46]||(v[46]=we(" Leer texto de imágenes (OCR) ",-1))]),a("label",Ip,[a("input",{type:"checkbox",checked:b.usar_archivos_docs,onChange:Se=>H(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Pp),v[47]||(v[47]=we(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),a("p",$p,[v[48]||(v[48]=we(" Webhook: ",-1)),a("code",Op,P(b.webhook_url),1)]),b.tipo==="whatsapp"?(_(),E("p",Tp,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):X("",!0),b.ultimo_error?(_(),E("p",Np,P(b.ultimo_error),1)):X("",!0)]))),128))]),U.value?(_(),E("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:v[24]||(v[24]=ze(b=>U.value=!1,["self"]))},[a("div",Dp,[v[60]||(v[60]=a("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),a("form",{class:"space-y-3",onSubmit:ze(L,["prevent"])},[a("div",null,[v[50]||(v[50]=a("label",{class:"label"},"Tipo",-1)),se(a("select",{"onUpdate:modelValue":v[14]||(v[14]=b=>O.value.tipo=b),class:"input"},[...v[49]||(v[49]=[a("option",{value:"telegram"},"Telegram",-1),a("option",{value:"whatsapp"},"WhatsApp Business",-1)])],512),[[jn,O.value.tipo]])]),O.value.tipo==="telegram"?(_(),E("div",Mp,[v[51]||(v[51]=a("label",{class:"label"},"Bot token (de @BotFather)",-1)),se(a("input",{"onUpdate:modelValue":v[15]||(v[15]=b=>O.value.bot_token=b),type:"password",required:"",class:"input"},null,512),[[xe,O.value.bot_token]])])):(_(),E(ae,{key:1},[a("div",null,[v[52]||(v[52]=a("label",{class:"label"},"Phone Number ID",-1)),se(a("input",{"onUpdate:modelValue":v[16]||(v[16]=b=>O.value.phone_number_id=b),required:"",class:"input"},null,512),[[xe,O.value.phone_number_id]])]),a("div",null,[v[53]||(v[53]=a("label",{class:"label"},"Access Token",-1)),se(a("input",{"onUpdate:modelValue":v[17]||(v[17]=b=>O.value.access_token=b),type:"password",required:"",class:"input"},null,512),[[xe,O.value.access_token]])]),a("div",null,[v[54]||(v[54]=a("label",{class:"label"},"App Secret",-1)),se(a("input",{"onUpdate:modelValue":v[18]||(v[18]=b=>O.value.app_secret=b),type:"password",required:"",class:"input"},null,512),[[xe,O.value.app_secret]])]),a("div",null,[v[55]||(v[55]=a("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),se(a("input",{"onUpdate:modelValue":v[19]||(v[19]=b=>O.value.verify_token=b),required:"",class:"input"},null,512),[[xe,O.value.verify_token]])])],64)),a("div",Vp,[a("label",jp,[se(a("input",{type:"checkbox","onUpdate:modelValue":v[20]||(v[20]=b=>O.value.usar_whisper_audio=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[kt,O.value.usar_whisper_audio]]),v[56]||(v[56]=we(" Transcribir audios con Whisper ",-1))]),a("label",Up,[se(a("input",{type:"checkbox","onUpdate:modelValue":v[21]||(v[21]=b=>O.value.usar_ocr_imagenes=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[kt,O.value.usar_ocr_imagenes]]),v[57]||(v[57]=we(" Leer texto de imágenes con OCR ",-1))]),a("label",Lp,[se(a("input",{type:"checkbox","onUpdate:modelValue":v[22]||(v[22]=b=>O.value.usar_archivos_docs=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[kt,O.value.usar_archivos_docs]]),v[58]||(v[58]=we(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),a("div",Fp,[a("button",{type:"button",class:"btn-ghost",onClick:v[23]||(v[23]=b=>U.value=!1)},"Cancelar"),v[59]||(v[59]=a("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):X("",!0)])):i.value==="conexiones"?(_(),E("div",Hp,[v[61]||(v[61]=a("p",{class:"label mb-4"}," Conectá una cuenta de correo para que este agente pueda enviar y leer correo en su nombre. Se soporta una cuenta activa a la vez. ",-1)),a("div",Bp,[a("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:v[25]||(v[25]=b=>fe("google"))}," Conectar Google "),a("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:v[26]||(v[26]=b=>fe("microsoft"))}," Conectar Outlook ")]),a("div",qp,[Y.value.length===0?(_(),nt(Bt,{key:0,titulo:"Sin cuentas conectadas",detalle:"Conectando una cuenta de correo, el agente puede leer y responder mensajes con tu dirección."})):X("",!0),(_(!0),E(ae,null,Te(Y.value,b=>(_(),E("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("span",Kp,P(b.proveedor),1),a("span",Gp,P(b.email),1),a("span",{class:Ae(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},P(b.activo?"activa":"inactiva"),3)]),a("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:Se=>pe(b)},"Desconectar",8,Wp)]))),128))])])):i.value==="chat"?(_(),E("div",zp,[a("div",Jp,[Ee.value.length===0?(_(),E("p",Qp," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA, las mismas herramientas y la misma base de conocimiento. ")):X("",!0),(_(!0),E(ae,null,Te(Ee.value,(b,Se)=>(_(),E("div",{key:Se,class:Ae(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",b.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},P(b.content),3))),128)),Fe.value?(_(),E("p",Yp,"Pensando...")):X("",!0)]),a("form",{class:"flex gap-2",onSubmit:ze(zt,["prevent"])},[se(a("input",{"onUpdate:modelValue":v[27]||(v[27]=b=>Ke.value=b),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[xe,Ke.value]]),a("button",{type:"submit",disabled:Fe.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,Xp)],32)])):i.value==="conversaciones"?(_(),E("div",Zp,[a("div",eh,[V.value.length===0?(_(),nt(Bt,{key:0,titulo:"Nadie escribió todavía",detalle:"Acá vas a ver todo lo que le preguntan y qué contestó."})):X("",!0),(_(!0),E(ae,null,Te(V.value,b=>(_(),E("button",{key:b.session_id,class:Ae(["w-full text-left p-3 hover:bg-elevado text-sm",G.value===b.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:Se=>Vt(b.session_id)},[a("div",nh,P(b.content),1),a("div",sh,P(b.session_id),1)],10,th))),128))]),a("div",oh,[G.value?X("",!0):(_(),E("p",rh,"Elegí una conversación de la izquierda.")),(_(!0),E(ae,null,Te(Oe.value,b=>(_(),E("div",{key:b.ID,class:Ae(["max-w-[80%] px-3 py-2 rounded-lg text-sm",b.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},P(b.content),3))),128))])])):(_(),E("div",ih,[v[62]||(v[62]=a("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar a la IA, a una herramienta, al correo o a los canales. Últimos 100. ",-1)),a("div",lh,[Me.value.length===0?(_(),nt(Bt,{key:0,estado:"contenta",titulo:"Ningún problema registrado",detalle:"Acá aparecen los errores: una herramienta que no responde, una fuente que no se pudo leer. Que esté vacío es buena señal."})):X("",!0),(_(!0),E(ae,null,Te(Me.value,b=>(_(),E("details",{key:b.ID,class:"p-3"},[a("summary",ah,[a("span",{class:Ae(["px-1.5 py-0.5 rounded text-xs shrink-0",Kn.value(b.nivel)])},P(b.nivel),3),a("span",uh,P(b.origen),1),a("span",ch,P(b.mensaje),1),a("span",dh,P(Gn(b.CreatedAt)),1)]),b.detalle?(_(),E("pre",fh,P(b.detalle),1)):X("",!0)]))),128))])]))])}}},hh={class:"flex items-start justify-between gap-4 mb-6"},mh={class:"card p-4 mb-4"},gh={class:"flex flex-wrap items-end gap-3"},vh={class:"flex gap-1 ml-auto"},bh={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},xh={key:1,class:"text-sm text-tenue"},_h={class:"grid gap-3 sm:grid-cols-3 mb-4"},yh={class:"card p-4"},wh={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Ch={class:"card p-4"},Eh={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Sh={class:"card p-4"},Ah={class:"text-lg font-semibold text-texto mt-1"},kh={key:0,class:"text-[11px] text-tenue mt-0.5"},Rh={key:0,class:"card p-4 mb-4"},Ih={class:"flex items-center justify-between text-sm mb-2"},Ph={class:"text-tenue tabular-nums"},$h={class:"h-2 rounded-full bg-elevado overflow-hidden"},Oh={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Th={class:"card divide-y divide-borde mb-4"},Nh={class:"text-lg"},Dh={class:"min-w-0 flex-1"},Mh={class:"text-sm text-texto"},Vh={class:"text-xs text-tenue tabular-nums"},jh={class:"text-sm font-medium text-texto tabular-nums"},Uh={key:1,class:"card p-4"},Lh={class:"flex items-end gap-1 h-28"},Fh=["title"],Hh={class:"flex justify-between text-[11px] text-tenue mt-2"},Bh={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=z(!0),s=z(""),o=z(null),r=new Date,i=z(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),l=z(r.toISOString().slice(0,10)),u={ia:{nombre:"Inteligencia artificial",icono:"🧠",color:"#8eb02f"},ocr:{nombre:"Lectura de imágenes",icono:"🖼️",color:"#2f7fb0"},whisper:{nombre:"Transcripción de audio",icono:"🎙️",color:"#b0752f"}},f=I=>u[I]||{nombre:I,icono:"•",color:"#94a3b8"};async function c(){n.value=!0,s.value="";try{o.value=await le.get(ie(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${l.value}`))}catch(I){s.value=I.message}finally{n.value=!1}}const h=ye(()=>{var I,A;return((A=(I=o.value)==null?void 0:I.plan)==null?void 0:A.moneda)||"COP"}),g=ye(()=>{var I;return((I=o.value)==null?void 0:I.resumen)||[]}),x=ye(()=>{var I;return((I=o.value)==null?void 0:I.total_periodo)||0}),j=ye(()=>{var I,A;return((A=(I=o.value)==null?void 0:I.plan)==null?void 0:A.tope_consumo_mensual)||0}),$=ye(()=>j.value?Math.min(100,x.value/j.value*100):0);function W(I){return`${h.value} ${Number(I||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function q(I){return Number(I||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const D=ye(()=>{var ne;const I=new Map;for(const F of((ne=o.value)==null?void 0:ne.detalle)||[]){const Re=String(F.CreatedAt).slice(0,10);I.set(Re,(I.get(Re)||0)+(F.costo||0))}const A=[...I.entries()].sort((F,Re)=>F[0].localeCompare(Re[0])),M=Math.max(...A.map(F=>F[1]),0);return{dias:A,max:M}});function K(I){const A=new Date,M=new Date;M.setDate(M.getDate()-I),i.value=M.toISOString().slice(0,10),l.value=A.toISOString().slice(0,10),c()}return Kt(()=>t.id,c,{immediate:!0}),(I,A)=>{var ne;const M=Hn("router-link");return _(),E("div",null,[a("div",hh,[A[6]||(A[6]=a("div",null,[a("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),a("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),ke(M,{to:`/tenants/${e.id}`,class:"btn-ghost"},{default:qt(()=>[...A[5]||(A[5]=[we("← Agentes",-1)])]),_:1},8,["to"])]),a("div",mh,[a("div",gh,[a("div",null,[A[7]||(A[7]=a("label",{class:"label"},"Desde",-1)),se(a("input",{"onUpdate:modelValue":A[0]||(A[0]=F=>i.value=F),type:"date",class:"input !w-auto"},null,512),[[xe,i.value]])]),a("div",null,[A[8]||(A[8]=a("label",{class:"label"},"Hasta",-1)),se(a("input",{"onUpdate:modelValue":A[1]||(A[1]=F=>l.value=F),type:"date",class:"input !w-auto"},null,512),[[xe,l.value]])]),a("button",{class:"btn-primary",onClick:c},"Aplicar"),a("div",vh,[a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[2]||(A[2]=F=>K(6))},"7 días"),a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[3]||(A[3]=F=>K(29))},"30 días"),a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[4]||(A[4]=F=>K(89))},"90 días")])])]),s.value?(_(),E("p",bh,P(s.value),1)):X("",!0),n.value?(_(),E("p",xh,"Cargando…")):o.value?(_(),E(ae,{key:2},[a("div",_h,[a("div",yh,[A[9]||(A[9]=a("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),a("p",wh,P(W(x.value)),1)]),a("div",Ch,[A[10]||(A[10]=a("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),a("p",Eh,P(W(o.value.pendiente_facturar)),1),A[11]||(A[11]=a("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),a("div",Sh,[A[12]||(A[12]=a("p",{class:"text-xs text-tenue"},"Plan",-1)),a("p",Ah,P(((ne=o.value.plan)==null?void 0:ne.nombre)||"Sin plan"),1),o.value.plan?(_(),E("p",kh," Mensualidad "+P(W(o.value.plan.precio_mensual)),1)):X("",!0)])]),j.value?(_(),E("div",Rh,[a("div",Ih,[A[13]||(A[13]=a("span",{class:"text-texto"},"Tope mensual",-1)),a("span",Ph,P(W(x.value))+" / "+P(W(j.value)),1)]),a("div",$h,[a("div",{class:Ae(["h-full rounded-full transition-all duration-500",$.value>=100?"bg-red-500":$.value>=80?"bg-amber-500":"bg-brand"]),style:tn({width:$.value+"%"})},null,6)]),$.value>=100?(_(),E("p",Oh," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):X("",!0)])):X("",!0),a("div",Th,[A[14]||(A[14]=a("div",{class:"px-4 py-3"},[a("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),g.value.length===0?(_(),nt(Bt,{key:0,icono:"📊",titulo:"Sin consumo en este período",detalle:"Cuando tus agentes respondan mensajes, lean imágenes o transcriban audios, vas a verlo acá."})):X("",!0),(_(!0),E(ae,null,Te(g.value,F=>(_(),E("div",{key:F.tipo,class:"px-4 py-3 flex items-center gap-3"},[a("span",Nh,P(f(F.tipo).icono),1),a("div",Dh,[a("p",Mh,P(f(F.tipo).nombre),1),a("p",Vh,P(q(F.cantidad))+" "+P(F.unidad)+" · "+P(q(F.eventos))+" usos ",1)]),a("span",jh,P(W(F.costo)),1)]))),128))]),D.value.dias.length?(_(),E("div",Uh,[A[15]||(A[15]=a("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),a("div",Lh,[(_(!0),E(ae,null,Te(D.value.dias,([F,Re])=>(_(),E("div",{key:F,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:tn({height:D.value.max?Math.max(2,Re/D.value.max*100)+"%":"2px"}),title:`${F}: ${W(Re)}`},null,12,Fh))),128))]),a("div",Hh,[a("span",null,P(D.value.dias[0][0]),1),a("span",null,P(D.value.dias[D.value.dias.length-1][0]),1)])])):X("",!0)],64)):X("",!0)])}}},qh=_c({history:Xu(Qe.baseRuta),routes:[{path:"/",name:"home",component:pd},{path:"/tenants/:id",name:"tenant-agentes",component:df,props:!0},{path:"/tenants/:id/uso",name:"uso",component:Bh,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:ph,props:!0}]});fu(Qc).use(qh).mount("#app");