AgenteDetail tenía 1026 líneas con las siete pestañas adentro: el estado de todas mezclado en un solo <script setup>, y cualquier cambio en una obligaba a leer las otras seis para saber qué se rompía. Reorganizarla en ese estado sería trabajar a ciegas. Queda en 514 líneas —el encabezado, las pestañas y la carga de datos— más un componente por zona: conocimiento sigue adentro por ahora, y salen auditoría, conexiones, chat, conversaciones, herramientas y canales. El padre sigue siendo dueño de los datos y cada pestaña emite "recargar" en vez de tener su propia copia: con copias por pestaña, ir y volver entre dos mostraba estados distintos de lo mismo. Sin un solo cambio visible, y verificado como tal: se capturaron las siete pestañas antes de empezar y se compararon píxel a píxel después de cada extracción. Las siete dan idénticas — la única diferencia que reporta el comparador está por debajo del umbral y cae exactamente sobre el punto que late en una fuente "procesando", o sea la animación fotografiada en otro instante. Este commit no cambia nada para el usuario. Es la base para poder reorganizar la pantalla sin romperla. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
27 lines
169 KiB
JavaScript
27 lines
169 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={},en=[],bt=()=>{},br=()=>!1,os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),rs=e=>e.startsWith("onUpdate:"),De=Object.assign,Ys=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Wi=Object.prototype.hasOwnProperty,pe=(e,t)=>Wi.call(e,t),Q=Array.isArray,tn=e=>Nn(e)==="[object Map]",pn=e=>Nn(e)==="[object Set]",_o=e=>Nn(e)==="[object Date]",ne=e=>typeof e=="function",Ce=e=>typeof e=="string",rt=e=>typeof e=="symbol",me=e=>e!==null&&typeof e=="object",xr=e=>(me(e)||ne(e))&&ne(e.then)&&ne(e.catch),yr=Object.prototype.toString,Nn=e=>yr.call(e),zi=e=>Nn(e).slice(8,-1),_r=e=>Nn(e)==="[object Object]",Zs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wn=Qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),is=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ji=/-\w/g,Ke=is(e=>e.replace(Ji,t=>t.slice(1).toUpperCase())),Qi=/\B([A-Z])/g,Qt=is(e=>e.replace(Qi,"-$1").toLowerCase()),ls=is(e=>e.charAt(0).toUpperCase()+e.slice(1)),_s=is(e=>e?`on${ls(e)}`:""),gt=(e,t)=>!Object.is(e,t),Gn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},wr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},as=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let wo;const us=()=>wo||(wo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jt(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Ce(s)?el(s):Jt(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ce(e)||me(e))return e}const Yi=/;(?![^(]*\))/g,Zi=/:([^]+)/,Xi=/\/\*[^]*?\*\//g;function el(e){const t={};return e.replace(Xi,"").split(Yi).forEach(n=>{if(n){const s=n.split(Zi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function _e(e){let t="";if(Ce(e))t=e;else if(Q(e))for(let n=0;n<e.length;n++){const s=_e(e[n]);s&&(t+=s+" ")}else if(me(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const tl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",nl=Qs(tl);function Cr(e){return!!e||e===""}function sl(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ft(e[s],t[s]);return n}function Ft(e,t){if(e===t)return!0;let n=_o(e),s=_o(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=rt(e),s=rt(t),n||s)return e===t;if(n=Q(e),s=Q(t),n||s)return n&&s?sl(e,t):!1;if(n=me(e),s=me(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const l=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(l&&!u||!l&&u||!Ft(e[i],t[i]))return!1}}return String(e)===String(t)}function Xs(e,t){return e.findIndex(n=>Ft(n,t))}const kr=e=>!!(e&&e.__v_isRef===!0),O=e=>Ce(e)?e:e==null?"":Q(e)||me(e)&&(e.toString===yr||!ne(e.toString))?kr(e)?O(e.value):JSON.stringify(e,Ar,2):String(e),Ar=(e,t)=>kr(t)?Ar(e,t.value):tn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[ws(s,r)+" =>"]=o,n),{})}:pn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ws(n))}:rt(t)?ws(t):me(t)&&!Q(t)&&!_r(t)?String(t):t,ws=(e,t="")=>{var n;return rt(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 Oe;class ol{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&&Oe&&(Oe.active?(this.parent=Oe,this.index=(Oe.scopes||(Oe.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=Oe;try{return Oe=this,t()}finally{Oe=n}}}on(){++this._on===1&&(this.prevScope=Oe,Oe=this)}off(){if(this._on>0&&--this._on===0){if(Oe===this)Oe=this.prevScope;else{let t=Oe;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 rl(){return Oe}let be;const Cs=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,Oe&&(Oe.active?Oe.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Cs.has(this)&&(Cs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Sr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Co(this),Ir(this);const t=be,n=st;be=this,st=!0;try{return this.fn()}finally{Rr(this),be=t,st=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)no(t);this.deps=this.depsTail=void 0,Co(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Cs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ns(this)&&this.run()}get dirty(){return Ns(this)}}let Er=0,Cn,kn;function Sr(e,t=!1){if(e.flags|=8,t){e.next=kn,kn=e;return}e.next=Cn,Cn=e}function eo(){Er++}function to(){if(--Er>0)return;if(kn){let t=kn;for(kn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Cn;){let t=Cn;for(Cn=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 Ir(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Rr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),no(s),il(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ns(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Pr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Pr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Sn)||(e.globalVersion=Sn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ns(e))))return;e.flags|=2;const t=e.dep,n=be,s=st;be=e,st=!0;try{Ir(e);const o=e.fn(e._value);(t.version===0||gt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{be=n,st=s,Rr(e),e.flags&=-3}}function no(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)no(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function il(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let st=!0;const Tr=[];function Tt(){Tr.push(st),st=!1}function Ot(){const e=Tr.pop();st=e===void 0?!0:e}function Co(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=be;be=void 0;try{t()}finally{be=n}}}let Sn=0;class ll{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 so{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(!be||!st||be===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==be)n=this.activeLink=new ll(be,this),be.deps?(n.prevDep=be.depsTail,be.depsTail.nextDep=n,be.depsTail=n):be.deps=be.depsTail=n,Or(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=be.depsTail,n.nextDep=void 0,be.depsTail.nextDep=n,be.depsTail=n,be.deps===n&&(be.deps=s)}return n}trigger(t){this.version++,Sn++,this.notify(t)}notify(t){eo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{to()}}}function Or(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)Or(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Vs=new WeakMap,Wt=Symbol(""),js=Symbol(""),In=Symbol("");function je(e,t,n){if(st&&be){let s=Vs.get(e);s||Vs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new so),o.map=s,o.key=n),o.track()}}function $t(e,t,n,s,o,r){const i=Vs.get(e);if(!i){Sn++;return}const l=u=>{u&&u.trigger()};if(eo(),t==="clear")i.forEach(l);else{const u=Q(e),f=u&&Zs(n);if(u&&n==="length"){const d=Number(s);i.forEach((p,h)=>{(h==="length"||h===In||!rt(h)&&h>=d)&&l(p)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),f&&l(i.get(In)),t){case"add":u?f&&l(i.get("length")):(l(i.get(Wt)),tn(e)&&l(i.get(js)));break;case"delete":u||(l(i.get(Wt)),tn(e)&&l(i.get(js)));break;case"set":tn(e)&&l(i.get(Wt));break}}to()}function Yt(e){const t=fe(e);return t===e?t:(je(t,"iterate",In),tt(e)?t:t.map(it))}function cs(e){return je(e=fe(e),"iterate",In),e}function ht(e,t){return Mt(e)?ln(zt(e)?it(t):t):it(t)}const al={__proto__:null,[Symbol.iterator](){return ks(this,Symbol.iterator,e=>ht(this,e))},concat(...e){return Yt(this).concat(...e.map(t=>Q(t)?Yt(t):t))},entries(){return ks(this,"entries",e=>(e[1]=ht(this,e[1]),e))},every(e,t){return wt(this,"every",e,t,void 0,arguments)},filter(e,t){return wt(this,"filter",e,t,n=>n.map(s=>ht(this,s)),arguments)},find(e,t){return wt(this,"find",e,t,n=>ht(this,n),arguments)},findIndex(e,t){return wt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return wt(this,"findLast",e,t,n=>ht(this,n),arguments)},findLastIndex(e,t){return wt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return wt(this,"forEach",e,t,void 0,arguments)},includes(...e){return As(this,"includes",e)},indexOf(...e){return As(this,"indexOf",e)},join(e){return Yt(this).join(e)},lastIndexOf(...e){return As(this,"lastIndexOf",e)},map(e,t){return wt(this,"map",e,t,void 0,arguments)},pop(){return vn(this,"pop")},push(...e){return vn(this,"push",e)},reduce(e,...t){return ko(this,"reduce",e,t)},reduceRight(e,...t){return ko(this,"reduceRight",e,t)},shift(){return vn(this,"shift")},some(e,t){return wt(this,"some",e,t,void 0,arguments)},splice(...e){return vn(this,"splice",e)},toReversed(){return Yt(this).toReversed()},toSorted(e){return Yt(this).toSorted(e)},toSpliced(...e){return Yt(this).toSpliced(...e)},unshift(...e){return vn(this,"unshift",e)},values(){return ks(this,"values",e=>ht(this,e))}};function ks(e,t,n){const s=cs(e),o=s[t]();return s!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const ul=Array.prototype;function wt(e,t,n,s,o,r){const i=cs(e),l=i!==e&&!tt(e),u=i[t];if(u!==ul[t]){const p=u.apply(e,r);return l?it(p):p}let f=n;i!==e&&(l?f=function(p,h){return n.call(this,ht(e,p),h,e)}:n.length>2&&(f=function(p,h){return n.call(this,p,h,e)}));const d=u.call(i,f,s);return l&&o?o(d):d}function ko(e,t,n,s){const o=cs(e),r=o!==e&&!tt(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(f,d,p){return l&&(l=!1,f=ht(e,f)),n.call(this,f,ht(e,d),p,e)}):n.length>3&&(i=function(f,d,p){return n.call(this,f,d,p,e)}));const u=o[t](i,...s);return l?ht(e,u):u}function As(e,t,n){const s=fe(e);je(s,"iterate",In);const o=s[t](...n);return(o===-1||o===!1)&&io(n[0])?(n[0]=fe(n[0]),s[t](...n)):o}function vn(e,t,n=[]){Tt(),eo();const s=fe(e)[t].apply(e,n);return to(),Ot(),s}const cl=Qs("__proto__,__v_isRef,__isVue"),Mr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(rt));function dl(e){rt(e)||(e=String(e));const t=fe(this);return je(t,"has",e),t.hasOwnProperty(e)}class Dr{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?_l:Ur:r?jr:Vr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Q(t);if(!o){let u;if(i&&(u=al[n]))return u;if(n==="hasOwnProperty")return dl}const l=Reflect.get(t,n,Le(t)?t:s);if((rt(n)?Mr.has(n):cl(n))||(o||je(t,"get",n),r))return l;if(Le(l)){const u=i&&Zs(n)?l:l.value;return o&&me(u)?Ls(u):u}return me(l)?o?Ls(l):ds(l):l}}class Nr extends Dr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=Q(t)&&Zs(n);if(!this._isShallow){const f=Mt(r);if(!tt(s)&&!Mt(s)&&(r=fe(r),s=fe(s)),!i&&Le(r)&&!Le(s))return f||(r.value=s),!0}const l=i?Number(n)<t.length:pe(t,n),u=Reflect.set(t,n,s,Le(t)?t:o);return t===fe(o)&&u&&(l?gt(s,r)&&$t(t,"set",n,s):$t(t,"add",n,s)),u}deleteProperty(t,n){const s=pe(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&$t(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!rt(n)||!Mr.has(n))&&je(t,"has",n),s}ownKeys(t){return je(t,"iterate",Q(t)?"length":Wt),Reflect.ownKeys(t)}}class fl extends Dr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const pl=new Nr,ml=new fl,hl=new Nr(!0);const Us=e=>e,Un=e=>Reflect.getPrototypeOf(e);function vl(e,t,n){return function(...s){const o=this.__v_raw,r=fe(o),i=tn(r),l=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,f=o[e](...s),d=n?Us:t?ln:it;return!t&&je(r,"iterate",u?js:Wt),De(Object.create(f),{next(){const{value:p,done:h}=f.next();return h?{value:p,done:h}:{value:l?[d(p[0]),d(p[1])]:d(p),done:h}}})}}function Ln(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function gl(e,t){const n={get(o){const r=this.__v_raw,i=fe(r),l=fe(o);e||(gt(o,l)&&je(i,"get",o),je(i,"get",l));const{has:u}=Un(i),f=t?Us:e?ln:it;if(u.call(i,o))return f(r.get(o));if(u.call(i,l))return f(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&je(fe(o),"iterate",Wt),o.size},has(o){const r=this.__v_raw,i=fe(r),l=fe(o);return e||(gt(o,l)&&je(i,"has",o),je(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,u=fe(l),f=t?Us:e?ln:it;return!e&&je(u,"iterate",Wt),l.forEach((d,p)=>o.call(r,f(d),f(p),i))}};return De(n,e?{add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear")}:{add(o){const r=fe(this),i=Un(r),l=fe(o),u=!t&&!tt(o)&&!Mt(o)?l:o;return i.has.call(r,u)||gt(o,u)&&i.has.call(r,o)||gt(l,u)&&i.has.call(r,l)||(r.add(u),$t(r,"add",u,u)),this},set(o,r){!t&&!tt(r)&&!Mt(r)&&(r=fe(r));const i=fe(this),{has:l,get:u}=Un(i);let f=l.call(i,o);f||(o=fe(o),f=l.call(i,o));const d=u.call(i,o);return i.set(o,r),f?gt(r,d)&&$t(i,"set",o,r):$t(i,"add",o,r),this},delete(o){const r=fe(this),{has:i,get:l}=Un(r);let u=i.call(r,o);u||(o=fe(o),u=i.call(r,o)),l&&l.call(r,o);const f=r.delete(o);return u&&$t(r,"delete",o,void 0),f},clear(){const o=fe(this),r=o.size!==0,i=o.clear();return r&&$t(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=vl(o,e,t)}),n}function oo(e,t){const n=gl(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(pe(n,o)&&o in s?n:s,o,r)}const bl={get:oo(!1,!1)},xl={get:oo(!1,!0)},yl={get:oo(!0,!1)};const Vr=new WeakMap,jr=new WeakMap,Ur=new WeakMap,_l=new WeakMap;function wl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return Mt(e)?e:ro(e,!1,pl,bl,Vr)}function Lr(e){return ro(e,!1,hl,xl,jr)}function Ls(e){return ro(e,!0,ml,yl,Ur)}function ro(e,t,n,s,o){if(!me(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=wl(zi(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function zt(e){return Mt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function io(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function Cl(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&wr(e,"__v_skip",!0),e}const it=e=>me(e)?ds(e):e,ln=e=>me(e)?Ls(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function H(e){return Fr(e,!1)}function kl(e){return Fr(e,!0)}function Fr(e,t){return Le(e)?e:new Al(e,t)}class Al{constructor(t,n){this.dep=new so,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:it(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||tt(t)||Mt(t);t=s?t:fe(t),gt(t,n)&&(this._rawValue=t,this._value=s?t:it(t),this.dep.trigger())}}function Re(e){return Le(e)?e.value:e}const $l={get:(e,t,n)=>t==="__v_raw"?e:Re(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Le(o)&&!Le(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function qr(e){return zt(e)?e:new Proxy(e,$l)}class El{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new so(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Sn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&be!==this)return Sr(this,!0),!0}get value(){const t=this.dep.track();return Pr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Sl(e,t,n=!1){let s,o;return ne(e)?s=e:(s=e.get,o=e.set),new El(s,o,n)}const Fn={},Jn=new WeakMap;let Gt;function Il(e,t=!1,n=Gt){if(n){let s=Jn.get(n);s||Jn.set(n,s=[]),s.push(e)}}function Rl(e,t,n=ge){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:u}=n,f=b=>o?b:tt(b)||o===!1||o===0?Et(b,1):Et(b);let d,p,h,x,T=!1,w=!1;if(Le(e)?(p=()=>e.value,T=tt(e)):zt(e)?(p=()=>f(e),T=!0):Q(e)?(w=!0,T=e.some(b=>zt(b)||tt(b)),p=()=>e.map(b=>{if(Le(b))return b.value;if(zt(b))return f(b);if(ne(b))return u?u(b,2):b()})):ne(e)?t?p=u?()=>u(e,2):e:p=()=>{if(h){Tt();try{h()}finally{Ot()}}const b=Gt;Gt=d;try{return u?u(e,3,[x]):e(x)}finally{Gt=b}}:p=bt,t&&o){const b=p,v=o===!0?1/0:o;p=()=>Et(b(),v)}const P=rl(),V=()=>{d.stop(),P&&P.active&&Ys(P.effects,d)};if(r&&t){const b=t;t=(...v)=>{const D=b(...v);return V(),D}}let A=w?new Array(e.length).fill(Fn):Fn;const _=b=>{if(!(!(d.flags&1)||!d.dirty&&!b))if(t){const v=d.run();if(b||o||T||(w?v.some((D,j)=>gt(D,A[j])):gt(v,A))){h&&h();const D=Gt;Gt=d;try{const j=[v,A===Fn?void 0:w&&A[0]===Fn?[]:A,x];A=v,u?u(t,3,j):t(...j)}finally{Gt=D}}}else d.run()};return l&&l(_),d=new $r(p),d.scheduler=i?()=>i(_,!1):_,x=b=>Il(b,!1,d),h=d.onStop=()=>{const b=Jn.get(d);if(b){if(u)u(b,4);else for(const v of b)v();Jn.delete(d)}},t?s?_(!0):A=d.run():i?i(_.bind(null,!0),!0):d.run(),V.pause=d.pause.bind(d),V.resume=d.resume.bind(d),V.stop=V,V}function Et(e,t=1/0,n){if(t<=0||!me(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Le(e))Et(e.value,t,n);else if(Q(e))for(let s=0;s<e.length;s++)Et(e[s],t,n);else if(pn(e)||tn(e))e.forEach(s=>{Et(s,t,n)});else if(_r(e)){for(const s in e)Et(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Et(e[s],t,n)}return e}/**
|
|
* @vue/runtime-core v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Vn(e,t,n,s){try{return s?e(...s):e()}catch(o){fs(o,t,n)}}function lt(e,t,n,s){if(ne(e)){const o=Vn(e,t,n,s);return o&&xr(o)&&o.catch(r=>{fs(r,t,n)}),o}if(Q(e)){const o=[];for(let r=0;r<e.length;r++)o.push(lt(e[r],t,n,s));return o}}function fs(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 u=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const d=l.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,u,f)===!1)return}l=l.parent}if(r){Tt(),Vn(r,null,10,[e,u,f]),Ot();return}}Pl(e,n,o,s,i)}function Pl(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const He=[];let mt=-1;const nn=[];let Ut=null,Zt=0;const Hr=Promise.resolve();let Qn=null;function lo(e){const t=Qn||Hr;return e?t.then(this?e.bind(this):e):t}function Tl(e){let t=mt+1,n=He.length;for(;t<n;){const s=t+n>>>1,o=He[s],r=Rn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function ao(e){if(!(e.flags&1)){const t=Rn(e),n=He[He.length-1];!n||!(e.flags&2)&&t>=Rn(n)?He.push(e):He.splice(Tl(t),0,e),e.flags|=1,Br()}}function Br(){Qn||(Qn=Hr.then(Kr))}function Ol(e){if(!Q(e))Ut&&e.id===-1?Ut.splice(Zt+1,0,e):e.flags&1||(nn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)nn.push(e[t]);Br()}function Ao(e,t,n=mt+1){for(;n<He.length;n++){const s=He[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;He.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Gr(e){if(nn.length){const t=[...new Set(nn)].sort((n,s)=>Rn(n)-Rn(s));if(nn.length=0,Ut){for(let n=0;n<t.length;n++)Ut.push(t[n]);return}for(Ut=t,Zt=0;Zt<Ut.length;Zt++){const n=Ut[Zt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ut=null,Zt=0}}const Rn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Kr(e){try{for(mt=0;mt<He.length;mt++){const t=He[mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Vn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mt<He.length;mt++){const t=He[mt];t&&(t.flags&=-2)}mt=-1,He.length=0,Gr(),Qn=null,(He.length||nn.length)&&Kr()}}let Me=null,Wr=null;function Yn(e){const t=Me;return Me=e,Wr=e&&e.type.__scopeId||null,t}function nt(e,t=Me,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&es(-1);const r=Yn(t),i=Rt.length;let l;try{l=e(...o)}finally{for(let u=Rt.length;u>i;u--)mo();Yn(r),s._d&&es(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Z(e,t){if(Me===null)return e;const n=bs(Me),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,l,u=ge]=t[o];r&&(ne(r)&&(r={mounted:r,updated:r}),r.deep&&Et(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:l,modifiers:u}))}return e}function Ht(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let u=l.dir[s];u&&(Tt(),lt(u,n,8,[e.el,l,e,t]),Ot())}}function Kn(e,t){if(Ue){let n=Ue.provides;const s=Ue.parent&&Ue.parent.provides;s===n&&(n=Ue.provides=Object.create(s)),n[e]=t}}function ot(e,t,n=!1){const s=Sa();if(s||on){let o=on?on._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&&ne(t)?t.call(s&&s.proxy):t}}const Ml=Symbol.for("v-scx"),Dl=()=>ot(Ml);function It(e,t,n){return zr(e,t,n)}function zr(e,t,n=ge){const{immediate:s,deep:o,flush:r,once:i}=n,l=De({},n),u=t&&s||!t&&r!=="post";let f;if(Mn){if(r==="sync"){const x=Dl();f=x.__watcherHandles||(x.__watcherHandles=[])}else if(!u){const x=()=>{};return x.stop=bt,x.resume=bt,x.pause=bt,x}}const d=Ue;l.call=(x,T,w)=>lt(x,d,T,w);let p=!1;r==="post"?l.scheduler=x=>{ze(x,d&&d.suspense)}:r!=="sync"&&(p=!0,l.scheduler=(x,T)=>{T?x():ao(x)}),l.augmentJob=x=>{t&&(x.flags|=4),p&&(x.flags|=2,d&&(x.id=d.uid,x.i=d))};const h=Rl(e,t,l);return Mn&&(f?f.push(h):u&&h()),h}function Nl(e,t,n){const s=this.proxy,o=Ce(e)?e.includes(".")?Jr(s,e):()=>s[e]:e.bind(s,s);let r;ne(t)?r=t:(r=t.handler,n=t);const i=jn(this),l=zr(o,r.bind(s),n);return i(),l}function Jr(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 Vl=Symbol("_vte"),ps=e=>e.__isTeleport,$s=Symbol("_leaveCb");function jl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xt){t=n;break}}return t}function Qr(e){if(!co(e))return ps(e.type)&&e.children?jl(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&&ne(n.default))return n.default()}}function uo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;uo(ps(n.type)&&Qr(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 Yr(e,t){return ne(e)?De({name:e.name},t,{setup:e}):e}function Zr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function $o(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Zn=new WeakMap;function An(e,t,n,s,o=!1){if(Q(e)){e.forEach((w,P)=>An(w,t&&(Q(t)?t[P]:t),n,s,o));return}if(sn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&An(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?bs(s.component):s.el,i=o?null:r,{i:l,r:u}=e,f=t&&t.r,d=l.refs===ge?l.refs={}:l.refs,p=l.setupState,h=fe(p),x=p===ge?br:w=>$o(d,w)?!1:pe(h,w),T=(w,P)=>!(P&&$o(d,P));if(f!=null&&f!==u){if(Eo(t),Ce(f))d[f]=null,x(f)&&(p[f]=null);else if(Le(f)){const w=t;T(f,w.k)&&(f.value=null),w.k&&(d[w.k]=null)}}if(ne(u))Vn(u,l,12,[i,d]);else{const w=Ce(u),P=Le(u);if(w||P){const V=()=>{if(e.f){const A=w?x(u)?p[u]:d[u]:T()||!e.k?u.value:d[e.k];if(o)Q(A)&&Ys(A,r);else if(Q(A))A.includes(r)||A.push(r);else if(w)d[u]=[r],x(u)&&(p[u]=d[u]);else{const _=[r];T(u,e.k)&&(u.value=_),e.k&&(d[e.k]=_)}}else w?(d[u]=i,x(u)&&(p[u]=i)):P&&(T(u,e.k)&&(u.value=i),e.k&&(d[e.k]=i))};if(i){const A=()=>{V(),Zn.delete(e)};A.id=-1,Zn.set(e,A),ze(A,n)}else Eo(e),V()}}}function Eo(e){const t=Zn.get(e);t&&(t.flags|=8,Zn.delete(e))}us().requestIdleCallback;us().cancelIdleCallback;const sn=e=>!!e.type.__asyncLoader,co=e=>e.type.__isKeepAlive;function Ul(e,t){Xr(e,"a",t)}function Ll(e,t){Xr(e,"da",t)}function Xr(e,t,n=Ue){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ms(t,s,n),n){let o=n.parent;for(;o&&o.parent;)co(o.parent.vnode)&&Fl(s,t,n,o),o=o.parent}}function Fl(e,t,n,s){const o=ms(t,e,s,!0);ti(()=>{Ys(s[t],o)},n)}function ms(e,t,n=Ue,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Tt();const l=jn(n),u=lt(t,n,e,i);return l(),Ot(),u});return s?o.unshift(r):o.push(r),r}}const Dt=e=>(t,n=Ue)=>{(!Mn||e==="sp")&&ms(e,(...s)=>t(...s),n)},ql=Dt("bm"),hs=Dt("m"),Hl=Dt("bu"),Bl=Dt("u"),ei=Dt("bum"),ti=Dt("um"),Gl=Dt("sp"),Kl=Dt("rtg"),Wl=Dt("rtc");function zl(e,t=Ue){ms("ec",e,t)}const ni="components";function mn(e,t){return oi(ni,e,!0,t)||e}const si=Symbol.for("v-ndc");function Jl(e){return Ce(e)?oi(ni,e,!1)||e:e||si}function oi(e,t,n=!0,s=!1){const o=Me||Ue;if(o){const r=o.type;{const l=Oa(r,!1);if(l&&(l===t||l===Ke(t)||l===ls(Ke(t))))return r}const i=So(o[e]||r[e],t)||So(o.appContext[e],t);return!i&&s?r:i}}function So(e,t){return e&&(e[t]||e[Ke(t)]||e[ls(Ke(t))])}function we(e,t,n,s){let o;const r=n,i=Q(e);if(i||Ce(e)){const l=i&&zt(e);let u=!1,f=!1;l&&(u=!tt(e),f=Mt(e),e=cs(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(u?f?ln(it(e[d])):it(e[d]):e[d],d,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(me(e))if(e[Symbol.iterator])o=Array.from(e,(l,u)=>t(l,u,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let u=0,f=l.length;u<f;u++){const d=l[u];o[u]=t(e[d],d,u,r)}}else o=[];return o}function Ql(e,t,n,s,o,r){if(n==null&&(n={}),Me.ce||Me.parent&&sn(Me.parent)&&Me.parent.ce){const f=n,d=Object.keys(f).length>0;return y(),$e(re,null,[oe("slot",f,s)],d?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Rt.length;y();let u;try{const f=i&&ri(i(n)),d=n.key||r||f&&f.key;u=$e(re,{key:(d&&!rt(d)?d:`_${t}`)+(!f&&s?"_fb":"")},f||(s?s():[]),f&&e._===1?64:-2)}catch(f){for(let d=Rt.length;d>l;d--)mo();throw f}finally{i&&i._c&&(i._d=!0)}return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),u}function ri(e){return e.some(t=>Tn(t)?!(t.type===xt||t.type===re&&!ri(t.children)):!0)?e:null}const Fs=e=>e?Ei(e)?bs(e):Fs(e.parent):null,$n=De(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=>Fs(e.parent),$root:e=>Fs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||(e.f=()=>{ao(e.update)}),$nextTick:e=>e.n||(e.n=lo.bind(e.proxy)),$watch:e=>Nl.bind(e)}),Es=(e,t)=>e!==ge&&!e.__isScriptSetup&&pe(e,t),Yl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:u}=e;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Es(s,t))return i[t]=1,s[t];if(o!==ge&&pe(o,t))return i[t]=2,o[t];if(pe(r,t))return i[t]=3,r[t];if(n!==ge&&pe(n,t))return i[t]=4,n[t];qs&&(i[t]=0)}}const f=$n[t];let d,p;if(f)return t==="$attrs"&&je(e.attrs,"get",""),f(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==ge&&pe(n,t))return i[t]=4,n[t];if(p=u.config.globalProperties,pe(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Es(o,t)?(o[t]=n,!0):s!==ge&&pe(s,t)?(s[t]=n,!0):pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:i}},l){let u;return!!(n[l]||e!==ge&&l[0]!=="$"&&pe(e,l)||Es(t,l)||pe(r,l)||pe(s,l)||pe($n,l)||pe(o.config.globalProperties,l)||(u=i.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Io(e){return Q(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qs=!0;function Zl(e){const t=li(e),n=e.proxy,s=e.ctx;qs=!1,t.beforeCreate&&Ro(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:u,inject:f,created:d,beforeMount:p,mounted:h,beforeUpdate:x,updated:T,activated:w,deactivated:P,beforeDestroy:V,beforeUnmount:A,destroyed:_,unmounted:b,render:v,renderTracked:D,renderTriggered:j,errorCaptured:U,serverPrefetch:ye,expose:Y,inheritAttrs:F,components:Ee,directives:G,filters:We}=t;if(f&&Xl(f,s,null),i)for(const ce in i){const le=i[ce];ne(le)&&(s[ce]=le.bind(n))}if(o){const ce=o.call(n,n);me(ce)&&(e.data=ds(ce))}if(qs=!0,r)for(const ce in r){const le=r[ce],Xe=ne(le)?le.bind(n,n):ne(le.get)?le.get.bind(n,n):bt,et=!ne(le)&&ne(le.set)?le.set.bind(n):bt,Je=xe({get:Xe,set:et});Object.defineProperty(s,ce,{enumerable:!0,configurable:!0,get:()=>Je.value,set:Ne=>Je.value=Ne})}if(l)for(const ce in l)ii(l[ce],s,n,ce);if(u){const ce=ne(u)?u.call(n):u;Reflect.ownKeys(ce).forEach(le=>{Kn(le,ce[le])})}d&&Ro(d,e,"c");function ke(ce,le){Q(le)?le.forEach(Xe=>ce(Xe.bind(n))):le&&ce(le.bind(n))}if(ke(ql,p),ke(hs,h),ke(Hl,x),ke(Bl,T),ke(Ul,w),ke(Ll,P),ke(zl,U),ke(Wl,D),ke(Kl,j),ke(ei,A),ke(ti,b),ke(Gl,ye),Q(Y))if(Y.length){const ce=e.exposed||(e.exposed={});Y.forEach(le=>{Object.defineProperty(ce,le,{get:()=>n[le],set:Xe=>n[le]=Xe,enumerable:!0})})}else e.exposed||(e.exposed={});v&&e.render===bt&&(e.render=v),F!=null&&(e.inheritAttrs=F),Ee&&(e.components=Ee),G&&(e.directives=G),ye&&Zr(e)}function Xl(e,t,n=bt){Q(e)&&(e=Hs(e));for(const s in e){const o=e[s];let r;me(o)?"default"in o?r=ot(o.from||s,o.default,!0):r=ot(o.from||s):r=ot(o),Le(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function Ro(e,t,n){lt(Q(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ii(e,t,n,s){let o=s.includes(".")?Jr(n,s):()=>n[s];if(Ce(e)){const r=t[e];ne(r)&&It(o,r)}else if(ne(e))It(o,e.bind(n));else if(me(e))if(Q(e))e.forEach(r=>ii(r,t,n,s));else{const r=ne(e.handler)?e.handler.bind(n):t[e.handler];ne(r)&&It(o,r,e)}}function li(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let u;return l?u=l:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(f=>Xn(u,f,i,!0)),Xn(u,t,i)),me(t)&&r.set(t,u),u}function Xn(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Xn(e,r,n,!0),o&&o.forEach(i=>Xn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=ea[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ea={data:Po,props:To,emits:To,methods:xn,computed:xn,beforeCreate:Fe,created:Fe,beforeMount:Fe,mounted:Fe,beforeUpdate:Fe,updated:Fe,beforeDestroy:Fe,beforeUnmount:Fe,destroyed:Fe,unmounted:Fe,activated:Fe,deactivated:Fe,errorCaptured:Fe,serverPrefetch:Fe,components:xn,directives:xn,watch:na,provide:Po,inject:ta};function Po(e,t){return t?e?function(){return De(ne(e)?e.call(this,this):e,ne(t)?t.call(this,this):t)}:t:e}function ta(e,t){return xn(Hs(e),Hs(t))}function Hs(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fe(e,t){return e?[...new Set([].concat(e,t))]:t}function xn(e,t){return e?De(Object.create(null),e,t):t}function To(e,t){return e?Q(e)&&Q(t)?[...new Set([...e,...t])]:De(Object.create(null),Io(e),Io(t??{})):t}function na(e,t){if(!e)return t;if(!t)return e;const n=De(Object.create(null),e);for(const s in t)n[s]=Fe(e[s],t[s]);return n}function ai(){return{app:null,config:{isNativeTag:br,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let sa=0;function oa(e,t){return function(s,o=null){ne(s)||(s=De({},s)),o!=null&&!me(o)&&(o=null);const r=ai(),i=new WeakSet,l=[];let u=!1;const f=r.app={_uid:sa++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Da,get config(){return r.config},set config(d){},use(d,...p){return i.has(d)||(d&&ne(d.install)?(i.add(d),d.install(f,...p)):ne(d)&&(i.add(d),d(f,...p))),f},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),f},component(d,p){return p?(r.components[d]=p,f):r.components[d]},directive(d,p){return p?(r.directives[d]=p,f):r.directives[d]},mount(d,p,h){if(!u){const x=f._ceVNode||oe(s,o);return x.appContext=r,h===!0?h="svg":h===!1&&(h=void 0),e(x,d,h),u=!0,f._container=d,d.__vue_app__=f,bs(x.component)}},onUnmount(d){l.push(d)},unmount(){u&&(lt(l,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(d,p){return r.provides[d]=p,f},runWithContext(d){const p=on;on=f;try{return d()}finally{on=p}}};return f}}let on=null;const ra=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ke(t)}Modifiers`]||e[`${Qt(t)}Modifiers`];function ia(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ge;let o=n;const r=t.startsWith("update:"),i=r&&ra(s,t.slice(7));i&&(i.trim&&(o=n.map(d=>Ce(d)?d.trim():d)),i.number&&(o=n.map(as)));let l,u=s[l=_s(t)]||s[l=_s(Ke(t))];!u&&r&&(u=s[l=_s(Qt(t))]),u&<(u,e,6,o);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,lt(f,e,6,o)}}const la=new WeakMap;function ui(e,t,n=!1){const s=n?la:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!ne(e)){const u=f=>{const d=ui(f,t,!0);d&&(l=!0,De(i,d))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!l?(me(e)&&s.set(e,null),null):(Q(r)?r.forEach(u=>i[u]=null):De(i,r),me(e)&&s.set(e,i),i)}function vs(e,t){return!e||!os(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,Qt(t))||pe(e,t))}function Oo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:u,render:f,renderCache:d,props:p,data:h,setupState:x,ctx:T,inheritAttrs:w}=e,P=Yn(e);let V,A;try{if(n.shapeFlag&4){const b=o||s,v=b;V=vt(f.call(v,b,d,p,x,h,T)),A=l}else{const b=t;V=vt(b.length>1?b(p,{attrs:l,slots:i,emit:u}):b(p,null)),A=t.props?l:aa(l)}}catch(b){Rt.length=0,fs(b,e,1),V=oe(xt)}let _=V;if(A&&w!==!1){const b=Object.keys(A),{shapeFlag:v}=_;b.length&&v&7&&(r&&b.some(rs)&&(A=ua(A,r)),_=an(_,A,!1,!0))}if(n.dirs&&(_=an(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition){const b=ps(_.type)&&Qr(_)||_;uo(b,n.transition)}return V=_,Yn(P),V}const aa=e=>{let t;for(const n in e)(n==="class"||n==="style"||os(n))&&((t||(t={}))[n]=e[n]);return t},ua=(e,t)=>{const n={};for(const s in e)(!rs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ca(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:u}=t,f=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Mo(s,i,f):!!i;if(u&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const h=d[p];if(ci(i,s,h)&&!vs(f,h))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?Mo(s,i,f):!0:!!i;return!1}function Mo(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(ci(t,e,r)&&!vs(n,r))return!0}return!1}function ci(e,t,n){const s=e[n],o=t[n];return n==="style"&&me(s)&&me(o)?!Ft(s,o):s!==o}function da({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 di={},fi=()=>Object.create(di),pi=e=>Object.getPrototypeOf(e)===di;function fa(e,t,n,s=!1){const o={},r=fi();e.propsDefaults=Object.create(null),mi(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Lr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function pa(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=fe(o),[u]=e.propsOptions;let f=!1;if((s||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let h=d[p];if(vs(e.emitsOptions,h))continue;const x=t[h];if(u)if(pe(r,h))x!==r[h]&&(r[h]=x,f=!0);else{const T=Ke(h);o[T]=Bs(u,l,T,x,e,!1)}else x!==r[h]&&(r[h]=x,f=!0)}}}else{mi(e,t,o,r)&&(f=!0);let d;for(const p in l)(!t||!pe(t,p)&&((d=Qt(p))===p||!pe(t,d)))&&(u?n&&(n[p]!==void 0||n[d]!==void 0)&&(o[p]=Bs(u,l,p,void 0,e,!0)):delete o[p]);if(r!==l)for(const p in r)(!t||!pe(t,p))&&(delete r[p],f=!0)}f&&$t(e.attrs,"set","")}function mi(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let u in t){if(wn(u))continue;const f=t[u];let d;o&&pe(o,d=Ke(u))?!r||!r.includes(d)?n[d]=f:(l||(l={}))[d]=f:vs(e.emitsOptions,u)||(!(u in s)||f!==s[u])&&(s[u]=f,i=!0)}if(r){const u=fe(n),f=l||ge;for(let d=0;d<r.length;d++){const p=r[d];n[p]=Bs(o,u,p,f[p],e,!pe(f,p))}}return i}function Bs(e,t,n,s,o,r){const i=e[n];if(i!=null){const l=pe(i,"default");if(l&&s===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&ne(u)){const{propsDefaults:f}=o;if(n in f)s=f[n];else{const d=jn(o);s=f[n]=u.call(null,t),d()}}else s=u;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!l?s=!1:i[1]&&(s===""||s===Qt(n))&&(s=!0))}return s}const ma=new WeakMap;function hi(e,t,n=!1){const s=n?ma:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},l=[];let u=!1;if(!ne(e)){const d=p=>{u=!0;const[h,x]=hi(p,t,!0);De(i,h),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!u)return me(e)&&s.set(e,en),en;if(Q(r))for(let d=0;d<r.length;d++){const p=Ke(r[d]);Do(p)&&(i[p]=ge)}else if(r)for(const d in r){const p=Ke(d);if(Do(p)){const h=r[d],x=i[p]=Q(h)||ne(h)?{type:h}:De({},h),T=x.type;let w=!1,P=!0;if(Q(T))for(let V=0;V<T.length;++V){const A=T[V],_=ne(A)&&A.name;if(_==="Boolean"){w=!0;break}else _==="String"&&(P=!1)}else w=ne(T)&&T.name==="Boolean";x[0]=w,x[1]=P,(w||pe(x,"default"))&&l.push(p)}}const f=[i,l];return me(e)&&s.set(e,f),f}function Do(e){return e[0]!=="$"&&!wn(e)}const fo=e=>e==="_"||e==="_ctx"||e==="$stable",po=e=>Q(e)?e.map(vt):[vt(e)],ha=(e,t,n)=>{if(t._n)return t;const s=nt((...o)=>po(t(...o)),n);return s._c=!1,s},vi=(e,t,n)=>{const s=e._ctx;for(const o in e){if(fo(o))continue;const r=e[o];if(ne(r))t[o]=ha(o,r,s);else if(r!=null){const i=po(r);t[o]=()=>i}}},gi=(e,t)=>{const n=po(t);e.slots.default=()=>n},bi=(e,t,n)=>{for(const s in t)(n||!fo(s))&&(e[s]=t[s])},va=(e,t,n)=>{const s=e.slots=fi();if(e.vnode.shapeFlag&32){const o=t._;o?(bi(s,t,n),n&&wr(s,"_",o,!0)):vi(t,s)}else t&&gi(e,t)},ga=(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:bi(o,t,n):(r=!t.$stable,vi(t,o)),i=t}else t&&(gi(e,t),i={default:1});if(r)for(const l in o)!fo(l)&&i[l]==null&&delete o[l]},ze=wa;function ba(e){return xa(e)}function xa(e,t){const n=us();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:u,setText:f,setElementText:d,parentNode:p,nextSibling:h,setScopeId:x=bt,insertStaticContent:T}=e,w=(c,m,g,E=null,R=null,$=null,q=void 0,L=null,N=!!m.dynamicChildren)=>{if(c===m)return;c&&!gn(c,m)&&(E=S(c),Ne(c,R,$,!0),c=null),m.patchFlag===-2&&(N=!1,m.dynamicChildren=null);const{type:M,ref:J,shapeFlag:B}=m;switch(M){case gs:P(c,m,g,E);break;case xt:V(c,m,g,E);break;case Wn:c==null&&A(m,g,E,q);break;case re:Ee(c,m,g,E,R,$,q,L,N);break;default:B&1?v(c,m,g,E,R,$,q,L,N):B&6?G(c,m,g,E,R,$,q,L,N):(B&64||B&128)&&M.process(c,m,g,E,R,$,q,L,N,K)}J!=null&&R?An(J,c&&c.ref,$,m||c,!m):J==null&&c&&c.ref!=null&&An(c.ref,null,$,c,!0)},P=(c,m,g,E)=>{if(c==null)s(m.el=l(m.children),g,E);else{const R=m.el=c.el;m.children!==c.children&&f(R,m.children)}},V=(c,m,g,E)=>{c==null?s(m.el=u(m.children||""),g,E):m.el=c.el},A=(c,m,g,E)=>{[c.el,c.anchor]=T(c.children,m,g,E,c.el,c.anchor)},_=({el:c,anchor:m},g,E)=>{let R;for(;c&&c!==m;)R=h(c),s(c,g,E),c=R;s(m,g,E)},b=({el:c,anchor:m})=>{let g;for(;c&&c!==m;)g=h(c),o(c),c=g;o(m)},v=(c,m,g,E,R,$,q,L,N)=>{if(m.type==="svg"?q="svg":m.type==="math"&&(q="mathml"),c==null)D(m,g,E,R,$,q,L,N);else{const M=c.el&&c.el._isVueCE?c.el:null;try{M&&M._beginPatch(),ye(c,m,R,$,q,L,N)}finally{M&&M._endPatch()}}},D=(c,m,g,E,R,$,q,L)=>{let N,M;const{props:J,shapeFlag:B,transition:z,dirs:X}=c;if(N=c.el=i(c.type,$,J&&J.is,J),B&8?d(N,c.children):B&16&&U(c.children,N,null,E,R,Ss(c,$),q,L),X&&Ht(c,null,E,"created"),j(N,c,c.scopeId,q,E),J){for(const ve in J)ve!=="value"&&!wn(ve)&&r(N,ve,null,J[ve],$,E);"value"in J&&r(N,"value",null,J.value,$),(M=J.onVnodeBeforeMount)&&pt(M,E,c)}X&&Ht(c,null,E,"beforeMount");const ae=ya(R,z);ae&&z.beforeEnter(N),s(N,m,g),((M=J&&J.onVnodeMounted)||ae||X)&&ze(()=>{try{M&&pt(M,E,c),ae&&z.enter(N),X&&Ht(c,null,E,"mounted")}finally{}},R)},j=(c,m,g,E,R)=>{if(g&&x(c,g),E)for(let $=0;$<E.length;$++)x(c,E[$]);if(R){let $=R.subTree;if(m===$||wi($.type)&&($.ssContent===m||$.ssFallback===m)){const q=R.vnode;j(c,q,q.scopeId,q.slotScopeIds,R.parent)}}},U=(c,m,g,E,R,$,q,L,N=0)=>{for(let M=N;M<c.length;M++){const J=c[M]=L?At(c[M]):vt(c[M]);w(null,J,m,g,E,R,$,q,L)}},ye=(c,m,g,E,R,$,q)=>{const L=m.el=c.el;let{patchFlag:N,dynamicChildren:M,dirs:J}=m;N|=c.patchFlag&16;const B=c.props||ge,z=m.props||ge;let X;if(g&&Bt(g,!1),(X=z.onVnodeBeforeUpdate)&&pt(X,g,m,c),J&&Ht(m,c,g,"beforeUpdate"),g&&Bt(g,!0),M&&(!c.dynamicChildren||c.dynamicChildren.length!==M.length)&&(N=0,q=!1,M=null),(B.innerHTML&&z.innerHTML==null||B.textContent&&z.textContent==null)&&d(L,""),M?Y(c.dynamicChildren,M,L,g,E,Ss(m,R),$):q||le(c,m,L,null,g,E,Ss(m,R),$,!1),N>0){if(N&16)F(L,B,z,g,R);else if(N&2&&B.class!==z.class&&r(L,"class",null,z.class,R),N&4&&r(L,"style",B.style,z.style,R),N&8){const ae=m.dynamicProps;for(let ve=0;ve<ae.length;ve++){const he=ae[ve],Se=B[he],Te=z[he];(Te!==Se||he==="value")&&r(L,he,Se,Te,R,g)}}N&1&&c.children!==m.children&&d(L,m.children)}else!q&&M==null&&F(L,B,z,g,R);((X=z.onVnodeUpdated)||J)&&ze(()=>{X&&pt(X,g,m,c),J&&Ht(m,c,g,"updated")},E)},Y=(c,m,g,E,R,$,q)=>{for(let L=0;L<m.length;L++){const N=c[L],M=m[L],J=N.el&&(N.type===re||!gn(N,M)||N.shapeFlag&198)?p(N.el):g;w(N,M,J,null,E,R,$,q,!0)}},F=(c,m,g,E,R)=>{if(m!==g){if(m!==ge)for(const $ in m)!wn($)&&!($ in g)&&r(c,$,m[$],null,R,E);for(const $ in g){if(wn($))continue;const q=g[$],L=m[$];q!==L&&$!=="value"&&r(c,$,L,q,R,E)}"value"in g&&r(c,"value",m.value,g.value,R)}},Ee=(c,m,g,E,R,$,q,L,N)=>{const M=m.el=c?c.el:l(""),J=m.anchor=c?c.anchor:l("");let{patchFlag:B,dynamicChildren:z,slotScopeIds:X}=m;X&&(L=L?L.concat(X):X),c==null?(s(M,g,E),s(J,g,E),U(m.children||[],g,J,R,$,q,L,N)):B>0&&B&64&&z&&c.dynamicChildren&&c.dynamicChildren.length===z.length?(Y(c.dynamicChildren,z,g,R,$,q,L),(m.key!=null||R&&m===R.subTree)&&xi(c,m,!0)):le(c,m,g,J,R,$,q,L,N)},G=(c,m,g,E,R,$,q,L,N)=>{m.slotScopeIds=L,c==null?m.shapeFlag&512?R.ctx.activate(m,g,E,q,N):We(m,g,E,R,$,q,N):Vt(c,m,N)},We=(c,m,g,E,R,$,q)=>{const L=c.component=Ea(c,E,R);if(co(c)&&(L.ctx.renderer=K),Ia(L,!1,q),L.asyncDep){if(R&&R.registerDep(L,ke,q),!c.el){const N=L.subTree=oe(xt);V(null,N,m,g),c.placeholder=N.el}}else ke(L,c,m,g,R,$,q)},Vt=(c,m,g)=>{const E=m.component=c.component;if(ca(c,m,g))if(E.asyncDep&&!E.asyncResolved){ce(E,m,g);return}else E.next=m,E.update();else m.el=c.el,E.vnode=m},ke=(c,m,g,E,R,$,q)=>{const L=()=>{if(c.isMounted){let{next:B,bu:z,u:X,parent:ae,vnode:ve}=c;{const dt=yi(c);if(dt){B&&(B.el=ve.el,ce(c,B,q)),dt.asyncDep.then(()=>{ze(()=>{c.isUnmounted||M()},R)});return}}let he=B,Se;Bt(c,!1),B?(B.el=ve.el,ce(c,B,q)):B=ve,z&&Gn(z),(Se=B.props&&B.props.onVnodeBeforeUpdate)&&pt(Se,ae,B,ve),Bt(c,!0);const Te=Oo(c),ct=c.subTree;c.subTree=Te,w(ct,Te,p(ct.el),S(ct),c,R,$),B.el=Te.el,he===null&&da(c,Te.el),X&&ze(X,R),(Se=B.props&&B.props.onVnodeUpdated)&&ze(()=>pt(Se,ae,B,ve),R)}else{let B;const{el:z,props:X}=m,{bm:ae,m:ve,parent:he,root:Se,type:Te}=c,ct=sn(m);Bt(c,!1),ae&&Gn(ae),!ct&&(B=X&&X.onVnodeBeforeMount)&&pt(B,he,m),Bt(c,!0);{Se.ce&&Se.ce._hasShadowRoot()&&Se.ce._injectChildStyle(Te,c.parent?c.parent.type:void 0);const dt=c.subTree=Oo(c);w(null,dt,g,E,c,R,$),m.el=dt.el}if(ve&&ze(ve,R),!ct&&(B=X&&X.onVnodeMounted)){const dt=m;ze(()=>pt(B,he,dt),R)}(m.shapeFlag&256||he&&sn(he.vnode)&&he.vnode.shapeFlag&256)&&c.a&&ze(c.a,R),c.isMounted=!0,m=g=E=null}};c.scope.on();const N=c.effect=new $r(L);c.scope.off();const M=c.update=N.run.bind(N),J=c.job=N.runIfDirty.bind(N);J.i=c,J.id=c.uid,N.scheduler=()=>ao(J),Bt(c,!0),M()},ce=(c,m,g)=>{m.component=c;const E=c.vnode.props;c.vnode=m,c.next=null,pa(c,m.props,E,g),ga(c,m.children,g),Tt(),Ao(c),Ot()},le=(c,m,g,E,R,$,q,L,N=!1)=>{const M=c&&c.children,J=c?c.shapeFlag:0,B=m.children,{patchFlag:z,shapeFlag:X}=m;if(z>0){if(z&128){et(M,B,g,E,R,$,q,L,N);return}else if(z&256){Xe(M,B,g,E,R,$,q,L,N);return}}X&8?(J&16&&Ve(M,R,$),B!==M&&d(g,B)):J&16?X&16?et(M,B,g,E,R,$,q,L,N):Ve(M,R,$,!0):(J&8&&d(g,""),X&16&&U(B,g,E,R,$,q,L,N))},Xe=(c,m,g,E,R,$,q,L,N)=>{c=c||en,m=m||en;const M=c.length,J=m.length,B=Math.min(M,J);let z;for(z=0;z<B;z++){const X=m[z]=N?At(m[z]):vt(m[z]);w(c[z],X,g,null,R,$,q,L,N)}M>J?Ve(c,R,$,!0,!1,B):U(m,g,E,R,$,q,L,N,B)},et=(c,m,g,E,R,$,q,L,N)=>{let M=0;const J=m.length;let B=c.length-1,z=J-1;for(;M<=B&&M<=z;){const X=c[M],ae=m[M]=N?At(m[M]):vt(m[M]);if(gn(X,ae))w(X,ae,g,null,R,$,q,L,N);else break;M++}for(;M<=B&&M<=z;){const X=c[B],ae=m[z]=N?At(m[z]):vt(m[z]);if(gn(X,ae))w(X,ae,g,null,R,$,q,L,N);else break;B--,z--}if(M>B){if(M<=z){const X=z+1,ae=X<J?m[X].el:E;for(;M<=z;)w(null,m[M]=N?At(m[M]):vt(m[M]),g,ae,R,$,q,L,N),M++}}else if(M>z)for(;M<=B;)Ne(c[M],R,$,!0),M++;else{const X=M,ae=M,ve=new Map;for(M=ae;M<=z;M++){const Qe=m[M]=N?At(m[M]):vt(m[M]);Qe.key!=null&&ve.set(Qe.key,M)}let he,Se=0;const Te=z-ae+1;let ct=!1,dt=0;const hn=new Array(Te);for(M=0;M<Te;M++)hn[M]=0;for(M=X;M<=B;M++){const Qe=c[M];if(Se>=Te){Ne(Qe,R,$,!0);continue}let ft;if(Qe.key!=null)ft=ve.get(Qe.key);else for(he=ae;he<=z;he++)if(hn[he-ae]===0&&gn(Qe,m[he])){ft=he;break}ft===void 0?Ne(Qe,R,$,!0):(hn[ft-ae]=M+1,ft>=dt?dt=ft:ct=!0,w(Qe,m[ft],g,null,R,$,q,L,N),Se++)}const bo=ct?_a(hn):en;for(he=bo.length-1,M=Te-1;M>=0;M--){const Qe=ae+M,ft=m[Qe],xo=m[Qe+1],yo=Qe+1<J?xo.el||_i(xo):E;hn[M]===0?w(null,ft,g,yo,R,$,q,L,N):ct&&(he<0||M!==bo[he]?Je(ft,g,yo,2):he--)}}},Je=(c,m,g,E,R=null)=>{const{el:$,type:q,transition:L,children:N,shapeFlag:M}=c;if(M&6){Je(c.component.subTree,m,g,E);return}if(M&128){c.suspense.move(m,g,E);return}if(M&64){q.move(c,m,g,K);return}if(q===re){s($,m,g);for(let B=0;B<N.length;B++)Je(N[B],m,g,E);s(c.anchor,m,g);return}if(q===Wn){_(c,m,g);return}if(E!==2&&M&1&&L)if(E===0)L.persisted&&!$[$s]?s($,m,g):(L.beforeEnter($),s($,m,g),ze(()=>L.enter($),R));else{const{leave:B,delayLeave:z,afterLeave:X}=L,ae=()=>{c.ctx.isUnmounted?o($):s($,m,g)},ve=()=>{const he=$._isLeaving||!!$[$s];$._isLeaving&&$[$s](!0),L.persisted&&!he?ae():B($,()=>{ae(),X&&X()})};z?z($,ae,ve):ve()}else s($,m,g)},Ne=(c,m,g,E=!1,R=!1)=>{const{type:$,props:q,ref:L,children:N,dynamicChildren:M,shapeFlag:J,patchFlag:B,dirs:z,cacheIndex:X,memo:ae}=c;if(B===-2&&(R=!1),L!=null&&(Tt(),An(L,null,g,c,!0),Ot()),X!=null&&(m.renderCache[X]=void 0),J&256){m.ctx.deactivate(c);return}const ve=J&1&&z,he=!sn(c);let Se;if(he&&(Se=q&&q.onVnodeBeforeUnmount)&&pt(Se,m,c),J&6)_t(c.component,g,E);else{if(J&128){c.suspense.unmount(g,E);return}ve&&Ht(c,null,m,"beforeUnmount"),J&64?c.type.remove(c,m,g,K,E):M&&!M.hasOnce&&($!==re||B>0&&B&64)?Ve(M,m,g,!1,!0):($===re&&B&384||!R&&J&16)&&Ve(N,m,g),E&&ut(c)}const Te=ae!=null&&X==null;(he&&(Se=q&&q.onVnodeUnmounted)||ve||Te)&&ze(()=>{Se&&pt(Se,m,c),ve&&Ht(c,null,m,"unmounted"),Te&&(c.el=null)},g)},ut=c=>{const{type:m,el:g,anchor:E,transition:R}=c;if(m===re){yt(g,E);return}if(m===Wn){b(c);return}const $=()=>{o(g),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(c.shapeFlag&1&&R&&!R.persisted){const{leave:q,delayLeave:L}=R,N=()=>q(g,$);L?L(c.el,$,N):N()}else $()},yt=(c,m)=>{let g;for(;c!==m;)g=h(c),o(c),c=g;o(m)},_t=(c,m,g)=>{const{bum:E,scope:R,job:$,subTree:q,um:L,m:N,a:M}=c;No(N),No(M),E&&Gn(E),R.stop(),$&&($.flags|=8,Ne(q,c,m,g)),L&&ze(L,m),ze(()=>{c.isUnmounted=!0},m)},Ve=(c,m,g,E=!1,R=!1,$=0)=>{for(let q=$;q<c.length;q++)Ne(c[q],m,g,E,R)},S=c=>{if(c.shapeFlag&6)return S(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const m=h(c.anchor||c.el),g=m&&m[Vl];return g?h(g):m};let I=!1;const k=(c,m,g)=>{let E;c==null?m._vnode&&(Ne(m._vnode,null,null,!0),E=m._vnode.component):w(m._vnode||null,c,m,null,null,null,g),m._vnode=c,I||(I=!0,Ao(E),Gr(),I=!1)},K={p:w,um:Ne,m:Je,r:ut,mt:We,mc:U,pc:le,pbc:Y,n:S,o:e};return{render:k,hydrate:void 0,createApp:oa(k)}}function Ss({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 Bt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ya(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function xi(e,t,n=!1){const s=e.children,o=t.children;if(Q(s)&&Q(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]=At(o[r]),l.el=i.el),!n&&l.patchFlag!==-2&&xi(i,l)),l.type===gs&&(l.patchFlag===-1&&(l=o[r]=At(l)),l.el=i.el),l.type===xt&&!l.el&&(l.el=i.el)}}function _a(e){const t=e.slice(),n=[0];let s,o,r,i,l;const u=e.length;for(s=0;s<u;s++){const f=e[s];if(f!==0){if(o=n[n.length-1],e[o]<f){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<f?r=l+1:i=l;f<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-- >0;)n[r]=i,i=t[i];return n}function yi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:yi(t)}function No(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function _i(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?_i(t.subTree):null}const wi=e=>e.__isSuspense;function wa(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):Ol(e)}const re=Symbol.for("v-fgt"),gs=Symbol.for("v-txt"),xt=Symbol.for("v-cmt"),Wn=Symbol.for("v-stc"),Rt=[];let Ye=null;function y(e=!1){Rt.push(Ye=e?null:[])}function mo(){Rt.pop(),Ye=Rt[Rt.length-1]||null}let Pn=1;function es(e,t=!1){Pn+=e,e<0&&Ye&&t&&(Ye.hasOnce=!0)}function Ci(e){return e.dynamicChildren=Pn>0?Ye||en:null,mo(),Pn>0&&Ye&&Ye.push(e),e}function C(e,t,n,s,o,r){return Ci(a(e,t,n,s,o,r,!0))}function $e(e,t,n,s,o){return Ci(oe(e,t,n,s,o,!0))}function Tn(e){return e?e.__v_isVNode===!0:!1}function gn(e,t){return e.type===t.type&&e.key===t.key}const ki=({key:e})=>e??null,zn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||Le(e)||ne(e)?{i:Me,r:e,k:t,f:!!n}:e:null);function a(e,t=null,n=null,s=0,o=null,r=e===re?0:1,i=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ki(t),ref:t&&zn(t),scopeId:Wr,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:Me};return l?(ts(u,n),r&128&&e.normalize(u)):n&&(u.shapeFlag|=Ce(n)?8:16),Pn>0&&!i&&Ye&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Ye.push(u),u}const oe=Ca;function Ca(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===si)&&(e=xt),Tn(e)){const l=an(e,t,!0);return n&&ts(l,n),Pn>0&&!r&&Ye&&(l.shapeFlag&6?Ye[Ye.indexOf(e)]=l:Ye.push(l)),l.patchFlag=-2,l}if(Ma(e)&&(e=e.__vccOpts),t){t=ka(t);let{class:l,style:u}=t;l&&!Ce(l)&&(t.class=_e(l)),me(u)&&(io(u)&&!Q(u)&&(u=De({},u)),t.style=Jt(u))}const i=Ce(e)?1:wi(e)?128:ps(e)?64:me(e)?4:ne(e)?2:0;return a(e,t,n,s,o,i,r,!0)}function ka(e){return e?io(e)||pi(e)?De({},e):e:null}function an(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:u}=e,f=t?$i(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&ki(f),ref:t&&t.ref?n&&r?Q(r)?r.concat(zn(t)):[r,zn(t)]:zn(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!==re?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&an(e.ssContent),ssFallback:e.ssFallback&&an(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&uo(d,u.clone(d)),d}function ie(e=" ",t=0){return oe(gs,null,e,t)}function Ai(e,t){const n=oe(Wn,null,e);return n.staticCount=t,n}function W(e="",t=!1){return t?(y(),$e(xt,null,e)):oe(xt,null,e)}function vt(e){return e==null||typeof e=="boolean"?oe(xt):Q(e)?oe(re,null,e.slice()):Tn(e)?At(e):oe(gs,null,String(e))}function At(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:an(e)}function ts(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ts(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!pi(t)?t._ctx=Me:o===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ne(t)){if(s&65){ts(e,{default:t});return}t={default:t,_ctx:Me},n=32}else t=String(t),s&64?(n=16,t=[ie(t)]):n=8;e.children=t,e.shapeFlag|=n}function $i(...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=_e([t.class,s.class]));else if(o==="style")t.style=Jt([t.style,s.style]);else if(os(o)){const r=t[o],i=s[o];i&&r!==i&&!(Q(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!rs(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function pt(e,t,n,s=null){lt(e,t,7,[n,s])}const Aa=ai();let $a=0;function Ea(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Aa,r={uid:$a++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ol(!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:hi(s,o),emitsOptions:ui(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=ia.bind(null,r),e.ce&&e.ce(r),r}let Ue=null;const Sa=()=>Ue||Me;let ns,On;{const e=us(),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)}};ns=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),On=t("__VUE_SSR_SETTERS__",n=>Mn=n)}const jn=e=>{const t=Ue;return ns(e),e.scope.on(),()=>{e.scope.off(),ns(t)}},Vo=()=>{Ue&&Ue.scope.off(),ns(null)};function Ei(e){return e.vnode.shapeFlag&4}let Mn=!1;function Ia(e,t=!1,n=!1){t&&On(t);const{props:s,children:o}=e.vnode,r=Ei(e);fa(e,s,r,t),va(e,o,n||t);const i=r?Ra(e,t):void 0;return t&&On(!1),i}function Ra(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Yl);const{setup:s}=n;if(s){Tt();const o=e.setupContext=s.length>1?Ta(e):null,r=jn(e),i=Vn(s,e,0,[e.props,o]),l=xr(i);if(Ot(),r(),(l||e.sp)&&!sn(e)&&Zr(e),l){if(i.then(Vo,Vo),t)return i.then(u=>{On(!0);try{jo(e,u,t)}finally{On(!1)}}).catch(u=>{fs(u,e,0)});e.asyncDep=i}else jo(e,i)}else Si(e)}function jo(e,t,n){ne(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=qr(t)),Si(e)}function Si(e,t,n){const s=e.type;e.render||(e.render=s.render||bt);{const o=jn(e);Tt();try{Zl(e)}finally{Ot(),o()}}}const Pa={get(e,t){return je(e,"get",""),e[t]}};function Ta(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Pa),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(qr(Cl(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 Oa(e,t=!0){return ne(e)?e.displayName||e.name:e.name||t&&e.__name}function Ma(e){return ne(e)&&"__vccOpts"in e}const xe=(e,t)=>Sl(e,t,Mn);function Ii(e,t,n){try{es(-1);const s=arguments.length;return s===2?me(t)&&!Q(t)?Tn(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Tn(n)&&(n=[n]),oe(e,t,n))}finally{es(1)}}const Da="3.5.41";/**
|
|
* @vue/runtime-dom v3.5.41
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Gs;const Uo=typeof window<"u"&&window.trustedTypes;if(Uo)try{Gs=Uo.createPolicy("vue",{createHTML:e=>e})}catch{}const Ri=Gs?e=>Gs.createHTML(e):e=>e,Na="http://www.w3.org/2000/svg",Va="http://www.w3.org/1998/Math/MathML",kt=typeof document<"u"?document:null,Lo=kt&&kt.createElement("template"),ja={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"?kt.createElementNS(Na,e):t==="mathml"?kt.createElementNS(Va,e):n?kt.createElement(e,{is:n}):kt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>kt.createTextNode(e),createComment:e=>kt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>kt.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{Lo.innerHTML=Ri(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Lo.content;if(s==="svg"||s==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ua=Symbol("_vtc");function La(e,t,n){const s=e[Ua];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fo=Symbol("_vod"),Fa=Symbol("_vsh"),qa=Symbol(""),Ha=/(?:^|;)\s*display\s*:/;function Ba(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&&yn(s,l,"")}else for(const i in t)n[i]==null&&yn(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?Ka(e,i,!Ce(t)&&t?t[i]:void 0,l)||yn(s,i,l):yn(s,i,"")}}else if(o){if(t!==n){const i=s[qa];i&&(n+=";"+i),s.cssText=n,r=Ha.test(n)}}else t&&e.removeAttribute("style");Fo in e&&(e[Fo]=r?s.display:"",e[Fa]&&(s.display="none"))}const qo=/\s*!important$/;function yn(e,t,n){if(Q(n))n.forEach(s=>yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ga(e,t);qo.test(n)?e.setProperty(Qt(s),n.replace(qo,""),"important"):e[s]=n}}const Ho=["Webkit","Moz","ms"],Is={};function Ga(e,t){const n=Is[t];if(n)return n;let s=Ke(t);if(s!=="filter"&&s in e)return Is[t]=s;s=ls(s);for(let o=0;o<Ho.length;o++){const r=Ho[o]+s;if(r in e)return Is[t]=r}return t}function Ka(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ce(s)&&n===s}const Bo="http://www.w3.org/1999/xlink";function Go(e,t,n,s,o,r=nl(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Bo,t.slice(6,t.length)):e.setAttributeNS(Bo,t,n):n==null||r&&!Cr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":rt(n)?String(n):n)}function Ko(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Ri(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(l!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Cr(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 St(e,t,n,s){e.addEventListener(t,n,s)}function Wa(e,t,n,s){e.removeEventListener(t,n,s)}const Wo=Symbol("_vei");function za(e,t,n,s,o=null){const r=e[Wo]||(e[Wo]={}),i=r[t];if(s&&i)i.value=s;else{const[l,u]=Ya(t);if(s){const f=r[t]=eu(s,o);St(e,l,f,u)}else i&&(Wa(e,l,i,u),r[t]=void 0)}}const Ja=/(Once|Passive|Capture)$/,Qa=/^on:?(?:Once|Passive|Capture)$/;function Ya(e){let t,n;for(;(n=e.match(Ja))&&!Qa.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Qt(e.slice(2)),t]}let Rs=0;const Za=Promise.resolve(),Xa=()=>Rs||(Za.then(()=>Rs=0),Rs=Date.now());function eu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Q(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let u=0;u<i.length&&!s._stopped;u++){const f=i[u];f&<(f,t,5,l)}}else lt(o,t,5,[s])};return n.value=e,n.attached=Xa(),n}const zo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,tu=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?La(e,s,i):t==="style"?Ba(e,n,s):os(t)?rs(t)||za(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nu(e,t,s,i))?(Ko(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Go(e,t,s,i,r,t!=="value")):e._isVueCE&&(su(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(s)))?Ko(e,Ke(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Go(e,t,s,i))};function nu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&zo(t)&&ne(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 zo(t)&&Ce(n)?!1:t in e}function su(e,t){const n=e._def.props;if(!n)return!1;const s=Ke(t);return Array.isArray(n)?n.some(o=>Ke(o)===s):Object.keys(n).some(o=>Ke(o)===s)}const qt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>Gn(t,n):t};function ou(e){e.target.composing=!0}function Jo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ze=Symbol("_assign"),qn=Symbol("_initialValue");function Ps(e,t,n){return t&&(e=e.trim()),n&&(e=as(e)),e}const ue={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[qn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[qn]=e.defaultValue.replace(/\r\n?/g,`
|
|
`))),e[Ze]=qt(o);const r=s||o.props&&o.props.type==="number";St(e,t?"change":"input",i=>{i.target.composing||e[Ze](Ps(e.value,n,r))}),(n||r)&&St(e,"change",()=>{e.value=Ps(e.value,n,r)}),t||(St(e,"compositionstart",ou),St(e,"compositionend",Jo),St(e,"change",Jo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[qn];delete e[qn],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Ze](Ps(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[Ze]=qt(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?as(e.value):e.value,u=t??"";if(l===u)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},Pt={deep:!0,created(e,t,n){e[Ze]=qt(n),St(e,"change",()=>{const s=e._modelValue,o=cn(e),r=e.checked,i=e[Ze];if(Q(s)){const l=Xs(s,o),u=l!==-1;if(r&&!u)i(s.concat(o));else if(!r&&u){const f=[...s];f.splice(l,1),i(f)}}else if(pn(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(Pi(e,r))})},mounted:Qo,beforeUpdate(e,t,n){e[Ze]=qt(n),Qo(e,t,n)}};function Qo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Q(t))o=Xs(t,s.props.value)>-1;else if(pn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ft(t,Pi(e,!0))}e.checked!==o&&(e.checked=o)}const ru={created(e,{value:t},n){e.checked=Ft(t,n.props.value),e[Ze]=qt(n),St(e,"change",()=>{e[Ze](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Ze]=qt(s),t!==n&&(e.checked=Ft(t,s.props.value))}},un={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,St(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?as(cn(r)):cn(r));e[Ze](e.multiple?pn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,lo(()=>{e._assigning=!1})}),e[Ze]=qt(s)},mounted(e,{value:t}){Yo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ze]=qt(n)},updated(e,{value:t}){e._assigning||Yo(e,t)}};function Yo(e,t){const n=e.multiple,s=Q(t);if(!(n&&!s&&!pn(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],l=cn(i);if(n)if(s){const u=typeof l;u==="string"||u==="number"?i.selected=t.some(f=>String(f)===String(l)):i.selected=Xs(t,l)>-1}else i.selected=t.has(l);else if(Ft(cn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function Pi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const iu=["ctrl","shift","alt","meta"],lu={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)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},Pe=(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=lu[t[i]];if(l&&l(o,t))return}return e(o,...r)}))},au=De({patchProp:tu},ja);let Zo;function uu(){return Zo||(Zo=ba(au))}const cu=((...e)=>{const t=uu().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=fu(s);if(!o)return;const r=t._component;!ne(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,du(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function du(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fu(e){return Ce(e)?document.querySelector(e):e}const pu=["width","height"],Ge={__name:"UiIcono",props:{nombre:{type:String,required:!0},tam:{type:[Number,String],default:16}},setup(e){const t={luna:[["path",{d:"M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z"}]],sol:[["circle",{cx:12,cy:12,r:4}],["path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"}]],lapiz:[["path",{d:"M12 20h9"}],["path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"}]],cerrar:[["path",{d:"M18 6 6 18M6 6l12 12"}]],atras:[["path",{d:"M19 12H5M12 19l-7-7 7-7"}]],grafico:[["path",{d:"M3 3v18h18"}],["path",{d:"M7 15v3M12 10v8M17 6v12"}]],cerebro:[["path",{d:"M9.5 3A2.5 2.5 0 0 0 7 5.5v.2A2.7 2.7 0 0 0 5 8.3c0 .8.3 1.5.9 2A2.8 2.8 0 0 0 5 12.5c0 1 .5 1.9 1.3 2.4-.2.4-.3.8-.3 1.2A2.9 2.9 0 0 0 9 19a2.5 2.5 0 0 0 3 2V3.8A2.5 2.5 0 0 0 9.5 3Z"}],["path",{d:"M14.5 3A2.5 2.5 0 0 1 17 5.5v.2a2.7 2.7 0 0 1 2 2.6c0 .8-.3 1.5-.9 2A2.8 2.8 0 0 1 19 12.5c0 1-.5 1.9-1.3 2.4.2.4.3.8.3 1.2A2.9 2.9 0 0 1 15 19a2.5 2.5 0 0 1-3 2"}]],imagen:[["rect",{x:3,y:3,width:18,height:18,rx:2}],["circle",{cx:8.5,cy:8.5,r:1.5}],["path",{d:"m21 15-5-5L5 21"}]],microfono:[["rect",{x:9,y:2,width:6,height:12,rx:3}],["path",{d:"M5 10a7 7 0 0 0 14 0M12 17v5"}]],escribir:[["path",{d:"M3 21h18"}],["path",{d:"M5 17 17.5 4.5a2.1 2.1 0 0 1 3 3L8 20l-4 1Z"}]],archivo:[["path",{d:"M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v5h5"}]],sitio:[["circle",{cx:12,cy:12,r:9}],["path",{d:"M3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18Z"}]],refrescar:[["path",{d:"M21 12a9 9 0 1 1-3-6.7"}],["path",{d:"M21 4v5h-5"}]],descargar:[["path",{d:"M12 3v12"}],["path",{d:"m7 11 5 5 5-5"}],["path",{d:"M4 21h16"}]],alerta:[["path",{d:"M12 9v4M12 17h.01"}],["path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"}]],ok:[["path",{d:"M20 6 9 17l-5-5"}]],copiar:[["rect",{x:9,y:9,width:12,height:12,rx:2}],["path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}]],mensaje:[["path",{d:"M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.9-.9L3 21l1.9-5.1A8.4 8.4 0 0 1 4 11.5a8.5 8.5 0 0 1 8.5-8.5A8.4 8.4 0 0 1 21 11.5Z"}]],auto:[["path",{d:"M17 2.1 21 6l-4 3.9"}],["path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}],["path",{d:"M7 21.9 3 18l4-3.9"}],["path",{d:"M21 13v2a4 4 0 0 1-4 4H3"}]]};return(n,s)=>(y(),C("svg",{width:e.tam,height:e.tam,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round",class:"inline-block shrink-0 align-[-0.15em]","aria-hidden":"true"},[(y(!0),C(re,null,we(t[e.nombre]||[],(o,r)=>(y(),$e(Jl(o[0]),$i({key:r},{ref_for:!0},o[1]),null,16))),128))],8,pu))}};/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const Xt=typeof document<"u";function Ti(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function mu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ti(e.default)}const de=Object.assign;function Ts(e,t){const n={};for(const s in t){const o=t[s];n[s]=at(o)?o.map(e):e(o)}return n}const En=()=>{},at=Array.isArray;function Xo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Oi=/#/g,hu=/&/g,vu=/\//g,gu=/=/g,bu=/\?/g,Mi=/\+/g,xu=/%5B/g,yu=/%5D/g,Di=/%5E/g,_u=/%60/g,Ni=/%7B/g,wu=/%7C/g,Vi=/%7D/g,Cu=/%20/g;function ho(e){return e==null?"":encodeURI(""+e).replace(wu,"|").replace(xu,"[").replace(yu,"]")}function ku(e){return ho(e).replace(Ni,"{").replace(Vi,"}").replace(Di,"^")}function Ks(e){return ho(e).replace(Mi,"%2B").replace(Cu,"+").replace(Oi,"%23").replace(hu,"%26").replace(_u,"`").replace(Ni,"{").replace(Vi,"}").replace(Di,"^")}function Au(e){return Ks(e).replace(gu,"%3D")}function $u(e){return ho(e).replace(Oi,"%23").replace(bu,"%3F")}function Eu(e){return $u(e).replace(vu,"%2F")}function Dn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Su=/\/$/,Iu=e=>e.replace(Su,"");function Os(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let u=t.indexOf("?");return u=l>=0&&u>l?-1:u,u>=0&&(s=t.slice(0,u),r=t.slice(u,l>0?l:t.length),o=e(r.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Ou(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:Dn(i)}}function Ru(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function er(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Pu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&dn(t.matched[s],n.matched[o])&&ji(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function dn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ji(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Tu(e[n],t[n]))return!1;return!0}function Tu(e,t){return at(e)?tr(e,t):at(t)?tr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function tr(e,t){return at(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ou(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 jt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ws=(function(e){return e.pop="pop",e.push="push",e})({}),Ms=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Mu(e){if(!e)if(Xt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Iu(e)}const Du=/^[^#]+#/;function Nu(e,t){return e.replace(Du,"#")+t}function Vu(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 xs=()=>({left:window.scrollX,top:window.scrollY});function ju(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=Vu(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 nr(e,t){return(history.state?history.state.position-t:-1)+e}const zs=new Map;function Uu(e,t){zs.set(e,t)}function Lu(e){const t=zs.get(e);return zs.delete(e),t}function Fu(e){return typeof e=="string"||e&&typeof e=="object"}function Ui(e){return typeof e=="string"||typeof e=="symbol"}let Ae=(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 Li=Symbol("");Ae.MATCHER_NOT_FOUND+"",Ae.NAVIGATION_GUARD_REDIRECT+"",Ae.NAVIGATION_ABORTED+"",Ae.NAVIGATION_CANCELLED+"",Ae.NAVIGATION_DUPLICATED+"";function fn(e,t){return de(new Error,{type:e,[Li]:!0},t)}function Ct(e,t){return e instanceof Error&&Li in e&&(t==null||!!(e.type&t))}const qu=["params","query","hash"];function Hu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of qu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Bu(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(Mi," "),r=o.indexOf("="),i=Dn(r<0?o:o.slice(0,r)),l=r<0?null:Dn(o.slice(r+1));if(i in t){let u=t[i];at(u)||(u=t[i]=[u]),u.push(l)}else t[i]=l}return t}function sr(e){let t="";for(let n in e){const s=e[n];if(n=Au(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(at(s)?s.map(o=>o&&Ks(o)):[s&&Ks(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Gu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=at(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Ku=Symbol(""),or=Symbol(""),ys=Symbol(""),vo=Symbol(""),Js=Symbol("");function bn(){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 Lt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,u)=>{const f=h=>{h===!1?u(fn(Ae.NAVIGATION_ABORTED,{from:n,to:t})):h instanceof Error?u(h):Fu(h)?u(fn(Ae.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(i&&s.enterCallbacks[o]===i&&typeof h=="function"&&i.push(h),l())},d=r(()=>e.call(s&&s.instances[o],t,n,f));let p=Promise.resolve(d);e.length<3&&(p=p.then(f)),p.catch(h=>u(h))})}function Ds(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let u=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Ti(u)){const f=(u.__vccOpts||u)[t];f&&r.push(Lt(f,n,s,i,l,o))}else{let f=u();r.push(()=>f.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const p=mu(d)?d.default:d;i.mods[l]=d,i.components[l]=p;const h=(p.__vccOpts||p)[t];return h&&Lt(h,n,s,i,l,o)()}))}}return r}function Wu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;i<r;i++){const l=t.matched[i];l&&(e.matched.find(f=>dn(f,l))?s.push(l):n.push(l));const u=e.matched[i];u&&(t.matched.find(f=>dn(f,u))||o.push(u))}return[n,s,o]}/*!
|
|
* vue-router v4.6.4
|
|
* (c) 2025 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let zu=()=>location.protocol+"//"+location.host;function Fi(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),er(l,"")}return er(n,e)+s+o}function Ju(e,t,n,s){let o=[],r=[],i=null;const l=({state:h})=>{const x=Fi(e,location),T=n.value,w=t.value;let P=0;if(h){if(n.value=x,t.value=h,i&&i===T){i=null;return}P=w?h.position-w.position:0}else s(x);o.forEach(V=>{V(n.value,T,{delta:P,type:Ws.pop,direction:P?P>0?Ms.forward:Ms.back:Ms.unknown})})};function u(){i=n.value}function f(h){o.push(h);const x=()=>{const T=o.indexOf(h);T>-1&&o.splice(T,1)};return r.push(x),x}function d(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(de({},h.state,{scroll:xs()}),"")}}function p(){for(const h of r)h();r=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:f,destroy:p}}function rr(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?xs():null}}function Qu(e){const{history:t,location:n}=window,s={value:Fi(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,f,d){const p=e.indexOf("#"),h=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+u:zu()+e+u;try{t[d?"replaceState":"pushState"](f,"",h),o.value=f}catch(x){console.error(x),n[d?"replace":"assign"](h)}}function i(u,f){r(u,de({},t.state,rr(o.value.back,u,o.value.forward,!0),f,{position:o.value.position}),!0),s.value=u}function l(u,f){const d=de({},o.value,t.state,{forward:u,scroll:xs()});r(d.current,d,!0),r(u,de({},rr(s.value,u,null),{position:d.position+1},f),!1),s.value=u}return{location:s,state:o,push:l,replace:i}}function Yu(e){e=Mu(e);const t=Qu(e),n=Ju(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=de({location:"",base:e,go:s,createHref:Nu.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 Kt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ie=(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})(Ie||{});const Zu={type:Kt.Static,value:""},Xu=/[a-zA-Z0-9_]/;function ec(e){if(!e)return[[]];if(e==="/")return[[Zu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${n})/"${f}": ${x}`)}let n=Ie.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,u,f="",d="";function p(){f&&(n===Ie.Static?r.push({type:Kt.Static,value:f}):n===Ie.Param||n===Ie.ParamRegExp||n===Ie.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Kt.Param,value:f,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),f="")}function h(){f+=u}for(;l<e.length;){if(u=e[l++],u==="\\"&&n!==Ie.ParamRegExp){s=n,n=Ie.EscapeNext;continue}switch(n){case Ie.Static:u==="/"?(f&&p(),i()):u===":"?(p(),n=Ie.Param):h();break;case Ie.EscapeNext:h(),n=s;break;case Ie.Param:u==="("?n=Ie.ParamRegExp:Xu.test(u)?h():(p(),n=Ie.Static,u!=="*"&&u!=="?"&&u!=="+"&&l--);break;case Ie.ParamRegExp:u===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+u:n=Ie.ParamRegExpEnd:d+=u;break;case Ie.ParamRegExpEnd:p(),n=Ie.Static,u!=="*"&&u!=="?"&&u!=="+"&&l--,d="";break;default:t("Unknown state");break}}return n===Ie.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),p(),i(),o}const ir="[^/]+?",tc={sensitive:!1,strict:!1,start:!0,end:!0};var qe=(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})(qe||{});const nc=/[.+*?^${}()[\]/\\]/g;function sc(e,t){const n=de({},tc,t),s=[];let o=n.start?"^":"";const r=[];for(const f of e){const d=f.length?[]:[qe.Root];n.strict&&!f.length&&(o+="/");for(let p=0;p<f.length;p++){const h=f[p];let x=qe.Segment+(n.sensitive?qe.BonusCaseSensitive:0);if(h.type===Kt.Static)p||(o+="/"),o+=h.value.replace(nc,"\\$&"),x+=qe.Static;else if(h.type===Kt.Param){const{value:T,repeatable:w,optional:P,regexp:V}=h;r.push({name:T,repeatable:w,optional:P});const A=V||ir;if(A!==ir){x+=qe.BonusCustomRegExp;try{`${A}`}catch(b){throw new Error(`Invalid custom RegExp for param "${T}" (${A}): `+b.message)}}let _=w?`((?:${A})(?:/(?:${A}))*)`:`(${A})`;p||(_=P&&f.length<2?`(?:/${_})`:"/"+_),P&&(_+="?"),o+=_,x+=qe.Dynamic,P&&(x+=qe.BonusOptional),w&&(x+=qe.BonusRepeatable),A===".*"&&(x+=qe.BonusWildcard)}d.push(x)}s.push(d)}if(n.strict&&n.end){const f=s.length-1;s[f][s[f].length-1]+=qe.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(f){const d=f.match(i),p={};if(!d)return null;for(let h=1;h<d.length;h++){const x=d[h]||"",T=r[h-1];p[T.name]=x&&T.repeatable?x.split("/"):x}return p}function u(f){let d="",p=!1;for(const h of e){(!p||!d.endsWith("/"))&&(d+="/"),p=!1;for(const x of h)if(x.type===Kt.Static)d+=x.value;else if(x.type===Kt.Param){const{value:T,repeatable:w,optional:P}=x,V=T in f?f[T]:"";if(at(V)&&!w)throw new Error(`Provided param "${T}" is an array but it is not repeatable (* or + modifiers)`);const A=at(V)?V.join("/"):V;if(!A)if(P)h.length<2&&(d.endsWith("/")?d=d.slice(0,-1):p=!0);else throw new Error(`Missing required param "${T}"`);d+=A}}return d||"/"}return{re:i,score:s,keys:r,parse:l,stringify:u}}function oc(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]===qe.Static+qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function qi(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=oc(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(lr(s))return 1;if(lr(o))return-1}return o.length-s.length}function lr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const rc={strict:!1,end:!0,sensitive:!1};function ic(e,t,n){const s=sc(ec(e.path),n),o=de(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function lc(e,t){const n=[],s=new Map;t=Xo(rc,t);function o(p){return s.get(p)}function r(p,h,x){const T=!x,w=ur(p);w.aliasOf=x&&x.record;const P=Xo(t,p),V=[w];if("alias"in p){const b=typeof p.alias=="string"?[p.alias]:p.alias;for(const v of b)V.push(ur(de({},w,{components:x?x.record.components:w.components,path:v,aliasOf:x?x.record:w})))}let A,_;for(const b of V){const{path:v}=b;if(h&&v[0]!=="/"){const D=h.record.path,j=D[D.length-1]==="/"?"":"/";b.path=h.record.path+(v&&j+v)}if(A=ic(b,h,P),x?x.alias.push(A):(_=_||A,_!==A&&_.alias.push(A),T&&p.name&&!cr(A)&&i(p.name)),Hi(A)&&u(A),w.children){const D=w.children;for(let j=0;j<D.length;j++)r(D[j],A,x&&x.children[j])}x=x||A}return _?()=>{i(_)}:En}function i(p){if(Ui(p)){const h=s.get(p);h&&(s.delete(p),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(p);h>-1&&(n.splice(h,1),p.record.name&&s.delete(p.record.name),p.children.forEach(i),p.alias.forEach(i))}}function l(){return n}function u(p){const h=cc(p,n);n.splice(h,0,p),p.record.name&&!cr(p)&&s.set(p.record.name,p)}function f(p,h){let x,T={},w,P;if("name"in p&&p.name){if(x=s.get(p.name),!x)throw fn(Ae.MATCHER_NOT_FOUND,{location:p});P=x.record.name,T=de(ar(h.params,x.keys.filter(_=>!_.optional).concat(x.parent?x.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),p.params&&ar(p.params,x.keys.map(_=>_.name))),w=x.stringify(T)}else if(p.path!=null)w=p.path,x=n.find(_=>_.re.test(w)),x&&(T=x.parse(w),P=x.record.name);else{if(x=h.name?s.get(h.name):n.find(_=>_.re.test(h.path)),!x)throw fn(Ae.MATCHER_NOT_FOUND,{location:p,currentLocation:h});P=x.record.name,T=de({},h.params,p.params),w=x.stringify(T)}const V=[];let A=x;for(;A;)V.unshift(A.record),A=A.parent;return{name:P,path:w,params:T,matched:V,meta:uc(V)}}e.forEach(p=>r(p));function d(){n.length=0,s.clear()}return{addRoute:r,resolve:f,removeRoute:i,clearRoutes:d,getRoutes:l,getRecordMatcher:o}}function ar(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ur(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ac(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 ac(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 cr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uc(e){return e.reduce((t,n)=>de(t,n.meta),{})}function cc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;qi(e,t[r])<0?s=r:n=r+1}const o=dc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function dc(e){let t=e;for(;t=t.parent;)if(Hi(t)&&qi(e,t)===0)return t}function Hi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function dr(e){const t=ot(ys),n=ot(vo),s=xe(()=>{const u=Re(e.to);return t.resolve(u)}),o=xe(()=>{const{matched:u}=s.value,{length:f}=u,d=u[f-1],p=n.matched;if(!d||!p.length)return-1;const h=p.findIndex(dn.bind(null,d));if(h>-1)return h;const x=fr(u[f-2]);return f>1&&fr(d)===x&&p[p.length-1].path!==x?p.findIndex(dn.bind(null,u[f-2])):h}),r=xe(()=>o.value>-1&&vc(n.params,s.value.params)),i=xe(()=>o.value>-1&&o.value===n.matched.length-1&&ji(n.params,s.value.params));function l(u={}){if(hc(u)){const f=t[Re(e.replace)?"replace":"push"](Re(e.to)).catch(En);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:xe(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function fc(e){return e.length===1?e[0]:e}const pc=Yr({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:dr,setup(e,{slots:t}){const n=ds(dr(e)),{options:s}=ot(ys),o=xe(()=>({[pr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[pr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&fc(t.default(n));return e.custom?r:Ii("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),mc=pc;function hc(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vc(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!at(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function fr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const pr=(e,t,n)=>e??t??n,gc=Yr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ot(Js),o=xe(()=>e.route||s.value),r=ot(or,0),i=xe(()=>{let f=Re(r);const{matched:d}=o.value;let p;for(;(p=d[f])&&!p.components;)f++;return f}),l=xe(()=>o.value.matched[i.value]);Kn(or,xe(()=>i.value+1)),Kn(Ku,l),Kn(Js,o);const u=H();return It(()=>[u.value,l.value,e.name],([f,d,p],[h,x,T])=>{d&&(d.instances[p]=f,x&&x!==d&&f&&f===h&&(d.leaveGuards.size||(d.leaveGuards=x.leaveGuards),d.updateGuards.size||(d.updateGuards=x.updateGuards))),f&&d&&(!x||!dn(d,x)||!h)&&(d.enterCallbacks[p]||[]).forEach(w=>w(f))},{flush:"post"}),()=>{const f=o.value,d=e.name,p=l.value,h=p&&p.components[d];if(!h)return mr(n.default,{Component:h,route:f});const x=p.props[d],T=x?x===!0?f.params:typeof x=="function"?x(f):x:null,P=Ii(h,de({},T,t,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(p.instances[d]=null)},ref:u}));return mr(n.default,{Component:P,route:f})||P}}});function mr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bc=gc;function xc(e){const t=lc(e.routes,e),n=e.parseQuery||Bu,s=e.stringifyQuery||sr,o=e.history,r=bn(),i=bn(),l=bn(),u=kl(jt);let f=jt;Xt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Ts.bind(null,S=>""+S),p=Ts.bind(null,Eu),h=Ts.bind(null,Dn);function x(S,I){let k,K;return Ui(S)?(k=t.getRecordMatcher(S),K=I):K=S,t.addRoute(K,k)}function T(S){const I=t.getRecordMatcher(S);I&&t.removeRoute(I)}function w(){return t.getRoutes().map(S=>S.record)}function P(S){return!!t.getRecordMatcher(S)}function V(S,I){if(I=de({},I||u.value),typeof S=="string"){const g=Os(n,S,I.path),E=t.resolve({path:g.path},I),R=o.createHref(g.fullPath);return de(g,E,{params:h(E.params),hash:Dn(g.hash),redirectedFrom:void 0,href:R})}let k;if(S.path!=null)k=de({},S,{path:Os(n,S.path,I.path).path});else{const g=de({},S.params);for(const E in g)g[E]==null&&delete g[E];k=de({},S,{params:p(g)}),I.params=p(I.params)}const K=t.resolve(k,I),se=S.hash||"";K.params=d(h(K.params));const c=Ru(s,de({},S,{hash:ku(se),path:K.path})),m=o.createHref(c);return de({fullPath:c,hash:se,query:s===sr?Gu(S.query):S.query||{}},K,{redirectedFrom:void 0,href:m})}function A(S){return typeof S=="string"?Os(n,S,u.value.path):de({},S)}function _(S,I){if(f!==S)return fn(Ae.NAVIGATION_CANCELLED,{from:I,to:S})}function b(S){return j(S)}function v(S){return b(de(A(S),{replace:!0}))}function D(S,I){const k=S.matched[S.matched.length-1];if(k&&k.redirect){const{redirect:K}=k;let se=typeof K=="function"?K(S,I):K;return typeof se=="string"&&(se=se.includes("?")||se.includes("#")?se=A(se):{path:se},se.params={}),de({query:S.query,hash:S.hash,params:se.path!=null?{}:S.params},se)}}function j(S,I){const k=f=V(S),K=u.value,se=S.state,c=S.force,m=S.replace===!0,g=D(k,K);if(g)return j(de(A(g),{state:typeof g=="object"?de({},se,g.state):se,force:c,replace:m}),I||k);const E=k;E.redirectedFrom=I;let R;return!c&&Pu(s,K,k)&&(R=fn(Ae.NAVIGATION_DUPLICATED,{to:E,from:K}),Je(K,K,!0,!1)),(R?Promise.resolve(R):Y(E,K)).catch($=>Ct($)?Ct($,Ae.NAVIGATION_GUARD_REDIRECT)?$:et($):le($,E,K)).then($=>{if($){if(Ct($,Ae.NAVIGATION_GUARD_REDIRECT))return j(de({replace:m},A($.to),{state:typeof $.to=="object"?de({},se,$.to.state):se,force:c}),I||E)}else $=Ee(E,K,!0,m,se);return F(E,K,$),$})}function U(S,I){const k=_(S,I);return k?Promise.reject(k):Promise.resolve()}function ye(S){const I=yt.values().next().value;return I&&typeof I.runWithContext=="function"?I.runWithContext(S):S()}function Y(S,I){let k;const[K,se,c]=Wu(S,I);k=Ds(K.reverse(),"beforeRouteLeave",S,I);for(const g of K)g.leaveGuards.forEach(E=>{k.push(Lt(E,S,I))});const m=U.bind(null,S,I);return k.push(m),Ve(k).then(()=>{k=[];for(const g of r.list())k.push(Lt(g,S,I));return k.push(m),Ve(k)}).then(()=>{k=Ds(se,"beforeRouteUpdate",S,I);for(const g of se)g.updateGuards.forEach(E=>{k.push(Lt(E,S,I))});return k.push(m),Ve(k)}).then(()=>{k=[];for(const g of c)if(g.beforeEnter)if(at(g.beforeEnter))for(const E of g.beforeEnter)k.push(Lt(E,S,I));else k.push(Lt(g.beforeEnter,S,I));return k.push(m),Ve(k)}).then(()=>(S.matched.forEach(g=>g.enterCallbacks={}),k=Ds(c,"beforeRouteEnter",S,I,ye),k.push(m),Ve(k))).then(()=>{k=[];for(const g of i.list())k.push(Lt(g,S,I));return k.push(m),Ve(k)}).catch(g=>Ct(g,Ae.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function F(S,I,k){l.list().forEach(K=>ye(()=>K(S,I,k)))}function Ee(S,I,k,K,se){const c=_(S,I);if(c)return c;const m=I===jt,g=Xt?history.state:{};k&&(K||m?o.replace(S.fullPath,de({scroll:m&&g&&g.scroll},se)):o.push(S.fullPath,se)),u.value=S,Je(S,I,k,m),et()}let G;function We(){G||(G=o.listen((S,I,k)=>{if(!_t.listening)return;const K=V(S),se=D(K,_t.currentRoute.value);if(se){j(de(se,{replace:!0,force:!0}),K).catch(En);return}f=K;const c=u.value;Xt&&Uu(nr(c.fullPath,k.delta),xs()),Y(K,c).catch(m=>Ct(m,Ae.NAVIGATION_ABORTED|Ae.NAVIGATION_CANCELLED)?m:Ct(m,Ae.NAVIGATION_GUARD_REDIRECT)?(j(de(A(m.to),{force:!0}),K).then(g=>{Ct(g,Ae.NAVIGATION_ABORTED|Ae.NAVIGATION_DUPLICATED)&&!k.delta&&k.type===Ws.pop&&o.go(-1,!1)}).catch(En),Promise.reject()):(k.delta&&o.go(-k.delta,!1),le(m,K,c))).then(m=>{m=m||Ee(K,c,!1),m&&(k.delta&&!Ct(m,Ae.NAVIGATION_CANCELLED)?o.go(-k.delta,!1):k.type===Ws.pop&&Ct(m,Ae.NAVIGATION_ABORTED|Ae.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),F(K,c,m)}).catch(En)}))}let Vt=bn(),ke=bn(),ce;function le(S,I,k){et(S);const K=ke.list();return K.length?K.forEach(se=>se(S,I,k)):console.error(S),Promise.reject(S)}function Xe(){return ce&&u.value!==jt?Promise.resolve():new Promise((S,I)=>{Vt.add([S,I])})}function et(S){return ce||(ce=!S,We(),Vt.list().forEach(([I,k])=>S?k(S):I()),Vt.reset()),S}function Je(S,I,k,K){const{scrollBehavior:se}=e;if(!Xt||!se)return Promise.resolve();const c=!k&&Lu(nr(S.fullPath,0))||(K||!k)&&history.state&&history.state.scroll||null;return lo().then(()=>se(S,I,c)).then(m=>m&&ju(m)).catch(m=>le(m,S,I))}const Ne=S=>o.go(S);let ut;const yt=new Set,_t={currentRoute:u,listening:!0,addRoute:x,removeRoute:T,clearRoutes:t.clearRoutes,hasRoute:P,getRoutes:w,resolve:V,options:e,push:b,replace:v,go:Ne,back:()=>Ne(-1),forward:()=>Ne(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:ke.add,isReady:Xe,install(S){S.component("RouterLink",mc),S.component("RouterView",bc),S.config.globalProperties.$router=_t,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>Re(u)}),Xt&&!ut&&u.value===jt&&(ut=!0,b(o.location).catch(K=>{}));const I={};for(const K in jt)Object.defineProperty(I,K,{get:()=>u.value[K],enumerable:!0});S.provide(ys,_t),S.provide(vo,Lr(I)),S.provide(Js,u);const k=S.unmount;yt.add(S),S.unmount=function(){yt.delete(S),yt.size<1&&(f=jt,G&&G(),G=null,u.value=jt,ut=!1,ce=!1),k()}}};function Ve(S){return S.reduce((I,k)=>I.then(()=>ye(k)),Promise.resolve())}return _t}function go(){return ot(ys)}function Bi(e){return ot(vo)}const Hn=window.location.pathname.startsWith("/portal/"),Be={esPortal:Hn,baseRuta:Hn?"/portal/studio/":"/studio/",apiBase:Hn?"/portal":"/app",urlLogin:Hn?"/portal/login":"/login"};function ee(e){return Be.apiBase+e}async function Bn(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=Be.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 te={get:e=>Bn(e),post:(e,t)=>Bn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Bn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Bn(e,{method:"DELETE"})},_n=H(!1),yc={class:"h-14 px-4 flex items-center gap-2 border-b border-borde"},_c={key:0,class:"px-3 pt-3"},wc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},Cc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},kc={key:0,class:"px-2 text-xs text-tenue"},Ac={key:1,class:"px-2 text-xs text-tenue"},$c={class:"truncate"},Ec={class:"flex items-center gap-1 mt-0.5"},Sc={class:"text-[11px] text-tenue"},Ic={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Rc=["onClick"],Pc=["onClick"],Tc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Oc={class:"font-semibold text-texto mb-4"},Mc={key:0,class:"grid grid-cols-2 gap-3"},Dc=["value"],Nc={class:"text-[11px] text-tenue mt-1"},Vc=["value"],jc={class:"text-[11px] text-tenue mt-1"},Uc={class:"flex items-center gap-2 text-sm text-texto"},Lc={class:"flex justify-end gap-2 pt-2"},Fc={__name:"Sidebar",setup(e,{expose:t}){const n=Bi(),s=go(),o=H([]),r=H([]),i=H([]),l=H(!0),u=H(""),f=H(!1),d=H(null),p=H(x()),h=xe(()=>n.params.tenantId||n.params.id);It(()=>n.fullPath,()=>{_n.value=!1});function x(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function T(){l.value=!0,u.value="";try{const v=await te.get(ee("/umind/tenants"));o.value=v.items||[]}catch(v){u.value=v.message}finally{l.value=!1}}function w(v){return Array.isArray(v)?v:(v==null?void 0:v.items)||(v==null?void 0:v.registros)||[]}async function P(){if(Be.esPortal)return;const[v,D]=await Promise.allSettled([te.get("/app/api/clientes/select"),te.get("/app/umind-planes/list")]);r.value=v.status==="fulfilled"?w(v.value):[],i.value=D.status==="fulfilled"?w(D.value):[];const j=[];v.status==="rejected"&&j.push("clientes"),D.status==="rejected"&&j.push("planes"),j.length&&(u.value=`No se pudo cargar la lista de ${j.join(" ni ")}.`)}function V(){d.value=null,p.value=x(),f.value=!0}function A(v){d.value=v,p.value={nombre:v.nombre,dominios_permitidos:v.dominios_permitidos,activo:v.activo,cliente_id:v.cliente_id??null,plan_id:v.plan_id??null},f.value=!0}async function _(){const v={...p.value,dominios_permitidos:p.value.dominios_permitidos.split(",").map(D=>D.trim()).filter(Boolean)};try{if(d.value)await te.put(ee(`/umind/tenants/${d.value.ID}`),v),f.value=!1,await T();else{const D=await te.post(ee("/umind/tenants"),v);f.value=!1,await T(),s.push(`/tenants/${D.id}`)}}catch(D){u.value=D.message}}async function b(v){confirm(`¿Eliminar el espacio "${v.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await te.del(ee(`/umind/tenants/${v.ID}`)),h.value===String(v.ID)&&s.push("/"),await T())}return t({recargar:T}),hs(()=>{T(),P()}),(v,D)=>{const j=mn("router-link");return y(),C(re,null,[Re(_n)?(y(),C("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:D[0]||(D[0]=U=>_n.value=!1)})):W("",!0),a("aside",{class:_e(["w-64 shrink-0 flex flex-col border-r border-borde bg-superficie fixed inset-y-0 left-0 z-40 transition-transform duration-200 md:static md:h-screen md:sticky md:top-0 md:translate-x-0",Re(_n)?"translate-x-0":"-translate-x-full"])},[a("div",yc,[oe(j,{to:"/",class:"flex items-center gap-2 text-base font-semibold text-texto"},{default:nt(()=>[...D[8]||(D[8]=[a("svg",{viewBox:"0 0 96 96",class:"w-6 h-6 shrink-0","aria-hidden":"true"},[a("rect",{width:"96",height:"96",rx:"22",fill:"#8eb02f"}),a("path",{d:"M32,42 V58 A14,14 0 0 0 60,58 V42",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M60,58 V64",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round"}),a("circle",{cx:"60",cy:"28",r:"7",fill:"#fff"})],-1),a("span",null,[ie("uMind "),a("span",{class:"text-brand"},"Studio")],-1)])]),_:1})]),Re(Be).esPortal?W("",!0):(y(),C("div",_c,[a("button",{class:"btn-primary w-full",onClick:V}," + Nuevo espacio ")])),u.value?(y(),C("p",wc,O(u.value),1)):W("",!0),a("nav",Cc,[l.value?(y(),C("p",kc,"Cargando...")):o.value.length===0?(y(),C("p",Ac,O(Re(Be).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin espacios todavía."),1)):W("",!0),(y(!0),C(re,null,we(o.value,U=>(y(),C("div",{key:U.ID,class:_e(["group flex items-center rounded-lg transition-colors",h.value===String(U.ID)?"bg-brand/10":"hover:bg-elevado"])},[oe(j,{to:`/tenants/${U.ID}`,class:_e(["flex-1 min-w-0 px-2.5 py-2 text-sm",h.value===String(U.ID)?"text-brand font-medium":"text-texto"])},{default:nt(()=>[a("div",$c,O(U.nombre),1),a("div",Ec,[a("span",{class:_e(["w-1.5 h-1.5 rounded-full",U.activo?"bg-green-500":"bg-tenue/40"])},null,2),a("span",Sc,O(U.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Re(Be).esPortal?W("",!0):(y(),C("div",Ic,[a("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:ye=>A(U)},[oe(Ge,{nombre:"lapiz",tam:14})],8,Rc),a("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:ye=>b(U)},[oe(Ge,{nombre:"cerrar",tam:14})],8,Pc)]))],2))),128))])],2),f.value?(y(),C("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:D[7]||(D[7]=Pe(U=>f.value=!1,["self"]))},[a("div",Tc,[a("h2",Oc,O(d.value?"Editar espacio":"Nuevo espacio"),1),D[17]||(D[17]=a("p",{class:"text-xs text-tenue mb-3"}," Un espacio es el negocio o sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),a("form",{class:"space-y-3",onSubmit:Pe(_,["prevent"])},[a("div",null,[D[9]||(D[9]=a("label",{class:"label"},"Nombre",-1)),Z(a("input",{"onUpdate:modelValue":D[1]||(D[1]=U=>p.value.nombre=U),required:"",class:"input"},null,512),[[ue,p.value.nombre]])]),a("div",null,[D[10]||(D[10]=a("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),Z(a("input",{"onUpdate:modelValue":D[2]||(D[2]=U=>p.value.dominios_permitidos=U),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[ue,p.value.dominios_permitidos]])]),Re(Be).esPortal?W("",!0):(y(),C("div",Mc,[a("div",null,[D[12]||(D[12]=a("label",{class:"label"},"Cliente",-1)),Z(a("select",{"onUpdate:modelValue":D[3]||(D[3]=U=>p.value.cliente_id=U),class:"input"},[D[11]||(D[11]=a("option",{value:null},"— sin asignar —",-1)),(y(!0),C(re,null,we(r.value,U=>(y(),C("option",{key:U.ID,value:U.ID},O(U.nombre),9,Dc))),128))],512),[[un,p.value.cliente_id]]),a("p",Nc,O(r.value.length?"Define quién ve este espacio desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),a("div",null,[D[14]||(D[14]=a("label",{class:"label"},"Plan",-1)),Z(a("select",{"onUpdate:modelValue":D[4]||(D[4]=U=>p.value.plan_id=U),class:"input"},[D[13]||(D[13]=a("option",{value:null},"— sin plan —",-1)),(y(!0),C(re,null,we(i.value,U=>(y(),C("option",{key:U.ID,value:U.ID},O(U.nombre)+" ("+O(U.max_agentes===0?"∞":U.max_agentes)+" agentes) ",9,Vc))),128))],512),[[un,p.value.plan_id]]),a("p",jc,O(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),a("label",Uc,[Z(a("input",{"onUpdate:modelValue":D[5]||(D[5]=U=>p.value.activo=U),type:"checkbox"},null,512),[[Pt,p.value.activo]]),D[15]||(D[15]=ie(" Activo ",-1))]),a("div",Lc,[a("button",{type:"button",class:"btn-ghost",onClick:D[6]||(D[6]=U=>f.value=!1)}," Cancelar "),D[16]||(D[16]=a("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):W("",!0)],64)}}},Gi="umind-tema";function qc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const rn=H(localStorage.getItem(Gi)||qc());function Ki(){document.documentElement.classList.toggle("dark",rn.value==="oscuro")}function hr(){rn.value=rn.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Gi,rn.value),Ki()}Ki();const vr="umind_despertar_visto",gr=1250,Hc={__name:"DespertarUmind",setup(e){const t=H(null),n=H(!1);let s=null,o=null;function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}return hs(()=>{r()||sessionStorage.getItem(vr)||(sessionStorage.setItem(vr,"1"),n.value=!0,o=setTimeout(()=>n.value=!1,gr),requestAnimationFrame(()=>{const i=t.value;if(!i)return;const l=i.getContext("2d"),u=Math.min(window.devicePixelRatio||1,2),f=window.innerWidth,d=window.innerHeight;i.width=Math.round(f*u),i.height=Math.round(d*u),l.setTransform(u,0,0,u,0,0);const p=f<640?22:46,h=Array.from({length:p},()=>({x:Math.random()*f,y:Math.random()*d,r:1+Math.random()*1.6,demora:Math.random()*.45})),x=performance.now(),T=w=>{const P=Math.min(1,(w-x)/gr);l.clearRect(0,0,f,d);const V=P<.75?1:1-(P-.75)/.25;for(let A=0;A<h.length;A++){const _=h[A],b=Math.max(0,Math.min(1,(P-_.demora)/.4));if(!(b<=0)){for(let v=A+1;v<h.length;v++){const D=h[v],j=_.x-D.x,U=_.y-D.y,ye=Math.sqrt(j*j+U*U);ye>170||(l.strokeStyle=`rgba(142, 176, 47, ${.16*(1-ye/170)*b*V})`,l.lineWidth=1,l.beginPath(),l.moveTo(_.x,_.y),l.lineTo(D.x,D.y),l.stroke())}l.beginPath(),l.arc(_.x,_.y,_.r*b,0,Math.PI*2),l.fillStyle=`rgba(142, 176, 47, ${.5*b*V})`,l.fill()}}P<1&&(s=requestAnimationFrame(T))};s=requestAnimationFrame(T)}))}),ei(()=>{s&&cancelAnimationFrame(s),o&&clearTimeout(o)}),(i,l)=>n.value?(y(),C("canvas",{key:0,ref_key:"lienzo",ref:t,class:"fixed inset-0 w-full h-full pointer-events-none z-50","aria-hidden":"true"},null,512)):W("",!0)}},Bc={class:"min-h-screen flex"},Gc={class:"flex-1 min-w-0 flex flex-col"},Kc={class:"h-14 shrink-0 flex items-center gap-1 px-4 sm:px-6 border-b border-borde"},Wc=["title"],zc={class:"flex-1 max-w-5xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8 animate-aparecer"},Jc={__name:"App",setup(e){return(t,n)=>{const s=mn("router-view");return y(),C("div",Bc,[oe(Hc),oe(Fc),a("main",Gc,[a("header",Kc,[a("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>_n.value=!0)},[...n[2]||(n[2]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=a("span",{class:"flex-1"},null,-1)),a("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Re(rn)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>Re(hr)&&Re(hr)(...o))},[oe(Ge,{nombre:Re(rn)==="oscuro"?"sol":"luna",tam:17},null,8,["nombre"])],8,Wc)]),a("div",zc,[oe(s)])])])}}},Qc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Yc=["width","height","aria-label"],Zc=["fill"],Xc=["stroke"],ed=["cy"],td=["cy"],nd=["cy"],sd=["cy"],od={key:1,d:"M41,66 h12 M67,66 h12",class:"umi-linea","stroke-width":"5","stroke-linecap":"round",fill:"none"},rd={key:4,d:"M50,78 q10,8 20,0",class:"umi-linea","stroke-width":"4",fill:"none","stroke-linecap":"round"},id={__name:"UiMascota",props:{estado:{type:String,default:"normal"},tam:{type:[Number,String],default:72}},setup(e){return(t,n)=>(y(),C("svg",{width:e.tam,height:e.tam,viewBox:"0 0 120 120",class:"shrink-0",role:"img","aria-label":`Umi, la mascota de uMind (${e.estado})`},[a("circle",{cx:"60",cy:"26",r:"6",fill:e.estado==="alerta"?"#dc2626":"currentColor",class:_e(e.estado==="pensando"?"umi-late":"")},null,10,Zc),a("line",{x1:"60",y1:"32",x2:"60",y2:"44",stroke:e.estado==="alerta"?"#dc2626":"currentColor","stroke-width":"4","stroke-linecap":"round"},null,8,Xc),n[7]||(n[7]=a("path",{d:"M30,46 V76 A30,30 0 0 0 90,76 V46 Z",fill:"currentColor"},null,-1)),e.estado==="normal"||e.estado==="contenta"||e.estado==="alerta"?(y(),C(re,{key:0},[a("circle",{cx:"47",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,ed),a("circle",{cx:"73",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,td),a("circle",{cx:"48",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,nd),a("circle",{cx:"74",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,sd)],64)):e.estado==="durmiendo"?(y(),C("path",od)):e.estado==="pensando"?(y(),C(re,{key:2},[n[0]||(n[0]=a("circle",{cx:"45",cy:"66",r:"4.5",class:"umi-ojo umi-p1"},null,-1)),n[1]||(n[1]=a("circle",{cx:"60",cy:"66",r:"4.5",class:"umi-ojo umi-p2"},null,-1)),n[2]||(n[2]=a("circle",{cx:"75",cy:"66",r:"4.5",class:"umi-ojo umi-p3"},null,-1))],64)):e.estado==="buscando"?(y(),C(re,{key:3},[n[3]||(n[3]=a("circle",{cx:"47",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[4]||(n[4]=a("circle",{cx:"73",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[5]||(n[5]=a("circle",{cx:"50",cy:"66",r:"3",class:"umi-pupila"},null,-1)),n[6]||(n[6]=a("circle",{cx:"76",cy:"66",r:"3",class:"umi-pupila"},null,-1))],64)):W("",!0),e.estado==="contenta"?(y(),C("path",rd)):W("",!0)],8,Yc))}},ss=Qc(id,[["__scopeId","data-v-551897a0"]]),ld={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},ad={key:1,class:"max-w-md mx-auto text-center py-20"},ud={key:2,class:"flex flex-col items-center justify-center text-center py-24"},cd={class:"text-lg font-medium text-texto"},dd={class:"text-sm text-tenue mt-1"},fd={__name:"Home",setup(e){const t=go(),n=H(Be.esPortal),s=H(!1);async function o(){if(Be.esPortal)try{const i=(await te.get(ee("/umind/tenants"))).items||[];if(i.length===0){s.value=!0;return}if(i.length!==1)return;const l=i[0].ID,f=(await te.get(ee(`/umind/agentes?tenant_id=${l}`))).items||[];if(f.length===1){t.replace(`/tenants/${l}/agentes/${f[0].ID}`);return}t.replace(`/tenants/${l}`)}catch{}finally{n.value=!1}}return hs(o),(r,i)=>n.value?(y(),C("div",ld," Abriendo tu asistente… ")):s.value?(y(),C("div",ad,[oe(ss,{estado:"durmiendo",tam:80,class:"mx-auto mb-4 text-brand"}),i[0]||(i[0]=Ai('<h1 class="text-lg font-medium text-texto">Todavía no tenés un asistente activo</h1><p class="text-sm text-tenue mt-2"> uMind contesta por vos en WhatsApp y en tu sitio, con la información de tu negocio. Entiende las notas de voz y lee las fotos y archivos que te mandan tus clientes. </p><a class="btn-primary inline-block mt-5" href="mailto:soporte@u-site.app?subject=Quiero%20activar%20uMind">Quiero activarlo</a><p class="text-xs text-tenue mt-4"><a href="/portal/dashboard" class="underline">Volver al portal</a></p>',4))])):(y(),C("div",ud,[oe(ss,{estado:"normal",tam:64,class:"mx-auto mb-4 text-brand"}),a("h1",cd,O(Re(Be).esPortal?"Elegí tu espacio de la izquierda":"Elegí un espacio de la izquierda"),1),a("p",dd,O(Re(Be).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},pd={class:"flex flex-col items-center justify-center text-center py-12 px-6"},md={key:0,class:"text-3xl mb-3 opacity-70"},hd={class:"text-sm font-medium text-texto"},vd={key:2,class:"text-xs text-tenue mt-1.5 max-w-sm leading-relaxed"},gd={key:3,class:"mt-4"},Nt={__name:"UiEmptyState",props:{estado:{type:String,default:"durmiendo"},titulo:String,detalle:String,icono:{type:String,default:""}},setup(e){return(t,n)=>(y(),C("div",pd,[e.icono?(y(),C("div",md,O(e.icono),1)):(y(),$e(ss,{key:1,estado:e.estado,tam:64,class:"mb-3 text-brand"},null,8,["estado"])),a("p",hd,O(e.titulo),1),e.detalle?(y(),C("p",vd,O(e.detalle),1)):W("",!0),t.$slots.default?(y(),C("div",gd,[Ql(t.$slots,"default")])):W("",!0)]))}},bd={key:0,class:"mb-6"},xd={class:"flex items-start justify-between gap-4"},yd={class:"text-xl font-semibold text-texto"},_d={class:"text-xs text-tenue mt-1"},wd={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Cd={class:"flex items-center justify-between mb-4"},kd={class:"flex items-center gap-2"},Ad={key:0,class:"badge-alerta"},$d={key:1,class:"badge-neutro"},Ed=["disabled"],Sd={key:2,class:"text-xs text-tenue -mt-2 mb-4"},Id={key:3,class:"text-xs text-tenue -mt-2 mb-4"},Rd={key:4,class:"grid gap-3 sm:grid-cols-2"},Pd=["disabled"],Td={key:6,class:"grid gap-3 sm:grid-cols-2"},Od={class:"flex items-start gap-3"},Md={class:"min-w-0 flex-1"},Dd={class:"flex items-center gap-2"},Nd={class:"font-medium text-texto truncate"},Vd={class:"text-xs text-tenue mt-0.5 truncate"},jd={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},Ud=["onClick"],Ld=["onClick"],Fd=["onClick"],qd={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},Hd={class:"tabular-nums"},Bd={class:"text-texto font-medium"},Gd={class:"tabular-nums"},Kd={class:"text-texto font-medium"},Wd={class:"tabular-nums"},zd={class:"text-texto font-medium"},Jd={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg max-h-[calc(100vh-2rem)] overflow-y-auto"},Qd={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Yd={key:0},Zd={class:"grid gap-1.5"},Xd=["value"],ef={class:"min-w-0"},tf={class:"block text-sm text-texto"},nf={class:"block text-xs text-tenue"},sf={key:0,class:"block text-xs text-tenue mt-0.5"},of=["value"],rf={class:"flex items-center gap-2"},lf={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},af={class:"flex justify-end gap-2 pt-2"},uf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},cf={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=xe(()=>Number(t.id)),s=go(),o=H(null),r=H([]),i=H([]),l=H(""),u=H(!1),f=H(null),d=H(A()),p=H(null),h=H({}),x=H(!0);function T(Y){const F=h.value[Y.ID]||{};return Y.activo?F.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function w(Y){const F=h.value[Y.ID]||{};return{documentos:F.documentos||0,canales:F.canales||0,conversaciones:F.conversaciones_7d||0}}function P(Y){return String(Y||"?").trim().split(/\s+/).slice(0,2).map(F=>F[0]).join("").toUpperCase()}const V=xe(()=>{if(!p.value)return{sinPlan:!0};const Y=p.value.max_agentes||0;return{sinPlan:!1,nombre:p.value.nombre,ilimitado:Y<=0,max:Y,usados:r.value.length,lleno:Y>0&&r.value.length>=Y}});function A(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0,plantilla_rubro:""}}const _=H([]);async function b(){l.value="",x.value=!0;try{const[Y,F,Ee,G]=await Promise.all([te.get(ee("/umind/tenants")),te.get(ee(`/umind/agentes?tenant_id=${t.id}`)),te.get(ee("/umind/ai-configs")),te.get(ee("/umind/plantillas-rubro"))]);o.value=(Y.items||[]).find(We=>String(We.ID)===t.id)||null,r.value=F.items||[],p.value=F.plan||null,h.value=F.resumen||{},i.value=Ee.items||[],_.value=G.items||[]}catch(Y){l.value=Y.message}finally{x.value=!1}}async function v(Y){const F=prompt(`Nombre de la copia de "${Y.nombre}":`,`${Y.nombre} (copia)`);if(F!==null){l.value="";try{const Ee=await te.post(ee(`/umind/agentes/${Y.ID}/duplicar`),{tenant_id:Number(n.value),nombre:F.trim()});await b(),Ee.aviso&&alert(Ee.aviso)}catch(Ee){l.value=Ee.message}}}function D(){f.value=null,d.value=A(),u.value=!0}function j(Y){f.value=Y,d.value={nombre:Y.nombre,ai_config_id:Y.ai_config_id,tono:Y.tono,mensaje_bienvenida:Y.mensaje_bienvenida,color:Y.color||"#8eb02f",activo:Y.activo},u.value=!0}async function U(){try{if(f.value)await te.put(ee(`/umind/agentes/${f.value.ID}`),{tenant_id:n.value,...d.value}),u.value=!1,await b();else{const Y=await te.post(ee("/umind/agentes"),{tenant_id:n.value,...d.value});u.value=!1,s.push(`/tenants/${n.value}/agentes/${Y.id}`)}}catch(Y){l.value=Y.message}}async function ye(Y){confirm(`¿Eliminar el agente "${Y.nombre}"? Esto no se puede deshacer.`)&&(await te.del(ee(`/umind/agentes/${Y.ID}`)),await b())}return It(()=>t.id,b,{immediate:!0}),(Y,F)=>{const Ee=mn("router-link");return y(),C("div",null,[o.value?(y(),C("div",bd,[a("div",xd,[a("div",null,[a("h1",yd,O(o.value.nombre),1),a("p",_d,O(o.value.dominios_permitidos||"sin dominios configurados"),1)]),oe(Ee,{to:`/tenants/${n.value??e.id}/ia`,class:"btn-ghost"},{default:nt(()=>[...F[10]||(F[10]=[ie("Tu IA",-1)])]),_:1},8,["to"]),oe(Ee,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:nt(()=>[oe(Ge,{nombre:"grafico"}),F[11]||(F[11]=ie(" Consumo",-1))]),_:1},8,["to"])])])):W("",!0),l.value?(y(),C("p",wd,O(l.value),1)):W("",!0),a("div",Cd,[a("div",kd,[F[12]||(F[12]=a("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),V.value.sinPlan?(y(),C("span",Ad,"sin plan · sin límite")):V.value.ilimitado?(y(),C("span",$d,O(V.value.nombre)+" · ilimitado",1)):(y(),C("span",{key:2,class:_e(V.value.lleno?"badge-alerta":"badge-neutro")},O(V.value.nombre)+" · "+O(V.value.usados)+" de "+O(V.value.max),3))]),a("button",{class:"btn-primary",disabled:V.value.lleno,onClick:D},"+ Nuevo agente",8,Ed)]),V.value.sinPlan&&!Re(Be).esPortal?(y(),C("p",Sd," Este espacio no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del espacio, en la barra izquierda. ")):V.value.lleno?(y(),C("p",Id," Alcanzaste el máximo de agentes de tu plan. ")):W("",!0),x.value?(y(),C("div",Rd,[(y(),C(re,null,we(2,G=>a("div",{key:G,class:"card p-4 animate-pulse"},[...F[13]||(F[13]=[Ai('<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?(y(),$e(Nt,{key:5,class:"card",estado:"durmiendo",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:nt(()=>[a("button",{class:"btn-primary",disabled:V.value.lleno,onClick:D},"+ Crear el primer agente",8,Pd)]),_:1})):(y(),C("div",Td,[(y(!0),C(re,null,we(r.value,G=>(y(),$e(Ee,{key:G.ID,to:`/tenants/${n.value}/agentes/${G.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:nt(()=>[a("span",{class:"absolute inset-x-0 top-0 h-1",style:Jt({background:G.color||"#8eb02f"})},null,4),a("div",Od,[a("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Jt({background:G.color||"#8eb02f",opacity:G.activo?1:.4})},O(P(G.nombre)),5),a("div",Md,[a("div",Dd,[a("span",Nd,O(G.nombre),1),a("span",{class:_e(`badge-${T(G).tipo}`)},O(T(G).texto),3)]),a("p",Vd,O(G.tono||"sin tono definido"),1)]),a("div",jd,[a("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Pe(We=>j(G),["prevent","stop"])},[oe(Ge,{nombre:"lapiz",tam:14})],8,Ud),a("button",{class:"p-1 text-tenue hover:text-texto",title:"Duplicar: copia el conocimiento y las herramientas a un agente nuevo",onClick:Pe(We=>v(G),["prevent","stop"])},[oe(Ge,{nombre:"copiar",tam:14})],8,Ld),a("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Pe(We=>ye(G),["prevent","stop"])},[oe(Ge,{nombre:"cerrar",tam:14})],8,Fd)])]),a("div",qd,[a("span",Hd,[a("b",Bd,O(w(G).conversaciones),1),F[14]||(F[14]=ie(" conversaciones · 7d",-1))]),a("span",Gd,[a("b",Kd,O(w(G).documentos),1),F[15]||(F[15]=ie(" fuentes",-1))]),a("span",Wd,[a("b",zd,O(w(G).canales),1),F[16]||(F[16]=ie(" canales",-1))])])]),_:2},1032,["to"]))),128))])),u.value?(y(),C("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:F[9]||(F[9]=Pe(G=>u.value=!1,["self"]))},[a("div",Jd,[a("h2",Qd,O(f.value?"Editar agente":"Nuevo agente"),1),a("form",{class:"space-y-3",onSubmit:Pe(U,["prevent"])},[a("div",null,[F[17]||(F[17]=a("label",{class:"label"},"Nombre",-1)),Z(a("input",{"onUpdate:modelValue":F[0]||(F[0]=G=>d.value.nombre=G),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[ue,d.value.nombre]])]),!f.value&&_.value.length?(y(),C("div",Yd,[F[18]||(F[18]=a("label",{class:"label"},"Arrancar con",-1)),a("div",Zd,[(y(!0),C(re,null,we([{clave:"",nombre:"Agente en blanco",descripcion:"Sin conocimiento cargado. Lo escribís vos desde cero."},..._.value],G=>(y(),C("label",{key:G.clave,class:_e(["flex gap-2.5 p-2.5 rounded-lg border cursor-pointer transition-colors",d.value.plantilla_rubro===G.clave?"border-brand bg-brand/5":"border-borde hover:border-brand/40"])},[Z(a("input",{"onUpdate:modelValue":F[1]||(F[1]=We=>d.value.plantilla_rubro=We),type:"radio",value:G.clave,class:"mt-1 text-brand focus:ring-brand"},null,8,Xd),[[ru,d.value.plantilla_rubro]]),a("span",ef,[a("span",tf,O(G.nombre),1),a("span",nf,O(G.descripcion),1),G.notas?(y(),C("span",sf,O(G.notas)+" notas listas para editar · "+O(G.resumen),1)):W("",!0)])],2))),128))]),F[19]||(F[19]=a("p",{class:"text-xs text-tenue mt-1.5"}," Las notas vienen con ejemplos entre corchetes — abrilas y reemplazalas por tus datos reales. ",-1))])):W("",!0),a("div",null,[F[21]||(F[21]=a("label",{class:"label"},"Config de IA",-1)),Z(a("select",{"onUpdate:modelValue":F[2]||(F[2]=G=>d.value.ai_config_id=G),class:"input"},[F[20]||(F[20]=a("option",{value:null},"— sin asignar —",-1)),(y(!0),C(re,null,we(i.value,G=>(y(),C("option",{key:G.ID,value:G.ID},O(G.nombre)+" ("+O(G.provider)+")",9,of))),128))],512),[[un,d.value.ai_config_id]])]),a("div",null,[F[22]||(F[22]=a("label",{class:"label"},"Tono / personalidad",-1)),Z(a("textarea",{"onUpdate:modelValue":F[3]||(F[3]=G=>d.value.tono=G),rows:"2",class:"input"},null,512),[[ue,d.value.tono]])]),a("div",null,[F[23]||(F[23]=a("label",{class:"label"},"Mensaje de bienvenida",-1)),Z(a("input",{"onUpdate:modelValue":F[4]||(F[4]=G=>d.value.mensaje_bienvenida=G),class:"input"},null,512),[[ue,d.value.mensaje_bienvenida]])]),a("div",null,[F[24]||(F[24]=a("label",{class:"label"},"Color del widget",-1)),a("div",rf,[Z(a("input",{"onUpdate:modelValue":F[5]||(F[5]=G=>d.value.color=G),type:"color",class:"w-10 h-9 border border-gray-300 dark:border-gray-700 rounded cursor-pointer bg-white dark:bg-gray-800"},null,512),[[ue,d.value.color]]),Z(a("input",{"onUpdate:modelValue":F[6]||(F[6]=G=>d.value.color=G),type:"text",pattern:"#[0-9a-fA-F]{6}",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm font-mono"},null,512),[[ue,d.value.color]])])]),a("label",lf,[Z(a("input",{"onUpdate:modelValue":F[7]||(F[7]=G=>d.value.activo=G),type:"checkbox"},null,512),[[Pt,d.value.activo]]),F[25]||(F[25]=ie(" Activo ",-1))]),a("div",af,[a("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:F[8]||(F[8]=G=>u.value=!1)},"Cancelar"),a("button",uf,O(f.value?"Guardar":"Crear"),1)])],32)])])):W("",!0)])}}},df={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},ff={class:"cursor-pointer flex items-center gap-2 text-sm"},pf={class:"text-tenue text-xs shrink-0"},mf={class:"text-texto truncate"},hf={class:"text-tenue text-xs ml-auto shrink-0"},vf={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"},gf={__name:"TabAuditoria",props:{eventos:{type:Array,default:()=>[]}},setup(e){const t=xe(()=>s=>({error:"badge-error",warn:"badge-alerta"})[s]||"badge-neutro");function n(s){try{return new Date(s).toLocaleString()}catch{return s}}return(s,o)=>(y(),C("div",null,[o[0]||(o[0]=a("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar a la IA, a una herramienta, al correo o a los canales. Últimos 100. ",-1)),a("div",df,[e.eventos.length===0?(y(),$e(Nt,{key:0,estado:"contenta",titulo:"Ningún problema registrado",detalle:"Acá aparecen los errores: una herramienta que no responde, una fuente que no se pudo leer. Que esté vacío es buena señal."})):W("",!0),(y(!0),C(re,null,we(e.eventos,r=>(y(),C("details",{key:r.ID,class:"p-3"},[a("summary",ff,[a("span",{class:_e(["px-1.5 py-0.5 rounded text-xs shrink-0",t.value(r.nivel)])},O(r.nivel),3),a("span",pf,O(r.origen),1),a("span",mf,O(r.mensaje),1),a("span",hf,O(n(r.CreatedAt)),1)]),r.detalle?(y(),C("pre",vf,O(r.detalle),1)):W("",!0)]))),128))])]))}},bf={class:"flex gap-2 mb-4"},xf={class:"card divide-y divide-borde"},yf={class:"font-medium text-texto capitalize"},_f={class:"ml-2 text-sm text-tenue"},wf=["onClick"],Cf={__name:"TabConexiones",props:{agenteId:{type:Number,required:!0},conexiones:{type:Array,default:()=>[]}},emits:["recargar"],setup(e,{emit:t}){const n=e,s=t;function o(i){window.location.href=ee(`/umind/conexiones/conectar?agente_id=${n.agenteId}&proveedor=${i}`)}async function r(i){confirm(`¿Desconectar la cuenta ${i.email||i.proveedor}?`)&&(await te.del(ee(`/umind/conexiones/${i.ID}`)),s("recargar"))}return(i,l)=>(y(),C("div",null,[l[2]||(l[2]=a("p",{class:"label mb-4"}," Conectá una cuenta de correo para que este agente pueda enviar y leer correo en su nombre. Se soporta una cuenta activa a la vez. ",-1)),a("div",bf,[a("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:l[0]||(l[0]=u=>o("google"))}," Conectar Google "),a("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:l[1]||(l[1]=u=>o("microsoft"))}," Conectar Outlook ")]),a("div",xf,[e.conexiones.length===0?(y(),$e(Nt,{key:0,titulo:"Sin cuentas conectadas",detalle:"Conectando una cuenta de correo, el agente puede leer y responder mensajes con tu dirección."})):W("",!0),(y(!0),C(re,null,we(e.conexiones,u=>(y(),C("div",{key:u.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("span",yf,O(u.proveedor),1),a("span",_f,O(u.email),1),a("span",{class:_e(["ml-2 px-1.5 py-0.5 rounded text-xs",u.activo?"badge-ok":"badge-neutro"])},O(u.activo?"activa":"inactiva"),3)]),a("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:f=>r(u)},"Desconectar",8,wf)]))),128))])]))}},kf={class:"card p-4 flex flex-col h-[28rem]"},Af={class:"flex-1 overflow-y-auto space-y-2 mb-3"},$f={key:0,class:"text-sm text-tenue"},Ef={key:1,class:"flex items-center gap-2"},Sf=["disabled"],If={__name:"TabChat",props:{agenteId:{type:Number,required:!0}},setup(e){const t=e,n=`staff-preview-${Math.random().toString(36).slice(2)}`,s=H([]),o=H(""),r=H(!1);async function i(){const l=o.value.trim();if(!(!l||r.value)){o.value="",s.value.push({role:"user",content:l}),r.value=!0;try{const u=await te.post(ee("/umind/chat"),{agente_id:t.agenteId,session_id:n,mensaje:l});s.value.push({role:"assistant",content:u.respuesta})}catch(u){s.value.push({role:"assistant",content:`⚠ ${u.message}`})}finally{r.value=!1}}}return(l,u)=>(y(),C("div",kf,[a("div",Af,[s.value.length===0?(y(),C("p",$f," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA, las mismas herramientas y la misma base de conocimiento. ")):W("",!0),(y(!0),C(re,null,we(s.value,(f,d)=>(y(),C("div",{key:d,class:_e(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",f.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},O(f.content),3))),128)),r.value?(y(),C("div",Ef,[oe(ss,{estado:"pensando",tam:30,class:"text-brand"}),u[1]||(u[1]=a("span",{class:"text-xs text-tenue"},"Pensando…",-1))])):W("",!0)]),a("form",{class:"flex gap-2",onSubmit:Pe(i,["prevent"])},[Z(a("input",{"onUpdate:modelValue":u[0]||(u[0]=f=>o.value=f),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[ue,o.value]]),a("button",{type:"submit",disabled:r.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,Sf)],32)]))}},Rf={class:"grid grid-cols-3 gap-4"},Pf={class:"col-span-1 card divide-y divide-borde max-h-[28rem] overflow-y-auto"},Tf=["onClick"],Of={class:"text-texto truncate"},Mf={class:"text-xs text-tenue mt-0.5"},Df={class:"col-span-2 card p-4 max-h-[28rem] overflow-y-auto space-y-2"},Nf={key:0,class:"text-sm text-tenue"},Vf={__name:"TabConversaciones",props:{agenteId:{type:Number,required:!0},sesiones:{type:Array,default:()=>[]}},setup(e){const t=e,n=H([]),s=H(null);async function o(r){s.value=r;const i=await te.get(ee(`/umind/historial?agente_id=${t.agenteId}&session_id=${r}`));n.value=i.items||[]}return(r,i)=>(y(),C("div",Rf,[a("div",Pf,[e.sesiones.length===0?(y(),$e(Nt,{key:0,titulo:"Nadie escribió todavía",detalle:"Acá vas a ver todo lo que le preguntan y qué contestó."})):W("",!0),(y(!0),C(re,null,we(e.sesiones,l=>(y(),C("button",{key:l.session_id,class:_e(["w-full text-left p-3 hover:bg-elevado text-sm",s.value===l.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:u=>o(l.session_id)},[a("div",Of,O(l.content),1),a("div",Mf,O(l.session_id),1)],10,Tf))),128))]),a("div",Df,[s.value?W("",!0):(y(),C("p",Nf,"Elegí una conversación de la izquierda.")),(y(!0),C(re,null,we(n.value,l=>(y(),C("div",{key:l.ID,class:_e(["max-w-[80%] px-3 py-2 rounded-lg text-sm",l.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},O(l.content),3))),128))])]))}},jf={class:"card divide-y divide-borde"},Uf={class:"text-sm text-texto font-mono"},Lf={class:"label mt-0.5"},Ff={class:"text-xs text-tenue mt-0.5"},qf={key:0,class:"ml-1 text-green-600 dark:text-green-400"},Hf={key:1,class:"ml-1 text-gray-400"},Bf={class:"flex gap-3 text-sm shrink-0"},Gf=["onClick"],Kf=["onClick"],Wf={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},zf={class:"font-semibold text-texto mb-4"},Jf={class:"border border-borde rounded-lg p-3 space-y-2"},Qf=["onUpdate:modelValue"],Yf=["onUpdate:modelValue"],Zf=["onUpdate:modelValue"],Xf={class:"label flex items-center gap-1"},ep=["onUpdate:modelValue"],tp=["onClick"],np={key:0,class:"text-xs text-gray-400"},sp={class:"border border-borde rounded-lg p-3 space-y-2"},op={class:"flex items-center gap-2 label"},rp={class:"flex items-center gap-2 text-sm text-texto"},ip={class:"flex justify-end gap-2 pt-2"},lp={__name:"TabHerramientas",props:{agenteId:{type:Number,required:!0},tools:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=H(!1),r=H(null),i=H(l());function l(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}function u(){r.value=null,i.value=l(),o.value=!0}function f(T){r.value=T;let w=[];try{w=JSON.parse(T.parametros_json||"[]")||[]}catch{w=[]}i.value={nombre:T.nombre,descripcion:T.descripcion,url:T.url,auth_header_nombre:T.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:w,activa:T.activa},o.value=!0}function d(){i.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function p(T){i.value.parametros.splice(T,1)}async function h(){const T={agente_id:n.agenteId,nombre:i.value.nombre.trim(),descripcion:i.value.descripcion,url:i.value.url.trim(),auth_header_nombre:i.value.auth_header_nombre,parametros:i.value.parametros,activa:i.value.activa};i.value.tocarAuth&&(T.auth_header_valor=i.value.auth_header_valor);try{r.value?await te.put(ee(`/umind/tools/${r.value.ID}`),T):await te.post(ee("/umind/tools"),T),o.value=!1,s("recargar")}catch(w){s("error",w.message)}}async function x(T){confirm(`¿Eliminar la herramienta "${T.nombre}"?`)&&(await te.del(ee(`/umind/tools/${T.ID}`)),s("recargar"))}return(T,w)=>(y(),C("div",null,[a("div",{class:"flex justify-between items-center mb-4"},[w[9]||(w[9]=a("p",{class:"label"},"Máximo 10 herramientas activas por agente.",-1)),a("button",{class:"btn-primary",onClick:u}," + Nueva herramienta ")]),a("div",jf,[e.tools.length===0?(y(),$e(Nt,{key:0,titulo:"Sin herramientas conectadas",detalle:"Las herramientas le dejan consultar tus sistemas mientras conversa: stock, estado de un pedido, disponibilidad de turnos. Sin ninguna, responde solo con lo que tiene cargado."})):W("",!0),(y(!0),C(re,null,we(e.tools,P=>(y(),C("div",{key:P.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("div",Uf,O(P.nombre),1),a("div",Lf,O(P.descripcion),1),a("div",Ff,[ie(O(P.url)+" ",1),P.auth_configurado?(y(),C("span",qf,"· auth configurada")):W("",!0),P.activa?W("",!0):(y(),C("span",Hf,"· inactiva"))])]),a("div",Bf,[a("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:V=>f(P)},"Editar",8,Gf),a("button",{class:"text-red-500 hover:text-red-700",onClick:V=>x(P)},"Eliminar",8,Kf)])]))),128))]),o.value?(y(),C("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:w[8]||(w[8]=Pe(P=>o.value=!1,["self"]))},[a("div",Wf,[a("h2",zf,O(r.value?"Editar herramienta":"Nueva herramienta"),1),a("form",{class:"space-y-3",onSubmit:Pe(h,["prevent"])},[a("div",null,[w[10]||(w[10]=a("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),Z(a("input",{"onUpdate:modelValue":w[0]||(w[0]=P=>i.value.nombre=P),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[ue,i.value.nombre]])]),a("div",null,[w[11]||(w[11]=a("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),Z(a("textarea",{"onUpdate:modelValue":w[1]||(w[1]=P=>i.value.descripcion=P),rows:"2",required:"",class:"input"},null,512),[[ue,i.value.descripcion]])]),a("div",null,[w[12]||(w[12]=a("label",{class:"label"},"URL del webhook (https)",-1)),Z(a("input",{"onUpdate:modelValue":w[2]||(w[2]=P=>i.value.url=P),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[ue,i.value.url]])]),a("div",Jf,[a("div",{class:"flex items-center justify-between"},[w[13]||(w[13]=a("label",{class:"label"},"Parámetros que completa el modelo",-1)),a("button",{type:"button",class:"text-xs text-brand",onClick:d},"+ agregar")]),(y(!0),C(re,null,we(i.value.parametros,(P,V)=>(y(),C("div",{key:V,class:"flex gap-2 items-center"},[Z(a("input",{"onUpdate:modelValue":A=>P.nombre=A,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,Qf),[[ue,P.nombre]]),Z(a("select",{"onUpdate:modelValue":A=>P.tipo=A,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...w[14]||(w[14]=[a("option",{value:"string"},"string",-1),a("option",{value:"number"},"number",-1),a("option",{value:"boolean"},"boolean",-1)])],8,Yf),[[un,P.tipo]]),Z(a("input",{"onUpdate:modelValue":A=>P.descripcion=A,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,Zf),[[ue,P.descripcion]]),a("label",Xf,[Z(a("input",{"onUpdate:modelValue":A=>P.requerido=A,type:"checkbox"},null,8,ep),[[Pt,P.requerido]]),w[15]||(w[15]=ie(" req. ",-1))]),a("button",{type:"button",class:"text-red-400 text-xs",onClick:A=>p(V)},[oe(Ge,{nombre:"cerrar",tam:13})],8,tp)]))),128)),i.value.parametros.length===0?(y(),C("p",np,"Sin parámetros.")):W("",!0)]),a("div",sp,[w[16]||(w[16]=a("label",{class:"label"},"Autenticación saliente (opcional)",-1)),Z(a("input",{"onUpdate:modelValue":w[3]||(w[3]=P=>i.value.auth_header_nombre=P),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[ue,i.value.auth_header_nombre]]),a("label",op,[Z(a("input",{"onUpdate:modelValue":w[4]||(w[4]=P=>i.value.tocarAuth=P),type:"checkbox"},null,512),[[Pt,i.value.tocarAuth]]),ie(" "+O(r.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),i.value.tocarAuth?Z((y(),C("input",{key:0,"onUpdate:modelValue":w[5]||(w[5]=P=>i.value.auth_header_valor=P),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[ue,i.value.auth_header_valor]]):W("",!0)]),a("label",rp,[Z(a("input",{"onUpdate:modelValue":w[6]||(w[6]=P=>i.value.activa=P),type:"checkbox"},null,512),[[Pt,i.value.activa]]),w[17]||(w[17]=ie(" Activa ",-1))]),a("div",ip,[a("button",{type:"button",class:"btn-ghost",onClick:w[7]||(w[7]=P=>o.value=!1)},"Cancelar"),w[18]||(w[18]=a("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):W("",!0)]))}},ap={class:"card p-4 mb-4"},up={class:"flex items-center justify-between mb-2"},cp={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},dp={class:"card divide-y divide-borde"},fp={class:"flex items-center justify-between"},pp={class:"font-medium text-texto capitalize"},mp={class:"flex gap-3 text-sm"},hp=["onClick"],vp=["onClick"],gp={class:"flex gap-4 mt-2 text-xs"},bp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},xp=["checked","onChange"],yp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},_p=["checked","onChange"],wp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Cp=["checked","onChange"],kp={class:"label mt-1 break-all"},Ap={class:"bg-elevado px-1 rounded"},$p={key:0,class:"text-xs text-tenue mt-1"},Ep={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Sp={class:"card p-6 w-full max-w-md"},Ip={key:0},Rp={class:"flex flex-col gap-2 pt-1"},Pp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Tp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Op={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Mp={class:"flex justify-end gap-2 pt-2"},Dp={__name:"TabCanales",props:{agenteId:{type:Number,required:!0},siteKey:{type:String,default:""},canales:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=H(!1),r=H(f()),i=H(!1),l=xe(()=>{const A=n.siteKey||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${A}" defer><\/script>`});async function u(){try{await navigator.clipboard.writeText(l.value),i.value=!0,setTimeout(()=>i.value=!1,2e3)}catch{error.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function f(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1,usar_archivos_docs:!1}}function d(){r.value=f(),o.value=!0}async function p(){const A=r.value.tipo==="telegram"?{bot_token:r.value.bot_token}:{phone_number_id:r.value.phone_number_id,access_token:r.value.access_token,app_secret:r.value.app_secret,verify_token:r.value.verify_token};try{await te.post(ee("/umind/canales"),{agente_id:n.agenteId,tipo:r.value.tipo,credenciales:A,activo:!0,usar_whisper_audio:r.value.usar_whisper_audio,usar_ocr_imagenes:r.value.usar_ocr_imagenes,usar_archivos_docs:r.value.usar_archivos_docs}),o.value=!1,s("recargar")}catch(_){s("error",_.message)}}async function h(A,_){await te.put(ee(`/umind/canales/${A.ID}`),{activo:A.activo,credenciales:{},usar_whisper_audio:A.usar_whisper_audio,usar_ocr_imagenes:A.usar_ocr_imagenes,usar_archivos_docs:A.usar_archivos_docs,..._}),s("recargar")}const x=A=>h(A,{activo:!A.activo}),T=A=>h(A,{usar_whisper_audio:!A.usar_whisper_audio}),w=A=>h(A,{usar_ocr_imagenes:!A.usar_ocr_imagenes}),P=A=>h(A,{usar_archivos_docs:!A.usar_archivos_docs});async function V(A){confirm(`¿Eliminar el canal ${A.tipo}?`)&&(await te.del(ee(`/umind/canales/${A.ID}`)),s("recargar"))}return(A,_)=>(y(),C("div",null,[a("div",ap,[a("div",up,[_[11]||(_[11]=a("div",null,[a("span",{class:"font-medium text-texto"},"Web (widget)"),a("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),a("button",{class:_e(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",i.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:u},[i.value?(y(),$e(Ge,{key:0,nombre:"ok",tam:14})):W("",!0),ie(" "+O(i.value?"Copiado":"Copiar código"),1)],2)]),_[12]||(_[12]=a("p",{class:"label mb-2"},[ie(" Pegá esto antes de "),a("code",{class:"bg-elevado px-1 rounded"},"</body>"),ie(" en las páginas de tu sitio. ")],-1)),a("pre",cp,[a("code",null,O(l.value),1)])]),a("div",{class:"flex justify-end mb-4"},[a("button",{class:"btn-primary",onClick:d}," + Nuevo canal ")]),a("div",dp,[e.canales.length===0?(y(),$e(Nt,{key:0,titulo:"No está atendiendo en ningún lado",detalle:"Conectá WhatsApp o Telegram para que empiece a responderle a tus clientes. El widget de tu web funciona aparte, con la clave de sitio de arriba."})):W("",!0),(y(!0),C(re,null,we(e.canales,b=>(y(),C("div",{key:b.ID,class:"p-4"},[a("div",fp,[a("div",null,[a("span",pp,O(b.tipo),1),a("span",{class:_e(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},O(b.activo?"activo":"inactivo"),3)]),a("div",mp,[a("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:v=>x(b)},O(b.activo?"Desactivar":"Activar"),9,hp),a("button",{class:"text-red-500 hover:text-red-700",onClick:v=>V(b)},"Eliminar",8,vp)])]),a("div",gp,[a("label",bp,[a("input",{type:"checkbox",checked:b.usar_whisper_audio,onChange:v=>T(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,xp),_[13]||(_[13]=ie(" Transcribir audios (Whisper) ",-1))]),a("label",yp,[a("input",{type:"checkbox",checked:b.usar_ocr_imagenes,onChange:v=>w(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,_p),_[14]||(_[14]=ie(" Leer texto de imágenes (OCR) ",-1))]),a("label",wp,[a("input",{type:"checkbox",checked:b.usar_archivos_docs,onChange:v=>P(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Cp),_[15]||(_[15]=ie(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),a("p",kp,[_[16]||(_[16]=ie(" Webhook: ",-1)),a("code",Ap,O(b.webhook_url),1)]),b.tipo==="whatsapp"?(y(),C("p",$p,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):W("",!0),b.ultimo_error?(y(),C("p",Ep,O(b.ultimo_error),1)):W("",!0)]))),128))]),o.value?(y(),C("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:_[10]||(_[10]=Pe(b=>o.value=!1,["self"]))},[a("div",Sp,[_[28]||(_[28]=a("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),a("form",{class:"space-y-3",onSubmit:Pe(p,["prevent"])},[a("div",null,[_[18]||(_[18]=a("label",{class:"label"},"Tipo",-1)),Z(a("select",{"onUpdate:modelValue":_[0]||(_[0]=b=>r.value.tipo=b),class:"input"},[..._[17]||(_[17]=[a("option",{value:"telegram"},"Telegram",-1),a("option",{value:"whatsapp"},"WhatsApp Business",-1)])],512),[[un,r.value.tipo]])]),r.value.tipo==="telegram"?(y(),C("div",Ip,[_[19]||(_[19]=a("label",{class:"label"},"Bot token (de @BotFather)",-1)),Z(a("input",{"onUpdate:modelValue":_[1]||(_[1]=b=>r.value.bot_token=b),type:"password",required:"",class:"input"},null,512),[[ue,r.value.bot_token]])])):(y(),C(re,{key:1},[a("div",null,[_[20]||(_[20]=a("label",{class:"label"},"Phone Number ID",-1)),Z(a("input",{"onUpdate:modelValue":_[2]||(_[2]=b=>r.value.phone_number_id=b),required:"",class:"input"},null,512),[[ue,r.value.phone_number_id]])]),a("div",null,[_[21]||(_[21]=a("label",{class:"label"},"Access Token",-1)),Z(a("input",{"onUpdate:modelValue":_[3]||(_[3]=b=>r.value.access_token=b),type:"password",required:"",class:"input"},null,512),[[ue,r.value.access_token]])]),a("div",null,[_[22]||(_[22]=a("label",{class:"label"},"App Secret",-1)),Z(a("input",{"onUpdate:modelValue":_[4]||(_[4]=b=>r.value.app_secret=b),type:"password",required:"",class:"input"},null,512),[[ue,r.value.app_secret]])]),a("div",null,[_[23]||(_[23]=a("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),Z(a("input",{"onUpdate:modelValue":_[5]||(_[5]=b=>r.value.verify_token=b),required:"",class:"input"},null,512),[[ue,r.value.verify_token]])])],64)),a("div",Rp,[a("label",Pp,[Z(a("input",{type:"checkbox","onUpdate:modelValue":_[6]||(_[6]=b=>r.value.usar_whisper_audio=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Pt,r.value.usar_whisper_audio]]),_[24]||(_[24]=ie(" Transcribir audios con Whisper ",-1))]),a("label",Tp,[Z(a("input",{type:"checkbox","onUpdate:modelValue":_[7]||(_[7]=b=>r.value.usar_ocr_imagenes=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Pt,r.value.usar_ocr_imagenes]]),_[25]||(_[25]=ie(" Leer texto de imágenes con OCR ",-1))]),a("label",Op,[Z(a("input",{type:"checkbox","onUpdate:modelValue":_[8]||(_[8]=b=>r.value.usar_archivos_docs=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Pt,r.value.usar_archivos_docs]]),_[26]||(_[26]=ie(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),a("div",Mp,[a("button",{type:"button",class:"btn-ghost",onClick:_[9]||(_[9]=b=>o.value=!1)},"Cancelar"),_[27]||(_[27]=a("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):W("",!0)]))}},Np={key:0,class:"mb-6 mt-1 flex items-start justify-between gap-4"},Vp={class:"min-w-0"},jp={class:"text-xl font-semibold text-texto"},Up={class:"text-xs text-tenue mt-1"},Lp={class:"bg-elevado px-1.5 py-0.5 rounded"},Fp=["href"],qp={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Hp={class:"flex gap-1.5 mb-6 overflow-x-auto sin-barra pb-1"},Bp=["onClick"],Gp={key:2},Kp={class:"card p-4 mb-4"},Wp={class:"flex gap-1 mb-3"},zp=["onClick"],Jp={class:"flex items-center justify-between"},Qp=["disabled"],Yp={class:"flex items-center justify-between"},Zp=["disabled"],Xp={class:"flex gap-2"},em={class:"flex items-center justify-between"},tm={class:"flex items-center gap-2 text-xs text-tenue cursor-pointer"},nm=["disabled"],sm={class:"card divide-y divide-borde"},om={class:"text-sm text-texto"},rm={class:"text-xs text-tenue mt-0.5"},im={key:0,class:"latido"},lm={key:0},am={key:1},um={key:3},cm={key:4,class:"text-red-600 dark:text-red-400"},dm={class:"flex items-center gap-3 shrink-0"},fm=["title","onClick"],pm=["onClick"],mm=["disabled","title","onClick"],hm=["onClick"],vm={class:"card w-full max-w-2xl p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},gm={class:"flex justify-end gap-2 pt-1"},bm=["disabled"],xm={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=xe(()=>Number(t.agenteId)),s=Bi(),o=H(null),r=H(""),i=H(typeof s.query.tab=="string"?s.query.tab:Be.esPortal?"conversaciones":"conocimiento"),l=H([]),u=H(""),f=H(30),d=H(!1);async function p(){const I=await te.get(ee(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(I.items||[]).find(k=>String(k.ID)===t.agenteId)||null}async function h(){const I=await te.get(ee(`/umind/documentos?agente_id=${t.agenteId}`));l.value=I.items||[]}const x=H("texto"),T=H(!0),w=H(""),P=H(""),V=H(null);async function A(){if(u.value.trim()){d.value=!0,r.value="";try{await te.post(ee("/umind/documentos"),{agente_id:n.value,url:u.value.trim(),max_paginas:Number(f.value)||30,auto_actualizar:T.value}),u.value="",await h()}catch(I){r.value=I.message}finally{d.value=!1}}}async function _(){if(P.value.trim()){d.value=!0,r.value="";try{await te.post(ee("/umind/documentos/texto"),{agente_id:n.value,titulo:w.value.trim(),contenido:P.value}),w.value="",P.value="",await h()}catch(I){r.value=I.message}finally{d.value=!1}}}async function b(){var k,K;const I=(K=(k=V.value)==null?void 0:k.files)==null?void 0:K[0];if(I){d.value=!0,r.value="";try{const se=new FormData;se.append("agente_id",String(n.value)),se.append("archivo",I);const c=await fetch(ee("/umind/documentos/archivo"),{method:"POST",body:se}),m=await c.json();if(!c.ok)throw new Error(m.error||"No se pudo subir");V.value.value="",await h()}catch(se){r.value=se.message}finally{d.value=!1}}}const v=H(null),D=H({titulo:"",contenido:""}),j=H(!1);function U(I){v.value=I,D.value={titulo:I.origen,contenido:I.contenido||""}}async function ye(){if(v.value){j.value=!0,r.value="";try{await te.put(ee(`/umind/documentos/${v.value.ID}`),{titulo:D.value.titulo,contenido:D.value.contenido}),v.value=null,await h()}catch(I){r.value=I.message}finally{j.value=!1}}}async function Y(I){r.value="";try{await te.post(ee(`/umind/documentos/${I.ID}/reprocesar`),{}),await h()}catch(k){r.value=k.message}}async function F(I){try{await te.put(ee(`/umind/documentos/${I.ID}`),{auto_actualizar:!I.auto_actualizar}),await h()}catch(k){r.value=k.message}}function Ee(I){if(!I)return"sin procesar";const k=Math.floor((Date.now()-new Date(I))/864e5);if(k<=0)return"hoy";if(k===1)return"ayer";if(k<30)return`hace ${k} días`;const K=Math.floor(k/30);return K===1?"hace un mes":`hace ${K} meses`}function G(I){return I.procesado_at?Date.now()-new Date(I.procesado_at)>60*864e5:!1}async function We(I){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await te.del(ee(`/umind/documentos/${I}`)),await h())}const Vt=xe(()=>I=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[I]||"badge-neutro"),ke=H([]);async function ce(){const I=await te.get(ee(`/umind/sesiones?agente_id=${t.agenteId}`));ke.value=I.items||[]}const le=H([]);async function Xe(){const I=await te.get(ee(`/umind/tools?agente_id=${t.agenteId}`));le.value=I.items||[]}const et=H([]);async function Je(){const I=await te.get(ee(`/umind/canales?agente_id=${t.agenteId}`));et.value=I.items||[]}const Ne=xe(()=>{const I=new Date,k=new Date(I.getFullYear(),I.getMonth(),1).toISOString().slice(0,10),K=I.toISOString().slice(0,10);return ee(`/umind/reporte.xlsx?agente_id=${t.agenteId}&desde=${k}&hasta=${K}`)}),ut=H([]);async function yt(){const I=await te.get(ee(`/umind/conexiones?agente_id=${t.agenteId}`));ut.value=I.items||[]}const _t=xe(()=>Be.esPortal?[["conversaciones","Conversaciones"],["chat","Probar"],["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["auditoria","Auditoría"]]:[["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["chat","Chat de prueba"],["conversaciones","Conversaciones"],["auditoria","Auditoría"]]),Ve=H([]);async function S(){const I=await te.get(ee(`/umind/eventos?agente_id=${t.agenteId}`));Ve.value=I.items||[]}return It(()=>[t.tenantId,t.agenteId],async()=>{r.value="",o.value=null,l.value=[],ke.value=[],le.value=[],et.value=[],ut.value=[],Ve.value=[];try{await Promise.all([p(),h(),ce(),Xe(),Je(),yt(),S()])}catch(I){r.value=I.message}},{immediate:!0}),(I,k)=>{var se;const K=mn("router-link");return y(),C("div",null,[oe(K,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:nt(()=>[...k[11]||(k[11]=[ie("← Agentes",-1)])]),_:1},8,["to"]),o.value?(y(),C("div",Np,[a("div",Vp,[a("h1",jp,O(o.value.nombre),1),a("p",Up,[k[12]||(k[12]=ie(" site_key: ",-1)),a("code",Lp,O(o.value.site_key),1)])]),a("a",{href:Ne.value,class:"btn-ghost shrink-0",title:"Conversaciones y consumo del mes en Excel"},[oe(Ge,{nombre:"descargar",tam:15}),k[13]||(k[13]=ie(" Reporte del mes ",-1))],8,Fp)])):W("",!0),r.value?(y(),C("p",qp,O(r.value),1)):W("",!0),a("div",Hp,[(y(!0),C(re,null,we(_t.value,([c,m])=>(y(),C("button",{key:c,class:_e(["px-3 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",i.value===c?"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:g=>i.value=c},O(m),11,Bp))),128))]),i.value==="conocimiento"?(y(),C("div",Gp,[a("div",Kp,[a("div",Wp,[(y(),C(re,null,we([["texto","escribir","Escribir"],["archivo","archivo","Subir archivo"],["url","sitio","Sitio web"]],([c,m,g])=>a("button",{key:c,class:_e(["px-3 py-1.5 rounded-lg text-sm inline-flex items-center gap-1.5",x.value===c?"bg-brand text-white font-medium":"text-tenue hover:text-texto"]),onClick:E=>x.value=c},[oe(Ge,{nombre:m,tam:15},null,8,["nombre"]),ie(" "+O(g),1)],10,zp)),64))]),x.value==="texto"?(y(),C("form",{key:0,class:"space-y-2",onSubmit:Pe(_,["prevent"])},[Z(a("input",{"onUpdate:modelValue":k[0]||(k[0]=c=>w.value=c),placeholder:"Título (ej: Horarios y zonas de entrega)",class:"input"},null,512),[[ue,w.value]]),Z(a("textarea",{"onUpdate:modelValue":k[1]||(k[1]=c=>P.value=c),rows:"5",required:"",placeholder:"Atendemos de lunes a viernes de 9 a 18. No hacemos envíos fuera de la ciudad. La garantía es de 6 meses y cubre…",class:"input font-normal"},null,512),[[ue,P.value]]),a("div",Jp,[k[14]||(k[14]=a("p",{class:"text-xs text-tenue"},"Lo que te preguntan todos los días y no está en tu web.",-1)),a("button",{type:"submit",disabled:d.value,class:"btn-primary disabled:opacity-50"},O(d.value?"Guardando…":"Guardar"),9,Qp)])],32)):x.value==="archivo"?(y(),C("form",{key:1,class:"space-y-2",onSubmit:Pe(b,["prevent"])},[a("input",{ref_key:"archivoRef",ref:V,type:"file",accept:".pdf,.docx,.txt,.md,.csv,.html,image/*",class:"text-sm text-texto"},null,512),a("div",Yp,[k[15]||(k[15]=a("p",{class:"text-xs text-tenue"},"PDF, Word, texto o una foto. Ej: tu lista de precios.",-1)),a("button",{type:"submit",disabled:d.value,class:"btn-primary disabled:opacity-50"},O(d.value?"Leyendo…":"Subir"),9,Zp)])],32)):(y(),C("form",{key:2,class:"space-y-2",onSubmit:Pe(A,["prevent"])},[a("div",Xp,[Z(a("input",{"onUpdate:modelValue":k[2]||(k[2]=c=>u.value=c),type:"url",placeholder:"https://ejemplo.com",required:"",class:"input flex-1"},null,512),[[ue,u.value]]),Z(a("input",{"onUpdate:modelValue":k[3]||(k[3]=c=>f.value=c),type:"number",min:"1",max:"200",class:"input w-24",title:"Máximo de páginas a leer"},null,512),[[ue,f.value]])]),a("div",em,[a("label",tm,[Z(a("input",{"onUpdate:modelValue":k[4]||(k[4]=c=>T.value=c),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Pt,T.value]]),k[16]||(k[16]=ie(" Releer el sitio cada semana ",-1))]),a("button",{type:"submit",disabled:d.value,class:"btn-primary disabled:opacity-50"},O(d.value?"Leyendo…":"Leer sitio"),9,nm)])],32))]),a("div",sm,[l.value.length===0?(y(),$e(Nt,{key:0,estado:"buscando",titulo:"Todavía no sabe nada de tu negocio",detalle:"Sin información cargada va a contestar que no sabe. Empezá por escribir tus horarios y lo que te preguntan todos los días — es lo más rápido y lo que más se nota."})):W("",!0),(y(!0),C(re,null,we(l.value,c=>(y(),C("div",{key:c.ID,class:"p-4 flex items-center justify-between"},[a("div",null,[a("div",om,O(c.origen),1),a("div",rm,[a("span",{class:_e(["px-1.5 py-0.5 rounded inline-flex items-center gap-1",Vt.value(c.estado)])},[c.estado==="procesando"?(y(),C("span",im)):W("",!0),ie(" "+O(c.estado),1)],2),c.tipo?(y(),C("span",lm," · "+O({url:"sitio",archivo:"archivo",texto:"nota"}[c.tipo]||c.tipo),1)):W("",!0),c.total_chunks?(y(),C("span",am," · "+O(c.total_chunks)+" fragmentos",1)):W("",!0),c.procesado_at?(y(),C("span",{key:2,class:_e(G(c)?"text-amber-600 dark:text-amber-400 font-medium":"")}," · leído "+O(Ee(c.procesado_at)),3)):W("",!0),c.auto_actualizar?(y(),C("span",um," · se actualiza sola")):W("",!0),c.error?(y(),C("span",cm," · "+O(c.error),1)):W("",!0)])]),a("div",dm,[c.tipo==="url"?(y(),C("button",{key:0,class:"text-xs text-tenue hover:text-texto",title:c.auto_actualizar?"Dejar de releer sola":"Releer el sitio cada semana",onClick:m=>F(c)},[oe(Ge,{nombre:c.auto_actualizar?"auto":"refrescar",tam:13,class:"mr-1"},null,8,["nombre"]),ie(O(c.auto_actualizar?"auto":"manual"),1)],8,fm)):W("",!0),c.tipo==="texto"||c.tipo==="archivo"?(y(),C("button",{key:1,class:"text-sm text-brand hover:underline",onClick:m=>U(c)},"Editar",8,pm)):W("",!0),a("button",{class:"text-sm text-tenue hover:text-texto disabled:opacity-40",disabled:c.estado==="procesando",title:c.tipo==="url"?"Volver a leer el sitio":"Rehacer los fragmentos",onClick:m=>Y(c)},"Actualizar",8,mm),a("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:m=>We(c.ID)},"Eliminar",8,hm)])]))),128))]),v.value?(y(),C("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:k[8]||(k[8]=Pe(c=>v.value=null,["self"]))},[a("div",vm,[k[20]||(k[20]=a("h2",{class:"font-semibold text-texto mb-1"},"Editar fuente",-1)),k[21]||(k[21]=a("p",{class:"text-xs text-tenue mb-4"}," Al guardar se vuelve a leer y el agente empieza a contestar con esto. ",-1)),a("form",{class:"space-y-3",onSubmit:Pe(ye,["prevent"])},[a("div",null,[k[17]||(k[17]=a("label",{class:"label"},"Título",-1)),Z(a("input",{"onUpdate:modelValue":k[5]||(k[5]=c=>D.value.titulo=c),required:"",class:"input"},null,512),[[ue,D.value.titulo]])]),a("div",null,[k[18]||(k[18]=a("label",{class:"label"},"Contenido",-1)),Z(a("textarea",{"onUpdate:modelValue":k[6]||(k[6]=c=>D.value.contenido=c),rows:"16",required:"",class:"input font-normal leading-relaxed"},null,512),[[ue,D.value.contenido]]),k[19]||(k[19]=a("p",{class:"text-xs text-tenue mt-1.5"}," Si viene de una plantilla, reemplazá lo que está [entre corchetes] por tus datos. Lo que quede sin reemplazar el agente lo va a leer tal cual. ",-1))]),a("div",gm,[a("button",{type:"button",class:"btn-ghost",onClick:k[7]||(k[7]=c=>v.value=null)},"Cancelar"),a("button",{type:"submit",class:"btn-primary",disabled:j.value},O(j.value?"Guardando…":"Guardar y volver a leer"),9,bm)])],32)])])):W("",!0)])):i.value==="herramientas"?(y(),$e(lp,{key:3,"agente-id":n.value,tools:le.value,onRecargar:Xe,onError:k[9]||(k[9]=c=>r.value=c)},null,8,["agente-id","tools"])):i.value==="canales"?(y(),$e(Dp,{key:4,"agente-id":n.value,"site-key":((se=o.value)==null?void 0:se.site_key)||"",canales:et.value,onRecargar:Je,onError:k[10]||(k[10]=c=>r.value=c)},null,8,["agente-id","site-key","canales"])):i.value==="conexiones"?(y(),$e(Cf,{key:5,"agente-id":n.value,conexiones:ut.value,onRecargar:yt},null,8,["agente-id","conexiones"])):i.value==="chat"?(y(),$e(If,{key:6,"agente-id":n.value},null,8,["agente-id"])):i.value==="conversaciones"?(y(),$e(Vf,{key:7,"agente-id":n.value,sesiones:ke.value},null,8,["agente-id","sesiones"])):(y(),$e(gf,{key:8,eventos:Ve.value},null,8,["eventos"]))])}}},ym={class:"flex items-start justify-between gap-4 mb-6"},_m={class:"card p-4 mb-4"},wm={class:"flex flex-wrap items-end gap-3"},Cm={class:"flex gap-1 ml-auto"},km={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Am={key:1,class:"text-sm text-tenue"},$m={class:"grid gap-3 sm:grid-cols-3 mb-4"},Em={class:"card p-4"},Sm={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Im={class:"card p-4"},Rm={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},Pm={class:"card p-4"},Tm={class:"text-lg font-semibold text-texto mt-1"},Om={key:0,class:"text-[11px] text-tenue mt-0.5"},Mm={key:0,class:"card p-4 mb-4"},Dm={class:"flex items-center justify-between text-sm mb-2"},Nm={class:"text-tenue tabular-nums"},Vm={class:"h-2 rounded-full bg-elevado overflow-hidden"},jm={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Um={class:"card divide-y divide-borde mb-4"},Lm={class:"min-w-0 flex-1"},Fm={class:"text-sm text-texto"},qm={class:"text-xs text-tenue tabular-nums"},Hm={key:0,class:"text-sm font-medium text-texto tabular-nums"},Bm={key:1,class:"text-xs text-tenue text-right leading-tight"},Gm={key:1,class:"card p-4"},Km={class:"flex items-end gap-1 h-28"},Wm=["title"],zm={class:"flex justify-between text-[11px] text-tenue mt-2"},Jm={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=H(!0),s=H(""),o=H(null),r=new Date,i=H(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),l=H(r.toISOString().slice(0,10)),u={ia:{nombre:"Inteligencia artificial",icono:"cerebro",color:"#8eb02f"},ocr:{nombre:"Lectura de imágenes",icono:"imagen",color:"#2f7fb0"},whisper:{nombre:"Transcripción de audio",icono:"microfono",color:"#b0752f"}},f=b=>u[b]||{nombre:b,icono:"grafico",color:"#94a3b8"};async function d(){n.value=!0,s.value="";try{o.value=await te.get(ee(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${l.value}`))}catch(b){s.value=b.message}finally{n.value=!1}}const p=xe(()=>{var b,v;return((v=(b=o.value)==null?void 0:b.plan)==null?void 0:v.moneda)||"COP"}),h=xe(()=>{var b;return((b=o.value)==null?void 0:b.resumen)||[]}),x=xe(()=>{var b;return((b=o.value)==null?void 0:b.total_periodo)||0}),T=xe(()=>{var b,v;return((v=(b=o.value)==null?void 0:b.plan)==null?void 0:v.tope_consumo_mensual)||0}),w=xe(()=>T.value?Math.min(100,x.value/T.value*100):0);function P(b){return`${p.value} ${Number(b||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function V(b){return Number(b||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const A=xe(()=>{var j;const b=new Map;for(const U of((j=o.value)==null?void 0:j.detalle)||[]){const ye=String(U.CreatedAt).slice(0,10);b.set(ye,(b.get(ye)||0)+(U.costo||0))}const v=[...b.entries()].sort((U,ye)=>U[0].localeCompare(ye[0])),D=Math.max(...v.map(U=>U[1]),0);return{dias:v,max:D}});function _(b){const v=new Date,D=new Date;D.setDate(D.getDate()-b),i.value=D.toISOString().slice(0,10),l.value=v.toISOString().slice(0,10),d()}return It(()=>t.id,d,{immediate:!0}),(b,v)=>{var j;const D=mn("router-link");return y(),C("div",null,[a("div",ym,[v[6]||(v[6]=a("div",null,[a("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),a("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),oe(D,{to:`/tenants/${e.id}`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:nt(()=>[oe(Ge,{nombre:"atras",tam:15}),v[5]||(v[5]=ie(" Agentes",-1))]),_:1},8,["to"])]),a("div",_m,[a("div",wm,[a("div",null,[v[7]||(v[7]=a("label",{class:"label"},"Desde",-1)),Z(a("input",{"onUpdate:modelValue":v[0]||(v[0]=U=>i.value=U),type:"date",class:"input !w-auto"},null,512),[[ue,i.value]])]),a("div",null,[v[8]||(v[8]=a("label",{class:"label"},"Hasta",-1)),Z(a("input",{"onUpdate:modelValue":v[1]||(v[1]=U=>l.value=U),type:"date",class:"input !w-auto"},null,512),[[ue,l.value]])]),a("button",{class:"btn-primary",onClick:d},"Aplicar"),a("div",Cm,[a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:v[2]||(v[2]=U=>_(6))},"7 días"),a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:v[3]||(v[3]=U=>_(29))},"30 días"),a("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:v[4]||(v[4]=U=>_(89))},"90 días")])])]),s.value?(y(),C("p",km,O(s.value),1)):W("",!0),n.value?(y(),C("p",Am,"Cargando…")):o.value?(y(),C(re,{key:2},[a("div",$m,[a("div",Em,[v[9]||(v[9]=a("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),a("p",Sm,O(P(x.value)),1)]),a("div",Im,[v[10]||(v[10]=a("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),a("p",Rm,O(P(o.value.pendiente_facturar)),1),v[11]||(v[11]=a("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),a("div",Pm,[v[12]||(v[12]=a("p",{class:"text-xs text-tenue"},"Plan",-1)),a("p",Tm,O(((j=o.value.plan)==null?void 0:j.nombre)||"Sin plan"),1),o.value.plan?(y(),C("p",Om," Mensualidad "+O(P(o.value.plan.precio_mensual)),1)):W("",!0)])]),T.value?(y(),C("div",Mm,[a("div",Dm,[v[13]||(v[13]=a("span",{class:"text-texto"},"Tope mensual",-1)),a("span",Nm,O(P(x.value))+" / "+O(P(T.value)),1)]),a("div",Vm,[a("div",{class:_e(["h-full rounded-full transition-all duration-500",w.value>=100?"bg-red-500":w.value>=80?"bg-amber-500":"bg-brand"]),style:Jt({width:w.value+"%"})},null,6)]),w.value>=100?(y(),C("p",jm," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):W("",!0)])):W("",!0),a("div",Um,[v[15]||(v[15]=a("div",{class:"px-4 py-3"},[a("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),h.value.length===0?(y(),$e(Nt,{key:0,estado:"durmiendo",titulo:"Sin consumo en este período",detalle:"Cuando tus agentes respondan mensajes, lean imágenes o transcriban audios, vas a verlo acá."})):W("",!0),(y(!0),C(re,null,we(h.value,U=>(y(),C("div",{key:U.tipo,class:"px-4 py-3 flex items-center gap-3"},[oe(Ge,{nombre:f(U.tipo).icono,tam:18,class:"text-tenue"},null,8,["nombre"]),a("div",Lm,[a("p",Fm,O(f(U.tipo).nombre),1),a("p",qm,O(V(U.cantidad))+" "+O(U.unidad)+" · "+O(V(U.eventos))+" usos ",1)]),U.costo>0?(y(),C("span",Hm,O(P(U.costo)),1)):(y(),C("span",Bm,[...v[14]||(v[14]=[ie(" va por tu",-1),a("br",null,null,-1),ie("cuenta de IA ",-1)])]))]))),128))]),A.value.dias.length?(y(),C("div",Gm,[v[16]||(v[16]=a("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),a("div",Km,[(y(!0),C(re,null,we(A.value.dias,([U,ye])=>(y(),C("div",{key:U,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:Jt({height:A.value.max?Math.max(2,ye/A.value.max*100)+"%":"2px"}),title:`${U}: ${P(ye)}`},null,12,Wm))),128))]),a("div",zm,[a("span",null,O(A.value.dias[0][0]),1),a("span",null,O(A.value.dias[A.value.dias.length-1][0]),1)])])):W("",!0)],64)):W("",!0)])}}},Qm={class:"flex items-start justify-between gap-4 mb-6"},Ym={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Zm={key:1,class:"text-sm text-tenue"},Xm={key:3,class:"card divide-y divide-borde"},eh={class:"flex items-start justify-between gap-4"},th={class:"min-w-0"},nh={class:"text-sm text-texto font-medium"},sh={class:"text-xs text-tenue mt-0.5"},oh={class:"font-mono"},rh={class:"flex items-center gap-3 shrink-0 text-sm"},ih=["disabled","onClick"],lh=["onClick"],ah=["onClick"],uh={key:4,class:"text-xs text-tenue mt-3"},ch={class:"card w-full max-w-lg p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},dh={class:"font-semibold text-texto mb-4"},fh=["value"],ph={key:0,class:"text-xs text-tenue mt-1"},mh={class:"font-mono"},hh=["placeholder"],vh={key:0},gh={class:"label"},bh={key:0,class:"text-tenue font-normal"},xh=["required"],yh={key:1},_h={class:"flex justify-end gap-2 pt-2"},wh=["disabled"],Ch={__name:"AiPropia",props:{id:{type:String,required:!0}},setup(e){const t=e,n=H([]),s=H(!0),o=H(""),r=H(!1),i=H(null),l=H(!1),u=H(null),f=H({}),d=[{valor:"openai",nombre:"OpenAI",modelo:"gpt-4o-mini",donde:"platform.openai.com/api-keys"},{valor:"anthropic",nombre:"Anthropic (Claude)",modelo:"claude-sonnet-4-20250514",donde:"console.anthropic.com"},{valor:"gemini",nombre:"Google Gemini",modelo:"gemini-2.0-flash",donde:"aistudio.google.com/apikey"},{valor:"groq",nombre:"Groq",modelo:"llama-3.3-70b-versatile",donde:"console.groq.com/keys"},{valor:"deepseek",nombre:"DeepSeek",modelo:"deepseek-chat",donde:"platform.deepseek.com"},{valor:"qwen",nombre:"Qwen (Alibaba)",modelo:"qwen2.5-72b-instruct",donde:"dashscope.console.aliyun.com"},{valor:"ollama",nombre:"Ollama (tu servidor)",modelo:"llama3.1",donde:""}];function p(){return{nombre:"",provider:"openai",api_key:"",base_url:"",model_name:""}}const h=H(p());function x(b){return d.find(v=>v.valor===b)||d[0]}async function T(){s.value=!0,o.value="";try{const b=await te.get(ee(`/umind/ai-propia?tenant_id=${t.id}`));n.value=b.items||[]}catch(b){o.value=b.message}finally{s.value=!1}}It(()=>t.id,T,{immediate:!0});function w(){i.value=null,h.value=p(),r.value=!0}function P(b){i.value=b,h.value={nombre:b.nombre,provider:b.provider,api_key:"",base_url:b.base_url||"",model_name:b.model_name||""},r.value=!0}async function V(){l.value=!0,o.value="";try{const b={tenant_id:Number(t.id),...h.value};i.value?await te.put(ee(`/umind/ai-propia/${i.value.ID}`),b):await te.post(ee("/umind/ai-propia"),b),r.value=!1,await T()}catch(b){o.value=b.message}finally{l.value=!1}}async function A(b){u.value=b.ID,f.value={...f.value,[b.ID]:null};try{const v=await te.post(ee(`/umind/ai-propia/${b.ID}/probar`),{});f.value={...f.value,[b.ID]:{ok:!0,texto:v.respuesta}}}catch(v){f.value={...f.value,[b.ID]:{ok:!1,texto:v.message}}}finally{u.value=null}}async function _(b){if(confirm(`¿Eliminar "${b.nombre}"?`)){o.value="";try{await te.del(ee(`/umind/ai-propia/${b.ID}`)),await T()}catch(v){o.value=v.message}}}return(b,v)=>{const D=mn("router-link");return y(),C("div",null,[a("div",Qm,[a("div",null,[oe(D,{to:`/tenants/${e.id}`,class:"text-sm text-tenue hover:text-texto inline-flex items-center gap-1.5"},{default:nt(()=>[oe(Ge,{nombre:"atras",tam:14}),v[7]||(v[7]=ie(" Agentes",-1))]),_:1},8,["to"]),v[8]||(v[8]=a("h1",{class:"text-xl font-semibold text-texto mt-1"},"Tu cuenta de IA",-1)),v[9]||(v[9]=a("p",{class:"text-sm text-tenue mt-1 max-w-xl"}," Podés usar tu propia cuenta de OpenAI, Claude o Gemini en vez de la nuestra. El consumo se factura directo con el proveedor y no pasa por tu plan. ",-1))]),a("button",{class:"btn-primary shrink-0",onClick:w},"+ Conectar cuenta")]),o.value?(y(),C("p",Ym,O(o.value),1)):W("",!0),s.value?(y(),C("div",Zm,"Cargando…")):n.value.length===0?(y(),$e(Nt,{key:2,class:"card",titulo:"Estás usando la IA de uMind",detalle:"Funciona sin que hagas nada. Conectá tu propia cuenta solo si querés facturar el consumo por tu lado o usar un modelo puntual."},{default:nt(()=>[a("button",{class:"btn-primary",onClick:w},"Conectar mi cuenta")]),_:1})):(y(),C("div",Xm,[(y(!0),C(re,null,we(n.value,j=>(y(),C("div",{key:j.ID,class:"p-4"},[a("div",eh,[a("div",th,[a("div",nh,O(j.nombre),1),a("div",sh,[ie(O(x(j.provider).nombre)+" · "+O(j.model_name)+" · ",1),a("span",oh,O(j.api_key_pista),1)]),f.value[j.ID]?(y(),C("p",{key:0,class:_e(["text-xs mt-1.5",f.value[j.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},O(f.value[j.ID].ok?`Responde bien — dijo "${f.value[j.ID].texto}"`:f.value[j.ID].texto),3)):W("",!0)]),a("div",rh,[a("button",{class:"text-brand hover:underline disabled:opacity-40",disabled:u.value===j.ID,onClick:U=>A(j)},O(u.value===j.ID?"Probando…":"Probar"),9,ih),a("button",{class:"text-tenue hover:text-texto",onClick:U=>P(j)},"Editar",8,lh),a("button",{class:"text-red-500 hover:text-red-700",onClick:U=>_(j)},"Eliminar",8,ah)])])]))),128))])),n.value.length?(y(),C("p",uh,[...v[10]||(v[10]=[ie(" Para que un agente la use, elegila en su campo ",-1),a("strong",null,"Config de IA",-1),ie(". ",-1)])])):W("",!0),r.value?(y(),C("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:v[6]||(v[6]=Pe(j=>r.value=!1,["self"]))},[a("div",ch,[a("h2",dh,O(i.value?"Editar cuenta de IA":"Conectar tu cuenta de IA"),1),a("form",{class:"space-y-3",onSubmit:Pe(V,["prevent"])},[a("div",null,[v[11]||(v[11]=a("label",{class:"label"},"Nombre",-1)),Z(a("input",{"onUpdate:modelValue":v[0]||(v[0]=j=>h.value.nombre=j),required:"",placeholder:"ej: Mi cuenta de OpenAI",class:"input"},null,512),[[ue,h.value.nombre]])]),a("div",null,[v[13]||(v[13]=a("label",{class:"label"},"Proveedor",-1)),Z(a("select",{"onUpdate:modelValue":v[1]||(v[1]=j=>h.value.provider=j),class:"input"},[(y(),C(re,null,we(d,j=>a("option",{key:j.valor,value:j.valor},O(j.nombre),9,fh)),64))],512),[[un,h.value.provider]]),x(h.value.provider).donde?(y(),C("p",ph,[v[12]||(v[12]=ie(" La clave se saca de ",-1)),a("span",mh,O(x(h.value.provider).donde),1)])):W("",!0)]),a("div",null,[v[14]||(v[14]=a("label",{class:"label"},"Modelo",-1)),Z(a("input",{"onUpdate:modelValue":v[2]||(v[2]=j=>h.value.model_name=j),required:"",placeholder:`ej: ${x(h.value.provider).modelo}`,class:"input font-mono"},null,8,hh),[[ue,h.value.model_name]])]),h.value.provider!=="ollama"?(y(),C("div",vh,[a("label",gh,[v[15]||(v[15]=ie(" Clave de API ",-1)),i.value?(y(),C("span",bh,"— dejala vacía para no cambiarla")):W("",!0)]),Z(a("input",{"onUpdate:modelValue":v[3]||(v[3]=j=>h.value.api_key=j),type:"password",autocomplete:"new-password",required:!i.value,placeholder:"sk-...",class:"input font-mono"},null,8,xh),[[ue,h.value.api_key]]),v[16]||(v[16]=a("p",{class:"text-xs text-tenue mt-1"},"Se guarda cifrada y no se vuelve a mostrar.",-1))])):W("",!0),h.value.provider==="ollama"?(y(),C("div",yh,[v[17]||(v[17]=a("label",{class:"label"},"URL de tu servidor",-1)),Z(a("input",{"onUpdate:modelValue":v[4]||(v[4]=j=>h.value.base_url=j),required:"",placeholder:"https://ollama.tudominio.com/v1",class:"input font-mono"},null,512),[[ue,h.value.base_url]])])):W("",!0),a("div",_h,[a("button",{type:"button",class:"btn-ghost",onClick:v[5]||(v[5]=j=>r.value=!1)},"Cancelar"),a("button",{type:"submit",class:"btn-primary",disabled:l.value},O(l.value?"Guardando…":"Guardar"),9,wh)])],32)])])):W("",!0)])}}},kh=xc({history:Yu(Be.baseRuta),routes:[{path:"/",name:"home",component:fd},{path:"/tenants/:id",name:"tenant-agentes",component:cf,props:!0},{path:"/tenants/:id/uso",name:"uso",component:Jm,props:!0},{path:"/tenants/:id/ia",name:"ai-propia",component:Ch,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:xm,props:!0}]});cu(Jc).use(kh).mount("#app");
|