La lista de agentes era un directorio: nombre y activo/inactivo. No decía si el agente estaba realmente listo para atender. - Tarjetas en grid con el color de marca del agente (el mismo que ve el visitante en el widget) y sus iniciales. - Tres datos por agente: conversaciones de los últimos 7 días, fuentes de conocimiento y canales activos. Salen de tres consultas agrupadas, no de tres por agente: el N+1 en un listado es el que después no se saca. - Badge de estado accionable. "sin conocimiento" cuando el agente está activo pero no tiene ninguna fuente — ese agente responde de memoria e inventa datos, que es exactamente el problema de la URL falsa, y hasta ahora no se veía hasta que un cliente recibía la respuesta inventada. - Esqueleto de carga: la pantalla hace 3 llamadas y quedaba en blanco el tiempo suficiente como para parecer rota. Arregla además el fondo en modo oscuro: index.html traía <body class="bg-gray-50">, y esa utilidad le ganaba a la regla de body de la capa base, así que el área principal quedaba clara con el tema oscuro puesto (medido: --fondo resolvía a 9 13 22 pero el body pintaba 249 250 251). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
140 KiB
JavaScript
27 lines
140 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 qs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ge={},zt=[],ht=()=>{},fr=()=>!1,ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ns=e=>e.startsWith("onUpdate:"),Te=Object.assign,Ws=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Mi=Object.prototype.hasOwnProperty,de=(e,t)=>Mi.call(e,t),Y=Array.isArray,Jt=e=>Pn(e)==="[object Map]",ln=e=>Pn(e)==="[object Set]",go=e=>Pn(e)==="[object Date]",Z=e=>typeof e=="function",Ce=e=>typeof e=="string",tt=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",dr=e=>(he(e)||Z(e))&&Z(e.then)&&Z(e.catch),pr=Object.prototype.toString,Pn=e=>pr.call(e),Vi=e=>Pn(e).slice(8,-1),hr=e=>Pn(e)==="[object Object]",zs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mn=qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ss=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ji=/-\w/g,Le=ss(e=>e.replace(ji,t=>t.slice(1).toUpperCase())),Ui=/\B([A-Z])/g,Kt=ss(e=>e.replace(Ui,"-$1").toLowerCase()),os=ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),vs=ss(e=>e?`on${os(e)}`:""),dt=(e,t)=>!Object.is(e,t),Hn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},mr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},rs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let vo;const is=()=>vo||(vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bt(e){if(Y(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Ce(s)?Bi(s):Bt(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ce(e)||he(e))return e}const Li=/;(?![^(]*\))/g,Fi=/:([^]+)/,Hi=/\/\*[^]*?\*\//g;function Bi(e){const t={};return e.replace(Hi,"").split(Li).forEach(n=>{if(n){const s=n.split(Fi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ke(e){let t="";if(Ce(e))t=e;else if(Y(e))for(let n=0;n<e.length;n++){const s=ke(e[n]);s&&(t+=s+" ")}else if(he(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gi=qs(Ki);function gr(e){return!!e||e===""}function qi(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=an(e[s],t[s]);return n}function an(e,t){if(e===t)return!0;let n=go(e),s=go(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=tt(e),s=tt(t),n||s)return e===t;if(n=Y(e),s=Y(t),n||s)return n&&s?qi(e,t):!1;if(n=he(e),s=he(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),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!an(e[i],t[i]))return!1}}return String(e)===String(t)}function Js(e,t){return e.findIndex(n=>an(n,t))}const vr=e=>!!(e&&e.__v_isRef===!0),$=e=>Ce(e)?e:e==null?"":Y(e)||he(e)&&(e.toString===pr||!Z(e.toString))?vr(e)?$(e.value):JSON.stringify(e,br,2):String(e),br=(e,t)=>vr(t)?br(e,t.value):Jt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[bs(s,r)+" =>"]=o,n),{})}:ln(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>bs(n))}:tt(t)?bs(t):he(t)&&!Y(t)&&!hr(t)?String(t):t,bs=(e,t="")=>{var n;return tt(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 Ie;class Wi{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&&Ie&&(Ie.active?(this.parent=Ie,this.index=(Ie.scopes||(Ie.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=Ie;try{return Ie=this,t()}finally{Ie=n}}}on(){++this._on===1&&(this.prevScope=Ie,Ie=this)}off(){if(this._on>0&&--this._on===0){if(Ie===this)Ie=this.prevScope;else{let t=Ie;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 zi(){return Ie}let ve;const _s=new WeakSet;class _r{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,Ie&&(Ie.active?Ie.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,_s.has(this)&&(_s.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,bo(this),wr(this);const t=ve,n=Ze;ve=this,Ze=!0;try{return this.fn()}finally{Cr(this),ve=t,Ze=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Xs(t);this.deps=this.depsTail=void 0,bo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?_s.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ts(this)&&this.run()}get dirty(){return Ts(this)}}let xr=0,gn,vn;function yr(e,t=!1){if(e.flags|=8,t){e.next=vn,vn=e;return}e.next=gn,gn=e}function Ys(){xr++}function Qs(){if(--xr>0)return;if(vn){let t=vn;for(vn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;gn;){let t=gn;for(gn=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 wr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Cr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Xs(s),Ji(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Er(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Er(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===yn)||(e.globalVersion=yn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ts(e))))return;e.flags|=2;const t=e.dep,n=ve,s=Ze;ve=e,Ze=!0;try{wr(e);const o=e.fn(e._value);(t.version===0||dt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ve=n,Ze=s,Cr(e),e.flags&=-3}}function Xs(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)Xs(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ji(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ze=!0;const Sr=[];function St(){Sr.push(Ze),Ze=!1}function At(){const e=Sr.pop();Ze=e===void 0?!0:e}function bo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ve;ve=void 0;try{t()}finally{ve=n}}}let yn=0;class Yi{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 Zs{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(!ve||!Ze||ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ve)n=this.activeLink=new Yi(ve,this),ve.deps?(n.prevDep=ve.depsTail,ve.depsTail.nextDep=n,ve.depsTail=n):ve.deps=ve.depsTail=n,Ar(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=ve.depsTail,n.nextDep=void 0,ve.depsTail.nextDep=n,ve.depsTail=n,ve.deps===n&&(ve.deps=s)}return n}trigger(t){this.version++,yn++,this.notify(t)}notify(t){Ys();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qs()}}}function Ar(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)Ar(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $s=new WeakMap,Ft=Symbol(""),Ns=Symbol(""),wn=Symbol("");function Ne(e,t,n){if(Ze&&ve){let s=$s.get(e);s||$s.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Zs),o.map=s,o.key=n),o.track()}}function wt(e,t,n,s,o,r){const i=$s.get(e);if(!i){yn++;return}const l=a=>{a&&a.trigger()};if(Ys(),t==="clear")i.forEach(l);else{const a=Y(e),d=a&&zs(n);if(a&&n==="length"){const c=Number(s);i.forEach((h,v)=>{(v==="length"||v===wn||!tt(v)&&v>=c)&&l(h)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),d&&l(i.get(wn)),t){case"add":a?d&&l(i.get("length")):(l(i.get(Ft)),Jt(e)&&l(i.get(Ns)));break;case"delete":a||(l(i.get(Ft)),Jt(e)&&l(i.get(Ns)));break;case"set":Jt(e)&&l(i.get(Ft));break}}Qs()}function Gt(e){const t=fe(e);return t===e?t:(Ne(t,"iterate",wn),Ye(e)?t:t.map(nt))}function ls(e){return Ne(e=fe(e),"iterate",wn),e}function ct(e,t){return Rt(e)?en(Ht(e)?nt(t):t):nt(t)}const Qi={__proto__:null,[Symbol.iterator](){return xs(this,Symbol.iterator,e=>ct(this,e))},concat(...e){return Gt(this).concat(...e.map(t=>Y(t)?Gt(t):t))},entries(){return xs(this,"entries",e=>(e[1]=ct(this,e[1]),e))},every(e,t){return bt(this,"every",e,t,void 0,arguments)},filter(e,t){return bt(this,"filter",e,t,n=>n.map(s=>ct(this,s)),arguments)},find(e,t){return bt(this,"find",e,t,n=>ct(this,n),arguments)},findIndex(e,t){return bt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return bt(this,"findLast",e,t,n=>ct(this,n),arguments)},findLastIndex(e,t){return bt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return bt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ys(this,"includes",e)},indexOf(...e){return ys(this,"indexOf",e)},join(e){return Gt(this).join(e)},lastIndexOf(...e){return ys(this,"lastIndexOf",e)},map(e,t){return bt(this,"map",e,t,void 0,arguments)},pop(){return cn(this,"pop")},push(...e){return cn(this,"push",e)},reduce(e,...t){return _o(this,"reduce",e,t)},reduceRight(e,...t){return _o(this,"reduceRight",e,t)},shift(){return cn(this,"shift")},some(e,t){return bt(this,"some",e,t,void 0,arguments)},splice(...e){return cn(this,"splice",e)},toReversed(){return Gt(this).toReversed()},toSorted(e){return Gt(this).toSorted(e)},toSpliced(...e){return Gt(this).toSpliced(...e)},unshift(...e){return cn(this,"unshift",e)},values(){return xs(this,"values",e=>ct(this,e))}};function xs(e,t,n){const s=ls(e),o=s[t]();return s!==e&&!Ye(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const Xi=Array.prototype;function bt(e,t,n,s,o,r){const i=ls(e),l=i!==e&&!Ye(e),a=i[t];if(a!==Xi[t]){const h=a.apply(e,r);return l?nt(h):h}let d=n;i!==e&&(l?d=function(h,v){return n.call(this,ct(e,h),v,e)}:n.length>2&&(d=function(h,v){return n.call(this,h,v,e)}));const c=a.call(i,d,s);return l&&o?o(c):c}function _o(e,t,n,s){const o=ls(e),r=o!==e&&!Ye(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(d,c,h){return l&&(l=!1,d=ct(e,d)),n.call(this,d,ct(e,c),h,e)}):n.length>3&&(i=function(d,c,h){return n.call(this,d,c,h,e)}));const a=o[t](i,...s);return l?ct(e,a):a}function ys(e,t,n){const s=fe(e);Ne(s,"iterate",wn);const o=s[t](...n);return(o===-1||o===!1)&&no(n[0])?(n[0]=fe(n[0]),s[t](...n)):o}function cn(e,t,n=[]){St(),Ys();const s=fe(e)[t].apply(e,n);return Qs(),At(),s}const Zi=qs("__proto__,__v_isRef,__isVue"),Rr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function el(e){tt(e)||(e=String(e));const t=fe(this);return Ne(t,"has",e),t.hasOwnProperty(e)}class kr{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?cl:Tr:r?Pr:Or).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Y(t);if(!o){let a;if(i&&(a=Qi[n]))return a;if(n==="hasOwnProperty")return el}const l=Reflect.get(t,n,Me(t)?t:s);if((tt(n)?Rr.has(n):Zi(n))||(o||Ne(t,"get",n),r))return l;if(Me(l)){const a=i&&zs(n)?l:l.value;return o&&he(a)?Ms(a):a}return he(l)?o?Ms(l):as(l):l}}class Ir extends kr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=Y(t)&&zs(n);if(!this._isShallow){const d=Rt(r);if(!Ye(s)&&!Rt(s)&&(r=fe(r),s=fe(s)),!i&&Me(r)&&!Me(s))return d||(r.value=s),!0}const l=i?Number(n)<t.length:de(t,n),a=Reflect.set(t,n,s,Me(t)?t:o);return t===fe(o)&&a&&(l?dt(s,r)&&wt(t,"set",n,s):wt(t,"add",n,s)),a}deleteProperty(t,n){const s=de(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&wt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!tt(n)||!Rr.has(n))&&Ne(t,"has",n),s}ownKeys(t){return Ne(t,"iterate",Y(t)?"length":Ft),Reflect.ownKeys(t)}}class tl extends kr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const nl=new Ir,sl=new tl,ol=new Ir(!0);const Ds=e=>e,Mn=e=>Reflect.getPrototypeOf(e);function rl(e,t,n){return function(...s){const o=this.__v_raw,r=fe(o),i=Jt(r),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=o[e](...s),c=n?Ds:t?en:nt;return!t&&Ne(r,"iterate",a?Ns:Ft),Te(Object.create(d),{next(){const{value:h,done:v}=d.next();return v?{value:h,done:v}:{value:l?[c(h[0]),c(h[1])]:c(h),done:v}}})}}function Vn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function il(e,t){const n={get(o){const r=this.__v_raw,i=fe(r),l=fe(o);e||(dt(o,l)&&Ne(i,"get",o),Ne(i,"get",l));const{has:a}=Mn(i),d=t?Ds:e?en:nt;if(a.call(i,o))return d(r.get(o));if(a.call(i,l))return d(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ne(fe(o),"iterate",Ft),o.size},has(o){const r=this.__v_raw,i=fe(r),l=fe(o);return e||(dt(o,l)&&Ne(i,"has",o),Ne(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,a=fe(l),d=t?Ds:e?en:nt;return!e&&Ne(a,"iterate",Ft),l.forEach((c,h)=>o.call(r,d(c),d(h),i))}};return Te(n,e?{add:Vn("add"),set:Vn("set"),delete:Vn("delete"),clear:Vn("clear")}:{add(o){const r=fe(this),i=Mn(r),l=fe(o),a=!t&&!Ye(o)&&!Rt(o)?l:o;return i.has.call(r,a)||dt(o,a)&&i.has.call(r,o)||dt(l,a)&&i.has.call(r,l)||(r.add(a),wt(r,"add",a,a)),this},set(o,r){!t&&!Ye(r)&&!Rt(r)&&(r=fe(r));const i=fe(this),{has:l,get:a}=Mn(i);let d=l.call(i,o);d||(o=fe(o),d=l.call(i,o));const c=a.call(i,o);return i.set(o,r),d?dt(r,c)&&wt(i,"set",o,r):wt(i,"add",o,r),this},delete(o){const r=fe(this),{has:i,get:l}=Mn(r);let a=i.call(r,o);a||(o=fe(o),a=i.call(r,o)),l&&l.call(r,o);const d=r.delete(o);return a&&wt(r,"delete",o,void 0),d},clear(){const o=fe(this),r=o.size!==0,i=o.clear();return r&&wt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=rl(o,e,t)}),n}function eo(e,t){const n=il(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(de(n,o)&&o in s?n:s,o,r)}const ll={get:eo(!1,!1)},al={get:eo(!1,!0)},ul={get:eo(!0,!1)};const Or=new WeakMap,Pr=new WeakMap,Tr=new WeakMap,cl=new WeakMap;function fl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function as(e){return Rt(e)?e:to(e,!1,nl,ll,Or)}function $r(e){return to(e,!1,ol,al,Pr)}function Ms(e){return to(e,!0,sl,ul,Tr)}function to(e,t,n,s,o){if(!he(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=fl(Vi(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Ht(e){return Rt(e)?Ht(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function Ye(e){return!!(e&&e.__v_isShallow)}function no(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function dl(e){return!de(e,"__v_skip")&&Object.isExtensible(e)&&mr(e,"__v_skip",!0),e}const nt=e=>he(e)?as(e):e,en=e=>he(e)?Ms(e):e;function Me(e){return e?e.__v_isRef===!0:!1}function Q(e){return Nr(e,!1)}function pl(e){return Nr(e,!0)}function Nr(e,t){return Me(e)?e:new hl(e,t)}class hl{constructor(t,n){this.dep=new Zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:nt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ye(t)||Rt(t);t=s?t:fe(t),dt(t,n)&&(this._rawValue=t,this._value=s?t:nt(t),this.dep.trigger())}}function Oe(e){return Me(e)?e.value:e}const ml={get:(e,t,n)=>t==="__v_raw"?e:Oe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Me(o)&&!Me(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Dr(e){return Ht(e)?e:new Proxy(e,ml)}class gl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=yn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ve!==this)return yr(this,!0),!0}get value(){const t=this.dep.track();return Er(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vl(e,t,n=!1){let s,o;return Z(e)?s=e:(s=e.get,o=e.set),new gl(s,o,n)}const jn={},Wn=new WeakMap;let jt;function bl(e,t=!1,n=jt){if(n){let s=Wn.get(n);s||Wn.set(n,s=[]),s.push(e)}}function _l(e,t,n=ge){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:a}=n,d=O=>o?O:Ye(O)||o===!1||o===0?Ct(O,1):Ct(O);let c,h,v,_,U=!1,P=!1;if(Me(e)?(h=()=>e.value,U=Ye(e)):Ht(e)?(h=()=>d(e),U=!0):Y(e)?(P=!0,U=e.some(O=>Ht(O)||Ye(O)),h=()=>e.map(O=>{if(Me(O))return O.value;if(Ht(O))return d(O);if(Z(O))return a?a(O,2):O()})):Z(e)?t?h=a?()=>a(e,2):e:h=()=>{if(v){St();try{v()}finally{At()}}const O=jt;jt=c;try{return a?a(e,3,[_]):e(_)}finally{jt=O}}:h=ht,t&&o){const O=h,A=o===!0?1/0:o;h=()=>Ct(O(),A)}const G=zi(),B=()=>{c.stop(),G&&G.active&&Ws(G.effects,c)};if(r&&t){const O=t;t=(...A)=>{const D=O(...A);return B(),D}}let N=P?new Array(e.length).fill(jn):jn;const H=O=>{if(!(!(c.flags&1)||!c.dirty&&!O))if(t){const A=c.run();if(O||o||U||(P?A.some((D,X)=>dt(D,N[X])):dt(A,N))){v&&v();const D=jt;jt=c;try{const X=[A,N===jn?void 0:P&&N[0]===jn?[]:N,_];N=A,a?a(t,3,X):t(...X)}finally{jt=D}}}else c.run()};return l&&l(H),c=new _r(h),c.scheduler=i?()=>i(H,!1):H,_=O=>bl(O,!1,c),v=c.onStop=()=>{const O=Wn.get(c);if(O){if(a)a(O,4);else for(const A of O)A();Wn.delete(c)}},t?s?H(!0):N=c.run():i?i(H.bind(null,!0),!0):c.run(),B.pause=c.pause.bind(c),B.resume=c.resume.bind(c),B.stop=B,B}function Ct(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Me(e))Ct(e.value,t,n);else if(Y(e))for(let s=0;s<e.length;s++)Ct(e[s],t,n);else if(ln(e)||Jt(e))e.forEach(s=>{Ct(s,t,n)});else if(hr(e)){for(const s in e)Ct(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ct(e[s],t,n)}return e}/**
|
|
* @vue/runtime-core v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Tn(e,t,n,s){try{return s?e(...s):e()}catch(o){us(o,t,n)}}function st(e,t,n,s){if(Z(e)){const o=Tn(e,t,n,s);return o&&dr(o)&&o.catch(r=>{us(r,t,n)}),o}if(Y(e)){const o=[];for(let r=0;r<e.length;r++)o.push(st(e[r],t,n,s));return o}}function us(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ge;if(t){let l=t.parent;const a=t.proxy,d=`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,a,d)===!1)return}l=l.parent}if(r){St(),Tn(r,null,10,[e,a,d]),At();return}}xl(e,n,o,s,i)}function xl(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const Ue=[];let ut=-1;const Yt=[];let Pt=null,qt=0;const Mr=Promise.resolve();let zn=null;function so(e){const t=zn||Mr;return e?t.then(this?e.bind(this):e):t}function yl(e){let t=ut+1,n=Ue.length;for(;t<n;){const s=t+n>>>1,o=Ue[s],r=Cn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function oo(e){if(!(e.flags&1)){const t=Cn(e),n=Ue[Ue.length-1];!n||!(e.flags&2)&&t>=Cn(n)?Ue.push(e):Ue.splice(yl(t),0,e),e.flags|=1,Vr()}}function Vr(){zn||(zn=Mr.then(Ur))}function wl(e){if(!Y(e))Pt&&e.id===-1?Pt.splice(qt+1,0,e):e.flags&1||(Yt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Yt.push(e[t]);Vr()}function xo(e,t,n=ut+1){for(;n<Ue.length;n++){const s=Ue[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Ue.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function jr(e){if(Yt.length){const t=[...new Set(Yt)].sort((n,s)=>Cn(n)-Cn(s));if(Yt.length=0,Pt){for(let n=0;n<t.length;n++)Pt.push(t[n]);return}for(Pt=t,qt=0;qt<Pt.length;qt++){const n=Pt[qt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Pt=null,qt=0}}const Cn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ur(e){try{for(ut=0;ut<Ue.length;ut++){const t=Ue[ut];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Tn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ut<Ue.length;ut++){const t=Ue[ut];t&&(t.flags&=-2)}ut=-1,Ue.length=0,jr(),zn=null,(Ue.length||Yt.length)&&Ur()}}let Pe=null,Lr=null;function Jn(e){const t=Pe;return Pe=e,Lr=e&&e.type.__scopeId||null,t}function Nt(e,t=Pe,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Xn(-1);const r=Jn(t),i=Et.length;let l;try{l=e(...o)}finally{for(let a=Et.length;a>i;a--)uo();Jn(r),s._d&&Xn(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function re(e,t){if(Pe===null)return e;const n=hs(Pe),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,l,a=ge]=t[o];r&&(Z(r)&&(r={mounted:r,updated:r}),r.deep&&Ct(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Mt(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 a=l.dir[s];a&&(St(),st(a,n,8,[e.el,l,e,t]),At())}}function Bn(e,t){if(De){let n=De.provides;const s=De.parent&&De.parent.provides;s===n&&(n=De.provides=Object.create(s)),n[e]=t}}function et(e,t,n=!1){const s=wa();if(s||Xt){let o=Xt?Xt._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&&Z(t)?t.call(s&&s.proxy):t}}const Cl=Symbol.for("v-scx"),El=()=>et(Cl);function Kn(e,t,n){return Fr(e,t,n)}function Fr(e,t,n=ge){const{immediate:s,deep:o,flush:r,once:i}=n,l=Te({},n),a=t&&s||!t&&r!=="post";let d;if(Rn){if(r==="sync"){const _=El();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!a){const _=()=>{};return _.stop=ht,_.resume=ht,_.pause=ht,_}}const c=De;l.call=(_,U,P)=>st(_,c,U,P);let h=!1;r==="post"?l.scheduler=_=>{He(_,c&&c.suspense)}:r!=="sync"&&(h=!0,l.scheduler=(_,U)=>{U?_():oo(_)}),l.augmentJob=_=>{t&&(_.flags|=4),h&&(_.flags|=2,c&&(_.id=c.uid,_.i=c))};const v=_l(e,t,l);return Rn&&(d?d.push(v):a&&v()),v}function Sl(e,t,n){const s=this.proxy,o=Ce(e)?e.includes(".")?Hr(s,e):()=>s[e]:e.bind(s,s);let r;Z(t)?r=t:(r=t.handler,n=t);const i=Dn(this),l=Fr(o,r.bind(s),n);return i(),l}function Hr(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 Al=Symbol("_vte"),cs=e=>e.__isTeleport,ws=Symbol("_leaveCb");function Rl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==mt){t=n;break}}return t}function Br(e){if(!io(e))return cs(e.type)&&e.children?Rl(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&&Z(n.default))return n.default()}}function ro(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ro(cs(n.type)&&Br(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 Kr(e,t){return Z(e)?Te({name:e.name},t,{setup:e}):e}function Gr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function yo(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Yn=new WeakMap;function bn(e,t,n,s,o=!1){if(Y(e)){e.forEach((P,G)=>bn(P,t&&(Y(t)?t[G]:t),n,s,o));return}if(Qt(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&bn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?hs(s.component):s.el,i=o?null:r,{i:l,r:a}=e,d=t&&t.r,c=l.refs===ge?l.refs={}:l.refs,h=l.setupState,v=fe(h),_=h===ge?fr:P=>yo(c,P)?!1:de(v,P),U=(P,G)=>!(G&&yo(c,G));if(d!=null&&d!==a){if(wo(t),Ce(d))c[d]=null,_(d)&&(h[d]=null);else if(Me(d)){const P=t;U(d,P.k)&&(d.value=null),P.k&&(c[P.k]=null)}}if(Z(a))Tn(a,l,12,[i,c]);else{const P=Ce(a),G=Me(a);if(P||G){const B=()=>{if(e.f){const N=P?_(a)?h[a]:c[a]:U()||!e.k?a.value:c[e.k];if(o)Y(N)&&Ws(N,r);else if(Y(N))N.includes(r)||N.push(r);else if(P)c[a]=[r],_(a)&&(h[a]=c[a]);else{const H=[r];U(a,e.k)&&(a.value=H),e.k&&(c[e.k]=H)}}else P?(c[a]=i,_(a)&&(h[a]=i)):G&&(U(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const N=()=>{B(),Yn.delete(e)};N.id=-1,Yn.set(e,N),He(N,n)}else wo(e),B()}}}function wo(e){const t=Yn.get(e);t&&(t.flags|=8,Yn.delete(e))}is().requestIdleCallback;is().cancelIdleCallback;const Qt=e=>!!e.type.__asyncLoader,io=e=>e.type.__isKeepAlive;function kl(e,t){qr(e,"a",t)}function Il(e,t){qr(e,"da",t)}function qr(e,t,n=De){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(fs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)io(o.parent.vnode)&&Ol(s,t,n,o),o=o.parent}}function Ol(e,t,n,s){const o=fs(t,e,s,!0);Wr(()=>{Ws(s[t],o)},n)}function fs(e,t,n=De,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{St();const l=Dn(n),a=st(t,n,e,i);return l(),At(),a});return s?o.unshift(r):o.push(r),r}}const kt=e=>(t,n=De)=>{(!Rn||e==="sp")&&fs(e,(...s)=>t(...s),n)},Pl=kt("bm"),$n=kt("m"),Tl=kt("bu"),$l=kt("u"),Nl=kt("bum"),Wr=kt("um"),Dl=kt("sp"),Ml=kt("rtg"),Vl=kt("rtc");function jl(e,t=De){fs("ec",e,t)}const Ul="components";function Nn(e,t){return Fl(Ul,e,!0,t)||e}const Ll=Symbol.for("v-ndc");function Fl(e,t,n=!0,s=!1){const o=Pe||De;if(o){const r=o.type;{const l=Ra(r,!1);if(l&&(l===t||l===Le(t)||l===os(Le(t))))return r}const i=Co(o[e]||r[e],t)||Co(o.appContext[e],t);return!i&&s?r:i}}function Co(e,t){return e&&(e[t]||e[Le(t)]||e[os(Le(t))])}function Re(e,t,n,s){let o;const r=n,i=Y(e);if(i||Ce(e)){const l=i&&Ht(e);let a=!1,d=!1;l&&(a=!Ye(e),d=Rt(e),e=ls(e)),o=new Array(e.length);for(let c=0,h=e.length;c<h;c++)o[c]=t(a?d?en(nt(e[c])):nt(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(he(e))if(e[Symbol.iterator])o=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];o[a]=t(e[c],c,a,r)}}else o=[];return o}function Hl(e,t,n,s,o,r){if(n==null&&(n={}),Pe.ce||Pe.parent&&Qt(Pe.parent)&&Pe.parent.ce){const d=n,c=Object.keys(d).length>0;return k(),tn(le,null,[we("slot",d,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Et.length;k();let a;try{const d=i&&zr(i(n)),c=n.key||r||d&&d.key;a=tn(le,{key:(c&&!tt(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Et.length;c>l;c--)uo();throw d}finally{i&&i._c&&(i._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function zr(e){return e.some(t=>Sn(t)?!(t.type===mt||t.type===le&&!zr(t.children)):!0)?e:null}const Vs=e=>e?hi(e)?hs(e):Vs(e.parent):null,_n=Te(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=>Vs(e.parent),$root:e=>Vs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Yr(e),$forceUpdate:e=>e.f||(e.f=()=>{oo(e.update)}),$nextTick:e=>e.n||(e.n=so.bind(e.proxy)),$watch:e=>Sl.bind(e)}),Cs=(e,t)=>e!==ge&&!e.__isScriptSetup&&de(e,t),Bl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Cs(s,t))return i[t]=1,s[t];if(o!==ge&&de(o,t))return i[t]=2,o[t];if(de(r,t))return i[t]=3,r[t];if(n!==ge&&de(n,t))return i[t]=4,n[t];js&&(i[t]=0)}}const d=_n[t];let c,h;if(d)return t==="$attrs"&&Ne(e.attrs,"get",""),d(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==ge&&de(n,t))return i[t]=4,n[t];if(h=a.config.globalProperties,de(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Cs(o,t)?(o[t]=n,!0):s!==ge&&de(s,t)?(s[t]=n,!0):de(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 a;return!!(n[l]||e!==ge&&l[0]!=="$"&&de(e,l)||Cs(t,l)||de(r,l)||de(s,l)||de(_n,l)||de(o.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:de(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Eo(e){return Y(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let js=!0;function Kl(e){const t=Yr(e),n=e.proxy,s=e.ctx;js=!1,t.beforeCreate&&So(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:a,inject:d,created:c,beforeMount:h,mounted:v,beforeUpdate:_,updated:U,activated:P,deactivated:G,beforeDestroy:B,beforeUnmount:N,destroyed:H,unmounted:O,render:A,renderTracked:D,renderTriggered:X,errorCaptured:x,serverPrefetch:j,expose:Se,inheritAttrs:J,components:Qe,directives:ze,filters:Dt}=t;if(d&&Gl(d,s,null),i)for(const ae in i){const se=i[ae];Z(se)&&(s[ae]=se.bind(n))}if(o){const ae=o.call(n,n);he(ae)&&(e.data=as(ae))}if(js=!0,r)for(const ae in r){const se=r[ae],ne=Z(se)?se.bind(n,n):Z(se.get)?se.get.bind(n,n):ht,Be=!Z(se)&&Z(se.set)?se.set.bind(n):ht,Ke=_e({get:ne,set:Be});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>Ke.value,set:$e=>Ke.value=$e})}if(l)for(const ae in l)Jr(l[ae],s,n,ae);if(a){const ae=Z(a)?a.call(n):a;Reflect.ownKeys(ae).forEach(se=>{Bn(se,ae[se])})}c&&So(c,e,"c");function Ee(ae,se){Y(se)?se.forEach(ne=>ae(ne.bind(n))):se&&ae(se.bind(n))}if(Ee(Pl,h),Ee($n,v),Ee(Tl,_),Ee($l,U),Ee(kl,P),Ee(Il,G),Ee(jl,x),Ee(Vl,D),Ee(Ml,X),Ee(Nl,N),Ee(Wr,O),Ee(Dl,j),Y(Se))if(Se.length){const ae=e.exposed||(e.exposed={});Se.forEach(se=>{Object.defineProperty(ae,se,{get:()=>n[se],set:ne=>n[se]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===ht&&(e.render=A),J!=null&&(e.inheritAttrs=J),Qe&&(e.components=Qe),ze&&(e.directives=ze),j&&Gr(e)}function Gl(e,t,n=ht){Y(e)&&(e=Us(e));for(const s in e){const o=e[s];let r;he(o)?"default"in o?r=et(o.from||s,o.default,!0):r=et(o.from||s):r=et(o),Me(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function So(e,t,n){st(Y(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Jr(e,t,n,s){let o=s.includes(".")?Hr(n,s):()=>n[s];if(Ce(e)){const r=t[e];Z(r)&&Kn(o,r)}else if(Z(e))Kn(o,e.bind(n));else if(he(e))if(Y(e))e.forEach(r=>Jr(r,t,n,s));else{const r=Z(e.handler)?e.handler.bind(n):t[e.handler];Z(r)&&Kn(o,r,e)}}function Yr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let a;return l?a=l:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(d=>Qn(a,d,i,!0)),Qn(a,t,i)),he(t)&&r.set(t,a),a}function Qn(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Qn(e,r,n,!0),o&&o.forEach(i=>Qn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=ql[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ql={data:Ao,props:Ro,emits:Ro,methods:pn,computed:pn,beforeCreate:Ve,created:Ve,beforeMount:Ve,mounted:Ve,beforeUpdate:Ve,updated:Ve,beforeDestroy:Ve,beforeUnmount:Ve,destroyed:Ve,unmounted:Ve,activated:Ve,deactivated:Ve,errorCaptured:Ve,serverPrefetch:Ve,components:pn,directives:pn,watch:zl,provide:Ao,inject:Wl};function Ao(e,t){return t?e?function(){return Te(Z(e)?e.call(this,this):e,Z(t)?t.call(this,this):t)}:t:e}function Wl(e,t){return pn(Us(e),Us(t))}function Us(e){if(Y(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ve(e,t){return e?[...new Set([].concat(e,t))]:t}function pn(e,t){return e?Te(Object.create(null),e,t):t}function Ro(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:Te(Object.create(null),Eo(e),Eo(t??{})):t}function zl(e,t){if(!e)return t;if(!t)return e;const n=Te(Object.create(null),e);for(const s in t)n[s]=Ve(e[s],t[s]);return n}function Qr(){return{app:null,config:{isNativeTag:fr,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 Jl=0;function Yl(e,t){return function(s,o=null){Z(s)||(s=Te({},s)),o!=null&&!he(o)&&(o=null);const r=Qr(),i=new WeakSet,l=[];let a=!1;const d=r.app={_uid:Jl++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Ia,get config(){return r.config},set config(c){},use(c,...h){return i.has(c)||(c&&Z(c.install)?(i.add(c),c.install(d,...h)):Z(c)&&(i.add(c),c(d,...h))),d},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),d},component(c,h){return h?(r.components[c]=h,d):r.components[c]},directive(c,h){return h?(r.directives[c]=h,d):r.directives[c]},mount(c,h,v){if(!a){const _=d._ceVNode||we(s,o);return _.appContext=r,v===!0?v="svg":v===!1&&(v=void 0),e(_,c,v),a=!0,d._container=c,c.__vue_app__=d,hs(_.component)}},onUnmount(c){l.push(c)},unmount(){a&&(st(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,h){return r.provides[c]=h,d},runWithContext(c){const h=Xt;Xt=d;try{return c()}finally{Xt=h}}};return d}}let Xt=null;const Ql=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function Xl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ge;let o=n;const r=t.startsWith("update:"),i=r&&Ql(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>Ce(c)?c.trim():c)),i.number&&(o=n.map(rs)));let l,a=s[l=vs(t)]||s[l=vs(Le(t))];!a&&r&&(a=s[l=vs(Kt(t))]),a&&st(a,e,6,o);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,st(d,e,6,o)}}const Zl=new WeakMap;function Xr(e,t,n=!1){const s=n?Zl:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!Z(e)){const a=d=>{const c=Xr(d,t,!0);c&&(l=!0,Te(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(he(e)&&s.set(e,null),null):(Y(r)?r.forEach(a=>i[a]=null):Te(i,r),he(e)&&s.set(e,i),i)}function ds(e,t){return!e||!ts(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),de(e,t[0].toLowerCase()+t.slice(1))||de(e,Kt(t))||de(e,t))}function ko(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:a,render:d,renderCache:c,props:h,data:v,setupState:_,ctx:U,inheritAttrs:P}=e,G=Jn(e);let B,N;try{if(n.shapeFlag&4){const O=o||s,A=O;B=ft(d.call(A,O,c,h,_,v,U)),N=l}else{const O=t;B=ft(O.length>1?O(h,{attrs:l,slots:i,emit:a}):O(h,null)),N=t.props?l:ea(l)}}catch(O){Et.length=0,us(O,e,1),B=we(mt)}let H=B;if(N&&P!==!1){const O=Object.keys(N),{shapeFlag:A}=H;O.length&&A&7&&(r&&O.some(ns)&&(N=ta(N,r)),H=nn(H,N,!1,!0))}if(n.dirs&&(H=nn(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition){const O=cs(H.type)&&Br(H)||H;ro(O,n.transition)}return B=H,Jn(G),B}const ea=e=>{let t;for(const n in e)(n==="class"||n==="style"||ts(n))&&((t||(t={}))[n]=e[n]);return t},ta=(e,t)=>{const n={};for(const s in e)(!ns(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function na(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:a}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Io(s,i,d):!!i;if(a&8){const c=t.dynamicProps;for(let h=0;h<c.length;h++){const v=c[h];if(Zr(i,s,v)&&!ds(d,v))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?Io(s,i,d):!0:!!i;return!1}function Io(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(Zr(t,e,r)&&!ds(n,r))return!0}return!1}function Zr(e,t,n){const s=e[n],o=t[n];return n==="style"&&he(s)&&he(o)?!an(s,o):s!==o}function sa({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 ei={},ti=()=>Object.create(ei),ni=e=>Object.getPrototypeOf(e)===ei;function oa(e,t,n,s=!1){const o={},r=ti();e.propsDefaults=Object.create(null),si(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:$r(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ra(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=fe(o),[a]=e.propsOptions;let d=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let h=0;h<c.length;h++){let v=c[h];if(ds(e.emitsOptions,v))continue;const _=t[v];if(a)if(de(r,v))_!==r[v]&&(r[v]=_,d=!0);else{const U=Le(v);o[U]=Ls(a,l,U,_,e,!1)}else _!==r[v]&&(r[v]=_,d=!0)}}}else{si(e,t,o,r)&&(d=!0);let c;for(const h in l)(!t||!de(t,h)&&((c=Kt(h))===h||!de(t,c)))&&(a?n&&(n[h]!==void 0||n[c]!==void 0)&&(o[h]=Ls(a,l,h,void 0,e,!0)):delete o[h]);if(r!==l)for(const h in r)(!t||!de(t,h))&&(delete r[h],d=!0)}d&&wt(e.attrs,"set","")}function si(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(mn(a))continue;const d=t[a];let c;o&&de(o,c=Le(a))?!r||!r.includes(c)?n[c]=d:(l||(l={}))[c]=d:ds(e.emitsOptions,a)||(!(a in s)||d!==s[a])&&(s[a]=d,i=!0)}if(r){const a=fe(n),d=l||ge;for(let c=0;c<r.length;c++){const h=r[c];n[h]=Ls(o,a,h,d[h],e,!de(d,h))}}return i}function Ls(e,t,n,s,o,r){const i=e[n];if(i!=null){const l=de(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&Z(a)){const{propsDefaults:d}=o;if(n in d)s=d[n];else{const c=Dn(o);s=d[n]=a.call(null,t),c()}}else s=a;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!l?s=!1:i[1]&&(s===""||s===Kt(n))&&(s=!0))}return s}const ia=new WeakMap;function oi(e,t,n=!1){const s=n?ia:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},l=[];let a=!1;if(!Z(e)){const c=h=>{a=!0;const[v,_]=oi(h,t,!0);Te(i,v),_&&l.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return he(e)&&s.set(e,zt),zt;if(Y(r))for(let c=0;c<r.length;c++){const h=Le(r[c]);Oo(h)&&(i[h]=ge)}else if(r)for(const c in r){const h=Le(c);if(Oo(h)){const v=r[c],_=i[h]=Y(v)||Z(v)?{type:v}:Te({},v),U=_.type;let P=!1,G=!0;if(Y(U))for(let B=0;B<U.length;++B){const N=U[B],H=Z(N)&&N.name;if(H==="Boolean"){P=!0;break}else H==="String"&&(G=!1)}else P=Z(U)&&U.name==="Boolean";_[0]=P,_[1]=G,(P||de(_,"default"))&&l.push(h)}}const d=[i,l];return he(e)&&s.set(e,d),d}function Oo(e){return e[0]!=="$"&&!mn(e)}const lo=e=>e==="_"||e==="_ctx"||e==="$stable",ao=e=>Y(e)?e.map(ft):[ft(e)],la=(e,t,n)=>{if(t._n)return t;const s=Nt((...o)=>ao(t(...o)),n);return s._c=!1,s},ri=(e,t,n)=>{const s=e._ctx;for(const o in e){if(lo(o))continue;const r=e[o];if(Z(r))t[o]=la(o,r,s);else if(r!=null){const i=ao(r);t[o]=()=>i}}},ii=(e,t)=>{const n=ao(t);e.slots.default=()=>n},li=(e,t,n)=>{for(const s in t)(n||!lo(s))&&(e[s]=t[s])},aa=(e,t,n)=>{const s=e.slots=ti();if(e.vnode.shapeFlag&32){const o=t._;o?(li(s,t,n),n&&mr(s,"_",o,!0)):ri(t,s)}else t&&ii(e,t)},ua=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=ge;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:li(o,t,n):(r=!t.$stable,ri(t,o)),i=t}else t&&(ii(e,t),i={default:1});if(r)for(const l in o)!lo(l)&&i[l]==null&&delete o[l]},He=ha;function ca(e){return fa(e)}function fa(e,t){const n=is();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:a,setText:d,setElementText:c,parentNode:h,nextSibling:v,setScopeId:_=ht,insertStaticContent:U}=e,P=(f,p,m,C=null,S=null,w=null,V=void 0,M=null,T=!!p.dynamicChildren)=>{if(f===p)return;f&&!fn(f,p)&&(C=E(f),$e(f,S,w,!0),f=null),p.patchFlag===-2&&(T=!1,p.dynamicChildren=null);const{type:R,ref:z,shapeFlag:F}=p;switch(R){case ps:G(f,p,m,C);break;case mt:B(f,p,m,C);break;case Gn:f==null&&N(p,m,C,V);break;case le:Qe(f,p,m,C,S,w,V,M,T);break;default:F&1?A(f,p,m,C,S,w,V,M,T):F&6?ze(f,p,m,C,S,w,V,M,T):(F&64||F&128)&&R.process(f,p,m,C,S,w,V,M,T,q)}z!=null&&S?bn(z,f&&f.ref,w,p||f,!p):z==null&&f&&f.ref!=null&&bn(f.ref,null,w,f,!0)},G=(f,p,m,C)=>{if(f==null)s(p.el=l(p.children),m,C);else{const S=p.el=f.el;p.children!==f.children&&d(S,p.children)}},B=(f,p,m,C)=>{f==null?s(p.el=a(p.children||""),m,C):p.el=f.el},N=(f,p,m,C)=>{[f.el,f.anchor]=U(f.children,p,m,C,f.el,f.anchor)},H=({el:f,anchor:p},m,C)=>{let S;for(;f&&f!==p;)S=v(f),s(f,m,C),f=S;s(p,m,C)},O=({el:f,anchor:p})=>{let m;for(;f&&f!==p;)m=v(f),o(f),f=m;o(p)},A=(f,p,m,C,S,w,V,M,T)=>{if(p.type==="svg"?V="svg":p.type==="math"&&(V="mathml"),f==null)D(p,m,C,S,w,V,M,T);else{const R=f.el&&f.el._isVueCE?f.el:null;try{R&&R._beginPatch(),j(f,p,S,w,V,M,T)}finally{R&&R._endPatch()}}},D=(f,p,m,C,S,w,V,M)=>{let T,R;const{props:z,shapeFlag:F,transition:W,dirs:y}=f;if(T=f.el=i(f.type,w,z&&z.is,z),F&8?c(T,f.children):F&16&&x(f.children,T,null,C,S,Es(f,w),V,M),y&&Mt(f,null,C,"created"),X(T,f,f.scopeId,V,C),z){for(const pe in z)pe!=="value"&&!mn(pe)&&r(T,pe,null,z[pe],w,C);"value"in z&&r(T,"value",null,z.value,w),(R=z.onVnodeBeforeMount)&&at(R,C,f)}y&&Mt(f,null,C,"beforeMount");const g=da(S,W);g&&W.beforeEnter(T),s(T,p,m),((R=z&&z.onVnodeMounted)||g||y)&&He(()=>{try{R&&at(R,C,f),g&&W.enter(T),y&&Mt(f,null,C,"mounted")}finally{}},S)},X=(f,p,m,C,S)=>{if(m&&_(f,m),C)for(let w=0;w<C.length;w++)_(f,C[w]);if(S){let w=S.subTree;if(p===w||fi(w.type)&&(w.ssContent===p||w.ssFallback===p)){const V=S.vnode;X(f,V,V.scopeId,V.slotScopeIds,S.parent)}}},x=(f,p,m,C,S,w,V,M,T=0)=>{for(let R=T;R<f.length;R++){const z=f[R]=M?yt(f[R]):ft(f[R]);P(null,z,p,m,C,S,w,V,M)}},j=(f,p,m,C,S,w,V)=>{const M=p.el=f.el;let{patchFlag:T,dynamicChildren:R,dirs:z}=p;T|=f.patchFlag&16;const F=f.props||ge,W=p.props||ge;let y;if(m&&Vt(m,!1),(y=W.onVnodeBeforeUpdate)&&at(y,m,p,f),z&&Mt(p,f,m,"beforeUpdate"),m&&Vt(m,!0),R&&(!f.dynamicChildren||f.dynamicChildren.length!==R.length)&&(T=0,V=!1,R=null),(F.innerHTML&&W.innerHTML==null||F.textContent&&W.textContent==null)&&c(M,""),R?Se(f.dynamicChildren,R,M,m,C,Es(p,S),w):V||se(f,p,M,null,m,C,Es(p,S),w,!1),T>0){if(T&16)J(M,F,W,m,S);else if(T&2&&F.class!==W.class&&r(M,"class",null,W.class,S),T&4&&r(M,"style",F.style,W.style,S),T&8){const g=p.dynamicProps;for(let pe=0;pe<g.length;pe++){const b=g[pe],oe=F[b],me=W[b];(me!==oe||b==="value")&&r(M,b,oe,me,S,m)}}T&1&&f.children!==p.children&&c(M,p.children)}else!V&&R==null&&J(M,F,W,m,S);((y=W.onVnodeUpdated)||z)&&He(()=>{y&&at(y,m,p,f),z&&Mt(p,f,m,"updated")},C)},Se=(f,p,m,C,S,w,V)=>{for(let M=0;M<p.length;M++){const T=f[M],R=p[M],z=T.el&&(T.type===le||!fn(T,R)||T.shapeFlag&198)?h(T.el):m;P(T,R,z,null,C,S,w,V,!0)}},J=(f,p,m,C,S)=>{if(p!==m){if(p!==ge)for(const w in p)!mn(w)&&!(w in m)&&r(f,w,p[w],null,S,C);for(const w in m){if(mn(w))continue;const V=m[w],M=p[w];V!==M&&w!=="value"&&r(f,w,M,V,S,C)}"value"in m&&r(f,"value",p.value,m.value,S)}},Qe=(f,p,m,C,S,w,V,M,T)=>{const R=p.el=f?f.el:l(""),z=p.anchor=f?f.anchor:l("");let{patchFlag:F,dynamicChildren:W,slotScopeIds:y}=p;y&&(M=M?M.concat(y):y),f==null?(s(R,m,C),s(z,m,C),x(p.children||[],m,z,S,w,V,M,T)):F>0&&F&64&&W&&f.dynamicChildren&&f.dynamicChildren.length===W.length?(Se(f.dynamicChildren,W,m,S,w,V,M),(p.key!=null||S&&p===S.subTree)&&ai(f,p,!0)):se(f,p,m,z,S,w,V,M,T)},ze=(f,p,m,C,S,w,V,M,T)=>{p.slotScopeIds=M,f==null?p.shapeFlag&512?S.ctx.activate(p,m,C,V,T):Dt(p,m,C,S,w,V,T):It(f,p,T)},Dt=(f,p,m,C,S,w,V)=>{const M=f.component=ya(f,C,S);if(io(f)&&(M.ctx.renderer=q),Ca(M,!1,V),M.asyncDep){if(S&&S.registerDep(M,Ee,V),!f.el){const T=M.subTree=we(mt);B(null,T,p,m),f.placeholder=T.el}}else Ee(M,f,p,m,S,w,V)},It=(f,p,m)=>{const C=p.component=f.component;if(na(f,p,m))if(C.asyncDep&&!C.asyncResolved){ae(C,p,m);return}else C.next=p,C.update();else p.el=f.el,C.vnode=p},Ee=(f,p,m,C,S,w,V)=>{const M=()=>{if(f.isMounted){let{next:F,bu:W,u:y,parent:g,vnode:pe}=f;{const it=ui(f);if(it){F&&(F.el=pe.el,ae(f,F,V)),it.asyncDep.then(()=>{He(()=>{f.isUnmounted||R()},S)});return}}let b=F,oe;Vt(f,!1),F?(F.el=pe.el,ae(f,F,V)):F=pe,W&&Hn(W),(oe=F.props&&F.props.onVnodeBeforeUpdate)&&at(oe,g,F,pe),Vt(f,!0);const me=ko(f),rt=f.subTree;f.subTree=me,P(rt,me,h(rt.el),E(rt),f,S,w),F.el=me.el,b===null&&sa(f,me.el),y&&He(y,S),(oe=F.props&&F.props.onVnodeUpdated)&&He(()=>at(oe,g,F,pe),S)}else{let F;const{el:W,props:y}=p,{bm:g,m:pe,parent:b,root:oe,type:me}=f,rt=Qt(p);Vt(f,!1),g&&Hn(g),!rt&&(F=y&&y.onVnodeBeforeMount)&&at(F,b,p),Vt(f,!0);{oe.ce&&oe.ce._hasShadowRoot()&&oe.ce._injectChildStyle(me,f.parent?f.parent.type:void 0);const it=f.subTree=ko(f);P(null,it,m,C,f,S,w),p.el=it.el}if(pe&&He(pe,S),!rt&&(F=y&&y.onVnodeMounted)){const it=p;He(()=>at(F,b,it),S)}(p.shapeFlag&256||b&&Qt(b.vnode)&&b.vnode.shapeFlag&256)&&f.a&&He(f.a,S),f.isMounted=!0,p=m=C=null}};f.scope.on();const T=f.effect=new _r(M);f.scope.off();const R=f.update=T.run.bind(T),z=f.job=T.runIfDirty.bind(T);z.i=f,z.id=f.uid,T.scheduler=()=>oo(z),Vt(f,!0),R()},ae=(f,p,m)=>{p.component=f;const C=f.vnode.props;f.vnode=p,f.next=null,ra(f,p.props,C,m),ua(f,p.children,m),St(),xo(f),At()},se=(f,p,m,C,S,w,V,M,T=!1)=>{const R=f&&f.children,z=f?f.shapeFlag:0,F=p.children,{patchFlag:W,shapeFlag:y}=p;if(W>0){if(W&128){Be(R,F,m,C,S,w,V,M,T);return}else if(W&256){ne(R,F,m,C,S,w,V,M,T);return}}y&8?(z&16&&Fe(R,S,w),F!==R&&c(m,F)):z&16?y&16?Be(R,F,m,C,S,w,V,M,T):Fe(R,S,w,!0):(z&8&&c(m,""),y&16&&x(F,m,C,S,w,V,M,T))},ne=(f,p,m,C,S,w,V,M,T)=>{f=f||zt,p=p||zt;const R=f.length,z=p.length,F=Math.min(R,z);let W;for(W=0;W<F;W++){const y=p[W]=T?yt(p[W]):ft(p[W]);P(f[W],y,m,null,S,w,V,M,T)}R>z?Fe(f,S,w,!0,!1,F):x(p,m,C,S,w,V,M,T,F)},Be=(f,p,m,C,S,w,V,M,T)=>{let R=0;const z=p.length;let F=f.length-1,W=z-1;for(;R<=F&&R<=W;){const y=f[R],g=p[R]=T?yt(p[R]):ft(p[R]);if(fn(y,g))P(y,g,m,null,S,w,V,M,T);else break;R++}for(;R<=F&&R<=W;){const y=f[F],g=p[W]=T?yt(p[W]):ft(p[W]);if(fn(y,g))P(y,g,m,null,S,w,V,M,T);else break;F--,W--}if(R>F){if(R<=W){const y=W+1,g=y<z?p[y].el:C;for(;R<=W;)P(null,p[R]=T?yt(p[R]):ft(p[R]),m,g,S,w,V,M,T),R++}}else if(R>W)for(;R<=F;)$e(f[R],S,w,!0),R++;else{const y=R,g=R,pe=new Map;for(R=g;R<=W;R++){const qe=p[R]=T?yt(p[R]):ft(p[R]);qe.key!=null&&pe.set(qe.key,R)}let b,oe=0;const me=W-g+1;let rt=!1,it=0;const un=new Array(me);for(R=0;R<me;R++)un[R]=0;for(R=y;R<=F;R++){const qe=f[R];if(oe>=me){$e(qe,S,w,!0);continue}let lt;if(qe.key!=null)lt=pe.get(qe.key);else for(b=g;b<=W;b++)if(un[b-g]===0&&fn(qe,p[b])){lt=b;break}lt===void 0?$e(qe,S,w,!0):(un[lt-g]=R+1,lt>=it?it=lt:rt=!0,P(qe,p[lt],m,null,S,w,V,M,T),oe++)}const po=rt?pa(un):zt;for(b=po.length-1,R=me-1;R>=0;R--){const qe=g+R,lt=p[qe],ho=p[qe+1],mo=qe+1<z?ho.el||ci(ho):C;un[R]===0?P(null,lt,m,mo,S,w,V,M,T):rt&&(b<0||R!==po[b]?Ke(lt,m,mo,2):b--)}}},Ke=(f,p,m,C,S=null)=>{const{el:w,type:V,transition:M,children:T,shapeFlag:R}=f;if(R&6){Ke(f.component.subTree,p,m,C);return}if(R&128){f.suspense.move(p,m,C);return}if(R&64){V.move(f,p,m,q);return}if(V===le){s(w,p,m);for(let F=0;F<T.length;F++)Ke(T[F],p,m,C);s(f.anchor,p,m);return}if(V===Gn){H(f,p,m);return}if(C!==2&&R&1&&M)if(C===0)M.persisted&&!w[ws]?s(w,p,m):(M.beforeEnter(w),s(w,p,m),He(()=>M.enter(w),S));else{const{leave:F,delayLeave:W,afterLeave:y}=M,g=()=>{f.ctx.isUnmounted?o(w):s(w,p,m)},pe=()=>{const b=w._isLeaving||!!w[ws];w._isLeaving&&w[ws](!0),M.persisted&&!b?g():F(w,()=>{g(),y&&y()})};W?W(w,g,pe):pe()}else s(w,p,m)},$e=(f,p,m,C=!1,S=!1)=>{const{type:w,props:V,ref:M,children:T,dynamicChildren:R,shapeFlag:z,patchFlag:F,dirs:W,cacheIndex:y,memo:g}=f;if(F===-2&&(S=!1),M!=null&&(St(),bn(M,null,m,f,!0),At()),y!=null&&(p.renderCache[y]=void 0),z&256){p.ctx.deactivate(f);return}const pe=z&1&&W,b=!Qt(f);let oe;if(b&&(oe=V&&V.onVnodeBeforeUnmount)&&at(oe,p,f),z&6)vt(f.component,m,C);else{if(z&128){f.suspense.unmount(m,C);return}pe&&Mt(f,null,p,"beforeUnmount"),z&64?f.type.remove(f,p,m,q,C):R&&!R.hasOnce&&(w!==le||F>0&&F&64)?Fe(R,p,m,!1,!0):(w===le&&F&384||!S&&z&16)&&Fe(T,p,m),C&>(f)}const me=g!=null&&y==null;(b&&(oe=V&&V.onVnodeUnmounted)||pe||me)&&He(()=>{oe&&at(oe,p,f),pe&&Mt(f,null,p,"unmounted"),me&&(f.el=null)},m)},gt=f=>{const{type:p,el:m,anchor:C,transition:S}=f;if(p===le){Ge(m,C);return}if(p===Gn){O(f);return}const w=()=>{o(m),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(f.shapeFlag&1&&S&&!S.persisted){const{leave:V,delayLeave:M}=S,T=()=>V(m,w);M?M(f.el,w,T):T()}else w()},Ge=(f,p)=>{let m;for(;f!==p;)m=v(f),o(f),f=m;o(p)},vt=(f,p,m)=>{const{bum:C,scope:S,job:w,subTree:V,um:M,m:T,a:R}=f;Po(T),Po(R),C&&Hn(C),S.stop(),w&&(w.flags|=8,$e(V,f,p,m)),M&&He(M,p),He(()=>{f.isUnmounted=!0},p)},Fe=(f,p,m,C=!1,S=!1,w=0)=>{for(let V=w;V<f.length;V++)$e(f[V],p,m,C,S)},E=f=>{if(f.shapeFlag&6)return E(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=v(f.anchor||f.el),m=p&&p[Al];return m?v(m):p};let K=!1;const L=(f,p,m)=>{let C;f==null?p._vnode&&($e(p._vnode,null,null,!0),C=p._vnode.component):P(p._vnode||null,f,p,null,null,null,m),p._vnode=f,K||(K=!0,xo(C),jr(),K=!1)},q={p:P,um:$e,m:Ke,r:gt,mt:Dt,mc:x,pc:se,pbc:Se,n:E,o:e};return{render:L,hydrate:void 0,createApp:Yl(L)}}function Es({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 Vt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function da(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ai(e,t,n=!1){const s=e.children,o=t.children;if(Y(s)&&Y(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]=yt(o[r]),l.el=i.el),!n&&l.patchFlag!==-2&&ai(i,l)),l.type===ps&&(l.patchFlag===-1&&(l=o[r]=yt(l)),l.el=i.el),l.type===mt&&!l.el&&(l.el=i.el)}}function pa(e){const t=e.slice(),n=[0];let s,o,r,i,l;const a=e.length;for(s=0;s<a;s++){const d=e[s];if(d!==0){if(o=n[n.length-1],e[o]<d){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<d?r=l+1:i=l;d<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 ui(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ui(t)}function Po(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ci(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ci(t.subTree):null}const fi=e=>e.__isSuspense;function ha(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):wl(e)}const le=Symbol.for("v-fgt"),ps=Symbol.for("v-txt"),mt=Symbol.for("v-cmt"),Gn=Symbol.for("v-stc"),Et=[];let We=null;function k(e=!1){Et.push(We=e?null:[])}function uo(){Et.pop(),We=Et[Et.length-1]||null}let En=1;function Xn(e,t=!1){En+=e,e<0&&We&&t&&(We.hasOnce=!0)}function di(e){return e.dynamicChildren=En>0?We||zt:null,uo(),En>0&&We&&We.push(e),e}function I(e,t,n,s,o,r){return di(u(e,t,n,s,o,r,!0))}function tn(e,t,n,s,o){return di(we(e,t,n,s,o,!0))}function Sn(e){return e?e.__v_isVNode===!0:!1}function fn(e,t){return e.type===t.type&&e.key===t.key}const pi=({key:e})=>e??null,qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||Me(e)||Z(e)?{i:Pe,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,r=e===le?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pi(t),ref:t&&qn(t),scopeId:Lr,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:Pe};return l?(Zn(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=Ce(n)?8:16),En>0&&!i&&We&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&We.push(a),a}const we=ma;function ma(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Ll)&&(e=mt),Sn(e)){const l=nn(e,t,!0);return n&&Zn(l,n),En>0&&!r&&We&&(l.shapeFlag&6?We[We.indexOf(e)]=l:We.push(l)),l.patchFlag=-2,l}if(ka(e)&&(e=e.__vccOpts),t){t=ga(t);let{class:l,style:a}=t;l&&!Ce(l)&&(t.class=ke(l)),he(a)&&(no(a)&&!Y(a)&&(a=Te({},a)),t.style=Bt(a))}const i=Ce(e)?1:fi(e)?128:cs(e)?64:he(e)?4:Z(e)?2:0;return u(e,t,n,s,o,i,r,!0)}function ga(e){return e?no(e)||ni(e)?Te({},e):e:null}function nn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:a}=e,d=t?ba(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&pi(d),ref:t&&t.ref?n&&r?Y(r)?r.concat(qn(t)):[r,qn(t)]:qn(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!==le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&nn(e.ssContent),ssFallback:e.ssFallback&&nn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&ro(c,a.clone(c)),c}function xe(e=" ",t=0){return we(ps,null,e,t)}function va(e,t){const n=we(Gn,null,e);return n.staticCount=t,n}function ee(e="",t=!1){return t?(k(),tn(mt,null,e)):we(mt,null,e)}function ft(e){return e==null||typeof e=="boolean"?we(mt):Y(e)?we(le,null,e.slice()):Sn(e)?yt(e):we(ps,null,String(e))}function yt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:nn(e)}function Zn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Y(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Zn(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ni(t)?t._ctx=Pe:o===3&&Pe&&(Pe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Z(t)){if(s&65){Zn(e,{default:t});return}t={default:t,_ctx:Pe},n=32}else t=String(t),s&64?(n=16,t=[xe(t)]):n=8;e.children=t,e.shapeFlag|=n}function ba(...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=ke([t.class,s.class]));else if(o==="style")t.style=Bt([t.style,s.style]);else if(ts(o)){const r=t[o],i=s[o];i&&r!==i&&!(Y(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!ns(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function at(e,t,n,s=null){st(e,t,7,[n,s])}const _a=Qr();let xa=0;function ya(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||_a,r={uid:xa++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Wi(!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:oi(s,o),emitsOptions:Xr(s,o),emit:null,emitted:null,propsDefaults:ge,inheritAttrs:s.inheritAttrs,ctx:ge,data:ge,props:ge,attrs:ge,slots:ge,refs:ge,setupState:ge,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=Xl.bind(null,r),e.ce&&e.ce(r),r}let De=null;const wa=()=>De||Pe;let es,An;{const e=is(),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)}};es=t("__VUE_INSTANCE_SETTERS__",n=>De=n),An=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Dn=e=>{const t=De;return es(e),e.scope.on(),()=>{e.scope.off(),es(t)}},To=()=>{De&&De.scope.off(),es(null)};function hi(e){return e.vnode.shapeFlag&4}let Rn=!1;function Ca(e,t=!1,n=!1){t&&An(t);const{props:s,children:o}=e.vnode,r=hi(e);oa(e,s,r,t),aa(e,o,n||t);const i=r?Ea(e,t):void 0;return t&&An(!1),i}function Ea(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bl);const{setup:s}=n;if(s){St();const o=e.setupContext=s.length>1?Aa(e):null,r=Dn(e),i=Tn(s,e,0,[e.props,o]),l=dr(i);if(At(),r(),(l||e.sp)&&!Qt(e)&&Gr(e),l){if(i.then(To,To),t)return i.then(a=>{An(!0);try{$o(e,a,t)}finally{An(!1)}}).catch(a=>{us(a,e,0)});e.asyncDep=i}else $o(e,i)}else mi(e)}function $o(e,t,n){Z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Dr(t)),mi(e)}function mi(e,t,n){const s=e.type;e.render||(e.render=s.render||ht);{const o=Dn(e);St();try{Kl(e)}finally{At(),o()}}}const Sa={get(e,t){return Ne(e,"get",""),e[t]}};function Aa(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Sa),slots:e.slots,emit:e.emit,expose:t}}function hs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Dr(dl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in _n)return _n[n](e)},has(t,n){return n in t||n in _n}})):e.proxy}function Ra(e,t=!0){return Z(e)?e.displayName||e.name:e.name||t&&e.__name}function ka(e){return Z(e)&&"__vccOpts"in e}const _e=(e,t)=>vl(e,t,Rn);function gi(e,t,n){try{Xn(-1);const s=arguments.length;return s===2?he(t)&&!Y(t)?Sn(t)?we(e,null,[t]):we(e,t):we(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Sn(n)&&(n=[n]),we(e,t,n))}finally{Xn(1)}}const Ia="3.5.41";/**
|
|
* @vue/runtime-dom v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Fs;const No=typeof window<"u"&&window.trustedTypes;if(No)try{Fs=No.createPolicy("vue",{createHTML:e=>e})}catch{}const vi=Fs?e=>Fs.createHTML(e):e=>e,Oa="http://www.w3.org/2000/svg",Pa="http://www.w3.org/1998/Math/MathML",xt=typeof document<"u"?document:null,Do=xt&&xt.createElement("template"),Ta={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"?xt.createElementNS(Oa,e):t==="mathml"?xt.createElementNS(Pa,e):n?xt.createElement(e,{is:n}):xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>xt.createTextNode(e),createComment:e=>xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xt.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{Do.innerHTML=vi(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Do.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$a=Symbol("_vtc");function Na(e,t,n){const s=e[$a];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Mo=Symbol("_vod"),Da=Symbol("_vsh"),Ma=Symbol(""),Va=/(?:^|;)\s*display\s*:/;function ja(e,t,n){const s=e.style,o=Ce(n);let r=!1;if(n&&!o){if(t)if(Ce(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&hn(s,l,"")}else for(const i in t)n[i]==null&&hn(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?La(e,i,!Ce(t)&&t?t[i]:void 0,l)||hn(s,i,l):hn(s,i,"")}}else if(o){if(t!==n){const i=s[Ma];i&&(n+=";"+i),s.cssText=n,r=Va.test(n)}}else t&&e.removeAttribute("style");Mo in e&&(e[Mo]=r?s.display:"",e[Da]&&(s.display="none"))}const Vo=/\s*!important$/;function hn(e,t,n){if(Y(n))n.forEach(s=>hn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ua(e,t);Vo.test(n)?e.setProperty(Kt(s),n.replace(Vo,""),"important"):e[s]=n}}const jo=["Webkit","Moz","ms"],Ss={};function Ua(e,t){const n=Ss[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return Ss[t]=s;s=os(s);for(let o=0;o<jo.length;o++){const r=jo[o]+s;if(r in e)return Ss[t]=r}return t}function La(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ce(s)&&n===s}const Uo="http://www.w3.org/1999/xlink";function Lo(e,t,n,s,o,r=Gi(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Uo,t.slice(6,t.length)):e.setAttributeNS(Uo,t,n):n==null||r&&!gr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":tt(n)?String(n):n)}function Fo(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?vi(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=gr(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 Fa(e,t,n,s){e.removeEventListener(t,n,s)}const Ho=Symbol("_vei");function Ha(e,t,n,s,o=null){const r=e[Ho]||(e[Ho]={}),i=r[t];if(s&&i)i.value=s;else{const[l,a]=Ga(t);if(s){const d=r[t]=za(s,o);$t(e,l,d,a)}else i&&(Fa(e,l,i,a),r[t]=void 0)}}const Ba=/(Once|Passive|Capture)$/,Ka=/^on:?(?:Once|Passive|Capture)$/;function Ga(e){let t,n;for(;(n=e.match(Ba))&&!Ka.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Kt(e.slice(2)),t]}let As=0;const qa=Promise.resolve(),Wa=()=>As||(qa.then(()=>As=0),As=Date.now());function za(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Y(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let a=0;a<i.length&&!s._stopped;a++){const d=i[a];d&&st(d,t,5,l)}}else st(o,t,5,[s])};return n.value=e,n.attached=Wa(),n}const Bo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ja=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?Na(e,s,i):t==="style"?ja(e,n,s):ts(t)?ns(t)||Ha(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ya(e,t,s,i))?(Fo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lo(e,t,s,i,r,t!=="value")):e._isVueCE&&(Qa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(s)))?Fo(e,Le(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Lo(e,t,s,i))};function Ya(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bo(t)&&Z(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 Bo(t)&&Ce(n)?!1:t in e}function Qa(e,t){const n=e._def.props;if(!n)return!1;const s=Le(t);return Array.isArray(n)?n.some(o=>Le(o)===s):Object.keys(n).some(o=>Le(o)===s)}const sn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?n=>Hn(t,n):t};function Xa(e){e.target.composing=!0}function Ko(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pt=Symbol("_assign"),Un=Symbol("_initialValue");function Rs(e,t,n){return t&&(e=e.trim()),n&&(e=rs(e)),e}const be={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Un]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Un]=e.defaultValue.replace(/\r\n?/g,`
|
|
`))),e[pt]=sn(o);const r=s||o.props&&o.props.type==="number";$t(e,t?"change":"input",i=>{i.target.composing||e[pt](Rs(e.value,n,r))}),(n||r)&&$t(e,"change",()=>{e.value=Rs(e.value,n,r)}),t||($t(e,"compositionstart",Xa),$t(e,"compositionend",Ko),$t(e,"change",Ko))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Un];delete e[Un],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[pt](Rs(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[pt]=sn(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?rs(e.value):e.value,a=t??"";if(l===a)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Ut={deep:!0,created(e,t,n){e[pt]=sn(n),$t(e,"change",()=>{const s=e._modelValue,o=In(e),r=e.checked,i=e[pt];if(Y(s)){const l=Js(s,o),a=l!==-1;if(r&&!a)i(s.concat(o));else if(!r&&a){const d=[...s];d.splice(l,1),i(d)}}else if(ln(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(bi(e,r))})},mounted:Go,beforeUpdate(e,t,n){e[pt]=sn(n),Go(e,t,n)}};function Go(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Y(t))o=Js(t,s.props.value)>-1;else if(ln(t))o=t.has(s.props.value);else{if(t===n)return;o=an(t,bi(e,!0))}e.checked!==o&&(e.checked=o)}const kn={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?rs(In(r)):In(r));e[pt](e.multiple?ln(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,so(()=>{e._assigning=!1})}),e[pt]=sn(s)},mounted(e,{value:t}){qo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[pt]=sn(n)},updated(e,{value:t}){e._assigning||qo(e,t)}};function qo(e,t){const n=e.multiple,s=Y(t);if(!(n&&!s&&!ln(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],l=In(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Js(t,l)>-1}else i.selected=t.has(l);else if(an(In(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function In(e){return"_value"in e?e._value:e.value}function bi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Za=["ctrl","shift","alt","meta"],eu={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)=>Za.some(n=>e[`${n}Key`]&&!t.includes(n))},Je=(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=eu[t[i]];if(l&&l(o,t))return}return e(o,...r)}))},tu=Te({patchProp:Ja},Ta);let Wo;function nu(){return Wo||(Wo=ca(tu))}const su=((...e)=>{const t=nu().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=ru(s);if(!o)return;const r=t._component;!Z(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,ou(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function ou(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ru(e){return Ce(e)?document.querySelector(e):e}/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const Wt=typeof document<"u";function _i(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function iu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&_i(e.default)}const ce=Object.assign;function ks(e,t){const n={};for(const s in t){const o=t[s];n[s]=ot(o)?o.map(e):e(o)}return n}const xn=()=>{},ot=Array.isArray;function zo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const xi=/#/g,lu=/&/g,au=/\//g,uu=/=/g,cu=/\?/g,yi=/\+/g,fu=/%5B/g,du=/%5D/g,wi=/%5E/g,pu=/%60/g,Ci=/%7B/g,hu=/%7C/g,Ei=/%7D/g,mu=/%20/g;function co(e){return e==null?"":encodeURI(""+e).replace(hu,"|").replace(fu,"[").replace(du,"]")}function gu(e){return co(e).replace(Ci,"{").replace(Ei,"}").replace(wi,"^")}function Hs(e){return co(e).replace(yi,"%2B").replace(mu,"+").replace(xi,"%23").replace(lu,"%26").replace(pu,"`").replace(Ci,"{").replace(Ei,"}").replace(wi,"^")}function vu(e){return Hs(e).replace(uu,"%3D")}function bu(e){return co(e).replace(xi,"%23").replace(cu,"%3F")}function _u(e){return bu(e).replace(au,"%2F")}function On(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const xu=/\/$/,yu=e=>e.replace(xu,"");function Is(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),r=t.slice(a,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=Su(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:On(i)}}function wu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Jo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Cu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&on(t.matched[s],n.matched[o])&&Si(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function on(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Si(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Eu(e[n],t[n]))return!1;return!0}function Eu(e,t){return ot(e)?Yo(e,t):ot(t)?Yo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Yo(e,t){return ot(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Su(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 Ot={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Bs=(function(e){return e.pop="pop",e.push="push",e})({}),Os=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Au(e){if(!e)if(Wt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),yu(e)}const Ru=/^[^#]+#/;function ku(e,t){return e.replace(Ru,"#")+t}function Iu(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 ms=()=>({left:window.scrollX,top:window.scrollY});function Ou(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=Iu(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 Qo(e,t){return(history.state?history.state.position-t:-1)+e}const Ks=new Map;function Pu(e,t){Ks.set(e,t)}function Tu(e){const t=Ks.get(e);return Ks.delete(e),t}function $u(e){return typeof e=="string"||e&&typeof e=="object"}function Ai(e){return typeof e=="string"||typeof e=="symbol"}let ye=(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 Ri=Symbol("");ye.MATCHER_NOT_FOUND+"",ye.NAVIGATION_GUARD_REDIRECT+"",ye.NAVIGATION_ABORTED+"",ye.NAVIGATION_CANCELLED+"",ye.NAVIGATION_DUPLICATED+"";function rn(e,t){return ce(new Error,{type:e,[Ri]:!0},t)}function _t(e,t){return e instanceof Error&&Ri in e&&(t==null||!!(e.type&t))}const Nu=["params","query","hash"];function Du(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Nu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Mu(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(yi," "),r=o.indexOf("="),i=On(r<0?o:o.slice(0,r)),l=r<0?null:On(o.slice(r+1));if(i in t){let a=t[i];ot(a)||(a=t[i]=[a]),a.push(l)}else t[i]=l}return t}function Xo(e){let t="";for(let n in e){const s=e[n];if(n=vu(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ot(s)?s.map(o=>o&&Hs(o)):[s&&Hs(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Vu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ot(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const ju=Symbol(""),Zo=Symbol(""),gs=Symbol(""),fo=Symbol(""),Gs=Symbol("");function dn(){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 Tt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,a)=>{const d=v=>{v===!1?a(rn(ye.NAVIGATION_ABORTED,{from:n,to:t})):v instanceof Error?a(v):$u(v)?a(rn(ye.NAVIGATION_GUARD_REDIRECT,{from:t,to:v})):(i&&s.enterCallbacks[o]===i&&typeof v=="function"&&i.push(v),l())},c=r(()=>e.call(s&&s.instances[o],t,n,d));let h=Promise.resolve(c);e.length<3&&(h=h.then(d)),h.catch(v=>a(v))})}function Ps(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(_i(a)){const d=(a.__vccOpts||a)[t];d&&r.push(Tt(d,n,s,i,l,o))}else{let d=a();r.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const h=iu(c)?c.default:c;i.mods[l]=c,i.components[l]=h;const v=(h.__vccOpts||h)[t];return v&&Tt(v,n,s,i,l,o)()}))}}return r}function Uu(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(d=>on(d,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(d=>on(d,a))||o.push(a))}return[n,s,o]}/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let Lu=()=>location.protocol+"//"+location.host;function ki(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),Jo(l,"")}return Jo(n,e)+s+o}function Fu(e,t,n,s){let o=[],r=[],i=null;const l=({state:v})=>{const _=ki(e,location),U=n.value,P=t.value;let G=0;if(v){if(n.value=_,t.value=v,i&&i===U){i=null;return}G=P?v.position-P.position:0}else s(_);o.forEach(B=>{B(n.value,U,{delta:G,type:Bs.pop,direction:G?G>0?Os.forward:Os.back:Os.unknown})})};function a(){i=n.value}function d(v){o.push(v);const _=()=>{const U=o.indexOf(v);U>-1&&o.splice(U,1)};return r.push(_),_}function c(){if(document.visibilityState==="hidden"){const{history:v}=window;if(!v.state)return;v.replaceState(ce({},v.state,{scroll:ms()}),"")}}function h(){for(const v of r)v();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:a,listen:d,destroy:h}}function er(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?ms():null}}function Hu(e){const{history:t,location:n}=window,s={value:ki(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(a,d,c){const h=e.indexOf("#"),v=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:Lu()+e+a;try{t[c?"replaceState":"pushState"](d,"",v),o.value=d}catch(_){console.error(_),n[c?"replace":"assign"](v)}}function i(a,d){r(a,ce({},t.state,er(o.value.back,a,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=a}function l(a,d){const c=ce({},o.value,t.state,{forward:a,scroll:ms()});r(c.current,c,!0),r(a,ce({},er(s.value,a,null),{position:c.position+1},d),!1),s.value=a}return{location:s,state:o,push:l,replace:i}}function Bu(e){e=Au(e);const t=Hu(e),n=Fu(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=ce({location:"",base:e,go:s,createHref:ku.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 Lt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ae=(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})(Ae||{});const Ku={type:Lt.Static,value:""},Gu=/[a-zA-Z0-9_]/;function qu(e){if(!e)return[[]];if(e==="/")return[[Ku]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${d}": ${_}`)}let n=Ae.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,a,d="",c="";function h(){d&&(n===Ae.Static?r.push({type:Lt.Static,value:d}):n===Ae.Param||n===Ae.ParamRegExp||n===Ae.ParamRegExpEnd?(r.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Lt.Param,value:d,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),d="")}function v(){d+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==Ae.ParamRegExp){s=n,n=Ae.EscapeNext;continue}switch(n){case Ae.Static:a==="/"?(d&&h(),i()):a===":"?(h(),n=Ae.Param):v();break;case Ae.EscapeNext:v(),n=s;break;case Ae.Param:a==="("?n=Ae.ParamRegExp:Gu.test(a)?v():(h(),n=Ae.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case Ae.ParamRegExp:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=Ae.ParamRegExpEnd:c+=a;break;case Ae.ParamRegExpEnd:h(),n=Ae.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===Ae.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),h(),i(),o}const tr="[^/]+?",Wu={sensitive:!1,strict:!1,start:!0,end:!0};var je=(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})(je||{});const zu=/[.+*?^${}()[\]/\\]/g;function Ju(e,t){const n=ce({},Wu,t),s=[];let o=n.start?"^":"";const r=[];for(const d of e){const c=d.length?[]:[je.Root];n.strict&&!d.length&&(o+="/");for(let h=0;h<d.length;h++){const v=d[h];let _=je.Segment+(n.sensitive?je.BonusCaseSensitive:0);if(v.type===Lt.Static)h||(o+="/"),o+=v.value.replace(zu,"\\$&"),_+=je.Static;else if(v.type===Lt.Param){const{value:U,repeatable:P,optional:G,regexp:B}=v;r.push({name:U,repeatable:P,optional:G});const N=B||tr;if(N!==tr){_+=je.BonusCustomRegExp;try{`${N}`}catch(O){throw new Error(`Invalid custom RegExp for param "${U}" (${N}): `+O.message)}}let H=P?`((?:${N})(?:/(?:${N}))*)`:`(${N})`;h||(H=G&&d.length<2?`(?:/${H})`:"/"+H),G&&(H+="?"),o+=H,_+=je.Dynamic,G&&(_+=je.BonusOptional),P&&(_+=je.BonusRepeatable),N===".*"&&(_+=je.BonusWildcard)}c.push(_)}s.push(c)}if(n.strict&&n.end){const d=s.length-1;s[d][s[d].length-1]+=je.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(d){const c=d.match(i),h={};if(!c)return null;for(let v=1;v<c.length;v++){const _=c[v]||"",U=r[v-1];h[U.name]=_&&U.repeatable?_.split("/"):_}return h}function a(d){let c="",h=!1;for(const v of e){(!h||!c.endsWith("/"))&&(c+="/"),h=!1;for(const _ of v)if(_.type===Lt.Static)c+=_.value;else if(_.type===Lt.Param){const{value:U,repeatable:P,optional:G}=_,B=U in d?d[U]:"";if(ot(B)&&!P)throw new Error(`Provided param "${U}" is an array but it is not repeatable (* or + modifiers)`);const N=ot(B)?B.join("/"):B;if(!N)if(G)v.length<2&&(c.endsWith("/")?c=c.slice(0,-1):h=!0);else throw new Error(`Missing required param "${U}"`);c+=N}}return c||"/"}return{re:i,score:s,keys:r,parse:l,stringify:a}}function Yu(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]===je.Static+je.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===je.Static+je.Segment?1:-1:0}function Ii(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=Yu(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(nr(s))return 1;if(nr(o))return-1}return o.length-s.length}function nr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Qu={strict:!1,end:!0,sensitive:!1};function Xu(e,t,n){const s=Ju(qu(e.path),n),o=ce(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Zu(e,t){const n=[],s=new Map;t=zo(Qu,t);function o(h){return s.get(h)}function r(h,v,_){const U=!_,P=or(h);P.aliasOf=_&&_.record;const G=zo(t,h),B=[P];if("alias"in h){const O=typeof h.alias=="string"?[h.alias]:h.alias;for(const A of O)B.push(or(ce({},P,{components:_?_.record.components:P.components,path:A,aliasOf:_?_.record:P})))}let N,H;for(const O of B){const{path:A}=O;if(v&&A[0]!=="/"){const D=v.record.path,X=D[D.length-1]==="/"?"":"/";O.path=v.record.path+(A&&X+A)}if(N=Xu(O,v,G),_?_.alias.push(N):(H=H||N,H!==N&&H.alias.push(N),U&&h.name&&!rr(N)&&i(h.name)),Oi(N)&&a(N),P.children){const D=P.children;for(let X=0;X<D.length;X++)r(D[X],N,_&&_.children[X])}_=_||N}return H?()=>{i(H)}:xn}function i(h){if(Ai(h)){const v=s.get(h);v&&(s.delete(h),n.splice(n.indexOf(v),1),v.children.forEach(i),v.alias.forEach(i))}else{const v=n.indexOf(h);v>-1&&(n.splice(v,1),h.record.name&&s.delete(h.record.name),h.children.forEach(i),h.alias.forEach(i))}}function l(){return n}function a(h){const v=nc(h,n);n.splice(v,0,h),h.record.name&&!rr(h)&&s.set(h.record.name,h)}function d(h,v){let _,U={},P,G;if("name"in h&&h.name){if(_=s.get(h.name),!_)throw rn(ye.MATCHER_NOT_FOUND,{location:h});G=_.record.name,U=ce(sr(v.params,_.keys.filter(H=>!H.optional).concat(_.parent?_.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),h.params&&sr(h.params,_.keys.map(H=>H.name))),P=_.stringify(U)}else if(h.path!=null)P=h.path,_=n.find(H=>H.re.test(P)),_&&(U=_.parse(P),G=_.record.name);else{if(_=v.name?s.get(v.name):n.find(H=>H.re.test(v.path)),!_)throw rn(ye.MATCHER_NOT_FOUND,{location:h,currentLocation:v});G=_.record.name,U=ce({},v.params,h.params),P=_.stringify(U)}const B=[];let N=_;for(;N;)B.unshift(N.record),N=N.parent;return{name:G,path:P,params:U,matched:B,meta:tc(B)}}e.forEach(h=>r(h));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:o}}function sr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function or(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ec(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 ec(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 rr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function tc(e){return e.reduce((t,n)=>ce(t,n.meta),{})}function nc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Ii(e,t[r])<0?s=r:n=r+1}const o=sc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function sc(e){let t=e;for(;t=t.parent;)if(Oi(t)&&Ii(e,t)===0)return t}function Oi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ir(e){const t=et(gs),n=et(fo),s=_e(()=>{const a=Oe(e.to);return t.resolve(a)}),o=_e(()=>{const{matched:a}=s.value,{length:d}=a,c=a[d-1],h=n.matched;if(!c||!h.length)return-1;const v=h.findIndex(on.bind(null,c));if(v>-1)return v;const _=lr(a[d-2]);return d>1&&lr(c)===_&&h[h.length-1].path!==_?h.findIndex(on.bind(null,a[d-2])):v}),r=_e(()=>o.value>-1&&ac(n.params,s.value.params)),i=_e(()=>o.value>-1&&o.value===n.matched.length-1&&Si(n.params,s.value.params));function l(a={}){if(lc(a)){const d=t[Oe(e.replace)?"replace":"push"](Oe(e.to)).catch(xn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:_e(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function oc(e){return e.length===1?e[0]:e}const rc=Kr({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:ir,setup(e,{slots:t}){const n=as(ir(e)),{options:s}=et(gs),o=_e(()=>({[ar(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ar(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&oc(t.default(n));return e.custom?r:gi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),ic=rc;function lc(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 ac(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(!ot(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function lr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ar=(e,t,n)=>e??t??n,uc=Kr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=et(Gs),o=_e(()=>e.route||s.value),r=et(Zo,0),i=_e(()=>{let d=Oe(r);const{matched:c}=o.value;let h;for(;(h=c[d])&&!h.components;)d++;return d}),l=_e(()=>o.value.matched[i.value]);Bn(Zo,_e(()=>i.value+1)),Bn(ju,l),Bn(Gs,o);const a=Q();return Kn(()=>[a.value,l.value,e.name],([d,c,h],[v,_,U])=>{c&&(c.instances[h]=d,_&&_!==c&&d&&d===v&&(c.leaveGuards.size||(c.leaveGuards=_.leaveGuards),c.updateGuards.size||(c.updateGuards=_.updateGuards))),d&&c&&(!_||!on(c,_)||!v)&&(c.enterCallbacks[h]||[]).forEach(P=>P(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,h=l.value,v=h&&h.components[c];if(!v)return ur(n.default,{Component:v,route:d});const _=h.props[c],U=_?_===!0?d.params:typeof _=="function"?_(d):_:null,G=gi(v,ce({},U,t,{onVnodeUnmounted:B=>{B.component.isUnmounted&&(h.instances[c]=null)},ref:a}));return ur(n.default,{Component:G,route:d})||G}}});function ur(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const cc=uc;function fc(e){const t=Zu(e.routes,e),n=e.parseQuery||Mu,s=e.stringifyQuery||Xo,o=e.history,r=dn(),i=dn(),l=dn(),a=pl(Ot);let d=Ot;Wt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=ks.bind(null,E=>""+E),h=ks.bind(null,_u),v=ks.bind(null,On);function _(E,K){let L,q;return Ai(E)?(L=t.getRecordMatcher(E),q=K):q=E,t.addRoute(q,L)}function U(E){const K=t.getRecordMatcher(E);K&&t.removeRoute(K)}function P(){return t.getRoutes().map(E=>E.record)}function G(E){return!!t.getRecordMatcher(E)}function B(E,K){if(K=ce({},K||a.value),typeof E=="string"){const m=Is(n,E,K.path),C=t.resolve({path:m.path},K),S=o.createHref(m.fullPath);return ce(m,C,{params:v(C.params),hash:On(m.hash),redirectedFrom:void 0,href:S})}let L;if(E.path!=null)L=ce({},E,{path:Is(n,E.path,K.path).path});else{const m=ce({},E.params);for(const C in m)m[C]==null&&delete m[C];L=ce({},E,{params:h(m)}),K.params=h(K.params)}const q=t.resolve(L,K),te=E.hash||"";q.params=c(v(q.params));const f=wu(s,ce({},E,{hash:gu(te),path:q.path})),p=o.createHref(f);return ce({fullPath:f,hash:te,query:s===Xo?Vu(E.query):E.query||{}},q,{redirectedFrom:void 0,href:p})}function N(E){return typeof E=="string"?Is(n,E,a.value.path):ce({},E)}function H(E,K){if(d!==E)return rn(ye.NAVIGATION_CANCELLED,{from:K,to:E})}function O(E){return X(E)}function A(E){return O(ce(N(E),{replace:!0}))}function D(E,K){const L=E.matched[E.matched.length-1];if(L&&L.redirect){const{redirect:q}=L;let te=typeof q=="function"?q(E,K):q;return typeof te=="string"&&(te=te.includes("?")||te.includes("#")?te=N(te):{path:te},te.params={}),ce({query:E.query,hash:E.hash,params:te.path!=null?{}:E.params},te)}}function X(E,K){const L=d=B(E),q=a.value,te=E.state,f=E.force,p=E.replace===!0,m=D(L,q);if(m)return X(ce(N(m),{state:typeof m=="object"?ce({},te,m.state):te,force:f,replace:p}),K||L);const C=L;C.redirectedFrom=K;let S;return!f&&Cu(s,q,L)&&(S=rn(ye.NAVIGATION_DUPLICATED,{to:C,from:q}),Ke(q,q,!0,!1)),(S?Promise.resolve(S):Se(C,q)).catch(w=>_t(w)?_t(w,ye.NAVIGATION_GUARD_REDIRECT)?w:Be(w):se(w,C,q)).then(w=>{if(w){if(_t(w,ye.NAVIGATION_GUARD_REDIRECT))return X(ce({replace:p},N(w.to),{state:typeof w.to=="object"?ce({},te,w.to.state):te,force:f}),K||C)}else w=Qe(C,q,!0,p,te);return J(C,q,w),w})}function x(E,K){const L=H(E,K);return L?Promise.reject(L):Promise.resolve()}function j(E){const K=Ge.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(E):E()}function Se(E,K){let L;const[q,te,f]=Uu(E,K);L=Ps(q.reverse(),"beforeRouteLeave",E,K);for(const m of q)m.leaveGuards.forEach(C=>{L.push(Tt(C,E,K))});const p=x.bind(null,E,K);return L.push(p),Fe(L).then(()=>{L=[];for(const m of r.list())L.push(Tt(m,E,K));return L.push(p),Fe(L)}).then(()=>{L=Ps(te,"beforeRouteUpdate",E,K);for(const m of te)m.updateGuards.forEach(C=>{L.push(Tt(C,E,K))});return L.push(p),Fe(L)}).then(()=>{L=[];for(const m of f)if(m.beforeEnter)if(ot(m.beforeEnter))for(const C of m.beforeEnter)L.push(Tt(C,E,K));else L.push(Tt(m.beforeEnter,E,K));return L.push(p),Fe(L)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),L=Ps(f,"beforeRouteEnter",E,K,j),L.push(p),Fe(L))).then(()=>{L=[];for(const m of i.list())L.push(Tt(m,E,K));return L.push(p),Fe(L)}).catch(m=>_t(m,ye.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function J(E,K,L){l.list().forEach(q=>j(()=>q(E,K,L)))}function Qe(E,K,L,q,te){const f=H(E,K);if(f)return f;const p=K===Ot,m=Wt?history.state:{};L&&(q||p?o.replace(E.fullPath,ce({scroll:p&&m&&m.scroll},te)):o.push(E.fullPath,te)),a.value=E,Ke(E,K,L,p),Be()}let ze;function Dt(){ze||(ze=o.listen((E,K,L)=>{if(!vt.listening)return;const q=B(E),te=D(q,vt.currentRoute.value);if(te){X(ce(te,{replace:!0,force:!0}),q).catch(xn);return}d=q;const f=a.value;Wt&&Pu(Qo(f.fullPath,L.delta),ms()),Se(q,f).catch(p=>_t(p,ye.NAVIGATION_ABORTED|ye.NAVIGATION_CANCELLED)?p:_t(p,ye.NAVIGATION_GUARD_REDIRECT)?(X(ce(N(p.to),{force:!0}),q).then(m=>{_t(m,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===Bs.pop&&o.go(-1,!1)}).catch(xn),Promise.reject()):(L.delta&&o.go(-L.delta,!1),se(p,q,f))).then(p=>{p=p||Qe(q,f,!1),p&&(L.delta&&!_t(p,ye.NAVIGATION_CANCELLED)?o.go(-L.delta,!1):L.type===Bs.pop&&_t(p,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),J(q,f,p)}).catch(xn)}))}let It=dn(),Ee=dn(),ae;function se(E,K,L){Be(E);const q=Ee.list();return q.length?q.forEach(te=>te(E,K,L)):console.error(E),Promise.reject(E)}function ne(){return ae&&a.value!==Ot?Promise.resolve():new Promise((E,K)=>{It.add([E,K])})}function Be(E){return ae||(ae=!E,Dt(),It.list().forEach(([K,L])=>E?L(E):K()),It.reset()),E}function Ke(E,K,L,q){const{scrollBehavior:te}=e;if(!Wt||!te)return Promise.resolve();const f=!L&&Tu(Qo(E.fullPath,0))||(q||!L)&&history.state&&history.state.scroll||null;return so().then(()=>te(E,K,f)).then(p=>p&&Ou(p)).catch(p=>se(p,E,K))}const $e=E=>o.go(E);let gt;const Ge=new Set,vt={currentRoute:a,listening:!0,addRoute:_,removeRoute:U,clearRoutes:t.clearRoutes,hasRoute:G,getRoutes:P,resolve:B,options:e,push:O,replace:A,go:$e,back:()=>$e(-1),forward:()=>$e(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:Ee.add,isReady:ne,install(E){E.component("RouterLink",ic),E.component("RouterView",cc),E.config.globalProperties.$router=vt,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Oe(a)}),Wt&&!gt&&a.value===Ot&&(gt=!0,O(o.location).catch(q=>{}));const K={};for(const q in Ot)Object.defineProperty(K,q,{get:()=>a.value[q],enumerable:!0});E.provide(gs,vt),E.provide(fo,$r(K)),E.provide(Gs,a);const L=E.unmount;Ge.add(E),E.unmount=function(){Ge.delete(E),Ge.size<1&&(d=Ot,ze&&ze(),ze=null,a.value=Ot,gt=!1,ae=!1),L()}}};function Fe(E){return E.reduce((K,L)=>K.then(()=>j(L)),Promise.resolve())}return vt}function Pi(){return et(gs)}function Ti(e){return et(fo)}const Ln=window.location.pathname.startsWith("/portal/"),Xe={esPortal:Ln,baseRuta:Ln?"/portal/studio/":"/studio/",apiBase:Ln?"/portal":"/app",urlLogin:Ln?"/portal/login":"/login"};function ue(e){return Xe.apiBase+e}async function Fn(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=Xe.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 ie={get:e=>Fn(e),post:(e,t)=>Fn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Fn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Fn(e,{method:"DELETE"})},dc={class:"w-64 shrink-0 h-screen sticky top-0 flex flex-col border-r border-borde bg-superficie"},pc={class:"h-14 px-4 flex items-center border-b border-borde"},hc={key:0,class:"px-3 pt-3"},mc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},gc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},vc={key:0,class:"px-2 text-xs text-tenue"},bc={key:1,class:"px-2 text-xs text-tenue"},_c={class:"truncate"},xc={class:"flex items-center gap-1 mt-0.5"},yc={class:"text-[11px] text-tenue"},wc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Cc=["onClick"],Ec=["onClick"],Sc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Ac={class:"font-semibold text-texto mb-4"},Rc={key:0,class:"grid grid-cols-2 gap-3"},kc=["value"],Ic={class:"text-[11px] text-tenue mt-1"},Oc=["value"],Pc={class:"text-[11px] text-tenue mt-1"},Tc={class:"flex items-center gap-2 text-sm text-texto"},$c={class:"flex justify-end gap-2 pt-2"},Nc={__name:"Sidebar",setup(e,{expose:t}){const n=Ti(),s=Pi(),o=Q([]),r=Q([]),i=Q([]),l=Q(!0),a=Q(""),d=Q(!1),c=Q(null),h=Q(_()),v=_e(()=>n.params.tenantId||n.params.id);function _(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function U(){l.value=!0,a.value="";try{const A=await ie.get(ue("/umind/tenants"));o.value=A.items||[]}catch(A){a.value=A.message}finally{l.value=!1}}function P(A){return Array.isArray(A)?A:(A==null?void 0:A.items)||(A==null?void 0:A.registros)||[]}async function G(){if(Xe.esPortal)return;const[A,D]=await Promise.allSettled([ie.get("/app/api/clientes/select"),ie.get("/app/umind-planes/list")]);r.value=A.status==="fulfilled"?P(A.value):[],i.value=D.status==="fulfilled"?P(D.value):[];const X=[];A.status==="rejected"&&X.push("clientes"),D.status==="rejected"&&X.push("planes"),X.length&&(a.value=`No se pudo cargar la lista de ${X.join(" ni ")}.`)}function B(){c.value=null,h.value=_(),d.value=!0}function N(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},d.value=!0}async function H(){const A={...h.value,dominios_permitidos:h.value.dominios_permitidos.split(",").map(D=>D.trim()).filter(Boolean)};try{if(c.value)await ie.put(ue(`/umind/tenants/${c.value.ID}`),A),d.value=!1,await U();else{const D=await ie.post(ue("/umind/tenants"),A);d.value=!1,await U(),s.push(`/tenants/${D.id}`)}}catch(D){a.value=D.message}}async function O(A){confirm(`¿Eliminar el tenant "${A.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await ie.del(ue(`/umind/tenants/${A.ID}`)),v.value===String(A.ID)&&s.push("/"),await U())}return t({recargar:U}),$n(()=>{U(),G()}),(A,D)=>{const X=Nn("router-link");return k(),I(le,null,[u("aside",dc,[u("div",pc,[we(X,{to:"/",class:"text-base font-semibold text-texto"},{default:Nt(()=>[...D[7]||(D[7]=[xe(" uMind ",-1),u("span",{class:"text-brand"},"Studio",-1)])]),_:1})]),Oe(Xe).esPortal?ee("",!0):(k(),I("div",hc,[u("button",{class:"btn-primary w-full",onClick:B}," + Nuevo tenant ")])),a.value?(k(),I("p",mc,$(a.value),1)):ee("",!0),u("nav",gc,[l.value?(k(),I("p",vc,"Cargando...")):o.value.length===0?(k(),I("p",bc,$(Oe(Xe).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin tenants todavía."),1)):ee("",!0),(k(!0),I(le,null,Re(o.value,x=>(k(),I("div",{key:x.ID,class:ke(["group flex items-center rounded-lg transition-colors",v.value===String(x.ID)?"bg-brand/10":"hover:bg-elevado"])},[we(X,{to:`/tenants/${x.ID}`,class:ke(["flex-1 min-w-0 px-2.5 py-2 text-sm",v.value===String(x.ID)?"text-brand font-medium":"text-texto"])},{default:Nt(()=>[u("div",_c,$(x.nombre),1),u("div",xc,[u("span",{class:ke(["w-1.5 h-1.5 rounded-full",x.activo?"bg-green-500":"bg-tenue/40"])},null,2),u("span",yc,$(x.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Oe(Xe).esPortal?ee("",!0):(k(),I("div",wc,[u("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:j=>N(x)}," ✎ ",8,Cc),u("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:j=>O(x)}," ✕ ",8,Ec)]))],2))),128))])]),d.value?(k(),I("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:D[6]||(D[6]=Je(x=>d.value=!1,["self"]))},[u("div",Sc,[u("h2",Ac,$(c.value?"Editar tenant":"Nuevo tenant"),1),D[16]||(D[16]=u("p",{class:"text-xs text-tenue mb-3"}," Un tenant es el negocio/sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),u("form",{class:"space-y-3",onSubmit:Je(H,["prevent"])},[u("div",null,[D[8]||(D[8]=u("label",{class:"label"},"Nombre",-1)),re(u("input",{"onUpdate:modelValue":D[0]||(D[0]=x=>h.value.nombre=x),required:"",class:"input"},null,512),[[be,h.value.nombre]])]),u("div",null,[D[9]||(D[9]=u("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),re(u("input",{"onUpdate:modelValue":D[1]||(D[1]=x=>h.value.dominios_permitidos=x),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[be,h.value.dominios_permitidos]])]),Oe(Xe).esPortal?ee("",!0):(k(),I("div",Rc,[u("div",null,[D[11]||(D[11]=u("label",{class:"label"},"Cliente",-1)),re(u("select",{"onUpdate:modelValue":D[2]||(D[2]=x=>h.value.cliente_id=x),class:"input"},[D[10]||(D[10]=u("option",{value:null},"— sin asignar —",-1)),(k(!0),I(le,null,Re(r.value,x=>(k(),I("option",{key:x.ID,value:x.ID},$(x.nombre),9,kc))),128))],512),[[kn,h.value.cliente_id]]),u("p",Ic,$(r.value.length?"Define quién ve este tenant desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),u("div",null,[D[13]||(D[13]=u("label",{class:"label"},"Plan",-1)),re(u("select",{"onUpdate:modelValue":D[3]||(D[3]=x=>h.value.plan_id=x),class:"input"},[D[12]||(D[12]=u("option",{value:null},"— sin plan —",-1)),(k(!0),I(le,null,Re(i.value,x=>(k(),I("option",{key:x.ID,value:x.ID},$(x.nombre)+" ("+$(x.max_agentes===0?"∞":x.max_agentes)+" agentes) ",9,Oc))),128))],512),[[kn,h.value.plan_id]]),u("p",Pc,$(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),u("label",Tc,[re(u("input",{"onUpdate:modelValue":D[4]||(D[4]=x=>h.value.activo=x),type:"checkbox"},null,512),[[Ut,h.value.activo]]),D[14]||(D[14]=xe(" Activo ",-1))]),u("div",$c,[u("button",{type:"button",class:"btn-ghost",onClick:D[5]||(D[5]=x=>d.value=!1)}," Cancelar "),D[15]||(D[15]=u("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):ee("",!0)],64)}}},$i="umind-tema";function Dc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const Zt=Q(localStorage.getItem($i)||Dc());function Ni(){document.documentElement.classList.toggle("dark",Zt.value==="oscuro")}function cr(){Zt.value=Zt.value==="oscuro"?"claro":"oscuro",localStorage.setItem($i,Zt.value),Ni()}Ni();const Mc={class:"min-h-screen flex"},Vc={class:"flex-1 min-w-0 flex flex-col"},jc={class:"h-14 shrink-0 flex items-center justify-end gap-1 px-6 border-b border-borde"},Uc=["title"],Lc={class:"text-base leading-none"},Fc={class:"flex-1 max-w-5xl w-full mx-auto px-8 py-8 animate-aparecer"},Hc={__name:"App",setup(e){return(t,n)=>{const s=Nn("router-view");return k(),I("div",Mc,[we(Nc),u("main",Vc,[u("header",jc,[u("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Oe(Zt)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[0]||(n[0]=(...o)=>Oe(cr)&&Oe(cr)(...o))},[u("span",Lc,$(Oe(Zt)==="oscuro"?"☀️":"🌙"),1)],8,Uc)]),u("div",Fc,[we(s)])])])}}},Bc={class:"flex flex-col items-center justify-center text-center py-24"},Kc={class:"text-lg font-medium text-gray-700 dark:text-gray-200"},Gc={class:"text-sm text-gray-400 dark:text-gray-500 mt-1"},qc={__name:"Home",setup(e){return(t,n)=>(k(),I("div",Bc,[n[0]||(n[0]=u("div",{class:"text-4xl mb-4"},"💬",-1)),u("h1",Kc,$(Oe(Xe).esPortal?"Elegí tu espacio de la izquierda":"Elegí un tenant de la izquierda"),1),u("p",Gc,$(Oe(Xe).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},Wc={class:"flex flex-col items-center justify-center text-center py-12 px-6"},zc={key:0,class:"text-3xl mb-3 opacity-70"},Jc={class:"text-sm font-medium text-texto"},Yc={key:1,class:"text-xs text-tenue mt-1 max-w-sm"},Qc={class:"mt-4"},Di={__name:"UiEmptyState",props:{icono:{type:String,default:""},titulo:String,detalle:String},setup(e){return(t,n)=>(k(),I("div",Wc,[e.icono?(k(),I("div",zc,$(e.icono),1)):ee("",!0),u("p",Jc,$(e.titulo),1),e.detalle?(k(),I("p",Yc,$(e.detalle),1)):ee("",!0),u("div",Qc,[Hl(t.$slots,"default")])]))}},Xc={key:0,class:"mb-6"},Zc={class:"flex items-start justify-between gap-4"},ef={class:"text-xl font-semibold text-texto"},tf={class:"text-xs text-tenue mt-1"},nf={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},sf={class:"flex items-center justify-between mb-4"},of={class:"flex items-center gap-2"},rf={key:0,class:"badge-alerta"},lf={key:1,class:"badge-neutro"},af=["disabled"],uf={key:2,class:"text-xs text-tenue -mt-2 mb-4"},cf={key:3,class:"text-xs text-tenue -mt-2 mb-4"},ff={key:4,class:"grid gap-3 sm:grid-cols-2"},df=["disabled"],pf={key:6,class:"grid gap-3 sm:grid-cols-2"},hf={class:"flex items-start gap-3"},mf={class:"min-w-0 flex-1"},gf={class:"flex items-center gap-2"},vf={class:"font-medium text-texto truncate"},bf={class:"text-xs text-tenue mt-0.5 truncate"},_f={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},xf=["onClick"],yf=["onClick"],wf={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},Cf={class:"tabular-nums"},Ef={class:"text-texto font-medium"},Sf={class:"tabular-nums"},Af={class:"text-texto font-medium"},Rf={class:"tabular-nums"},kf={class:"text-texto font-medium"},If={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg"},Of={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Pf=["value"],Tf={class:"flex items-center gap-2"},$f={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},Nf={class:"flex justify-end gap-2 pt-2"},Df={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},Mf={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=_e(()=>Number(t.id)),s=Pi(),o=Q(null),r=Q([]),i=Q([]),l=Q(""),a=Q(!1),d=Q(null),c=Q(N()),h=Q(null),v=Q({}),_=Q(!0);function U(x){const j=v.value[x.ID]||{};return x.activo?j.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function P(x){const j=v.value[x.ID]||{};return{documentos:j.documentos||0,canales:j.canales||0,conversaciones:j.conversaciones_7d||0}}function G(x){return String(x||"?").trim().split(/\s+/).slice(0,2).map(j=>j[0]).join("").toUpperCase()}const B=_e(()=>{if(!h.value)return{sinPlan:!0};const x=h.value.max_agentes||0;return{sinPlan:!1,nombre:h.value.nombre,ilimitado:x<=0,max:x,usados:r.value.length,lleno:x>0&&r.value.length>=x}});function N(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0}}async function H(){l.value="",_.value=!0;try{const[x,j,Se]=await Promise.all([ie.get(ue("/umind/tenants")),ie.get(ue(`/umind/agentes?tenant_id=${t.id}`)),ie.get(ue("/umind/ai-configs"))]);o.value=(x.items||[]).find(J=>String(J.ID)===t.id)||null,r.value=j.items||[],h.value=j.plan||null,v.value=j.resumen||{},i.value=Se.items||[]}catch(x){l.value=x.message}finally{_.value=!1}}function O(){d.value=null,c.value=N(),a.value=!0}function A(x){d.value=x,c.value={nombre:x.nombre,ai_config_id:x.ai_config_id,tono:x.tono,mensaje_bienvenida:x.mensaje_bienvenida,color:x.color||"#8eb02f",activo:x.activo},a.value=!0}async function D(){try{if(d.value)await ie.put(ue(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),a.value=!1,await H();else{const x=await ie.post(ue("/umind/agentes"),{tenant_id:n.value,...c.value});a.value=!1,s.push(`/tenants/${n.value}/agentes/${x.id}`)}}catch(x){l.value=x.message}}async function X(x){confirm(`¿Eliminar el agente "${x.nombre}"? Esto no se puede deshacer.`)&&(await ie.del(ue(`/umind/agentes/${x.ID}`)),await H())}return $n(H),(x,j)=>{const Se=Nn("router-link");return k(),I("div",null,[o.value?(k(),I("div",Xc,[u("div",Zc,[u("div",null,[u("h1",ef,$(o.value.nombre),1),u("p",tf,$(o.value.dominios_permitidos||"sin dominios configurados"),1)]),we(Se,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost"},{default:Nt(()=>[...j[9]||(j[9]=[xe("📊 Consumo",-1)])]),_:1},8,["to"])])])):ee("",!0),l.value?(k(),I("p",nf,$(l.value),1)):ee("",!0),u("div",sf,[u("div",of,[j[10]||(j[10]=u("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),B.value.sinPlan?(k(),I("span",rf,"sin plan · sin límite")):B.value.ilimitado?(k(),I("span",lf,$(B.value.nombre)+" · ilimitado",1)):(k(),I("span",{key:2,class:ke(B.value.lleno?"badge-alerta":"badge-neutro")},$(B.value.nombre)+" · "+$(B.value.usados)+" de "+$(B.value.max),3))]),u("button",{class:"btn-primary",disabled:B.value.lleno,onClick:O},"+ Nuevo agente",8,af)]),B.value.sinPlan&&!Oe(Xe).esPortal?(k(),I("p",uf," Este tenant no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del tenant en la barra izquierda. ")):B.value.lleno?(k(),I("p",cf," Alcanzaste el máximo de agentes de tu plan. ")):ee("",!0),_.value?(k(),I("div",ff,[(k(),I(le,null,Re(2,J=>u("div",{key:J,class:"card p-4 animate-pulse"},[...j[11]||(j[11]=[va('<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?(k(),tn(Di,{key:5,class:"card",icono:"🤖",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:Nt(()=>[u("button",{class:"btn-primary",disabled:B.value.lleno,onClick:O},"+ Crear el primer agente",8,df)]),_:1})):(k(),I("div",pf,[(k(!0),I(le,null,Re(r.value,J=>(k(),tn(Se,{key:J.ID,to:`/tenants/${n.value}/agentes/${J.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:Nt(()=>[u("span",{class:"absolute inset-x-0 top-0 h-1",style:Bt({background:J.color||"#8eb02f"})},null,4),u("div",hf,[u("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Bt({background:J.color||"#8eb02f",opacity:J.activo?1:.4})},$(G(J.nombre)),5),u("div",mf,[u("div",gf,[u("span",vf,$(J.nombre),1),u("span",{class:ke(`badge-${U(J).tipo}`)},$(U(J).texto),3)]),u("p",bf,$(J.tono||"sin tono definido"),1)]),u("div",_f,[u("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Je(Qe=>A(J),["prevent","stop"])},"✎",8,xf),u("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Je(Qe=>X(J),["prevent","stop"])},"✕",8,yf)])]),u("div",wf,[u("span",Cf,[u("b",Ef,$(P(J).conversaciones),1),j[12]||(j[12]=xe(" conversaciones · 7d",-1))]),u("span",Sf,[u("b",Af,$(P(J).documentos),1),j[13]||(j[13]=xe(" fuentes",-1))]),u("span",Rf,[u("b",kf,$(P(J).canales),1),j[14]||(j[14]=xe(" canales",-1))])])]),_:2},1032,["to"]))),128))])),a.value?(k(),I("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:j[8]||(j[8]=Je(J=>a.value=!1,["self"]))},[u("div",If,[u("h2",Of,$(d.value?"Editar agente":"Nuevo agente"),1),u("form",{class:"space-y-3",onSubmit:Je(D,["prevent"])},[u("div",null,[j[15]||(j[15]=u("label",{class:"label"},"Nombre",-1)),re(u("input",{"onUpdate:modelValue":j[0]||(j[0]=J=>c.value.nombre=J),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[be,c.value.nombre]])]),u("div",null,[j[17]||(j[17]=u("label",{class:"label"},"Config de IA",-1)),re(u("select",{"onUpdate:modelValue":j[1]||(j[1]=J=>c.value.ai_config_id=J),class:"input"},[j[16]||(j[16]=u("option",{value:null},"— sin asignar —",-1)),(k(!0),I(le,null,Re(i.value,J=>(k(),I("option",{key:J.ID,value:J.ID},$(J.nombre)+" ("+$(J.provider)+")",9,Pf))),128))],512),[[kn,c.value.ai_config_id]])]),u("div",null,[j[18]||(j[18]=u("label",{class:"label"},"Tono / personalidad",-1)),re(u("textarea",{"onUpdate:modelValue":j[2]||(j[2]=J=>c.value.tono=J),rows:"2",class:"input"},null,512),[[be,c.value.tono]])]),u("div",null,[j[19]||(j[19]=u("label",{class:"label"},"Mensaje de bienvenida",-1)),re(u("input",{"onUpdate:modelValue":j[3]||(j[3]=J=>c.value.mensaje_bienvenida=J),class:"input"},null,512),[[be,c.value.mensaje_bienvenida]])]),u("div",null,[j[20]||(j[20]=u("label",{class:"label"},"Color del widget",-1)),u("div",Tf,[re(u("input",{"onUpdate:modelValue":j[4]||(j[4]=J=>c.value.color=J),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),[[be,c.value.color]]),re(u("input",{"onUpdate:modelValue":j[5]||(j[5]=J=>c.value.color=J),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),[[be,c.value.color]])])]),u("label",$f,[re(u("input",{"onUpdate:modelValue":j[6]||(j[6]=J=>c.value.activo=J),type:"checkbox"},null,512),[[Ut,c.value.activo]]),j[21]||(j[21]=xe(" Activo ",-1))]),u("div",Nf,[u("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:j[7]||(j[7]=J=>a.value=!1)},"Cancelar"),u("button",Df,$(d.value?"Guardar":"Crear"),1)])],32)])])):ee("",!0)])}}},Vf={key:0,class:"mb-6 mt-1"},jf={class:"text-xl font-semibold text-texto"},Uf={class:"text-xs text-tenue mt-1"},Lf={class:"bg-elevado px-1.5 py-0.5 rounded"},Ff={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Hf={class:"flex gap-1.5 mb-6 overflow-x-auto pb-1"},Bf=["onClick"],Kf={key:2},Gf=["disabled"],qf={class:"card divide-y divide-borde"},Wf={key:0,class:"p-6 text-sm text-tenue"},zf={class:"text-sm text-texto"},Jf={class:"text-xs text-tenue mt-0.5"},Yf={key:0},Qf={key:1,class:"text-red-600 dark:text-red-400"},Xf=["onClick"],Zf={key:3},ed={class:"card divide-y divide-borde"},td={key:0,class:"p-6 text-sm text-tenue"},nd={class:"text-sm text-texto font-mono"},sd={class:"label mt-0.5"},od={class:"text-xs text-tenue mt-0.5"},rd={key:0,class:"ml-1 text-green-600 dark:text-green-400"},id={key:1,class:"ml-1 text-gray-400"},ld={class:"flex gap-3 text-sm shrink-0"},ad=["onClick"],ud=["onClick"],cd={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},fd={class:"font-semibold text-texto mb-4"},dd={class:"border border-borde rounded-lg p-3 space-y-2"},pd=["onUpdate:modelValue"],hd=["onUpdate:modelValue"],md=["onUpdate:modelValue"],gd={class:"label flex items-center gap-1"},vd=["onUpdate:modelValue"],bd=["onClick"],_d={key:0,class:"text-xs text-gray-400"},xd={class:"border border-borde rounded-lg p-3 space-y-2"},yd={class:"flex items-center gap-2 label"},wd={class:"flex items-center gap-2 text-sm text-texto"},Cd={class:"flex justify-end gap-2 pt-2"},Ed={key:4},Sd={class:"card p-4 mb-4"},Ad={class:"flex items-center justify-between mb-2"},Rd={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},kd={class:"card divide-y divide-borde"},Id={key:0,class:"p-6 text-sm text-tenue"},Od={class:"flex items-center justify-between"},Pd={class:"font-medium text-texto capitalize"},Td={class:"flex gap-3 text-sm"},$d=["onClick"],Nd=["onClick"],Dd={class:"flex gap-4 mt-2 text-xs"},Md={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Vd=["checked","onChange"],jd={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Ud=["checked","onChange"],Ld={class:"label mt-1 break-all"},Fd={class:"bg-elevado px-1 rounded"},Hd={key:0,class:"text-xs text-tenue mt-1"},Bd={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Kd={class:"card p-6 w-full max-w-md"},Gd={key:0},qd={class:"flex flex-col gap-2 pt-1"},Wd={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},zd={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Jd={class:"flex justify-end gap-2 pt-2"},Yd={key:5},Qd={class:"flex gap-2 mb-4"},Xd={class:"card divide-y divide-borde"},Zd={key:0,class:"p-6 text-sm text-tenue"},ep={class:"font-medium text-texto capitalize"},tp={class:"ml-2 text-sm text-tenue"},np=["onClick"],sp={key:6,class:"card p-4 flex flex-col h-[28rem]"},op={class:"flex-1 overflow-y-auto space-y-2 mb-3"},rp={key:0,class:"text-sm text-tenue"},ip={key:1,class:"text-xs text-tenue"},lp=["disabled"],ap={key:7,class:"grid grid-cols-3 gap-4"},up={class:"col-span-1 card divide-y divide-borde max-h-[28rem] overflow-y-auto"},cp={key:0,class:"p-4 text-sm text-tenue"},fp=["onClick"],dp={class:"text-texto truncate"},pp={class:"text-xs text-tenue mt-0.5"},hp={class:"col-span-2 card p-4 max-h-[28rem] overflow-y-auto space-y-2"},mp={key:0,class:"text-sm text-tenue"},gp={key:8},vp={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},bp={key:0,class:"p-6 text-sm text-tenue"},_p={class:"cursor-pointer flex items-center gap-2 text-sm"},xp={class:"text-tenue text-xs shrink-0"},yp={class:"text-texto truncate"},wp={class:"text-tenue text-xs ml-auto shrink-0"},Cp={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"},Ep={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=_e(()=>Number(t.agenteId)),s=Ti(),o=Q(null),r=Q(""),i=Q(typeof s.query.tab=="string"?s.query.tab:"conocimiento"),l=Q([]),a=Q(""),d=Q(30),c=Q(!1);async function h(){const y=await ie.get(ue(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(y.items||[]).find(g=>String(g.ID)===t.agenteId)||null}async function v(){const y=await ie.get(ue(`/umind/documentos?agente_id=${t.agenteId}`));l.value=y.items||[]}async function _(){if(a.value.trim()){c.value=!0,r.value="";try{await ie.post(ue("/umind/documentos"),{agente_id:n.value,url:a.value.trim(),max_paginas:Number(d.value)||30}),a.value="",await v()}catch(y){r.value=y.message}finally{c.value=!1}}}async function U(y){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await ie.del(ue(`/umind/documentos/${y}`)),await v())}const P=_e(()=>y=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[y]||"badge-neutro"),G=Q([]),B=Q([]),N=Q(null);async function H(){const y=await ie.get(ue(`/umind/sesiones?agente_id=${t.agenteId}`));G.value=y.items||[]}async function O(y){N.value=y;const g=await ie.get(ue(`/umind/historial?agente_id=${t.agenteId}&session_id=${y}`));B.value=g.items||[]}const A=Q([]),D=Q(!1),X=Q(null),x=Q(j());function j(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}async function Se(){const y=await ie.get(ue(`/umind/tools?agente_id=${t.agenteId}`));A.value=y.items||[]}function J(){X.value=null,x.value=j(),D.value=!0}function Qe(y){X.value=y;let g=[];try{g=JSON.parse(y.parametros_json||"[]")||[]}catch{g=[]}x.value={nombre:y.nombre,descripcion:y.descripcion,url:y.url,auth_header_nombre:y.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:g,activa:y.activa},D.value=!0}function ze(){x.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function Dt(y){x.value.parametros.splice(y,1)}async function It(){const y={agente_id:n.value,nombre:x.value.nombre.trim(),descripcion:x.value.descripcion,url:x.value.url.trim(),auth_header_nombre:x.value.auth_header_nombre,parametros:x.value.parametros,activa:x.value.activa};x.value.tocarAuth&&(y.auth_header_valor=x.value.auth_header_valor);try{X.value?await ie.put(ue(`/umind/tools/${X.value.ID}`),y):await ie.post(ue("/umind/tools"),y),D.value=!1,await Se()}catch(g){r.value=g.message}}async function Ee(y){confirm(`¿Eliminar la tool "${y.nombre}"?`)&&(await ie.del(ue(`/umind/tools/${y.ID}`)),await Se())}const ae=Q([]),se=Q(!1),ne=Q(gt()),Be=Q(!1),Ke=_e(()=>{var g;const y=((g=o.value)==null?void 0:g.site_key)||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${y}" defer><\/script>`});async function $e(){try{await navigator.clipboard.writeText(Ke.value),Be.value=!0,setTimeout(()=>Be.value=!1,2e3)}catch{r.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function gt(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1}}async function Ge(){const y=await ie.get(ue(`/umind/canales?agente_id=${t.agenteId}`));ae.value=y.items||[]}function vt(){ne.value=gt(),se.value=!0}async function Fe(){const y=ne.value.tipo==="telegram"?{bot_token:ne.value.bot_token}:{phone_number_id:ne.value.phone_number_id,access_token:ne.value.access_token,app_secret:ne.value.app_secret,verify_token:ne.value.verify_token};try{await ie.post(ue("/umind/canales"),{agente_id:n.value,tipo:ne.value.tipo,credenciales:y,activo:!0,usar_whisper_audio:ne.value.usar_whisper_audio,usar_ocr_imagenes:ne.value.usar_ocr_imagenes}),se.value=!1,await Ge()}catch(g){r.value=g.message}}async function E(y){await ie.put(ue(`/umind/canales/${y.ID}`),{activo:!y.activo,credenciales:{},usar_whisper_audio:y.usar_whisper_audio,usar_ocr_imagenes:y.usar_ocr_imagenes}),await Ge()}async function K(y){await ie.put(ue(`/umind/canales/${y.ID}`),{activo:y.activo,credenciales:{},usar_whisper_audio:!y.usar_whisper_audio,usar_ocr_imagenes:y.usar_ocr_imagenes}),await Ge()}async function L(y){await ie.put(ue(`/umind/canales/${y.ID}`),{activo:y.activo,credenciales:{},usar_whisper_audio:y.usar_whisper_audio,usar_ocr_imagenes:!y.usar_ocr_imagenes}),await Ge()}async function q(y){confirm(`¿Eliminar el canal ${y.tipo}?`)&&(await ie.del(ue(`/umind/canales/${y.ID}`)),await Ge())}const te=Q([]);async function f(){const y=await ie.get(ue(`/umind/conexiones?agente_id=${t.agenteId}`));te.value=y.items||[]}function p(y){window.location.href=ue(`/umind/conexiones/conectar?agente_id=${n.value}&proveedor=${y}`)}async function m(y){confirm(`¿Desconectar la cuenta ${y.email||y.proveedor}?`)&&(await ie.del(ue(`/umind/conexiones/${y.ID}`)),await f())}const C=`staff-preview-${Math.random().toString(36).slice(2)}`,S=Q([]),w=Q(""),V=Q(!1);async function M(){const y=w.value.trim();if(!(!y||V.value)){w.value="",S.value.push({role:"user",content:y}),V.value=!0;try{const g=await ie.post(ue("/umind/chat"),{agente_id:n.value,session_id:C,mensaje:y});S.value.push({role:"assistant",content:g.respuesta})}catch(g){S.value.push({role:"assistant",content:`⚠️ ${g.message}`})}finally{V.value=!1}}}const T=[["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["chat","Chat de prueba"],["conversaciones","Conversaciones"],["auditoria","Auditoría"]],R=Q([]);async function z(){const y=await ie.get(ue(`/umind/eventos?agente_id=${t.agenteId}`));R.value=y.items||[]}const F=_e(()=>y=>({error:"badge-error",warn:"badge-alerta"})[y]||"badge-neutro");function W(y){try{return new Date(y).toLocaleString()}catch{return y}}return $n(async()=>{try{await Promise.all([h(),v(),H(),Se(),Ge(),f(),z()])}catch(y){r.value=y.message}}),(y,g)=>{const pe=Nn("router-link");return k(),I("div",null,[we(pe,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:Nt(()=>[...g[24]||(g[24]=[xe("← Agentes",-1)])]),_:1},8,["to"]),o.value?(k(),I("div",Vf,[u("h1",jf,$(o.value.nombre),1),u("p",Uf,[g[25]||(g[25]=xe(" site_key: ",-1)),u("code",Lf,$(o.value.site_key),1)])])):ee("",!0),r.value?(k(),I("p",Ff,$(r.value),1)):ee("",!0),u("div",Hf,[(k(),I(le,null,Re(T,([b,oe])=>u("button",{key:b,class:ke(["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:me=>i.value=b},$(oe),11,Bf)),64))]),i.value==="conocimiento"?(k(),I("div",Kf,[u("form",{class:"flex gap-2 mb-4",onSubmit:Je(_,["prevent"])},[re(u("input",{"onUpdate:modelValue":g[0]||(g[0]=b=>a.value=b),type:"url",placeholder:"https://ejemplo.com",required:"",class:"flex-1 border border-borde bg-white dark:bg-gray-900 text-texto rounded-lg px-3 py-2 text-sm"},null,512),[[be,a.value]]),re(u("input",{"onUpdate:modelValue":g[1]||(g[1]=b=>d.value=b),type:"number",min:"1",max:"200",class:"w-24 border border-borde bg-white dark:bg-gray-900 text-texto rounded-lg px-3 py-2 text-sm",title:"Máximo de páginas a crawlear"},null,512),[[be,d.value]]),u("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50 transition-colors"},$(c.value?"Agregando...":"Crawlear sitio"),9,Gf)],32),u("div",qf,[l.value.length===0?(k(),I("div",Wf,"Sin fuentes todavía.")):ee("",!0),(k(!0),I(le,null,Re(l.value,b=>(k(),I("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("div",zf,$(b.origen),1),u("div",Jf,[u("span",{class:ke(["px-1.5 py-0.5 rounded",P.value(b.estado)])},$(b.estado),3),b.total_chunks?(k(),I("span",Yf," · "+$(b.total_chunks)+" fragmentos",1)):ee("",!0),b.error?(k(),I("span",Qf," · "+$(b.error),1)):ee("",!0)])]),u("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:oe=>U(b.ID)},"Eliminar",8,Xf)]))),128))])])):i.value==="herramientas"?(k(),I("div",Zf,[u("div",{class:"flex justify-between items-center mb-4"},[g[26]||(g[26]=u("p",{class:"label"},"Máximo 10 tools activas por agente.",-1)),u("button",{class:"btn-primary",onClick:J}," + Nueva tool ")]),u("div",ed,[A.value.length===0?(k(),I("div",td,"Sin tools custom todavía.")):ee("",!0),(k(!0),I(le,null,Re(A.value,b=>(k(),I("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("div",nd,$(b.nombre),1),u("div",sd,$(b.descripcion),1),u("div",od,[xe($(b.url)+" ",1),b.auth_configurado?(k(),I("span",rd,"· auth configurada")):ee("",!0),b.activa?ee("",!0):(k(),I("span",id,"· inactiva"))])]),u("div",ld,[u("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:oe=>Qe(b)},"Editar",8,ad),u("button",{class:"text-red-500 hover:text-red-700",onClick:oe=>Ee(b)},"Eliminar",8,ud)])]))),128))]),D.value?(k(),I("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:g[10]||(g[10]=Je(b=>D.value=!1,["self"]))},[u("div",cd,[u("h2",fd,$(X.value?"Editar tool":"Nueva tool"),1),u("form",{class:"space-y-3",onSubmit:Je(It,["prevent"])},[u("div",null,[g[27]||(g[27]=u("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),re(u("input",{"onUpdate:modelValue":g[2]||(g[2]=b=>x.value.nombre=b),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[be,x.value.nombre]])]),u("div",null,[g[28]||(g[28]=u("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),re(u("textarea",{"onUpdate:modelValue":g[3]||(g[3]=b=>x.value.descripcion=b),rows:"2",required:"",class:"input"},null,512),[[be,x.value.descripcion]])]),u("div",null,[g[29]||(g[29]=u("label",{class:"label"},"URL del webhook (https)",-1)),re(u("input",{"onUpdate:modelValue":g[4]||(g[4]=b=>x.value.url=b),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[be,x.value.url]])]),u("div",dd,[u("div",{class:"flex items-center justify-between"},[g[30]||(g[30]=u("label",{class:"label"},"Parámetros que completa el modelo",-1)),u("button",{type:"button",class:"text-xs text-brand",onClick:ze},"+ agregar")]),(k(!0),I(le,null,Re(x.value.parametros,(b,oe)=>(k(),I("div",{key:oe,class:"flex gap-2 items-center"},[re(u("input",{"onUpdate:modelValue":me=>b.nombre=me,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,pd),[[be,b.nombre]]),re(u("select",{"onUpdate:modelValue":me=>b.tipo=me,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...g[31]||(g[31]=[u("option",{value:"string"},"string",-1),u("option",{value:"number"},"number",-1),u("option",{value:"boolean"},"boolean",-1)])],8,hd),[[kn,b.tipo]]),re(u("input",{"onUpdate:modelValue":me=>b.descripcion=me,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,md),[[be,b.descripcion]]),u("label",gd,[re(u("input",{"onUpdate:modelValue":me=>b.requerido=me,type:"checkbox"},null,8,vd),[[Ut,b.requerido]]),g[32]||(g[32]=xe(" req. ",-1))]),u("button",{type:"button",class:"text-red-400 text-xs",onClick:me=>Dt(oe)},"✕",8,bd)]))),128)),x.value.parametros.length===0?(k(),I("p",_d,"Sin parámetros.")):ee("",!0)]),u("div",xd,[g[33]||(g[33]=u("label",{class:"label"},"Autenticación saliente (opcional)",-1)),re(u("input",{"onUpdate:modelValue":g[5]||(g[5]=b=>x.value.auth_header_nombre=b),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[be,x.value.auth_header_nombre]]),u("label",yd,[re(u("input",{"onUpdate:modelValue":g[6]||(g[6]=b=>x.value.tocarAuth=b),type:"checkbox"},null,512),[[Ut,x.value.tocarAuth]]),xe(" "+$(X.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),x.value.tocarAuth?re((k(),I("input",{key:0,"onUpdate:modelValue":g[7]||(g[7]=b=>x.value.auth_header_valor=b),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[be,x.value.auth_header_valor]]):ee("",!0)]),u("label",wd,[re(u("input",{"onUpdate:modelValue":g[8]||(g[8]=b=>x.value.activa=b),type:"checkbox"},null,512),[[Ut,x.value.activa]]),g[34]||(g[34]=xe(" Activa ",-1))]),u("div",Cd,[u("button",{type:"button",class:"btn-ghost",onClick:g[9]||(g[9]=b=>D.value=!1)},"Cancelar"),g[35]||(g[35]=u("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):ee("",!0)])):i.value==="canales"?(k(),I("div",Ed,[u("div",Sd,[u("div",Ad,[g[36]||(g[36]=u("div",null,[u("span",{class:"font-medium text-texto"},"Web (widget)"),u("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),u("button",{class:ke(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",Be.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:$e},$(Be.value?"✓ Copiado":"Copiar código"),3)]),g[37]||(g[37]=u("p",{class:"label mb-2"},[xe(" Pegá esto antes de "),u("code",{class:"bg-elevado px-1 rounded"},"</body>"),xe(" en las páginas de tu sitio. ")],-1)),u("pre",Rd,[u("code",null,$(Ke.value),1)])]),u("div",{class:"flex justify-end mb-4"},[u("button",{class:"btn-primary",onClick:vt}," + Nuevo canal ")]),u("div",kd,[ae.value.length===0?(k(),I("div",Id,"Sin canales configurados.")):ee("",!0),(k(!0),I(le,null,Re(ae.value,b=>(k(),I("div",{key:b.ID,class:"p-4"},[u("div",Od,[u("div",null,[u("span",Pd,$(b.tipo),1),u("span",{class:ke(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},$(b.activo?"activo":"inactivo"),3)]),u("div",Td,[u("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:oe=>E(b)},$(b.activo?"Desactivar":"Activar"),9,$d),u("button",{class:"text-red-500 hover:text-red-700",onClick:oe=>q(b)},"Eliminar",8,Nd)])]),u("div",Dd,[u("label",Md,[u("input",{type:"checkbox",checked:b.usar_whisper_audio,onChange:oe=>K(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Vd),g[38]||(g[38]=xe(" Transcribir audios (Whisper) ",-1))]),u("label",jd,[u("input",{type:"checkbox",checked:b.usar_ocr_imagenes,onChange:oe=>L(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Ud),g[39]||(g[39]=xe(" Leer texto de imágenes (OCR) ",-1))])]),u("p",Ld,[g[40]||(g[40]=xe(" Webhook: ",-1)),u("code",Fd,$(b.webhook_url),1)]),b.tipo==="whatsapp"?(k(),I("p",Hd,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):ee("",!0),b.ultimo_error?(k(),I("p",Bd,$(b.ultimo_error),1)):ee("",!0)]))),128))]),se.value?(k(),I("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:g[20]||(g[20]=Je(b=>se.value=!1,["self"]))},[u("div",Kd,[g[51]||(g[51]=u("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),u("form",{class:"space-y-3",onSubmit:Je(Fe,["prevent"])},[u("div",null,[g[42]||(g[42]=u("label",{class:"label"},"Tipo",-1)),re(u("select",{"onUpdate:modelValue":g[11]||(g[11]=b=>ne.value.tipo=b),class:"input"},[...g[41]||(g[41]=[u("option",{value:"telegram"},"Telegram",-1),u("option",{value:"whatsapp"},"WhatsApp Business",-1)])],512),[[kn,ne.value.tipo]])]),ne.value.tipo==="telegram"?(k(),I("div",Gd,[g[43]||(g[43]=u("label",{class:"label"},"Bot token (de @BotFather)",-1)),re(u("input",{"onUpdate:modelValue":g[12]||(g[12]=b=>ne.value.bot_token=b),type:"password",required:"",class:"input"},null,512),[[be,ne.value.bot_token]])])):(k(),I(le,{key:1},[u("div",null,[g[44]||(g[44]=u("label",{class:"label"},"Phone Number ID",-1)),re(u("input",{"onUpdate:modelValue":g[13]||(g[13]=b=>ne.value.phone_number_id=b),required:"",class:"input"},null,512),[[be,ne.value.phone_number_id]])]),u("div",null,[g[45]||(g[45]=u("label",{class:"label"},"Access Token",-1)),re(u("input",{"onUpdate:modelValue":g[14]||(g[14]=b=>ne.value.access_token=b),type:"password",required:"",class:"input"},null,512),[[be,ne.value.access_token]])]),u("div",null,[g[46]||(g[46]=u("label",{class:"label"},"App Secret",-1)),re(u("input",{"onUpdate:modelValue":g[15]||(g[15]=b=>ne.value.app_secret=b),type:"password",required:"",class:"input"},null,512),[[be,ne.value.app_secret]])]),u("div",null,[g[47]||(g[47]=u("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),re(u("input",{"onUpdate:modelValue":g[16]||(g[16]=b=>ne.value.verify_token=b),required:"",class:"input"},null,512),[[be,ne.value.verify_token]])])],64)),u("div",qd,[u("label",Wd,[re(u("input",{type:"checkbox","onUpdate:modelValue":g[17]||(g[17]=b=>ne.value.usar_whisper_audio=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Ut,ne.value.usar_whisper_audio]]),g[48]||(g[48]=xe(" Transcribir audios con Whisper ",-1))]),u("label",zd,[re(u("input",{type:"checkbox","onUpdate:modelValue":g[18]||(g[18]=b=>ne.value.usar_ocr_imagenes=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Ut,ne.value.usar_ocr_imagenes]]),g[49]||(g[49]=xe(" Leer texto de imágenes con OCR ",-1))])]),u("div",Jd,[u("button",{type:"button",class:"btn-ghost",onClick:g[19]||(g[19]=b=>se.value=!1)},"Cancelar"),g[50]||(g[50]=u("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):ee("",!0)])):i.value==="conexiones"?(k(),I("div",Yd,[g[52]||(g[52]=u("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)),u("div",Qd,[u("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:g[21]||(g[21]=b=>p("google"))}," Conectar Google "),u("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:g[22]||(g[22]=b=>p("microsoft"))}," Conectar Outlook ")]),u("div",Xd,[te.value.length===0?(k(),I("div",Zd,"Sin cuentas conectadas.")):ee("",!0),(k(!0),I(le,null,Re(te.value,b=>(k(),I("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("span",ep,$(b.proveedor),1),u("span",tp,$(b.email),1),u("span",{class:ke(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},$(b.activo?"activa":"inactiva"),3)]),u("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:oe=>m(b)},"Desconectar",8,np)]))),128))])])):i.value==="chat"?(k(),I("div",sp,[u("div",op,[S.value.length===0?(k(),I("p",rp," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA y las mismas tools/base de conocimiento. ")):ee("",!0),(k(!0),I(le,null,Re(S.value,(b,oe)=>(k(),I("div",{key:oe,class:ke(["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"])},$(b.content),3))),128)),V.value?(k(),I("p",ip,"Pensando...")):ee("",!0)]),u("form",{class:"flex gap-2",onSubmit:Je(M,["prevent"])},[re(u("input",{"onUpdate:modelValue":g[23]||(g[23]=b=>w.value=b),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[be,w.value]]),u("button",{type:"submit",disabled:V.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,lp)],32)])):i.value==="conversaciones"?(k(),I("div",ap,[u("div",up,[G.value.length===0?(k(),I("div",cp,"Sin conversaciones.")):ee("",!0),(k(!0),I(le,null,Re(G.value,b=>(k(),I("button",{key:b.session_id,class:ke(["w-full text-left p-3 hover:bg-elevado text-sm",N.value===b.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:oe=>O(b.session_id)},[u("div",dp,$(b.content),1),u("div",pp,$(b.session_id),1)],10,fp))),128))]),u("div",hp,[N.value?ee("",!0):(k(),I("p",mp,"Elegí una conversación de la izquierda.")),(k(!0),I(le,null,Re(B.value,b=>(k(),I("div",{key:b.ID,class:ke(["max-w-[80%] px-3 py-2 rounded-lg text-sm",b.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},$(b.content),3))),128))])])):(k(),I("div",gp,[g[53]||(g[53]=u("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar al AI, a tools, a correo o a los canales. Últimos 100. ",-1)),u("div",vp,[R.value.length===0?(k(),I("div",bp,"Sin eventos registrados — buena señal.")):ee("",!0),(k(!0),I(le,null,Re(R.value,b=>(k(),I("details",{key:b.ID,class:"p-3"},[u("summary",_p,[u("span",{class:ke(["px-1.5 py-0.5 rounded text-xs shrink-0",F.value(b.nivel)])},$(b.nivel),3),u("span",xp,$(b.origen),1),u("span",yp,$(b.mensaje),1),u("span",wp,$(W(b.CreatedAt)),1)]),b.detalle?(k(),I("pre",Cp,$(b.detalle),1)):ee("",!0)]))),128))])]))])}}},Sp={class:"flex items-start justify-between gap-4 mb-6"},Ap={class:"card p-4 mb-4"},Rp={class:"flex flex-wrap items-end gap-3"},kp={class:"flex gap-1 ml-auto"},Ip={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Op={key:1,class:"text-sm text-tenue"},Pp={class:"grid gap-3 sm:grid-cols-3 mb-4"},Tp={class:"card p-4"},$p={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Np={class:"card p-4"},Dp={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Mp={class:"card p-4"},Vp={class:"text-lg font-semibold text-texto mt-1"},jp={key:0,class:"text-[11px] text-tenue mt-0.5"},Up={key:0,class:"card p-4 mb-4"},Lp={class:"flex items-center justify-between text-sm mb-2"},Fp={class:"text-tenue tabular-nums"},Hp={class:"h-2 rounded-full bg-elevado overflow-hidden"},Bp={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Kp={class:"card divide-y divide-borde mb-4"},Gp={class:"text-lg"},qp={class:"min-w-0 flex-1"},Wp={class:"text-sm text-texto"},zp={class:"text-xs text-tenue tabular-nums"},Jp={class:"text-sm font-medium text-texto tabular-nums"},Yp={key:1,class:"card p-4"},Qp={class:"flex items-end gap-1 h-28"},Xp=["title"],Zp={class:"flex justify-between text-[11px] text-tenue mt-2"},eh={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=Q(!0),s=Q(""),o=Q(null),r=new Date,i=Q(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),l=Q(r.toISOString().slice(0,10)),a={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"}},d=O=>a[O]||{nombre:O,icono:"•",color:"#94a3b8"};async function c(){n.value=!0,s.value="";try{o.value=await ie.get(ue(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${l.value}`))}catch(O){s.value=O.message}finally{n.value=!1}}const h=_e(()=>{var O,A;return((A=(O=o.value)==null?void 0:O.plan)==null?void 0:A.moneda)||"COP"}),v=_e(()=>{var O;return((O=o.value)==null?void 0:O.resumen)||[]}),_=_e(()=>{var O;return((O=o.value)==null?void 0:O.total_periodo)||0}),U=_e(()=>{var O,A;return((A=(O=o.value)==null?void 0:O.plan)==null?void 0:A.tope_consumo_mensual)||0}),P=_e(()=>U.value?Math.min(100,_.value/U.value*100):0);function G(O){return`${h.value} ${Number(O||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function B(O){return Number(O||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const N=_e(()=>{var X;const O=new Map;for(const x of((X=o.value)==null?void 0:X.detalle)||[]){const j=String(x.CreatedAt).slice(0,10);O.set(j,(O.get(j)||0)+(x.costo||0))}const A=[...O.entries()].sort((x,j)=>x[0].localeCompare(j[0])),D=Math.max(...A.map(x=>x[1]),0);return{dias:A,max:D}});function H(O){const A=new Date,D=new Date;D.setDate(D.getDate()-O),i.value=D.toISOString().slice(0,10),l.value=A.toISOString().slice(0,10),c()}return $n(c),(O,A)=>{var X;const D=Nn("router-link");return k(),I("div",null,[u("div",Sp,[A[6]||(A[6]=u("div",null,[u("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),u("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),we(D,{to:`/tenants/${e.id}`,class:"btn-ghost"},{default:Nt(()=>[...A[5]||(A[5]=[xe("← Agentes",-1)])]),_:1},8,["to"])]),u("div",Ap,[u("div",Rp,[u("div",null,[A[7]||(A[7]=u("label",{class:"label"},"Desde",-1)),re(u("input",{"onUpdate:modelValue":A[0]||(A[0]=x=>i.value=x),type:"date",class:"input !w-auto"},null,512),[[be,i.value]])]),u("div",null,[A[8]||(A[8]=u("label",{class:"label"},"Hasta",-1)),re(u("input",{"onUpdate:modelValue":A[1]||(A[1]=x=>l.value=x),type:"date",class:"input !w-auto"},null,512),[[be,l.value]])]),u("button",{class:"btn-primary",onClick:c},"Aplicar"),u("div",kp,[u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[2]||(A[2]=x=>H(6))},"7 días"),u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[3]||(A[3]=x=>H(29))},"30 días"),u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:A[4]||(A[4]=x=>H(89))},"90 días")])])]),s.value?(k(),I("p",Ip,$(s.value),1)):ee("",!0),n.value?(k(),I("p",Op,"Cargando…")):o.value?(k(),I(le,{key:2},[u("div",Pp,[u("div",Tp,[A[9]||(A[9]=u("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),u("p",$p,$(G(_.value)),1)]),u("div",Np,[A[10]||(A[10]=u("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),u("p",Dp,$(G(o.value.pendiente_facturar)),1),A[11]||(A[11]=u("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),u("div",Mp,[A[12]||(A[12]=u("p",{class:"text-xs text-tenue"},"Plan",-1)),u("p",Vp,$(((X=o.value.plan)==null?void 0:X.nombre)||"Sin plan"),1),o.value.plan?(k(),I("p",jp," Mensualidad "+$(G(o.value.plan.precio_mensual)),1)):ee("",!0)])]),U.value?(k(),I("div",Up,[u("div",Lp,[A[13]||(A[13]=u("span",{class:"text-texto"},"Tope mensual",-1)),u("span",Fp,$(G(_.value))+" / "+$(G(U.value)),1)]),u("div",Hp,[u("div",{class:ke(["h-full rounded-full transition-all duration-500",P.value>=100?"bg-red-500":P.value>=80?"bg-amber-500":"bg-brand"]),style:Bt({width:P.value+"%"})},null,6)]),P.value>=100?(k(),I("p",Bp," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):ee("",!0)])):ee("",!0),u("div",Kp,[A[14]||(A[14]=u("div",{class:"px-4 py-3"},[u("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),v.value.length===0?(k(),tn(Di,{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á."})):ee("",!0),(k(!0),I(le,null,Re(v.value,x=>(k(),I("div",{key:x.tipo,class:"px-4 py-3 flex items-center gap-3"},[u("span",Gp,$(d(x.tipo).icono),1),u("div",qp,[u("p",Wp,$(d(x.tipo).nombre),1),u("p",zp,$(B(x.cantidad))+" "+$(x.unidad)+" · "+$(B(x.eventos))+" usos ",1)]),u("span",Jp,$(G(x.costo)),1)]))),128))]),N.value.dias.length?(k(),I("div",Yp,[A[15]||(A[15]=u("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),u("div",Qp,[(k(!0),I(le,null,Re(N.value.dias,([x,j])=>(k(),I("div",{key:x,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:Bt({height:N.value.max?Math.max(2,j/N.value.max*100)+"%":"2px"}),title:`${x}: ${G(j)}`},null,12,Xp))),128))]),u("div",Zp,[u("span",null,$(N.value.dias[0][0]),1),u("span",null,$(N.value.dias[N.value.dias.length-1][0]),1)])])):ee("",!0)],64)):ee("",!0)])}}},th=fc({history:Bu(Xe.baseRuta),routes:[{path:"/",name:"home",component:qc},{path:"/tenants/:id",name:"tenant-agentes",component:Mf,props:!0},{path:"/tenants/:id/uso",name:"uso",component:eh,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:Ep,props:!0}]});su(Hc).use(th).mount("#app");
|