Files
weilin9999-WeiLin-Comfyui-T…/dist/javascript/main.entry.js
T
2025-09-14 00:29:05 +09:00

257 lines
683 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(ta){typeof define=="function"&&define.amd?define(ta):ta()})((function(){"use strict";/**
* @vue/shared v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ta(e){const t=Object.create(null);for(const o of e.split(","))t[o]=1;return o=>o in t}const yt={},na=[],Bn=()=>{},ou=()=>!1,Ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Zr=e=>e.startsWith("onUpdate:"),zt=Object.assign,el=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},jg=Object.prototype.hasOwnProperty,ct=(e,t)=>jg.call(e,t),He=Array.isArray,oa=e=>Ma(e)==="[object Map]",aa=e=>Ma(e)==="[object Set]",au=e=>Ma(e)==="[object Date]",ze=e=>typeof e=="function",$t=e=>typeof e=="string",An=e=>typeof e=="symbol",bt=e=>e!==null&&typeof e=="object",su=e=>(bt(e)||ze(e))&&ze(e.then)&&ze(e.catch),ru=Object.prototype.toString,Ma=e=>ru.call(e),Wg=e=>Ma(e).slice(8,-1),lu=e=>Ma(e)==="[object Object]",tl=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Oa=ta(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ks=e=>{const t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Vg=/-\w/g,Sn=ks(e=>e.replace(Vg,t=>t.slice(1).toUpperCase())),zg=/\B([A-Z])/g,_o=ks(e=>e.replace(zg,"-$1").toLowerCase()),Cs=ks(e=>e.charAt(0).toUpperCase()+e.slice(1)),nl=ks(e=>e?`on${Cs(e)}`:""),yo=(e,t)=>!Object.is(e,t),Es=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},iu=(e,t,o,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:o})},Ls=e=>{const t=parseFloat(e);return isNaN(t)?e:t},qg=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let uu;const $s=()=>uu||(uu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ft(e){if(He(e)){const t={};for(let o=0;o<e.length;o++){const n=e[o],a=$t(n)?Kg(n):ft(n);if(a)for(const s in a)t[s]=a[s]}return t}else if($t(e)||bt(e))return e}const Gg=/;(?![^(]*\))/g,Qg=/:([^]+)/,Yg=/\/\*[^]*?\*\//g;function Kg(e){const t={};return e.replace(Yg,"").split(Gg).forEach(o=>{if(o){const n=o.split(Qg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ce(e){let t="";if($t(e))t=e;else if(He(e))for(let o=0;o<e.length;o++){const n=Ce(e[o]);n&&(t+=n+" ")}else if(bt(e))for(const o in e)e[o]&&(t+=o+" ");return t.trim()}const Jg=ta("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function cu(e){return!!e||e===""}function Xg(e,t){if(e.length!==t.length)return!1;let o=!0;for(let n=0;o&&n<e.length;n++)o=Po(e[n],t[n]);return o}function Po(e,t){if(e===t)return!0;let o=au(e),n=au(t);if(o||n)return o&&n?e.getTime()===t.getTime():!1;if(o=An(e),n=An(t),o||n)return e===t;if(o=He(e),n=He(t),o||n)return o&&n?Xg(e,t):!1;if(o=bt(e),n=bt(t),o||n){if(!o||!n)return!1;const a=Object.keys(e).length,s=Object.keys(t).length;if(a!==s)return!1;for(const r in e){const l=e.hasOwnProperty(r),u=t.hasOwnProperty(r);if(l&&!u||!l&&u||!Po(e[r],t[r]))return!1}}return String(e)===String(t)}function ol(e,t){return e.findIndex(o=>Po(o,t))}const du=e=>!!(e&&e.__v_isRef===!0),h=e=>$t(e)?e:e==null?"":He(e)||bt(e)&&(e.toString===ru||!ze(e.toString))?du(e)?h(e.value):JSON.stringify(e,fu,2):String(e),fu=(e,t)=>du(t)?fu(e,t.value):oa(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[n,a],s)=>(o[al(n,s)+" =>"]=a,o),{})}:aa(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>al(o))}:An(t)?al(t):bt(t)&&!He(t)&&!lu(t)?String(t):t,al=(e,t="")=>{var o;return An(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/**
* @vue/reactivity v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Jt;class pu{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Jt,!t&&Jt&&(this.index=(Jt.scopes||(Jt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].pause();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].resume();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].resume()}}run(t){if(this._active){const o=Jt;try{return Jt=this,t()}finally{Jt=o}}}on(){++this._on===1&&(this.prevScope=Jt,Jt=this)}off(){this._on>0&&--this._on===0&&(Jt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let o,n;for(o=0,n=this.effects.length;o<n;o++)this.effects[o].stop();for(this.effects.length=0,o=0,n=this.cleanups.length;o<n;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,n=this.scopes.length;o<n;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function sl(e){return new pu(e)}function gu(){return Jt}function Zg(e,t=!1){Jt&&Jt.cleanups.push(e)}let Tt;const rl=new WeakSet;class mu{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,Jt&&Jt.active&&Jt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,rl.has(this)&&(rl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||vu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,xu(this),_u(this);const t=Tt,o=In;Tt=this,In=!0;try{return this.fn()}finally{yu(this),Tt=t,In=o,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)cl(t);this.deps=this.depsTail=void 0,xu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?rl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ul(this)&&this.run()}get dirty(){return ul(this)}}let hu=0,Ra,Na;function vu(e,t=!1){if(e.flags|=8,t){e.next=Na,Na=e;return}e.next=Ra,Ra=e}function ll(){hu++}function il(){if(--hu>0)return;if(Na){let t=Na;for(Na=void 0;t;){const o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;Ra;){let t=Ra;for(Ra=void 0;t;){const o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=o}}if(e)throw e}function _u(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function yu(e){let t,o=e.depsTail,n=o;for(;n;){const a=n.prevDep;n.version===-1?(n===o&&(o=a),cl(n),em(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=a}e.deps=t,e.depsTail=o}function ul(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function bu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Da)||(e.globalVersion=Da,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ul(e))))return;e.flags|=2;const t=e.dep,o=Tt,n=In;Tt=e,In=!0;try{_u(e);const a=e.fn(e._value);(t.version===0||yo(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Tt=o,In=n,yu(e),e.flags&=-3}}function cl(e,t=!1){const{dep:o,prevSub:n,nextSub:a}=e;if(n&&(n.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=n,e.nextSub=void 0),o.subs===e&&(o.subs=n,!n&&o.computed)){o.computed.flags&=-5;for(let s=o.computed.deps;s;s=s.nextDep)cl(s,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function em(e){const{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}let In=!0;const wu=[];function Hn(){wu.push(In),In=!1}function jn(){const e=wu.pop();In=e===void 0?!0:e}function xu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const o=Tt;Tt=void 0;try{t()}finally{Tt=o}}}let Da=0;class tm{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dl{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(!Tt||!In||Tt===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Tt)o=this.activeLink=new tm(Tt,this),Tt.deps?(o.prevDep=Tt.depsTail,Tt.depsTail.nextDep=o,Tt.depsTail=o):Tt.deps=Tt.depsTail=o,Tu(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const n=o.nextDep;n.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=n),o.prevDep=Tt.depsTail,o.nextDep=void 0,Tt.depsTail.nextDep=o,Tt.depsTail=o,Tt.deps===o&&(Tt.deps=n)}return o}trigger(t){this.version++,Da++,this.notify(t)}notify(t){ll();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{il()}}}function Tu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Tu(n)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const As=new WeakMap,Fo=Symbol(""),fl=Symbol(""),Pa=Symbol("");function Xt(e,t,o){if(In&&Tt){let n=As.get(e);n||As.set(e,n=new Map);let a=n.get(o);a||(n.set(o,a=new dl),a.map=n,a.key=o),a.track()}}function Zn(e,t,o,n,a,s){const r=As.get(e);if(!r){Da++;return}const l=u=>{u&&u.trigger()};if(ll(),t==="clear")r.forEach(l);else{const u=He(e),d=u&&tl(o);if(u&&o==="length"){const c=Number(n);r.forEach((f,g)=>{(g==="length"||g===Pa||!An(g)&&g>=c)&&l(f)})}else switch((o!==void 0||r.has(void 0))&&l(r.get(o)),d&&l(r.get(Pa)),t){case"add":u?d&&l(r.get("length")):(l(r.get(Fo)),oa(e)&&l(r.get(fl)));break;case"delete":u||(l(r.get(Fo)),oa(e)&&l(r.get(fl)));break;case"set":oa(e)&&l(r.get(Fo));break}}il()}function nm(e,t){const o=As.get(e);return o&&o.get(t)}function sa(e){const t=ot(e);return t===e?t:(Xt(t,"iterate",Pa),kn(e)?t:t.map(Qt))}function Is(e){return Xt(e=ot(e),"iterate",Pa),e}const om={__proto__:null,[Symbol.iterator](){return pl(this,Symbol.iterator,Qt)},concat(...e){return sa(this).concat(...e.map(t=>He(t)?sa(t):t))},entries(){return pl(this,"entries",e=>(e[1]=Qt(e[1]),e))},every(e,t){return eo(this,"every",e,t,void 0,arguments)},filter(e,t){return eo(this,"filter",e,t,o=>o.map(Qt),arguments)},find(e,t){return eo(this,"find",e,t,Qt,arguments)},findIndex(e,t){return eo(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eo(this,"findLast",e,t,Qt,arguments)},findLastIndex(e,t){return eo(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eo(this,"forEach",e,t,void 0,arguments)},includes(...e){return gl(this,"includes",e)},indexOf(...e){return gl(this,"indexOf",e)},join(e){return sa(this).join(e)},lastIndexOf(...e){return gl(this,"lastIndexOf",e)},map(e,t){return eo(this,"map",e,t,void 0,arguments)},pop(){return Fa(this,"pop")},push(...e){return Fa(this,"push",e)},reduce(e,...t){return Su(this,"reduce",e,t)},reduceRight(e,...t){return Su(this,"reduceRight",e,t)},shift(){return Fa(this,"shift")},some(e,t){return eo(this,"some",e,t,void 0,arguments)},splice(...e){return Fa(this,"splice",e)},toReversed(){return sa(this).toReversed()},toSorted(e){return sa(this).toSorted(e)},toSpliced(...e){return sa(this).toSpliced(...e)},unshift(...e){return Fa(this,"unshift",e)},values(){return pl(this,"values",Qt)}};function pl(e,t,o){const n=Is(e),a=n[t]();return n!==e&&!kn(e)&&(a._next=a.next,a.next=()=>{const s=a._next();return s.value&&(s.value=o(s.value)),s}),a}const am=Array.prototype;function eo(e,t,o,n,a,s){const r=Is(e),l=r!==e&&!kn(e),u=r[t];if(u!==am[t]){const f=u.apply(e,s);return l?Qt(f):f}let d=o;r!==e&&(l?d=function(f,g){return o.call(this,Qt(f),g,e)}:o.length>2&&(d=function(f,g){return o.call(this,f,g,e)}));const c=u.call(r,d,n);return l&&a?a(c):c}function Su(e,t,o,n){const a=Is(e);let s=o;return a!==e&&(kn(e)?o.length>3&&(s=function(r,l,u){return o.call(this,r,l,u,e)}):s=function(r,l,u){return o.call(this,r,Qt(l),u,e)}),a[t](s,...n)}function gl(e,t,o){const n=ot(e);Xt(n,"iterate",Pa);const a=n[t](...o);return(a===-1||a===!1)&&hl(o[0])?(o[0]=ot(o[0]),n[t](...o)):a}function Fa(e,t,o=[]){Hn(),ll();const n=ot(e)[t].apply(e,o);return il(),jn(),n}const sm=ta("__proto__,__v_isRef,__isVue"),ku=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function rm(e){An(e)||(e=String(e));const t=ot(this);return Xt(t,"has",e),t.hasOwnProperty(e)}class Cu{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,n){if(o==="__v_skip")return t.__v_skip;const a=this._isReadonly,s=this._isShallow;if(o==="__v_isReactive")return!a;if(o==="__v_isReadonly")return a;if(o==="__v_isShallow")return s;if(o==="__v_raw")return n===(a?s?Mu:Iu:s?Au:$u).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=He(t);if(!a){let u;if(r&&(u=om[o]))return u;if(o==="hasOwnProperty")return rm}const l=Reflect.get(t,o,At(t)?t:n);return(An(o)?ku.has(o):sm(o))||(a||Xt(t,"get",o),s)?l:At(l)?r&&tl(o)?l:l.value:bt(l)?a?Ou(l):Ns(l):l}}class Eu extends Cu{constructor(t=!1){super(!1,t)}set(t,o,n,a){let s=t[o];if(!this._isShallow){const u=wo(s);if(!kn(n)&&!wo(n)&&(s=ot(s),n=ot(n)),!He(t)&&At(s)&&!At(n))return u||(s.value=n),!0}const r=He(t)&&tl(o)?Number(o)<t.length:ct(t,o),l=Reflect.set(t,o,n,At(t)?t:a);return t===ot(a)&&(r?yo(n,s)&&Zn(t,"set",o,n):Zn(t,"add",o,n)),l}deleteProperty(t,o){const n=ct(t,o);t[o];const a=Reflect.deleteProperty(t,o);return a&&n&&Zn(t,"delete",o,void 0),a}has(t,o){const n=Reflect.has(t,o);return(!An(o)||!ku.has(o))&&Xt(t,"has",o),n}ownKeys(t){return Xt(t,"iterate",He(t)?"length":Fo),Reflect.ownKeys(t)}}class Lu extends Cu{constructor(t=!1){super(!0,t)}set(t,o){return!0}deleteProperty(t,o){return!0}}const lm=new Eu,im=new Lu,um=new Eu(!0),cm=new Lu(!0),ml=e=>e,Ms=e=>Reflect.getPrototypeOf(e);function dm(e,t,o){return function(...n){const a=this.__v_raw,s=ot(a),r=oa(s),l=e==="entries"||e===Symbol.iterator&&r,u=e==="keys"&&r,d=a[e](...n),c=o?ml:t?Ps:Qt;return!t&&Xt(s,"iterate",u?fl:Fo),{next(){const{value:f,done:g}=d.next();return g?{value:f,done:g}:{value:l?[c(f[0]),c(f[1])]:c(f),done:g}},[Symbol.iterator](){return this}}}}function Os(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function fm(e,t){const o={get(a){const s=this.__v_raw,r=ot(s),l=ot(a);e||(yo(a,l)&&Xt(r,"get",a),Xt(r,"get",l));const{has:u}=Ms(r),d=t?ml:e?Ps:Qt;if(u.call(r,a))return d(s.get(a));if(u.call(r,l))return d(s.get(l));s!==r&&s.get(a)},get size(){const a=this.__v_raw;return!e&&Xt(ot(a),"iterate",Fo),a.size},has(a){const s=this.__v_raw,r=ot(s),l=ot(a);return e||(yo(a,l)&&Xt(r,"has",a),Xt(r,"has",l)),a===l?s.has(a):s.has(a)||s.has(l)},forEach(a,s){const r=this,l=r.__v_raw,u=ot(l),d=t?ml:e?Ps:Qt;return!e&&Xt(u,"iterate",Fo),l.forEach((c,f)=>a.call(s,d(c),d(f),r))}};return zt(o,e?{add:Os("add"),set:Os("set"),delete:Os("delete"),clear:Os("clear")}:{add(a){!t&&!kn(a)&&!wo(a)&&(a=ot(a));const s=ot(this);return Ms(s).has.call(s,a)||(s.add(a),Zn(s,"add",a,a)),this},set(a,s){!t&&!kn(s)&&!wo(s)&&(s=ot(s));const r=ot(this),{has:l,get:u}=Ms(r);let d=l.call(r,a);d||(a=ot(a),d=l.call(r,a));const c=u.call(r,a);return r.set(a,s),d?yo(s,c)&&Zn(r,"set",a,s):Zn(r,"add",a,s),this},delete(a){const s=ot(this),{has:r,get:l}=Ms(s);let u=r.call(s,a);u||(a=ot(a),u=r.call(s,a)),l&&l.call(s,a);const d=s.delete(a);return u&&Zn(s,"delete",a,void 0),d},clear(){const a=ot(this),s=a.size!==0,r=a.clear();return s&&Zn(a,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(a=>{o[a]=dm(a,e,t)}),o}function Rs(e,t){const o=fm(e,t);return(n,a,s)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?n:Reflect.get(ct(o,a)&&a in n?o:n,a,s)}const pm={get:Rs(!1,!1)},gm={get:Rs(!1,!0)},mm={get:Rs(!0,!1)},hm={get:Rs(!0,!0)},$u=new WeakMap,Au=new WeakMap,Iu=new WeakMap,Mu=new WeakMap;function vm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function _m(e){return e.__v_skip||!Object.isExtensible(e)?0:vm(Wg(e))}function Ns(e){return wo(e)?e:Ds(e,!1,lm,pm,$u)}function ym(e){return Ds(e,!1,um,gm,Au)}function Ou(e){return Ds(e,!0,im,mm,Iu)}function J$(e){return Ds(e,!0,cm,hm,Mu)}function Ds(e,t,o,n,a){if(!bt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=_m(e);if(s===0)return e;const r=a.get(e);if(r)return r;const l=new Proxy(e,s===2?n:o);return a.set(e,l),l}function bo(e){return wo(e)?bo(e.__v_raw):!!(e&&e.__v_isReactive)}function wo(e){return!!(e&&e.__v_isReadonly)}function kn(e){return!!(e&&e.__v_isShallow)}function hl(e){return e?!!e.__v_raw:!1}function ot(e){const t=e&&e.__v_raw;return t?ot(t):e}function vl(e){return!ct(e,"__v_skip")&&Object.isExtensible(e)&&iu(e,"__v_skip",!0),e}const Qt=e=>bt(e)?Ns(e):e,Ps=e=>bt(e)?Ou(e):e;function At(e){return e?e.__v_isRef===!0:!1}function b(e){return Ru(e,!1)}function bm(e){return Ru(e,!0)}function Ru(e,t){return At(e)?e:new wm(e,t)}class wm{constructor(t,o){this.dep=new dl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:ot(t),this._value=o?t:Qt(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){const o=this._rawValue,n=this.__v_isShallow||kn(t)||wo(t);t=n?t:ot(t),yo(t,o)&&(this._rawValue=t,this._value=n?t:Qt(t),this.dep.trigger())}}function m(e){return At(e)?e.value:e}const xm={get:(e,t,o)=>t==="__v_raw"?e:m(Reflect.get(e,t,o)),set:(e,t,o,n)=>{const a=e[t];return At(a)&&!At(o)?(a.value=o,!0):Reflect.set(e,t,o,n)}};function Nu(e){return bo(e)?e:new Proxy(e,xm)}function Tm(e){const t=He(e)?new Array(e.length):{};for(const o in e)t[o]=km(e,o);return t}class Sm{constructor(t,o,n){this._object=t,this._key=o,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return nm(ot(this._object),this._key)}}function km(e,t,o){const n=e[t];return At(n)?n:new Sm(e,t,o)}class Cm{constructor(t,o,n){this.fn=t,this.setter=o,this._value=void 0,this.dep=new dl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Da-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Tt!==this)return vu(this,!0),!0}get value(){const t=this.dep.track();return bu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Em(e,t,o=!1){let n,a;return ze(e)?n=e:(n=e.get,a=e.set),new Cm(n,a,o)}const Fs={},Us=new WeakMap;let Uo;function Lm(e,t=!1,o=Uo){if(o){let n=Us.get(o);n||Us.set(o,n=[]),n.push(e)}}function $m(e,t,o=yt){const{immediate:n,deep:a,once:s,scheduler:r,augmentJob:l,call:u}=o,d=w=>a?w:kn(w)||a===!1||a===0?to(w,1):to(w);let c,f,g,p,v=!1,y=!1;if(At(e)?(f=()=>e.value,v=kn(e)):bo(e)?(f=()=>d(e),v=!0):He(e)?(y=!0,v=e.some(w=>bo(w)||kn(w)),f=()=>e.map(w=>{if(At(w))return w.value;if(bo(w))return d(w);if(ze(w))return u?u(w,2):w()})):ze(e)?t?f=u?()=>u(e,2):e:f=()=>{if(g){Hn();try{g()}finally{jn()}}const w=Uo;Uo=c;try{return u?u(e,3,[p]):e(p)}finally{Uo=w}}:f=Bn,t&&a){const w=f,A=a===!0?1/0:a;f=()=>to(w(),A)}const x=gu(),S=()=>{c.stop(),x&&x.active&&el(x.effects,c)};if(s&&t){const w=t;t=(...A)=>{w(...A),S()}}let $=y?new Array(e.length).fill(Fs):Fs;const W=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const A=c.run();if(a||v||(y?A.some((V,z)=>yo(V,$[z])):yo(A,$))){g&&g();const V=Uo;Uo=c;try{const z=[A,$===Fs?void 0:y&&$[0]===Fs?[]:$,p];$=A,u?u(t,3,z):t(...z)}finally{Uo=V}}}else c.run()};return l&&l(W),c=new mu(f),c.scheduler=r?()=>r(W,!1):W,p=w=>Lm(w,!1,c),g=c.onStop=()=>{const w=Us.get(c);if(w){if(u)u(w,4);else for(const A of w)A();Us.delete(c)}},t?n?W(!0):$=c.run():r?r(W.bind(null,!0),!0):c.run(),S.pause=c.pause.bind(c),S.resume=c.resume.bind(c),S.stop=S,S}function to(e,t=1/0,o){if(t<=0||!bt(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,At(e))to(e.value,t,o);else if(He(e))for(let n=0;n<e.length;n++)to(e[n],t,o);else if(aa(e)||oa(e))e.forEach(n=>{to(n,t,o)});else if(lu(e)){for(const n in e)to(e[n],t,o);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&to(e[n],t,o)}return e}/**
* @vue/runtime-core v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Ua=[];let _l=!1;function X$(e,...t){if(_l)return;_l=!0,Hn();const o=Ua.length?Ua[Ua.length-1].component:null,n=o&&o.appContext.config.warnHandler,a=Am();if(n)ra(n,o,11,[e+t.map(s=>{var r,l;return(l=(r=s.toString)==null?void 0:r.call(s))!=null?l:JSON.stringify(s)}).join(""),o&&o.proxy,a.map(({vnode:s})=>`at <${Bc(o,s.type)}>`).join(`
`),a]);else{const s=[`[Vue warn]: ${e}`,...t];a.length&&s.push(`
`,...Im(a)),console.warn(...s)}jn(),_l=!1}function Am(){let e=Ua[Ua.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function Im(e){const t=[];return e.forEach((o,n)=>{t.push(...n===0?[]:[`
`],...Mm(o))}),t}function Mm({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${Bc(e.component,e.type,n)}`,s=">"+o;return e.props?[a,...Om(e.props),s]:[a+s]}function Om(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach(n=>{t.push(...Du(n,e[n]))}),o.length>3&&t.push(" ..."),t}function Du(e,t,o){return $t(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:At(t)?(t=Du(e,ot(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):ze(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ot(t),o?t:[`${e}=`,t])}function ra(e,t,o,n){try{return n?e(...n):e()}catch(a){Bs(a,t,o)}}function Mn(e,t,o,n){if(ze(e)){const a=ra(e,t,o,n);return a&&su(a)&&a.catch(s=>{Bs(s,t,o)}),a}if(He(e)){const a=[];for(let s=0;s<e.length;s++)a.push(Mn(e[s],t,o,n));return a}}function Bs(e,t,o,n=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||yt;if(t){let l=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${o}`;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,u,d)===!1)return}l=l.parent}if(s){Hn(),ra(s,null,10,[e,u,d]),jn();return}}Rm(e,o,a,n,r)}function Rm(e,t,o,n=!0,a=!1){if(a)throw e;console.error(e)}const sn=[];let Wn=-1;const la=[];let xo=null,ia=0;const Pu=Promise.resolve();let Hs=null;function Ge(e){const t=Hs||Pu;return e?t.then(this?e.bind(this):e):t}function Nm(e){let t=Wn+1,o=sn.length;for(;t<o;){const n=t+o>>>1,a=sn[n],s=Ba(a);s<e||s===e&&a.flags&2?t=n+1:o=n}return t}function yl(e){if(!(e.flags&1)){const t=Ba(e),o=sn[sn.length-1];!o||!(e.flags&2)&&t>=Ba(o)?sn.push(e):sn.splice(Nm(t),0,e),e.flags|=1,Fu()}}function Fu(){Hs||(Hs=Pu.then(Hu))}function Dm(e){He(e)?la.push(...e):xo&&e.id===-1?xo.splice(ia+1,0,e):e.flags&1||(la.push(e),e.flags|=1),Fu()}function Uu(e,t,o=Wn+1){for(;o<sn.length;o++){const n=sn[o];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;sn.splice(o,1),o--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Bu(e){if(la.length){const t=[...new Set(la)].sort((o,n)=>Ba(o)-Ba(n));if(la.length=0,xo){xo.push(...t);return}for(xo=t,ia=0;ia<xo.length;ia++){const o=xo[ia];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}xo=null,ia=0}}const Ba=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Hu(e){try{for(Wn=0;Wn<sn.length;Wn++){const t=sn[Wn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ra(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Wn<sn.length;Wn++){const t=sn[Wn];t&&(t.flags&=-2)}Wn=-1,sn.length=0,Bu(),Hs=null,(sn.length||la.length)&&Hu()}}let Yt=null,ju=null;function js(e){const t=Yt;return Yt=e,ju=e&&e.type.__scopeId||null,t}function pt(e,t=Yt,o){if(!t||e._n)return e;const n=(...a)=>{n._d&&Xs(-1);const s=js(t);let r;try{r=e(...a)}finally{js(s),n._d&&Xs(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function be(e,t){if(Yt===null)return e;const o=tr(Yt),n=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[s,r,l,u=yt]=t[a];s&&(ze(s)&&(s={mounted:s,updated:s}),s.deep&&to(r),n.push({dir:s,instance:o,value:r,oldValue:void 0,arg:l,modifiers:u}))}return e}function Bo(e,t,o,n){const a=e.dirs,s=t&&t.dirs;for(let r=0;r<a.length;r++){const l=a[r];s&&(l.oldValue=s[r].value);let u=l.dir[n];u&&(Hn(),Mn(u,o,8,[e.el,l,e,t]),jn())}}const Wu=Symbol("_vte"),Vu=e=>e.__isTeleport,Ha=e=>e&&(e.disabled||e.disabled===""),zu=e=>e&&(e.defer||e.defer===""),qu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,bl=(e,t)=>{const o=e&&e.to;return $t(o)?t?t(o):null:o},Qu={name:"Teleport",__isTeleport:!0,process(e,t,o,n,a,s,r,l,u,d){const{mc:c,pc:f,pbc:g,o:{insert:p,querySelector:v,createText:y,createComment:x}}=d,S=Ha(t.props);let{shapeFlag:$,children:W,dynamicChildren:w}=t;if(e==null){const A=t.el=y(""),V=t.anchor=y("");p(A,o,n),p(V,o,n);const z=(q,fe)=>{$&16&&(a&&a.isCE&&(a.ce._teleportTarget=q),c(W,q,fe,a,s,r,l,u))},j=()=>{const q=t.target=bl(t.props,v),fe=Ku(q,t,y,p);q&&(r!=="svg"&&qu(q)?r="svg":r!=="mathml"&&Gu(q)&&(r="mathml"),S||(z(q,fe),Vs(t,!1)))};S&&(z(o,V),Vs(t,!0)),zu(t.props)?(t.el.__isMounted=!1,ln(()=>{j(),delete t.el.__isMounted},s)):j()}else{if(zu(t.props)&&e.el.__isMounted===!1){ln(()=>{Qu.process(e,t,o,n,a,s,r,l,u,d)},s);return}t.el=e.el,t.targetStart=e.targetStart;const A=t.anchor=e.anchor,V=t.target=e.target,z=t.targetAnchor=e.targetAnchor,j=Ha(e.props),q=j?o:V,fe=j?A:z;if(r==="svg"||qu(V)?r="svg":(r==="mathml"||Gu(V))&&(r="mathml"),w?(g(e.dynamicChildren,w,q,a,s,r,l),Il(e,t,!0)):u||f(e,t,q,fe,a,s,r,l,!1),S)j?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ws(t,o,A,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const te=t.target=bl(t.props,v);te&&Ws(t,te,null,d,0)}else j&&Ws(t,V,z,d,1);Vs(t,S)}},remove(e,t,o,{um:n,o:{remove:a}},s){const{shapeFlag:r,children:l,anchor:u,targetStart:d,targetAnchor:c,target:f,props:g}=e;if(f&&(a(d),a(c)),s&&a(u),r&16){const p=s||!Ha(g);for(let v=0;v<l.length;v++){const y=l[v];n(y,t,o,p,!!y.dynamicChildren)}}},move:Ws,hydrate:Pm};function Ws(e,t,o,{o:{insert:n},m:a},s=2){s===0&&n(e.targetAnchor,t,o);const{el:r,anchor:l,shapeFlag:u,children:d,props:c}=e,f=s===2;if(f&&n(r,t,o),(!f||Ha(c))&&u&16)for(let g=0;g<d.length;g++)a(d[g],t,o,2);f&&n(l,t,o)}function Pm(e,t,o,n,a,s,{o:{nextSibling:r,parentNode:l,querySelector:u,insert:d,createText:c}},f){function g(y,x,S,$){x.anchor=f(r(y),x,l(y),o,n,a,s),x.targetStart=S,x.targetAnchor=$}const p=t.target=bl(t.props,u),v=Ha(t.props);if(p){const y=p._lpa||p.firstChild;if(t.shapeFlag&16)if(v)g(e,t,y,y&&r(y));else{t.anchor=r(e);let x=y;for(;x;){if(x&&x.nodeType===8){if(x.data==="teleport start anchor")t.targetStart=x;else if(x.data==="teleport anchor"){t.targetAnchor=x,p._lpa=t.targetAnchor&&r(t.targetAnchor);break}}x=r(x)}t.targetAnchor||Ku(p,t,c,d),f(y&&r(y),t,p,o,n,a,s)}Vs(t,v)}else v&&t.shapeFlag&16&&g(e,t,e,r(e));return t.anchor&&r(t.anchor)}const Yu=Qu;function Vs(e,t){const o=e.ctx;if(o&&o.ut){let n,a;for(t?(n=e.el,a=e.anchor):(n=e.targetStart,a=e.targetAnchor);n&&n!==a;)n.nodeType===1&&n.setAttribute("data-v-owner",o.uid),n=n.nextSibling;o.ut()}}function Ku(e,t,o,n){const a=t.targetStart=o(""),s=t.targetAnchor=o("");return a[Wu]=s,e&&(n(a,e),n(s,e)),s}const no=Symbol("_leaveCb"),zs=Symbol("_enterCb");function Fm(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gt(()=>{e.isMounted=!0}),ca(()=>{e.isUnmounting=!0}),e}const Cn=[Function,Array],Ju={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Cn,onEnter:Cn,onAfterEnter:Cn,onEnterCancelled:Cn,onBeforeLeave:Cn,onLeave:Cn,onAfterLeave:Cn,onLeaveCancelled:Cn,onBeforeAppear:Cn,onAppear:Cn,onAfterAppear:Cn,onAppearCancelled:Cn},Xu=e=>{const t=e.subTree;return t.component?Xu(t.component):t},Um={name:"BaseTransition",props:Ju,setup(e,{slots:t}){const o=ko(),n=Fm();return()=>{const a=t.default&&nc(t.default(),!0);if(!a||!a.length)return;const s=Zu(a),r=ot(e),{mode:l}=r;if(n.isLeaving)return xl(s);const u=tc(s);if(!u)return xl(s);let d=wl(u,r,n,o,f=>d=f);u.type!==Zt&&ja(u,d);let c=o.subTree&&tc(o.subTree);if(c&&c.type!==Zt&&!Wo(c,u)&&Xu(o).type!==Zt){let f=wl(c,r,n,o);if(ja(c,f),l==="out-in"&&u.type!==Zt)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,o.job.flags&8||o.update(),delete f.afterLeave,c=void 0},xl(s);l==="in-out"&&u.type!==Zt?f.delayLeave=(g,p,v)=>{const y=ec(n,c);y[String(c.key)]=c,g[no]=()=>{p(),g[no]=void 0,delete d.delayedLeave,c=void 0},d.delayedLeave=()=>{v(),delete d.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function Zu(e){let t=e[0];if(e.length>1){for(const o of e)if(o.type!==Zt){t=o;break}}return t}const Bm=Um;function ec(e,t){const{leavingVNodes:o}=e;let n=o.get(t.type);return n||(n=Object.create(null),o.set(t.type,n)),n}function wl(e,t,o,n,a){const{appear:s,mode:r,persisted:l=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:g,onLeave:p,onAfterLeave:v,onLeaveCancelled:y,onBeforeAppear:x,onAppear:S,onAfterAppear:$,onAppearCancelled:W}=t,w=String(e.key),A=ec(o,e),V=(q,fe)=>{q&&Mn(q,n,9,fe)},z=(q,fe)=>{const te=fe[1];V(q,fe),He(q)?q.every(I=>I.length<=1)&&te():q.length<=1&&te()},j={mode:r,persisted:l,beforeEnter(q){let fe=u;if(!o.isMounted)if(s)fe=x||u;else return;q[no]&&q[no](!0);const te=A[w];te&&Wo(e,te)&&te.el[no]&&te.el[no](),V(fe,[q])},enter(q){let fe=d,te=c,I=f;if(!o.isMounted)if(s)fe=S||d,te=$||c,I=W||f;else return;let R=!1;const H=q[zs]=U=>{R||(R=!0,U?V(I,[q]):V(te,[q]),j.delayedLeave&&j.delayedLeave(),q[zs]=void 0)};fe?z(fe,[q,H]):H()},leave(q,fe){const te=String(e.key);if(q[zs]&&q[zs](!0),o.isUnmounting)return fe();V(g,[q]);let I=!1;const R=q[no]=H=>{I||(I=!0,fe(),H?V(y,[q]):V(v,[q]),q[no]=void 0,A[te]===e&&delete A[te])};A[te]=e,p?z(p,[q,R]):R()},clone(q){const fe=wl(q,t,o,n,a);return a&&a(fe),fe}};return j}function xl(e){if(Gs(e))return e=To(e),e.children=null,e}function tc(e){if(!Gs(e))return Vu(e.type)&&e.children?Zu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&ze(o.default))return o.default()}}function ja(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ja(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nc(e,t=!1,o){let n=[],a=0;for(let s=0;s<e.length;s++){let r=e[s];const l=o==null?r.key:String(o)+String(r.key!=null?r.key:s);r.type===Oe?(r.patchFlag&128&&a++,n=n.concat(nc(r.children,t,l))):(t||r.type!==Zt)&&n.push(l!=null?To(r,{key:l}):r)}if(a>1)for(let s=0;s<n.length;s++)n[s].patchFlag=-2;return n}function pn(e,t){return ze(e)?zt({name:e.name},t,{setup:e}):e}function oc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const qs=new WeakMap;function Wa(e,t,o,n,a=!1){if(He(e)){e.forEach((v,y)=>Wa(v,t&&(He(t)?t[y]:t),o,n,a));return}if(ua(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Wa(e,t,o,n.component.subTree);return}const s=n.shapeFlag&4?tr(n.component):n.el,r=a?null:s,{i:l,r:u}=e,d=t&&t.r,c=l.refs===yt?l.refs={}:l.refs,f=l.setupState,g=ot(f),p=f===yt?ou:v=>ct(g,v);if(d!=null&&d!==u){if(ac(t),$t(d))c[d]=null,p(d)&&(f[d]=null);else if(At(d)){d.value=null;const v=t;v.k&&(c[v.k]=null)}}if(ze(u))ra(u,l,12,[r,c]);else{const v=$t(u),y=At(u);if(v||y){const x=()=>{if(e.f){const S=v?p(u)?f[u]:c[u]:u.value;if(a)He(S)&&el(S,s);else if(He(S))S.includes(s)||S.push(s);else if(v)c[u]=[s],p(u)&&(f[u]=c[u]);else{const $=[s];u.value=$,e.k&&(c[e.k]=$)}}else v?(c[u]=r,p(u)&&(f[u]=r)):y&&(u.value=r,e.k&&(c[e.k]=r))};if(r){const S=()=>{x(),qs.delete(e)};S.id=-1,qs.set(e,S),ln(S,o)}else ac(e),x()}}}function ac(e){const t=qs.get(e);t&&(t.flags|=8,qs.delete(e))}$s().requestIdleCallback,$s().cancelIdleCallback;const ua=e=>!!e.type.__asyncLoader,Gs=e=>e.type.__isKeepAlive;function Hm(e,t){sc(e,"a",t)}function jm(e,t){sc(e,"da",t)}function sc(e,t,o=en){const n=e.__wdc||(e.__wdc=()=>{let a=o;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Qs(t,n,o),o){let a=o.parent;for(;a&&a.parent;)Gs(a.parent.vnode)&&Wm(n,t,o,a),a=a.parent}}function Wm(e,t,o,n){const a=Qs(t,e,n,!0);On(()=>{el(n[t],a)},o)}function Qs(e,t,o=en,n=!1){if(o){const a=o[e]||(o[e]=[]),s=t.__weh||(t.__weh=(...r)=>{Hn();const l=Ja(o),u=Mn(t,o,e,r);return l(),jn(),u});return n?a.unshift(s):a.push(s),s}}const oo=e=>(t,o=en)=>{(!Xa||e==="sp")&&Qs(e,(...n)=>t(...n),o)},Vm=oo("bm"),gt=oo("m"),rc=oo("bu"),zm=oo("u"),ca=oo("bum"),On=oo("um"),qm=oo("sp"),Gm=oo("rtg"),Qm=oo("rtc");function Ym(e,t=en){Qs("ec",e,t)}const Km="components";function Jm(e,t){return Zm(Km,e,!0,t)||e}const Xm=Symbol.for("v-ndc");function Zm(e,t,o=!0,n=!1){const a=Yt||en;if(a){const s=a.type;{const l=Uc(s,!1);if(l&&(l===t||l===Sn(t)||l===Cs(Sn(t))))return s}const r=lc(a[e]||s[e],t)||lc(a.appContext[e],t);return!r&&n?s:r}}function lc(e,t){return e&&(e[t]||e[Sn(t)]||e[Cs(Sn(t))])}function We(e,t,o,n){let a;const s=o,r=He(e);if(r||$t(e)){const l=r&&bo(e);let u=!1,d=!1;l&&(u=!kn(e),d=wo(e),e=Is(e)),a=new Array(e.length);for(let c=0,f=e.length;c<f;c++)a[c]=t(u?d?Ps(Qt(e[c])):Qt(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,s)}else if(bt(e))if(e[Symbol.iterator])a=Array.from(e,(l,u)=>t(l,u,void 0,s));else{const l=Object.keys(e);a=new Array(l.length);for(let u=0,d=l.length;u<d;u++){const c=l[u];a[u]=t(e[c],c,u,s)}}else a=[];return a}function Va(e,t,o={},n,a){if(Yt.ce||Yt.parent&&ua(Yt.parent)&&Yt.parent.ce)return t!=="default"&&(o.name=t),T(),wt(Oe,null,[Ve("slot",o,n&&n())],64);let s=e[t];s&&s._c&&(s._d=!1),T();const r=s&&ic(s(o)),l=o.key||r&&r.key,u=wt(Oe,{key:(l&&!An(l)?l:`_${t}`)+(!r&&n?"_fb":"")},r||(n?n():[]),r&&e._===1?64:-2);return!a&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),s&&s._c&&(s._d=!0),u}function ic(e){return e.some(t=>Ka(t)?!(t.type===Zt||t.type===Oe&&!ic(t.children)):!0)?e:null}const Tl=e=>e?Dc(e)?tr(e):Tl(e.parent):null,za=zt(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=>Tl(e.parent),$root:e=>Tl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>fc(e),$forceUpdate:e=>e.f||(e.f=()=>{yl(e.update)}),$nextTick:e=>e.n||(e.n=Ge.bind(e.proxy)),$watch:e=>wh.bind(e)}),Sl=(e,t)=>e!==yt&&!e.__isScriptSetup&&ct(e,t),eh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:n,data:a,props:s,accessCache:r,type:l,appContext:u}=e;let d;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return a[t];case 4:return o[t];case 3:return s[t]}else{if(Sl(n,t))return r[t]=1,n[t];if(a!==yt&&ct(a,t))return r[t]=2,a[t];if((d=e.propsOptions[0])&&ct(d,t))return r[t]=3,s[t];if(o!==yt&&ct(o,t))return r[t]=4,o[t];kl&&(r[t]=0)}}const c=za[t];let f,g;if(c)return t==="$attrs"&&Xt(e.attrs,"get",""),c(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(o!==yt&&ct(o,t))return r[t]=4,o[t];if(g=u.config.globalProperties,ct(g,t))return g[t]},set({_:e},t,o){const{data:n,setupState:a,ctx:s}=e;return Sl(a,t)?(a[t]=o,!0):n!==yt&&ct(n,t)?(n[t]=o,!0):ct(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:n,appContext:a,propsOptions:s,type:r}},l){let u,d;return!!(o[l]||e!==yt&&l[0]!=="$"&&ct(e,l)||Sl(t,l)||(u=s[0])&&ct(u,l)||ct(n,l)||ct(za,l)||ct(a.config.globalProperties,l)||(d=r.__cssModules)&&d[l])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:ct(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function uc(e){return He(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}let kl=!0;function th(e){const t=fc(e),o=e.proxy,n=e.ctx;kl=!1,t.beforeCreate&&cc(t.beforeCreate,e,"bc");const{data:a,computed:s,methods:r,watch:l,provide:u,inject:d,created:c,beforeMount:f,mounted:g,beforeUpdate:p,updated:v,activated:y,deactivated:x,beforeDestroy:S,beforeUnmount:$,destroyed:W,unmounted:w,render:A,renderTracked:V,renderTriggered:z,errorCaptured:j,serverPrefetch:q,expose:fe,inheritAttrs:te,components:I,directives:R,filters:H}=t;if(d&&nh(d,n,null),r)for(const oe in r){const D=r[oe];ze(D)&&(n[oe]=D.bind(o))}if(a){const oe=a.call(o,o);bt(oe)&&(e.data=Ns(oe))}if(kl=!0,s)for(const oe in s){const D=s[oe],N=ze(D)?D.bind(o,o):ze(D.get)?D.get.bind(o,o):Bn,le=!ze(D)&&ze(D.set)?D.set.bind(o):Bn,we=et({get:N,set:le});Object.defineProperty(n,oe,{enumerable:!0,configurable:!0,get:()=>we.value,set:ae=>we.value=ae})}if(l)for(const oe in l)dc(l[oe],n,o,oe);if(u){const oe=ze(u)?u.call(o):u;Reflect.ownKeys(oe).forEach(D=>{Ks(D,oe[D])})}c&&cc(c,e,"c");function ne(oe,D){He(D)?D.forEach(N=>oe(N.bind(o))):D&&oe(D.bind(o))}if(ne(Vm,f),ne(gt,g),ne(rc,p),ne(zm,v),ne(Hm,y),ne(jm,x),ne(Ym,j),ne(Qm,V),ne(Gm,z),ne(ca,$),ne(On,w),ne(qm,q),He(fe))if(fe.length){const oe=e.exposed||(e.exposed={});fe.forEach(D=>{Object.defineProperty(oe,D,{get:()=>o[D],set:N=>o[D]=N,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===Bn&&(e.render=A),te!=null&&(e.inheritAttrs=te),I&&(e.components=I),R&&(e.directives=R),q&&oc(e)}function nh(e,t,o=Bn){He(e)&&(e=Cl(e));for(const n in e){const a=e[n];let s;bt(a)?"default"in a?s=ao(a.from||n,a.default,!0):s=ao(a.from||n):s=ao(a),At(s)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[n]=s}}function cc(e,t,o){Mn(He(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,o)}function dc(e,t,o,n){let a=n.includes(".")?Lc(o,n):()=>o[n];if($t(e)){const s=t[e];ze(s)&&it(a,s)}else if(ze(e))it(a,e.bind(o));else if(bt(e))if(He(e))e.forEach(s=>dc(s,t,o,n));else{const s=ze(e.handler)?e.handler.bind(o):t[e.handler];ze(s)&&it(a,s,e)}}function fc(e){const t=e.type,{mixins:o,extends:n}=t,{mixins:a,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let u;return l?u=l:!a.length&&!o&&!n?u=t:(u={},a.length&&a.forEach(d=>Ys(u,d,r,!0)),Ys(u,t,r)),bt(t)&&s.set(t,u),u}function Ys(e,t,o,n=!1){const{mixins:a,extends:s}=t;s&&Ys(e,s,o,!0),a&&a.forEach(r=>Ys(e,r,o,!0));for(const r in t)if(!(n&&r==="expose")){const l=oh[r]||o&&o[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const oh={data:pc,props:gc,emits:gc,methods:qa,computed:qa,beforeCreate:rn,created:rn,beforeMount:rn,mounted:rn,beforeUpdate:rn,updated:rn,beforeDestroy:rn,beforeUnmount:rn,destroyed:rn,unmounted:rn,activated:rn,deactivated:rn,errorCaptured:rn,serverPrefetch:rn,components:qa,directives:qa,watch:sh,provide:pc,inject:ah};function pc(e,t){return t?e?function(){return zt(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function ah(e,t){return qa(Cl(e),Cl(t))}function Cl(e){if(He(e)){const t={};for(let o=0;o<e.length;o++)t[e[o]]=e[o];return t}return e}function rn(e,t){return e?[...new Set([].concat(e,t))]:t}function qa(e,t){return e?zt(Object.create(null),e,t):t}function gc(e,t){return e?He(e)&&He(t)?[...new Set([...e,...t])]:zt(Object.create(null),uc(e),uc(t??{})):t}function sh(e,t){if(!e)return t;if(!t)return e;const o=zt(Object.create(null),e);for(const n in t)o[n]=rn(e[n],t[n]);return o}function mc(){return{app:null,config:{isNativeTag:ou,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 rh=0;function lh(e,t){return function(n,a=null){ze(n)||(n=zt({},n)),a!=null&&!bt(a)&&(a=null);const s=mc(),r=new WeakSet,l=[];let u=!1;const d=s.app={_uid:rh++,_component:n,_props:a,_container:null,_context:s,_instance:null,version:Vh,get config(){return s.config},set config(c){},use(c,...f){return r.has(c)||(c&&ze(c.install)?(r.add(c),c.install(d,...f)):ze(c)&&(r.add(c),c(d,...f))),d},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),d},component(c,f){return f?(s.components[c]=f,d):s.components[c]},directive(c,f){return f?(s.directives[c]=f,d):s.directives[c]},mount(c,f,g){if(!u){const p=d._ceVNode||Ve(n,a);return p.appContext=s,g===!0?g="svg":g===!1&&(g=void 0),e(p,c,g),u=!0,d._container=c,c.__vue_app__=d,tr(p.component)}},onUnmount(c){l.push(c)},unmount(){u&&(Mn(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,f){return s.provides[c]=f,d},runWithContext(c){const f=Ho;Ho=d;try{return c()}finally{Ho=f}}};return d}}let Ho=null;function Ks(e,t){if(en){let o=en.provides;const n=en.parent&&en.parent.provides;n===o&&(o=en.provides=Object.create(n)),o[e]=t}}function ao(e,t,o=!1){const n=ko();if(n||Ho){let a=Ho?Ho._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return o&&ze(t)?t.call(n&&n.proxy):t}}function ih(){return!!(ko()||Ho)}const hc={},vc=()=>Object.create(hc),_c=e=>Object.getPrototypeOf(e)===hc;function uh(e,t,o,n=!1){const a={},s=vc();e.propsDefaults=Object.create(null),yc(e,t,a,s);for(const r in e.propsOptions[0])r in a||(a[r]=void 0);o?e.props=n?a:ym(a):e.type.props?e.props=a:e.props=s,e.attrs=s}function ch(e,t,o,n){const{props:a,attrs:s,vnode:{patchFlag:r}}=e,l=ot(a),[u]=e.propsOptions;let d=!1;if((n||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let g=c[f];if(Js(e.emitsOptions,g))continue;const p=t[g];if(u)if(ct(s,g))p!==s[g]&&(s[g]=p,d=!0);else{const v=Sn(g);a[v]=El(u,l,v,p,e,!1)}else p!==s[g]&&(s[g]=p,d=!0)}}}else{yc(e,t,a,s)&&(d=!0);let c;for(const f in l)(!t||!ct(t,f)&&((c=_o(f))===f||!ct(t,c)))&&(u?o&&(o[f]!==void 0||o[c]!==void 0)&&(a[f]=El(u,l,f,void 0,e,!0)):delete a[f]);if(s!==l)for(const f in s)(!t||!ct(t,f))&&(delete s[f],d=!0)}d&&Zn(e.attrs,"set","")}function yc(e,t,o,n){const[a,s]=e.propsOptions;let r=!1,l;if(t)for(let u in t){if(Oa(u))continue;const d=t[u];let c;a&&ct(a,c=Sn(u))?!s||!s.includes(c)?o[c]=d:(l||(l={}))[c]=d:Js(e.emitsOptions,u)||(!(u in n)||d!==n[u])&&(n[u]=d,r=!0)}if(s){const u=ot(o),d=l||yt;for(let c=0;c<s.length;c++){const f=s[c];o[f]=El(a,u,f,d[f],e,!ct(d,f))}}return r}function El(e,t,o,n,a,s){const r=e[o];if(r!=null){const l=ct(r,"default");if(l&&n===void 0){const u=r.default;if(r.type!==Function&&!r.skipFactory&&ze(u)){const{propsDefaults:d}=a;if(o in d)n=d[o];else{const c=Ja(a);n=d[o]=u.call(null,t),c()}}else n=u;a.ce&&a.ce._setProp(o,n)}r[0]&&(s&&!l?n=!1:r[1]&&(n===""||n===_o(o))&&(n=!0))}return n}const dh=new WeakMap;function bc(e,t,o=!1){const n=o?dh:t.propsCache,a=n.get(e);if(a)return a;const s=e.props,r={},l=[];let u=!1;if(!ze(e)){const c=f=>{u=!0;const[g,p]=bc(f,t,!0);zt(r,g),p&&l.push(...p)};!o&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!u)return bt(e)&&n.set(e,na),na;if(He(s))for(let c=0;c<s.length;c++){const f=Sn(s[c]);wc(f)&&(r[f]=yt)}else if(s)for(const c in s){const f=Sn(c);if(wc(f)){const g=s[c],p=r[f]=He(g)||ze(g)?{type:g}:zt({},g),v=p.type;let y=!1,x=!0;if(He(v))for(let S=0;S<v.length;++S){const $=v[S],W=ze($)&&$.name;if(W==="Boolean"){y=!0;break}else W==="String"&&(x=!1)}else y=ze(v)&&v.name==="Boolean";p[0]=y,p[1]=x,(y||ct(p,"default"))&&l.push(f)}}const d=[r,l];return bt(e)&&n.set(e,d),d}function wc(e){return e[0]!=="$"&&!Oa(e)}const Ll=e=>e==="_"||e==="_ctx"||e==="$stable",$l=e=>He(e)?e.map(Vn):[Vn(e)],fh=(e,t,o)=>{if(t._n)return t;const n=pt((...a)=>$l(t(...a)),o);return n._c=!1,n},xc=(e,t,o)=>{const n=e._ctx;for(const a in e){if(Ll(a))continue;const s=e[a];if(ze(s))t[a]=fh(a,s,n);else if(s!=null){const r=$l(s);t[a]=()=>r}}},Tc=(e,t)=>{const o=$l(t);e.slots.default=()=>o},Sc=(e,t,o)=>{for(const n in t)(o||!Ll(n))&&(e[n]=t[n])},ph=(e,t,o)=>{const n=e.slots=vc();if(e.vnode.shapeFlag&32){const a=t._;a?(Sc(n,t,o),o&&iu(n,"_",a,!0)):xc(t,n)}else t&&Tc(e,t)},gh=(e,t,o)=>{const{vnode:n,slots:a}=e;let s=!0,r=yt;if(n.shapeFlag&32){const l=t._;l?o&&l===1?s=!1:Sc(a,t,o):(s=!t.$stable,xc(t,a)),r=t}else t&&(Tc(e,t),r={default:1});if(s)for(const l in a)!Ll(l)&&r[l]==null&&delete a[l]},ln=$h;function mh(e){return hh(e)}function hh(e,t){const o=$s();o.__VUE__=!0;const{insert:n,remove:a,patchProp:s,createElement:r,createText:l,createComment:u,setText:d,setElementText:c,parentNode:f,nextSibling:g,setScopeId:p=Bn,insertStaticContent:v}=e,y=(E,L,F,Z=null,ce=null,ge=null,k=void 0,_=null,M=!!L.dynamicChildren)=>{if(E===L)return;E&&!Wo(E,L)&&(Z=P(E),ae(E,ce,ge,!0),E=null),L.patchFlag===-2&&(M=!1,L.dynamicChildren=null);const{type:G,ref:me,shapeFlag:pe}=L;switch(G){case Ga:x(E,L,F,Z);break;case Zt:S(E,L,F,Z);break;case Ml:E==null&&$(L,F,Z,k);break;case Oe:I(E,L,F,Z,ce,ge,k,_,M);break;default:pe&1?A(E,L,F,Z,ce,ge,k,_,M):pe&6?R(E,L,F,Z,ce,ge,k,_,M):(pe&64||pe&128)&&G.process(E,L,F,Z,ce,ge,k,_,M,O)}me!=null&&ce?Wa(me,E&&E.ref,ge,L||E,!L):me==null&&E&&E.ref!=null&&Wa(E.ref,null,ge,E,!0)},x=(E,L,F,Z)=>{if(E==null)n(L.el=l(L.children),F,Z);else{const ce=L.el=E.el;L.children!==E.children&&d(ce,L.children)}},S=(E,L,F,Z)=>{E==null?n(L.el=u(L.children||""),F,Z):L.el=E.el},$=(E,L,F,Z)=>{[E.el,E.anchor]=v(E.children,L,F,Z,E.el,E.anchor)},W=({el:E,anchor:L},F,Z)=>{let ce;for(;E&&E!==L;)ce=g(E),n(E,F,Z),E=ce;n(L,F,Z)},w=({el:E,anchor:L})=>{let F;for(;E&&E!==L;)F=g(E),a(E),E=F;a(L)},A=(E,L,F,Z,ce,ge,k,_,M)=>{L.type==="svg"?k="svg":L.type==="math"&&(k="mathml"),E==null?V(L,F,Z,ce,ge,k,_,M):q(E,L,ce,ge,k,_,M)},V=(E,L,F,Z,ce,ge,k,_)=>{let M,G;const{props:me,shapeFlag:pe,transition:Q,dirs:se}=E;if(M=E.el=r(E.type,ge,me&&me.is,me),pe&8?c(M,E.children):pe&16&&j(E.children,M,null,Z,ce,Al(E,ge),k,_),se&&Bo(E,null,Z,"created"),z(M,E,E.scopeId,k,Z),me){for(const Ne in me)Ne!=="value"&&!Oa(Ne)&&s(M,Ne,null,me[Ne],ge,Z);"value"in me&&s(M,"value",null,me.value,ge),(G=me.onVnodeBeforeMount)&&zn(G,Z,E)}se&&Bo(E,null,Z,"beforeMount");const Me=vh(ce,Q);Me&&Q.beforeEnter(M),n(M,L,F),((G=me&&me.onVnodeMounted)||Me||se)&&ln(()=>{G&&zn(G,Z,E),Me&&Q.enter(M),se&&Bo(E,null,Z,"mounted")},ce)},z=(E,L,F,Z,ce)=>{if(F&&p(E,F),Z)for(let ge=0;ge<Z.length;ge++)p(E,Z[ge]);if(ce){let ge=ce.subTree;if(L===ge||Mc(ge.type)&&(ge.ssContent===L||ge.ssFallback===L)){const k=ce.vnode;z(E,k,k.scopeId,k.slotScopeIds,ce.parent)}}},j=(E,L,F,Z,ce,ge,k,_,M=0)=>{for(let G=M;G<E.length;G++){const me=E[G]=_?So(E[G]):Vn(E[G]);y(null,me,L,F,Z,ce,ge,k,_)}},q=(E,L,F,Z,ce,ge,k)=>{const _=L.el=E.el;let{patchFlag:M,dynamicChildren:G,dirs:me}=L;M|=E.patchFlag&16;const pe=E.props||yt,Q=L.props||yt;let se;if(F&&jo(F,!1),(se=Q.onVnodeBeforeUpdate)&&zn(se,F,L,E),me&&Bo(L,E,F,"beforeUpdate"),F&&jo(F,!0),(pe.innerHTML&&Q.innerHTML==null||pe.textContent&&Q.textContent==null)&&c(_,""),G?fe(E.dynamicChildren,G,_,F,Z,Al(L,ce),ge):k||D(E,L,_,null,F,Z,Al(L,ce),ge,!1),M>0){if(M&16)te(_,pe,Q,F,ce);else if(M&2&&pe.class!==Q.class&&s(_,"class",null,Q.class,ce),M&4&&s(_,"style",pe.style,Q.style,ce),M&8){const Me=L.dynamicProps;for(let Ne=0;Ne<Me.length;Ne++){const je=Me[Ne],Je=pe[je],tt=Q[je];(tt!==Je||je==="value")&&s(_,je,Je,tt,ce,F)}}M&1&&E.children!==L.children&&c(_,L.children)}else!k&&G==null&&te(_,pe,Q,F,ce);((se=Q.onVnodeUpdated)||me)&&ln(()=>{se&&zn(se,F,L,E),me&&Bo(L,E,F,"updated")},Z)},fe=(E,L,F,Z,ce,ge,k)=>{for(let _=0;_<L.length;_++){const M=E[_],G=L[_],me=M.el&&(M.type===Oe||!Wo(M,G)||M.shapeFlag&198)?f(M.el):F;y(M,G,me,null,Z,ce,ge,k,!0)}},te=(E,L,F,Z,ce)=>{if(L!==F){if(L!==yt)for(const ge in L)!Oa(ge)&&!(ge in F)&&s(E,ge,L[ge],null,ce,Z);for(const ge in F){if(Oa(ge))continue;const k=F[ge],_=L[ge];k!==_&&ge!=="value"&&s(E,ge,_,k,ce,Z)}"value"in F&&s(E,"value",L.value,F.value,ce)}},I=(E,L,F,Z,ce,ge,k,_,M)=>{const G=L.el=E?E.el:l(""),me=L.anchor=E?E.anchor:l("");let{patchFlag:pe,dynamicChildren:Q,slotScopeIds:se}=L;se&&(_=_?_.concat(se):se),E==null?(n(G,F,Z),n(me,F,Z),j(L.children||[],F,me,ce,ge,k,_,M)):pe>0&&pe&64&&Q&&E.dynamicChildren?(fe(E.dynamicChildren,Q,F,ce,ge,k,_),(L.key!=null||ce&&L===ce.subTree)&&Il(E,L,!0)):D(E,L,F,me,ce,ge,k,_,M)},R=(E,L,F,Z,ce,ge,k,_,M)=>{L.slotScopeIds=_,E==null?L.shapeFlag&512?ce.ctx.activate(L,F,Z,k,M):H(L,F,Z,ce,ge,k,M):U(E,L,M)},H=(E,L,F,Z,ce,ge,k)=>{const _=E.component=Dh(E,Z,ce);if(Gs(E)&&(_.ctx.renderer=O),Ph(_,!1,k),_.asyncDep){if(ce&&ce.registerDep(_,ne,k),!E.el){const M=_.subTree=Ve(Zt);S(null,M,L,F),E.placeholder=M.el}}else ne(_,E,L,F,ce,ge,k)},U=(E,L,F)=>{const Z=L.component=E.component;if(Eh(E,L,F))if(Z.asyncDep&&!Z.asyncResolved){oe(Z,L,F);return}else Z.next=L,Z.update();else L.el=E.el,Z.vnode=L},ne=(E,L,F,Z,ce,ge,k)=>{const _=()=>{if(E.isMounted){let{next:pe,bu:Q,u:se,parent:Me,vnode:Ne}=E;{const ke=kc(E);if(ke){pe&&(pe.el=Ne.el,oe(E,pe,k)),ke.asyncDep.then(()=>{E.isUnmounted||_()});return}}let je=pe,Je;jo(E,!1),pe?(pe.el=Ne.el,oe(E,pe,k)):pe=Ne,Q&&Es(Q),(Je=pe.props&&pe.props.onVnodeBeforeUpdate)&&zn(Je,Me,pe,Ne),jo(E,!0);const tt=Ac(E),Ie=E.subTree;E.subTree=tt,y(Ie,tt,f(Ie.el),P(Ie),E,ce,ge),pe.el=tt.el,je===null&&Lh(E,tt.el),se&&ln(se,ce),(Je=pe.props&&pe.props.onVnodeUpdated)&&ln(()=>zn(Je,Me,pe,Ne),ce)}else{let pe;const{el:Q,props:se}=L,{bm:Me,m:Ne,parent:je,root:Je,type:tt}=E,Ie=ua(L);jo(E,!1),Me&&Es(Me),!Ie&&(pe=se&&se.onVnodeBeforeMount)&&zn(pe,je,L),jo(E,!0);{Je.ce&&Je.ce._def.shadowRoot!==!1&&Je.ce._injectChildStyle(tt);const ke=E.subTree=Ac(E);y(null,ke,F,Z,E,ce,ge),L.el=ke.el}if(Ne&&ln(Ne,ce),!Ie&&(pe=se&&se.onVnodeMounted)){const ke=L;ln(()=>zn(pe,je,ke),ce)}(L.shapeFlag&256||je&&ua(je.vnode)&&je.vnode.shapeFlag&256)&&E.a&&ln(E.a,ce),E.isMounted=!0,L=F=Z=null}};E.scope.on();const M=E.effect=new mu(_);E.scope.off();const G=E.update=M.run.bind(M),me=E.job=M.runIfDirty.bind(M);me.i=E,me.id=E.uid,M.scheduler=()=>yl(me),jo(E,!0),G()},oe=(E,L,F)=>{L.component=E;const Z=E.vnode.props;E.vnode=L,E.next=null,ch(E,L.props,Z,F),gh(E,L.children,F),Hn(),Uu(E),jn()},D=(E,L,F,Z,ce,ge,k,_,M=!1)=>{const G=E&&E.children,me=E?E.shapeFlag:0,pe=L.children,{patchFlag:Q,shapeFlag:se}=L;if(Q>0){if(Q&128){le(G,pe,F,Z,ce,ge,k,_,M);return}else if(Q&256){N(G,pe,F,Z,ce,ge,k,_,M);return}}se&8?(me&16&&he(G,ce,ge),pe!==G&&c(F,pe)):me&16?se&16?le(G,pe,F,Z,ce,ge,k,_,M):he(G,ce,ge,!0):(me&8&&c(F,""),se&16&&j(pe,F,Z,ce,ge,k,_,M))},N=(E,L,F,Z,ce,ge,k,_,M)=>{E=E||na,L=L||na;const G=E.length,me=L.length,pe=Math.min(G,me);let Q;for(Q=0;Q<pe;Q++){const se=L[Q]=M?So(L[Q]):Vn(L[Q]);y(E[Q],se,F,null,ce,ge,k,_,M)}G>me?he(E,ce,ge,!0,!1,pe):j(L,F,Z,ce,ge,k,_,M,pe)},le=(E,L,F,Z,ce,ge,k,_,M)=>{let G=0;const me=L.length;let pe=E.length-1,Q=me-1;for(;G<=pe&&G<=Q;){const se=E[G],Me=L[G]=M?So(L[G]):Vn(L[G]);if(Wo(se,Me))y(se,Me,F,null,ce,ge,k,_,M);else break;G++}for(;G<=pe&&G<=Q;){const se=E[pe],Me=L[Q]=M?So(L[Q]):Vn(L[Q]);if(Wo(se,Me))y(se,Me,F,null,ce,ge,k,_,M);else break;pe--,Q--}if(G>pe){if(G<=Q){const se=Q+1,Me=se<me?L[se].el:Z;for(;G<=Q;)y(null,L[G]=M?So(L[G]):Vn(L[G]),F,Me,ce,ge,k,_,M),G++}}else if(G>Q)for(;G<=pe;)ae(E[G],ce,ge,!0),G++;else{const se=G,Me=G,Ne=new Map;for(G=Me;G<=Q;G++){const St=L[G]=M?So(L[G]):Vn(L[G]);St.key!=null&&Ne.set(St.key,G)}let je,Je=0;const tt=Q-Me+1;let Ie=!1,ke=0;const Ee=new Array(tt);for(G=0;G<tt;G++)Ee[G]=0;for(G=se;G<=pe;G++){const St=E[G];if(Je>=tt){ae(St,ce,ge,!0);continue}let yn;if(St.key!=null)yn=Ne.get(St.key);else for(je=Me;je<=Q;je++)if(Ee[je-Me]===0&&Wo(St,L[je])){yn=je;break}yn===void 0?ae(St,ce,ge,!0):(Ee[yn-Me]=G+1,yn>=ke?ke=yn:Ie=!0,y(St,L[yn],F,null,ce,ge,k,_,M),Je++)}const _t=Ie?_h(Ee):na;for(je=_t.length-1,G=tt-1;G>=0;G--){const St=Me+G,yn=L[St],Xo=L[St+1],Zo=St+1<me?Xo.el||Xo.placeholder:Z;Ee[G]===0?y(null,yn,F,Zo,ce,ge,k,_,M):Ie&&(je<0||G!==_t[je]?we(yn,F,Zo,2):je--)}}},we=(E,L,F,Z,ce=null)=>{const{el:ge,type:k,transition:_,children:M,shapeFlag:G}=E;if(G&6){we(E.component.subTree,L,F,Z);return}if(G&128){E.suspense.move(L,F,Z);return}if(G&64){k.move(E,L,F,O);return}if(k===Oe){n(ge,L,F);for(let pe=0;pe<M.length;pe++)we(M[pe],L,F,Z);n(E.anchor,L,F);return}if(k===Ml){W(E,L,F);return}if(Z!==2&&G&1&&_)if(Z===0)_.beforeEnter(ge),n(ge,L,F),ln(()=>_.enter(ge),ce);else{const{leave:pe,delayLeave:Q,afterLeave:se}=_,Me=()=>{E.ctx.isUnmounted?a(ge):n(ge,L,F)},Ne=()=>{ge._isLeaving&&ge[no](!0),pe(ge,()=>{Me(),se&&se()})};Q?Q(ge,Me,Ne):Ne()}else n(ge,L,F)},ae=(E,L,F,Z=!1,ce=!1)=>{const{type:ge,props:k,ref:_,children:M,dynamicChildren:G,shapeFlag:me,patchFlag:pe,dirs:Q,cacheIndex:se}=E;if(pe===-2&&(ce=!1),_!=null&&(Hn(),Wa(_,null,F,E,!0),jn()),se!=null&&(L.renderCache[se]=void 0),me&256){L.ctx.deactivate(E);return}const Me=me&1&&Q,Ne=!ua(E);let je;if(Ne&&(je=k&&k.onVnodeBeforeUnmount)&&zn(je,L,E),me&6)Te(E.component,F,Z);else{if(me&128){E.suspense.unmount(F,Z);return}Me&&Bo(E,null,L,"beforeUnmount"),me&64?E.type.remove(E,L,F,O,Z):G&&!G.hasOnce&&(ge!==Oe||pe>0&&pe&64)?he(G,L,F,!1,!0):(ge===Oe&&pe&384||!ce&&me&16)&&he(M,L,F),Z&&ie(E)}(Ne&&(je=k&&k.onVnodeUnmounted)||Me)&&ln(()=>{je&&zn(je,L,E),Me&&Bo(E,null,L,"unmounted")},F)},ie=E=>{const{type:L,el:F,anchor:Z,transition:ce}=E;if(L===Oe){ve(F,Z);return}if(L===Ml){w(E);return}const ge=()=>{a(F),ce&&!ce.persisted&&ce.afterLeave&&ce.afterLeave()};if(E.shapeFlag&1&&ce&&!ce.persisted){const{leave:k,delayLeave:_}=ce,M=()=>k(F,ge);_?_(E.el,ge,M):M()}else ge()},ve=(E,L)=>{let F;for(;E!==L;)F=g(E),a(E),E=F;a(L)},Te=(E,L,F)=>{const{bum:Z,scope:ce,job:ge,subTree:k,um:_,m:M,a:G}=E;Cc(M),Cc(G),Z&&Es(Z),ce.stop(),ge&&(ge.flags|=8,ae(k,E,L,F)),_&&ln(_,L),ln(()=>{E.isUnmounted=!0},L)},he=(E,L,F,Z=!1,ce=!1,ge=0)=>{for(let k=ge;k<E.length;k++)ae(E[k],L,F,Z,ce)},P=E=>{if(E.shapeFlag&6)return P(E.component.subTree);if(E.shapeFlag&128)return E.suspense.next();const L=g(E.anchor||E.el),F=L&&L[Wu];return F?g(F):L};let Y=!1;const ee=(E,L,F)=>{E==null?L._vnode&&ae(L._vnode,null,null,!0):y(L._vnode||null,E,L,null,null,null,F),L._vnode=E,Y||(Y=!0,Uu(),Bu(),Y=!1)},O={p:y,um:ae,m:we,r:ie,mt:H,mc:j,pc:D,pbc:fe,n:P,o:e};return{render:ee,hydrate:void 0,createApp:lh(ee)}}function Al({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function jo({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function vh(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Il(e,t,o=!1){const n=e.children,a=t.children;if(He(n)&&He(a))for(let s=0;s<n.length;s++){const r=n[s];let l=a[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[s]=So(a[s]),l.el=r.el),!o&&l.patchFlag!==-2&&Il(r,l)),l.type===Ga&&l.patchFlag!==-1&&(l.el=r.el),l.type===Zt&&!l.el&&(l.el=r.el)}}function _h(e){const t=e.slice(),o=[0];let n,a,s,r,l;const u=e.length;for(n=0;n<u;n++){const d=e[n];if(d!==0){if(a=o[o.length-1],e[a]<d){t[n]=a,o.push(n);continue}for(s=0,r=o.length-1;s<r;)l=s+r>>1,e[o[l]]<d?s=l+1:r=l;d<e[o[s]]&&(s>0&&(t[n]=o[s-1]),o[s]=n)}}for(s=o.length,r=o[s-1];s-- >0;)o[s]=r,r=t[r];return o}function kc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:kc(t)}function Cc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const yh=Symbol.for("v-scx"),bh=()=>ao(yh);function it(e,t,o){return Ec(e,t,o)}function Ec(e,t,o=yt){const{immediate:n,deep:a,flush:s,once:r}=o,l=zt({},o),u=t&&n||!t&&s!=="post";let d;if(Xa){if(s==="sync"){const p=bh();d=p.__watcherHandles||(p.__watcherHandles=[])}else if(!u){const p=()=>{};return p.stop=Bn,p.resume=Bn,p.pause=Bn,p}}const c=en;l.call=(p,v,y)=>Mn(p,c,v,y);let f=!1;s==="post"?l.scheduler=p=>{ln(p,c&&c.suspense)}:s!=="sync"&&(f=!0,l.scheduler=(p,v)=>{v?p():yl(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const g=$m(e,t,l);return Xa&&(d?d.push(g):u&&g()),g}function wh(e,t,o){const n=this.proxy,a=$t(e)?e.includes(".")?Lc(n,e):()=>n[e]:e.bind(n,n);let s;ze(t)?s=t:(s=t.handler,o=t);const r=Ja(this),l=Ec(a,s.bind(n),o);return r(),l}function Lc(e,t){const o=t.split(".");return()=>{let n=e;for(let a=0;a<o.length&&n;a++)n=n[o[a]];return n}}const xh=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Sn(t)}Modifiers`]||e[`${_o(t)}Modifiers`];function Th(e,t,...o){if(e.isUnmounted)return;const n=e.vnode.props||yt;let a=o;const s=t.startsWith("update:"),r=s&&xh(n,t.slice(7));r&&(r.trim&&(a=o.map(c=>$t(c)?c.trim():c)),r.number&&(a=o.map(Ls)));let l,u=n[l=nl(t)]||n[l=nl(Sn(t))];!u&&s&&(u=n[l=nl(_o(t))]),u&&Mn(u,e,6,a);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Mn(d,e,6,a)}}const Sh=new WeakMap;function $c(e,t,o=!1){const n=o?Sh:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const s=e.emits;let r={},l=!1;if(!ze(e)){const u=d=>{const c=$c(d,t,!0);c&&(l=!0,zt(r,c))};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!s&&!l?(bt(e)&&n.set(e,null),null):(He(s)?s.forEach(u=>r[u]=null):zt(r,s),bt(e)&&n.set(e,r),r)}function Js(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),ct(e,t[0].toLowerCase()+t.slice(1))||ct(e,_o(t))||ct(e,t))}function Z$(){}function Ac(e){const{type:t,vnode:o,proxy:n,withProxy:a,propsOptions:[s],slots:r,attrs:l,emit:u,render:d,renderCache:c,props:f,data:g,setupState:p,ctx:v,inheritAttrs:y}=e,x=js(e);let S,$;try{if(o.shapeFlag&4){const w=a||n,A=w;S=Vn(d.call(A,w,c,f,p,g,v)),$=l}else{const w=t;S=Vn(w.length>1?w(f,{attrs:l,slots:r,emit:u}):w(f,null)),$=t.props?l:kh(l)}}catch(w){Qa.length=0,Bs(w,e,1),S=Ve(Zt)}let W=S;if($&&y!==!1){const w=Object.keys($),{shapeFlag:A}=W;w.length&&A&7&&(s&&w.some(Zr)&&($=Ch($,s)),W=To(W,$,!1,!0))}return o.dirs&&(W=To(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(o.dirs):o.dirs),o.transition&&ja(W,o.transition),S=W,js(x),S}const kh=e=>{let t;for(const o in e)(o==="class"||o==="style"||Ss(o))&&((t||(t={}))[o]=e[o]);return t},Ch=(e,t)=>{const o={};for(const n in e)(!Zr(n)||!(n.slice(9)in t))&&(o[n]=e[n]);return o};function Eh(e,t,o){const{props:n,children:a,component:s}=e,{props:r,children:l,patchFlag:u}=t,d=s.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&u>=0){if(u&1024)return!0;if(u&16)return n?Ic(n,r,d):!!r;if(u&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const g=c[f];if(r[g]!==n[g]&&!Js(d,g))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:n===r?!1:n?r?Ic(n,r,d):!0:!!r;return!1}function Ic(e,t,o){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const s=n[a];if(t[s]!==e[s]&&!Js(o,s))return!0}return!1}function Lh({vnode:e,parent:t},o){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=o,t=t.parent;else break}}const Mc=e=>e.__isSuspense;function $h(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):Dm(e)}const Oe=Symbol.for("v-fgt"),Ga=Symbol.for("v-txt"),Zt=Symbol.for("v-cmt"),Ml=Symbol.for("v-stc"),Qa=[];let bn=null;function T(e=!1){Qa.push(bn=e?null:[])}function Ah(){Qa.pop(),bn=Qa[Qa.length-1]||null}let Ya=1;function Xs(e,t=!1){Ya+=e,e<0&&bn&&t&&(bn.hasOnce=!0)}function Oc(e){return e.dynamicChildren=Ya>0?bn||na:null,Ah(),Ya>0&&bn&&bn.push(e),e}function C(e,t,o,n,a,s){return Oc(i(e,t,o,n,a,s,!0))}function wt(e,t,o,n,a){return Oc(Ve(e,t,o,n,a,!0))}function Ka(e){return e?e.__v_isVNode===!0:!1}function Wo(e,t){return e.type===t.type&&e.key===t.key}const Rc=({key:e})=>e??null,Zs=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||At(e)||ze(e)?{i:Yt,r:e,k:t,f:!!o}:e:null);function i(e,t=null,o=null,n=0,a=null,s=e===Oe?0:1,r=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Rc(t),ref:t&&Zs(t),scopeId:ju,slotScopeIds:null,children:o,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:s,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Yt};return l?(Ol(u,o),s&128&&e.normalize(u)):o&&(u.shapeFlag|=$t(o)?8:16),Ya>0&&!r&&bn&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&bn.push(u),u}const Ve=Ih;function Ih(e,t=null,o=null,n=0,a=null,s=!1){if((!e||e===Xm)&&(e=Zt),Ka(e)){const l=To(e,t,!0);return o&&Ol(l,o),Ya>0&&!s&&bn&&(l.shapeFlag&6?bn[bn.indexOf(e)]=l:bn.push(l)),l.patchFlag=-2,l}if(Wh(e)&&(e=e.__vccOpts),t){t=Mh(t);let{class:l,style:u}=t;l&&!$t(l)&&(t.class=Ce(l)),bt(u)&&(hl(u)&&!He(u)&&(u=zt({},u)),t.style=ft(u))}const r=$t(e)?1:Mc(e)?128:Vu(e)?64:bt(e)?4:ze(e)?2:0;return i(e,t,o,n,a,r,s,!0)}function Mh(e){return e?hl(e)||_c(e)?zt({},e):e:null}function To(e,t,o=!1,n=!1){const{props:a,ref:s,patchFlag:r,children:l,transition:u}=e,d=t?Oh(a||{},t):a,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Rc(d),ref:t&&t.ref?o&&s?He(s)?s.concat(Zs(t)):[s,Zs(t)]:Zs(t):s,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!==Oe?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&To(e.ssContent),ssFallback:e.ssFallback&&To(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&ja(c,u.clone(c)),c}function qe(e=" ",t=0){return Ve(Ga,null,e,t)}function de(e="",t=!1){return t?(T(),wt(Zt,null,e)):Ve(Zt,null,e)}function Vn(e){return e==null||typeof e=="boolean"?Ve(Zt):He(e)?Ve(Oe,null,e.slice()):Ka(e)?So(e):Ve(Ga,null,String(e))}function So(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:To(e)}function Ol(e,t){let o=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(He(t))o=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),Ol(e,a()),a._c&&(a._d=!0));return}else{o=32;const a=t._;!a&&!_c(t)?t._ctx=Yt:a===3&&Yt&&(Yt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ze(t)?(t={default:t,_ctx:Yt},o=32):(t=String(t),n&64?(o=16,t=[qe(t)]):o=8);e.children=t,e.shapeFlag|=o}function Oh(...e){const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Ce([t.class,n.class]));else if(a==="style")t.style=ft([t.style,n.style]);else if(Ss(a)){const s=t[a],r=n[a];r&&s!==r&&!(He(s)&&s.includes(r))&&(t[a]=s?[].concat(s,r):r)}else a!==""&&(t[a]=n[a])}return t}function zn(e,t,o,n=null){Mn(e,t,7,[o,n])}const Rh=mc();let Nh=0;function Dh(e,t,o){const n=e.type,a=(t?t.appContext:e.appContext)||Rh,s={uid:Nh++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new pu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bc(n,a),emitsOptions:$c(n,a),emit:null,emitted:null,propsDefaults:yt,inheritAttrs:n.inheritAttrs,ctx:yt,data:yt,props:yt,attrs:yt,slots:yt,refs:yt,setupState:yt,setupContext:null,suspense:o,suspenseId:o?o.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 s.ctx={_:s},s.root=t?t.root:s,s.emit=Th.bind(null,s),e.ce&&e.ce(s),s}let en=null;const ko=()=>en||Yt;let er,Rl;{const e=$s(),t=(o,n)=>{let a;return(a=e[o])||(a=e[o]=[]),a.push(n),s=>{a.length>1?a.forEach(r=>r(s)):a[0](s)}};er=t("__VUE_INSTANCE_SETTERS__",o=>en=o),Rl=t("__VUE_SSR_SETTERS__",o=>Xa=o)}const Ja=e=>{const t=en;return er(e),e.scope.on(),()=>{e.scope.off(),er(t)}},Nc=()=>{en&&en.scope.off(),er(null)};function Dc(e){return e.vnode.shapeFlag&4}let Xa=!1;function Ph(e,t=!1,o=!1){t&&Rl(t);const{props:n,children:a}=e.vnode,s=Dc(e);uh(e,n,s,t),ph(e,a,o||t);const r=s?Fh(e,t):void 0;return t&&Rl(!1),r}function Fh(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,eh);const{setup:n}=o;if(n){Hn();const a=e.setupContext=n.length>1?Bh(e):null,s=Ja(e),r=ra(n,e,0,[e.props,a]),l=su(r);if(jn(),s(),(l||e.sp)&&!ua(e)&&oc(e),l){if(r.then(Nc,Nc),t)return r.then(u=>{Pc(e,u)}).catch(u=>{Bs(u,e,0)});e.asyncDep=r}else Pc(e,r)}else Fc(e)}function Pc(e,t,o){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:bt(t)&&(e.setupState=Nu(t)),Fc(e)}function Fc(e,t,o){const n=e.type;e.render||(e.render=n.render||Bn);{const a=Ja(e);Hn();try{th(e)}finally{jn(),a()}}}const Uh={get(e,t){return Xt(e,"get",""),e[t]}};function Bh(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Uh),slots:e.slots,emit:e.emit,expose:t}}function tr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nu(vl(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in za)return za[o](e)},has(t,o){return o in t||o in za}})):e.proxy}const Hh=/(?:^|[-_])\w/g,jh=e=>e.replace(Hh,t=>t.toUpperCase()).replace(/[-_]/g,"");function Uc(e,t=!0){return ze(e)?e.displayName||e.name:e.name||t&&e.__name}function Bc(e,t,o=!1){let n=Uc(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e&&e.parent){const a=s=>{for(const r in s)if(s[r]===t)return r};n=a(e.components||e.parent.type.components)||a(e.appContext.components)}return n?jh(n):o?"App":"Anonymous"}function Wh(e){return ze(e)&&"__vccOpts"in e}const et=(e,t)=>Em(e,t,Xa);function xt(e,t,o){const n=(s,r,l)=>{Xs(-1);try{return Ve(s,r,l)}finally{Xs(1)}},a=arguments.length;return a===2?bt(t)&&!He(t)?Ka(t)?n(e,null,[t]):n(e,t):n(e,null,t):(a>3?o=Array.prototype.slice.call(arguments,2):a===3&&Ka(o)&&(o=[o]),n(e,t,o))}const Vh="3.5.21";/**
* @vue/runtime-dom v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Nl;const Hc=typeof window<"u"&&window.trustedTypes;if(Hc)try{Nl=Hc.createPolicy("vue",{createHTML:e=>e})}catch{}const jc=Nl?e=>Nl.createHTML(e):e=>e,zh="http://www.w3.org/2000/svg",qh="http://www.w3.org/1998/Math/MathML",so=typeof document<"u"?document:null,Wc=so&&so.createElement("template"),Gh={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,n)=>{const a=t==="svg"?so.createElementNS(zh,e):t==="mathml"?so.createElementNS(qh,e):o?so.createElement(e,{is:o}):so.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>so.createTextNode(e),createComment:e=>so.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>so.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,n,a,s){const r=o?o.previousSibling:t.lastChild;if(a&&(a===s||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),o),!(a===s||!(a=a.nextSibling)););else{Wc.innerHTML=jc(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Wc.content;if(n==="svg"||n==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,o)}return[r?r.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},Co="transition",Za="animation",es=Symbol("_vtc"),Vc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Qh=zt({},Ju,Vc),Dl=(e=>(e.displayName="Transition",e.props=Qh,e))((e,{slots:t})=>xt(Bm,Yh(e),t)),Vo=(e,t=[])=>{He(e)?e.forEach(o=>o(...t)):e&&e(...t)},zc=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function Yh(e){const t={};for(const I in e)I in Vc||(t[I]=e[I]);if(e.css===!1)return t;const{name:o="v",type:n,duration:a,enterFromClass:s=`${o}-enter-from`,enterActiveClass:r=`${o}-enter-active`,enterToClass:l=`${o}-enter-to`,appearFromClass:u=s,appearActiveClass:d=r,appearToClass:c=l,leaveFromClass:f=`${o}-leave-from`,leaveActiveClass:g=`${o}-leave-active`,leaveToClass:p=`${o}-leave-to`}=e,v=Kh(a),y=v&&v[0],x=v&&v[1],{onBeforeEnter:S,onEnter:$,onEnterCancelled:W,onLeave:w,onLeaveCancelled:A,onBeforeAppear:V=S,onAppear:z=$,onAppearCancelled:j=W}=t,q=(I,R,H,U)=>{I._enterCancelled=U,zo(I,R?c:l),zo(I,R?d:r),H&&H()},fe=(I,R)=>{I._isLeaving=!1,zo(I,f),zo(I,p),zo(I,g),R&&R()},te=I=>(R,H)=>{const U=I?z:$,ne=()=>q(R,I,H);Vo(U,[R,ne]),qc(()=>{zo(R,I?u:s),ro(R,I?c:l),zc(U)||Gc(R,n,y,ne)})};return zt(t,{onBeforeEnter(I){Vo(S,[I]),ro(I,s),ro(I,r)},onBeforeAppear(I){Vo(V,[I]),ro(I,u),ro(I,d)},onEnter:te(!1),onAppear:te(!0),onLeave(I,R){I._isLeaving=!0;const H=()=>fe(I,R);ro(I,f),I._enterCancelled?(ro(I,g),Kc()):(Kc(),ro(I,g)),qc(()=>{I._isLeaving&&(zo(I,f),ro(I,p),zc(w)||Gc(I,n,x,H))}),Vo(w,[I,H])},onEnterCancelled(I){q(I,!1,void 0,!0),Vo(W,[I])},onAppearCancelled(I){q(I,!0,void 0,!0),Vo(j,[I])},onLeaveCancelled(I){fe(I),Vo(A,[I])}})}function Kh(e){if(e==null)return null;if(bt(e))return[Pl(e.enter),Pl(e.leave)];{const t=Pl(e);return[t,t]}}function Pl(e){return qg(e)}function ro(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[es]||(e[es]=new Set)).add(t)}function zo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const o=e[es];o&&(o.delete(t),o.size||(e[es]=void 0))}function qc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Jh=0;function Gc(e,t,o,n){const a=e._endId=++Jh,s=()=>{a===e._endId&&n()};if(o!=null)return setTimeout(s,o);const{type:r,timeout:l,propCount:u}=Xh(e,t);if(!r)return n();const d=r+"end";let c=0;const f=()=>{e.removeEventListener(d,g),s()},g=p=>{p.target===e&&++c>=u&&f()};setTimeout(()=>{c<u&&f()},l+1),e.addEventListener(d,g)}function Xh(e,t){const o=window.getComputedStyle(e),n=v=>(o[v]||"").split(", "),a=n(`${Co}Delay`),s=n(`${Co}Duration`),r=Qc(a,s),l=n(`${Za}Delay`),u=n(`${Za}Duration`),d=Qc(l,u);let c=null,f=0,g=0;t===Co?r>0&&(c=Co,f=r,g=s.length):t===Za?d>0&&(c=Za,f=d,g=u.length):(f=Math.max(r,d),c=f>0?r>d?Co:Za:null,g=c?c===Co?s.length:u.length:0);const p=c===Co&&/\b(?:transform|all)(?:,|$)/.test(n(`${Co}Property`).toString());return{type:c,timeout:f,propCount:g,hasTransform:p}}function Qc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((o,n)=>Yc(o)+Yc(e[n])))}function Yc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Kc(){return document.body.offsetHeight}function Zh(e,t,o){const n=e[es];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const nr=Symbol("_vod"),Jc=Symbol("_vsh"),or={name:"show",beforeMount(e,{value:t},{transition:o}){e[nr]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):ts(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:n}){!t!=!o&&(n?t?(n.beforeEnter(e),ts(e,!0),n.enter(e)):n.leave(e,()=>{ts(e,!1)}):ts(e,t))},beforeUnmount(e,{value:t}){ts(e,t)}};function ts(e,t){e.style.display=t?e[nr]:"none",e[Jc]=!t}const e1=Symbol(""),t1=/(?:^|;)\s*display\s*:/;function n1(e,t,o){const n=e.style,a=$t(o);let s=!1;if(o&&!a){if(t)if($t(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();o[l]==null&&ar(n,l,"")}else for(const r in t)o[r]==null&&ar(n,r,"");for(const r in o)r==="display"&&(s=!0),ar(n,r,o[r])}else if(a){if(t!==o){const r=n[e1];r&&(o+=";"+r),n.cssText=o,s=t1.test(o)}}else t&&e.removeAttribute("style");nr in e&&(e[nr]=s?n.display:"",e[Jc]&&(n.display="none"))}const Xc=/\s*!important$/;function ar(e,t,o){if(He(o))o.forEach(n=>ar(e,t,n));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const n=o1(e,t);Xc.test(o)?e.setProperty(_o(n),o.replace(Xc,""),"important"):e[n]=o}}const Zc=["Webkit","Moz","ms"],Fl={};function o1(e,t){const o=Fl[t];if(o)return o;let n=Sn(t);if(n!=="filter"&&n in e)return Fl[t]=n;n=Cs(n);for(let a=0;a<Zc.length;a++){const s=Zc[a]+n;if(s in e)return Fl[t]=s}return t}const ed="http://www.w3.org/1999/xlink";function td(e,t,o,n,a,s=Jg(t)){n&&t.startsWith("xlink:")?o==null?e.removeAttributeNS(ed,t.slice(6,t.length)):e.setAttributeNS(ed,t,o):o==null||s&&!cu(o)?e.removeAttribute(t):e.setAttribute(t,s?"":An(o)?String(o):o)}function nd(e,t,o,n,a){if(t==="innerHTML"||t==="textContent"){o!=null&&(e[t]=t==="innerHTML"?jc(o):o);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,u=o==null?e.type==="checkbox"?"on":"":String(o);(l!==u||!("_value"in e))&&(e.value=u),o==null&&e.removeAttribute(t),e._value=o;return}let r=!1;if(o===""||o==null){const l=typeof e[t];l==="boolean"?o=cu(o):o==null&&l==="string"?(o="",r=!0):l==="number"&&(o=0,r=!0)}try{e[t]=o}catch{}r&&e.removeAttribute(a||t)}function lo(e,t,o,n){e.addEventListener(t,o,n)}function a1(e,t,o,n){e.removeEventListener(t,o,n)}const od=Symbol("_vei");function s1(e,t,o,n,a=null){const s=e[od]||(e[od]={}),r=s[t];if(n&&r)r.value=n;else{const[l,u]=r1(t);if(n){const d=s[t]=u1(n,a);lo(e,l,d,u)}else r&&(a1(e,l,r,u),s[t]=void 0)}}const ad=/(?:Once|Passive|Capture)$/;function r1(e){let t;if(ad.test(e)){t={};let n;for(;n=e.match(ad);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_o(e.slice(2)),t]}let Ul=0;const l1=Promise.resolve(),i1=()=>Ul||(l1.then(()=>Ul=0),Ul=Date.now());function u1(e,t){const o=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=o.attached)return;Mn(c1(n,o.value),t,5,[n])};return o.value=e,o.attached=i1(),o}function c1(e,t){if(He(t)){const o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const sd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,d1=(e,t,o,n,a,s)=>{const r=a==="svg";t==="class"?Zh(e,n,r):t==="style"?n1(e,o,n):Ss(t)?Zr(t)||s1(e,t,o,n,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):f1(e,t,n,r))?(nd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&td(e,t,n,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$t(n))?nd(e,Sn(t),n,s,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),td(e,t,n,r))};function f1(e,t,o,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&sd(t)&&ze(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return sd(t)&&$t(o)?!1:t in e}const Eo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?o=>Es(t,o):t};function p1(e){e.target.composing=!0}function rd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const En=Symbol("_assign"),Le={created(e,{modifiers:{lazy:t,trim:o,number:n}},a){e[En]=Eo(a);const s=n||a.props&&a.props.type==="number";lo(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;o&&(l=l.trim()),s&&(l=Ls(l)),e[En](l)}),o&&lo(e,"change",()=>{e.value=e.value.trim()}),t||(lo(e,"compositionstart",p1),lo(e,"compositionend",rd),lo(e,"change",rd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:n,trim:a,number:s}},r){if(e[En]=Eo(r),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?Ls(e.value):e.value,u=t??"";l!==u&&(document.activeElement===e&&e.type!=="range"&&(n&&t===o||a&&e.value.trim()===u)||(e.value=u))}},qt={deep:!0,created(e,t,o){e[En]=Eo(o),lo(e,"change",()=>{const n=e._modelValue,a=da(e),s=e.checked,r=e[En];if(He(n)){const l=ol(n,a),u=l!==-1;if(s&&!u)r(n.concat(a));else if(!s&&u){const d=[...n];d.splice(l,1),r(d)}}else if(aa(n)){const l=new Set(n);s?l.add(a):l.delete(a),r(l)}else r(ud(e,s))})},mounted:ld,beforeUpdate(e,t,o){e[En]=Eo(o),ld(e,t,o)}};function ld(e,{value:t,oldValue:o},n){e._modelValue=t;let a;if(He(t))a=ol(t,n.props.value)>-1;else if(aa(t))a=t.has(n.props.value);else{if(t===o)return;a=Po(t,ud(e,!0))}e.checked!==a&&(e.checked=a)}const io={created(e,{value:t},o){e.checked=Po(t,o.props.value),e[En]=Eo(o),lo(e,"change",()=>{e[En](da(e))})},beforeUpdate(e,{value:t,oldValue:o},n){e[En]=Eo(n),t!==o&&(e.checked=Po(t,n.props.value))}},un={deep:!0,created(e,{value:t,modifiers:{number:o}},n){const a=aa(t);lo(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>o?Ls(da(r)):da(r));e[En](e.multiple?a?new Set(s):s:s[0]),e._assigning=!0,Ge(()=>{e._assigning=!1})}),e[En]=Eo(n)},mounted(e,{value:t}){id(e,t)},beforeUpdate(e,t,o){e[En]=Eo(o)},updated(e,{value:t}){e._assigning||id(e,t)}};function id(e,t){const o=e.multiple,n=He(t);if(!(o&&!n&&!aa(t))){for(let a=0,s=e.options.length;a<s;a++){const r=e.options[a],l=da(r);if(o)if(n){const u=typeof l;u==="string"||u==="number"?r.selected=t.some(d=>String(d)===String(l)):r.selected=ol(t,l)>-1}else r.selected=t.has(l);else if(Po(da(r),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function da(e){return"_value"in e?e._value:e.value}function ud(e,t){const o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}const cd={created(e,t,o){sr(e,t,o,null,"created")},mounted(e,t,o){sr(e,t,o,null,"mounted")},beforeUpdate(e,t,o,n){sr(e,t,o,n,"beforeUpdate")},updated(e,t,o,n){sr(e,t,o,n,"updated")}};function g1(e,t){switch(e){case"SELECT":return un;case"TEXTAREA":return Le;default:switch(t){case"checkbox":return qt;case"radio":return io;default:return Le}}}function sr(e,t,o,n,a){const r=g1(e.tagName,o.props&&o.props.type)[a];r&&r(e,t,o,n)}const m1=["ctrl","shift","alt","meta"],h1={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)=>m1.some(o=>e[`${o}Key`]&&!t.includes(o))},Xe=(e,t)=>{const o=e._withMods||(e._withMods={}),n=t.join(".");return o[n]||(o[n]=((a,...s)=>{for(let r=0;r<t.length;r++){const l=h1[t[r]];if(l&&l(a,t))return}return e(a,...s)}))},v1={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},tn=(e,t)=>{const o=e._withKeys||(e._withKeys={}),n=t.join(".");return o[n]||(o[n]=(a=>{if(!("key"in a))return;const s=_o(a.key);if(t.some(r=>r===s||v1[r]===s))return e(a)}))},_1=zt({patchProp:d1},Gh);let dd;function fd(){return dd||(dd=mh(_1))}const pd=((...e)=>{fd().render(...e)}),y1=((...e)=>{const t=fd().createApp(...e),{mount:o}=t;return t.mount=n=>{const a=w1(n);if(!a)return;const s=t._component;!ze(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const r=o(a,!1,b1(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),r},t});function b1(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function w1(e){return $t(e)?document.querySelector(e):e}/*!
* shared v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function x1(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const rr=typeof window<"u",Lo=(e,t=!1)=>t?Symbol.for(e):Symbol(e),T1=(e,t,o)=>S1({l:e,k:t,s:o}),S1=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ft=e=>typeof e=="number"&&isFinite(e),k1=e=>Bl(e)==="[object Date]",fa=e=>Bl(e)==="[object RegExp]",lr=e=>Ze(e)&&Object.keys(e).length===0,Wt=Object.assign,C1=Object.create,mt=(e=null)=>C1(e);let gd;const qo=()=>gd||(gd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:mt());function md(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function hd(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function E1(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,a,s)=>`${a}="${hd(s)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,a,s)=>`${a}='${hd(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{e=e.replace(n,"$1javascript&#58;")}),e}const L1=Object.prototype.hasOwnProperty;function Rn(e,t){return L1.call(e,t)}const Ot=Array.isArray,Et=e=>typeof e=="function",Re=e=>typeof e=="string",st=e=>typeof e=="boolean",ut=e=>e!==null&&typeof e=="object",$1=e=>ut(e)&&Et(e.then)&&Et(e.catch),vd=Object.prototype.toString,Bl=e=>vd.call(e),Ze=e=>Bl(e)==="[object Object]",A1=e=>e==null?"":Ot(e)||Ze(e)&&e.toString===vd?JSON.stringify(e,null,2):String(e);function Hl(e,t=""){return e.reduce((o,n,a)=>a===0?o+n:o+t+n,"")}const ir=e=>!ut(e)||Ot(e);function ur(e,t){if(ir(e)||ir(t))throw new Error("Invalid value");const o=[{src:e,des:t}];for(;o.length;){const{src:n,des:a}=o.pop();Object.keys(n).forEach(s=>{s!=="__proto__"&&(ut(n[s])&&!ut(a[s])&&(a[s]=Array.isArray(n[s])?[]:mt()),ir(a[s])||ir(n[s])?a[s]=n[s]:o.push({src:n[s],des:a[s]}))})}}/*!
* message-compiler v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function I1(e,t,o){return{line:e,column:t,offset:o}}function jl(e,t,o){return{start:e,end:t}}const dt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},M1=17;function cr(e,t,o={}){const{domain:n,messages:a,args:s}=o,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=n,l}function O1(e){throw e}const qn=" ",R1="\r",nn=`
`,N1="\u2028",D1="\u2029";function P1(e){const t=e;let o=0,n=1,a=1,s=0;const r=z=>t[z]===R1&&t[z+1]===nn,l=z=>t[z]===nn,u=z=>t[z]===D1,d=z=>t[z]===N1,c=z=>r(z)||l(z)||u(z)||d(z),f=()=>o,g=()=>n,p=()=>a,v=()=>s,y=z=>r(z)||u(z)||d(z)?nn:t[z],x=()=>y(o),S=()=>y(o+s);function $(){return s=0,c(o)&&(n++,a=0),r(o)&&o++,o++,a++,t[o]}function W(){return r(o+s)&&s++,s++,t[o+s]}function w(){o=0,n=1,a=1,s=0}function A(z=0){s=z}function V(){const z=o+s;for(;z!==o;)$();s=0}return{index:f,line:g,column:p,peekOffset:v,charAt:y,currentChar:x,currentPeek:S,next:$,peek:W,reset:w,resetPeek:A,skipToPeek:V}}const uo=void 0,F1=".",_d="'",U1="tokenizer";function B1(e,t={}){const o=t.location!==!1,n=P1(e),a=()=>n.index(),s=()=>I1(n.line(),n.column(),n.index()),r=s(),l=a(),u={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},d=()=>u,{onError:c}=t;function f(k,_,M,...G){const me=d();if(_.column+=M,_.offset+=M,c){const pe=o?jl(me.startLoc,_):null,Q=cr(k,pe,{domain:U1,args:G});c(Q)}}function g(k,_,M){k.endLoc=s(),k.currentType=_;const G={type:_};return o&&(G.loc=jl(k.startLoc,k.endLoc)),M!=null&&(G.value=M),G}const p=k=>g(k,13);function v(k,_){return k.currentChar()===_?(k.next(),_):(f(dt.EXPECTED_TOKEN,s(),0,_),"")}function y(k){let _="";for(;k.currentPeek()===qn||k.currentPeek()===nn;)_+=k.currentPeek(),k.peek();return _}function x(k){const _=y(k);return k.skipToPeek(),_}function S(k){if(k===uo)return!1;const _=k.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function $(k){if(k===uo)return!1;const _=k.charCodeAt(0);return _>=48&&_<=57}function W(k,_){const{currentType:M}=_;if(M!==2)return!1;y(k);const G=S(k.currentPeek());return k.resetPeek(),G}function w(k,_){const{currentType:M}=_;if(M!==2)return!1;y(k);const G=k.currentPeek()==="-"?k.peek():k.currentPeek(),me=$(G);return k.resetPeek(),me}function A(k,_){const{currentType:M}=_;if(M!==2)return!1;y(k);const G=k.currentPeek()===_d;return k.resetPeek(),G}function V(k,_){const{currentType:M}=_;if(M!==7)return!1;y(k);const G=k.currentPeek()===".";return k.resetPeek(),G}function z(k,_){const{currentType:M}=_;if(M!==8)return!1;y(k);const G=S(k.currentPeek());return k.resetPeek(),G}function j(k,_){const{currentType:M}=_;if(!(M===7||M===11))return!1;y(k);const G=k.currentPeek()===":";return k.resetPeek(),G}function q(k,_){const{currentType:M}=_;if(M!==9)return!1;const G=()=>{const pe=k.currentPeek();return pe==="{"?S(k.peek()):pe==="@"||pe==="|"||pe===":"||pe==="."||pe===qn||!pe?!1:pe===nn?(k.peek(),G()):te(k,!1)},me=G();return k.resetPeek(),me}function fe(k){y(k);const _=k.currentPeek()==="|";return k.resetPeek(),_}function te(k,_=!0){const M=(me=!1,pe="")=>{const Q=k.currentPeek();return Q==="{"||Q==="@"||!Q?me:Q==="|"?!(pe===qn||pe===nn):Q===qn?(k.peek(),M(!0,qn)):Q===nn?(k.peek(),M(!0,nn)):!0},G=M();return _&&k.resetPeek(),G}function I(k,_){const M=k.currentChar();return M===uo?uo:_(M)?(k.next(),M):null}function R(k){const _=k.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function H(k){return I(k,R)}function U(k){const _=k.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function ne(k){return I(k,U)}function oe(k){const _=k.charCodeAt(0);return _>=48&&_<=57}function D(k){return I(k,oe)}function N(k){const _=k.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function le(k){return I(k,N)}function we(k){let _="",M="";for(;_=D(k);)M+=_;return M}function ae(k){let _="";for(;;){const M=k.currentChar();if(M==="{"||M==="}"||M==="@"||M==="|"||!M)break;if(M===qn||M===nn)if(te(k))_+=M,k.next();else{if(fe(k))break;_+=M,k.next()}else _+=M,k.next()}return _}function ie(k){x(k);let _="",M="";for(;_=ne(k);)M+=_;const G=k.currentChar();if(G&&G!=="}"&&G!==uo&&G!==qn&&G!==nn&&G!==" "){const me=O(k);return f(dt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,M+me),M+me}return k.currentChar()===uo&&f(dt.UNTERMINATED_CLOSING_BRACE,s(),0),M}function ve(k){x(k);let _="";return k.currentChar()==="-"?(k.next(),_+=`-${we(k)}`):_+=we(k),k.currentChar()===uo&&f(dt.UNTERMINATED_CLOSING_BRACE,s(),0),_}function Te(k){return k!==_d&&k!==nn}function he(k){x(k),v(k,"'");let _="",M="";for(;_=I(k,Te);)_==="\\"?M+=P(k):M+=_;const G=k.currentChar();return G===nn||G===uo?(f(dt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),G===nn&&(k.next(),v(k,"'")),M):(v(k,"'"),M)}function P(k){const _=k.currentChar();switch(_){case"\\":case"'":return k.next(),`\\${_}`;case"u":return Y(k,_,4);case"U":return Y(k,_,6);default:return f(dt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,_),""}}function Y(k,_,M){v(k,_);let G="";for(let me=0;me<M;me++){const pe=le(k);if(!pe){f(dt.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${_}${G}${k.currentChar()}`);break}G+=pe}return`\\${_}${G}`}function ee(k){return k!=="{"&&k!=="}"&&k!==qn&&k!==nn}function O(k){x(k);let _="",M="";for(;_=I(k,ee);)M+=_;return M}function K(k){let _="",M="";for(;_=H(k);)M+=_;return M}function E(k){const _=M=>{const G=k.currentChar();return G==="{"||G==="@"||G==="|"||G==="("||G===")"||!G||G===qn?M:(M+=G,k.next(),_(M))};return _("")}function L(k){x(k);const _=v(k,"|");return x(k),_}function F(k,_){let M=null;switch(k.currentChar()){case"{":return _.braceNest>=1&&f(dt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),k.next(),M=g(_,2,"{"),x(k),_.braceNest++,M;case"}":return _.braceNest>0&&_.currentType===2&&f(dt.EMPTY_PLACEHOLDER,s(),0),k.next(),M=g(_,3,"}"),_.braceNest--,_.braceNest>0&&x(k),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),M;case"@":return _.braceNest>0&&f(dt.UNTERMINATED_CLOSING_BRACE,s(),0),M=Z(k,_)||p(_),_.braceNest=0,M;default:{let me=!0,pe=!0,Q=!0;if(fe(k))return _.braceNest>0&&f(dt.UNTERMINATED_CLOSING_BRACE,s(),0),M=g(_,1,L(k)),_.braceNest=0,_.inLinked=!1,M;if(_.braceNest>0&&(_.currentType===4||_.currentType===5||_.currentType===6))return f(dt.UNTERMINATED_CLOSING_BRACE,s(),0),_.braceNest=0,ce(k,_);if(me=W(k,_))return M=g(_,4,ie(k)),x(k),M;if(pe=w(k,_))return M=g(_,5,ve(k)),x(k),M;if(Q=A(k,_))return M=g(_,6,he(k)),x(k),M;if(!me&&!pe&&!Q)return M=g(_,12,O(k)),f(dt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,M.value),x(k),M;break}}return M}function Z(k,_){const{currentType:M}=_;let G=null;const me=k.currentChar();switch((M===7||M===8||M===11||M===9)&&(me===nn||me===qn)&&f(dt.INVALID_LINKED_FORMAT,s(),0),me){case"@":return k.next(),G=g(_,7,"@"),_.inLinked=!0,G;case".":return x(k),k.next(),g(_,8,".");case":":return x(k),k.next(),g(_,9,":");default:return fe(k)?(G=g(_,1,L(k)),_.braceNest=0,_.inLinked=!1,G):V(k,_)||j(k,_)?(x(k),Z(k,_)):z(k,_)?(x(k),g(_,11,K(k))):q(k,_)?(x(k),me==="{"?F(k,_)||G:g(_,10,E(k))):(M===7&&f(dt.INVALID_LINKED_FORMAT,s(),0),_.braceNest=0,_.inLinked=!1,ce(k,_))}}function ce(k,_){let M={type:13};if(_.braceNest>0)return F(k,_)||p(_);if(_.inLinked)return Z(k,_)||p(_);switch(k.currentChar()){case"{":return F(k,_)||p(_);case"}":return f(dt.UNBALANCED_CLOSING_BRACE,s(),0),k.next(),g(_,3,"}");case"@":return Z(k,_)||p(_);default:{if(fe(k))return M=g(_,1,L(k)),_.braceNest=0,_.inLinked=!1,M;if(te(k))return g(_,0,ae(k));break}}return M}function ge(){const{currentType:k,offset:_,startLoc:M,endLoc:G}=u;return u.lastType=k,u.lastOffset=_,u.lastStartLoc=M,u.lastEndLoc=G,u.offset=a(),u.startLoc=s(),n.currentChar()===uo?g(u,13):ce(n,u)}return{nextToken:ge,currentOffset:a,currentPosition:s,context:d}}const H1="parser",j1=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function W1(e,t,o){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||o,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function V1(e={}){const t=e.location!==!1,{onError:o}=e;function n(S,$,W,w,...A){const V=S.currentPosition();if(V.offset+=w,V.column+=w,o){const z=t?jl(W,V):null,j=cr($,z,{domain:H1,args:A});o(j)}}function a(S,$,W){const w={type:S};return t&&(w.start=$,w.end=$,w.loc={start:W,end:W}),w}function s(S,$,W,w){t&&(S.end=$,S.loc&&(S.loc.end=W))}function r(S,$){const W=S.context(),w=a(3,W.offset,W.startLoc);return w.value=$,s(w,S.currentOffset(),S.currentPosition()),w}function l(S,$){const W=S.context(),{lastOffset:w,lastStartLoc:A}=W,V=a(5,w,A);return V.index=parseInt($,10),S.nextToken(),s(V,S.currentOffset(),S.currentPosition()),V}function u(S,$){const W=S.context(),{lastOffset:w,lastStartLoc:A}=W,V=a(4,w,A);return V.key=$,S.nextToken(),s(V,S.currentOffset(),S.currentPosition()),V}function d(S,$){const W=S.context(),{lastOffset:w,lastStartLoc:A}=W,V=a(9,w,A);return V.value=$.replace(j1,W1),S.nextToken(),s(V,S.currentOffset(),S.currentPosition()),V}function c(S){const $=S.nextToken(),W=S.context(),{lastOffset:w,lastStartLoc:A}=W,V=a(8,w,A);return $.type!==11?(n(S,dt.UNEXPECTED_EMPTY_LINKED_MODIFIER,W.lastStartLoc,0),V.value="",s(V,w,A),{nextConsumeToken:$,node:V}):($.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,W.lastStartLoc,0,Gn($)),V.value=$.value||"",s(V,S.currentOffset(),S.currentPosition()),{node:V})}function f(S,$){const W=S.context(),w=a(7,W.offset,W.startLoc);return w.value=$,s(w,S.currentOffset(),S.currentPosition()),w}function g(S){const $=S.context(),W=a(6,$.offset,$.startLoc);let w=S.nextToken();if(w.type===8){const A=c(S);W.modifier=A.node,w=A.nextConsumeToken||S.nextToken()}switch(w.type!==9&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(w)),w=S.nextToken(),w.type===2&&(w=S.nextToken()),w.type){case 10:w.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(w)),W.key=f(S,w.value||"");break;case 4:w.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(w)),W.key=u(S,w.value||"");break;case 5:w.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(w)),W.key=l(S,w.value||"");break;case 6:w.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(w)),W.key=d(S,w.value||"");break;default:{n(S,dt.UNEXPECTED_EMPTY_LINKED_KEY,$.lastStartLoc,0);const A=S.context(),V=a(7,A.offset,A.startLoc);return V.value="",s(V,A.offset,A.startLoc),W.key=V,s(W,A.offset,A.startLoc),{nextConsumeToken:w,node:W}}}return s(W,S.currentOffset(),S.currentPosition()),{node:W}}function p(S){const $=S.context(),W=$.currentType===1?S.currentOffset():$.offset,w=$.currentType===1?$.endLoc:$.startLoc,A=a(2,W,w);A.items=[];let V=null;do{const q=V||S.nextToken();switch(V=null,q.type){case 0:q.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(q)),A.items.push(r(S,q.value||""));break;case 5:q.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(q)),A.items.push(l(S,q.value||""));break;case 4:q.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(q)),A.items.push(u(S,q.value||""));break;case 6:q.value==null&&n(S,dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Gn(q)),A.items.push(d(S,q.value||""));break;case 7:{const fe=g(S);A.items.push(fe.node),V=fe.nextConsumeToken||null;break}}}while($.currentType!==13&&$.currentType!==1);const z=$.currentType===1?$.lastOffset:S.currentOffset(),j=$.currentType===1?$.lastEndLoc:S.currentPosition();return s(A,z,j),A}function v(S,$,W,w){const A=S.context();let V=w.items.length===0;const z=a(1,$,W);z.cases=[],z.cases.push(w);do{const j=p(S);V||(V=j.items.length===0),z.cases.push(j)}while(A.currentType!==13);return V&&n(S,dt.MUST_HAVE_MESSAGES_IN_PLURAL,W,0),s(z,S.currentOffset(),S.currentPosition()),z}function y(S){const $=S.context(),{offset:W,startLoc:w}=$,A=p(S);return $.currentType===13?A:v(S,W,w,A)}function x(S){const $=B1(S,Wt({},e)),W=$.context(),w=a(0,W.offset,W.startLoc);return t&&w.loc&&(w.loc.source=S),w.body=y($),e.onCacheKey&&(w.cacheKey=e.onCacheKey(S)),W.currentType!==13&&n($,dt.UNEXPECTED_LEXICAL_ANALYSIS,W.lastStartLoc,0,S[W.offset]||""),s(w,$.currentOffset(),$.currentPosition()),w}return{parse:x}}function Gn(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function z1(e,t={}){const o={ast:e,helpers:new Set};return{context:()=>o,helper:s=>(o.helpers.add(s),s)}}function yd(e,t){for(let o=0;o<e.length;o++)Wl(e[o],t)}function Wl(e,t){switch(e.type){case 1:yd(e.cases,t),t.helper("plural");break;case 2:yd(e.items,t);break;case 6:{Wl(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function q1(e,t={}){const o=z1(e);o.helper("normalize"),e.body&&Wl(e.body,o);const n=o.context();e.helpers=Array.from(n.helpers)}function G1(e){const t=e.body;return t.type===2?bd(t):t.cases.forEach(o=>bd(o)),e}function bd(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let o=0;o<e.items.length;o++){const n=e.items[o];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=Hl(t);for(let o=0;o<e.items.length;o++){const n=e.items[o];(n.type===3||n.type===9)&&delete n.value}}}}function pa(e){switch(e.t=e.type,e.type){case 0:{const t=e;pa(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,o=t.cases;for(let n=0;n<o.length;n++)pa(o[n]);t.c=o,delete t.cases;break}case 2:{const t=e,o=t.items;for(let n=0;n<o.length;n++)pa(o[n]);t.i=o,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;pa(t.key),t.k=t.key,delete t.key,t.modifier&&(pa(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function Q1(e,t){const{filename:o,breakLineCode:n,needIndent:a}=t,s=t.location!==!1,r={filename:o,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:a,indentLevel:0};s&&e.loc&&(r.source=e.loc.source);const l=()=>r;function u(y,x){r.code+=y}function d(y,x=!0){const S=x?n:"";u(a?S+" ".repeat(y):S)}function c(y=!0){const x=++r.indentLevel;y&&d(x)}function f(y=!0){const x=--r.indentLevel;y&&d(x)}function g(){d(r.indentLevel)}return{context:l,push:u,indent:c,deindent:f,newline:g,helper:y=>`_${y}`,needIndent:()=>r.needIndent}}function Y1(e,t){const{helper:o}=e;e.push(`${o("linked")}(`),ga(e,t.key),t.modifier?(e.push(", "),ga(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function K1(e,t){const{helper:o,needIndent:n}=e;e.push(`${o("normalize")}([`),e.indent(n());const a=t.items.length;for(let s=0;s<a&&(ga(e,t.items[s]),s!==a-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function J1(e,t){const{helper:o,needIndent:n}=e;if(t.cases.length>1){e.push(`${o("plural")}([`),e.indent(n());const a=t.cases.length;for(let s=0;s<a&&(ga(e,t.cases[s]),s!==a-1);s++)e.push(", ");e.deindent(n()),e.push("])")}}function X1(e,t){t.body?ga(e,t.body):e.push("null")}function ga(e,t){const{helper:o}=e;switch(t.type){case 0:X1(e,t);break;case 1:J1(e,t);break;case 2:K1(e,t);break;case 6:Y1(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${o("interpolate")}(${o("list")}(${t.index}))`,t);break;case 4:e.push(`${o("interpolate")}(${o("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const Z1=(e,t={})=>{const o=Re(t.mode)?t.mode:"normal",n=Re(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:o==="arrow"?";":`
`,s=t.needIndent?t.needIndent:o!=="arrow",r=e.helpers||[],l=Q1(e,{filename:n,breakLineCode:a,needIndent:s});l.push(o==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),r.length>0&&(l.push(`const { ${Hl(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),ga(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:u,map:d}=l.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function ev(e,t={}){const o=Wt({},t),n=!!o.jit,a=!!o.minify,s=o.optimize==null?!0:o.optimize,l=V1(o).parse(e);return n?(s&&G1(l),a&&pa(l),{ast:l,code:""}):(q1(l,o),Z1(l,o))}/*!
* core-base v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function tv(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(qo().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(qo().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Qn(e){return ut(e)&&Vl(e)===0&&(Rn(e,"b")||Rn(e,"body"))}const wd=["b","body"];function nv(e){return $o(e,wd)}const xd=["c","cases"];function ov(e){return $o(e,xd,[])}const Td=["s","static"];function av(e){return $o(e,Td)}const Sd=["i","items"];function sv(e){return $o(e,Sd,[])}const kd=["t","type"];function Vl(e){return $o(e,kd)}const Cd=["v","value"];function dr(e,t){const o=$o(e,Cd);if(o!=null)return o;throw ns(t)}const Ed=["m","modifier"];function rv(e){return $o(e,Ed)}const Ld=["k","key"];function lv(e){const t=$o(e,Ld);if(t)return t;throw ns(6)}function $o(e,t,o){for(let n=0;n<t.length;n++){const a=t[n];if(Rn(e,a)&&e[a]!=null)return e[a]}return o}const $d=[...wd,...xd,...Td,...Sd,...Ld,...Ed,...Cd,...kd];function ns(e){return new Error(`unhandled node type: ${e}`)}function zl(e){return o=>iv(o,e)}function iv(e,t){const o=nv(t);if(o==null)throw ns(0);if(Vl(o)===1){const s=ov(o);return e.plural(s.reduce((r,l)=>[...r,Ad(e,l)],[]))}else return Ad(e,o)}function Ad(e,t){const o=av(t);if(o!=null)return e.type==="text"?o:e.normalize([o]);{const n=sv(t).reduce((a,s)=>[...a,ql(e,s)],[]);return e.normalize(n)}}function ql(e,t){const o=Vl(t);switch(o){case 3:return dr(t,o);case 9:return dr(t,o);case 4:{const n=t;if(Rn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(Rn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw ns(o)}case 5:{const n=t;if(Rn(n,"i")&&Ft(n.i))return e.interpolate(e.list(n.i));if(Rn(n,"index")&&Ft(n.index))return e.interpolate(e.list(n.index));throw ns(o)}case 6:{const n=t,a=rv(n),s=lv(n);return e.linked(ql(e,s),a?ql(e,a):void 0,e.type)}case 7:return dr(t,o);case 8:return dr(t,o);default:throw new Error(`unhandled node on format message part: ${o}`)}}const uv=e=>e;let fr=mt();function cv(e,t={}){let o=!1;const n=t.onError||O1;return t.onError=a=>{o=!0,n(a)},{...ev(e,t),detectError:o}}function dv(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Re(e)){st(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||uv)(e),a=fr[n];if(a)return a;const{ast:s,detectError:r}=cv(e,{...t,location:!1,jit:!0}),l=zl(s);return r?l:fr[n]=l}else{const o=e.cacheKey;if(o){const n=fr[o];return n||(fr[o]=zl(e))}else return zl(e)}}let os=null;function fv(e){os=e}function pv(e,t,o){os&&os.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:o})}const gv=mv("function:translate");function mv(e){return t=>os&&os.emit(e,t)}const co={INVALID_ARGUMENT:M1,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},hv=24;function fo(e){return cr(e,null,void 0)}function Gl(e,t){return t.locale!=null?Id(t.locale):Id(e.locale)}let Ql;function Id(e){if(Re(e))return e;if(Et(e)){if(e.resolvedOnce&&Ql!=null)return Ql;if(e.constructor.name==="Function"){const t=e();if($1(t))throw fo(co.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ql=t}else throw fo(co.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw fo(co.NOT_SUPPORT_LOCALE_TYPE)}function vv(e,t,o){return[...new Set([o,...Ot(t)?t:ut(t)?Object.keys(t):Re(t)?[t]:[o]])]}function Md(e,t,o){const n=Re(o)?o:as,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let s=a.__localeChainCache.get(n);if(!s){s=[];let r=[o];for(;Ot(r);)r=Od(s,r,t);const l=Ot(t)||!Ze(t)?t:t.default?t.default:null;r=Re(l)?[l]:l,Ot(r)&&Od(s,r,!1),a.__localeChainCache.set(n,s)}return s}function Od(e,t,o){let n=!0;for(let a=0;a<t.length&&st(n);a++){const s=t[a];Re(s)&&(n=_v(e,t[a],o))}return n}function _v(e,t,o){let n;const a=t.split("-");do{const s=a.join("-");n=yv(e,s,o),a.splice(-1,1)}while(a.length&&n===!0);return n}function yv(e,t,o){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(Ot(o)||Ze(o))&&o[a]&&(n=o[a])}return n}const Ao=[];Ao[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ao[1]={w:[1],".":[2],"[":[4],o:[7]},Ao[2]={w:[2],i:[3,0],0:[3,0]},Ao[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ao[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ao[5]={"'":[4,0],o:8,l:[5,0]},Ao[6]={'"':[4,0],o:8,l:[6,0]};const bv=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function wv(e){return bv.test(e)}function xv(e){const t=e.charCodeAt(0),o=e.charCodeAt(e.length-1);return t===o&&(t===34||t===39)?e.slice(1,-1):e}function Tv(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Sv(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:wv(t)?xv(t):"*"+t}function kv(e){const t=[];let o=-1,n=0,a=0,s,r,l,u,d,c,f;const g=[];g[0]=()=>{r===void 0?r=l:r+=l},g[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},g[2]=()=>{g[0](),a++},g[3]=()=>{if(a>0)a--,n=4,g[0]();else{if(a=0,r===void 0||(r=Sv(r),r===!1))return!1;g[1]()}};function p(){const v=e[o+1];if(n===5&&v==="'"||n===6&&v==='"')return o++,l="\\"+v,g[0](),!0}for(;n!==null;)if(o++,s=e[o],!(s==="\\"&&p())){if(u=Tv(s),f=Ao[n],d=f[u]||f.l||8,d===8||(n=d[0],d[1]!==void 0&&(c=g[d[1]],c&&(l=s,c()===!1))))return;if(n===7)return t}}const Rd=new Map;function Cv(e,t){return ut(e)?e[t]:null}function Ev(e,t){if(!ut(e))return null;let o=Rd.get(t);if(o||(o=kv(t),o&&Rd.set(t,o)),!o)return null;const n=o.length;let a=e,s=0;for(;s<n;){const r=o[s];if($d.includes(r)&&Qn(a))return null;const l=a[r];if(l===void 0||Et(a))return null;a=l,s++}return a}const Lv="11.1.12",pr=-1,as="en-US",Nd="",Dd=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function $v(){return{upper:(e,t)=>t==="text"&&Re(e)?e.toUpperCase():t==="vnode"&&ut(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Re(e)?e.toLowerCase():t==="vnode"&&ut(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Re(e)?Dd(e):t==="vnode"&&ut(e)&&"__v_isVNode"in e?Dd(e.children):e}}let Pd;function Av(e){Pd=e}let Fd;function Iv(e){Fd=e}let Ud;function Mv(e){Ud=e}let Bd=null;const Ov=e=>{Bd=e},Rv=()=>Bd;let Hd=null;const jd=e=>{Hd=e},Nv=()=>Hd;let Wd=0;function Dv(e={}){const t=Et(e.onWarn)?e.onWarn:x1,o=Re(e.version)?e.version:Lv,n=Re(e.locale)||Et(e.locale)?e.locale:as,a=Et(n)?as:n,s=Ot(e.fallbackLocale)||Ze(e.fallbackLocale)||Re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,r=Ze(e.messages)?e.messages:Yl(a),l=Ze(e.datetimeFormats)?e.datetimeFormats:Yl(a),u=Ze(e.numberFormats)?e.numberFormats:Yl(a),d=Wt(mt(),e.modifiers,$v()),c=e.pluralRules||mt(),f=Et(e.missing)?e.missing:null,g=st(e.missingWarn)||fa(e.missingWarn)?e.missingWarn:!0,p=st(e.fallbackWarn)||fa(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,y=!!e.unresolving,x=Et(e.postTranslation)?e.postTranslation:null,S=Ze(e.processor)?e.processor:null,$=st(e.warnHtmlMessage)?e.warnHtmlMessage:!0,W=!!e.escapeParameter,w=Et(e.messageCompiler)?e.messageCompiler:Pd,A=Et(e.messageResolver)?e.messageResolver:Fd||Cv,V=Et(e.localeFallbacker)?e.localeFallbacker:Ud||vv,z=ut(e.fallbackContext)?e.fallbackContext:void 0,j=e,q=ut(j.__datetimeFormatters)?j.__datetimeFormatters:new Map,fe=ut(j.__numberFormatters)?j.__numberFormatters:new Map,te=ut(j.__meta)?j.__meta:{};Wd++;const I={version:o,cid:Wd,locale:n,fallbackLocale:s,messages:r,modifiers:d,pluralRules:c,missing:f,missingWarn:g,fallbackWarn:p,fallbackFormat:v,unresolving:y,postTranslation:x,processor:S,warnHtmlMessage:$,escapeParameter:W,messageCompiler:w,messageResolver:A,localeFallbacker:V,fallbackContext:z,onWarn:t,__meta:te};return I.datetimeFormats=l,I.numberFormats=u,I.__datetimeFormatters=q,I.__numberFormatters=fe,__INTLIFY_PROD_DEVTOOLS__&&pv(I,o,te),I}const Yl=e=>({[e]:mt()});function Kl(e,t,o,n,a){const{missing:s,onWarn:r}=e;if(s!==null){const l=s(e,o,t,a);return Re(l)?l:t}else return t}function ss(e,t,o){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,o,t)}function Pv(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Fv(e,t){const o=t.indexOf(e);if(o===-1)return!1;for(let n=o+1;n<t.length;n++)if(Pv(e,t[n]))return!0;return!1}function Vd(e,...t){const{datetimeFormats:o,unresolving:n,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__datetimeFormatters:l}=e,[u,d,c,f]=Jl(...t),g=st(c.missingWarn)?c.missingWarn:e.missingWarn;st(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=Gl(e,c),y=r(e,a,v);if(!Re(u)||u==="")return new Intl.DateTimeFormat(v,f).format(d);let x={},S,$=null;const W="datetime format";for(let V=0;V<y.length&&(S=y[V],x=o[S]||{},$=x[u],!Ze($));V++)Kl(e,u,S,g,W);if(!Ze($)||!Re(S))return n?pr:u;let w=`${S}__${u}`;lr(f)||(w=`${w}__${JSON.stringify(f)}`);let A=l.get(w);return A||(A=new Intl.DateTimeFormat(S,Wt({},$,f)),l.set(w,A)),p?A.formatToParts(d):A.format(d)}const zd=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Jl(...e){const[t,o,n,a]=e,s=mt();let r=mt(),l;if(Re(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw fo(co.INVALID_ISO_DATE_ARGUMENT);const d=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();l=new Date(d);try{l.toISOString()}catch{throw fo(co.INVALID_ISO_DATE_ARGUMENT)}}else if(k1(t)){if(isNaN(t.getTime()))throw fo(co.INVALID_DATE_ARGUMENT);l=t}else if(Ft(t))l=t;else throw fo(co.INVALID_ARGUMENT);return Re(o)?s.key=o:Ze(o)&&Object.keys(o).forEach(u=>{zd.includes(u)?r[u]=o[u]:s[u]=o[u]}),Re(n)?s.locale=n:Ze(n)&&(r=n),Ze(a)&&(r=a),[s.key||"",l,s,r]}function qd(e,t,o){const n=e;for(const a in o){const s=`${t}__${a}`;n.__datetimeFormatters.has(s)&&n.__datetimeFormatters.delete(s)}}function Gd(e,...t){const{numberFormats:o,unresolving:n,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__numberFormatters:l}=e,[u,d,c,f]=Xl(...t),g=st(c.missingWarn)?c.missingWarn:e.missingWarn;st(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=Gl(e,c),y=r(e,a,v);if(!Re(u)||u==="")return new Intl.NumberFormat(v,f).format(d);let x={},S,$=null;const W="number format";for(let V=0;V<y.length&&(S=y[V],x=o[S]||{},$=x[u],!Ze($));V++)Kl(e,u,S,g,W);if(!Ze($)||!Re(S))return n?pr:u;let w=`${S}__${u}`;lr(f)||(w=`${w}__${JSON.stringify(f)}`);let A=l.get(w);return A||(A=new Intl.NumberFormat(S,Wt({},$,f)),l.set(w,A)),p?A.formatToParts(d):A.format(d)}const Qd=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Xl(...e){const[t,o,n,a]=e,s=mt();let r=mt();if(!Ft(t))throw fo(co.INVALID_ARGUMENT);const l=t;return Re(o)?s.key=o:Ze(o)&&Object.keys(o).forEach(u=>{Qd.includes(u)?r[u]=o[u]:s[u]=o[u]}),Re(n)?s.locale=n:Ze(n)&&(r=n),Ze(a)&&(r=a),[s.key||"",l,s,r]}function Yd(e,t,o){const n=e;for(const a in o){const s=`${t}__${a}`;n.__numberFormatters.has(s)&&n.__numberFormatters.delete(s)}}const Uv=e=>e,Bv=e=>"",Hv="text",jv=e=>e.length===0?"":Hl(e),Wv=A1;function Kd(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Vv(e){const t=Ft(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Ft(e.named.count)||Ft(e.named.n))?Ft(e.named.count)?e.named.count:Ft(e.named.n)?e.named.n:t:t}function zv(e,t){t.count||(t.count=e),t.n||(t.n=e)}function qv(e={}){const t=e.locale,o=Vv(e),n=ut(e.pluralRules)&&Re(t)&&Et(e.pluralRules[t])?e.pluralRules[t]:Kd,a=ut(e.pluralRules)&&Re(t)&&Et(e.pluralRules[t])?Kd:void 0,s=S=>S[n(o,S.length,a)],r=e.list||[],l=S=>r[S],u=e.named||mt();Ft(e.pluralIndex)&&zv(o,u);const d=S=>u[S];function c(S,$){const W=Et(e.messages)?e.messages(S,!!$):ut(e.messages)?e.messages[S]:!1;return W||(e.parent?e.parent.message(S):Bv)}const f=S=>e.modifiers?e.modifiers[S]:Uv,g=Ze(e.processor)&&Et(e.processor.normalize)?e.processor.normalize:jv,p=Ze(e.processor)&&Et(e.processor.interpolate)?e.processor.interpolate:Wv,v=Ze(e.processor)&&Re(e.processor.type)?e.processor.type:Hv,x={list:l,named:d,plural:s,linked:(S,...$)=>{const[W,w]=$;let A="text",V="";$.length===1?ut(W)?(V=W.modifier||V,A=W.type||A):Re(W)&&(V=W||V):$.length===2&&(Re(W)&&(V=W||V),Re(w)&&(A=w||A));const z=c(S,!0)(x),j=A==="vnode"&&Ot(z)&&V?z[0]:z;return V?f(V)(j,A):j},message:c,type:v,interpolate:p,normalize:g,values:Wt(mt(),r,u)};return x}const Jd=()=>"",Ln=e=>Et(e);function Xd(e,...t){const{fallbackFormat:o,postTranslation:n,unresolving:a,messageCompiler:s,fallbackLocale:r,messages:l}=e,[u,d]=Zl(...t),c=st(d.missingWarn)?d.missingWarn:e.missingWarn,f=st(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,g=st(d.escapeParameter)?d.escapeParameter:e.escapeParameter,p=!!d.resolvedMessage,v=Re(d.default)||st(d.default)?st(d.default)?s?u:()=>u:d.default:o?s?u:()=>u:null,y=o||v!=null&&(Re(v)||Et(v)),x=Gl(e,d);g&&Gv(d);let[S,$,W]=p?[u,x,l[x]||mt()]:Zd(e,u,x,r,f,c),w=S,A=u;if(!p&&!(Re(w)||Qn(w)||Ln(w))&&y&&(w=v,A=w),!p&&(!(Re(w)||Qn(w)||Ln(w))||!Re($)))return a?pr:u;let V=!1;const z=()=>{V=!0},j=Ln(w)?w:ef(e,u,$,w,A,z);if(V)return w;const q=Kv(e,$,W,d),fe=qv(q),te=Qv(e,j,fe);let I=n?n(te,u):te;if(g&&Re(I)&&(I=E1(I)),__INTLIFY_PROD_DEVTOOLS__){const R={timestamp:Date.now(),key:Re(u)?u:Ln(w)?w.key:"",locale:$||(Ln(w)?w.locale:""),format:Re(w)?w:Ln(w)?w.source:"",message:I};R.meta=Wt({},e.__meta,Rv()||{}),gv(R)}return I}function Gv(e){Ot(e.list)?e.list=e.list.map(t=>Re(t)?md(t):t):ut(e.named)&&Object.keys(e.named).forEach(t=>{Re(e.named[t])&&(e.named[t]=md(e.named[t]))})}function Zd(e,t,o,n,a,s){const{messages:r,onWarn:l,messageResolver:u,localeFallbacker:d}=e,c=d(e,n,o);let f=mt(),g,p=null;const v="translate";for(let y=0;y<c.length&&(g=c[y],f=r[g]||mt(),(p=u(f,t))===null&&(p=f[t]),!(Re(p)||Qn(p)||Ln(p)));y++)if(!Fv(g,c)){const x=Kl(e,t,g,s,v);x!==t&&(p=x)}return[p,g,f]}function ef(e,t,o,n,a,s){const{messageCompiler:r,warnHtmlMessage:l}=e;if(Ln(n)){const d=n;return d.locale=d.locale||o,d.key=d.key||t,d}if(r==null){const d=(()=>n);return d.locale=o,d.key=t,d}const u=r(n,Yv(e,o,a,n,l,s));return u.locale=o,u.key=t,u.source=n,u}function Qv(e,t,o){return t(o)}function Zl(...e){const[t,o,n]=e,a=mt();if(!Re(t)&&!Ft(t)&&!Ln(t)&&!Qn(t))throw fo(co.INVALID_ARGUMENT);const s=Ft(t)?String(t):(Ln(t),t);return Ft(o)?a.plural=o:Re(o)?a.default=o:Ze(o)&&!lr(o)?a.named=o:Ot(o)&&(a.list=o),Ft(n)?a.plural=n:Re(n)?a.default=n:Ze(n)&&Wt(a,n),[s,a]}function Yv(e,t,o,n,a,s){return{locale:t,key:o,warnHtmlMessage:a,onError:r=>{throw s&&s(r),r},onCacheKey:r=>T1(t,o,r)}}function Kv(e,t,o,n){const{modifiers:a,pluralRules:s,messageResolver:r,fallbackLocale:l,fallbackWarn:u,missingWarn:d,fallbackContext:c}=e,g={locale:t,modifiers:a,pluralRules:s,messages:(p,v)=>{let y=r(o,p);if(y==null&&(c||v)){const[,,x]=Zd(c||e,p,t,l,u,d);y=r(x,p)}if(Re(y)||Qn(y)){let x=!1;const $=ef(e,p,t,y,p,()=>{x=!0});return x?Jd:$}else return Ln(y)?y:Jd}};return e.processor&&(g.processor=e.processor),n.list&&(g.list=n.list),n.named&&(g.named=n.named),Ft(n.plural)&&(g.pluralIndex=n.plural),g}tv();/*!
* vue-i18n v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const Jv="11.1.12";function Xv(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(qo().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(qo().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(qo().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(qo().__INTLIFY_PROD_DEVTOOLS__=!1)}const gn={UNEXPECTED_RETURN_TYPE:hv,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function wn(e,...t){return cr(e,null,void 0)}const ei=Lo("__translateVNode"),ti=Lo("__datetimeParts"),ni=Lo("__numberParts"),tf=Lo("__setPluralRules"),nf=Lo("__injectWithOption"),oi=Lo("__dispose");function rs(e){if(!ut(e)||Qn(e))return e;for(const t in e)if(Rn(e,t))if(!t.includes("."))ut(e[t])&&rs(e[t]);else{const o=t.split("."),n=o.length-1;let a=e,s=!1;for(let r=0;r<n;r++){if(o[r]==="__proto__")throw new Error(`unsafe key: ${o[r]}`);if(o[r]in a||(a[o[r]]=mt()),!ut(a[o[r]])){s=!0;break}a=a[o[r]]}if(s||(Qn(a)?$d.includes(o[n])||delete e[t]:(a[o[n]]=e[t],delete e[t])),!Qn(a)){const r=a[o[n]];ut(r)&&rs(r)}}return e}function ai(e,t){const{messages:o,__i18n:n,messageResolver:a,flatJson:s}=t,r=Ze(o)?o:Ot(n)?mt():{[e]:mt()};if(Ot(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:d}=l;u?(r[u]=r[u]||mt(),ur(d,r[u])):ur(d,r)}else Re(l)&&ur(JSON.parse(l),r)}),a==null&&s)for(const l in r)Rn(r,l)&&rs(r[l]);return r}function of(e){return e.type}function af(e,t,o){let n=ut(t.messages)?t.messages:mt();"__i18nGlobal"in o&&(n=ai(e.locale.value,{messages:n,__i18n:o.__i18nGlobal}));const a=Object.keys(n);a.length&&a.forEach(s=>{e.mergeLocaleMessage(s,n[s])});{if(ut(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(ut(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function sf(e){return Ve(Ga,null,e,0)}const rf="__INTLIFY_META__",lf=()=>[],Zv=()=>!1;let uf=0;function cf(e){return((t,o,n,a)=>e(o,n,ko()||void 0,a))}const e0=()=>{const e=ko();let t=null;return e&&(t=of(e)[rf])?{[rf]:t}:null};function si(e={}){const{__root:t,__injectWithOption:o}=e,n=t===void 0,a=e.flatJson,s=rr?b:bm;let r=st(e.inheritLocale)?e.inheritLocale:!0;const l=s(t&&r?t.locale.value:Re(e.locale)?e.locale:as),u=s(t&&r?t.fallbackLocale.value:Re(e.fallbackLocale)||Ot(e.fallbackLocale)||Ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=s(ai(l.value,e)),c=s(Ze(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),f=s(Ze(e.numberFormats)?e.numberFormats:{[l.value]:{}});let g=t?t.missingWarn:st(e.missingWarn)||fa(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:st(e.fallbackWarn)||fa(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:st(e.fallbackRoot)?e.fallbackRoot:!0,y=!!e.fallbackFormat,x=Et(e.missing)?e.missing:null,S=Et(e.missing)?cf(e.missing):null,$=Et(e.postTranslation)?e.postTranslation:null,W=t?t.warnHtmlMessage:st(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const A=t?t.modifiers:Ze(e.modifiers)?e.modifiers:{};let V=e.pluralRules||t&&t.pluralRules,z;z=(()=>{n&&jd(null);const Q={version:Jv,locale:l.value,fallbackLocale:u.value,messages:d.value,modifiers:A,pluralRules:V,missing:S===null?void 0:S,missingWarn:g,fallbackWarn:p,fallbackFormat:y,unresolving:!0,postTranslation:$===null?void 0:$,warnHtmlMessage:W,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Q.datetimeFormats=c.value,Q.numberFormats=f.value,Q.__datetimeFormatters=Ze(z)?z.__datetimeFormatters:void 0,Q.__numberFormatters=Ze(z)?z.__numberFormatters:void 0;const se=Dv(Q);return n&&jd(se),se})(),ss(z,l.value,u.value);function q(){return[l.value,u.value,d.value,c.value,f.value]}const fe=et({get:()=>l.value,set:Q=>{z.locale=Q,l.value=Q}}),te=et({get:()=>u.value,set:Q=>{z.fallbackLocale=Q,u.value=Q,ss(z,l.value,Q)}}),I=et(()=>d.value),R=et(()=>c.value),H=et(()=>f.value);function U(){return Et($)?$:null}function ne(Q){$=Q,z.postTranslation=Q}function oe(){return x}function D(Q){Q!==null&&(S=cf(Q)),x=Q,z.missing=S}const N=(Q,se,Me,Ne,je,Je)=>{q();let tt;try{__INTLIFY_PROD_DEVTOOLS__,n||(z.fallbackContext=t?Nv():void 0),tt=Q(z)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(z.fallbackContext=void 0)}if(Me!=="translate exists"&&Ft(tt)&&tt===pr||Me==="translate exists"&&!tt){const[Ie,ke]=se();return t&&v?Ne(t):je(Ie)}else{if(Je(tt))return tt;throw wn(gn.UNEXPECTED_RETURN_TYPE)}};function le(...Q){return N(se=>Reflect.apply(Xd,null,[se,...Q]),()=>Zl(...Q),"translate",se=>Reflect.apply(se.t,se,[...Q]),se=>se,se=>Re(se))}function we(...Q){const[se,Me,Ne]=Q;if(Ne&&!ut(Ne))throw wn(gn.INVALID_ARGUMENT);return le(se,Me,Wt({resolvedMessage:!0},Ne||{}))}function ae(...Q){return N(se=>Reflect.apply(Vd,null,[se,...Q]),()=>Jl(...Q),"datetime format",se=>Reflect.apply(se.d,se,[...Q]),()=>Nd,se=>Re(se)||Ot(se))}function ie(...Q){return N(se=>Reflect.apply(Gd,null,[se,...Q]),()=>Xl(...Q),"number format",se=>Reflect.apply(se.n,se,[...Q]),()=>Nd,se=>Re(se)||Ot(se))}function ve(Q){return Q.map(se=>Re(se)||Ft(se)||st(se)?sf(String(se)):se)}const he={normalize:ve,interpolate:Q=>Q,type:"vnode"};function P(...Q){return N(se=>{let Me;const Ne=se;try{Ne.processor=he,Me=Reflect.apply(Xd,null,[Ne,...Q])}finally{Ne.processor=null}return Me},()=>Zl(...Q),"translate",se=>se[ei](...Q),se=>[sf(se)],se=>Ot(se))}function Y(...Q){return N(se=>Reflect.apply(Gd,null,[se,...Q]),()=>Xl(...Q),"number format",se=>se[ni](...Q),lf,se=>Re(se)||Ot(se))}function ee(...Q){return N(se=>Reflect.apply(Vd,null,[se,...Q]),()=>Jl(...Q),"datetime format",se=>se[ti](...Q),lf,se=>Re(se)||Ot(se))}function O(Q){V=Q,z.pluralRules=V}function K(Q,se){return N(()=>{if(!Q)return!1;const Me=Re(se)?se:l.value,Ne=F(Me),je=z.messageResolver(Ne,Q);return Qn(je)||Ln(je)||Re(je)},()=>[Q],"translate exists",Me=>Reflect.apply(Me.te,Me,[Q,se]),Zv,Me=>st(Me))}function E(Q){let se=null;const Me=Md(z,u.value,l.value);for(let Ne=0;Ne<Me.length;Ne++){const je=d.value[Me[Ne]]||{},Je=z.messageResolver(je,Q);if(Je!=null){se=Je;break}}return se}function L(Q){const se=E(Q);return se??(t?t.tm(Q)||{}:{})}function F(Q){return d.value[Q]||{}}function Z(Q,se){if(a){const Me={[Q]:se};for(const Ne in Me)Rn(Me,Ne)&&rs(Me[Ne]);se=Me[Q]}d.value[Q]=se,z.messages=d.value}function ce(Q,se){d.value[Q]=d.value[Q]||{};const Me={[Q]:se};if(a)for(const Ne in Me)Rn(Me,Ne)&&rs(Me[Ne]);se=Me[Q],ur(se,d.value[Q]),z.messages=d.value}function ge(Q){return c.value[Q]||{}}function k(Q,se){c.value[Q]=se,z.datetimeFormats=c.value,qd(z,Q,se)}function _(Q,se){c.value[Q]=Wt(c.value[Q]||{},se),z.datetimeFormats=c.value,qd(z,Q,se)}function M(Q){return f.value[Q]||{}}function G(Q,se){f.value[Q]=se,z.numberFormats=f.value,Yd(z,Q,se)}function me(Q,se){f.value[Q]=Wt(f.value[Q]||{},se),z.numberFormats=f.value,Yd(z,Q,se)}uf++,t&&rr&&(it(t.locale,Q=>{r&&(l.value=Q,z.locale=Q,ss(z,l.value,u.value))}),it(t.fallbackLocale,Q=>{r&&(u.value=Q,z.fallbackLocale=Q,ss(z,l.value,u.value))}));const pe={id:uf,locale:fe,fallbackLocale:te,get inheritLocale(){return r},set inheritLocale(Q){r=Q,Q&&t&&(l.value=t.locale.value,u.value=t.fallbackLocale.value,ss(z,l.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:I,get modifiers(){return A},get pluralRules(){return V||{}},get isGlobal(){return n},get missingWarn(){return g},set missingWarn(Q){g=Q,z.missingWarn=g},get fallbackWarn(){return p},set fallbackWarn(Q){p=Q,z.fallbackWarn=p},get fallbackRoot(){return v},set fallbackRoot(Q){v=Q},get fallbackFormat(){return y},set fallbackFormat(Q){y=Q,z.fallbackFormat=y},get warnHtmlMessage(){return W},set warnHtmlMessage(Q){W=Q,z.warnHtmlMessage=Q},get escapeParameter(){return w},set escapeParameter(Q){w=Q,z.escapeParameter=Q},t:le,getLocaleMessage:F,setLocaleMessage:Z,mergeLocaleMessage:ce,getPostTranslationHandler:U,setPostTranslationHandler:ne,getMissingHandler:oe,setMissingHandler:D,[tf]:O};return pe.datetimeFormats=R,pe.numberFormats=H,pe.rt=we,pe.te=K,pe.tm=L,pe.d=ae,pe.n=ie,pe.getDateTimeFormat=ge,pe.setDateTimeFormat=k,pe.mergeDateTimeFormat=_,pe.getNumberFormat=M,pe.setNumberFormat=G,pe.mergeNumberFormat=me,pe[nf]=o,pe[ei]=P,pe[ti]=ee,pe[ni]=Y,pe}function t0(e){const t=Re(e.locale)?e.locale:as,o=Re(e.fallbackLocale)||Ot(e.fallbackLocale)||Ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=Et(e.missing)?e.missing:void 0,a=st(e.silentTranslationWarn)||fa(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=st(e.silentFallbackWarn)||fa(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=st(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,u=Ze(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,c=Et(e.postTranslation)?e.postTranslation:void 0,f=Re(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,g=!!e.escapeParameterHtml,p=st(e.sync)?e.sync:!0;let v=e.messages;if(Ze(e.sharedMessages)){const A=e.sharedMessages;v=Object.keys(A).reduce((z,j)=>{const q=z[j]||(z[j]={});return Wt(q,A[j]),z},v||{})}const{__i18n:y,__root:x,__injectWithOption:S}=e,$=e.datetimeFormats,W=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:o,messages:v,flatJson:w,datetimeFormats:$,numberFormats:W,missing:n,missingWarn:a,fallbackWarn:s,fallbackRoot:r,fallbackFormat:l,modifiers:u,pluralRules:d,postTranslation:c,warnHtmlMessage:f,escapeParameter:g,messageResolver:e.messageResolver,inheritLocale:p,__i18n:y,__root:x,__injectWithOption:S}}function ri(e={}){const t=si(t0(e)),{__extender:o}=e,n={id:t.id,get locale(){return t.locale.value},set locale(a){t.locale.value=a},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(a){t.fallbackLocale.value=a},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(a){t.setMissingHandler(a)},get silentTranslationWarn(){return st(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=st(a)?!a:a},get silentFallbackWarn(){return st(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=st(a)?!a:a},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(a){t.fallbackFormat=a},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(a){t.setPostTranslationHandler(a)},get sync(){return t.inheritLocale},set sync(a){t.inheritLocale=a},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){t.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(a){t.escapeParameter=a},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...a){return Reflect.apply(t.t,t,[...a])},rt(...a){return Reflect.apply(t.rt,t,[...a])},te(a,s){return t.te(a,s)},tm(a){return t.tm(a)},getLocaleMessage(a){return t.getLocaleMessage(a)},setLocaleMessage(a,s){t.setLocaleMessage(a,s)},mergeLocaleMessage(a,s){t.mergeLocaleMessage(a,s)},d(...a){return Reflect.apply(t.d,t,[...a])},getDateTimeFormat(a){return t.getDateTimeFormat(a)},setDateTimeFormat(a,s){t.setDateTimeFormat(a,s)},mergeDateTimeFormat(a,s){t.mergeDateTimeFormat(a,s)},n(...a){return Reflect.apply(t.n,t,[...a])},getNumberFormat(a){return t.getNumberFormat(a)},setNumberFormat(a,s){t.setNumberFormat(a,s)},mergeNumberFormat(a,s){t.mergeNumberFormat(a,s)}};return n.__extender=o,n}function n0(e,t,o){return{beforeCreate(){const n=ko();if(!n)throw wn(gn.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const s=a.i18n;if(a.__i18n&&(s.__i18n=a.__i18n),s.__root=t,this===this.$root)this.$i18n=df(e,s);else{s.__injectWithOption=!0,s.__extender=o.__vueI18nExtend,this.$i18n=ri(s);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=df(e,a);else{this.$i18n=ri({__i18n:a.__i18n,__injectWithOption:!0,__extender:o.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&af(t,a,a),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,r)=>this.$i18n.te(s,r),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),o.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=ko();if(!n)throw wn(gn.UNEXPECTED_ERROR);const a=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),o.__deleteInstance(n),delete this.$i18n}}}function df(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[tf](t.pluralizationRules||e.pluralizationRules);const o=ai(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(o).forEach(n=>e.mergeLocaleMessage(n,o[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const li={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function o0({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,a)=>[...n,...a.type===Oe?a.children:[a]],[]):t.reduce((o,n)=>{const a=e[n];return a&&(o[n]=a()),o},mt())}function ff(){return Oe}const pf=pn({name:"i18n-t",props:Wt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ft(e)||!isNaN(e)}},li),setup(e,t){const{slots:o,attrs:n}=t,a=e.i18n||ht({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(o).filter(f=>f[0]!=="_"),r=mt();e.locale&&(r.locale=e.locale),e.plural!==void 0&&(r.plural=Re(e.plural)?+e.plural:e.plural);const l=o0(t,s),u=a[ei](e.keypath,l,r),d=Wt(mt(),n),c=Re(e.tag)||ut(e.tag)?e.tag:ff();return xt(c,d,u)}}});function a0(e){return Ot(e)&&!Re(e[0])}function gf(e,t,o,n){const{slots:a,attrs:s}=t;return()=>{const r={part:!0};let l=mt();e.locale&&(r.locale=e.locale),Re(e.format)?r.key=e.format:ut(e.format)&&(Re(e.format.key)&&(r.key=e.format.key),l=Object.keys(e.format).reduce((g,p)=>o.includes(p)?Wt(mt(),g,{[p]:e.format[p]}):g,mt()));const u=n(e.value,r,l);let d=[r.key];Ot(u)?d=u.map((g,p)=>{const v=a[g.type],y=v?v({[g.type]:g.value,index:p,parts:u}):[g.value];return a0(y)&&(y[0].key=`${g.type}-${p}`),y}):Re(u)&&(d=[u]);const c=Wt(mt(),s),f=Re(e.tag)||ut(e.tag)?e.tag:ff();return xt(f,c,d)}}const mf=pn({name:"i18n-n",props:Wt({value:{type:Number,required:!0},format:{type:[String,Object]}},li),setup(e,t){const o=e.i18n||ht({useScope:e.scope,__useComponent:!0});return gf(e,t,Qd,(...n)=>o[ni](...n))}});function s0(e,t){const o=e;if(e.mode==="composition")return o.__getInstance(t)||e.global;{const n=o.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function r0(e){const t=r=>{const{instance:l,value:u}=r;if(!l||!l.$)throw wn(gn.UNEXPECTED_ERROR);const d=s0(e,l.$),c=hf(u);return[Reflect.apply(d.t,d,[...vf(c)]),d]};return{created:(r,l)=>{const[u,d]=t(l);rr&&e.global===d&&(r.__i18nWatcher=it(d.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=d,r.textContent=u},unmounted:r=>{rr&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const u=r.__composer,d=hf(l);r.textContent=Reflect.apply(u.t,u,[...vf(d)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function hf(e){if(Re(e))return{path:e};if(Ze(e)){if(!("path"in e))throw wn(gn.REQUIRED_VALUE,"path");return e}else throw wn(gn.INVALID_VALUE)}function vf(e){const{path:t,locale:o,args:n,choice:a,plural:s}=e,r={},l=n||{};return Re(o)&&(r.locale=o),Ft(a)&&(r.plural=a),Ft(s)&&(r.plural=s),[t,l,r]}function l0(e,t,...o){const n=Ze(o[0])?o[0]:{};(st(n.globalInstall)?n.globalInstall:!0)&&([pf.name,"I18nT"].forEach(s=>e.component(s,pf)),[mf.name,"I18nN"].forEach(s=>e.component(s,mf)),[yf.name,"I18nD"].forEach(s=>e.component(s,yf))),e.directive("t",r0(t))}const i0=Lo("global-vue-i18n");function u0(e={}){const t=__VUE_I18N_LEGACY_API__&&st(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=st(e.globalInjection)?e.globalInjection:!0,n=new Map,[a,s]=c0(e,t),r=Lo("");function l(f){return n.get(f)||null}function u(f,g){n.set(f,g)}function d(f){n.delete(f)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(f,...g){if(f.__VUE_I18N_SYMBOL__=r,f.provide(f.__VUE_I18N_SYMBOL__,c),Ze(g[0])){const y=g[0];c.__composerExtend=y.__composerExtend,c.__vueI18nExtend=y.__vueI18nExtend}let p=null;!t&&o&&(p=_0(f,c.global)),__VUE_I18N_FULL_INSTALL__&&l0(f,c,...g),__VUE_I18N_LEGACY_API__&&t&&f.mixin(n0(s,s.__composer,c));const v=f.unmount;f.unmount=()=>{p&&p(),c.dispose(),v()}},get global(){return s},dispose(){a.stop()},__instances:n,__getInstance:l,__setInstance:u,__deleteInstance:d};return c}function ht(e={}){const t=ko();if(t==null)throw wn(gn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw wn(gn.NOT_INSTALLED);const o=d0(t),n=p0(o),a=of(t),s=f0(e,a);if(s==="global")return af(n,e,a),n;if(s==="parent"){let u=g0(o,t,e.__useComponent);return u==null&&(u=n),u}const r=o;let l=r.__getInstance(t);if(l==null){const u=Wt({},e);"__i18n"in a&&(u.__i18n=a.__i18n),n&&(u.__root=n),l=si(u),r.__composerExtend&&(l[oi]=r.__composerExtend(l)),h0(r,t,l),r.__setInstance(t,l)}return l}function c0(e,t){const o=sl(),n=__VUE_I18N_LEGACY_API__&&t?o.run(()=>ri(e)):o.run(()=>si(e));if(n==null)throw wn(gn.UNEXPECTED_ERROR);return[o,n]}function d0(e){const t=ao(e.isCE?i0:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw wn(e.isCE?gn.NOT_INSTALLED_WITH_PROVIDE:gn.UNEXPECTED_ERROR);return t}function f0(e,t){return lr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function p0(e){return e.mode==="composition"?e.global:e.global.__composer}function g0(e,t,o=!1){let n=null;const a=t.root;let s=m0(t,o);for(;s!=null;){const r=e;if(e.mode==="composition")n=r.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(s);l!=null&&(n=l.__composer,o&&n&&!n[nf]&&(n=null))}if(n!=null||a===s)break;s=s.parent}return n}function m0(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function h0(e,t,o){gt(()=>{},t),On(()=>{const n=o;e.__deleteInstance(t);const a=n[oi];a&&(a(),delete n[oi])},t)}const v0=["locale","fallbackLocale","availableLocales"],_f=["t","rt","d","n","tm","te"];function _0(e,t){const o=Object.create(null);return v0.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s)throw wn(gn.UNEXPECTED_ERROR);const r=At(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(o,a,r)}),e.config.globalProperties.$i18n=o,_f.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s||!s.value)throw wn(gn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,s)}),()=>{delete e.config.globalProperties.$i18n,_f.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const yf=pn({name:"i18n-d",props:Wt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},li),setup(e,t){const o=e.i18n||ht({useScope:e.scope,__useComponent:!0});return gf(e,t,zd,(...n)=>o[ti](...n))}});if(Xv(),Av(dv),Iv(Ev),Mv(Md),__INTLIFY_PROD_DEVTOOLS__){const e=qo();e.__INTLIFY__=!0,fv(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const vt=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o},y0={class:"weilin_prompt_ui_window-title"},b0=["title"],xn=vt({__name:"DraggableWindow",props:{title:{type:String,required:!0},position:{type:Object,required:!0},size:{type:Object,required:!0},zIndex:{type:Number,default:1},name:{type:String,default:"default_window_name"}},emits:["update:position","update:size","active","close"],setup(e,{emit:t}){const o=e,{t:n}=ht(),a=t,s=b({x:0,y:0}),r=b({width:600,height:400});it(()=>o.position,V=>{V&&(s.value={...V},window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_position`},"*"))},{immediate:!0,deep:!0}),it(()=>o.size,V=>{V&&(r.value={...V},window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_size`},"*"))},{immediate:!0,deep:!0});const l=()=>{window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_scroll`},"*")};gt(()=>{var V;if(o.position){const z=window.innerWidth,j=window.innerHeight,q=100;let fe=o.position.x,te=o.position.y;fe=Math.max(q-(((V=o.size)==null?void 0:V.width)||r.value.width),fe),fe=Math.min(fe,z-100),te=Math.max(50,te),te=Math.min(te,j-100),s.value={x:fe,y:te}}o.size&&(r.value={...o.size})});const u=b(!1),d=b({x:0,y:0}),c=V=>{u.value=!0,d.value={x:V.clientX-s.value.x,y:V.clientY-s.value.y},document.addEventListener("mousemove",f),document.addEventListener("mouseup",g)},f=V=>{if(u.value){const z=window.innerWidth,j=window.innerHeight,q=100;let fe=V.clientX-d.value.x,te=V.clientY-d.value.y;fe=Math.max(q-r.value.width,fe),fe=Math.min(fe,z-100),te=Math.max(50,te),te=Math.min(te,j-100);const I={x:fe,y:te};s.value=I,a("update:position",I)}},g=()=>{u.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",g)},p=b(!1),v=b({x:0,y:0}),y=b({width:0,height:0}),x=V=>{p.value=!0,v.value={x:V.clientX,y:V.clientY},y.value={...r.value},document.addEventListener("mousemove",S),document.addEventListener("mouseup",$)},S=V=>{if(p.value){const z=V.clientX-v.value.x,j=V.clientY-v.value.y,q={width:Math.max(200,y.value.width+z),height:Math.max(200,y.value.height+j)};r.value=q,a("update:size",q)}},$=()=>{p.value=!1,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",$)},W=()=>{a("active")},w=()=>{a("close")},A=V=>{W(),c(V)};return(V,z)=>(T(),wt(Yu,{to:"#weilin_comfyui_tools_prompt_ui_div"},[i("div",{class:"weilin_prompt_ui_draggable-window",style:ft({left:`${s.value.x}px`,top:`${s.value.y}px`,width:`${r.value.width}px`,height:`${r.value.height}px`,zIndex:e.zIndex}),onMousedown:W},[i("div",{class:"weilin_prompt_ui_window-header",onMousedown:Xe(A,["stop"])},[i("div",y0,h(e.title),1),i("button",{class:"weilin_prompt_ui_close-btn",onClick:w},"×")],32),i("div",{class:"weilin_prompt_ui_window-content",onScroll:l},[Va(V.$slots,"default",{},void 0,!0)],32),i("div",{class:"weilin_prompt_ui_resize-handle",title:m(n)("common.windowSize"),onMousedown:Xe(x,["stop"])},null,40,b0)],36)]))}},[["__scopeId","data-v-90f3c2ae"]]),po="v0.0.62",w0={promptBox:{placeholder:"请输入文本...",delete:"删除",newline:"换行",tab:"制表符",windowTitle:"WeiLin提示词UI窗口 "+po,windowTitleGlobal:"WeiLin全局提示词UI窗口 "+po,translate:"翻译",translatePlaceholder:"请输入要翻译的文本,回车即可",weight:"权重",weightPlaceholder:"请输入权重",addBracket:"添加括号",removeLayer:"减去括号",oneClickTranslate:"一键翻译未翻译的词组",hiddenHint:"双击显示提示词",tagTips:"鼠标左键双击屏蔽Tag<br>鼠标左键单击Tag可以编辑<br>鼠标左键拖动可以拖动Tag",oneClickRandomTag:"一键随机Tag",randomTagSettings:"设置随机Tag规则",oneClickTranslate:"一键翻译Tag",modelWeight:"模型权重",textWeight:"文本权重",settings:{title:"设置",cancel:"取消",save:"保存",translator:"翻译设置",sourceLanguage:"源语言",targetLanguage:"目标语言",chinese_simplified:"简体中文",english:"英语",close:"关闭",auto_detect:"自动检测",setting_floating_ball:"悬浮球设置",setting_prompt_box:"提示词设置",enablePromptCommaShow:"显示提示词逗号",floatingBallCount:"悬浮球数量",floatingBallCountPlaceholder:"请输入悬浮球数量",floatingBallSize:"悬浮球宽度",floatingBallSizePlaceholder:"请输入悬浮球宽度",floatingBallHeight:"悬浮球高度",floatingBallHeightPlaceholder:"请输入悬浮球高度",enableFloatingBall:"启用悬浮球",enableCommaConversion:"启用逗号转换,全角逗号转为半角逗号",enablePeriodConversion:"启用句号转换,全角句号转为半角句号",enableBracketConversion:"启用括号转换,全角括号转为半角括号",enableAngleBracketConversion:"启用尖括号转换,全角尖括号转为半角尖括号",enableUnderscoreToBracket:"启用下划线转换,下划线转换为空格",setting_openai_box:"OpenAI设置",openai_api_key:"API Key",openai_api_key_placeholder:"请输入API Key",openai_api_key_save:"保存",openaiSettings:"OpenAI设置",openai_base_url:"Base URL",openai_base_url_placeholder:"请输入Base URL",openai_model:"模型",openai_model_placeholder:"请输入模型",not_set:"未设置",edit:"编辑",delete:"删除",selectedOpenaiConfig:"当前选择的OpenAI配置",addNewConfig:"添加OpenAI配置",setting_sponsor_me:"赞助我",sponsorMe:"赞助我",sponsorMeTip:"赞助我,支持我继续开发",sponsorMeLink:"唯一赞助链接 https://afdian.com/a/weilin9999",setting_start_panel:"启动面板",startPanel:"启动面板",startPanelTip:"点击启动面板,启动成功后会自动打开面板页面",selectTranslater:"选择翻译器",selectOptionNetworkTranslater:"三方网络翻译",selectOptionPythonTranslater:"翻译库翻译",apply:"应用",selectOptionNetworkTranslaterTitle:"三方网络翻译设置",selectOptionPythonTranslaterTitle:"翻译库设置",selectOptionNetworkTranslaterInfo:"使用的三方工具是(仅网络翻译)",selectOptionPythonTranslaterInfo:"使用的翻译包为translators",install:"安装",nowTranlaterPackageState:"当前翻译包状态:",tranlaterPackageStateTrue:"已安装",tranlaterPackageStateFlase:"未安装",installed:"正在安装中...",installTranslaterPackageInfo:"当前正在安装翻译库中,请不要关闭窗口!等待安装完成",translaterSetting:"翻译设置",chooseTranslaterSetting:"选择翻译服务:",translaterLangSourceSetting:"翻译语言:",translaterLangTargeSetting:"翻译目标语言:",saveTranslaterSetting:"保存设置",testTranslaterTitle:"测试翻译",inputTestTranslater:"输入翻译内容:",outPutTestTranslater:"翻译结果:",testingTranslater:"测试翻译",inputTestTranslaterPlaceholder:"请输入要翻译的内容",outPutTestTranslaterPlaceholder:"翻译结果将显示在这里",errorPrompt:"读取节点提示词失败!",setting_auto_complete_limit:"补全提示设置",show_auto_limit:"显示补全提示数量",showAutoLimitPlaceholder:"请输入要显示的数量",settingAutoCompleteWidth:"设置补全提示框宽度",settingAutoCompleteWidthPlaceholder:"请输入宽度",settingAutoCompleteHeight:"设置补全提示框最大高度",settingAutoCompleteHeightPlaceholder:"请输入最大高度",skinSetting:"皮肤设置",defaultSkin:"默认皮肤",customSkin:"自定义皮肤",uploadSkin:"上传皮肤",bgSetting:"背景设置",gradientBg:"渐变颜色",transparentBg:"透明",gradientColor:"渐变颜色选择",borderRadius:"圆角设置",resetToDefault:"恢复默认"}},controls:{language:"语言",settings:"设置",switchTheme:"切换主题",darkMode:"夜间模式",lightMode:"日间模式",tagManager:"标签管理",loraStack:"Lora堆",loraManager:"Lora管理",history:"历史记录",addLora:"添加Lora",removeLora:"移除Lora",lookOnLora:"查看Lora",aiChat:"AI对话",github:"Github主页",shareCloudData:"共享云数据",tutorialVideo:"教程视频",sponsor:"赞助我",danbooruManager:"Danbooru管理器"},theme:{toggle:"切换主题"},common:{confirmDelete:"确认删除",delete:"删除",cancel:"取消",confirm:"确定",edit:"编辑",save:"保存",refresh:"刷新",copy:"复制",copySuccess:"复制成功",copyFailed:"复制失败",windowSize:"调节窗口大小",showMore:"显示更多",showLess:"收起"},cloudWindow:{windowTitle:"共享云仓库",back:"返回上一级",currentPath:"当前路径",tagDatabase:"Tag 数据库",danbooruDatabase:"Danbooru 数据库",open:"打开文件夹",installed:"已安装",install:"安装",installing:"正在安装..."},nodeListWindow:{windowTitle:"节点列表",openPromptUI:"打开提示词编辑器"},lora:{title:"Lora 信息",rawTitle:"LoraRaw",file:"文件",hash:"Hash值",civitai:"Civitai",viewOnCivitai:"在 Civitai 上查看",fetchFromCivitai:"从 Civitai 获取信息",modelNotFound:"模型未找到",modelNotFoundTip:"该模型在 Civitai 上未找到,可能是私有模型或已被删除",name:"名称",nameTip:"模型的显示名称",type:"类型",baseModel:"基础模型",trainedWords:"训练词",trainedWordsTip:"模型训练时使用的关键词,点击可选择复制",selectedWords:"已选择 {count} 个词",strengthMin:"最小强度",strengthMinTip:"推荐的最小强度值",strengthMax:"最大强度",strengthMaxTip:"推荐的最大强度值",promptWords:"提示词",promptWordsTip:"使用该模型时的推荐提示词",loraWorks:"Lora提示词",strWeight:"文本强度权重",hideLora:"隐藏Lora",showLora:"显示Lora",baseModel:"基础模型",skipClip:"跳过层",seeLoraRaw:"查看LoraRaw",addDiyFiled:"添加自定义字段",getCivitData:"获取Civitai信息",copy:"复制"},tagManager:{deletePrimaryCategoryConfirm:"确定要删除分类 {name} 吗?",deleteGroupConfirm:"确定要删除分组 {name} 吗?",deleteTagConfirm:"确定要删除标签 {name} 吗?",windowTitle:"标签管理器",categories:"分类管理",groups:"分组管理",selectCategory:"请选择分类",selectGroup:"请选择分组",addPrimaryCategory:"添加分类",addGroup:"添加分组",editPrimaryCategory:"编辑分类",editGroup:"编辑分组",editTag:"编辑标签",categoryName:"分类名称",categoryNamePlaceholder:"请输入分类名称",categoryNameRequired:"分类名称不能为空",groupName:"分组名称",groupNamePlaceholder:"请输入分组名称",groupNameRequired:"分组名称不能为空",addTag:"添加Tag",text:"Tag描述",textPlaceholder:"请输入Tag描述",description:"Tag",descriptionPlaceholder:"请输入Tag",textRequired:"Tag和Tag描述不能为空",backgroundColor:"背景颜色",colorPickerTitle:"选择颜色",opacity:"透明度",searchPlaceholder:"搜索Tag...",noResults:"未找到相关结果",searchInCategory:"在分类中",searchInTag:"在Tag中",save:"保存",cancel:"取消",confirm:"确定",delete:"删除",addSubCategory:"添加子分类",editSubCategory:"编辑子分类",subCategoryName:"子分类名称",subCategoryNamePlaceholder:"请输入子分类名称",subCategoryNameRequired:"子分类名称不能为空",deleteConfirmTitle:"确认删除",deleteConfirmMessage:"此操作将永久删除该{type},是否继续?",deleteSuccess:"删除成功",deleteFailed:"删除失败",saveSuccess:"保存成功",saveFailed:"保存失败",colorPickerAlpha:"透明度",colorPickerHex:"十六进制颜色值",colorPreview:"颜色预览",dragToSort:"拖动排序",searchTags:"搜索标签",noTagsFound:"未找到标签",noGroupsFound:"未找到分组",noCategoriesFound:"未找到分类",refresh:"刷新",refreshing:"刷新中...",refreshSuccess:"刷新成功",refreshFailed:"刷新失败",search:"搜索",searching:"搜索中...",searchResult:"搜索结果",searchInPath:"位于: {path}",category:"分类",group:"分组",tag:"标签",resultType:{category:"分类",group:"分组",tag:"标签"},hasDeleteAction:"批量删除",deleteSelected:"删除选中",confirmDeleteSelected:"确定要删除选中标签吗?",cancelDelete:"取消删除",moveTag:"移动标签",targetTag:"目标标签",movePosition:"移动位置",moveBefore:"移动到目标标签之前",moveAfter:"移动到目标标签之后",editTag:"编辑标签",deleteTag:"删除标签",editGroupMode:"编辑模式",exitEditMode:"退出编辑模式",autoAddSearchTag:"搜索的Tag自动添加到提示词中",importTags:"批量导入Tag",share:"分享",delete:"删除",edit:"编辑",outputSuccess:"分享成功",noTagsSelected:"没有选择要分享的Tag",shareSelected:"分享选择的Tag",batchShare:"批量分享Tag",cancelShare:"取消分享",moveGroup:"移动分组",targetGroup:"目标分组",moveGroupBefore:"移动到目标分组之前",moveGroupAfter:"移动到目标分组之后",importDanbooru:"批量导入",modifyTabSize:"修改标签尺寸",tabSizeConfig:"标签尺寸配置",primaryTabConfig:"一级分类标签配置",groupTabConfig:"二级分类标签配置",tabWidth:"标签宽度",tabHeight:"标签高度",fontSize:"字体大小",fitContent:"自适应内容",customWidth:"自定义宽度",resetDefault:"重置为默认值",tabSizeConfigSaved:"标签尺寸配置已保存",tabSizeConfigSaveFailed:"标签尺寸配置保存失败"},loraManager:{windowTitle:"Lora管理",modelWeight:"模型权重",textEncoderWeight:"文本权重",all:"全部",root:"根目录",refresh:"刷新",cacheAll:"缓存全部Lora信息",searchPlaceholder:"搜索Lora...",prevPage:"上一页",nextPage:"下一页",noResults:"未找到相关结果",loadingMore:"正在加载更多...",noMoreData:"没有更多结果了"},message:{copySuccess:"复制成功",copyFailed:"复制失败",saveSuccess:"保存成功",saveFailed:"保存失败",deleteSuccess:"删除成功",deleteFailed:"删除失败",operationSuccess:"操作成功",operationFailed:"操作失败",networkError:"网络错误",unknownError:"未知错误",refreshSuccess:"刷新成功",refreshFailed:"刷新失败",loadingData:"加载数据中...",dataLoaded:"数据加载完成",editSuccess:"编辑成功",editFailed:"编辑失败",addSuccess:"添加成功",addFailed:"添加失败",addFavoriteSuccess:"已添加到收藏夹",addFavoriteIsExist:"已添加到收藏夹",error:"错误",editNameExist:"名称已存在",moveSuccess:"移动成功",moveFailed:"移动失败",setLanguageSuccess:"设置语言成功",setLanguageFailed:"设置语言失败",startPanelSuccess:"启动面板成功",startPanelFailed:"启动面板失败",isLoading:"已在执行中请等待",loaddingPrc:"执行进度 {name}%",loaddingSuccess:"已全部加载成功",noFinishKuo:"括号不完整,请检查输入",getTranslaterFail:"获取翻译设置失败",applyTranslaterFail:"应用翻译设置失败",applyToTranslaterFail:"切换翻译库翻译需要安装翻译库,请先安装翻译库再应用设置",applyTranslaterSuccess:"应用翻译设置成功",tranlaterPackageInstallFail:"等待安装超时,请查看后台安装情况,若安装成功再次点击安装即可验证",tranlaterPackageInstallSuccess:"安装翻译包成功",translaterTestFail:"翻译失败,请使用其它的翻译服务进行尝试",installPackageSuccess:"安装共享数据成功!",installPackageFail:"安装共享数据失败,请查看后台错误",loadFailed:"加载失败",jsonErrorMesg:"JSON文件格式错误",pleaseAddSub:"请先添加二级分类",pleaseAddMainCeb:"请先添加一级分类",pleaseSelectGroup:"请选择完整的分组路径",isLoadingPleaseWait:"正在执行中,请查看后台进度",shareGroupError:"分享失败,获取分组信息失败",shareTagError:"分享失败,获取组Tag信息失败"},history:{title:"历史记录",search_placeholder:"搜索历史记录...",search:"搜索",windowTitle:"历史记录",favorites:"收藏夹",history:"历史记录",refresh:"刷新",refresh_history:"刷新历史记录",refresh_favorites:"刷新收藏夹",add_to_favorites:"添加到收藏夹",delete_history:"删除历史记录",use_item:"使用",add_new:"添加收藏",bulk_delete:"批量删除",deleteHistoryConfirm:"确定要删除历史记录 {name} 吗?",deleteFavoriteConfirm:"确定要删除收藏夹 {name} 吗?",confirmDeleteSelected:"确定要删除选中的信息吗?",cancel_delete:"取消删除",sure_delete:"确定删除",deleteSelected:"删除选中",dialog:{add_tag:"添加收藏",edit_tag:"编辑收藏",name:"名称",name_placeholder:"请输入名称",tag:"标签",tag_placeholder:"请输入标签",background_color:"背景颜色",background_color_placeholder:"请选择背景颜色",edit_favorite:"编辑收藏",delete_favorite:"删除收藏"},edit_favorite:"编辑收藏",delete_favorite:"删除收藏",use_favorite:"使用收藏"},floatingBall:{promptBox:"打开全局提示词",tagManager:"打开标签管理",loraManager:"打开Lora管理",aiWindow:"打开AI对话",restoreWindow:"重置所有窗口",openNodeListWindow:"打开节点列表",tranToWeb:"图片转换工具",openSetting:"打开设置"},aiWindow:{windowTitle:"AI对话窗口",newChat:"新建对话",chatName:"对话",thinking:"思考中...",send:"发送",inputMessage:"输入你的消息..."},translaterService:{niutrans:"小牛翻译",mymemory:"MyMemory",alibaba:"阿里巴巴翻译",baidu:"百度翻译",modernmt:"ModernMT",volcengine:"火山翻译",iciba:"金山词霸",iflytek:"科大讯飞翻译",google:"谷歌翻译",bing:"必应翻译",lingvanex:"Lingvanex",yandex:"Yandex翻译",itranslate:"iTranslate",systran:"SYSTRAN",argos:"Argos翻译",apertium:"Apertium",reverso:"Reverso翻译",deepl:"DeepL翻译",cloudtranslation:"云翻译",qqtransmart:"腾讯翻译君",translatecom:"Translate.com",sogou:"搜狗翻译",tilde:"Tilde翻译",caiyun:"彩云小译",qqfanyi:"腾讯翻译",translateme:"TranslateMe",papago:"Papago翻译",mirai:"未来翻译",youdao:"有道翻译",iflyrec:"讯飞听见翻译",hujiang:"沪江翻译",yeekit:"译库翻译",languagewire:"LanguageWire",elia:"Elia翻译",judic:"Judic翻译",mglip:"蒙古语翻译",utibet:"藏语翻译"},translaterLanguage:{english:"英语",chinese:"中文",arabic:"阿拉伯语",russian:"俄语",french:"法语",german:"德语",spanish:"西班牙语",portuguese:"葡萄牙语",italian:"意大利语",japanese:"日语",korean:"韩语",greek:"希腊语",dutch:"荷兰语",hindi:"印地语",turkish:"土耳其语",malay:"马来语",thai:"泰语",vietnamese:"越南语",indonesian:"印度尼西亚语",hebrew:"希伯来语",polish:"波兰语",mongolian:"蒙古语",czech:"捷克语",hungarian:"匈牙利语",estonian:"爱沙尼亚语",bulgarian:"保加利亚语",danish:"丹麦语",finnish:"芬兰语",romanian:"罗马尼亚语",swedish:"瑞典语",slovenian:"斯洛文尼亚语","persian/farsi":"波斯语/波斯语",bosnian:"波斯尼亚语",serbian:"塞尔维亚语",fijian:"斐济语",filipino:"菲律宾语",haitiancreole:"海地克里奥尔语",catalan:"加泰罗尼亚语",croatian:"克罗地亚语",latvian:"拉脱维亚语",lithuanian:"立陶宛语",urdu:"乌尔都语",ukrainian:"乌克兰语",welsh:"威尔士语",tahiti:"塔希提语",tongan:"汤加语",swahili:"斯瓦希里语",samoan:"萨摩亚语",slovak:"斯洛伐克语",afrikaans:"南非荷兰语",norwegian:"挪威语",bengali:"孟加拉语",malagasy:"马达加斯加语",maltese:"马耳他语","queretaro otomi":"克雷塔罗奥托米语","klingon/tlhingan hol":"克林贡语",gujarati:"古吉拉特语",tamil:"泰米尔语",telugu:"泰卢固语",punjabi:"旁遮普语",amharic:"阿姆哈拉语",azerbaijani:"阿塞拜疆语",bashkir:"巴什基尔语",belarusian:"白俄罗斯语",cebuano:"宿务语",chuvash:"楚瓦什语",esperanto:"世界语",basque:"巴斯克语",irish:"爱尔兰语"},utils:{tranToWeb:"转换图片为HTML",dropOrPasteImage:"点击本区域可以上传文件也可以拖动图片或粘贴图片到此处",downloadHtml:"下载HTML",copyHtml:"复制HTML",copySuccess:"HTML已复制",copyFailed:"复制HTML失败",clear:"清空内容"},importDialog:{title:"批量导入Tag",sure:"确认并导入",cleanAll:"清空所有",dumpSQL:"导出所有SQL",uploadSQL:"上传原始SQL文件",setMainCeb:"设置一级分类",setSubCeb:"设置二级分类",addTag:"添加Tag",fromJSONImput:"从JSON文件批量导入Tag",fromTxtInput:"从TXT文件批量导入Tag",fromYmalInput:"从YAML文件批量导入Tag",selectMainCeb:"选择一级分类",selectSubCeb:"选择二级分类",selectGroup:"选择已有分类",sureSelect:"确认选择",pleaseAddGroupName:"请填写一级分类名称",pleaseAddSubGroupName:"请填写二级分类名称",pleaseFullRequest:"请填写完整一级分类和二级分类信息",successImport:"导入成功",importFail:"导入失败",dumpOnlySQL:"仅导出Tag的SQL",settingOutputName:"设置导出文件名称",sureYes:"确认",cancel:"取消",edit:"编辑",delete:"删除",add:"添加Tag",pleaseMainCebUuid:"一级分原UUID,增量更新才需要",pleaseSubGroupUuid:"二级分原UUID,增量更新才需要",pleaseSubGroup:"二级分类名称",pleaseMainCeb:"一级分类名称",translater:"描述",tips1:"使用教程:",tips1text:"B站视频教程",tips2:"Tag云仓库:",tips2text:"GitHub仓库",tips3:"在线批量编辑:",tips3text:"在线编辑器",selectTitle:"选择分类",selectedCategories:"已选择的分类",clearAll:"清除全部",primaryCategories:"一级分类",subCategories:"二级分类",noSelectedCategories:"暂无选择的分类",selectCategory:"选择此分类",selectSubcategory:"选择此子分类",sureSelect:"确认选择"},randomUtils:{title:"随机Tag规则设置",generalSettings:"通用设置",totalTags:"随机Tag总数量(规则范围超过总数量按总数量算最大范围)",rules:"规则",addRule:"添加规则",rule:"规则",range:"范围",tagType:"标签类型",category:"Tag数据",specificTags:"特定标签",selectCategory:"选择分类",addTagPlaceholder:"输入标签并按回车",addTag:"添加标签",testRandom:"测试随机",generatedTags:"生成的标签",selectTagGroup:"选择Tag分组",ruleTemplates:"规则模板",saveAsTemplate:"保存为模板",selectTemplate:"选择模板",applyTemplate:"应用模板",templateNamePlaceholder:"输入模板名称",templateNameRequired:"请输入模板名称",templateSaved:"模板已保存",templateApplied:"模板已应用",errorSavingTemplates:"保存模板时出错",save:"保存",cancel:"取消",editTemplate:"修改名称",deleteTemplate:"删除模板",confirmDeleteTemplate:"确定要删除此模板吗?",templateDeleted:"模板已删除",templateUpdated:"模板名称已更新",errorUpdatingTemplate:"更新模板失败",errorLoadingTemplate:"加载模板失败",errorDeletingTemplate:"删除模板失败",errorApplyingTemplate:"应用模板失败",pleaseChooseTemplate:"请选择模板",errorSavingTemplate:"保存模板失败",newTemplate:"新建模板",rulesReminder:"提醒:第一个规则的范围必须从1开始!如果范围区间超过了随机的总数则直接显示全部不会随机!"},danbooruManager:{title:"Danbooru管理器",controle:"操作",translatePlaceholder:"请输入对应的翻译文本",searchPlaceholder:"输入需要搜索的Danbooru标签...",pageShow:"每页显示:",pageLimit:"条",hot:"热度",aliases:"分区",sureBatchDelete:"批量删除确认",sureBatchDeleteTips1:"您确定要删除选中的",sureBatchDeleteTips2:"个标签吗?此操作不可撤销。",sureDelete:"确认删除",import:"Danbooru格式导入",importBatchTitle:"批量导入Danbooru数据",importTitle:"Danbooru 导入数据展示",add:"添加Danbooru标签",edit:"编辑Danbooru标签"}},x0={promptBox:{placeholder:"Please enter text...",delete:"Delete",newline:"New Line",tab:"Tab",windowTitle:"WeiLin Prompt UI Window "+po,windowTitleGlobal:"WeiLin Global Prompt UI Window "+po,translate:"Translate",translatePlaceholder:"Please enter the text to be translated",weight:"Weight",weightPlaceholder:"Please enter the weight",addBracket:"Add Bracket",removeLayer:"Remove Bracket",oneClickTranslate:"One Click Translate Untranslated Phrases",hiddenHint:"Double-click to show",tagTips:"Double-click the left mouse button to mask the Tag<br>click the Tag to edit<br>and drag the Tag to drag",oneClickRandomTag:"one Click Random Tag",randomTagSettings:"setting Random Tag",oneClickTranslate:"one Click Translate Tag",modelWeight:"Model Weight",textWeight:"Text Weight",settings:{title:"Settings",cancel:"Cancel",save:"Save",translator:"Translator",sourceLanguage:"Source Language",targetLanguage:"Target Language",chinese_simplified:"Chinese Simplified",english:"English",close:"Close",auto_detect:"Auto Detect",setting_floating_ball:"Setting Floating Ball",setting_prompt_box:"Setting Prompt Box",enablePromptCommaShow:"Show Prompt Comma",floatingBallCount:"Floating Ball Count",floatingBallCountPlaceholder:"Please enter the number of floating balls",floatingBallSize:"Width of suspended ball",floatingBallSizePlaceholder:"Please enter the width of the suspension ball",floatingBallHeight:"Height of suspended ball",floatingBallHeightPlaceholder:"Please input the height of the suspension ball",enableFloatingBall:"Enable Floating Ball",enableCommaConversion:"Enable Comma Conversion",enablePeriodConversion:"Enable Period Conversion",enableBracketConversion:"Enable Bracket Conversion",enableAngleBracketConversion:"Enable Angle Bracket Conversion",enableUnderscoreToBracket:"Enable Underscore to Bracket",setting_openai_box:"OpenAI Settings",openai_api_key:"API Key",openai_api_key_placeholder:"Please enter API Key",openai_api_key_save:"Save",openaiSettings:"OpenAI Settings",openaiSettings_api_key:"API Key",openaiSettings_api_key_placeholder:"Please enter API Key",openaiSettings_api_key_save:"Save",openai_base_url:"Base URL",openai_base_url_placeholder:"Please enter Base URL",openai_model:"Model",openai_model_placeholder:"Please enter Model",not_set:"Not Set",edit:"Edit",delete:"Delete",selectedOpenaiConfig:"Selected OpenAI Config",addNewConfig:"Add New Config",setting_sponsor_me:"Sponsor Me",sponsorMe:"Sponsor Me",sponsorMeTip:"Sponsor Me, Support Me to Continue Development",sponsorMeLink:"Unique Sponsor Link https://afdian.com/a/weilin9999",setting_start_panel:"Start Panel",startPanel:"Start Panel",startPanelTip:"Click Start Panel, after successful startup, the panel page will be automatically opened",selectTranslater:"select translater",selectOptionNetworkTranslater:"Three party online translation",selectOptionPythonTranslater:"Translation Library Translation",apply:"Apply",selectOptionNetworkTranslaterTitle:"Three party network translation settings",selectOptionPythonTranslaterTitle:"Translation library settings",selectOptionNetworkTranslaterInfo:"The third-party tool used is (only for online translation)",selectOptionPythonTranslaterInfo:"The translation package used is translators",install:"Install",nowTranlaterPackageState:"now transtler package state:",tranlaterPackageStateTrue:"installed",tranlaterPackageStateFlase:"not installed",installed:"is installed ....",installTranslaterPackageInfo:"Currently installing translation library, please do not close the window! Wait for installation to complete",translaterSetting:"Translation Settings",chooseTranslaterSetting:"Choose a translation service:",translaterLangSourceSetting:"Translation language:",translaterLangTargeSetting:"Translation target language:",saveTranslaterSetting:"Save Settings",testTranslaterTitle:"Test translation",inputTestTranslater:"Enter translation content:",outPutTestTranslater:"Translation result:",testingTranslater:"Test translation",inputTestTranslaterPlaceholder:"Please enter the content to be translated",outPutTestTranslaterPlaceholder:"The translation result will be displayed here",errorPrompt:"Read the prompt node failed",skinSetting:"skin setting",defaultSkin:"default skin",customSkin:"custom skin",uploadSkin:"upload skin",bgSetting:"background setting",gradientBg:"gradient color",transparentBg:"transparent",gradientColor:"gradient color select",borderRadius:"border radius",resetToDefault:"reset to default"}},controls:{language:"Language",settings:"Settings",switchTheme:"Switch Theme",darkMode:"Dark Mode",lightMode:"Light Mode",tagManager:"Tag Manager",loraStack:"Lora Stack",loraManager:"Lora Manager",history:"History",addLora:"Add Lora",removeLora:"Remove Lora",lookOnLora:"Look On Lora",aiChat:"AI Chat",github:"Github Home",shareCloudData:"Share Cloud Data",tutorialVideo:"Tutorial Video",sponsor:"Sponsor Me",danbooruManager:"danbooru Manager"},theme:{toggle:"Switch Theme"},lora:{title:"Lora Information",rawTitle:"LoraRaw",file:"File",hash:"Hash",civitai:"Civitai",viewOnCivitai:"View on Civitai",fetchFromCivitai:"Fetch from Civitai",modelNotFound:"Model not found",modelNotFoundTip:"The model was not found on Civitai. It might be private or deleted",name:"Name",nameTip:"Display name of the model",type:"Type",baseModel:"Base Model",trainedWords:"Trained Words",trainedWordsTip:"Keywords used in model training, click to select for copying",selectedWords:"{count} words selected",strengthMin:"Min Strength",strengthMinTip:"Recommended minimum strength value",strengthMax:"Max Strength",strengthMaxTip:"Recommended maximum strength value",promptWords:"Prompt Words",promptWordsTip:"Recommended prompt words when using this model",loraWorks:"Lora Prompt Words",strWeight:"Text Strength Weight",hideLora:"Hidden Lora",showLora:"Show Lora",baseModel:"Base Model",skipClip:"Clip Skip",seeLoraRaw:"LoraRaw",addDiyFiled:"Add DIY Filed",getCivitData:"Get Civitai Data",copy:"Copy"},common:{confirmDelete:"Confirm Delete",delete:"Delete",cancel:"Cancel",confirm:"Confirm",edit:"Edit",save:"Save",refresh:"Refresh",copy:"Copy",copySuccess:"Copied successfully",copyFailed:"Copy failed",windowSize:"Adjust window size",showMore:"show more",showLess:"show less"},nodeListWindow:{windowTitle:"Node List",openPromptUI:"Open Prompt UI"},tagManager:{deletePrimaryCategoryConfirm:"Are you sure you want to delete category {name}?",deleteGroupConfirm:"Are you sure you want to delete group {name}?",deleteTagConfirm:"Are you sure you want to delete tag {name}?",windowTitle:"Tag Manager",categories:"Categories",groups:"Groups",selectCategory:"Please select a category",selectGroup:"Please select a group",addPrimaryCategory:"Add Category",addGroup:"Add Group",editPrimaryCategory:"Edit Category",editGroup:"Edit Group",editTag:"Edit Tag",categoryName:"Category Name",categoryNamePlaceholder:"Enter category name",categoryNameRequired:"Category name is required",groupName:"Group Name",groupNamePlaceholder:"Enter group name",groupNameRequired:"Group name is required",addTag:"Add Tag",text:"Tag Description",textPlaceholder:"Enter tag Description",description:"Tag",descriptionPlaceholder:"Enter tag",textRequired:"Tag and Tag description cannot be empty",backgroundColor:"Background Color",colorPickerTitle:"Select Color",opacity:"Opacity",searchPlaceholder:"Search tags...",noResults:"No results found",searchInCategory:"in category",searchInTag:"in tag",save:"Save",cancel:"Cancel",confirm:"Confirm",delete:"Delete",addSubCategory:"Add Sub-category",editSubCategory:"Edit Sub-category",subCategoryName:"Sub-category Name",subCategoryNamePlaceholder:"Enter sub-category name",subCategoryNameRequired:"Sub-category name is required",deleteConfirmTitle:"Confirm Delete",deleteConfirmMessage:"This action will permanently delete this {type}. Continue?",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",saveSuccess:"Saved successfully",saveFailed:"Save failed",colorPickerAlpha:"Opacity",colorPickerHex:"Hex Color Value",colorPreview:"Color Preview",dragToSort:"Drag to Sort",searchTags:"Search Tags",noTagsFound:"No tags found",noGroupsFound:"No groups found",noCategoriesFound:"No categories found",refresh:"Refresh",refreshing:"Refreshing...",refreshSuccess:"Refresh successful",refreshFailed:"Refresh failed",search:"Search",searching:"Searching...",searchResult:"Search Result",searchInPath:"Located in: {path}",category:"Category",group:"Group",tag:"Tag",resultType:{category:"Category",group:"Group",tag:"Tag"},hasDeleteAction:"Batch Delete",deleteSelected:"Delete Selected",confirmDeleteSelected:"Are you sure you want to delete the selected tags?",cancelDelete:"Cancel Delete",moveTag:"Move Tag",targetTag:"Target Tag",movePosition:"Move Position",moveBefore:"Move Before",moveAfter:"Move After",editTag:"Edit Tag",deleteTag:"Delete Tag",editGroupMode:"Edit Group Mode",exitEditMode:"Exit Edit Mode",autoAddSearchTag:"Auto Add Search Tag With Prompt",importTags:"Import Tags",share:"Share",delete:"Delete",edit:"Edit",outputSuccess:"Share successfully",noTagsSelected:"No share tags selected",shareSelected:"Share selected Tag",batchShare:"Batch Share Tag",cancelShare:"Cancel Share",moveGroup:"Move Group",targetGroup:"Target Group",moveGroupBefore:"Move Before",moveGroupAfter:"Move After",importDanbooru:"Batch import",modifyTabSize:"Modify Tag Size",tabSizeConfig:"Tag Size Configuration",primaryTabConfig:"Primary Category Tab Configuration",groupTabConfig:"Group Category Tab Configuration",tabWidth:"Tab Width",tabHeight:"Tab Height",fontSize:"Font Size",fitContent:"Fit Content",customWidth:"Custom Width",resetDefault:"Reset to Default",tabSizeConfigSaved:"Tag size configuration saved",tabSizeConfigSaveFailed:"Failed to save tag size configuration"},loraManager:{windowTitle:"Lora Manager",modelWeight:"Model Weight",textEncoderWeight:"Text Encoder Weight",all:"All",root:"Root",refresh:"Refresh",cacheAll:"Cache all Lora information",searchPlaceholder:"Search Lora...",noResults:"No results found",prevPage:"prev page",nextPage:"next page",loadingMore:"Loadding more ...",noMoreData:"No more data"},message:{copySuccess:"Copy successful",copyFailed:"Copy failed",saveSuccess:"Save successful",saveFailed:"Save failed",deleteSuccess:"Delete successful",deleteFailed:"Delete failed",operationSuccess:"Operation successful",operationFailed:"Operation failed",networkError:"Network error",unknownError:"Unknown error",refreshSuccess:"Refresh successful",refreshFailed:"Refresh failed",loadingData:"Loading data...",dataLoaded:"Data loaded",editSuccess:"Edit successful",editFailed:"Edit failed",addSuccess:"Add successful",addFailed:"Add failed",addFavoriteSuccess:"Added to favorites",addFavoriteIsExist:"Added to favorites",error:"Error",moveSuccess:"Move successful",moveFailed:"Move failed",setLanguageSuccess:"Set language successful",setLanguageFailed:"Set language failed",startPanelSuccess:"Start panel successful",startPanelFailed:"Start panel failed",isLoading:"Loading...",loaddingPrc:"Execution progress {name}%",loaddingSuccess:"All loaded successfully",noFinishKuo:"The parentheses are incomplete. Please check the input",getTranslaterFail:"Get translator failed",applyTranslaterFail:"Apply translator failed",applyToTranslaterFail:"Switching to a translation library requires installing a translation library. Please install the translation library first and then apply the settings",applyTranslaterSuccess:"Apply translator successful",tranlaterPackageInstallFail:"Waiting for installation timeout, please check the background installation status. If the installation is successful, click install again to verify",tranlaterPackageInstallSuccess:"Successfully installed translation package",translaterTestFail:"Translation failed, please try using another translation service",installPackageSuccess:"Successfully installed translation package",installPackageFail:"Failed to install translation package, please check the background installation status",loadFailed:"load failed",jsonErrorMesg:"The format of the JSON file is incorrect",pleaseAddSub:"Please add the secondary classification first",pleaseAddMainCeb:"Please add the first-level category first",pleaseSelectGroup:"Please select the complete grouping path",isLoadingPleaseWait:"It is being executed. Please check the progress in the background",shareGroupError:"Failed to share and failed to obtain group information",shareTagError:"Failed to share and failed to obtain group tag information"},cloudWindow:{windowTitle:"Share Cloud Window",back:"Back",currentPath:"Current Path",tagDatabase:"Tag Database",danbooruDatabase:"Danbooru Database",open:"Open Folder",installed:"Installed",install:"Install",installing:"Installing..."},history:{title:"History",search_placeholder:"Search history...",windowTitle:"History",search:"Search",favorites:"Favorites",history:"History",refresh:"Refresh",refresh_history:"Refresh history",refresh_favorites:"Refresh favorites",add_to_favorites:"Add to favorites",delete_history:"Delete history",use_item:"Use",add_new:"Add new",bulk_delete:"Bulk delete",deleteHistoryConfirm:"Are you sure you want to delete history {name}?",deleteFavoriteConfirm:"Are you sure you want to delete favorite {name}?",confirmDeleteSelected:"Are you sure you want to delete selected information?",cancel_delete:"Cancel delete",sure_delete:"Sure delete",deleteSelected:"Delete selected",dialog:{add_tag:"Add favorite",edit_tag:"Edit favorite",name:"Name",name_placeholder:"Please enter name",tag:"Tag",tag_placeholder:"Please enter tag",background_color:"Background color",background_color_placeholder:"Please select background color",edit_favorite:"Edit favorite",delete_favorite:"Delete favorite"},edit_favorite:"Edit favorite",delete_favorite:"Delete favorite",use_favorite:"Use favorite"},floatingBall:{promptBox:"open Global Prompt Box",tagManager:"open Tag Manager",loraManager:"open Lora Manager",aiWindow:"open AI Chat",restoreWindow:"reset all windows",openNodeListWindow:"open Node List",tranToWeb:"Image to Web Utils",openSetting:"open Setting"},aiWindow:{windowTitle:"AI Chat Window",newChat:"New Chat",chatName:"Chat",thinking:"Thinking...",send:"Send",inputMessage:"Enter your message..."},translaterService:{niutrans:"niutrans",mymemory:"mymemory",alibaba:"alibaba",baidu:"baidu",modernmt:"modernmt",volcengine:"volcengine",iciba:"iciba",iflytek:"iflytek",google:"google",bing:"bing",lingvanex:"lingvanex",yandex:"yandex",itranslate:"itranslate",systran:"systran",argos:"argos",apertium:"apertium",reverso:"reverso",deepl:"deepl",cloudtranslation:"cloudtranslation",qqtransmart:"qqtransmart",translatecom:"translatecom",sogou:"sogou",tilde:"tilde",caiyun:"caiyun",qqfanyi:"qqfanyi",translateme:"translateme",papago:"papago",mirai:"mirai",youdao:"youdao",iflyrec:"iflyrec",hujiang:"hujiang",yeekit:"yeekit",languagewire:"languagewire",elia:"elia",judic:"judic",mglip:"mglip",utibet:"utibet"},translaterLanguage:{english:"english",chinese:"chinese",arabic:"arabic",russian:"russian",french:"french",german:"german",spanish:"spanish",portuguese:"portuguese",italian:"italian",japanese:"japanese",korean:"korean",greek:"greek",dutch:"dutch",hindi:"hindi",turkish:"turkish",malay:"malay",thai:"thai",vietnamese:"vietnamese",indonesian:"indonesian",hebrew:"hebrew",polish:"polish",mongolian:"mongolian",czech:"czech",hungarian:"hungarian",estonian:"estonian",bulgarian:"bulgarian",danish:"danish",finnish:"finnish",romanian:"romanian",swedish:"swedish",slovenian:"slovenian","persian/farsi":"persian/farsi",bosnian:"bosnian",serbian:"serbian",fijian:"fijian",filipino:"filipino",haitiancreole:"haitiancreole",catalan:"catalan",croatian:"croatian",latvian:"latvian",lithuanian:"lithuanian",urdu:"urdu",ukrainian:"ukrainian",welsh:"welsh",tahiti:"tahiti",tongan:"tongan",swahili:"swahili",samoan:"samoan",slovak:"slovak",afrikaans:"afrikaans",norwegian:"norwegian",bengali:"bengali",malagasy:"malagasy",maltese:"maltese","queretaro otomi":"queretaro otomi","klingon/tlhingan hol":"klingon/tlhingan hol",gujarati:"gujarati",tamil:"tamil",telugu:"telugu",punjabi:"punjabi",amharic:"amharic",azerbaijani:"azerbaijani",bashkir:"bashkir",belarusian:"belarusian",cebuano:"cebuano",chuvash:"chuvash",esperanto:"esperanto",basque:"basque",irish:"irish"},utils:{tranToWeb:"Image to HTML",dropOrPasteImage:"Drop or paste image here",downloadHtml:"Download HTML",copyHtml:"Copy HTML",copySuccess:"HTML copied to clipboard",copyFailed:"Failed to copy HTML",clear:"Clear"},importDialog:{title:"Batch import of Tags",sure:"Confirm and import",cleanAll:"Empty all",dumpSQL:"Export All SQL",uploadSQL:"Upload the original SQL file",setMainCeb:"Set up a first-level classification",setSubCeb:"Set up secondary classification",addTag:"Add Tag",fromJSONImput:"Import tags from the JSON file",fromTxtInput:"Batch import tags from TXT files",fromYmalInput:"Batch import tags from YMAL files",selectMainCeb:"Select the first-level classification",selectSubCeb:"Select the secondary classification",selectGroup:"Select the existing classification",sureSelect:"Confirm the selection",pleaseAddGroupName:"Please fill in the name of the first-level classification",pleaseAddSubGroupName:"Please fill in the name of the secondary classification",pleaseFullRequest:"Please fill in the information of the first-level and second-level classifications completely",successImport:"Import successful",importFail:"Import failed",dumpOnlySQL:"Only export the SQL of the Tag",settingOutputName:"Set the name of the export file",sureYes:"Sure",cancel:"Cancel",edit:"Edit",delete:"Delete",add:"Add Tag",pleaseMainCebUuid:"The original UUID of the first-level division is only required for incremental updates and cannot be modified",pleaseSubGroupUuid:"The secondary division of the original UUID is only required for incremental updates and cannot be modified",pleaseSubGroup:"Secondary classification name",pleaseMainCeb:"First-level classification name",translater:"Description",tips1:"Usage Tutorial:",tips1text:"Bilibili video tutorial",tips2:"Tag Cloud Warehouse:",tips2text:"GitHub repository",tips3:"Online batch editing:",tips3text:"Online editor",selectTitle:"Select Category",selectedCategories:"Selected Categories",clearAll:"Clear All",primaryCategories:"Primary Categories",subCategories:"Sub Categories",noSelectedCategories:"No categories selected",selectCategory:"Select this category",selectSubcategory:"Select this subcategory",sureSelect:"Confirm Selection"},randomUtils:{title:"Random Tag Rules Settings",generalSettings:"General Settings",totalTags:"Random Tag Total Number (If the rule range exceeds the total quantity, the maximum range is calculated by the total quantity)",rules:"Rules",addRule:"Add Rule",rule:"Rule",range:"Range",tagType:"Tag Type",category:"Tag Category",specificTags:"Specific Tags",selectCategory:"Select Category",addTagPlaceholder:"Enter tag and press Enter",addTag:"Add Tag",testRandom:"Test Random",generatedTags:"Generated Tags",selectTagGroup:"Select Tag Group",ruleTemplates:"Rule Templates",saveAsTemplate:"Save as Template",selectTemplate:"Select Template",applyTemplate:"Apply Template",templateNamePlaceholder:"Enter template name",templateNameRequired:"Template name is required",templateSaved:"Template saved",templateApplied:"Template applied",errorSavingTemplates:"Error saving templates",save:"Save",cancel:"Cancel",editTemplate:"Edit Name",deleteTemplate:"Delete",confirmDeleteTemplate:"Are you sure you want to delete this template?",templateDeleted:"Template deleted",templateUpdated:"Template name updated",errorUpdatingTemplate:"Update template failed",errorLoadingTemplate:"Load template failed",errorDeletingTemplate:"Delete template failed",pleaseChooseTemplate:"Please choose a template",errorApplyingTemplate:"Apply template failed",errorSavingTemplate:"Save template failed",newTemplate:"New Template",rulesReminder:"Reminder: The range of the first rule must start at 1! If the range exceeds the total number of random, it will simply display all not random!"},danbooruManager:{title:"Danbooru Manager",controle:"Controle",translatePlaceholder:"Please enter the tag to be translated",searchPlaceholder:"Input need search danbooru tag",pageShow:"Display per page:",pageLimit:"article",hot:"hot",aliases:"aliases",sureBatchDelete:"Batch deletion confirmation",sureBatchDeleteTips1:"You are sure you want to delete the selected one",sureBatchDeleteTips2:"A label? This operation is irrevocable.",sureDelete:"Confirm deletion",import:"Import in Danbooru format",importBatchTitle:"Batch import Danbooru data",importTitle:"Danbooru Import data display",add:"Add Danbooru Tag",edit:"Edit Danbooru Tag"}};/*!
* pinia v3.0.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let bf;const gr=e=>bf=e,wf=Symbol();function ii(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ls;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ls||(ls={}));function T0(){const e=sl(!0),t=e.run(()=>b({}));let o=[],n=[];const a=vl({install(s){gr(a),a._a=s,s.provide(wf,a),s.config.globalProperties.$pinia=a,n.forEach(r=>o.push(r)),n=[]},use(s){return this._a?o.push(s):n.push(s),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return a}const xf=()=>{};function Tf(e,t,o,n=xf){e.push(t);const a=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),n())};return!o&&gu()&&Zg(a),a}function ma(e,...t){e.slice().forEach(o=>{o(...t)})}const S0=e=>e(),Sf=Symbol(),ui=Symbol();function ci(e,t){e instanceof Map&&t instanceof Map?t.forEach((o,n)=>e.set(n,o)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const n=t[o],a=e[o];ii(a)&&ii(n)&&e.hasOwnProperty(o)&&!At(n)&&!bo(n)?e[o]=ci(a,n):e[o]=n}return e}const k0=Symbol();function C0(e){return!ii(e)||!Object.prototype.hasOwnProperty.call(e,k0)}const{assign:Io}=Object;function E0(e){return!!(At(e)&&e.effect)}function L0(e,t,o,n){const{state:a,actions:s,getters:r}=t,l=o.state.value[e];let u;function d(){l||(o.state.value[e]=a?a():{});const c=Tm(o.state.value[e]);return Io(c,s,Object.keys(r||{}).reduce((f,g)=>(f[g]=vl(et(()=>{gr(o);const p=o._s.get(e);return r[g].call(p,p)})),f),{}))}return u=kf(e,d,t,o,n,!0),u}function kf(e,t,o={},n,a,s){let r;const l=Io({actions:{}},o),u={deep:!0};let d,c,f=[],g=[],p;const v=n.state.value[e];!s&&!v&&(n.state.value[e]={}),b({});let y;function x(j){let q;d=c=!1,typeof j=="function"?(j(n.state.value[e]),q={type:ls.patchFunction,storeId:e,events:p}):(ci(n.state.value[e],j),q={type:ls.patchObject,payload:j,storeId:e,events:p});const fe=y=Symbol();Ge().then(()=>{y===fe&&(d=!0)}),c=!0,ma(f,q,n.state.value[e])}const S=s?function(){const{state:q}=o,fe=q?q():{};this.$patch(te=>{Io(te,fe)})}:xf;function $(){r.stop(),f=[],g=[],n._s.delete(e)}const W=(j,q="")=>{if(Sf in j)return j[ui]=q,j;const fe=function(){gr(n);const te=Array.from(arguments),I=[],R=[];function H(oe){I.push(oe)}function U(oe){R.push(oe)}ma(g,{args:te,name:fe[ui],store:A,after:H,onError:U});let ne;try{ne=j.apply(this&&this.$id===e?this:A,te)}catch(oe){throw ma(R,oe),oe}return ne instanceof Promise?ne.then(oe=>(ma(I,oe),oe)).catch(oe=>(ma(R,oe),Promise.reject(oe))):(ma(I,ne),ne)};return fe[Sf]=!0,fe[ui]=q,fe},w={_p:n,$id:e,$onAction:Tf.bind(null,g),$patch:x,$reset:S,$subscribe(j,q={}){const fe=Tf(f,j,q.detached,()=>te()),te=r.run(()=>it(()=>n.state.value[e],I=>{(q.flush==="sync"?c:d)&&j({storeId:e,type:ls.direct,events:p},I)},Io({},u,q)));return fe},$dispose:$},A=Ns(w);n._s.set(e,A);const z=(n._a&&n._a.runWithContext||S0)(()=>n._e.run(()=>(r=sl()).run(()=>t({action:W}))));for(const j in z){const q=z[j];if(At(q)&&!E0(q)||bo(q))s||(v&&C0(q)&&(At(q)?q.value=v[j]:ci(q,v[j])),n.state.value[e][j]=q);else if(typeof q=="function"){const fe=W(q,j);z[j]=fe,l.actions[j]=q}}return Io(A,z),Io(ot(A),z),Object.defineProperty(A,"$state",{get:()=>n.state.value[e],set:j=>{x(q=>{Io(q,j)})}}),n._p.forEach(j=>{Io(A,r.run(()=>j({store:A,app:n._a,pinia:n,options:l})))}),v&&s&&o.hydrate&&o.hydrate(A.$state,v),d=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function $0(e,t,o){let n;const a=typeof t=="function";n=a?o:t;function s(r,l){const u=ih();return r=r||(u?ao(wf,null):null),r&&gr(r),r=bf,r._s.has(e)||(a?kf(e,t,n,r):L0(e,n,r)),r._s.get(e)}return s.$id=e,s}const mr=$0("tag",()=>{const e=b([]),t=b({user_lang:"zh_CN"}),o=b(0);return{categories:e,setCategories:r=>{e.value=r},userSetting:t,setUserSetting:r=>{t.value=r},isFirstLoading:o,setisFirstLoading:r=>{o.value=r}}});function Cf(e,t){return function(){return e.apply(t,arguments)}}const{toString:A0}=Object.prototype,{getPrototypeOf:di}=Object,{iterator:hr,toStringTag:Ef}=Symbol,vr=(e=>t=>{const o=A0.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Nn=e=>(e=e.toLowerCase(),t=>vr(t)===e),_r=e=>t=>typeof t===e,{isArray:ha}=Array,is=_r("undefined");function us(e){return e!==null&&!is(e)&&e.constructor!==null&&!is(e.constructor)&&mn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lf=Nn("ArrayBuffer");function I0(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lf(e.buffer),t}const M0=_r("string"),mn=_r("function"),$f=_r("number"),cs=e=>e!==null&&typeof e=="object",O0=e=>e===!0||e===!1,yr=e=>{if(vr(e)!=="object")return!1;const t=di(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ef in e)&&!(hr in e)},R0=e=>{if(!cs(e)||us(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},N0=Nn("Date"),D0=Nn("File"),P0=Nn("Blob"),F0=Nn("FileList"),U0=e=>cs(e)&&mn(e.pipe),B0=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||mn(e.append)&&((t=vr(e))==="formdata"||t==="object"&&mn(e.toString)&&e.toString()==="[object FormData]"))},H0=Nn("URLSearchParams"),[j0,W0,V0,z0]=["ReadableStream","Request","Response","Headers"].map(Nn),q0=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ds(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ha(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(us(e))return;const s=o?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let l;for(n=0;n<r;n++)l=s[n],t.call(null,e[l],l,e)}}function Af(e,t){if(us(e))return null;t=t.toLowerCase();const o=Object.keys(e);let n=o.length,a;for(;n-- >0;)if(a=o[n],t===a.toLowerCase())return a;return null}const Go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,If=e=>!is(e)&&e!==Go;function fi(){const{caseless:e}=If(this)&&this||{},t={},o=(n,a)=>{const s=e&&Af(t,a)||a;yr(t[s])&&yr(n)?t[s]=fi(t[s],n):yr(n)?t[s]=fi({},n):ha(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&ds(arguments[n],o);return t}const G0=(e,t,o,{allOwnKeys:n}={})=>(ds(t,(a,s)=>{o&&mn(a)?e[s]=Cf(a,o):e[s]=a},{allOwnKeys:n}),e),Q0=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Y0=(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},K0=(e,t,o,n)=>{let a,s,r;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)r=a[s],(!n||n(r,e,t))&&!l[r]&&(t[r]=e[r],l[r]=!0);e=o!==!1&&di(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},J0=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return n!==-1&&n===o},X0=e=>{if(!e)return null;if(ha(e))return e;let t=e.length;if(!$f(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},Z0=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&di(Uint8Array)),e_=(e,t)=>{const n=(e&&e[hr]).call(e);let a;for(;(a=n.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},t_=(e,t)=>{let o;const n=[];for(;(o=e.exec(t))!==null;)n.push(o);return n},n_=Nn("HTMLFormElement"),o_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,n,a){return n.toUpperCase()+a}),Mf=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),a_=Nn("RegExp"),Of=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};ds(o,(a,s)=>{let r;(r=t(a,s,e))!==!1&&(n[s]=r||a)}),Object.defineProperties(e,n)},s_=e=>{Of(e,(t,o)=>{if(mn(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if(mn(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},r_=(e,t)=>{const o={},n=a=>{a.forEach(s=>{o[s]=!0})};return ha(e)?n(e):n(String(e).split(t)),o},l_=()=>{},i_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function u_(e){return!!(e&&mn(e.append)&&e[Ef]==="FormData"&&e[hr])}const c_=e=>{const t=new Array(10),o=(n,a)=>{if(cs(n)){if(t.indexOf(n)>=0)return;if(us(n))return n;if(!("toJSON"in n)){t[a]=n;const s=ha(n)?[]:{};return ds(n,(r,l)=>{const u=o(r,a+1);!is(u)&&(s[l]=u)}),t[a]=void 0,s}}return n};return o(e,0)},d_=Nn("AsyncFunction"),f_=e=>e&&(cs(e)||mn(e))&&mn(e.then)&&mn(e.catch),Rf=((e,t)=>e?setImmediate:t?((o,n)=>(Go.addEventListener("message",({source:a,data:s})=>{a===Go&&s===o&&n.length&&n.shift()()},!1),a=>{n.push(a),Go.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",mn(Go.postMessage)),p_=typeof queueMicrotask<"u"?queueMicrotask.bind(Go):typeof process<"u"&&process.nextTick||Rf,_e={isArray:ha,isArrayBuffer:Lf,isBuffer:us,isFormData:B0,isArrayBufferView:I0,isString:M0,isNumber:$f,isBoolean:O0,isObject:cs,isPlainObject:yr,isEmptyObject:R0,isReadableStream:j0,isRequest:W0,isResponse:V0,isHeaders:z0,isUndefined:is,isDate:N0,isFile:D0,isBlob:P0,isRegExp:a_,isFunction:mn,isStream:U0,isURLSearchParams:H0,isTypedArray:Z0,isFileList:F0,forEach:ds,merge:fi,extend:G0,trim:q0,stripBOM:Q0,inherits:Y0,toFlatObject:K0,kindOf:vr,kindOfTest:Nn,endsWith:J0,toArray:X0,forEachEntry:e_,matchAll:t_,isHTMLForm:n_,hasOwnProperty:Mf,hasOwnProp:Mf,reduceDescriptors:Of,freezeMethods:s_,toObjectSet:r_,toCamelCase:o_,noop:l_,toFiniteNumber:i_,findKey:Af,global:Go,isContextDefined:If,isSpecCompliantForm:u_,toJSONObject:c_,isAsyncFn:d_,isThenable:f_,setImmediate:Rf,asap:p_,isIterable:e=>e!=null&&mn(e[hr])};function Qe(e,t,o,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}_e.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Nf=Qe.prototype,Df={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Df[e]={value:e}}),Object.defineProperties(Qe,Df),Object.defineProperty(Nf,"isAxiosError",{value:!0}),Qe.from=(e,t,o,n,a,s)=>{const r=Object.create(Nf);return _e.toFlatObject(e,r,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),Qe.call(r,e.message,t,o,n,a),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const g_=null;function pi(e){return _e.isPlainObject(e)||_e.isArray(e)}function Pf(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function Ff(e,t,o){return e?e.concat(t).map(function(a,s){return a=Pf(a),!o&&s?"["+a+"]":a}).join(o?".":""):t}function m_(e){return _e.isArray(e)&&!e.some(pi)}const h_=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function br(e,t,o){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=_e.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!_e.isUndefined(x[y])});const n=o.metaTokens,a=o.visitor||c,s=o.dots,r=o.indexes,u=(o.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(a))throw new TypeError("visitor must be a function");function d(v){if(v===null)return"";if(_e.isDate(v))return v.toISOString();if(_e.isBoolean(v))return v.toString();if(!u&&_e.isBlob(v))throw new Qe("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(v)||_e.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,y,x){let S=v;if(v&&!x&&typeof v=="object"){if(_e.endsWith(y,"{}"))y=n?y:y.slice(0,-2),v=JSON.stringify(v);else if(_e.isArray(v)&&m_(v)||(_e.isFileList(v)||_e.endsWith(y,"[]"))&&(S=_e.toArray(v)))return y=Pf(y),S.forEach(function(W,w){!(_e.isUndefined(W)||W===null)&&t.append(r===!0?Ff([y],w,s):r===null?y:y+"[]",d(W))}),!1}return pi(v)?!0:(t.append(Ff(x,y,s),d(v)),!1)}const f=[],g=Object.assign(h_,{defaultVisitor:c,convertValue:d,isVisitable:pi});function p(v,y){if(!_e.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(v),_e.forEach(v,function(S,$){(!(_e.isUndefined(S)||S===null)&&a.call(t,S,_e.isString($)?$.trim():$,y,g))===!0&&p(S,y?y.concat($):[$])}),f.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Uf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function gi(e,t){this._pairs=[],e&&br(e,this,t)}const Bf=gi.prototype;Bf.append=function(t,o){this._pairs.push([t,o])},Bf.toString=function(t){const o=t?function(n){return t.call(this,n,Uf)}:Uf;return this._pairs.map(function(a){return o(a[0])+"="+o(a[1])},"").join("&")};function v_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hf(e,t,o){if(!t)return e;const n=o&&o.encode||v_;_e.isFunction(o)&&(o={serialize:o});const a=o&&o.serialize;let s;if(a?s=a(t,o):s=_e.isURLSearchParams(t)?t.toString():new gi(t,o).toString(n),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class jf{constructor(){this.handlers=[]}use(t,o,n){return this.handlers.push({fulfilled:t,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Wf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},__={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:gi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mi=typeof window<"u"&&typeof document<"u",hi=typeof navigator=="object"&&navigator||void 0,y_=mi&&(!hi||["ReactNative","NativeScript","NS"].indexOf(hi.product)<0),b_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",w_=mi&&window.location.href||"http://localhost",on={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mi,hasStandardBrowserEnv:y_,hasStandardBrowserWebWorkerEnv:b_,navigator:hi,origin:w_},Symbol.toStringTag,{value:"Module"})),...__};function x_(e,t){return br(e,new on.classes.URLSearchParams,{visitor:function(o,n,a,s){return on.isNode&&_e.isBuffer(o)?(this.append(n,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function T_(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function S_(e){const t={},o=Object.keys(e);let n;const a=o.length;let s;for(n=0;n<a;n++)s=o[n],t[s]=e[s];return t}function Vf(e){function t(o,n,a,s){let r=o[s++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),u=s>=o.length;return r=!r&&_e.isArray(a)?a.length:r,u?(_e.hasOwnProp(a,r)?a[r]=[a[r],n]:a[r]=n,!l):((!a[r]||!_e.isObject(a[r]))&&(a[r]=[]),t(o,n,a[r],s)&&_e.isArray(a[r])&&(a[r]=S_(a[r])),!l)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const o={};return _e.forEachEntry(e,(n,a)=>{t(T_(n),a,o,0)}),o}return null}function k_(e,t,o){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const fs={transitional:Wf,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const n=o.getContentType()||"",a=n.indexOf("application/json")>-1,s=_e.isObject(t);if(s&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return a?JSON.stringify(Vf(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return x_(t,this.formSerializer).toString();if((l=_e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return br(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||a?(o.setContentType("application/json",!1),k_(t)):t}],transformResponse:[function(t){const o=this.transitional||fs.transitional,n=o&&o.forcedJSONParsing,a=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(n&&!this.responseType||a)){const r=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?Qe.from(l,Qe.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:on.classes.FormData,Blob:on.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{fs.headers[e]={}});const C_=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),E_=e=>{const t={};let o,n,a;return e&&e.split(`
`).forEach(function(r){a=r.indexOf(":"),o=r.substring(0,a).trim().toLowerCase(),n=r.substring(a+1).trim(),!(!o||t[o]&&C_[o])&&(o==="set-cookie"?t[o]?t[o].push(n):t[o]=[n]:t[o]=t[o]?t[o]+", "+n:n)}),t},zf=Symbol("internals");function ps(e){return e&&String(e).trim().toLowerCase()}function wr(e){return e===!1||e==null?e:_e.isArray(e)?e.map(wr):String(e)}function L_(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)t[n[1]]=n[2];return t}const $_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vi(e,t,o,n,a){if(_e.isFunction(n))return n.call(this,t,o);if(a&&(t=o),!!_e.isString(t)){if(_e.isString(n))return t.indexOf(n)!==-1;if(_e.isRegExp(n))return n.test(t)}}function A_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,n)=>o.toUpperCase()+n)}function I_(e,t){const o=_e.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+o,{value:function(a,s,r){return this[n].call(this,t,a,s,r)},configurable:!0})})}let hn=class{constructor(t){t&&this.set(t)}set(t,o,n){const a=this;function s(l,u,d){const c=ps(u);if(!c)throw new Error("header name must be a non-empty string");const f=_e.findKey(a,c);(!f||a[f]===void 0||d===!0||d===void 0&&a[f]!==!1)&&(a[f||u]=wr(l))}const r=(l,u)=>_e.forEach(l,(d,c)=>s(d,c,u));if(_e.isPlainObject(t)||t instanceof this.constructor)r(t,o);else if(_e.isString(t)&&(t=t.trim())&&!$_(t))r(E_(t),o);else if(_e.isObject(t)&&_e.isIterable(t)){let l={},u,d;for(const c of t){if(!_e.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[d=c[0]]=(u=l[d])?_e.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}r(l,o)}else t!=null&&s(o,t,n);return this}get(t,o){if(t=ps(t),t){const n=_e.findKey(this,t);if(n){const a=this[n];if(!o)return a;if(o===!0)return L_(a);if(_e.isFunction(o))return o.call(this,a,n);if(_e.isRegExp(o))return o.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=ps(t),t){const n=_e.findKey(this,t);return!!(n&&this[n]!==void 0&&(!o||vi(this,this[n],n,o)))}return!1}delete(t,o){const n=this;let a=!1;function s(r){if(r=ps(r),r){const l=_e.findKey(n,r);l&&(!o||vi(n,n[l],l,o))&&(delete n[l],a=!0)}}return _e.isArray(t)?t.forEach(s):s(t),a}clear(t){const o=Object.keys(this);let n=o.length,a=!1;for(;n--;){const s=o[n];(!t||vi(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){const o=this,n={};return _e.forEach(this,(a,s)=>{const r=_e.findKey(n,s);if(r){o[r]=wr(a),delete o[s];return}const l=t?A_(s):String(s).trim();l!==s&&delete o[s],o[l]=wr(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return _e.forEach(this,(n,a)=>{n!=null&&n!==!1&&(o[a]=t&&_e.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[zf]=this[zf]={accessors:{}}).accessors,a=this.prototype;function s(r){const l=ps(r);n[l]||(I_(a,r),n[l]=!0)}return _e.isArray(t)?t.forEach(s):s(t),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(hn.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),_e.freezeMethods(hn);function _i(e,t){const o=this||fs,n=t||o,a=hn.from(n.headers);let s=n.data;return _e.forEach(e,function(l){s=l.call(o,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function qf(e){return!!(e&&e.__CANCEL__)}function va(e,t,o){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,o),this.name="CanceledError"}_e.inherits(va,Qe,{__CANCEL__:!0});function Gf(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new Qe("Request failed with status code "+o.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function M_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O_(e,t){e=e||10;const o=new Array(e),n=new Array(e);let a=0,s=0,r;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),c=n[s];r||(r=d),o[a]=u,n[a]=d;let f=s,g=0;for(;f!==a;)g+=o[f++],f=f%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),d-r<t)return;const p=c&&d-c;return p?Math.round(g*1e3/p):void 0}}function R_(e,t){let o=0,n=1e3/t,a,s;const r=(d,c=Date.now())=>{o=c,a=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const c=Date.now(),f=c-o;f>=n?r(d,c):(a=d,s||(s=setTimeout(()=>{s=null,r(a)},n-f)))},()=>a&&r(a)]}const xr=(e,t,o=3)=>{let n=0;const a=O_(50,250);return R_(s=>{const r=s.loaded,l=s.lengthComputable?s.total:void 0,u=r-n,d=a(u),c=r<=l;n=r;const f={loaded:r,total:l,progress:l?r/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&c?(l-r)/d:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},o)},Qf=(e,t)=>{const o=e!=null;return[n=>t[0]({lengthComputable:o,total:e,loaded:n}),t[1]]},Yf=e=>(...t)=>_e.asap(()=>e(...t)),N_=on.hasStandardBrowserEnv?((e,t)=>o=>(o=new URL(o,on.origin),e.protocol===o.protocol&&e.host===o.host&&(t||e.port===o.port)))(new URL(on.origin),on.navigator&&/(msie|trident)/i.test(on.navigator.userAgent)):()=>!0,D_=on.hasStandardBrowserEnv?{write(e,t,o,n,a,s){const r=[e+"="+encodeURIComponent(t)];_e.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),_e.isString(n)&&r.push("path="+n),_e.isString(a)&&r.push("domain="+a),s===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function P_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function F_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Kf(e,t,o){let n=!P_(t);return e&&(n||o==!1)?F_(e,t):t}const Jf=e=>e instanceof hn?{...e}:e;function Qo(e,t){t=t||{};const o={};function n(d,c,f,g){return _e.isPlainObject(d)&&_e.isPlainObject(c)?_e.merge.call({caseless:g},d,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function a(d,c,f,g){if(_e.isUndefined(c)){if(!_e.isUndefined(d))return n(void 0,d,f,g)}else return n(d,c,f,g)}function s(d,c){if(!_e.isUndefined(c))return n(void 0,c)}function r(d,c){if(_e.isUndefined(c)){if(!_e.isUndefined(d))return n(void 0,d)}else return n(void 0,c)}function l(d,c,f){if(f in t)return n(d,c);if(f in e)return n(void 0,d)}const u={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(d,c,f)=>a(Jf(d),Jf(c),f,!0)};return _e.forEach(Object.keys({...e,...t}),function(c){const f=u[c]||a,g=f(e[c],t[c],c);_e.isUndefined(g)&&f!==l||(o[c]=g)}),o}const Xf=e=>{const t=Qo({},e);let{data:o,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:r,auth:l}=t;t.headers=r=hn.from(r),t.url=Hf(Kf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(_e.isFormData(o)){if(on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((u=r.getContentType())!==!1){const[d,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];r.setContentType([d||"multipart/form-data",...c].join("; "))}}if(on.hasStandardBrowserEnv&&(n&&_e.isFunction(n)&&(n=n(t)),n||n!==!1&&N_(t.url))){const d=a&&s&&D_.read(s);d&&r.set(a,d)}return t},U_=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){const a=Xf(e);let s=a.data;const r=hn.from(a.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=a,c,f,g,p,v;function y(){p&&p(),v&&v(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function S(){if(!x)return;const W=hn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:W,config:e,request:x};Gf(function(z){o(z),y()},function(z){n(z),y()},A),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(S)},x.onabort=function(){x&&(n(new Qe("Request aborted",Qe.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new Qe("Network Error",Qe.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const A=a.transitional||Wf;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new Qe(w,A.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,x)),x=null},s===void 0&&r.setContentType(null),"setRequestHeader"in x&&_e.forEach(r.toJSON(),function(w,A){x.setRequestHeader(A,w)}),_e.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),l&&l!=="json"&&(x.responseType=a.responseType),d&&([g,v]=xr(d,!0),x.addEventListener("progress",g)),u&&x.upload&&([f,p]=xr(u),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(c=W=>{x&&(n(!W||W.type?new va(null,e,x):W),x.abort(),x=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const $=M_(a.url);if($&&on.protocols.indexOf($)===-1){n(new Qe("Unsupported protocol "+$+":",Qe.ERR_BAD_REQUEST,e));return}x.send(s||null)})},B_=(e,t)=>{const{length:o}=e=e?e.filter(Boolean):[];if(t||o){let n=new AbortController,a;const s=function(d){if(!a){a=!0,l();const c=d instanceof Error?d:this.reason;n.abort(c instanceof Qe?c:new va(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,s(new Qe(`timeout ${t} of ms exceeded`,Qe.ETIMEDOUT))},t);const l=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=()=>_e.asap(l),u}},H_=function*(e,t){let o=e.byteLength;if(o<t){yield e;return}let n=0,a;for(;n<o;)a=n+t,yield e.slice(n,a),n=a},j_=async function*(e,t){for await(const o of W_(e))yield*H_(o,t)},W_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:o,value:n}=await t.read();if(o)break;yield n}}finally{await t.cancel()}},Zf=(e,t,o,n)=>{const a=j_(e,t);let s=0,r,l=u=>{r||(r=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:d,value:c}=await a.next();if(d){l(),u.close();return}let f=c.byteLength;if(o){let g=s+=f;o(g)}u.enqueue(new Uint8Array(c))}catch(d){throw l(d),d}},cancel(u){return l(u),a.return()}},{highWaterMark:2})},Tr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ep=Tr&&typeof ReadableStream=="function",V_=Tr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},z_=ep&&tp(()=>{let e=!1;const t=new Request(on.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),np=64*1024,yi=ep&&tp(()=>_e.isReadableStream(new Response("").body)),Sr={stream:yi&&(e=>e.body)};Tr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Sr[t]&&(Sr[t]=_e.isFunction(e[t])?o=>o[t]():(o,n)=>{throw new Qe(`Response type '${t}' is not supported`,Qe.ERR_NOT_SUPPORT,n)})})})(new Response);const q_=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(on.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await V_(e)).byteLength},G_=async(e,t)=>{const o=_e.toFiniteNumber(e.getContentLength());return o??q_(t)},bi={http:g_,xhr:U_,fetch:Tr&&(async e=>{let{url:t,method:o,data:n,signal:a,cancelToken:s,timeout:r,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:c,withCredentials:f="same-origin",fetchOptions:g}=Xf(e);d=d?(d+"").toLowerCase():"text";let p=B_([a,s&&s.toAbortSignal()],r),v;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(u&&z_&&o!=="get"&&o!=="head"&&(x=await G_(c,n))!==0){let A=new Request(t,{method:"POST",body:n,duplex:"half"}),V;if(_e.isFormData(n)&&(V=A.headers.get("content-type"))&&c.setContentType(V),A.body){const[z,j]=Qf(x,xr(Yf(u)));n=Zf(A.body,np,z,j)}}_e.isString(f)||(f=f?"include":"omit");const S="credentials"in Request.prototype;v=new Request(t,{...g,signal:p,method:o.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:S?f:void 0});let $=await fetch(v,g);const W=yi&&(d==="stream"||d==="response");if(yi&&(l||W&&y)){const A={};["status","statusText","headers"].forEach(q=>{A[q]=$[q]});const V=_e.toFiniteNumber($.headers.get("content-length")),[z,j]=l&&Qf(V,xr(Yf(l),!0))||[];$=new Response(Zf($.body,np,z,()=>{j&&j(),y&&y()}),A)}d=d||"text";let w=await Sr[_e.findKey(Sr,d)||"text"]($,e);return!W&&y&&y(),await new Promise((A,V)=>{Gf(A,V,{data:w,headers:hn.from($.headers),status:$.status,statusText:$.statusText,config:e,request:v})})}catch(S){throw y&&y(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new Qe("Network Error",Qe.ERR_NETWORK,e,v),{cause:S.cause||S}):Qe.from(S,S&&S.code,e,v)}})};_e.forEach(bi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const op=e=>`- ${e}`,Q_=e=>_e.isFunction(e)||e===null||e===!1,ap={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let o,n;const a={};for(let s=0;s<t;s++){o=e[s];let r;if(n=o,!Q_(o)&&(n=bi[(r=String(o)).toLowerCase()],n===void 0))throw new Qe(`Unknown adapter '${r}'`);if(n)break;a[r||"#"+s]=n}if(!n){const s=Object.entries(a).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let r=t?s.length>1?`since :
`+s.map(op).join(`
`):" "+op(s[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:bi};function wi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new va(null,e)}function sp(e){return wi(e),e.headers=hn.from(e.headers),e.data=_i.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ap.getAdapter(e.adapter||fs.adapter)(e).then(function(n){return wi(e),n.data=_i.call(e,e.transformResponse,n),n.headers=hn.from(n.headers),n},function(n){return qf(n)||(wi(e),n&&n.response&&(n.response.data=_i.call(e,e.transformResponse,n.response),n.response.headers=hn.from(n.response.headers))),Promise.reject(n)})}const rp="1.11.0",kr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kr[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const lp={};kr.transitional=function(t,o,n){function a(s,r){return"[Axios v"+rp+"] Transitional option '"+s+"'"+r+(n?". "+n:"")}return(s,r,l)=>{if(t===!1)throw new Qe(a(r," has been removed"+(o?" in "+o:"")),Qe.ERR_DEPRECATED);return o&&!lp[r]&&(lp[r]=!0,console.warn(a(r," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,r,l):!0}},kr.spelling=function(t){return(o,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Y_(e,t,o){if(typeof e!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const s=n[a],r=t[s];if(r){const l=e[s],u=l===void 0||r(l,s,e);if(u!==!0)throw new Qe("option "+s+" must be "+u,Qe.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Qe("Unknown option "+s,Qe.ERR_BAD_OPTION)}}const Cr={assertOptions:Y_,validators:kr},Yn=Cr.validators;let Yo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new jf,response:new jf}}async request(t,o){try{return await this._request(t,o)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+s):n.stack=s}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Qo(this.defaults,o);const{transitional:n,paramsSerializer:a,headers:s}=o;n!==void 0&&Cr.assertOptions(n,{silentJSONParsing:Yn.transitional(Yn.boolean),forcedJSONParsing:Yn.transitional(Yn.boolean),clarifyTimeoutError:Yn.transitional(Yn.boolean)},!1),a!=null&&(_e.isFunction(a)?o.paramsSerializer={serialize:a}:Cr.assertOptions(a,{encode:Yn.function,serialize:Yn.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Cr.assertOptions(o,{baseUrl:Yn.spelling("baseURL"),withXsrfToken:Yn.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=s&&_e.merge(s.common,s[o.method]);s&&_e.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),o.headers=hn.concat(r,s);const l=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(u=u&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let c,f=0,g;if(!u){const v=[sp.bind(this),void 0];for(v.unshift(...l),v.push(...d),g=v.length,c=Promise.resolve(o);f<g;)c=c.then(v[f++],v[f++]);return c}g=l.length;let p=o;for(f=0;f<g;){const v=l[f++],y=l[f++];try{p=v(p)}catch(x){y.call(this,x);break}}try{c=sp.call(this,p)}catch(v){return Promise.reject(v)}for(f=0,g=d.length;f<g;)c=c.then(d[f++],d[f++]);return c}getUri(t){t=Qo(this.defaults,t);const o=Kf(t.baseURL,t.url,t.allowAbsoluteUrls);return Hf(o,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){Yo.prototype[t]=function(o,n){return this.request(Qo(n||{},{method:t,url:o,data:(n||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function o(n){return function(s,r,l){return this.request(Qo(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Yo.prototype[t]=o(),Yo.prototype[t+"Form"]=o(!0)});let K_=class Hg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const n=this;this.promise.then(a=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](a);n._listeners=null}),this.promise.then=a=>{let s;const r=new Promise(l=>{n.subscribe(l),s=l}).then(a);return r.cancel=function(){n.unsubscribe(s)},r},t(function(s,r,l){n.reason||(n.reason=new va(s,r,l),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=n=>{t.abort(n)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Hg(function(a){t=a}),cancel:t}}};function J_(e){return function(o){return e.apply(null,o)}}function X_(e){return _e.isObject(e)&&e.isAxiosError===!0}const xi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xi).forEach(([e,t])=>{xi[t]=e});function ip(e){const t=new Yo(e),o=Cf(Yo.prototype.request,t);return _e.extend(o,Yo.prototype,t,{allOwnKeys:!0}),_e.extend(o,t,null,{allOwnKeys:!0}),o.create=function(a){return ip(Qo(e,a))},o}const Nt=ip(fs);Nt.Axios=Yo,Nt.CanceledError=va,Nt.CancelToken=K_,Nt.isCancel=qf,Nt.VERSION=rp,Nt.toFormData=br,Nt.AxiosError=Qe,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=J_,Nt.isAxiosError=X_,Nt.mergeConfig=Qo,Nt.AxiosHeaders=hn,Nt.formToJSON=e=>Vf(_e.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=ap.getAdapter,Nt.HttpStatusCode=xi,Nt.default=Nt;const{Axios:fA,AxiosError:pA,CanceledError:gA,isCancel:mA,CancelToken:hA,VERSION:vA,all:_A,Cancel:yA,isAxiosError:bA,spread:wA,toFormData:xA,AxiosHeaders:TA,HttpStatusCode:SA,formToJSON:kA,getAdapter:CA,mergeConfig:EA}=Nt,Ae=Nt.create({baseURL:"/weilin/prompt_ui/api",timeout:3e4,headers:{"Content-Type":"application/json"}});Ae.interceptors.request.use(e=>e,e=>Promise.reject(e)),Ae.interceptors.response.use(e=>e.data,e=>Promise.reject(e));const Er={getUserSetting:async()=>await Ae({url:"/user_init/get_settings",method:"get"}),setUserLanguage:async e=>await Ae({url:"/user_init/set_user_lang",method:"post",data:{user_lang:e}}),startPanel:async()=>await Ae({url:"/panel/start",method:"post"})},up=()=>mr(),gs=u0({legacy:!1,locale:"zh_CN",fallbackLocale:"zh_CN",messages:{zh_CN:w0,en_US:x0}}),Z_=()=>{const e=up();Er.getUserSetting().then(t=>{var n;e.setUserSetting(t.data);const o=((n=e.userSetting)==null?void 0:n.user_lang)||"zh_CN";gs.global.locale.value=o})},e2=e=>{gs.global.locale.value=e,up().setUserSetting({user_lang:e})},t2=()=>{Z_()},n2={name:"popmessage",props:{type:{type:String,default:"success"},str:{type:String,default:"登陆成功"}},setup(){const e={warn:{color:"#E6A23C",backgroundColor:"rgb(253, 246, 236)",borderColor:"rgb(250, 236, 216)"},error:{color:"#F56C6C",backgroundColor:"rgb(254, 240, 240)",borderColor:"rgb(253, 226, 226)"},success:{color:"#67C23A",backgroundColor:"rgb(240, 249, 235)",borderColor:"rgb(225, 243, 216)"}},t=b(!1);return gt(()=>{t.value=!0}),{style:e,visible:t}}},o2={class:"text"};function a2(e,t,o,n,a,s){return be((T(),C("div",{class:"pop-message",style:ft(n.style[o.type])},[i("i",{class:Ce(["icon",[n.style[o.type].icon]])},null,2),i("span",o2,h(o.str),1)],4)),[[or,n.visible]])}const s2=vt(n2,[["render",a2],["__scopeId","data-v-7ee59bf2"]]),Ti=document.createElement("div");document.body.appendChild(Ti);let Si=null;const X=({str:e,type:t,name:o=""})=>{let n=gs.global.t(e);o.length>0&&(n=gs.global.t(e,{name:o}));const a=Ve(s2,{str:n,type:t});pd(a,Ti),Si&&clearTimeout(Si),Si=setTimeout(()=>{pd(null,Ti)},2e3)},r2={class:"language-selector-content"},l2=["onClick"],i2={class:"lang-name"},u2=vt({__name:"LanguageSwitcher",emits:["close"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(null),s=mr(),r=et(()=>s.userSetting.user_lang),l=[{code:"zh_CN",name:"简体中文"},{code:"en_US",name:"English"}],u=o,d=g=>{c(g),u("close",{})},c=g=>{Er.setUserLanguage(g).then(p=>{e2(g),window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*"),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.setLanguageSuccess"})}).catch(p=>{X({type:"warn",str:"message.setLanguageFailed"})})};return t({setPosition:g=>{if(!a.value)return;const p=a.value;p.style.position="fixed",p.style.top=`${g.bottom}px`}}),(g,p)=>(T(),C("div",{class:"language-selector",ref_key:"selectorRef",ref:a},[i("div",r2,[(T(),C(Oe,null,We(l,(v,y)=>i("div",{style:ft({"margin-top":y===0?"0":"2px"}),key:v.code,class:Ce(["language-option",{active:r.value===v.code}]),onClick:x=>d(v.code)},[i("span",i2,h(v.name),1)],14,l2)),64))])],512))}},[["__scopeId","data-v-b77d604b"]]),go="weilin_prompt_ui_",ms=vt({__name:"Dialog",props:{modelValue:Boolean,title:{type:String,default:"标题"},closeOnClickOverlay:{type:Boolean,default:!1},width:{type:String,default:"60%"}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,a=()=>{n("update:modelValue",!1)},s=()=>{o.closeOnClickOverlay&&a()};return(r,l)=>(T(),wt(Yu,{to:"#weilin_comfyui_tools_prompt_ui_div"},[Ve(Dl,{name:`${go}dialog-fade`},{default:pt(()=>[e.modelValue?(T(),C("div",{key:0,class:Ce(`${go}dialog-overlay`),onClick:s},[Ve(Dl,{name:`${go}dialog-slide`},{default:pt(()=>[i("div",{style:ft({width:e.width}),class:Ce(`${go}dialog`),onClick:l[0]||(l[0]=Xe(()=>{},["stop"]))},[i("div",{class:Ce(`${go}dialog-header`)},[i("h3",{class:Ce(`${go}dialog-title`)},h(e.title),3),i("button",{class:Ce(`${go}dialog-close`),onClick:a},[...l[1]||(l[1]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],2)],2),i("div",{class:Ce(`${go}dialog-content`)},[Va(r.$slots,"default")],2),r.$slots.footer?(T(),C("div",{key:0,class:Ce(`${go}dialog-footer`)},[Va(r.$slots,"footer")],2)):de("",!0)],6)]),_:3},8,["name"])],2)):de("",!0)]),_:3},8,["name"])]))}},[["__scopeId","data-v-d2e9c495"]]),$n={getTranslateLocal:async e=>await Ae({url:"/prompt/local/translate",method:"post",data:{phrase:e}}),getTranslatePackagesState:async()=>await Ae({url:"/translate/get/packages/state",method:"post",data:{}}),getTranslateSetting:async()=>await Ae({url:"/translate/get/setting",method:"post",data:{}}),applyTranslateSetting:async e=>await Ae({url:"/translate/apply_setting",method:"post",data:{setting:e}}),installTranslatePackage:async()=>await Ae({url:"/translate/install/translaterpackage",method:"post",timeout:0,data:{}}),getTranslateBuktSetting:async()=>await Ae({url:"/translate/get/tran_setting",method:"post",data:{}}),saveTranslateSetting:async(e,t,o)=>await Ae({url:"/translate/save_tran/setting",method:"post",data:{service:e,source_lang:t,target_lang:o}}),translaterText:async e=>await Ae({url:"/translate/tran/text",method:"post",timeout:0,data:{text:e}}),translaterInputText:async e=>await Ae({url:"/translate/tran/input",method:"post",timeout:0,data:{text:e}})},ki={getAutocomplete:async e=>await Ae({url:"/prompt/fast/autocomplete",method:"post",data:{query:e}}),getAutocompleteLimit:async()=>await Ae({url:"/get/setting/get_auto_limit_setting",method:"post"}),updateAutocompleteLimit:async e=>await Ae({url:"/update/setting/update_auto_limit_setting",method:"post",data:{limit:e}})},hs={updateOpenAiSetting:async e=>await Ae({url:"/prompt/openai/update_settings",method:"post",data:e}),addOpenAiSetting:async e=>await Ae({url:"/prompt/openai/add_setting",method:"post",data:e}),deleteOpenAiSetting:async e=>await Ae({url:"/prompt/openai/delete_setting",method:"post",data:e}),setOpenAiSelect:async e=>await Ae({url:"/prompt/openai/set_select",method:"post",data:e}),getOpenAiSetting:async()=>await Ae({url:"/prompt/openai/get_settings",method:"get"})},c2=["alibaba","baidu","bing","deepl","youdao","qqtransmart","sogou","niutrans","mymemory","modernmt","volcengine","iciba","iflytek","google","lingvanex","yandex","itranslate","systran","argos","apertium","reverso","cloudtranslation","translatecom","tilde","caiyun","qqfanyi","translateme","papago","mirai","iflyrec","hujiang","yeekit","languagewire","elia","judic","mglip","utibet"],cp=[{language:"chinese",translator:"zh"},{language:"english",translator:"en"},{language:"arabic",translator:"ar"},{language:"russian",translator:"ru"},{language:"french",translator:"fr"},{language:"german",translator:"de"},{language:"spanish",translator:"es"},{language:"portuguese",translator:"pt"},{language:"italian",translator:"it"},{language:"japanese",translator:"ja"},{language:"korean",translator:"ko"},{language:"greek",translator:"el"},{language:"dutch",translator:"nl"},{language:"hindi",translator:"hi"},{language:"turkish",translator:"tr"},{language:"malay",translator:"ms"},{language:"thai",translator:"th"},{language:"vietnamese",translator:"vi"},{language:"indonesian",translator:"id"},{language:"hebrew",translator:"he"},{language:"polish",translator:"pl"},{language:"mongolian",translator:"mn"},{language:"czech",translator:"cs"},{language:"hungarian",translator:"hu"},{language:"estonian",translator:"et"},{language:"bulgarian",translator:"bg"},{language:"danish",translator:"da"},{language:"finnish",translator:"fi"},{language:"romanian",translator:"ro"},{language:"swedish",translator:"sv"},{language:"slovenian",translator:"sl"},{language:"persian/farsi",translator:"fa"},{language:"bosnian",translator:"bs"},{language:"serbian",translator:"sr"},{language:"fijian",translator:"fj"},{language:"filipino",translator:"tl"},{language:"haitiancreole",translator:"ht"},{language:"catalan",translator:"ca"},{language:"croatian",translator:"hr"},{language:"latvian",translator:"lv"},{language:"lithuanian",translator:"lt"},{language:"urdu",translator:"ur"},{language:"ukrainian",translator:"uk"},{language:"welsh",translator:"cy"},{language:"tahiti",translator:"ty"},{language:"tongan",translator:"to"},{language:"swahili",translator:"sw"},{language:"samoan",translator:"sm"},{language:"slovak",translator:"sk"},{language:"afrikaans",translator:"af"},{language:"norwegian",translator:"no"},{language:"bengali",translator:"bn"},{language:"malagasy",translator:"mg"},{language:"maltese",translator:"mt"},{language:"queretaro otomi",translator:"otq"},{language:"klingon/tlhingan hol",translator:"tlh"},{language:"gujarati",translator:"gu"},{language:"tamil",translator:"ta"},{language:"telugu",translator:"te"},{language:"punjabi",translator:"pa"},{language:"amharic",translator:"am"},{language:"azerbaijani",translator:"az"},{language:"bashkir",translator:"ba"},{language:"belarusian",translator:"be"},{language:"cebuano",translator:"ceb"},{language:"chuvash",translator:"cv"},{language:"esperanto",translator:"eo"},{language:"basque",translator:"eu"},{language:"irish",translator:"ga"}],d2={class:"weilin-comfyui-settings-content"},f2={class:"weilin-comfyui-settings-sidebar"},p2={class:"weilin-comfyui-settings-main"},g2={key:0},m2={class:"weilin-comfyui-setting-select"},h2={value:"network"},v2={value:"translater"},_2={class:"weilin-comfyui-translator-settings"},y2={key:0,class:"weilin-comfyui-group-box"},b2={class:"weilin-comfyui-group-title"},w2={class:"weilin-comfyui-note-top"},x2={class:"weilin-comfyui-setting-item"},T2={value:"auto"},S2={value:"chinese_simplified"},k2={value:"english"},C2={class:"weilin-comfyui-setting-item"},E2={value:"chinese_simplified"},L2={value:"english"},$2={key:1,class:"weilin-comfyui-group-box"},A2={class:"weilin-comfyui-group-title"},I2={class:"weilin-comfyui-note-top"},M2={class:"weilin-comfyui-translater-innstall-status"},O2={class:"weilin-comfyui-translater-install-label"},R2={key:0,class:"weilin-comfyui-translater-install-label"},N2={key:1,class:"weilin-comfyui-translater-install-control"},D2=["disabled"],P2={key:0,class:"weilin-comfyui-translater-setting-box"},F2={class:"weilin-comfyui-setting-small-titile"},U2={class:"weilin-comfyui-setting-item"},B2=["index","value"],H2={class:"weilin-comfyui-language-selectors"},j2={class:"weilin-comfyui-setting-item"},W2=["index","value"],V2={class:"weilin-comfyui-setting-item"},z2=["index","value"],q2={key:1,class:"weilin-comfyui-tranlater-text-box"},G2={class:"weilin-comfyui-setting-small-titile"},Q2={class:"weilin-comfyui-setting-item"},Y2=["placeholder"],K2={class:"weilin-comfyui-setting-item"},J2=["placeholder"],X2={key:1},Z2={class:"weilin-comfyui-floating-ball-settings"},ey={class:"weilin-comfyui-setting-item"},ty=["placeholder"],ny={class:"weilin-comfyui-setting-item"},oy=["placeholder"],ay={class:"weilin-comfyui-setting-item"},sy=["placeholder"],ry={key:2},ly={class:"weilin-comfyui-floating-ball-settings",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"15px"}},iy={class:"weilin-comfyui-settings-column"},uy={class:"weilin-comfyui-setting-item"},cy={class:"weilin-comfyui-setting-item"},dy=["placeholder"],fy={class:"weilin-comfyui-setting-item"},py=["placeholder"],gy={class:"weilin-comfyui-setting-item"},my=["placeholder"],hy={class:"weilin-comfyui-settings-column"},vy={class:"weilin-comfyui-setting-item"},_y={value:"default"},yy={value:"custom"},by={key:0,class:"weilin-comfyui-setting-item"},wy={key:0,class:"weilin-comfyui-skin-preview"},xy=["src"],Ty={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},Sy={value:"gradient"},ky={value:"transparent"},Cy={key:0,class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},Ey={style:{display:"flex",gap:"10px","align-items":"center"}},Ly={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},$y={key:3},Ay={class:"weilin-comfyui-floating-ball-settings"},Iy={class:"weilin-comfyui-setting-item"},My={class:"weilin-comfyui-setting-item"},Oy={class:"weilin-comfyui-setting-item"},Ry={class:"weilin-comfyui-setting-item"},Ny={class:"weilin-comfyui-setting-item"},Dy={key:4},Py={class:"weilin-comfyui-openai-settings"},Fy={class:"weilin-comfyui-setting-item"},Uy=["value"],By={class:"weilin-comfyui-config-list"},Hy={class:"weilin-comfyui-config-header"},jy={class:"weilin-comfyui-config-actions"},Wy=["onClick"],Vy=["onClick"],zy={key:0,class:"weilin-comfyui-config-form"},qy={class:"weilin-comfyui-form-group"},Gy=["placeholder"],Qy={class:"weilin-comfyui-form-group"},Yy=["placeholder"],Ky={class:"weilin-comfyui-form-group"},Jy=["placeholder"],Xy={class:"weilin-comfyui-form-actions"},Zy=["onClick"],eb={key:1,class:"weilin-comfyui-config-details"},tb={key:0,class:"weilin-comfyui-config-form"},nb={class:"weilin-comfyui-form-group"},ob=["placeholder"],ab={class:"weilin-comfyui-form-group"},sb=["placeholder"],rb={class:"weilin-comfyui-form-group"},lb=["placeholder"],ib={class:"weilin-comfyui-form-actions"},ub={key:5},cb={class:"weilin-comfyui-sponsor-me-settings"},db={key:6},fb={class:"weilin-comfyui-start-panel-settings"},dp=vt({__name:"setting_dialog",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b("translator"),s=b("baidu"),r=b(""),l=b(localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english"),u=b(localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified"),d=b(localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1),c=b(localStorage.getItem("weilin_prompt_ui_floatingBallSize")||66),f=b(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||c.value),g=b(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true"),p=b(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),v=b(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),y=b(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),x=b(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),S=b(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),$=b(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50),W=b(localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true"),w=b(localStorage.getItem("weilin_prompt_ui_period_conversion")==="true"),A=b(localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true"),V=b(localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true"),z=b(localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"),j=b(""),q=b(""),fe=b(""),te=b(0),I=b([]),R=b(!1),H=b({api_key:"",base_url:"https://api.openai.com/v1",model:""}),U=b(!1),ne=b(-1),oe=b(""),D=b(!1),N=b(!1),le=b(""),we=b(""),ae=b(25),ie=b(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),ve=b(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),Te=Ie=>{a.value=Ie,Ie=="setting_auto_complete_limit"&&Je()},he=()=>{localStorage.setItem("weilin_prompt_ui_sourceLanguage",l.value),localStorage.setItem("weilin_prompt_ui_targetLanguage",u.value),window.parent.postMessage({type:"weilin_prompt_ui_translate_setting"},"*"),X({type:"success",str:"message.saveSuccess"})},P=Ie=>{const ke=Ie.target.files[0];if(ke){const Ee=new FileReader;Ee.onload=_t=>{v.value=_t.target.result,localStorage.setItem("weilin_prompt_ui_customSkinUrl",_t.target.result)},Ee.readAsDataURL(ke)}},Y=()=>{x.value="#6a11cb",S.value="#2575fc"},ee=()=>{if(d.value<1||c.value<5||f.value<5){X({type:"warn",str:"message.error"});return}localStorage.setItem("weilin_prompt_ui_floatingBallEnabled",g.value),localStorage.setItem("weilin_prompt_ui_floatingBallCount",d.value),localStorage.setItem("weilin_prompt_ui_floatingBallSize",c.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",f.value),localStorage.setItem("weilin_prompt_ui_ballSkinType",p.value),localStorage.setItem("weilin_prompt_ui_bgType",y.value),localStorage.setItem("weilin_prompt_ui_gradientColor1",x.value),localStorage.setItem("weilin_prompt_ui_gradientColor2",S.value),localStorage.setItem("weilin_prompt_ui_ballBorderRadius",$.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",f.value),window.parent.postMessage({type:"weilin_prompt_ui_floating_ball_setting"},"*"),X({type:"success",str:"message.saveSuccess"})},O=()=>{localStorage.setItem("weilin_prompt_ui_comma_conversion",W.value),localStorage.setItem("weilin_prompt_ui_period_conversion",w.value),localStorage.setItem("weilin_prompt_ui_bracket_conversion",A.value),localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion",V.value),localStorage.setItem("weilin_prompt_ui_underscore_to_bracket",z.value),X({type:"success",str:"message.saveSuccess"})},K=()=>{Er.getUserSetting().then(Ie=>{I.value=Ie.data.openai_settings,te.value=Ie.data.select_openai})},E=()=>{H.value={api_key:"",base_url:"https://api.openai.com/v1",model:""},U.value=!1,R.value=!0},L=Ie=>{hs.deleteOpenAiSetting({index:Ie}).then(ke=>{K(),X({type:"success",str:"message.deleteSuccess"})}).catch(ke=>{X({type:"warn",str:"message.networkError"})})},F=Ie=>{ne.value===Ie?ne.value=-1:(H.value={...I.value[Ie]},ne.value=Ie)},Z=Ie=>{hs.updateOpenAiSetting({index:Ie,...H.value}).then(ke=>{K(),ne.value=-1,X({type:"success",str:"message.saveSuccess"})}).catch(ke=>{X({type:"warn",str:"message.networkError"})})},ce=()=>{hs.addOpenAiSetting({...H.value}).then(Ie=>{K(),R.value=!1,ne.value=-1,X({type:"success",str:"message.saveSuccess"})}).catch(Ie=>{X({type:"warn",str:"message.networkError"})})},ge=()=>{R.value=!1,ne.value=-1},k=()=>{hs.setOpenAiSelect({index:te.value}).then(Ie=>{X({type:"success",str:"message.saveSuccess"})}).catch(Ie=>{X({type:"warn",str:"message.networkError"})})},_=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},M=()=>{Er.startPanel().then(Ie=>{X({type:"success",str:"message.startPanelSuccess"})}).catch(Ie=>{X({type:"warn",str:"message.startPanelFailed"})})},G=()=>{$n.getTranslatePackagesState().then(Ie=>{Ie.info=="ok"?N.value=!0:N.value=!1}).catch(Ie=>{X({type:"warn",str:"message.getTranslaterFail"})})},me=()=>{$n.getTranslateSetting().then(Ie=>{localStorage.setItem("weilin_prompt_ui_translater_setting",Ie.data),oe.value=Ie.data}).catch(Ie=>{X({type:"warn",str:"message.getTranslaterFail"})})},pe=()=>{$n.applyTranslateSetting(oe.value).then(Ie=>{Ie.info=="ok"?(localStorage.setItem("weilin_prompt_ui_translater_setting",oe.value),X({type:"success",str:"message.applyTranslaterSuccess"})):X({type:"warn",str:"message.applyToTranslaterFail"})}).catch(Ie=>{X({type:"warn",str:"message.applyTranslaterFail"})})},Q=()=>{$n.getTranslateBuktSetting().then(Ie=>{j.value=Ie.data.translate_service,q.value=Ie.data.translate_source_lang,fe.value=Ie.data.translate_target_lang}).catch(Ie=>{X({type:"warn",str:"message.getTranslaterFail"})})},se=()=>{$n.saveTranslateSetting(j.value,q.value,fe.value).then(Ie=>{Ie.info=="ok"?X({type:"success",str:"message.saveSuccess"}):X({type:"warn",str:"message.saveFailed"})}).catch(Ie=>{X({type:"warn",str:"message.saveFailed"})})},Me=()=>{$n.translaterInputText(le.value).then(Ie=>{we.value=Ie.text}).catch(Ie=>{X({type:"warn",str:"message.translaterTestFail"})})},Ne=b(null),je=()=>{D.value=!0,$n.installTranslatePackage().then(Ie=>{D.value=!1,N.value=!0,X({type:"success",str:"message.tranlaterPackageInstallSuccess"})}).catch(Ie=>{D.value=!1,X({type:"warn",str:"message.tranlaterPackageInstallFail"})})},Je=async()=>{await ki.getAutocompleteLimit().then(Ie=>{ae.value=Ie.data}).catch(Ie=>{console.error(Ie),X({type:"warn",str:"message.networkError"})})},tt=async()=>{await ki.updateAutocompleteLimit(ae.value).then(Ie=>{X({type:"success",str:"message.saveSuccess"}),localStorage.setItem("weilin_prompt_ui_auto_box_width",ie.value),localStorage.setItem("weilin_prompt_ui_auto_box_height",ve.value)}).catch(Ie=>{console.error(Ie),X({type:"warn",str:"message.networkError"})})};return gt(()=>{Q(),G(),me(),K()}),On(()=>{Ne.value&&clearInterval(Ne.value)}),t({open:()=>{a.value="translator",s.value="baidu",r.value="",l.value=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",u.value=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified",d.value=localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1,c.value=localStorage.getItem("weilin_prompt_ui_floatingBallSize")||5,g.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true",W.value=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",w.value=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",A.value=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",V.value=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",z.value=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",n.value=!0}}),(Ie,ke)=>(T(),wt(ms,{modelValue:n.value,"onUpdate:modelValue":ke[39]||(ke[39]=Ee=>n.value=Ee),title:m(o)("promptBox.settings.title")},{footer:pt(()=>[i("button",{onClick:ke[38]||(ke[38]=Ee=>n.value=!1)},h(m(o)("promptBox.settings.close")),1)]),default:pt(()=>[i("div",d2,[i("div",f2,[i("ul",null,[i("li",{class:Ce({"weilin-comfyui-active":a.value==="translator"}),onClick:ke[0]||(ke[0]=Ee=>Te("translator"))},h(m(o)("promptBox.settings.translator")),3),i("li",{class:Ce({"weilin-comfyui-active":a.value==="setting_auto_complete_limit"}),onClick:ke[1]||(ke[1]=Ee=>Te("setting_auto_complete_limit"))},h(m(o)("promptBox.settings.setting_auto_complete_limit")),3),i("li",{class:Ce({"weilin-comfyui-active":a.value==="setting_floating_ball"}),onClick:ke[2]||(ke[2]=Ee=>Te("setting_floating_ball"))},h(m(o)("promptBox.settings.setting_floating_ball")),3),i("li",{class:Ce({"weilin-comfyui-active":a.value==="setting_prompt_box"}),onClick:ke[3]||(ke[3]=Ee=>Te("setting_prompt_box"))},h(m(o)("promptBox.settings.setting_prompt_box")),3),i("li",{class:Ce({"weilin-comfyui-active":a.value==="setting_openai_box"}),onClick:ke[4]||(ke[4]=Ee=>Te("setting_openai_box"))},h(m(o)("promptBox.settings.setting_openai_box")),3),i("li",{class:Ce({"weilin-comfyui-active":a.value==="setting_sponsor_me"}),onClick:ke[5]||(ke[5]=Ee=>Te("setting_sponsor_me"))},h(m(o)("promptBox.settings.setting_sponsor_me")),3)])]),i("div",p2,[a.value==="translator"?(T(),C("div",g2,[i("h3",null,h(m(o)("promptBox.settings.translator")),1),i("div",m2,[i("label",null,h(m(o)("promptBox.settings.selectTranslater")),1),be(i("select",{style:{"margin-left":"10px"},"onUpdate:modelValue":ke[6]||(ke[6]=Ee=>oe.value=Ee),class:"weilin-comfyui-common-select"},[i("option",h2,h(m(o)("promptBox.settings.selectOptionNetworkTranslater")),1),i("option",v2,h(m(o)("promptBox.settings.selectOptionPythonTranslater")),1),ke[40]||(ke[40]=i("option",{value:"openai"},"OpenAI API 翻译",-1))],512),[[un,oe.value]]),i("button",{class:"weilin-comfyui-install-button",onClick:pe},h(m(o)("promptBox.settings.apply")),1)]),i("div",_2,[oe.value=="network"?(T(),C("div",y2,[i("div",b2,h(m(o)("promptBox.settings.selectOptionNetworkTranslaterTitle")),1),i("div",w2,h(m(o)("promptBox.settings.selectOptionNetworkTranslaterInfo"))+":https://github.com/xnx3/translate",1),i("div",x2,[i("label",null,h(m(o)("promptBox.settings.sourceLanguage")),1),be(i("select",{"onUpdate:modelValue":ke[7]||(ke[7]=Ee=>l.value=Ee),class:"weilin-comfyui-common-select"},[i("option",T2,h(m(o)("promptBox.settings.auto_detect")),1),i("option",S2,h(m(o)("promptBox.settings.chinese_simplified")),1),i("option",k2,h(m(o)("promptBox.settings.english")),1)],512),[[un,l.value]])]),i("div",C2,[i("label",null,h(m(o)("promptBox.settings.targetLanguage")),1),be(i("select",{"onUpdate:modelValue":ke[8]||(ke[8]=Ee=>u.value=Ee),class:"weilin-comfyui-common-select"},[i("option",E2,h(m(o)("promptBox.settings.chinese_simplified")),1),i("option",L2,h(m(o)("promptBox.settings.english")),1)],512),[[un,u.value]])]),i("button",{class:"weilin-comfyui-save-button",onClick:he},h(m(o)("promptBox.settings.save")),1)])):de("",!0),oe.value=="translater"?(T(),C("div",$2,[i("div",A2,h(m(o)("promptBox.settings.selectOptionPythonTranslaterTitle")),1),i("div",I2,h(m(o)("promptBox.settings.selectOptionPythonTranslaterInfo"))+":https://github.com/UlionTse/translators",1),i("div",M2,[i("div",O2,h(m(o)("promptBox.settings.nowTranlaterPackageState"))+" "+h(N.value?m(o)("promptBox.settings.tranlaterPackageStateTrue"):m(o)("promptBox.settings.tranlaterPackageStateFlase")),1),D.value?(T(),C("div",R2,h(m(o)("promptBox.settings.installTranslaterPackageInfo")),1)):de("",!0),N.value?de("",!0):(T(),C("div",N2,[i("button",{disabled:D.value,class:"weilin-comfyui-install-button",onClick:je},h(D.value?m(o)("promptBox.settings.installed"):m(o)("promptBox.settings.install")),9,D2)]))]),N.value?(T(),C("div",P2,[i("div",F2,h(m(o)("promptBox.settings.translaterSetting")),1),i("div",U2,[i("label",null,h(m(o)("promptBox.settings.chooseTranslaterSetting")),1),be(i("select",{"onUpdate:modelValue":ke[9]||(ke[9]=Ee=>j.value=Ee)},[(T(!0),C(Oe,null,We(m(c2),(Ee,_t)=>(T(),C("option",{index:_t,key:"tran-item_"+_t,value:Ee},h(m(o)("translaterService."+Ee)),9,B2))),128))],512),[[un,j.value]])]),i("div",H2,[i("div",j2,[i("label",null,h(m(o)("promptBox.settings.translaterLangSourceSetting")),1),be(i("select",{"onUpdate:modelValue":ke[10]||(ke[10]=Ee=>q.value=Ee)},[(T(!0),C(Oe,null,We(m(cp),(Ee,_t)=>(T(),C("option",{index:_t,key:"lan-item_"+_t,value:Ee.translator},h(m(o)("translaterLanguage."+Ee.language)),9,W2))),128))],512),[[un,q.value]])]),i("div",V2,[i("label",null,h(m(o)("promptBox.settings.translaterLangTargeSetting")),1),be(i("select",{"onUpdate:modelValue":ke[11]||(ke[11]=Ee=>fe.value=Ee)},[(T(!0),C(Oe,null,We(m(cp),(Ee,_t)=>(T(),C("option",{index:_t,key:"lan-mu-item_"+_t,value:Ee.translator},h(m(o)("translaterLanguage."+Ee.language)),9,z2))),128))],512),[[un,fe.value]])])]),i("button",{class:"weilin-comfyui-install-button",onClick:se},h(m(o)("promptBox.settings.saveTranslaterSetting")),1)])):de("",!0),N.value?(T(),C("div",q2,[i("div",G2,h(m(o)("promptBox.settings.testTranslaterTitle")),1),i("div",Q2,[i("label",null,h(m(o)("promptBox.settings.inputTestTranslater")),1),be(i("input",{type:"text","onUpdate:modelValue":ke[12]||(ke[12]=Ee=>le.value=Ee),placeholder:m(o)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,Y2),[[Le,le.value]])]),i("div",K2,[i("label",null,h(m(o)("promptBox.settings.outPutTestTranslater")),1),be(i("input",{type:"text","onUpdate:modelValue":ke[13]||(ke[13]=Ee=>we.value=Ee),readonly:"",placeholder:m(o)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,J2),[[Le,we.value]])]),i("button",{class:"weilin-comfyui-install-button",onClick:Me},h(m(o)("promptBox.settings.testingTranslater")),1)])):de("",!0)])):de("",!0)])])):de("",!0),a.value==="setting_auto_complete_limit"?(T(),C("div",X2,[i("h3",null,h(m(o)("promptBox.settings.setting_auto_complete_limit")),1),i("div",Z2,[i("div",ey,[i("label",null,h(m(o)("promptBox.settings.show_auto_limit")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[14]||(ke[14]=Ee=>ae.value=Ee),min:"1",max:"99999999",style:{width:"100px"},placeholder:m(o)("promptBox.settings.showAutoLimitPlaceholder")},null,8,ty),[[Le,ae.value,void 0,{number:!0}]])]),i("div",ny,[i("label",null,h(m(o)("promptBox.settings.settingAutoCompleteWidth")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[15]||(ke[15]=Ee=>ie.value=Ee),min:"5",style:{width:"100px"},placeholder:m(o)("promptBox.settings.settingAutoCompleteWidthPlaceholder")},null,8,oy),[[Le,ie.value,void 0,{number:!0}]])]),i("div",ay,[i("label",null,h(m(o)("promptBox.settings.settingAutoCompleteHeight")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[16]||(ke[16]=Ee=>ve.value=Ee),min:"5",style:{width:"100px"},placeholder:m(o)("promptBox.settings.settingAutoCompleteHeightPlaceholder")},null,8,sy),[[Le,ve.value,void 0,{number:!0}]])]),i("button",{class:"weilin-comfyui-save-button",onClick:tt},h(m(o)("promptBox.settings.save")),1)])])):de("",!0),a.value==="setting_floating_ball"?(T(),C("div",ry,[i("h3",null,h(m(o)("promptBox.settings.setting_floating_ball")),1),i("div",ly,[i("div",iy,[i("div",uy,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[17]||(ke[17]=Ee=>g.value=Ee)},null,512),[[qt,g.value]]),qe(" "+h(m(o)("promptBox.settings.enableFloatingBall")),1)])]),i("div",cy,[i("label",null,h(m(o)("promptBox.settings.floatingBallCount")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[18]||(ke[18]=Ee=>d.value=Ee),min:"1",max:"100",placeholder:m(o)("promptBox.settings.floatingBallCountPlaceholder")},null,8,dy),[[Le,d.value,void 0,{number:!0}]])]),i("div",fy,[i("label",null,h(m(o)("promptBox.settings.floatingBallSize")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[19]||(ke[19]=Ee=>c.value=Ee),min:"5",max:"999999",placeholder:m(o)("promptBox.settings.floatingBallSizePlaceholder")},null,8,py),[[Le,c.value,void 0,{number:!0}]])]),i("div",gy,[i("label",null,h(m(o)("promptBox.settings.floatingBallHeight")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[20]||(ke[20]=Ee=>f.value=Ee),min:"5",max:"999999",placeholder:m(o)("promptBox.settings.floatingBallHeightPlaceholder")},null,8,my),[[Le,f.value,void 0,{number:!0}]])])]),i("div",hy,[i("div",vy,[i("label",null,h(m(o)("promptBox.settings.skinSetting")),1),be(i("select",{"onUpdate:modelValue":ke[21]||(ke[21]=Ee=>p.value=Ee)},[i("option",_y,h(m(o)("promptBox.settings.defaultSkin")),1),i("option",yy,h(m(o)("promptBox.settings.customSkin")),1)],512),[[un,p.value]])]),p.value==="custom"?(T(),C("div",by,[i("label",null,h(m(o)("promptBox.settings.uploadSkin")),1),i("input",{type:"file",accept:"image/*",onChange:P,ref:"skinUploader"},null,544),v.value?(T(),C("div",wy,[i("img",{src:v.value,alt:"Custom Skin Preview"},null,8,xy)])):de("",!0)])):de("",!0)]),i("div",Ty,[i("label",null,h(m(o)("promptBox.settings.bgSetting")),1),be(i("select",{"onUpdate:modelValue":ke[22]||(ke[22]=Ee=>y.value=Ee)},[i("option",Sy,h(m(o)("promptBox.settings.gradientBg")),1),i("option",ky,h(m(o)("promptBox.settings.transparentBg")),1)],512),[[un,y.value]])]),y.value==="gradient"?(T(),C("div",Cy,[i("label",null,h(m(o)("promptBox.settings.gradientColor")),1),i("div",Ey,[be(i("input",{type:"color","onUpdate:modelValue":ke[23]||(ke[23]=Ee=>x.value=Ee)},null,512),[[Le,x.value]]),be(i("input",{type:"color","onUpdate:modelValue":ke[24]||(ke[24]=Ee=>S.value=Ee)},null,512),[[Le,S.value]]),i("button",{onClick:Y,style:{"margin-left":"10px",width:"200px"}},h(m(o)("promptBox.settings.resetToDefault")),1)])])):de("",!0),i("div",Ly,[i("label",null,h(m(o)("promptBox.settings.borderRadius")),1),be(i("input",{type:"number","onUpdate:modelValue":ke[25]||(ke[25]=Ee=>$.value=Ee),min:"0",max:"50"},null,512),[[Le,$.value,void 0,{number:!0}]])]),i("button",{class:"weilin-comfyui-save-button",style:{"grid-column":"span 2"},onClick:ee},h(m(o)("promptBox.settings.save")),1)])])):de("",!0),a.value==="setting_prompt_box"?(T(),C("div",$y,[i("h3",null,h(m(o)("promptBox.settings.setting_prompt_box")),1),i("div",Ay,[i("div",Iy,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[26]||(ke[26]=Ee=>W.value=Ee)},null,512),[[qt,W.value]]),qe(" "+h(m(o)("promptBox.settings.enableCommaConversion")),1)])]),i("div",My,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[27]||(ke[27]=Ee=>w.value=Ee)},null,512),[[qt,w.value]]),qe(" "+h(m(o)("promptBox.settings.enablePeriodConversion")),1)])]),i("div",Oy,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[28]||(ke[28]=Ee=>A.value=Ee)},null,512),[[qt,A.value]]),qe(" "+h(m(o)("promptBox.settings.enableBracketConversion")),1)])]),i("div",Ry,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[29]||(ke[29]=Ee=>V.value=Ee)},null,512),[[qt,V.value]]),qe(" "+h(m(o)("promptBox.settings.enableAngleBracketConversion")),1)])]),i("div",Ny,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":ke[30]||(ke[30]=Ee=>z.value=Ee)},null,512),[[qt,z.value]]),qe(" "+h(m(o)("promptBox.settings.enableUnderscoreToBracket")),1)])]),i("button",{class:"weilin-comfyui-save-button",onClick:O},h(m(o)("promptBox.settings.save")),1)])])):de("",!0),a.value==="setting_openai_box"?(T(),C("div",Dy,[i("h3",null,h(m(o)("promptBox.settings.openaiSettings")),1),i("div",Py,[i("div",Fy,[i("label",null,h(m(o)("promptBox.settings.selectedOpenaiConfig")),1),be(i("select",{"onUpdate:modelValue":ke[31]||(ke[31]=Ee=>te.value=Ee),onChange:k},[(T(!0),C(Oe,null,We(I.value,(Ee,_t)=>(T(),C("option",{key:_t,value:_t},h(Ee.model)+" ("+h(Ee.base_url)+") ",9,Uy))),128))],544),[[un,te.value]])]),i("div",By,[(T(!0),C(Oe,null,We(I.value,(Ee,_t)=>(T(),C("div",{key:_t,class:"weilin-comfyui-config-item"},[i("div",Hy,[i("span",null,h(Ee.model),1),i("div",jy,[i("button",{onClick:St=>F(_t)},h(ne.value===_t?m(o)("promptBox.settings.cancel"):m(o)("promptBox.settings.edit")),9,Wy),i("button",{onClick:St=>L(_t)},h(m(o)("promptBox.settings.delete")),9,Vy)])]),ne.value===_t?(T(),C("div",zy,[i("div",qy,[i("label",null,h(m(o)("promptBox.settings.openai_api_key"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[32]||(ke[32]=St=>H.value.api_key=St),placeholder:m(o)("promptBox.settings.openai_api_key_placeholder")},null,8,Gy),[[Le,H.value.api_key]])]),i("div",Qy,[i("label",null,h(m(o)("promptBox.settings.openai_base_url"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[33]||(ke[33]=St=>H.value.base_url=St),placeholder:m(o)("promptBox.settings.openai_base_url_placeholder")},null,8,Yy),[[Le,H.value.base_url]])]),i("div",Ky,[i("label",null,h(m(o)("promptBox.settings.openai_model"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[34]||(ke[34]=St=>H.value.model=St),placeholder:m(o)("promptBox.settings.openai_model_placeholder")},null,8,Jy),[[Le,H.value.model]])]),i("div",Xy,[i("button",{onClick:St=>Z(_t)},h(m(o)("promptBox.settings.save")),9,Zy)])])):(T(),C("div",eb,[i("div",null,h(m(o)("promptBox.settings.openai_api_key"))+": "+h(Ee.api_key?"******":m(o)("promptBox.settings.not_set")),1),i("div",null,h(m(o)("promptBox.settings.openai_base_url"))+": "+h(Ee.base_url),1)]))]))),128))]),R.value?(T(),C("div",tb,[i("div",nb,[i("label",null,h(m(o)("promptBox.settings.openai_api_key"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[35]||(ke[35]=Ee=>H.value.api_key=Ee),placeholder:m(o)("promptBox.settings.openai_api_key_placeholder")},null,8,ob),[[Le,H.value.api_key]])]),i("div",ab,[i("label",null,h(m(o)("promptBox.settings.openai_base_url"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[36]||(ke[36]=Ee=>H.value.base_url=Ee),placeholder:m(o)("promptBox.settings.openai_base_url_placeholder")},null,8,sb),[[Le,H.value.base_url]])]),i("div",rb,[i("label",null,h(m(o)("promptBox.settings.openai_model"))+":",1),be(i("input",{type:"text","onUpdate:modelValue":ke[37]||(ke[37]=Ee=>H.value.model=Ee),placeholder:m(o)("promptBox.settings.openai_model_placeholder")},null,8,lb),[[Le,H.value.model]])]),i("div",ib,[i("button",{onClick:ge},h(m(o)("promptBox.settings.cancel")),1),i("button",{onClick:ce},h(m(o)("promptBox.settings.save")),1)])])):de("",!0),R.value?de("",!0):(T(),C("button",{key:1,class:"weilin-comfyui-add-button",onClick:E},h(m(o)("promptBox.settings.addNewConfig")),1))])])):de("",!0),a.value==="setting_sponsor_me"?(T(),C("div",ub,[i("h3",null,h(m(o)("promptBox.settings.setting_sponsor_me")),1),i("div",cb,[i("h1",null,h(m(o)("promptBox.settings.sponsorMeTip")),1),i("h2",null,h(m(o)("promptBox.settings.sponsorMeLink")),1),i("button",{class:"weilin-comfyui-sponsor-me-button",onClick:_},h(m(o)("promptBox.settings.sponsorMe")),1)])])):de("",!0),a.value==="setting_start_panel"?(T(),C("div",db,[i("h3",null,h(m(o)("promptBox.settings.setting_start_panel")),1),i("div",fb,[i("h4",null,h(m(o)("promptBox.settings.startPanelTip")),1),i("button",{class:"weilin-comfyui-start-panel-button",onClick:M},h(m(o)("promptBox.settings.startPanel")),1)])])):de("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-a1efb898"]]),pb=["title"],gb={class:"switch-icon"},mb={key:0,class:"moon",viewBox:"0 0 24 24"},hb={key:1,class:"sun",viewBox:"0 0 24 24"},vb="weilin_tools_",_b=vt({__name:"ThemeSwitch",setup(e){const{t}=ht(),o=`${vb}theme`,n=b(localStorage.getItem(o)==="dark"),a=()=>{n.value=!n.value;const s=document.getElementById("weilin_comfyui_tools_prompt_ui_div");s&&s.setAttribute("data-theme",n.value?"dark":"light"),localStorage.setItem(o,n.value?"dark":"light")};return(s,r)=>(T(),C("button",{class:"theme-switch",onClick:a,title:m(t)("theme.toggle")},[i("div",gb,[n.value?(T(),C("svg",mb,[...r[0]||(r[0]=[i("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(T(),C("svg",hb,[...r[1]||(r[1]=[i("circle",{cx:"12",cy:"12",r:"5"},null,-1),i("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"},null,-1)])]))]),Va(s.$slots,"default",{isDark:n.value},void 0,!0)],8,pb))}},[["__scopeId","data-v-e8b2125f"]]),vn="weilin_tools_",It={getTagsList:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/get_group_tags",method:"get",params:{...e,lang:t}})},addPrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/add_new_f_group",method:"post",data:{...e,lang:t}})},editPrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_f_group",method:"post",data:{...e,lang:t}})},deletePrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_f_group",method:"post",data:{...e,lang:t}})},addSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/add_new_s_group",method:"post",data:{...e,lang:t}})},editSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_s_group",method:"post",data:{...e,lang:t}})},deleteSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_s_group",method:"post",data:{...e,lang:t}})},addNewTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/new_tags",method:"post",data:{...e,lang:t}})},editTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_tags",method:"post",data:{...e,lang:t}})},deleteTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_tags",method:"post",data:{...e,lang:t}})},batchDeleteTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/batch_delete_tags",method:"post",data:{...e,lang:t}})},moveTag:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_tag",method:"post",data:{...e,lang:t}})},getTagsGroupList:async()=>await Ae({url:"/prompt/get_groups_list",method:"post"}),runSQLToServer:async e=>await Ae({url:"/prompt/run_sql_text",method:"post",timeout:0,data:{sql:e}}),moveMainGroup:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_group",method:"post",data:{...e,lang:t}})},moveSubGroup:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_subgroup",method:"post",data:{...e,lang:t}})},getTagMainGroup:async()=>await Ae({url:"/prompt/get_tag_groups",method:"post"}),getTagSubGroup:async e=>await Ae({url:"/prompt/get_tag_subgroups",method:"post",data:{p_uuid:e}}),getTagList:async e=>await Ae({url:"/prompt/get_tag_tags",method:"post",data:{g_uuid:e}}),searchTag:async e=>await Ae({url:"/prompt/search_tags",method:"post",data:{keyword:e}})};/**
* uuidv7: A JavaScript implementation of UUID version 7
*
* Copyright 2021-2024 LiosK
*
* @license Apache-2.0
* @packageDocumentation
*/const Lr="0123456789abcdef";class Ko{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new Ko(t)}static fromFieldsV7(t,o,n,a){if(!Number.isInteger(t)||!Number.isInteger(o)||!Number.isInteger(n)||!Number.isInteger(a)||t<0||o<0||n<0||a<0||t>0xffffffffffff||o>4095||n>1073741823||a>4294967295)throw new RangeError("invalid field value");const s=new Uint8Array(16);return s[0]=t/2**40,s[1]=t/2**32,s[2]=t/2**24,s[3]=t/2**16,s[4]=t/2**8,s[5]=t,s[6]=112|o>>>8,s[7]=o,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new Ko(s)}static parse(t){var o,n,a,s;let r;switch(t.length){case 32:r=(o=/^[0-9a-f]{32}$/i.exec(t))===null||o===void 0?void 0:o[0];break;case 36:r=(n=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||n===void 0?void 0:n.slice(1,6).join("");break;case 38:r=(a=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t))===null||a===void 0?void 0:a.slice(1,6).join("");break;case 45:r=(s=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||s===void 0?void 0:s.slice(1,6).join("");break}if(r){const l=new Uint8Array(16);for(let u=0;u<16;u+=4){const d=parseInt(r.substring(2*u,2*u+8),16);l[u+0]=d>>>24,l[u+1]=d>>>16,l[u+2]=d>>>8,l[u+3]=d}return new Ko(l)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let o=0;o<this.bytes.length;o++)t+=Lr.charAt(this.bytes[o]>>>4),t+=Lr.charAt(this.bytes[o]&15),(o===3||o===5||o===7||o===9)&&(t+="-");return t}toHex(){let t="";for(let o=0;o<this.bytes.length;o++)t+=Lr.charAt(this.bytes[o]>>>4),t+=Lr.charAt(this.bytes[o]&15);return t}toJSON(){return this.toString()}getVariant(){const t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(o=>o===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(o=>o===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new Ko(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let o=0;o<16;o++){const n=this.bytes[o]-t.bytes[o];if(n!==0)return Math.sign(n)}return 0}}class yb{constructor(t){this.timestamp=0,this.counter=0,this.random=t??bb()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,o){let n=this.generateOrAbortCore(t,o);return n===void 0&&(this.timestamp=0,n=this.generateOrAbortCore(t,o)),n}generateOrAbortCore(t,o){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(o<0||o>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+o>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return Ko.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){const t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,Ko.ofInner(t)}}const bb=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new wb;if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}};class wb{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}let fp;const Mo=()=>xb().toString(),xb=()=>(fp||(fp=new yb)).generate(),Tb={class:"tag-manager"},Sb={class:"category-tabs"},kb={class:"tabs-wrapper primary-tabs"},Cb={class:"tabs-scroll"},Eb=["onClick"],Lb={class:"tab-text"},$b={key:0,class:"tabs-wrapper group-tabs"},Ab={class:"tabs-scroll"},Ib=["onClick"],Mb={class:"tab-text"},Ob=vt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=o,s=b([]),r=b(null),l=b(null),u=b([]),d=b(!1),c=b(!1),f=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},g=async()=>{try{const $=await It.getTagsGroupList();if(s.value=$.info,l.value){const W=s.value.flatMap(w=>w.groups).find(w=>w.p_uuid===l.value.p_uuid);W?l.value=W:l.value=null}if(r.value){const W=s.value.find(w=>w.p_uuid===r.value.p_uuid);W?r.value=W:r.value=null}}catch($){console.error("获取标签列表失败:",$)}},p=$=>{if(!$||$==="transparent")return"var(--primary-text)";let W,w,A,V=1;if($.startsWith("rgba")){const j=$.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);j&&([,W,w,A,V]=j.map(Number))}else if($.startsWith("rgb")){const j=$.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);j&&([,W,w,A]=j.map(Number))}return V<.5?"var(--primary-text)":(W*299+w*587+A*114)/1e3>128?"#000000":"#ffffff"};gt(()=>{window.addEventListener("message",x)}),ca(()=>{window.removeEventListener("message",x)});const v=$=>{r.value=$,l.value=null,d.value=!1,u.value=[]},y=$=>{l.value=$,d.value=!1,u.value=[]},x=$=>{$.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&g()},S=()=>{if(l.value==null||r.value==null){X({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{group:r.value,sub:l.value}),c.value=!1};return t({open:()=>{f(),c.value=!0}}),($,W)=>(T(),wt(ms,{modelValue:c.value,"onUpdate:modelValue":W[1]||(W[1]=w=>c.value=w),title:m(n)("importDialog.selectTitle")},{footer:pt(()=>[i("button",{onClick:W[0]||(W[0]=w=>c.value=!1)},h(m(n)("promptBox.settings.close")),1),i("button",{onClick:S},h(m(n)("importDialog.sureSelect")),1)]),default:pt(()=>[i("div",Tb,[i("div",Sb,[i("div",kb,[i("div",Cb,[(T(!0),C(Oe,null,We(s.value,(w,A)=>{var V,z,j;return T(),C("div",{key:"Tabss-"+A,class:Ce(["tab-item",{active:((V=r.value)==null?void 0:V.name)===w.name}]),style:ft({backgroundColor:((z=r.value)==null?void 0:z.name)===w.name?"var(--primary-color)":w.color,color:((j=r.value)==null?void 0:j.name)===w.name?"#ffffff":p(w.color)}),onClick:q=>v(w)},[i("span",Lb,h(w.name),1)],14,Eb)}),128))])]),r.value?(T(),C("div",$b,[i("div",Ab,[(T(!0),C(Oe,null,We(r.value.groups,(w,A)=>{var V,z,j;return T(),C("div",{key:"TabsSw-"+A,class:Ce(["tab-item",{active:((V=l.value)==null?void 0:V.name)===w.name}]),style:ft({backgroundColor:((z=l.value)==null?void 0:z.name)===w.name?"var(--primary-color)":w.color,color:((j=l.value)==null?void 0:j.name)===w.name?"#ffffff":p(w.color)}),onClick:q=>y(w)},[i("span",Mb,h(w.name),1)],14,Ib)}),128))])])):de("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-6031c9d4"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function pp(e){return typeof e>"u"||e===null}function Rb(e){return typeof e=="object"&&e!==null}function Nb(e){return Array.isArray(e)?e:pp(e)?[]:[e]}function Db(e,t){var o,n,a,s;if(t)for(s=Object.keys(t),o=0,n=s.length;o<n;o+=1)a=s[o],e[a]=t[a];return e}function Pb(e,t){var o="",n;for(n=0;n<t;n+=1)o+=e;return o}function Fb(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ub=pp,Bb=Rb,Hb=Nb,jb=Pb,Wb=Fb,Vb=Db,Vt={isNothing:Ub,isObject:Bb,toArray:Hb,repeat:jb,isNegativeZero:Wb,extend:Vb};function gp(e,t){var o="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(o+='in "'+e.mark.name+'" '),o+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(o+=`
`+e.mark.snippet),n+" "+o):n}function vs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=gp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}vs.prototype=Object.create(Error.prototype),vs.prototype.constructor=vs,vs.prototype.toString=function(t){return this.name+": "+gp(this,t)};var cn=vs;function Ci(e,t,o,n,a){var s="",r="",l=Math.floor(a/2)-1;return n-t>l&&(s=" ... ",t=n-l+s.length),o-n>l&&(r=" ...",o=n+l-r.length),{str:s+e.slice(t,o).replace(/\t/g,"→")+r,pos:n-t+s.length}}function Ei(e,t){return Vt.repeat(" ",t-e.length)+e}function zb(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var o=/\r?\n|\r|\0/g,n=[0],a=[],s,r=-1;s=o.exec(e.buffer);)a.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&r<0&&(r=n.length-2);r<0&&(r=n.length-1);var l="",u,d,c=Math.min(e.line+t.linesAfter,a.length).toString().length,f=t.maxLength-(t.indent+c+3);for(u=1;u<=t.linesBefore&&!(r-u<0);u++)d=Ci(e.buffer,n[r-u],a[r-u],e.position-(n[r]-n[r-u]),f),l=Vt.repeat(" ",t.indent)+Ei((e.line-u+1).toString(),c)+" | "+d.str+`
`+l;for(d=Ci(e.buffer,n[r],a[r],e.position,f),l+=Vt.repeat(" ",t.indent)+Ei((e.line+1).toString(),c)+" | "+d.str+`
`,l+=Vt.repeat("-",t.indent+c+3+d.pos)+`^
`,u=1;u<=t.linesAfter&&!(r+u>=a.length);u++)d=Ci(e.buffer,n[r+u],a[r+u],e.position-(n[r]-n[r+u]),f),l+=Vt.repeat(" ",t.indent)+Ei((e.line+u+1).toString(),c)+" | "+d.str+`
`;return l.replace(/\n$/,"")}var qb=zb,Gb=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Qb=["scalar","sequence","mapping"];function Yb(e){var t={};return e!==null&&Object.keys(e).forEach(function(o){e[o].forEach(function(n){t[String(n)]=o})}),t}function Kb(e,t){if(t=t||{},Object.keys(t).forEach(function(o){if(Gb.indexOf(o)===-1)throw new cn('Unknown option "'+o+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(o){return o},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Yb(t.styleAliases||null),Qb.indexOf(this.kind)===-1)throw new cn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Kt=Kb;function mp(e,t){var o=[];return e[t].forEach(function(n){var a=o.length;o.forEach(function(s,r){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(a=r)}),o[a]=n}),o}function Jb(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,o;function n(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,o=arguments.length;t<o;t+=1)arguments[t].forEach(n);return e}function Li(e){return this.extend(e)}Li.prototype.extend=function(t){var o=[],n=[];if(t instanceof Kt)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(o=o.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new cn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(s){if(!(s instanceof Kt))throw new cn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new cn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new cn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof Kt))throw new cn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Li.prototype);return a.implicit=(this.implicit||[]).concat(o),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=mp(a,"implicit"),a.compiledExplicit=mp(a,"explicit"),a.compiledTypeMap=Jb(a.compiledImplicit,a.compiledExplicit),a};var hp=Li,vp=new Kt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),_p=new Kt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),yp=new Kt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),bp=new hp({explicit:[vp,_p,yp]});function Xb(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Zb(){return null}function e3(e){return e===null}var wp=new Kt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Xb,construct:Zb,predicate:e3,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function t3(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function n3(e){return e==="true"||e==="True"||e==="TRUE"}function o3(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var xp=new Kt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t3,construct:n3,predicate:o3,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function a3(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function s3(e){return 48<=e&&e<=55}function r3(e){return 48<=e&&e<=57}function l3(e){if(e===null)return!1;var t=e.length,o=0,n=!1,a;if(!t)return!1;if(a=e[o],(a==="-"||a==="+")&&(a=e[++o]),a==="0"){if(o+1===t)return!0;if(a=e[++o],a==="b"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(!a3(e.charCodeAt(o)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(!s3(e.charCodeAt(o)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;o<t;o++)if(a=e[o],a!=="_"){if(!r3(e.charCodeAt(o)))return!1;n=!0}return!(!n||a==="_")}function i3(e){var t=e,o=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(o=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return o*parseInt(t.slice(2),2);if(t[1]==="x")return o*parseInt(t.slice(2),16);if(t[1]==="o")return o*parseInt(t.slice(2),8)}return o*parseInt(t,10)}function u3(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Vt.isNegativeZero(e)}var Tp=new Kt("tag:yaml.org,2002:int",{kind:"scalar",resolve:l3,construct:i3,predicate:u3,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),c3=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function d3(e){return!(e===null||!c3.test(e)||e[e.length-1]==="_")}function f3(e){var t,o;return t=e.replace(/_/g,"").toLowerCase(),o=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:o*parseFloat(t,10)}var p3=/^[-+]?[0-9]+e/;function g3(e,t){var o;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Vt.isNegativeZero(e))return"-0.0";return o=e.toString(10),p3.test(o)?o.replace("e",".e"):o}function m3(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Vt.isNegativeZero(e))}var Sp=new Kt("tag:yaml.org,2002:float",{kind:"scalar",resolve:d3,construct:f3,predicate:m3,represent:g3,defaultStyle:"lowercase"}),kp=bp.extend({implicit:[wp,xp,Tp,Sp]}),Cp=kp,Ep=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Lp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function h3(e){return e===null?!1:Ep.exec(e)!==null||Lp.exec(e)!==null}function v3(e){var t,o,n,a,s,r,l,u=0,d=null,c,f,g;if(t=Ep.exec(e),t===null&&(t=Lp.exec(e)),t===null)throw new Error("Date resolve error");if(o=+t[1],n=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(o,n,a));if(s=+t[4],r=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(c=+t[10],f=+(t[11]||0),d=(c*60+f)*6e4,t[9]==="-"&&(d=-d)),g=new Date(Date.UTC(o,n,a,s,r,l,u)),d&&g.setTime(g.getTime()-d),g}function _3(e){return e.toISOString()}var $p=new Kt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:h3,construct:v3,instanceOf:Date,represent:_3});function y3(e){return e==="<<"||e===null}var Ap=new Kt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:y3}),$i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function b3(e){if(e===null)return!1;var t,o,n=0,a=e.length,s=$i;for(o=0;o<a;o++)if(t=s.indexOf(e.charAt(o)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function w3(e){var t,o,n=e.replace(/[\r\n=]/g,""),a=n.length,s=$i,r=0,l=[];for(t=0;t<a;t++)t%4===0&&t&&(l.push(r>>16&255),l.push(r>>8&255),l.push(r&255)),r=r<<6|s.indexOf(n.charAt(t));return o=a%4*6,o===0?(l.push(r>>16&255),l.push(r>>8&255),l.push(r&255)):o===18?(l.push(r>>10&255),l.push(r>>2&255)):o===12&&l.push(r>>4&255),new Uint8Array(l)}function x3(e){var t="",o=0,n,a,s=e.length,r=$i;for(n=0;n<s;n++)n%3===0&&n&&(t+=r[o>>18&63],t+=r[o>>12&63],t+=r[o>>6&63],t+=r[o&63]),o=(o<<8)+e[n];return a=s%3,a===0?(t+=r[o>>18&63],t+=r[o>>12&63],t+=r[o>>6&63],t+=r[o&63]):a===2?(t+=r[o>>10&63],t+=r[o>>4&63],t+=r[o<<2&63],t+=r[64]):a===1&&(t+=r[o>>2&63],t+=r[o<<4&63],t+=r[64],t+=r[64]),t}function T3(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ip=new Kt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:b3,construct:w3,predicate:T3,represent:x3}),S3=Object.prototype.hasOwnProperty,k3=Object.prototype.toString;function C3(e){if(e===null)return!0;var t=[],o,n,a,s,r,l=e;for(o=0,n=l.length;o<n;o+=1){if(a=l[o],r=!1,k3.call(a)!=="[object Object]")return!1;for(s in a)if(S3.call(a,s))if(!r)r=!0;else return!1;if(!r)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function E3(e){return e!==null?e:[]}var Mp=new Kt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:C3,construct:E3}),L3=Object.prototype.toString;function $3(e){if(e===null)return!0;var t,o,n,a,s,r=e;for(s=new Array(r.length),t=0,o=r.length;t<o;t+=1){if(n=r[t],L3.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;s[t]=[a[0],n[a[0]]]}return!0}function A3(e){if(e===null)return[];var t,o,n,a,s,r=e;for(s=new Array(r.length),t=0,o=r.length;t<o;t+=1)n=r[t],a=Object.keys(n),s[t]=[a[0],n[a[0]]];return s}var Op=new Kt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:$3,construct:A3}),I3=Object.prototype.hasOwnProperty;function M3(e){if(e===null)return!0;var t,o=e;for(t in o)if(I3.call(o,t)&&o[t]!==null)return!1;return!0}function O3(e){return e!==null?e:{}}var Rp=new Kt("tag:yaml.org,2002:set",{kind:"mapping",resolve:M3,construct:O3}),Ai=Cp.extend({implicit:[$p,Ap],explicit:[Ip,Mp,Op,Rp]}),Oo=Object.prototype.hasOwnProperty,$r=1,Np=2,Dp=3,Ar=4,Ii=1,R3=2,Pp=3,N3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,D3=/[\x85\u2028\u2029]/,P3=/[,\[\]\{\}]/,Fp=/^(?:!|!!|![a-z\-]+!)$/i,Up=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Bp(e){return Object.prototype.toString.call(e)}function Kn(e){return e===10||e===13}function Jo(e){return e===9||e===32}function _n(e){return e===9||e===32||e===10||e===13}function _a(e){return e===44||e===91||e===93||e===123||e===125}function F3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function U3(e){return e===120?2:e===117?4:e===85?8:0}function B3(e){return 48<=e&&e<=57?e-48:-1}function Hp(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function H3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var jp=new Array(256),Wp=new Array(256),ya=0;ya<256;ya++)jp[ya]=Hp(ya)?1:0,Wp[ya]=Hp(ya);function j3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ai,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Vp(e,t){var o={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return o.snippet=qb(o),new cn(t,o)}function Ue(e,t){throw Vp(e,t)}function Ir(e,t){e.onWarning&&e.onWarning.call(null,Vp(e,t))}var zp={YAML:function(t,o,n){var a,s,r;t.version!==null&&Ue(t,"duplication of %YAML directive"),n.length!==1&&Ue(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&Ue(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),r=parseInt(a[2],10),s!==1&&Ue(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=r<2,r!==1&&r!==2&&Ir(t,"unsupported YAML version of the document")},TAG:function(t,o,n){var a,s;n.length!==2&&Ue(t,"TAG directive accepts exactly two arguments"),a=n[0],s=n[1],Fp.test(a)||Ue(t,"ill-formed tag handle (first argument) of the TAG directive"),Oo.call(t.tagMap,a)&&Ue(t,'there is a previously declared suffix for "'+a+'" tag handle'),Up.test(s)||Ue(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Ue(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s}};function Ro(e,t,o,n){var a,s,r,l;if(t<o){if(l=e.input.slice(t,o),n)for(a=0,s=l.length;a<s;a+=1)r=l.charCodeAt(a),r===9||32<=r&&r<=1114111||Ue(e,"expected valid JSON character");else N3.test(l)&&Ue(e,"the stream contains non-printable characters");e.result+=l}}function qp(e,t,o,n){var a,s,r,l;for(Vt.isObject(o)||Ue(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(o),r=0,l=a.length;r<l;r+=1)s=a[r],Oo.call(t,s)||(t[s]=o[s],n[s]=!0)}function ba(e,t,o,n,a,s,r,l,u){var d,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,c=a.length;d<c;d+=1)Array.isArray(a[d])&&Ue(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Bp(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Bp(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(d=0,c=s.length;d<c;d+=1)qp(e,t,s[d],o);else qp(e,t,s,o);else!e.json&&!Oo.call(o,a)&&Oo.call(t,a)&&(e.line=r||e.line,e.lineStart=l||e.lineStart,e.position=u||e.position,Ue(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete o[a];return t}function Mi(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ue(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ut(e,t,o){for(var n=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Jo(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Kn(a))for(Mi(e),a=e.input.charCodeAt(e.position),n++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return o!==-1&&n!==0&&e.lineIndent<o&&Ir(e,"deficient indentation"),n}function Mr(e){var t=e.position,o;return o=e.input.charCodeAt(t),!!((o===45||o===46)&&o===e.input.charCodeAt(t+1)&&o===e.input.charCodeAt(t+2)&&(t+=3,o=e.input.charCodeAt(t),o===0||_n(o)))}function Oi(e,t){t===1?e.result+=" ":t>1&&(e.result+=Vt.repeat(`
`,t-1))}function W3(e,t,o){var n,a,s,r,l,u,d,c,f=e.kind,g=e.result,p;if(p=e.input.charCodeAt(e.position),_n(p)||_a(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),_n(a)||o&&_a(a)))return!1;for(e.kind="scalar",e.result="",s=r=e.position,l=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),_n(a)||o&&_a(a))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),_n(n))break}else{if(e.position===e.lineStart&&Mr(e)||o&&_a(p))break;if(Kn(p))if(u=e.line,d=e.lineStart,c=e.lineIndent,Ut(e,!1,-1),e.lineIndent>=t){l=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=r,e.line=u,e.lineStart=d,e.lineIndent=c;break}}l&&(Ro(e,s,r,!1),Oi(e,e.line-u),s=r=e.position,l=!1),Jo(p)||(r=e.position+1),p=e.input.charCodeAt(++e.position)}return Ro(e,s,r,!1),e.result?!0:(e.kind=f,e.result=g,!1)}function V3(e,t){var o,n,a;if(o=e.input.charCodeAt(e.position),o!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=a=e.position;(o=e.input.charCodeAt(e.position))!==0;)if(o===39)if(Ro(e,n,e.position,!0),o=e.input.charCodeAt(++e.position),o===39)n=e.position,e.position++,a=e.position;else return!0;else Kn(o)?(Ro(e,n,a,!0),Oi(e,Ut(e,!1,t)),n=a=e.position):e.position===e.lineStart&&Mr(e)?Ue(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Ue(e,"unexpected end of the stream within a single quoted scalar")}function z3(e,t){var o,n,a,s,r,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ro(e,o,e.position,!0),e.position++,!0;if(l===92){if(Ro(e,o,e.position,!0),l=e.input.charCodeAt(++e.position),Kn(l))Ut(e,!1,t);else if(l<256&&jp[l])e.result+=Wp[l],e.position++;else if((r=U3(l))>0){for(a=r,s=0;a>0;a--)l=e.input.charCodeAt(++e.position),(r=F3(l))>=0?s=(s<<4)+r:Ue(e,"expected hexadecimal character");e.result+=H3(s),e.position++}else Ue(e,"unknown escape sequence");o=n=e.position}else Kn(l)?(Ro(e,o,n,!0),Oi(e,Ut(e,!1,t)),o=n=e.position):e.position===e.lineStart&&Mr(e)?Ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Ue(e,"unexpected end of the stream within a double quoted scalar")}function q3(e,t){var o=!0,n,a,s,r=e.tag,l,u=e.anchor,d,c,f,g,p,v=Object.create(null),y,x,S,$;if($=e.input.charCodeAt(e.position),$===91)c=93,p=!1,l=[];else if($===123)c=125,p=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),$=e.input.charCodeAt(++e.position);$!==0;){if(Ut(e,!0,t),$=e.input.charCodeAt(e.position),$===c)return e.position++,e.tag=r,e.anchor=u,e.kind=p?"mapping":"sequence",e.result=l,!0;o?$===44&&Ue(e,"expected the node content, but found ','"):Ue(e,"missed comma between flow collection entries"),x=y=S=null,f=g=!1,$===63&&(d=e.input.charCodeAt(e.position+1),_n(d)&&(f=g=!0,e.position++,Ut(e,!0,t))),n=e.line,a=e.lineStart,s=e.position,wa(e,t,$r,!1,!0),x=e.tag,y=e.result,Ut(e,!0,t),$=e.input.charCodeAt(e.position),(g||e.line===n)&&$===58&&(f=!0,$=e.input.charCodeAt(++e.position),Ut(e,!0,t),wa(e,t,$r,!1,!0),S=e.result),p?ba(e,l,v,x,y,S,n,a,s):f?l.push(ba(e,null,v,x,y,S,n,a,s)):l.push(y),Ut(e,!0,t),$=e.input.charCodeAt(e.position),$===44?(o=!0,$=e.input.charCodeAt(++e.position)):o=!1}Ue(e,"unexpected end of the stream within a flow collection")}function G3(e,t){var o,n,a=Ii,s=!1,r=!1,l=t,u=0,d=!1,c,f;if(f=e.input.charCodeAt(e.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Ii===a?a=f===43?Pp:R3:Ue(e,"repeat of a chomping mode identifier");else if((c=B3(f))>=0)c===0?Ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):r?Ue(e,"repeat of an indentation width identifier"):(l=t+c-1,r=!0);else break;if(Jo(f)){do f=e.input.charCodeAt(++e.position);while(Jo(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!Kn(f)&&f!==0)}for(;f!==0;){for(Mi(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!r||e.lineIndent<l)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!r&&e.lineIndent>l&&(l=e.lineIndent),Kn(f)){u++;continue}if(e.lineIndent<l){a===Pp?e.result+=Vt.repeat(`
`,s?1+u:u):a===Ii&&s&&(e.result+=`
`);break}for(n?Jo(f)?(d=!0,e.result+=Vt.repeat(`
`,s?1+u:u)):d?(d=!1,e.result+=Vt.repeat(`
`,u+1)):u===0?s&&(e.result+=" "):e.result+=Vt.repeat(`
`,u):e.result+=Vt.repeat(`
`,s?1+u:u),s=!0,r=!0,u=0,o=e.position;!Kn(f)&&f!==0;)f=e.input.charCodeAt(++e.position);Ro(e,o,e.position,!1)}return!0}function Gp(e,t){var o,n=e.tag,a=e.anchor,s=[],r,l=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ue(e,"tab characters must not be used in indentation")),!(u!==45||(r=e.input.charCodeAt(e.position+1),!_n(r))));){if(l=!0,e.position++,Ut(e,!0,-1)&&e.lineIndent<=t){s.push(null),u=e.input.charCodeAt(e.position);continue}if(o=e.line,wa(e,t,Dp,!1,!0),s.push(e.result),Ut(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===o||e.lineIndent>t)&&u!==0)Ue(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}function Q3(e,t,o){var n,a,s,r,l,u,d=e.tag,c=e.anchor,f={},g=Object.create(null),p=null,v=null,y=null,x=!1,S=!1,$;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),$=e.input.charCodeAt(e.position);$!==0;){if(!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ue(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,($===63||$===58)&&_n(n))$===63?(x&&(ba(e,f,g,p,v,null,r,l,u),p=v=y=null),S=!0,x=!0,a=!0):x?(x=!1,a=!0):Ue(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,$=n;else{if(r=e.line,l=e.lineStart,u=e.position,!wa(e,o,Np,!1,!0))break;if(e.line===s){for($=e.input.charCodeAt(e.position);Jo($);)$=e.input.charCodeAt(++e.position);if($===58)$=e.input.charCodeAt(++e.position),_n($)||Ue(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(ba(e,f,g,p,v,null,r,l,u),p=v=y=null),S=!0,x=!1,a=!1,p=e.tag,v=e.result;else if(S)Ue(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=c,!0}else if(S)Ue(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(x&&(r=e.line,l=e.lineStart,u=e.position),wa(e,t,Ar,!0,a)&&(x?v=e.result:y=e.result),x||(ba(e,f,g,p,v,y,r,l,u),p=v=y=null),Ut(e,!0,-1),$=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&$!==0)Ue(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&ba(e,f,g,p,v,null,r,l,u),S&&(e.tag=d,e.anchor=c,e.kind="mapping",e.result=f),S}function Y3(e){var t,o=!1,n=!1,a,s,r;if(r=e.input.charCodeAt(e.position),r!==33)return!1;if(e.tag!==null&&Ue(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),r===60?(o=!0,r=e.input.charCodeAt(++e.position)):r===33?(n=!0,a="!!",r=e.input.charCodeAt(++e.position)):a="!",t=e.position,o){do r=e.input.charCodeAt(++e.position);while(r!==0&&r!==62);e.position<e.length?(s=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):Ue(e,"unexpected end of the stream within a verbatim tag")}else{for(;r!==0&&!_n(r);)r===33&&(n?Ue(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Fp.test(a)||Ue(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),P3.test(s)&&Ue(e,"tag suffix cannot contain flow indicator characters")}s&&!Up.test(s)&&Ue(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Ue(e,"tag name is malformed: "+s)}return o?e.tag=s:Oo.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:Ue(e,'undeclared tag handle "'+a+'"'),!0}function K3(e){var t,o;if(o=e.input.charCodeAt(e.position),o!==38)return!1;for(e.anchor!==null&&Ue(e,"duplication of an anchor property"),o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!_n(o)&&!_a(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&Ue(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function J3(e){var t,o,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!_n(n)&&!_a(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ue(e,"name of an alias node must contain at least one character"),o=e.input.slice(t,e.position),Oo.call(e.anchorMap,o)||Ue(e,'unidentified alias "'+o+'"'),e.result=e.anchorMap[o],Ut(e,!0,-1),!0}function wa(e,t,o,n,a){var s,r,l,u=1,d=!1,c=!1,f,g,p,v,y,x;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=r=l=Ar===o||Dp===o,n&&Ut(e,!0,-1)&&(d=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;Y3(e)||K3(e);)Ut(e,!0,-1)?(d=!0,l=s,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):l=!1;if(l&&(l=d||a),(u===1||Ar===o)&&($r===o||Np===o?y=t:y=t+1,x=e.position-e.lineStart,u===1?l&&(Gp(e,x)||Q3(e,x,y))||q3(e,y)?c=!0:(r&&G3(e,y)||V3(e,y)||z3(e,y)?c=!0:J3(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Ue(e,"alias node should not have any properties")):W3(e,y,$r===o)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(c=l&&Gp(e,x))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ue(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,g=e.implicitTypes.length;f<g;f+=1)if(v=e.implicitTypes[f],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Oo.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,p=e.typeMap.multi[e.kind||"fallback"],f=0,g=p.length;f<g;f+=1)if(e.tag.slice(0,p[f].tag.length)===p[f].tag){v=p[f];break}v||Ue(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&Ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function X3(e){var t=e.position,o,n,a,s=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(Ut(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){for(s=!0,r=e.input.charCodeAt(++e.position),o=e.position;r!==0&&!_n(r);)r=e.input.charCodeAt(++e.position);for(n=e.input.slice(o,e.position),a=[],n.length<1&&Ue(e,"directive name must not be less than one character in length");r!==0;){for(;Jo(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!Kn(r));break}if(Kn(r))break;for(o=e.position;r!==0&&!_n(r);)r=e.input.charCodeAt(++e.position);a.push(e.input.slice(o,e.position))}r!==0&&Mi(e),Oo.call(zp,n)?zp[n](e,n,a):Ir(e,'unknown document directive "'+n+'"')}if(Ut(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ut(e,!0,-1)):s&&Ue(e,"directives end mark is expected"),wa(e,e.lineIndent-1,Ar,!1,!0),Ut(e,!0,-1),e.checkLineBreaks&&D3.test(e.input.slice(t,e.position))&&Ir(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Mr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ut(e,!0,-1));return}if(e.position<e.length-1)Ue(e,"end of the stream or a document separator is expected");else return}function Qp(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var o=new j3(e,t),n=e.indexOf("\0");for(n!==-1&&(o.position=n,Ue(o,"null byte is not allowed in input")),o.input+="\0";o.input.charCodeAt(o.position)===32;)o.lineIndent+=1,o.position+=1;for(;o.position<o.length-1;)X3(o);return o.documents}function Z3(e,t,o){t!==null&&typeof t=="object"&&typeof o>"u"&&(o=t,t=null);var n=Qp(e,o);if(typeof t!="function")return n;for(var a=0,s=n.length;a<s;a+=1)t(n[a])}function e4(e,t){var o=Qp(e,t);if(o.length!==0){if(o.length===1)return o[0];throw new cn("expected a single document in the stream, but found more")}}var t4=Z3,n4=e4,Yp={loadAll:t4,load:n4},Kp=Object.prototype.toString,Jp=Object.prototype.hasOwnProperty,Ri=65279,o4=9,_s=10,a4=13,s4=32,r4=33,l4=34,Ni=35,i4=37,u4=38,c4=39,d4=42,Xp=44,f4=45,Or=58,p4=61,g4=62,m4=63,h4=64,Zp=91,eg=93,v4=96,tg=123,_4=124,ng=125,an={};an[0]="\\0",an[7]="\\a",an[8]="\\b",an[9]="\\t",an[10]="\\n",an[11]="\\v",an[12]="\\f",an[13]="\\r",an[27]="\\e",an[34]='\\"',an[92]="\\\\",an[133]="\\N",an[160]="\\_",an[8232]="\\L",an[8233]="\\P";var y4=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],b4=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function w4(e,t){var o,n,a,s,r,l,u;if(t===null)return{};for(o={},n=Object.keys(t),a=0,s=n.length;a<s;a+=1)r=n[a],l=String(t[r]),r.slice(0,2)==="!!"&&(r="tag:yaml.org,2002:"+r.slice(2)),u=e.compiledTypeMap.fallback[r],u&&Jp.call(u.styleAliases,l)&&(l=u.styleAliases[l]),o[r]=l;return o}function x4(e){var t,o,n;if(t=e.toString(16).toUpperCase(),e<=255)o="x",n=2;else if(e<=65535)o="u",n=4;else if(e<=4294967295)o="U",n=8;else throw new cn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+o+Vt.repeat("0",n-t.length)+t}var T4=1,ys=2;function S4(e){this.schema=e.schema||Ai,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Vt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=w4(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ys:T4,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function og(e,t){for(var o=Vt.repeat(" ",t),n=0,a=-1,s="",r,l=e.length;n<l;)a=e.indexOf(`
`,n),a===-1?(r=e.slice(n),n=l):(r=e.slice(n,a+1),n=a+1),r.length&&r!==`
`&&(s+=o),s+=r;return s}function Di(e,t){return`
`+Vt.repeat(" ",e.indent*t)}function k4(e,t){var o,n,a;for(o=0,n=e.implicitTypes.length;o<n;o+=1)if(a=e.implicitTypes[o],a.resolve(t))return!0;return!1}function Rr(e){return e===s4||e===o4}function bs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ri||65536<=e&&e<=1114111}function ag(e){return bs(e)&&e!==Ri&&e!==a4&&e!==_s}function sg(e,t,o){var n=ag(e),a=n&&!Rr(e);return(o?n:n&&e!==Xp&&e!==Zp&&e!==eg&&e!==tg&&e!==ng)&&e!==Ni&&!(t===Or&&!a)||ag(t)&&!Rr(t)&&e===Ni||t===Or&&a}function C4(e){return bs(e)&&e!==Ri&&!Rr(e)&&e!==f4&&e!==m4&&e!==Or&&e!==Xp&&e!==Zp&&e!==eg&&e!==tg&&e!==ng&&e!==Ni&&e!==u4&&e!==d4&&e!==r4&&e!==_4&&e!==p4&&e!==g4&&e!==c4&&e!==l4&&e!==i4&&e!==h4&&e!==v4}function E4(e){return!Rr(e)&&e!==Or}function ws(e,t){var o=e.charCodeAt(t),n;return o>=55296&&o<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(o-55296)*1024+n-56320+65536:o}function rg(e){var t=/^\n* /;return t.test(e)}var lg=1,Pi=2,ig=3,ug=4,xa=5;function L4(e,t,o,n,a,s,r,l){var u,d=0,c=null,f=!1,g=!1,p=n!==-1,v=-1,y=C4(ws(e,0))&&E4(ws(e,e.length-1));if(t||r)for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=ws(e,u),!bs(d))return xa;y=y&&sg(d,c,l),c=d}else{for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=ws(e,u),d===_s)f=!0,p&&(g=g||u-v-1>n&&e[v+1]!==" ",v=u);else if(!bs(d))return xa;y=y&&sg(d,c,l),c=d}g=g||p&&u-v-1>n&&e[v+1]!==" "}return!f&&!g?y&&!r&&!a(e)?lg:s===ys?xa:Pi:o>9&&rg(e)?xa:r?s===ys?xa:Pi:g?ug:ig}function $4(e,t,o,n,a){e.dump=(function(){if(t.length===0)return e.quotingType===ys?'""':"''";if(!e.noCompatMode&&(y4.indexOf(t)!==-1||b4.test(t)))return e.quotingType===ys?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,o),r=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&o>=e.flowLevel;function u(d){return k4(e,d)}switch(L4(t,l,e.indent,r,u,e.quotingType,e.forceQuotes&&!n,a)){case lg:return t;case Pi:return"'"+t.replace(/'/g,"''")+"'";case ig:return"|"+cg(t,e.indent)+dg(og(t,s));case ug:return">"+cg(t,e.indent)+dg(og(A4(t,r),s));case xa:return'"'+I4(t)+'"';default:throw new cn("impossible error: invalid scalar style")}})()}function cg(e,t){var o=rg(e)?String(t):"",n=e[e.length-1]===`
`,a=n&&(e[e.length-2]===`
`||e===`
`),s=a?"+":n?"":"-";return o+s+`
`}function dg(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function A4(e,t){for(var o=/(\n+)([^\n]*)/g,n=(function(){var d=e.indexOf(`
`);return d=d!==-1?d:e.length,o.lastIndex=d,fg(e.slice(0,d),t)})(),a=e[0]===`
`||e[0]===" ",s,r;r=o.exec(e);){var l=r[1],u=r[2];s=u[0]===" ",n+=l+(!a&&!s&&u!==""?`
`:"")+fg(u,t),a=s}return n}function fg(e,t){if(e===""||e[0]===" ")return e;for(var o=/ [^ ]/g,n,a=0,s,r=0,l=0,u="";n=o.exec(e);)l=n.index,l-a>t&&(s=r>a?r:l,u+=`
`+e.slice(a,s),a=s+1),r=l;return u+=`
`,e.length-a>t&&r>a?u+=e.slice(a,r)+`
`+e.slice(r+1):u+=e.slice(a),u.slice(1)}function I4(e){for(var t="",o=0,n,a=0;a<e.length;o>=65536?a+=2:a++)o=ws(e,a),n=an[o],!n&&bs(o)?(t+=e[a],o>=65536&&(t+=e[a+1])):t+=n||x4(o);return t}function M4(e,t,o){var n="",a=e.tag,s,r,l;for(s=0,r=o.length;s<r;s+=1)l=o[s],e.replacer&&(l=e.replacer.call(o,String(s),l)),(mo(e,t,l,!1,!1)||typeof l>"u"&&mo(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=a,e.dump="["+n+"]"}function pg(e,t,o,n){var a="",s=e.tag,r,l,u;for(r=0,l=o.length;r<l;r+=1)u=o[r],e.replacer&&(u=e.replacer.call(o,String(r),u)),(mo(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&mo(e,t+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=Di(e,t)),e.dump&&_s===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function O4(e,t,o){var n="",a=e.tag,s=Object.keys(o),r,l,u,d,c;for(r=0,l=s.length;r<l;r+=1)c="",n!==""&&(c+=", "),e.condenseFlow&&(c+='"'),u=s[r],d=o[u],e.replacer&&(d=e.replacer.call(o,u,d)),mo(e,t,u,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),mo(e,t,d,!1,!1)&&(c+=e.dump,n+=c));e.tag=a,e.dump="{"+n+"}"}function R4(e,t,o,n){var a="",s=e.tag,r=Object.keys(o),l,u,d,c,f,g;if(e.sortKeys===!0)r.sort();else if(typeof e.sortKeys=="function")r.sort(e.sortKeys);else if(e.sortKeys)throw new cn("sortKeys must be a boolean or a function");for(l=0,u=r.length;l<u;l+=1)g="",(!n||a!=="")&&(g+=Di(e,t)),d=r[l],c=o[d],e.replacer&&(c=e.replacer.call(o,d,c)),mo(e,t+1,d,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&_s===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,f&&(g+=Di(e,t)),mo(e,t+1,c,!0,f)&&(e.dump&&_s===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,a+=g));e.tag=s,e.dump=a||"{}"}function gg(e,t,o){var n,a,s,r,l,u;for(a=o?e.explicitTypes:e.implicitTypes,s=0,r=a.length;s<r;s+=1)if(l=a[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(o?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(u=e.styleMap[l.tag]||l.defaultStyle,Kp.call(l.represent)==="[object Function]")n=l.represent(t,u);else if(Jp.call(l.represent,u))n=l.represent[u](t,u);else throw new cn("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function mo(e,t,o,n,a,s,r){e.tag=null,e.dump=o,gg(e,o,!1)||gg(e,o,!0);var l=Kp.call(e.dump),u=n,d;n&&(n=e.flowLevel<0||e.flowLevel>t);var c=l==="[object Object]"||l==="[object Array]",f,g;if(c&&(f=e.duplicates.indexOf(o),g=f!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(a=!1),g&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(c&&g&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(R4(e,t,e.dump,a),g&&(e.dump="&ref_"+f+e.dump)):(O4(e,t,e.dump),g&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!r&&t>0?pg(e,t-1,e.dump,a):pg(e,t,e.dump,a),g&&(e.dump="&ref_"+f+e.dump)):(M4(e,t,e.dump),g&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&$4(e,e.dump,t,s,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new cn("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function N4(e,t){var o=[],n=[],a,s;for(Fi(e,o,n),a=0,s=n.length;a<s;a+=1)t.duplicates.push(o[n[a]]);t.usedDuplicates=new Array(s)}function Fi(e,t,o){var n,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)o.indexOf(a)===-1&&o.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Fi(e[a],t,o);else for(n=Object.keys(e),a=0,s=n.length;a<s;a+=1)Fi(e[n[a]],t,o)}function D4(e,t){t=t||{};var o=new S4(t);o.noRefs||N4(e,o);var n=e;return o.replacer&&(n=o.replacer.call({"":n},"",n)),mo(o,0,n,!0,!0)?o.dump+`
`:""}var P4=D4,F4={dump:P4};function Ui(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var U4=Kt,B4=hp,H4=bp,j4=kp,W4=Cp,V4=Ai,z4=Yp.load,q4=Yp.loadAll,G4=F4.dump,Q4=cn,Y4={binary:Ip,float:Sp,map:yp,null:wp,pairs:Op,set:Rp,timestamp:$p,bool:xp,int:Tp,merge:Ap,omap:Mp,seq:_p,str:vp},K4=Ui("safeLoad","load"),J4=Ui("safeLoadAll","loadAll"),X4=Ui("safeDump","dump"),mg={Type:U4,Schema:B4,FAILSAFE_SCHEMA:H4,JSON_SCHEMA:j4,CORE_SCHEMA:W4,DEFAULT_SCHEMA:V4,load:z4,loadAll:q4,dump:G4,YAMLException:Q4,types:Y4,safeLoad:K4,safeLoadAll:J4,safeDump:X4};const Z4={key:0,class:"loading-overlay"},ew={class:"settings-content"},tw={class:"info-links"},nw={class:"info-link-item"},ow={class:"info-link-label"},aw={href:"https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X",target:"_blank",class:"info-link"},sw={class:"info-link-item"},rw={class:"info-link-label"},lw={href:"https://github.com/weilin9999/WeiLin-Comfyui-Tools-Prompt",target:"_blank",class:"info-link"},iw={class:"info-link-item"},uw={class:"info-link-label"},cw={href:"https://weilin9999.github.io/WeiLin-Share-Prompt-Web/#/",target:"_blank",class:"info-link"},dw={style:{"margin-bottom":"16px"}},fw=["placeholder"],pw={style:{"margin-bottom":"16px"}},gw=["placeholder"],mw=["placeholder"],hw={style:{"margin-bottom":"16px"}},vw=["placeholder"],_w=["placeholder"],yw={style:{"margin-bottom":"16px"}},bw=["placeholder"],ww={class:"data-container"},xw={key:0},Tw={key:0},Sw={class:"tag-group-container"},kw={style:{display:"flex","align-items":"center"}},Cw={key:0},Ew=["placeholder"],Lw=["onClick"],$w=["onClick"],Aw=["onClick"],Iw=vt({__name:"import_tag",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(""),s=b(""),r=b(""),l=b(""),u=b(""),d=b(""),c=b(""),f=b(""),g=b(""),p=b([]),v=b(-1),y=b(""),x=b(""),S=b(null),$=b(null),W=b(null),w=b(!1),A=b(""),V=b(null);function z(){if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}V.value.click()}function j(){a.value="",s.value="",r.value="",l.value="",u.value="",d.value="",c.value="",f.value="",g.value="",p.value=[],v.value=-1,y.value="",x.value="",w.value=!1}function q(L){const F=L.target.files[0];if(F){const Z=new FileReader;Z.onload=ce=>{const k=ce.target.result.split(`
`).filter(M=>M.trim());let _=0;k.forEach(M=>{const[G,me]=M.split(",");if(G&&me){const pe=G.trim().replace(/'/g,"''"),Q=me.trim().replace(/'/g,"''"),se=Mo();_=_+1;const Me=parseInt(new Date().getTime()/1e3)+_,Ne=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${pe}', '${Q}', 'rgba(255, 123, 2, .4)', ${Me}, '${g.value}', '${se}');`;p.value.push(Ne)}})},Z.readAsText(F)}L.target.value=""}function fe(L){const F=L.target.files[0];if(F){const Z=new FileReader;Z.onload=ce=>{try{const ge=JSON.parse(ce.target.result);let k=0;Object.entries(ge).forEach(([_,M])=>{const G=_.replace(/'/g,"''"),me=M.replace(/'/g,"''"),pe=Mo();k=k+1;const Q=parseInt(new Date().getTime()/1e3)+k,se=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${G}', '${me}', 'rgba(255, 123, 2, .4)', ${Q}, '${g.value}', '${pe}');`;p.value.push(se)})}catch{X({type:"warn",str:"message.jsonErrorMesg"})}},Z.readAsText(F)}L.target.value=""}function te(L){const F=L.target.files[0];if(F){const Z=new FileReader;Z.onload=ce=>{try{const ge=mg.load(ce.target.result);let k=0;Object.entries(ge).forEach(([_,M])=>{const G=_.replace(/'/g,"''"),me=String(M).replace(/'/g,"''"),pe=Mo();k=k+1;const Q=parseInt(new Date().getTime()/1e3)+k,se=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${G}', '${me}', 'rgba(255, 123, 2, .4)', ${Q}, '${g.value}', '${pe}');`;p.value.push(se)})}catch{X({type:"warn",str:"message.yamlErrorMesg"})}},Z.readAsText(F)}L.target.value=""}function I(L){j();const F=L.target.files[0];if(F){const Z=new FileReader;Z.onload=ce=>{ce.target.result.split(";").filter(_=>_.trim()).forEach(_=>{if((_.includes("tag_groups")||_.includes("tag_subgroups"))&&_.includes("p_uuid"))if(_.includes("g_uuid")){u.value=_+";";const G=_.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);G&&(g.value=G[1]);const me=_.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);me&&(c.value=me[1].replace(/''/g,"'"))}else{l.value=_+";";const G=_.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);G&&(f.value=G[1]);const me=_.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);me&&(d.value=me[1].replace(/''/g,"'"))}else _.includes("tag_tags")&&p.value.push(_+";")})},Z.readAsText(F)}L.target.value=""}function R(){if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}W.value.click()}function H(){if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}$.value.click()}function U(){S.value.click()}function ne(){const L=[l.value,u.value,...p.value].join(`
`),F=new Blob([L],{type:"text/sql"}),Z=document.createElement("a");if(Z.href=URL.createObjectURL(F),A.value.length<=0){const ce=parseInt(new Date().getTime()/1e3);Z.download="export_"+ce+".sql"}else Z.download=A.value+".sql";Z.click()}const oe=()=>{const L=[...p.value].join(`
`),F=new Blob([L],{type:"text/sql"}),Z=document.createElement("a");if(Z.href=URL.createObjectURL(F),A.value.length<=0){const ce=parseInt(new Date().getTime()/1e3);Z.download="export_tags_"+ce+".sql"}else Z.download=A.value+".sql";Z.click()};function D(L){const F=L.match(/VALUES\s*\([^']*'([^']+)'/),Z=L.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:F?F[1].replace(/''/g,"'"):"",desc:Z?Z[1].replace(/''/g,"'"):""}}function N(L){p.value.splice(L,1)}function le(L){const F=p.value[L],Z=D(F);y.value=Z.text,x.value=Z.desc,v.value=L}function we(L){const F=y.value.replace(/'/g,"''"),Z=x.value.replace(/'/g,"''");p.value[L]=p.value[L].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${F}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${Z}'`),v.value=-1}function ae(){v.value=-1}function ie(){if(!g.value){X({type:"warn",str:"message.pleaseAddSub"});return}const L=a.value.replace(/'/g,"''"),F=s.value.replace(/'/g,"''"),Z=Mo(),ce=parseInt(new Date().getTime()/1e3);r.value=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${L}', '${F}', 'rgba(255, 123, 2, .4)', ${ce}, '${g.value}', '${Z}');`,p.value.push(r.value)}function ve(){if(d.value.length<=0){X({type:"warn",str:"importDialog.pleaseAddGroupName"});return}const L=d.value.replace(/'/g,"''");f.value.length<=0&&(f.value=Mo());const F=parseInt(new Date().getTime()/1e3);l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${L}', 'rgba(255, 123, 2, .4)', ${F}, '${f.value}');`}function Te(){if(c.value.length<=0){X({type:"warn",str:"importDialog.pleaseAddSubGroupName"});return}if(!f.value){X({type:"warn",str:"message.pleaseAddMainCeb"});return}const L=c.value.replace(/'/g,"''");g.value.length<=0&&(g.value=Mo());const F=parseInt(new Date().getTime()/1e3);u.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${L}', 'rgba(255, 123, 2, .4)', ${F}, '${f.value}', '${g.value}');`}const he=b(null),P=()=>{he.value.open()},Y=L=>{w.value=!0,d.value=L.group.name,c.value=L.sub.name,f.value=L.group.p_uuid,g.value=L.sub.g_uuid;const F=L.group.name.replace(/'/g,"''"),Z=L.sub.name.replace(/'/g,"''");l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${F}', '${L.group.color}', ${L.group.create_time}, '${L.group.p_uuid}');`,u.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${Z}', '${L.sub.color}', ${L.sub.create_time}, '${L.group.p_uuid}', '${L.sub.g_uuid}');`},ee=b(!1),O=async L=>{ee.value=!0;try{await It.runSQLToServer(L).then(F=>{if(F.code!=200){X({type:"warn",str:F.message});return}else K(),X({type:"success",str:"importDialog.successImport"})}).catch(F=>{console.error(F),X({type:"warn",str:"importDialog.importFail"})})}catch(F){console.error(F),X({type:"warn",str:"importDialog.importFail"})}finally{ee.value=!1}},K=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},E=async()=>{if(w.value){if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}const L=[...p.value];await O(L)}else{if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}const L=[l.value,u.value,...p.value];await O(L)}};return it(l,(L,F)=>{var ge,k;if(!L||L===F)return;const Z=(ge=L.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:ge[1],ce=(k=F==null?void 0:F.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:k[1];Z&&ce&&u.value&&(u.value=u.value.replace(new RegExp(`'${ce}'`,"g"),`'${Z}'`))}),it(u,(L,F)=>{var ge,k;if(!L||L===F)return;const Z=(ge=L.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:ge[1],ce=(k=F==null?void 0:F.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:k[1];Z&&ce&&p.value.length>0&&(p.value=p.value.map(_=>_.replace(new RegExp(`'${ce}'`,"g"),`'${Z}'`)))}),t({open:()=>{n.value=!0}}),(L,F)=>(T(),C(Oe,null,[ee.value?(T(),C("div",Z4,[...F[11]||(F[11]=[i("div",{class:"loading-spinner"},null,-1)])])):de("",!0),Ve(ms,{modelValue:n.value,"onUpdate:modelValue":F[10]||(F[10]=Z=>n.value=Z),title:m(o)("importDialog.title")},{footer:pt(()=>[i("button",{onClick:F[9]||(F[9]=Z=>n.value=!1)},h(m(o)("promptBox.settings.close")),1),i("button",{onClick:E},h(m(o)("importDialog.sure")),1)]),default:pt(()=>[i("div",ew,[i("div",tw,[i("div",nw,[i("span",ow,h(m(o)("importDialog.tips1")),1),i("a",aw,h(m(o)("importDialog.tips1text")),1)]),i("div",sw,[i("span",rw,h(m(o)("importDialog.tips2")),1),i("a",lw,h(m(o)("importDialog.tips2text")),1)]),i("div",iw,[i("span",uw,h(m(o)("importDialog.tips3")),1),i("a",cw,h(m(o)("importDialog.tips3text")),1)])]),i("div",dw,[i("button",{onClick:j,class:"upload-btn"},h(m(o)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:U,class:"upload-btn"},h(m(o)("importDialog.uploadSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:P},h(m(o)("importDialog.selectGroup")),1),i("button",{style:{"margin-left":"10px"},onClick:ne},h(m(o)("importDialog.dumpSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:oe},h(m(o)("importDialog.dumpOnlySQL")),1),be(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":F[0]||(F[0]=Z=>A.value=Z),placeholder:m(o)("importDialog.settingOutputName")},null,8,fw),[[Le,A.value]]),i("input",{type:"file",ref_key:"fileInput",ref:S,onChange:I,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"jsonFileInput",ref:$,onChange:fe,accept:".json",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"txtFileInput",ref:W,onChange:q,accept:".txt",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"yamlFileInput",ref:V,onChange:te,accept:".yaml,.yml",style:{display:"none"}},null,544)]),i("div",pw,[be(i("input",{"onUpdate:modelValue":F[1]||(F[1]=Z=>d.value=Z),placeholder:m(o)("importDialog.pleaseMainCeb")},null,8,gw),[[Le,d.value]]),i("button",{onClick:ve},h(m(o)("importDialog.setMainCeb")),1),be(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":F[2]||(F[2]=Z=>f.value=Z),placeholder:m(o)("importDialog.pleaseMainCebUuid")},null,8,mw),[[Le,f.value]])]),i("div",hw,[be(i("input",{"onUpdate:modelValue":F[3]||(F[3]=Z=>c.value=Z),placeholder:m(o)("importDialog.pleaseSubGroup")},null,8,vw),[[Le,c.value]]),i("button",{onClick:Te},h(m(o)("importDialog.setSubCeb")),1),be(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":F[4]||(F[4]=Z=>g.value=Z),placeholder:m(o)("importDialog.pleaseSubGroupUuid")},null,8,_w),[[Le,g.value]])]),i("div",yw,[be(i("input",{"onUpdate:modelValue":F[5]||(F[5]=Z=>a.value=Z),placeholder:"Tag"},null,512),[[Le,a.value]]),be(i("input",{"onUpdate:modelValue":F[6]||(F[6]=Z=>s.value=Z),placeholder:m(o)("importDialog.translater")},null,8,bw),[[Le,s.value]]),i("button",{onClick:ie},h(m(o)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:H,class:"upload-btn"},h(m(o)("importDialog.fromJSONImput")),1),i("button",{style:{"margin-left":"10px"},onClick:R,class:"upload-btn"},h(m(o)("importDialog.fromTxtInput")),1),i("button",{style:{"margin-left":"10px"},onClick:z,class:"upload-btn"},h(m(o)("importDialog.fromYmalInput")),1)]),i("div",ww,[l.value?(T(),C("div",xw,[i("h3",null,h(D(l.value).text),1),u.value?(T(),C("div",Tw,[i("h4",null,h(D(u.value).text),1),i("div",Sw,[(T(!0),C(Oe,null,We(p.value,(Z,ce)=>(T(),C("div",{key:ce,style:{display:"flex","flex-direction":"column","align-items":"center"}},[i("p",null,h(D(Z).text)+" - "+h(D(Z).desc),1),i("div",kw,[v.value===ce?(T(),C("div",Cw,[be(i("input",{"onUpdate:modelValue":F[7]||(F[7]=ge=>y.value=ge),placeholder:"Tag"},null,512),[[Le,y.value]]),be(i("input",{"onUpdate:modelValue":F[8]||(F[8]=ge=>x.value=ge),placeholder:m(o)("importDialog.translater")},null,8,Ew),[[Le,x.value]]),i("button",{onClick:ge=>we(ce)},h(m(o)("importDialog.sureYes")),9,Lw),i("button",{style:{"margin-left":"10px"},onClick:ae},h(m(o)("importDialog.cancel")),1)])):(T(),C("button",{key:1,onClick:ge=>le(ce)},h(m(o)("importDialog.edit")),9,$w)),i("button",{style:{"margin-left":"10px"},onClick:ge=>N(ce)},h(m(o)("importDialog.delete")),9,Aw)])]))),128))])])):de("",!0)])):de("",!0)])])]),_:1},8,["modelValue","title"]),Ve(Ob,{ref_key:"tagGroupSelectDialogItem",ref:he,onSureSelect:Y},null,512)],64))}},[["__scopeId","data-v-98758c86"]]),Mw={class:"tag-manager"},Ow={class:"toolbar"},Rw={class:"toolbar-top"},Nw={class:"search-container"},Dw=["placeholder"],Pw={key:0,class:"no-results"},Fw=["onClick"],Uw={class:"result-content"},Bw={class:"result-text"},Hw={class:"result-path"},jw={class:"toolbar-bottom"},Ww={class:"group-edit-mode"},Vw={class:"category-tabs"},zw={class:"tabs-wrapper primary-tabs"},qw={class:"tabs-scroll"},Gw=["onClick","onMouseenter","onMouseleave"],Qw={class:"tab-text"},Yw={key:0,class:"tab-actions"},Kw=["onClick","title"],Jw=["onClick","title"],Xw=["onClick","title"],Zw=["onClick","title"],e5={class:"group-edit-mode"},t5={key:0,class:"tabs-wrapper group-tabs"},n5={class:"tabs-scroll"},o5=["onClick","onMouseenter","onMouseleave"],a5={class:"tab-text"},s5={key:0,class:"tab-actions"},r5=["onClick","title"],l5=["onClick","title"],i5=["onClick","title"],u5=["onClick","title"],c5={class:"group-edit-mode"},d5={class:"tags-content"},f5={class:"tags-header"},p5={class:"tags-title"},g5={class:"tags-actions"},m5=["disabled"],h5=["disabled"],v5=["disabled"],_5=["disabled"],y5=["disabled"],b5={key:0,class:"tags-grid"},w5=["onClick"],x5={class:"tag-actions"},T5=["onClick","title"],S5=["onClick","title"],k5=["onClick","title"],C5={class:"tag-desc"},E5=["value"],L5={key:0,class:"weilin-tools-dialog-overlay"},$5={class:"weilin-tools-dialog-header"},A5={class:"weilin-tools-dialog-body"},I5={key:0,class:"form-group"},M5=["placeholder"],O5={key:1,class:"form-group"},R5=["placeholder"],N5={class:"form-group"},D5={class:"color-picker"},P5={class:"color-controls"},F5={class:"alpha-control"},U5={class:"alpha-value"},B5={class:"weilin-tools-dialog-footer"},H5={key:1,class:"weilin-tools-dialog-overlay"},j5={class:"weilin-tools-dialog-header"},W5={class:"weilin-tools-dialog-body"},V5={class:"form-group"},z5=["placeholder"],q5={class:"form-group"},G5=["placeholder"],Q5={class:"form-group"},Y5={class:"color-picker"},K5={class:"color-controls"},J5={class:"alpha-control"},X5={class:"alpha-value"},Z5={class:"weilin-tools-dialog-footer"},e8={key:2,class:"weilin-tools-dialog-overlay"},t8={class:"weilin-tools-dialog-header"},n8={class:"weilin-tools-dialog-body"},o8={class:"confirm-message"},a8={class:"weilin-tools-dialog-footer"},s8={key:3,class:"weilin-tools-dialog-overlay"},r8={class:"weilin-tools-dialog-content"},l8={class:"weilin-tools-dialog-header"},i8={class:"weilin-tools-dialog-body"},u8={class:"form-group"},c8=["value"],d8={class:"form-group"},f8={class:"radio-group"},p8={class:"weilin-tools-dialog-footer"},g8={key:4,class:"weilin-tools-dialog-overlay"},m8={class:"weilin-tools-dialog-content"},h8={class:"weilin-tools-dialog-header"},v8={class:"weilin-tools-dialog-body"},_8={class:"form-group"},y8=["value"],b8={class:"form-group"},w8={class:"radio-group"},x8={class:"weilin-tools-dialog-footer"},T8={key:5,class:"weilin-tools-dialog-overlay"},S8={class:"weilin-tools-dialog-header"},k8={class:"weilin-tools-dialog-body"},C8={class:"config-section"},E8={class:"form-group"},L8={class:"width-control"},$8={class:"radio-label"},A8={class:"radio-label"},I8={class:"form-group"},M8={class:"form-group"},O8={class:"config-section"},R8={class:"form-group"},N8={class:"width-control"},D8={class:"radio-label"},P8={class:"radio-label"},F8={class:"form-group"},U8={class:"form-group"},B8={class:"weilin-tools-dialog-footer"},hg=vt({__name:"tag_index",props:{tagManager:{type:String,default:"prompt"}},setup(e){mr();const{t}=ht(),o=b([]),n=b(null),a=b([]),s=b([]),r=b(null),l=b(!1),u=b(!1),d=b(!1),c=b(!1),f=b("primary"),g=b([]),p=b(!1),v=b(!1),y=b("None"),x=b("None"),S=b(0),$=b(0),W=b(null),w=b(0),A=b(!1),V=b(null),z=b("before"),j=b(null),q=b("before"),fe=b(null),te=b(null),I=b(!1),R=b(!1),H=b(!1),U=b({primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}}),ne={primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}},oe=e,D=b({name:"",color:"rgba(255, 123, 2, .4)",id_index:"",groups:[]}),N=b({name:"",id_index:"",color:"rgba(255, 123, 2, .4)",tags:[]}),le=b({text:"",desc:"",id_index:"",color:"rgba(255, 123, 2, .4)"}),we=ue=>{const re=ue.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(re){const[,ye,Ye,Dt,Mt]=re,rt=`#${((1<<24)+(parseInt(ye)<<16)+(parseInt(Ye)<<8)+parseInt(Dt)).toString(16).slice(1)}`,Pt=Mt?Math.round(parseFloat(Mt)*100):100;return{hex:rt,alpha:Pt}}return{hex:"#FFFFFF",alpha:100}},ae=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},ie=async()=>{try{await It.getTagMainGroup().then(ue=>{o.value=ue}).catch(ue=>{console.error(ue),X({type:"warn",str:"message.networkError"})}),n.value&&await ve(n.value.p_uuid),r.value&&await Te(r.value.g_uuid)}catch(ue){console.error("Tag管理器列表失败:",ue)}},ve=async ue=>{try{await It.getTagSubGroup(ue).then(re=>{a.value=re}).catch(re=>{console.error(re),X({type:"warn",str:"message.networkError"})})}catch(re){console.error("二级分类列表失败:",re)}},Te=async ue=>{try{await It.getTagList(ue).then(re=>{s.value=re}).catch(re=>{console.error(re),X({type:"warn",str:"message.networkError"})})}catch(re){console.error("Tag列表失败:",re)}};gt(()=>{Pn(),window.addEventListener("click",qr),window.addEventListener("resize",Pn),window.addEventListener("message",zr),window.addEventListener("keydown",Gr),Jn(),ae()}),ca(()=>{window.removeEventListener("click",qr),window.removeEventListener("resize",Pn),window.removeEventListener("message",zr),window.removeEventListener("keydown",Gr)});const he=async ue=>{n.value=ue,r.value=null,p.value=!1,g.value=[],await ve(ue.p_uuid)},P=async ue=>{r.value=ue,p.value=!1,g.value=[],await Te(ue.g_uuid)},Y=ue=>{f.value=ue,d.value=!1,k.value=we("rgba(255, 123, 2, .4)"),ue==="primary"?D.value={name:"",color:"rgba(255, 123, 2, .4)",groups:[]}:N.value={name:"",color:"rgba(255, 123, 2, .4)",tags:[]},l.value=!0},ee=ue=>{d.value=!0,f.value="primary",D.value={...ue},k.value=we(ue.color),l.value=!0},O=ue=>{d.value=!0,f.value="group",N.value={...ue},k.value=we(ue.color),l.value=!0},K=()=>{if(f.value==="primary"){if(!D.value.name){X({type:"warn",str:"tagManager.categoryNameRequired"});return}d.value?o.value.findIndex(re=>re.id_index===D.value.id_index)!==-1&&It.editPrimaryCategory({id_index:D.value.id_index,name:D.value.name,color:D.value.color}).then(re=>{re.code===200?(ae(),X({type:"success",str:"message.editSuccess"})):re.code===201?X({type:"error",str:"message.editNameExist"}):X({type:"error",str:"message.editFailed"})}).catch(re=>{X({type:"warn",str:"message.networkError"})}):It.addPrimaryCategory({name:D.value.name,color:D.value.color}).then(ue=>{ue.code===200?(ae(),X({type:"success",str:"message.addSuccess"})):ue.code===201?X({type:"error",str:"message.editNameExist"}):X({type:"error",str:"message.addFailed"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})})}else{if(!N.value.name){X({type:"warn",str:"tagManager.groupNameRequired"});return}d.value?It.editSubCategory({id_index:N.value.id_index,name:N.value.name,color:N.value.color}).then(ue=>{ue.code===200?(ae(),X({type:"success",str:"message.editSuccess"})):ue.code===201?X({type:"error",str:"message.editNameExist"}):X({type:"error",str:"message.editFailed"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})}):It.addSubCategory({name:N.value.name,color:N.value.color,key:n.value.id_index,p_uuid:n.value.p_uuid}).then(ue=>{ue.code===200?(ae(),X({type:"success",str:"message.addSuccess"})):ue.code===201?X({type:"error",str:"message.editNameExist"}):X({type:"error",str:"message.editFailed"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})})}L()},E=()=>d.value?f.value==="primary"?t("tagManager.editPrimaryCategory"):t("tagManager.editSubCategory"):f.value==="primary"?t("tagManager.addPrimaryCategory"):t("tagManager.addSubCategory"),L=()=>{l.value=!1,D.value={id:"",name:"",parentId:null,subCategories:[],backgroundColor:"transparent"},k.value={hex:"#FFFFFF",alpha:0}},F=()=>{r.value&&(c.value=!1,le.value={id:"",text:"",desc:"",categoryId:r.value.id,g_uuid:r.value.g_uuid,backgroundColor:N.value.color},k.value=we(N.value.color),u.value=!0)},Z=ue=>{c.value=!0,le.value={...ue},k.value=we(ue.color),u.value=!0},ce=()=>{if(!le.value.text||!le.value.desc){X({type:"warn",str:"tagManager.textRequired"});return}c.value&&r.value?It.editTags({id_index:le.value.id_index,text:le.value.text,desc:le.value.desc,color:le.value.color}).then(ue=>{ae(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.editSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})}):r.value&&It.addNewTags({id_index:r.value.id_index,g_uuid:r.value.g_uuid,text:le.value.text,desc:le.value.desc,color:le.value.color?le.value.color:"rgba(255, 123, 2, .4)"}).then(ue=>{ae(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.addSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})}),ge()},ge=()=>{u.value=!1,le.value={text:"",desc:"",color:"rgba(255, 123, 2, .4)"},c.value=!1},k=b({hex:"#FFFFFF",alpha:100}),_=et(()=>G(k.value.hex,k.value.alpha)),M=()=>{const ue=G(k.value.hex,k.value.alpha);l.value?f.value==="primary"?D.value.color=ue:N.value.color=ue:u.value&&(le.value.color=ue)},G=(ue,re)=>{const ye=parseInt(ue.slice(1,3),16),Ye=parseInt(ue.slice(3,5),16),Dt=parseInt(ue.slice(5,7),16);return`rgba(${ye}, ${Ye}, ${Dt}, ${re/100})`},me=b(""),pe=b([]),Q=b(!1),se=async()=>{Q.value=me.value.trim().length>0;const ue=me.value.trim().toLowerCase();if(!ue){pe.value=[];return}pe.value=[],await It.searchTag(ue).then(re=>{pe.value=re}).catch(re=>{X({type:"warn",str:"message.networkError"})})};it(me,()=>{se()});const Me=async ue=>{const re=o.value.find(ye=>ye.p_uuid===ue.p_uuid);re&&await he(re).then(async()=>{await Ge(async()=>{const ye=a.value.find(Ye=>Ye.g_uuid===ue.g_uuid);ye&&await P(ye).then(async()=>{await Ge(()=>{w.value==1&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ue.text},"*"),W.value=ue.id_index,setTimeout(()=>{const Ye=document.querySelector(".tag-wrapper.highlight");Ye&&Ye.scrollIntoView({behavior:"smooth",block:"center"})},100),setTimeout(()=>{W.value=null},5e3)})})})}),me.value=""},Ne=ue=>{if(!ue||ue==="transparent")return"var(--primary-text)";let re,ye,Ye,Dt=1;if(ue.startsWith("rgba")){const rt=ue.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);rt&&([,re,ye,Ye,Dt]=rt.map(Number))}else if(ue.startsWith("rgb")){const rt=ue.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);rt&&([,re,ye,Ye]=rt.map(Number))}return Dt<.5?"var(--primary-text)":(re*299+ye*587+Ye*114)/1e3>128?"#000000":"#ffffff"},je=ue=>{oe.tagManager==="prompt"&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ue.text},"*")},Je=b(!1),tt=b(""),Ie=b(null),ke=et(()=>{if(!Ie.value)return"";switch(tt.value){case"category":return t("tagManager.deletePrimaryCategoryConfirm",{name:Ie.value.name});case"group":return t("tagManager.deleteGroupConfirm",{name:Ie.value.name});case"tag":return t("tagManager.deleteTagConfirm",{name:Ie.value.text});case"deleteSelected":return t("tagManager.confirmDeleteSelected");default:return""}}),Ee=ue=>{tt.value="category",Ie.value=ue,Je.value=!0},_t=ue=>{tt.value="group",Ie.value=ue,Je.value=!0},St=ue=>{tt.value="tag",Ie.value=ue,Je.value=!0},yn=async()=>{try{switch(tt.value){case"category":It.deletePrimaryCategory({p_uuid:Ie.value.p_uuid}).then(ue=>{ae(),X({type:"success",str:"message.deleteSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})});break;case"group":It.deleteSubCategory({g_uuid:Ie.value.g_uuid}).then(ue=>{ae(),X({type:"success",str:"message.deleteSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})});break;case"tag":It.deleteTags({id_index:Ie.value.id_index}).then(ue=>{ae(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.deleteSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})});break;case"deleteSelected":It.batchDeleteTags({id_indexs:g.value}).then(ue=>{ae(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.deleteSuccess"})}).catch(ue=>{X({type:"warn",str:"message.networkError"})});break}Ia()}catch(ue){console.error("删除失败:",ue)}},Xo=async ue=>{const re=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${ue.name.replace(/'/g,"''")}', '${ue.color}', ${ue.create_time}, '${ue.p_uuid}');`;try{const ye=await It.getTagSubGroup(ue.p_uuid);let Ye=[];Ye.push(re);for(const rt of ye){const Pt=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${rt.name.replace(/'/g,"''")}', '${rt.color}', ${rt.create_time}, '${rt.p_uuid}', '${rt.g_uuid}');`;Ye.push(Pt);try{(await It.getTagList(rt.g_uuid)).forEach(Fn=>{const nu=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Fn.text!=null&&Fn.text.length>0?Fn.text.replace(/'/g,"''"):""}', '${Fn.desc!=null&&Fn.desc.length>0?Fn.desc.replace(/'/g,"''"):""}', '${Fn.color}', ${Fn.create_time}, '${Fn.g_uuid}', '${Mo()}');`;Ye.push(nu)})}catch(Xr){console.error("Tag列表失败:",Xr),X({type:"warn",str:"message.shareTagError"})}}const Dt=new Blob([Ye.join(`
`)],{type:"text/sql"}),Mt=document.createElement("a");Mt.href=URL.createObjectURL(Dt),Mt.download=`${ue.name}_export_${Date.now()}.sql`,Mt.click(),X({type:"success",str:"tagManager.outputSuccess"})}catch(ye){console.error("二级分类列表失败:",ye),X({type:"warn",str:"message.shareGroupError"})}},Zo=async ue=>{try{let re=[];const ye=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${ue.name.replace(/'/g,"''")}', '${ue.color}', ${ue.create_time}, '${ue.p_uuid}', '${ue.g_uuid}');`;re.push(ye);try{(await It.getTagList(ue.g_uuid)).forEach(rt=>{const Pt=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${rt.text!=null&&rt.text.length>0?rt.text.replace(/'/g,"''"):""}', '${rt.desc!=null&&rt.desc.length>0?rt.desc.replace(/'/g,"''"):""}', '${rt.color}', ${rt.create_time}, '${rt.g_uuid}', '${Mo()}');`;re.push(Pt)})}catch(Mt){console.error("Tag列表失败:",Mt),X({type:"warn",str:"message.shareTagError"})}const Ye=new Blob([re.join(`
`)],{type:"text/sql"}),Dt=document.createElement("a");Dt.href=URL.createObjectURL(Ye),Dt.download=`${ue.name}_export_${Date.now()}.sql`,Dt.click(),X({type:"success",str:"tagManager.outputSuccess"})}catch(re){console.error("二级分类列表失败:",re),X({type:"warn",str:"message.shareGroupError"})}},Gi=ue=>{j.value=ue.id_index,A.value=!0},Hr=async()=>{try{It.moveTag({id_index:j.value,reference_id_index:V.value,position:z.value}).then(ue=>{ae(),A.value=!1,X({type:"success",str:t("message.moveSuccess")})}).catch(ue=>{X({type:"error",str:t("message.moveFailed")})})}catch(ue){console.error("移动标签失败:",ue),X({type:"error",str:t("message.moveFailed")})}},La=b([]),jr=b(1),Wr=(ue,re)=>{jr.value=re,re===1?(La.value=o.value,fe.value=ue.id_index,v.value=!0):(La.value=a.value,fe.value=ue.id_index,v.value=!0)},Qi=async()=>{if(jr.value===1)try{It.moveMainGroup({id_index:fe.value,reference_id_index:te.value,position:q.value}).then(ue=>{ae(),v.value=!1,X({type:"success",str:t("message.moveSuccess")})}).catch(ue=>{X({type:"error",str:t("message.moveFailed")})})}catch(ue){console.error("移动标签失败:",ue),X({type:"error",str:t("message.moveFailed")})}else try{It.moveSubGroup({id_index:fe.value,reference_id_index:te.value,position:q.value}).then(ue=>{ae(),v.value=!1,X({type:"success",str:t("message.moveSuccess")})}).catch(ue=>{X({type:"error",str:t("message.moveFailed")})})}catch(ue){console.error("移动标签失败:",ue),X({type:"error",str:t("message.moveFailed")})}},$a=()=>{p.value=!0,I.value=!0},Yi=()=>{p.value=!1,I.value=!1,g.value=[]},Aa=()=>{g.value.length!==0&&(tt.value="deleteSelected",Ie.value={},Je.value=!0)},Ki=()=>{p.value=!0,R.value=!0},Vr=()=>{p.value=!1,R.value=!1,g.value=[]},Do=()=>{if(g.value.length===0){X({type:"warn",str:"tagManager.noTagsSelected"});return}const ue={};g.value.forEach(Ye=>{ue[Ye.text]=Ye.desc});const re=new Blob([mg.dump(ue)],{type:"text/yaml"}),ye=document.createElement("a");ye.href=URL.createObjectURL(re),ye.download=`selected_tags_export_${Date.now()}.yaml`,ye.click(),X({type:"success",str:"tagManager.outputSuccess"}),Vr()},Ia=()=>{Je.value=!1,tt.value="",Ie.value=null},Ji=async()=>{try{await ae()}catch(ue){console.error("刷新标签列表失败:",ue)}},ea=b(),xs=b({}),Pn=()=>{if(ea.value){const ue=ea.value.getBoundingClientRect();xs.value={position:"fixed",top:`${ue.bottom}px`,left:`${ue.left}px`,width:`${ue.width}px`,zIndex:1e3}}},zr=ue=>{ue.data.type==="weilin_prompt_ui_window_change_tagManager_position"||ue.data.type==="weilin_prompt_ui_window_change_tagManager_size"||ue.data.type==="weilin_prompt_ui_window_change_tagManager_scroll"||ue.data.type==="weilin_prompt_ui_window_change_promptBox_position"||ue.data.type==="weilin_prompt_ui_window_change_promptBox_size"||ue.data.type==="weilin_prompt_ui_window_change_promptBox_scroll"?Pn():ue.data.type==="weilin_prompt_ui_window_change_click_outside"||ue.data.type==="weilin_prompt_ui_tag_manager_refresh"&&ie()},qr=ue=>{Q.value&&!ea.value.contains(ue.target)&&(Q.value=!1)},Gr=ue=>{ue.key==="Escape"&&(Q.value=!1)},Xi=ue=>{$.value==1&&(y.value="TabID-"+ue)},Qr=ue=>{y.value="None"},Zi=ue=>{S.value==1&&(x.value="TabID-"+ue)},Yr=ue=>{x.value="None"},Ts=b(),Kr=()=>{Ts.value.open()},Jn=()=>{const ue=JSON.parse(JSON.stringify(ne));try{const re=localStorage.getItem("weilin_tag_manager_tab_size_config");if(re){const ye=JSON.parse(re);U.value={...ue,...ye}}else U.value={...ue}}catch(re){console.error("读取标签尺寸配置失败:",re),U.value={...ue}}},eu=()=>{try{localStorage.setItem("weilin_tag_manager_tab_size_config",JSON.stringify(U.value)),X({type:"success",str:"tagManager.tabSizeConfigSaved"}),H.value=!1}catch(ue){console.error("保存标签尺寸配置失败:",ue),X({type:"error",str:"tagManager.tabSizeConfigSaveFailed"})}},tu=()=>{H.value=!0},Jr=()=>{H.value=!1,Jn()},Xn=()=>{const ue=JSON.parse(JSON.stringify(ne));U.value={...ue}};return(ue,re)=>(T(),C("div",Mw,[i("div",Ow,[i("div",Rw,[i("button",{class:"refresh-btn",onClick:Ji},[...re[40]||(re[40]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),i("div",Nw,[be(i("input",{type:"text","onUpdate:modelValue":re[0]||(re[0]=ye=>me.value=ye),placeholder:m(t)("tagManager.searchPlaceholder"),class:"search-input",ref_key:"searchInput",ref:ea,onInput:re[1]||(re[1]=ye=>Q.value=me.value.trim().length>0)},null,40,Dw),[[Le,me.value]]),Q.value?(T(),C("div",{key:0,class:"search-results",style:ft(xs.value)},[pe.value.length===0?(T(),C("div",Pw,h(m(t)("tagManager.noResults")),1)):(T(!0),C(Oe,{key:1},We(pe.value,(ye,Ye)=>(T(),C("div",{key:`${Ye}-search_item`,class:"search-result-item",onClick:Dt=>Me(ye)},[i("div",Uw,[i("span",Bw,h(ye.name||ye.text),1),i("span",Hw,h(ye.where),1)])],8,Fw))),128))],4)):de("",!0)]),i("button",{class:"import-btn",onClick:Kr},h(m(t)("tagManager.importTags")),1)]),i("div",jw,[i("div",Ww,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":re[2]||(re[2]=ye=>w.value=ye),"true-value":1,"false-value":0},null,512),[[qt,w.value]]),qe(" "+h(m(t)("tagManager.autoAddSearchTag")),1)])]),i("button",{class:"tab-size-btn",onClick:tu},h(m(t)("tagManager.modifyTabSize")),1)])]),i("div",Vw,[i("div",zw,[i("div",qw,[(T(!0),C(Oe,null,We(o.value,(ye,Ye)=>{var Dt,Mt,rt;return T(),C("div",{key:"Tabss-"+Ye,class:Ce(["tab-item",{active:((Dt=n.value)==null?void 0:Dt.name)===ye.name}]),style:ft({backgroundColor:((Mt=n.value)==null?void 0:Mt.name)===ye.name?"var(--primary-color)":ye.color,color:((rt=n.value)==null?void 0:rt.name)===ye.name?"#ffffff":Ne(ye.color),width:U.value.primaryTab.width==="fit-content"?"fit-content":U.value.primaryTab.width+"px",height:U.value.primaryTab.height+"px",fontSize:U.value.primaryTab.fontSize+"px"}),onClick:Pt=>he(ye),onMouseenter:Pt=>Xi(Ye),onMouseleave:Pt=>Qr()},[i("span",Qw,h(ye.name),1),y.value=="TabID-"+Ye?(T(),C("div",Yw,[i("button",{class:"action-btn move",onClick:Xe(Pt=>Wr(ye,1),["stop"]),title:m(t)("tagManager.moveGroup")},[...re[41]||(re[41]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,Kw),i("button",{class:"action-btn edit",onClick:Xe(Pt=>ee(ye),["stop"]),title:m(t)("tagManager.edit")},[...re[42]||(re[42]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,Jw),i("button",{class:"action-btn share",onClick:Xe(Pt=>Xo(ye),["stop"]),title:m(t)("tagManager.share")},[...re[43]||(re[43]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"})],-1)])],8,Xw),i("button",{class:"action-btn delete",onClick:Xe(Pt=>Ee(ye),["stop"]),title:m(t)("tagManager.delete")},[...re[44]||(re[44]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,Zw)])):de("",!0)],46,Gw)}),128)),i("button",{class:"add-tab",onClick:re[3]||(re[3]=ye=>Y("primary"))},[re[45]||(re[45]=i("span",{class:"plus-icon"},"+",-1)),qe(" "+h(m(t)("tagManager.addPrimaryCategory")),1)]),i("div",e5,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":re[4]||(re[4]=ye=>$.value=ye),"true-value":1,"false-value":0},null,512),[[qt,$.value]]),qe(" "+h($.value==1?m(t)("tagManager.exitEditMode"):m(t)("tagManager.editGroupMode")),1)])])])]),n.value?(T(),C("div",t5,[i("div",n5,[(T(!0),C(Oe,null,We(a.value,(ye,Ye)=>{var Dt,Mt,rt;return T(),C("div",{key:"TabsSw-"+Ye,class:Ce(["tab-item",{active:((Dt=r.value)==null?void 0:Dt.name)===ye.name}]),style:ft({backgroundColor:((Mt=r.value)==null?void 0:Mt.name)===ye.name?"var(--primary-color)":ye.color,color:((rt=r.value)==null?void 0:rt.name)===ye.name?"#ffffff":Ne(ye.color),width:U.value.groupTab.width==="fit-content"?"fit-content":U.value.groupTab.width+"px",height:U.value.groupTab.height+"px",fontSize:U.value.groupTab.fontSize+"px"}),onClick:Pt=>P(ye),onMouseenter:Pt=>Zi(Ye),onMouseleave:Pt=>Yr()},[i("span",a5,h(ye.name),1),x.value=="TabID-"+Ye?(T(),C("div",s5,[i("button",{class:"action-btn move",onClick:Xe(Pt=>Wr(ye,2),["stop"]),title:m(t)("tagManager.moveGroup")},[...re[46]||(re[46]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,r5),i("button",{class:"action-btn edit",onClick:Xe(Pt=>O(ye),["stop"]),title:m(t)("tagManager.edit")},[...re[47]||(re[47]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,l5),i("button",{class:"action-btn delete",onClick:Xe(Pt=>_t(ye),["stop"]),title:m(t)("tagManager.delete")},[...re[48]||(re[48]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,i5),i("button",{class:"action-btn share",onClick:Xe(Pt=>Zo(ye),["stop"]),title:m(t)("tagManager.share")},[...re[49]||(re[49]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"})],-1)])],8,u5)])):de("",!0)],46,o5)}),128)),n.value?(T(),C("button",{key:0,class:"add-tab",onClick:re[5]||(re[5]=ye=>Y("group"))},[re[50]||(re[50]=i("span",{class:"plus-icon"},"+",-1)),qe(" "+h(m(t)("tagManager.addGroup")),1)])):de("",!0),i("div",c5,[i("label",null,[be(i("input",{type:"checkbox","onUpdate:modelValue":re[6]||(re[6]=ye=>S.value=ye),"true-value":1,"false-value":0},null,512),[[qt,S.value]]),qe(" "+h(S.value==1?m(t)("tagManager.exitEditMode"):m(t)("tagManager.editGroupMode")),1)])])])])):de("",!0)]),i("div",d5,[i("div",f5,[i("div",p5,h(r.value?r.value.name:m(t)("tagManager.selectCategory")),1),i("div",g5,[i("button",{class:"add-btn",onClick:F,disabled:!r.value},[re[51]||(re[51]=i("span",{class:"plus-icon"},"+",-1)),qe(" "+h(m(t)("tagManager.addTag")),1)],8,m5),R.value?(T(),C("button",{key:0,class:"share-selected-btn",onClick:Do,disabled:!g.value.length},h(m(t)("tagManager.shareSelected")),9,h5)):(T(),C("button",{key:1,class:"share-btn",onClick:Ki,disabled:!r.value},h(m(t)("tagManager.batchShare")),9,v5)),R.value?(T(),C("button",{key:2,class:"cancel-delete-btn",onClick:Vr},h(m(t)("tagManager.cancelShare")),1)):de("",!0),I.value?(T(),C("button",{key:3,class:"delete-btn",onClick:Aa,disabled:!g.value.length},h(m(t)("tagManager.deleteSelected")),9,_5)):(T(),C("button",{key:4,class:"delete-action-btn",onClick:$a,disabled:!r.value},h(m(t)("tagManager.hasDeleteAction")),9,y5)),I.value?(T(),C("button",{key:5,class:"cancel-delete-btn",onClick:Yi},h(m(t)("tagManager.cancelDelete")),1)):de("",!0)])]),r.value?(T(),C("div",b5,[(T(!0),C(Oe,null,We(s.value,ye=>(T(),C("div",{key:"tag-grid-"+ye.id_index,class:Ce(W.value===ye.id_index?"tag-wrapper highlight":"tag-wrapper")},[i("div",{class:"tag-content",onClick:Ye=>je(ye)},[i("div",{class:"tag-main",style:ft({backgroundColor:ye.color||"transparent"})},[qe(h(ye.desc)+" ",1),i("div",x5,[i("button",{class:"action-btn move",onClick:Xe(Ye=>Gi(ye),["stop"]),title:m(t)("tagManager.moveTag")},[...re[52]||(re[52]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,T5),i("button",{class:"action-btn edit",onClick:Xe(Ye=>Z(ye),["stop"]),title:m(t)("tagManager.editTag")},[...re[53]||(re[53]=[i("svg",{viewBox:"0 0 24 24",class:"edit-icon"},[i("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,S5),i("button",{class:"action-btn delete",onClick:Xe(Ye=>St(ye),["stop"]),title:m(t)("tagManager.deleteTag")},[...re[54]||(re[54]=[i("svg",{viewBox:"0 0 24 24",class:"delete-icon"},[i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,k5)])],4),i("div",C5,h(ye.text),1)],8,w5),p.value?be((T(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":re[7]||(re[7]=Ye=>g.value=Ye),value:ye,class:"tag-checkbox"},null,8,E5)),[[qt,g.value]]):de("",!0)],2))),128))])):de("",!0)]),l.value?(T(),C("div",L5,[i("div",{class:"weilin-tools-dialog-content",onMousedown:re[12]||(re[12]=Xe(()=>{},["stop"]))},[i("div",$5,[i("h2",null,h(E()),1),i("button",{class:"close-btn",onClick:L},"×")]),i("div",A5,[f.value=="primary"?(T(),C("div",I5,[i("label",null,h(m(t)("tagManager.categoryName")),1),be(i("input",{type:"text","onUpdate:modelValue":re[8]||(re[8]=ye=>D.value.name=ye),placeholder:m(t)("tagManager.categoryNamePlaceholder"),onKeyup:tn(K,["enter"])},null,40,M5),[[Le,D.value.name]])])):de("",!0),f.value=="group"?(T(),C("div",O5,[i("label",null,h(m(t)("tagManager.groupName")),1),be(i("input",{type:"text","onUpdate:modelValue":re[9]||(re[9]=ye=>N.value.name=ye),placeholder:m(t)("tagManager.groupNamePlaceholder"),onKeyup:tn(K,["enter"])},null,40,R5),[[Le,N.value.name]])])):de("",!0),i("div",N5,[i("label",null,h(m(t)("tagManager.backgroundColor")),1),i("div",D5,[i("div",{class:"color-preview",style:ft({backgroundColor:_.value})},null,4),i("div",P5,[be(i("input",{type:"color","onUpdate:modelValue":re[10]||(re[10]=ye=>k.value.hex=ye),onInput:M,class:"color-input"},null,544),[[Le,k.value.hex]]),i("div",F5,[be(i("input",{type:"range","onUpdate:modelValue":re[11]||(re[11]=ye=>k.value.alpha=ye),min:"0",max:"100",onInput:M,class:"alpha-slider"},null,544),[[Le,k.value.alpha,void 0,{number:!0}]]),i("span",U5,h(k.value.alpha)+"%",1)])])])])]),i("div",B5,[i("button",{class:"cancel-btn",onClick:L},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:K},h(m(t)("common.confirm")),1)])],32)])):de("",!0),u.value?(T(),C("div",H5,[i("div",{class:"weilin-tools-dialog-content",onMousedown:re[17]||(re[17]=Xe(()=>{},["stop"]))},[i("div",j5,[i("h2",null,h(c.value?m(t)("tagManager.editTag"):m(t)("tagManager.addTag")),1),i("button",{class:"close-btn",onClick:ge},"×")]),i("div",W5,[i("div",V5,[i("label",null,h(m(t)("tagManager.text")),1),be(i("input",{type:"text","onUpdate:modelValue":re[13]||(re[13]=ye=>le.value.desc=ye),placeholder:m(t)("tagManager.textPlaceholder")},null,8,z5),[[Le,le.value.desc]])]),i("div",q5,[i("label",null,h(m(t)("tagManager.description")),1),be(i("textarea",{"onUpdate:modelValue":re[14]||(re[14]=ye=>le.value.text=ye),placeholder:m(t)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,G5),[[Le,le.value.text]])]),i("div",Q5,[i("label",null,h(m(t)("tagManager.backgroundColor")),1),i("div",Y5,[i("div",{class:"color-preview",style:ft({backgroundColor:_.value})},null,4),i("div",K5,[be(i("input",{type:"color","onUpdate:modelValue":re[15]||(re[15]=ye=>k.value.hex=ye),onInput:M,class:"color-input"},null,544),[[Le,k.value.hex]]),i("div",J5,[be(i("input",{type:"range","onUpdate:modelValue":re[16]||(re[16]=ye=>k.value.alpha=ye),min:"0",max:"100",onInput:M,class:"alpha-slider"},null,544),[[Le,k.value.alpha,void 0,{number:!0}]]),i("span",X5,h(k.value.alpha)+"%",1)])])])])]),i("div",Z5,[i("button",{class:"cancel-btn",onClick:ge},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:ce},h(m(t)("common.confirm")),1)])],32)])):de("",!0),Je.value?(T(),C("div",e8,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:re[18]||(re[18]=Xe(()=>{},["stop"]))},[i("div",t8,[i("h2",null,h(m(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:Ia},"×")]),i("div",n8,[i("p",o8,h(ke.value),1)]),i("div",a8,[i("button",{class:"cancel-btn",onClick:Ia},h(m(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:yn},h(m(t)("common.delete")),1)])],32)])):de("",!0),A.value?(T(),C("div",s8,[i("div",r8,[i("div",l8,[i("h2",null,h(m(t)("tagManager.moveTag")),1),i("button",{class:"close-btn",onClick:re[19]||(re[19]=ye=>A.value=!1)},"×")]),i("div",i8,[i("div",u8,[i("label",null,h(m(t)("tagManager.targetTag")),1),be(i("select",{"onUpdate:modelValue":re[20]||(re[20]=ye=>V.value=ye),class:"form-select"},[(T(!0),C(Oe,null,We(s.value,ye=>(T(),C("option",{key:ye.id_index,value:ye.id_index},h(ye.desc+" --> "+ye.text),9,c8))),128))],512),[[un,V.value]])]),i("div",d8,[i("label",null,h(m(t)("tagManager.movePosition")),1),i("div",f8,[i("label",null,[be(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":re[21]||(re[21]=ye=>z.value=ye),value:"before"},null,512),[[io,z.value]]),qe(" "+h(m(t)("tagManager.moveBefore")),1)]),i("label",null,[be(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":re[22]||(re[22]=ye=>z.value=ye),value:"after"},null,512),[[io,z.value]]),qe(" "+h(m(t)("tagManager.moveAfter")),1)])])])]),i("div",p8,[i("button",{class:"cancel-btn",onClick:re[23]||(re[23]=ye=>A.value=!1)},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Hr},h(m(t)("common.confirm")),1)])])])):de("",!0),v.value?(T(),C("div",g8,[i("div",m8,[i("div",h8,[i("h2",null,h(m(t)("tagManager.moveGroup")),1),i("button",{class:"close-btn",onClick:re[24]||(re[24]=ye=>v.value=!1)},"×")]),i("div",v8,[i("div",_8,[i("label",null,h(m(t)("tagManager.targetGroup")),1),be(i("select",{"onUpdate:modelValue":re[25]||(re[25]=ye=>te.value=ye),class:"form-select"},[(T(!0),C(Oe,null,We(La.value,(ye,Ye)=>(T(),C("option",{key:"group_move_id"+Ye,value:ye.id_index},h(ye.name),9,y8))),128))],512),[[un,te.value]])]),i("div",b8,[i("label",null,h(m(t)("tagManager.movePosition")),1),i("div",w8,[i("label",null,[be(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":re[26]||(re[26]=ye=>q.value=ye),value:"before"},null,512),[[io,q.value]]),qe(" "+h(m(t)("tagManager.moveGroupBefore")),1)]),i("label",null,[be(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":re[27]||(re[27]=ye=>q.value=ye),value:"after"},null,512),[[io,q.value]]),qe(" "+h(m(t)("tagManager.moveGroupAfter")),1)])])])]),i("div",x8,[i("button",{class:"cancel-btn",onClick:re[28]||(re[28]=ye=>v.value=!1)},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Qi},h(m(t)("common.confirm")),1)])])])):de("",!0),H.value?(T(),C("div",T8,[i("div",{class:"weilin-tools-dialog-content tab-size-weilin-tools-dialog",onMousedown:re[39]||(re[39]=Xe(()=>{},["stop"]))},[i("div",S8,[i("h2",null,h(m(t)("tagManager.tabSizeConfig")),1),i("button",{class:"close-btn",onClick:Jr},"×")]),i("div",k8,[i("div",C8,[i("h3",null,h(m(t)("tagManager.primaryTabConfig")),1),i("div",E8,[i("label",null,h(m(t)("tagManager.tabWidth")),1),i("div",L8,[i("label",$8,[be(i("input",{type:"radio","onUpdate:modelValue":re[29]||(re[29]=ye=>U.value.primaryTab.width=ye),value:"fit-content"},null,512),[[io,U.value.primaryTab.width]]),qe(" "+h(m(t)("tagManager.fitContent")),1)]),i("label",A8,[be(i("input",{type:"radio","onUpdate:modelValue":re[30]||(re[30]=ye=>U.value.primaryTab.width=ye),value:"custom"},null,512),[[io,U.value.primaryTab.width]]),qe(" "+h(m(t)("tagManager.customWidth")),1)]),U.value.primaryTab.width!=="fit-content"?be((T(),C("input",{key:0,type:"number","onUpdate:modelValue":re[31]||(re[31]=ye=>U.value.primaryTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[Le,U.value.primaryTab.width,void 0,{number:!0}]]):de("",!0)])]),i("div",I8,[i("label",null,h(m(t)("tagManager.tabHeight"))+" ("+h(U.value.primaryTab.height)+"px)",1),be(i("input",{type:"range","onUpdate:modelValue":re[32]||(re[32]=ye=>U.value.primaryTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[Le,U.value.primaryTab.height,void 0,{number:!0}]])]),i("div",M8,[i("label",null,h(m(t)("tagManager.fontSize"))+" ("+h(U.value.primaryTab.fontSize)+"px)",1),be(i("input",{type:"range","onUpdate:modelValue":re[33]||(re[33]=ye=>U.value.primaryTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[Le,U.value.primaryTab.fontSize,void 0,{number:!0}]])])]),i("div",O8,[i("h3",null,h(m(t)("tagManager.groupTabConfig")),1),i("div",R8,[i("label",null,h(m(t)("tagManager.tabWidth")),1),i("div",N8,[i("label",D8,[be(i("input",{type:"radio","onUpdate:modelValue":re[34]||(re[34]=ye=>U.value.groupTab.width=ye),value:"fit-content"},null,512),[[io,U.value.groupTab.width]]),qe(" "+h(m(t)("tagManager.fitContent")),1)]),i("label",P8,[be(i("input",{type:"radio","onUpdate:modelValue":re[35]||(re[35]=ye=>U.value.groupTab.width=ye),value:"custom"},null,512),[[io,U.value.groupTab.width]]),qe(" "+h(m(t)("tagManager.customWidth")),1)]),U.value.groupTab.width!=="fit-content"?be((T(),C("input",{key:0,type:"number","onUpdate:modelValue":re[36]||(re[36]=ye=>U.value.groupTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[Le,U.value.groupTab.width,void 0,{number:!0}]]):de("",!0)])]),i("div",F8,[i("label",null,h(m(t)("tagManager.tabHeight"))+" ("+h(U.value.groupTab.height)+"px)",1),be(i("input",{type:"range","onUpdate:modelValue":re[37]||(re[37]=ye=>U.value.groupTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[Le,U.value.groupTab.height,void 0,{number:!0}]])]),i("div",U8,[i("label",null,h(m(t)("tagManager.fontSize"))+" ("+h(U.value.groupTab.fontSize)+"px)",1),be(i("input",{type:"range","onUpdate:modelValue":re[38]||(re[38]=ye=>U.value.groupTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[Le,U.value.groupTab.fontSize,void 0,{number:!0}]])])])]),i("div",B8,[i("button",{class:"reset-btn",onClick:Xn},h(m(t)("tagManager.resetDefault")),1),i("button",{class:"cancel-btn",onClick:Jr},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:eu},h(m(t)("common.confirm")),1)])],32)])):de("",!0),Ve(Iw,{ref_key:"importTagDialogItem",ref:Ts},null,512)]))}},[["__scopeId","data-v-c9c6726d"]]),Nr=100,vg=b(""),ho=b({}),Be={setActiveWindow(e){vg.value!==e&&(vg.value=e,Object.keys(ho.value).forEach(t=>{ho.value[t]=Nr}),ho.value[e]=Nr+10)},getZIndex(e){return ho.value[e]||(ho.value[e]=Nr),ho.value[e]},registerWindow(e){ho.value[e]||(ho.value[e]=Nr)},unregisterWindow(e){delete ho.value[e]}},Tn={getLoraList:async e=>await Ae({url:"/get_lora_list",method:"get",params:e}),getAllLoraList:async e=>await Ae({url:"/get_lora_load_all",method:"get",params:e}),getAllLoraStatus:async e=>await Ae({url:"/get_lora_load_status",method:"get",params:e}),getLoraDetail:async e=>await Ae({url:"/lorainfo/api/loras/info",method:"get",params:e}),getLoraRefresh:async e=>await Ae({url:"/lorainfo/api/loras/info/refresh",method:"get",params:e}),postUplaodImg:async(e,t,o)=>{const n=new FormData;return n.append("image",e),n.append("path",t),n.append("fileName",o),await Ae({url:"/lorainfo/api/loras/set/img",method:"post",data:n,headers:{"Content-Type":"multipart/form-data"}})},postLoraSave:async(e,t)=>{const o=new FormData;return o.append("json",JSON.stringify(t)),await Ae({url:"/lorainfo/api/loras/info?file="+e,method:"post",data:o,headers:{"Content-Type":"multipart/form-data"}})},postLoraDelet:async(e,t)=>await Ae({url:"/lorainfo/api/delete/loras/info/filed?file="+e,method:"post",data:{json:t}}),getLoraFolderList:async()=>await Ae({url:"/get_lora_folder_list",method:"post"}),getLoraRangeList:async e=>await Ae({url:"/get_lora_list_by_range",method:"post",data:{range:e}}),searchLoraGetFolderList:async e=>await Ae({url:"/get_lora_list_by_search",method:"post",data:{search:e}})},H8=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/,_g=pn({name:"JsonString",props:{jsonValue:{type:String,required:!0}},setup(e){const t=b(!0),o=b(!1),n=b(null),a=b(null);gt(()=>{n.value&&a.value&&n.value.offsetHeight>a.value.offsetHeight&&(o.value=!0)});const s=()=>{t.value=!t.value};return()=>{const r=e.jsonValue,l=H8.test(r);let u;!t.value&&o.value?u=xt("span",{class:{"jv-ellipsis":!0},onClick:s},"..."):l?u=xt("span",{class:{"jv-item":!0,"jv-string":!0},ref:n},[xt("span",null,'"'),xt("a",{href:r,target:"_blank",class:"jv-link"},r),xt("span",null,'"')]):u=xt("span",{class:{"jv-item":!0,"jv-string":!0},ref:n},`"${r}"`);const d=[];return o.value&&d.push(xt("span",{class:{"jv-toggle":!0,open:t.value},onClick:s})),d.push(xt("span",{class:{"jv-holder-node":!0},ref:a})),d.push(u),xt("span",{},d)}}}),j8={class:Ce(["jv-item","jv-undefined"])},W8=pn({__name:"json-undefined",props:{jsonValue:{type:null,default:void 0}},setup(e){const t=e,o=et(()=>t.jsonValue===null?"null":"undefined");return(n,a)=>(T(),C("span",j8,h(o.value),1))}}),V8=pn({__name:"json-number",props:{jsonValue:{type:Number,required:!0}},setup(e){const t=e,o=et(()=>Number.isInteger(t.jsonValue));return(n,a)=>(T(),C("span",{class:Ce(["jv-item","jv-number",o.value?"jv-number-integer":"jv-number-float"])},h(e.jsonValue.toString()),3))}}),z8={class:Ce(["jv-item","jv-boolean"])},q8=pn({__name:"json-boolean",props:{jsonValue:{type:Boolean,required:!0}},setup(e){return(t,o)=>(T(),C("span",z8,h(e.jsonValue.toString()),1))}}),G8=pn({name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const o=b({});let n=null;const a=u=>{setTimeout(()=>{o.value=u},0)};it(()=>e.jsonValue,u=>{a(u)},{immediate:!0,deep:!0});const s=et(()=>{if(!e.sort)return o.value;const u=Object.keys(o.value).sort(),d={};return u.forEach(c=>{d[c]=o.value[c]}),d}),r=()=>{if(n)try{n.dispatchEvent(new Event("resized"))}catch{const u=document.createEvent("Event");u.initEvent("resized",!0,!1),n.dispatchEvent(u)}},l=()=>{t("update:expand",!e.expand),r()};return()=>{const u=[];if(u.push(xt("span",{class:["jv-item","jv-object"]},"{")),e.expand){for(const d in s.value)if(s.value.hasOwnProperty(d)){const c=s.value[d];u.push(xt(Bi,{key:d,sort:e.sort,keyName:d,depth:e.depth+1,value:c,previewMode:e.previewMode}))}}return!e.expand&&Object.keys(o.value).length>0&&u.push(xt("span",{class:"jv-ellipsis",onClick:l,title:`click to reveal object content (keys: ${Object.keys(s.value).join(", ")})`},"...")),u.push(xt("span",{class:["jv-item","jv-object"]},"}")),xt("span",{ref:d=>{n=d}},u)}}}),Q8=pn({name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const o=b([]);let n=null;const a=(r,l=0)=>{l===0&&(o.value=[]),setTimeout(()=>{r&&r.length>l&&(o.value.push(r[l]),a(r,l+1))},0)};it(()=>e.jsonValue,r=>{a(r)},{immediate:!0,deep:!0});const s=()=>{if(t("update:expand",!e.expand),n)try{n.dispatchEvent(new Event("resized"))}catch{const r=document.createEvent("Event");r.initEvent("resized",!0,!1),n.dispatchEvent(r)}};return()=>{const r=[];return!e.previewMode&&!e.keyName&&r.push(xt("span",{class:{"jv-toggle":!0,open:!!e.expand},onClick:s})),r.push(xt("span",{class:["jv-item","jv-array"]},"[")),e.expand&&o.value.forEach((l,u)=>{r.push(xt(Bi,{key:u,sort:e.sort,depth:e.depth+1,value:l,previewMode:e.previewMode}))}),!e.expand&&o.value.length>0&&r.push(xt("span",{class:"jv-ellipsis",onClick:s,title:`click to reveal ${o.value.length} hidden items`},"...")),r.push(xt("span",{class:["jv-item","jv-array"]},"]")),xt("span",{ref:l=>{n=l}},r)}}}),Y8=["title"],K8=pn({__name:"json-function",props:{jsonValue:{type:Function,required:!0}},setup(e){return(t,o)=>(T(),C("span",{class:Ce(["jv-item","jv-function"]),title:e.jsonValue.toString()}," <function> ",8,Y8))}}),J8={class:Ce(["jv-item","jv-string"])},X8=pn({__name:"json-date",props:{jsonValue:{type:Date,required:!0}},setup(e){const t=e,o=ao("timeformat",a=>a.toLocaleString()),n=et(()=>o(t.jsonValue));return(a,s)=>(T(),C("span",J8,' "'+h(n.value)+'" ',1))}}),Z8={class:Ce(["jv-item","jv-regexp"])},e7=pn({__name:"json-regexp",props:{jsonValue:{type:RegExp,required:!0}},setup(e){return(t,o)=>(T(),C("span",Z8,h(e.jsonValue.toString()),1))}}),Bi=pn({name:"JsonBox",props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean},setup(e){const t=ao("expandDepth",1/0),o=ao("keyClick",()=>{}),n=b(!0);let a=null;gt(()=>{n.value=e.previewMode||e.depth<t});const s=()=>{if(n.value=!n.value,a)try{a.dispatchEvent(new Event("resized"))}catch{const r=document.createEvent("Event");r.initEvent("resized",!0,!1),a.dispatchEvent(r)}};return()=>{const r=[];let l;e.value===null||e.value===void 0?l=W8:Array.isArray(e.value)?l=Q8:e.value instanceof Date?l=X8:e.value instanceof RegExp?l=e7:typeof e.value=="object"?l=G8:typeof e.value=="number"?l=V8:typeof e.value=="string"?l=_g:typeof e.value=="boolean"?l=q8:typeof e.value=="function"?l=K8:l=_g;const u=e.value&&(Array.isArray(e.value)||typeof e.value=="object"&&!(e.value instanceof Date)&&!(e.value instanceof RegExp));return!e.previewMode&&u&&!(e.value instanceof RegExp)&&r.push(xt("span",{class:{"jv-toggle":!0,open:!!n.value},onClick:s})),e.keyName&&r.push(xt("span",{class:"jv-key",onClick:()=>{o&&o(e.keyName)}},`${e.keyName}:`)),r.push(xt(l,{class:"jv-push",jsonValue:e.value,keyName:e.keyName,sort:e.sort,depth:e.depth,expand:n.value,previewMode:e.previewMode,"onUpdate:expand":d=>{n.value=d}})),xt("div",{class:{"jv-node":!0,"jv-key-node":!!e.keyName&&!u,toggle:!e.previewMode&&u},ref:d=>{a=d}},r)}}});function t7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hi={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var n7=Hi.exports,yg;function o7(){return yg||(yg=1,(function(e,t){(function(o,n){e.exports=n()})(n7,function(){return(function(){var o={686:(function(s,r,l){l.d(r,{default:function(){return we}});var u=l(279),d=l.n(u),c=l(370),f=l.n(c),g=l(817),p=l.n(g);function v(ae){try{return document.execCommand(ae)}catch{return!1}}var y=function(ae){var ie=p()(ae);return v("cut"),ie},x=y;function S(ae){var ie=document.documentElement.getAttribute("dir")==="rtl",ve=document.createElement("textarea");ve.style.fontSize="12pt",ve.style.border="0",ve.style.padding="0",ve.style.margin="0",ve.style.position="absolute",ve.style[ie?"right":"left"]="-9999px";var Te=window.pageYOffset||document.documentElement.scrollTop;return ve.style.top="".concat(Te,"px"),ve.setAttribute("readonly",""),ve.value=ae,ve}var $=function(ae,ie){var ve=S(ae);ie.container.appendChild(ve);var Te=p()(ve);return v("copy"),ve.remove(),Te},W=function(ae){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ve="";return typeof ae=="string"?ve=$(ae,ie):ae instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(ae==null?void 0:ae.type)?ve=$(ae.value,ie):(ve=p()(ae),v("copy")),ve},w=W;function A(ae){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(ie){return typeof ie}:A=function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},A(ae)}var V=function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ae.action,ve=ie===void 0?"copy":ie,Te=ae.container,he=ae.target,P=ae.text;if(ve!=="copy"&&ve!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(he!==void 0)if(he&&A(he)==="object"&&he.nodeType===1){if(ve==="copy"&&he.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ve==="cut"&&(he.hasAttribute("readonly")||he.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(P)return w(P,{container:Te});if(he)return ve==="cut"?x(he):w(he,{container:Te})},z=V;function j(ae){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(ie){return typeof ie}:j=function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},j(ae)}function q(ae,ie){if(!(ae instanceof ie))throw new TypeError("Cannot call a class as a function")}function fe(ae,ie){for(var ve=0;ve<ie.length;ve++){var Te=ie[ve];Te.enumerable=Te.enumerable||!1,Te.configurable=!0,"value"in Te&&(Te.writable=!0),Object.defineProperty(ae,Te.key,Te)}}function te(ae,ie,ve){return ie&&fe(ae.prototype,ie),ve&&fe(ae,ve),ae}function I(ae,ie){if(typeof ie!="function"&&ie!==null)throw new TypeError("Super expression must either be null or a function");ae.prototype=Object.create(ie&&ie.prototype,{constructor:{value:ae,writable:!0,configurable:!0}}),ie&&R(ae,ie)}function R(ae,ie){return R=Object.setPrototypeOf||function(ve,Te){return ve.__proto__=Te,ve},R(ae,ie)}function H(ae){var ie=oe();return function(){var ve=D(ae),Te;if(ie){var he=D(this).constructor;Te=Reflect.construct(ve,arguments,he)}else Te=ve.apply(this,arguments);return U(this,Te)}}function U(ae,ie){return ie&&(j(ie)==="object"||typeof ie=="function")?ie:ne(ae)}function ne(ae){if(ae===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae}function oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function D(ae){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(ie){return ie.__proto__||Object.getPrototypeOf(ie)},D(ae)}function N(ae,ie){var ve="data-clipboard-".concat(ae);if(ie.hasAttribute(ve))return ie.getAttribute(ve)}var le=(function(ae){I(ve,ae);var ie=H(ve);function ve(Te,he){var P;return q(this,ve),P=ie.call(this),P.resolveOptions(he),P.listenClick(Te),P}return te(ve,[{key:"resolveOptions",value:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Te.action=="function"?Te.action:this.defaultAction,this.target=typeof Te.target=="function"?Te.target:this.defaultTarget,this.text=typeof Te.text=="function"?Te.text:this.defaultText,this.container=j(Te.container)==="object"?Te.container:document.body}},{key:"listenClick",value:function(Te){var he=this;this.listener=f()(Te,"click",function(P){return he.onClick(P)})}},{key:"onClick",value:function(Te){var he=Te.delegateTarget||Te.currentTarget,P=this.action(he)||"copy",Y=z({action:P,container:this.container,target:this.target(he),text:this.text(he)});this.emit(Y?"success":"error",{action:P,text:Y,trigger:he,clearSelection:function(){he&&he.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Te){return N("action",Te)}},{key:"defaultTarget",value:function(Te){var he=N("target",Te);if(he)return document.querySelector(he)}},{key:"defaultText",value:function(Te){return N("text",Te)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Te){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(Te,he)}},{key:"cut",value:function(Te){return x(Te)}},{key:"isSupported",value:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],he=typeof Te=="string"?[Te]:Te,P=!!document.queryCommandSupported;return he.forEach(function(Y){P=P&&!!document.queryCommandSupported(Y)}),P}}]),ve})(d()),we=le}),828:(function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function u(d,c){for(;d&&d.nodeType!==r;){if(typeof d.matches=="function"&&d.matches(c))return d;d=d.parentNode}}s.exports=u}),438:(function(s,r,l){var u=l(828);function d(g,p,v,y,x){var S=f.apply(this,arguments);return g.addEventListener(v,S,x),{destroy:function(){g.removeEventListener(v,S,x)}}}function c(g,p,v,y,x){return typeof g.addEventListener=="function"?d.apply(null,arguments):typeof v=="function"?d.bind(null,document).apply(null,arguments):(typeof g=="string"&&(g=document.querySelectorAll(g)),Array.prototype.map.call(g,function(S){return d(S,p,v,y,x)}))}function f(g,p,v,y){return function(x){x.delegateTarget=u(x.target,p),x.delegateTarget&&y.call(g,x)}}s.exports=c}),879:(function(s,r){r.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},r.nodeList=function(l){var u=Object.prototype.toString.call(l);return l!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in l&&(l.length===0||r.node(l[0]))},r.string=function(l){return typeof l=="string"||l instanceof String},r.fn=function(l){var u=Object.prototype.toString.call(l);return u==="[object Function]"}}),370:(function(s,r,l){var u=l(879),d=l(438);function c(v,y,x){if(!v&&!y&&!x)throw new Error("Missing required arguments");if(!u.string(y))throw new TypeError("Second argument must be a String");if(!u.fn(x))throw new TypeError("Third argument must be a Function");if(u.node(v))return f(v,y,x);if(u.nodeList(v))return g(v,y,x);if(u.string(v))return p(v,y,x);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(v,y,x){return v.addEventListener(y,x),{destroy:function(){v.removeEventListener(y,x)}}}function g(v,y,x){return Array.prototype.forEach.call(v,function(S){S.addEventListener(y,x)}),{destroy:function(){Array.prototype.forEach.call(v,function(S){S.removeEventListener(y,x)})}}}function p(v,y,x){return d(document.body,v,y,x)}s.exports=c}),817:(function(s){function r(l){var u;if(l.nodeName==="SELECT")l.focus(),u=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var d=l.hasAttribute("readonly");d||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),d||l.removeAttribute("readonly"),u=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(l),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}s.exports=r}),279:(function(s){function r(){}r.prototype={on:function(l,u,d){var c=this.e||(this.e={});return(c[l]||(c[l]=[])).push({fn:u,ctx:d}),this},once:function(l,u,d){var c=this;function f(){c.off(l,f),u.apply(d,arguments)}return f._=u,this.on(l,f,d)},emit:function(l){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),c=0,f=d.length;for(c;c<f;c++)d[c].fn.apply(d[c].ctx,u);return this},off:function(l,u){var d=this.e||(this.e={}),c=d[l],f=[];if(c&&u)for(var g=0,p=c.length;g<p;g++)c[g].fn!==u&&c[g].fn._!==u&&f.push(c[g]);return f.length?d[l]=f:delete d[l],this}},s.exports=r,s.exports.TinyEmitter=r})},n={};function a(s){if(n[s])return n[s].exports;var r=n[s]={exports:{}};return o[s](r,r.exports,a),r.exports}return(function(){a.n=function(s){var r=s&&s.__esModule?(function(){return s.default}):(function(){return s});return a.d(r,{a:r}),r}})(),(function(){a.d=function(s,r){for(var l in r)a.o(r,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:r[l]})}})(),(function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}})(),a(686)})().default})})(Hi)),Hi.exports}var a7=o7();const s7=t7(a7),r7=function(e,t){let o=Date.now(),n;return(...a)=>{Date.now()-o<t&&n&&clearTimeout(n),n=setTimeout(()=>{e(...a)},t),o=Date.now()}},l7=pn({name:"JsonViewer",components:{JsonBox:Bi},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"light"},timeformat:{type:Function,default:e=>e.toLocaleString()},previewMode:{type:Boolean,default:!1},parse:{type:Boolean,default:!1}},emits:["onKeyClick","copied"],setup(e,{emit:t}){const o=b(!1),n=b(!1),a=b(e.expanded),s=b(null),r=b(null);Ks("expandDepth",e.expandDepth),Ks("timeformat",e.timeformat),Ks("keyClick",v=>{t("onKeyClick",v)});const l=et(()=>"jv-container jv-"+e.theme+(e.boxed?" boxed":"")),u=et(()=>{if(typeof e.copyable=="boolean"&&!e.copyable)return{copyText:"copy",copiedText:"copied!",timeout:2e3,align:"right"};const v=e.copyable;return{copyText:v.copyText||"copy",copiedText:v.copiedText||"copied!",timeout:v.timeout||2e3,align:v.align||"right"}}),d=et(()=>{if(!e.parse||typeof e.value!="string")return e.value;try{return JSON.parse(e.value)}catch{return e.value}}),c=()=>{f()},f=r7(()=>{Ge(()=>{r.value&&(r.value.$el.clientHeight>=250?n.value=!0:n.value=!1)})},200),g=v=>{o.value||(o.value=!0,setTimeout(()=>{o.value=!1},u.value.timeout),t("copied",v))},p=()=>{a.value=!a.value};return it(()=>e.value,()=>{c()}),gt(()=>{e.boxed&&r.value&&(c(),r.value.$el.addEventListener("resized",c,!0)),e.copyable&&s.value&&new s7(s.value,{text:()=>JSON.stringify(d.value,null,2)}).on("success",g)}),{clip:s,jsonBox:r,copied:o,expandableCode:n,expandCode:a,jvClass:l,copyText:u,parseValue:d,toggleExpandCode:p}}}),i7=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o};function u7(e,t,o,n,a,s){const r=Jm("json-box");return T(),C("div",{class:Ce(e.jvClass)},[e.copyable?(T(),C("div",{key:0,class:Ce(`jv-tooltip ${e.copyText.align||"right"}`)},[i("span",{ref:"clip",class:Ce(["jv-button",{copied:e.copied}])},[Va(e.$slots,"copy",{copied:e.copied},()=>[qe(h(e.copied?e.copyText.copiedText:e.copyText.copyText),1)])],2)],2)):de("",!0),i("div",{class:Ce(["jv-code",{open:e.expandCode,boxed:e.boxed}])},[Ve(r,{ref:"jsonBox",value:e.parseValue,sort:e.sort,"preview-mode":e.previewMode},null,8,["value","sort","preview-mode"])],2),e.expandableCode&&e.boxed?(T(),C("div",{key:1,class:"jv-more",onClick:t[0]||(t[0]=(...l)=>e.toggleExpandCode&&e.toggleExpandCode(...l))},[i("span",{class:Ce(["jv-toggle",{open:!!e.expandCode}])},null,2)])):de("",!0)],2)}const c7=i7(l7,[["render",u7]]),d7={class:"lora-raw__content"},bg="weilin_tools_",f7=vt({__name:"lora_raw",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b({}),s=b(!1),r={loraRaw:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},u=b((()=>{try{const p=localStorage.getItem(`${bg}loraRawState`);if(p){const v=JSON.parse(p),y={...r};return v.loraRaw&&(y.loraRaw={...r.loraRaw,...v.loraRaw}),y}}catch(p){console.error("Error loading window states:",p)}return{...r}})());it(u,p=>{try{localStorage.setItem(`${bg}loraRawState`,JSON.stringify(p))}catch(v){console.error("Error saving window states:",v)}},{deep:!0}),gt(()=>{Be.registerWindow("loraRaw")}),On(()=>{Be.unregisterWindow("loraRaw")});const d=p=>{s.value=!1},c=(p,v)=>{u.value[p]&&(u.value[p].position={...v})},f=(p,v)=>{u.value[p]&&(u.value[p].size={...v})};return t({open:p=>{s.value=!0,Be.setActiveWindow("loraRaw"),a.value=p}}),(p,v)=>s.value?(T(),wt(xn,{key:0,title:m(n)("lora.rawTitle"),position:u.value.loraRaw.position,size:u.value.loraRaw.size,"z-index":m(Be).getZIndex("loraRaw"),"onUpdate:position":v[0]||(v[0]=y=>c("loraRaw",y)),"onUpdate:size":v[1]||(v[1]=y=>f("loraRaw",y)),onActive:v[2]||(v[2]=y=>m(Be).setActiveWindow("loraRaw")),onClose:v[3]||(v[3]=y=>d())},{default:pt(()=>[i("div",d7,[Ve(m(c7),{value:a.value,copyable:"",sort:"",theme:"dark"},null,8,["value"])])]),_:1},8,["title","position","size","z-index"])):de("",!0)}},[["__scopeId","data-v-4c910f08"]]),p7={key:0,class:"lora-detail__loading"},g7={class:"lora-detail__body"},m7={class:"lora-detail__tags"},h7=["title"],v7=["title"],_7={class:"lora-detail__table"},y7={class:"label"},b7={colspan:"2"},w7={colspan:"3"},x7={class:"label"},T7={colspan:"2",class:"hash"},S7={class:"label"},k7={colspan:"2"},C7=["href"],E7={key:1,class:"not-found"},L7=["title"],$7={class:"label"},A7=["title"],I7={key:1,class:"text"},M7={class:"actions"},O7={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},R7={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},N7={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},D7={class:"label"},P7={colspan:"2"},F7={class:"label"},U7={colspan:"2"},B7={class:"label"},H7=["title"],j7=["onUpdate:modelValue","type","onKeyup"],W7={key:1,class:"text"},V7={class:"actions"},z7=["onClick","title"],q7={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},G7={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},Q7={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},Y7={class:"label"},K7=["onUpdate:modelValue"],J7={key:1},X7=["onUpdate:modelValue","type","onKeyup"],Z7={key:1,class:"text"},e6={class:"actions"},t6=["onClick","title"],n6={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},o6={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},a6={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},s6=["onClick","title"],r6={class:"field-management"},l6=["title"],i6={key:0},u6={class:"label"},c6=["title"],d6={key:0,class:"word-selection"},f6={colspan:"2"},p6={class:"word-list"},g6=["onClick"],m6={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},h6={key:1},v6={key:0,class:"lora-detail__images"},_6={class:"image-wrapper"},y6=["onClick"],b6=["src"],w6={class:"image-info"},x6={key:0,class:"info-item"},T6=["href"],S6={key:1,class:"info-item"},k6={key:2,class:"info-item"},C6={key:3,class:"info-item"},E6={key:4,class:"info-item"},L6={key:5,class:"info-item"},$6={key:6,class:"info-item"},A6={key:7,class:"info-item"},wg="weilin_tools_",Dr=vt({__name:"lora_detail",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b({}),r=b(!1),l=b(),u=b({}),d={loraDetail:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},f=b((()=>{try{const P=localStorage.getItem(`${wg}loraDetailState`);if(P){const Y=JSON.parse(P),ee={...d};return Y.loraDetail&&(ee.loraDetail={...d.loraDetail,...Y.loraDetail}),ee}}catch(P){console.error("Error loading window states:",P)}return{...d}})());it(f,P=>{try{localStorage.setItem(`${wg}loraDetailState`,JSON.stringify(P))}catch(Y){console.error("Error saving window states:",Y)}},{deep:!0}),gt(()=>{Be.registerWindow("loraDetail")}),On(()=>{Be.unregisterWindow("loraDetail")});const g=P=>{r.value=!1},p=(P,Y)=>{f.value[P]&&(f.value[P].position={...Y})},v=(P,Y)=>{f.value[P]&&(f.value[P].size={...Y})};t({open:P=>{r.value=!0,Be.setActiveWindow("loraDetail"),a.value=!0,s.value=P,Ge(()=>{q()})}});const x=b(""),S=b(),$=P=>{S.value.open(P)},W=b({}),w=b({}),A=b([]),V=[{key:"strengthMin",label:n("lora.strengthMin"),tip:n("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:n("lora.strengthMax"),tip:n("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:n("lora.strWeight"),tip:n("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:n("lora.promptWords"),tip:n("lora.promptWordsTip")}],z=()=>{const P=`custom_${Date.now()}`;s.value.user_diy_fileds||(s.value.user_diy_fileds={}),u.value[P]={label:"新字段",type:"text"},s.value.user_diy_fileds[P]={label:"新字段",value:""},w.value[P]="",D(P)},j=async P=>{var Y,ee;delete u.value[P],delete w.value[P],(ee=(Y=s.value)==null?void 0:Y.user_diy_fileds)!=null&&ee[P]&&delete s.value.user_diy_fileds[P],await Ge(async()=>{await we(P)})},q=()=>{x.value=s.value.name,s.value={},A.value=[],w.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},Tn.getLoraDetail({file:x.value,refresh:!1,light:!1}).then(P=>{s.value=P.data,Ge(function(){var Y,ee,O,K,E,L;s.value.name=s.value.name||((ee=(Y=s.value.raw)===null||Y===void 0?void 0:Y.metadata)===null||ee===void 0?void 0:ee.ss_output_name===void 0?ee["modelspec.title"]:ee.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(O=s.value.strengthMin)!==null&&O!==void 0?O:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(K=s.value.strengthMax)!==null&&K!==void 0?K:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(E=s.value.userNote)!==null&&E!==void 0?E:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(L=s.value.loraWorks)!==null&&L!==void 0?L:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1})}).catch(P=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},fe=P=>{let ee=new URL(P).pathname.split("/").pop();return ee=ee.split("?")[0],decodeURIComponent(ee)},te=async P=>{try{const Y=await fetch(P),ee=fe(P),O=await Y.blob();Tn.postUplaodImg(O,s.value.file,ee).then(K=>{X({type:"success",str:"message.saveSuccess"})}).catch(K=>{X({type:"warn",str:"message.unknownError"})})}catch{X({type:"warn",str:"message.unknownError"})}},I=et(()=>{var P;return(P=s.value.links)==null?void 0:P.find(Y=>Y.includes("civitai.com/models"))}),R=et(()=>{var P,Y;return((Y=(P=s.value.raw)==null?void 0:P.civitai)==null?void 0:Y.error)==="Model not found"}),H=et(()=>s.value.trainedWords||[]),U=async()=>{var Y;const P=((Y=l.value)==null?void 0:Y.scrollTop)||0;a.value=!0,Tn.getLoraRefresh({file:x.value}).then(ee=>{s.value=ee.data,Ge(function(){var O,K,E,L,F,Z;s.value.name=s.value.name||((K=(O=s.value.raw)===null||O===void 0?void 0:O.metadata)===null||K===void 0?void 0:K.ss_output_name===void 0?K["modelspec.title"]:K.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(E=s.value.strengthMin)!==null&&E!==void 0?E:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(L=s.value.strengthMax)!==null&&L!==void 0?L:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(F=s.value.userNote)!==null&&F!==void 0?F:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(Z=s.value.loraWorks)!==null&&Z!==void 0?Z:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1}),Ge(function(){a.value=!1}),l.value&&(l.value.scrollTop=P),X({type:"success",str:"message.dataLoaded"})}).catch(ee=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},ne=P=>{W.value[P]?D(P):oe(P)},oe=P=>{var Y,ee;W.value[P]=!0,P in u.value?w.value[P]=((ee=(Y=s.value.user_diy_fileds)==null?void 0:Y[P])==null?void 0:ee.value)||"":w.value[P]=s.value[P],Ge(()=>{P==="name"&&nameInput.value&&nameInput.value.focus()})},D=P=>{P in u.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[P]={label:u.value[P].label,value:w.value[P]}):s.value[P]=w.value[P],le(s.value),W.value[P]=!1},N=P=>{W.value[P]=!1,w.value[P]=s.value[P]},le=P=>{var ee;const Y=((ee=l.value)==null?void 0:ee.scrollTop)||0;a.value=!0,Tn.postLoraSave(x.value,P).then(O=>{s.value=O.data,Ge(function(){var K,E,L,F,Z,ce;s.value.name=s.value.name||((E=(K=s.value.raw)===null||K===void 0?void 0:K.metadata)===null||E===void 0?void 0:E.ss_output_name===void 0?E["modelspec.title"]:E.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(L=s.value.strengthMin)!==null&&L!==void 0?L:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(F=s.value.strengthMax)!==null&&F!==void 0?F:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(Z=s.value.userNote)!==null&&Z!==void 0?Z:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(ce=s.value.loraWorks)!==null&&ce!==void 0?ce:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1,Ge(function(){l.value&&(l.value.scrollTop=Y)})}),X({type:"success",str:"message.saveSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},we=async P=>{var ee;const Y=((ee=l.value)==null?void 0:ee.scrollTop)||0;a.value=!0,await Tn.postLoraDelet(x.value,P).then(O=>{s.value=O.data,Ge(function(){var K,E,L,F,Z,ce;s.value.name=s.value.name||((E=(K=s.value.raw)===null||K===void 0?void 0:K.metadata)===null||E===void 0?void 0:E.ss_output_name===void 0?E["modelspec.title"]:E.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(L=s.value.strengthMin)!==null&&L!==void 0?L:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(F=s.value.strengthMax)!==null&&F!==void 0?F:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(Z=s.value.userNote)!==null&&Z!==void 0?Z:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(ce=s.value.loraWorks)!==null&&ce!==void 0?ce:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1,Ge(function(){l.value&&(l.value.scrollTop=Y)})}),X({type:"success",str:"message.deleteSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},ae=P=>{const Y=A.value.indexOf(P);Y===-1?A.value.push(P):A.value.splice(Y,1)},ie=P=>A.value.includes(P),ve=async()=>{A.value.length&&navigator.clipboard.writeText(A.value).then(P=>{X({type:"success",str:"message.copySuccess"})},P=>{X({type:"warn",str:"message.copyFailed"})})};b(!1),b(!1),et(()=>a.value?n("common.loading"):n("common.ready"));const Te=b(!0),he=()=>{Te.value=!Te.value};return(P,Y)=>(T(),C(Oe,null,[r.value?(T(),wt(xn,{key:0,title:m(n)("lora.title"),position:f.value.loraDetail.position,size:f.value.loraDetail.size,"z-index":m(Be).getZIndex("loraDetail"),"onUpdate:position":Y[5]||(Y[5]=ee=>p("loraDetail",ee)),"onUpdate:size":Y[6]||(Y[6]=ee=>v("loraDetail",ee)),onActive:Y[7]||(Y[7]=ee=>m(Be).setActiveWindow("loraDetail")),onClose:Y[8]||(Y[8]=ee=>g())},{default:pt(()=>{var ee;return[i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:l},[a.value?(T(),C("div",p7,[...Y[9]||(Y[9]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[i("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)])])):de("",!0),i("div",g7,[Y[24]||(Y[24]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",m7,[s.value.type?(T(),C("li",{key:0,class:Ce(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:m(n)("lora.type")},h(s.value.type),11,h7)):de("",!0),s.value.baseModel?(T(),C("li",{key:1,class:Ce(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:m(n)("lora.baseModel")},h(s.value.baseModel),11,v7)):de("",!0)]),i("table",_7,[i("tbody",null,[i("tr",null,[i("td",y7,h(m(n)("lora.file")),1),i("td",b7,h(s.value.file),1),i("td",w7,[i("button",{class:"fetch-btn",onClick:Y[0]||(Y[0]=O=>$(s.value.raw.metadata))},h(m(n)("lora.seeLoraRaw")),1)])]),i("tr",null,[i("td",x7,h(m(n)("lora.hash")),1),i("td",T7,h(s.value.sha256),1)]),i("tr",null,[i("td",S7,h(m(n)("lora.civitai")),1),i("td",k7,[I.value?(T(),C(Oe,{key:0},[i("a",{href:I.value,target:"_blank",class:"civitai-link"},[Y[10]||(Y[10]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"})],-1)),i("span",null,h(m(n)("lora.viewOnCivitai")),1)],8,C7),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:U},h(m(n)("lora.getCivitData")),1)],64)):R.value?(T(),C("div",E7,[i("i",null,h(m(n)("lora.modelNotFound")),1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.modelNotFoundTip")},[...Y[11]||(Y[11]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,L7))])):(T(),C("button",{key:2,class:"fetch-btn",onClick:U},h(m(n)("lora.fetchFromCivitai")),1))])]),i("tr",{class:Ce({"is-editing":W.value.name})},[i("td",$7,[qe(h(m(n)("lora.name"))+" ",1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.nameTip")},[...Y[12]||(Y[12]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,A7))]),i("td",null,[W.value.name?be((T(),C("input",{key:0,"onUpdate:modelValue":Y[1]||(Y[1]=O=>w.value.name=O),type:"text",onKeyup:[Y[2]||(Y[2]=tn(O=>D("name"),["enter"])),Y[3]||(Y[3]=tn(O=>N("name"),["esc"]))],ref:"nameInput"},null,544)),[[Le,w.value.name]]):(T(),C("span",I7,h(s.value.name),1))]),i("td",M7,[i("button",{class:"edit-btn",onClick:Y[4]||(Y[4]=O=>ne("name"))},[(T(),C("svg",O7,[W.value.name?(T(),C("path",R7)):(T(),C("path",N7))]))])])],2),i("tr",null,[i("td",D7,h(m(n)("lora.baseModel")),1),i("td",P7,h(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",F7,h(m(n)("lora.skipClip")),1),i("td",U7,h((P._t=(P._s=s.value.raw)===null||P._s===void 0?void 0:P._s.metadata)===null||P._t===void 0?void 0:P._t.ss_clip_skip),1)]),(T(),C(Oe,null,We(V,O=>i("tr",{key:O.key,class:Ce({"is-editing":W.value[O.key]})},[i("td",B7,[qe(h(O.label)+" ",1),O.tip?(T(),C("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:O.tip},[...Y[13]||(Y[13]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,H7)):de("",!0)]),i("td",null,[W.value[O.key]?be((T(),C("input",{key:0,"onUpdate:modelValue":K=>w.value[O.key]=K,type:O.type||"text",onKeyup:[tn(K=>D(O.key),["enter"]),tn(K=>N(O.key),["esc"])]},null,40,j7)),[[cd,w.value[O.key]]]):(T(),C("span",W7,h(s.value[O.key]),1))]),i("td",V7,[i("button",{class:"edit-btn",onClick:K=>ne(O.key),title:m(n)("promptBox.settings.edit")},[(T(),C("svg",q7,[W.value[O.key]?(T(),C("path",G7)):(T(),C("path",Q7))]))],8,z7)])],2)),64)),(T(!0),C(Oe,null,We(u.value,(O,K)=>{var E;return T(),C("tr",{key:K,class:Ce({"is-editing":W.value[K]})},[i("td",Y7,[W.value[K]?be((T(),C("input",{key:0,"onUpdate:modelValue":L=>O.label=L,type:"text"},null,8,K7)),[[Le,O.label]]):(T(),C("span",J7,h(O.label),1))]),i("td",null,[W.value[K]?be((T(),C("input",{key:0,"onUpdate:modelValue":L=>w.value[K]=L,type:O.type||"text",onKeyup:[tn(L=>D(K),["enter"]),tn(L=>N(K),["esc"])]},null,40,X7)),[[cd,w.value[K]]]):(T(),C("span",Z7,h(s.value.user_diy_fileds?(E=s.value.user_diy_fileds[K])==null?void 0:E.value:""),1))]),i("td",e6,[i("button",{class:"edit-btn",onClick:L=>ne(K),title:m(n)("promptBox.settings.edit")},[(T(),C("svg",n6,[W.value[K]?(T(),C("path",o6)):(T(),C("path",a6))]))],8,t6),i("button",{style:{"margin-left":"5px",color:"#f87171"},onClick:L=>j(K),class:"edit-btn",title:m(n)("promptBox.settings.delete")},h(m(n)("promptBox.settings.delete")),9,s6)])],2)}),128)),i("div",r6,[i("button",{onClick:z,class:"add-btn",title:m(n)("lora.addDiyFiled")},h(m(n)("lora.addDiyFiled")),9,l6)]),H.value.length?(T(),C("tr",i6,[i("td",u6,[qe(h(m(n)("lora.trainedWords"))+" ",1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.trainedWordsTip")},[...Y[14]||(Y[14]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,c6)),A.value.length?(T(),C("div",d6,[qe(h(m(n)("lora.selectedWords",{count:A.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:ve},h(m(n)("common.copy")),1)])):de("",!0)]),i("td",f6,[i("ul",p6,[(T(!0),C(Oe,null,We(Te.value?H.value.slice(0,10):H.value,(O,K)=>(T(),C("li",{key:"words-"+K,class:Ce(["word-item",{"is-selected":ie(O.word),"is-hidden":Te.value&&K>=10}]),onClick:E=>ae(O.word)},[i("span",null,h(O.word),1),O.civitai?(T(),C("svg",m6,[...Y[15]||(Y[15]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"},null,-1)])])):de("",!0),O.count!=null?(T(),C("small",h6,h(O.count),1)):de("",!0)],10,g6))),128)),H.value.length>10?(T(),C("li",{key:0,class:"toggle-btn",onClick:he},h(Te.value?m(n)("common.showMore"):m(n)("common.showLess")),1)):de("",!0)])])])):de("",!0)])]),(ee=s.value.images)!=null&&ee.length?(T(),C("ul",v6,[(T(!0),C(Oe,null,We(s.value.images,(O,K)=>(T(),C("li",{key:K,class:"lora-detail__image-item"},[i("figure",null,[i("div",_6,[i("div",{class:"image-action",onClick:E=>te(O.url)}," 设置为Lora封面 ",8,y6),i("img",{src:O.url},null,8,b6)]),i("figcaption",w6,[O.civitaiUrl?(T(),C("span",x6,[i("a",{href:O.civitaiUrl,target:"_blank",class:"civitai-link"},[...Y[16]||(Y[16]=[qe(" C站 civitai ",-1),i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})],-1)])],8,T6)])):de("",!0),O.seed?(T(),C("span",S6,[Y[17]||(Y[17]=i("label",null,"种子 seed",-1)),qe(" "+h(O.seed),1)])):de("",!0),O.steps?(T(),C("span",k6,[Y[18]||(Y[18]=i("label",null,"步数 steps",-1)),qe(" "+h(O.steps),1)])):de("",!0),O.cfg?(T(),C("span",C6,[Y[19]||(Y[19]=i("label",null,"引导系数 cfg",-1)),qe(" "+h(O.cfg),1)])):de("",!0),O.sampler?(T(),C("span",E6,[Y[20]||(Y[20]=i("label",null,"采样器 sampler",-1)),qe(" "+h(O.sampler),1)])):de("",!0),O.model?(T(),C("span",L6,[Y[21]||(Y[21]=i("label",null,"基础模型 model",-1)),qe(" "+h(O.model),1)])):de("",!0),O.positive?(T(),C("span",$6,[Y[22]||(Y[22]=i("label",null,"正向提示词 positive",-1)),qe(" "+h(O.positive),1)])):de("",!0),O.negative?(T(),C("span",A6,[Y[23]||(Y[23]=i("label",null,"反向提示词 negative",-1)),qe(" "+h(O.negative),1)])):de("",!0)])])]))),128))])):de("",!0)])],512)]}),_:1},8,["title","position","size","z-index"])):de("",!0),Ve(f7,{ref_key:"loraRawRef",ref:S},null,512)],64))}},[["__scopeId","data-v-3a570568"]]),I6={key:0,class:"lora-detail__loading"},M6={class:"lora-detail__body"},O6={class:"lora-detail__tags"},R6=["title"],N6=["title"],D6={class:"lora-detail__table"},P6={class:"label"},F6={colspan:"2"},U6={class:"label"},B6={colspan:"2",class:"hash"},H6={class:"label"},j6={colspan:"2"},W6=["href"],V6={key:1,class:"not-found"},z6=["title"],q6={class:"label"},G6=["title"],Q6={key:1,class:"text"},Y6={class:"label"},K6={colspan:"2"},J6={class:"label"},X6={colspan:"2"},Z6={class:"label"},ex=["title"],tx={class:"text"},nx={class:"actions"},ox=["onClick","title"],ax={class:"label"},sx=["onUpdate:modelValue"],rx={key:1},lx={class:"text"},ix={class:"actions"},ux=["onClick","title"],cx={key:0},dx={class:"label"},fx=["title"],px={key:0,class:"word-selection"},gx={colspan:"2"},mx={class:"word-list"},hx=["onClick"],vx={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},_x={key:1},yx={key:0,class:"lora-detail__images",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"12px"}},bx={class:"image-wrapper",style:{height:"200px"}},wx=["src"],ji=vt({__name:"lora_card",props:{fileNmae:{type:String,required:!0},paddingLeft:{type:Number,required:!1,default:100},paddingTop:{type:Number,required:!1,default:100}},emits:["cardLeave","cardenter"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b({}),r=b(),l=b({}),u=e,d=b(""),c=o,f=()=>{c("cardLeave")},g=()=>{c("cardenter")},p=b({}),v=b({}),y=b([]),x=[{key:"strengthMin",label:n("lora.strengthMin"),tip:n("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:n("lora.strengthMax"),tip:n("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:n("lora.strWeight"),tip:n("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:n("lora.promptWords"),tip:n("lora.promptWordsTip")}];gt(()=>{S()});const S=()=>{d.value=u.fileNmae,s.value={},y.value=[],v.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},Tn.getLoraDetail({file:d.value,refresh:!1,light:!1}).then(ne=>{s.value=ne.data,Ge(function(){var oe,D,N,le,we,ae;s.value.name=s.value.name||((D=(oe=s.value.raw)===null||oe===void 0?void 0:oe.metadata)===null||D===void 0?void 0:D.ss_output_name===void 0?D["modelspec.title"]:D.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(N=s.value.strengthMin)!==null&&N!==void 0?N:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(le=s.value.strengthMax)!==null&&le!==void 0?le:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(we=s.value.userNote)!==null&&we!==void 0?we:"",v.value.notesValue=s.value.userNote,s.value.loraWorks=(ae=s.value.loraWorks)!==null&&ae!==void 0?ae:"",v.value.loraWorksValue=s.value.loraWorks,l.value=s.value.user_diy_fileds,a.value=!1})}).catch(ne=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},$=ne=>{navigator.clipboard.writeText(ne).then(()=>{X({type:"success",str:"已复制到剪贴板"})}).catch(oe=>{X({type:"error",str:"复制失败"})})},W=et(()=>{var ne;return(ne=s.value.links)==null?void 0:ne.find(oe=>oe.includes("civitai.com/models"))}),w=et(()=>{var ne,oe;return((oe=(ne=s.value.raw)==null?void 0:ne.civitai)==null?void 0:oe.error)==="Model not found"}),A=et(()=>s.value.trainedWords||[]),V=async()=>{var oe;const ne=((oe=r.value)==null?void 0:oe.scrollTop)||0;a.value=!0,Tn.getLoraRefresh({file:d.value}).then(D=>{s.value=D.data,Ge(function(){var N,le,we,ae,ie;s.value.name=s.value.name||((le=(N=s.value.raw)===null||N===void 0?void 0:N.metadata)===null||le===void 0?void 0:le.ss_output_name===void 0?le["modelspec.title"]:le.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(we=s.value.strengthMin)!==null&&we!==void 0?we:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(ae=s.value.strengthMax)!==null&&ae!==void 0?ae:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(ie=s.value.userNote)!==null&&ie!==void 0?ie:"",v.value.notesValue=s.value.userNote,a.value=!1}),Ge(function(){a.value=!1}),r.value&&(r.value.scrollTop=ne),X({type:"success",str:"message.dataLoaded"})}).catch(D=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},z=ne=>{ne in l.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[ne]={label:l.value[ne].label,value:v.value[ne]}):s.value[ne]=v.value[ne],q(s.value),p.value[ne]=!1},j=ne=>{p.value[ne]=!1,v.value[ne]=s.value[ne]},q=ne=>{var D;const oe=((D=r.value)==null?void 0:D.scrollTop)||0;a.value=!0,Tn.postLoraSave(d.value,ne).then(N=>{s.value=N.data,Ge(function(){var le,we,ae,ie,ve;s.value.name=s.value.name||((we=(le=s.value.raw)===null||le===void 0?void 0:le.metadata)===null||we===void 0?void 0:we.ss_output_name===void 0?we["modelspec.title"]:we.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(ae=s.value.strengthMin)!==null&&ae!==void 0?ae:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(ie=s.value.strengthMax)!==null&&ie!==void 0?ie:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(ve=s.value.userNote)!==null&&ve!==void 0?ve:"",v.value.notesValue=s.value.userNote,a.value=!1,Ge(function(){r.value&&(r.value.scrollTop=oe)})}),X({type:"success",str:"message.saveSuccess"})}).catch(N=>{X({type:"warn",str:"message.networkError"}),a.value=!1})},fe=ne=>{const oe=y.value.indexOf(ne);oe===-1?y.value.push(ne):y.value.splice(oe,1)},te=ne=>y.value.includes(ne),I=async()=>{y.value.length&&navigator.clipboard.writeText(y.value).then(ne=>{X({type:"success",str:"message.copySuccess"})},ne=>{X({type:"warn",str:"message.copyFailed"})})},R=b(!0),H=()=>{R.value=!R.value};return t({refresh:()=>{S()}}),(ne,oe)=>{var D;return T(),C("div",{class:"lora_catd_content",style:ft(["left: "+e.paddingLeft+"px;top: "+e.paddingTop+"px;",{"font-size":"0.55em"}]),onMouseenter:g,onMouseleave:f},[i("div",{class:"close-button",onClick:f,title:"关闭"},[...oe[3]||(oe[3]=[i("span",null,"×",-1)])]),i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:r},[a.value?(T(),C("div",I6,[...oe[4]||(oe[4]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[i("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)])])):de("",!0),i("div",M6,[oe[13]||(oe[13]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",O6,[s.value.type?(T(),C("li",{key:0,class:Ce(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:m(n)("lora.type")},h(s.value.type),11,R6)):de("",!0),s.value.baseModel?(T(),C("li",{key:1,class:Ce(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:m(n)("lora.baseModel")},h(s.value.baseModel),11,N6)):de("",!0)]),i("table",D6,[i("tbody",null,[i("tr",null,[i("td",P6,h(m(n)("lora.file")),1),i("td",F6,h(s.value.file),1)]),i("tr",null,[i("td",U6,h(m(n)("lora.hash")),1),i("td",B6,h(s.value.sha256),1)]),i("tr",null,[i("td",H6,h(m(n)("lora.civitai")),1),i("td",j6,[W.value?(T(),C(Oe,{key:0},[i("a",{href:W.value,target:"_blank",class:"civitai-link"},[oe[5]||(oe[5]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"})],-1)),i("span",null,h(m(n)("lora.viewOnCivitai")),1)],8,W6),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:V},h(m(n)("lora.getCivitData")),1)],64)):w.value?(T(),C("div",V6,[i("i",null,h(m(n)("lora.modelNotFound")),1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.modelNotFoundTip")},[...oe[6]||(oe[6]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,z6))])):(T(),C("button",{key:2,class:"fetch-btn",onClick:V},h(m(n)("lora.fetchFromCivitai")),1))])]),i("tr",{class:Ce({"is-editing":p.value.name})},[i("td",q6,[qe(h(m(n)("lora.name"))+" ",1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.nameTip")},[...oe[7]||(oe[7]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,G6))]),i("td",null,[p.value.name?be((T(),C("input",{key:0,"onUpdate:modelValue":oe[0]||(oe[0]=N=>v.value.name=N),type:"text",onKeyup:[oe[1]||(oe[1]=tn(N=>z("name"),["enter"])),oe[2]||(oe[2]=tn(N=>j("name"),["esc"]))],ref:"nameInput"},null,544)),[[Le,v.value.name]]):(T(),C("span",Q6,h(s.value.name),1))])],2),i("tr",null,[i("td",Y6,h(m(n)("lora.baseModel")),1),i("td",K6,h(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",J6,h(m(n)("lora.skipClip")),1),i("td",X6,h((ne._t=(ne._s=s.value.raw)===null||ne._s===void 0?void 0:ne._s.metadata)===null||ne._t===void 0?void 0:ne._t.ss_clip_skip),1)]),(T(),C(Oe,null,We(x,N=>i("tr",{key:N.key,class:Ce({"is-editing":p.value[N.key]})},[i("td",Z6,[qe(h(N.label)+" ",1),N.tip?(T(),C("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:N.tip},[...oe[8]||(oe[8]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,ex)):de("",!0)]),i("td",null,[i("span",tx,h(s.value[N.key]),1)]),i("td",nx,[i("button",{class:"copy-btn",onClick:le=>$(s.value[N.key]),title:m(n)("lora.copy")},[oe[9]||(oe[9]=i("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),qe(" "+h(m(n)("lora.copy")),1)],8,ox)])],2)),64)),(T(!0),C(Oe,null,We(l.value,(N,le)=>{var we;return T(),C("tr",{key:le,class:Ce({"is-editing":p.value[le]})},[i("td",ax,[p.value[le]?be((T(),C("input",{key:0,"onUpdate:modelValue":ae=>N.label=ae,type:"text"},null,8,sx)),[[Le,N.label]]):(T(),C("span",rx,h(N.label),1))]),i("td",null,[i("span",lx,h(s.value.user_diy_fileds?(we=s.value.user_diy_fileds[le])==null?void 0:we.value:""),1)]),i("td",ix,[i("button",{class:"copy-btn",onClick:ae=>{var ie;return $((ie=s.value.user_diy_fileds[le])==null?void 0:ie.value)},title:m(n)("lora.copy")},[oe[10]||(oe[10]=i("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),qe(" "+h(m(n)("lora.copy")),1)],8,ux)])],2)}),128)),A.value.length?(T(),C("tr",cx,[i("td",dx,[qe(h(m(n)("lora.trainedWords"))+" ",1),(T(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:m(n)("lora.trainedWordsTip")},[...oe[11]||(oe[11]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,fx)),y.value.length?(T(),C("div",px,[qe(h(m(n)("lora.selectedWords",{count:y.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:I},h(m(n)("common.copy")),1)])):de("",!0)]),i("td",gx,[i("ul",mx,[(T(!0),C(Oe,null,We(R.value?A.value.slice(0,10):A.value,(N,le)=>(T(),C("li",{key:"words-"+le,class:Ce(["word-item",{"is-selected":te(N.word),"is-hidden":R.value&&le>=10}]),onClick:we=>fe(N.word)},[i("span",null,h(N.word),1),N.civitai?(T(),C("svg",vx,[...oe[12]||(oe[12]=[i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"},null,-1)])])):de("",!0),N.count!=null?(T(),C("small",_x,h(N.count),1)):de("",!0)],10,hx))),128)),A.value.length>10?(T(),C("li",{key:0,class:"toggle-btn",onClick:H},h(R.value?m(n)("common.showMore"):m(n)("common.showLess")),1)):de("",!0)])])])):de("",!0)])]),(D=s.value.images)!=null&&D.length?(T(),C("ul",yx,[(T(!0),C(Oe,null,We(s.value.images,(N,le)=>(T(),C("li",{key:le,class:"lora-detail__image-item"},[i("div",bx,[i("img",{src:N.url,style:{width:"100%",height:"100%","object-fit":"contain"}},null,8,wx)])]))),128))])):de("",!0)])],512)],36)}}},[["__scopeId","data-v-d4b68239"]]),xx={class:"header-actions"},Tx=["title"],Sx=["onMouseover","onDragstart","onDrop"],kx={class:"lora-info"},Cx={class:"lora-header"},Ex=["title"],Lx={class:"lora-actions"},$x=["onClick","title"],Ax=["onClick","title"],Ix={class:"lora-weights-row"},Mx={class:"weight-item-col"},Ox=["onUpdate:modelValue"],Rx={class:"weight-item-col"},Nx=["onUpdate:modelValue"],Dx={class:"switch-item-col"},Px={class:"switch"},Fx=["checked","onChange"],No="weilin_prompt_ui_",Ux=vt({__name:"lora_stack",props:{isOpen:{type:Boolean,default:!1},selectedLoras:{type:Array,default:[]}},emits:["close","update:selectedLoras"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(""),r=b(100),l=b(0),u=b(),d=b(!1),c=b(!1),f=b(),g=e,p=o,v=(te,I)=>{if(c.value=!0,s.value===te&&a.value)return;const H=I.currentTarget.getBoundingClientRect();let ne={left:H.left-450-10,top:H.top};ne.left<10&&(ne.left=H.right+10),ne.top=Math.max(10,Math.min(ne.top,window.innerHeight-310)),r.value=ne.left,l.value=ne.top,a.value=!0,s.value=te,Ge(()=>{f.value.refresh()})},y=()=>{c.value=!1,setTimeout(()=>{!d.value&&!c.value&&(a.value=!1,s.value="",d.value=!1)},200)},x=()=>{d.value=!0,c.value=!0},S=()=>{a.value=!1,s.value="",d.value=!1},$=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora"},"*")},W=te=>{te.hidden=!te.hidden},w=te=>{console.log(g.selectedLoras),g.selectedLoras&&!g.selectedLoras.find(I=>I.name===te.name)&&(g.selectedLoras.push({name:te.name,weight:1,text_encoder_weight:1,...te}),p("update:selectedLoras",g.selectedLoras))},A=te=>{const I=g.selectedLoras.findIndex(R=>R.name===te.name);I>-1&&(g.selectedLoras.splice(I,1),p("update:selectedLoras",g.selectedLoras))},V=b(),z=te=>{V.value.open({name:te.lora})};window.addEventListener("message",te=>{te.data.type==="weilin_prompt_ui_selectLora"&&w(te.data.lora)});const j=b(null),q=te=>{j.value=te},fe=te=>{if(j.value===null||j.value===te)return;const I=g.selectedLoras.splice(j.value,1)[0];g.selectedLoras.splice(te,0,I),j.value=null,p("update:selectedLoras",g.selectedLoras)};return t({addLora:w,removeLora:A}),(te,I)=>(T(),C("div",{class:Ce(`${No}lora-stack`),style:ft([{width:e.isOpen?"300px":"0"},{paddingRight:e.isOpen?"16px":"0"}])},[i("div",{class:Ce(`${No}lora-content`)},[i("div",{class:Ce(`${No}lora-header`)},[i("h3",{class:Ce(`${No}lora-title`)},h(m(n)("controls.loraStack")),3),i("div",xx,[i("button",{class:Ce(`${No}add-btn`),onClick:$,title:m(n)("controls.addLora")},[...I[2]||(I[2]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,Tx),i("button",{class:Ce(`${No}close-btn`),onClick:I[0]||(I[0]=R=>te.$emit("close"))},[...I[3]||(I[3]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],2)])],2),i("div",{class:Ce(`${No}lora-body`)},[i("div",{class:Ce(`${No}lora-list`)},[(T(!0),C(Oe,null,We(e.selectedLoras,(R,H)=>(T(),C("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:u,key:R.name,class:Ce(["lora-item",{"hidden-lora":R.hidden}]),onMouseover:U=>v(R.lora,U),onMouseleave:y,draggable:"true",onDragstart:U=>q(H),onDragover:I[1]||(I[1]=Xe(()=>{},["prevent"])),onDrop:U=>fe(H)},[i("div",kx,[i("div",Cx,[i("span",{class:"lora-name",title:R.name},h(R.name),9,Ex),i("div",Lx,[i("button",{class:"look-on-btn",onClick:U=>z(R),title:m(n)("controls.lookOnLora")},[...I[4]||(I[4]=[i("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[i("path",{d:"M576.5 930.2H163.1c-52.9 0-96-43.1-96-96v-672c0-52.9 43.1-96 96-96h672c52.9 0 96 43.1 96 96V577c0 17.7-14.3 32-32 32s-32-14.3-32-32V162.2c0-17.6-14.4-32-32-32h-672c-17.6 0-32 14.4-32 32v672c0 17.6 14.4 32 32 32h413.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z","p-id":"3466"}),i("path",{d:"M692.4 322.3H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h446.7c17.7 0 32 14.3 32 32s-14.3 32-32 32zM388.5 530.2H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.6-14.3 32-31.9 32zM388.5 738H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.7-14.3 32-31.9 32z","p-id":"3467"}),i("path",{d:"M624.1 792.5c-94.8 0-172-77.2-172-172s77.2-172 172-172 172 77.2 172 172-77.1 172-172 172z m0-280c-59.6 0-108 48.4-108 108s48.4 108 108 108 108-48.4 108-108-48.4-108-108-108z","p-id":"3468"}),i("path",{d:"M820.8 864.2L710.5 753.9c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L866 818.9c12.5 12.5 12.5 32.8 0 45.3s-32.7 12.5-45.2 0z","p-id":"3469"})],-1)])],8,$x),i("button",{class:"remove-btn",onClick:U=>A(R),title:m(n)("controls.removeLora")},[...I[5]||(I[5]=[i("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,Ax)])]),i("div",Ix,[i("div",Mx,[i("label",null,h(m(n)("loraManager.modelWeight")),1),be(i("input",{type:"number","onUpdate:modelValue":U=>R.weight=U,class:"lora-weight",step:"0.1"},null,8,Ox),[[Le,R.weight]])]),i("div",Rx,[i("label",null,h(m(n)("loraManager.textEncoderWeight")),1),be(i("input",{type:"number","onUpdate:modelValue":U=>R.text_encoder_weight=U,class:"lora-weight",step:"0.1"},null,8,Nx),[[Le,R.text_encoder_weight]])]),i("div",Dx,[i("label",null,h(R.hidden?m(n)("lora.hideLora"):m(n)("lora.showLora")),1),i("label",Px,[i("input",{type:"checkbox",checked:!R.hidden,onChange:U=>W(R)},null,40,Fx),I[6]||(I[6]=i("span",{class:"slider"},null,-1))])])])])],42,Sx))),128))],2)],2)],2),Ve(Dr,{ref_key:"loraDetailLoraStackRef",ref:V},null,512),a.value?(T(),wt(ji,{key:0,ref_key:"loraCardItem",ref:f,fileNmae:s.value,paddingLeft:r.value,paddingTop:l.value,onCardLeave:S,onCardenter:x},null,8,["fileNmae","paddingLeft","paddingTop"])):de("",!0)],6))}},[["__scopeId","data-v-a3bc6f0c"]]),Bx={class:"main-label-manager"},Hx={class:"mlm-header"},jx={class:"mlm-grid"},Wx=["disabled"],Vx=["disabled"],zx={class:"mlm-list"},qx=["onClick","title"],Gx={class:"mlm-item-main"},Qx={key:0,class:"pin-badge"},Yx={class:"mlm-name"},Kx={class:"mlm-item-actions"},Jx=["title","onClick"],Xx=["title","onClick"],xg="weilin_prompt_ui_main_labels_v1",Zx=vt({__name:"main_label_manager",props:{selectedId:{type:String,default:null}},emits:["select"],setup(e,{expose:t,emit:o}){const n=e,a=o,s=b(""),r=b([]),l=b(n.selectedId);gt(()=>{if(y(),r.value.length===0){const R=v();r.value.push({id:R,name:"示例标签",content:"",createdAt:Date.now(),updatedAt:Date.now(),pinned:!1,highlighted:!1}),x(),l.value=R,a("select",S(R))}}),it(()=>n.selectedId,R=>{l.value=R});const u=b(!0),d=b(!0),c=b("time"),f=et(()=>{const R=s.value.trim().toLowerCase();return R?r.value.filter(H=>(H.name||"").toLowerCase().includes(R)):r.value}),g=et(()=>{const R=[...f.value],H=(oe,D)=>{const N=oe.name||"",le=D.name||"";let we=N.localeCompare(le,void 0,{numeric:!0,sensitivity:"base"});return d.value||(we=-we),we},U=(oe,D)=>{let N=oe.createdAt-D.createdAt;return u.value&&(N=-N),N},ne=oe=>oe.pinned?0:oe.highlighted?1:2;return R.sort((oe,D)=>{const N=ne(oe)-ne(D);if(N!==0)return N;if(c.value==="name"){const we=H(oe,D);return we!==0?we:U(oe,D)}const le=U(oe,D);return le!==0?le:H(oe,D)}),R}),p=et(()=>S(l.value));function v(){return"mlm_"+Math.random().toString(36).slice(2)+"_"+Date.now()}function y(){try{const R=localStorage.getItem(xg),H=R?JSON.parse(R):[];r.value=H.map(U=>({id:U.id??v(),name:U.name??"未命名",content:U.content??"",createdAt:U.createdAt??U.updatedAt??Date.now(),updatedAt:U.updatedAt??U.createdAt??Date.now(),pinned:!!U.pinned,highlighted:!!U.highlighted}))}catch{r.value=[]}}function x(){localStorage.setItem(xg,JSON.stringify(r.value))}function S(R){return r.value.find(H=>H.id===R)||null}function $(R){l.value=R.id,a("select",{...R})}function W(){const R=window.prompt("新建标签名称:","");if(!R)return;const H=v(),U={id:H,name:R.trim(),content:"",createdAt:Date.now(),updatedAt:Date.now(),pinned:!1,highlighted:!1};r.value.unshift(U),x(),l.value=H,a("select",{...U})}function w(){const R=p.value;if(!R)return;const H=window.prompt("重命名标签:",R.name||"");H&&(R.name=H.trim(),R.updatedAt=Date.now(),x())}function A(){const R=p.value;if(!R||!window.confirm(`确定删除标签“${R.name}”吗?`))return;const H=r.value.findIndex(U=>U.id===R.id);H>=0&&r.value.splice(H,1),x(),r.value.length?(l.value=r.value[0].id,a("select",{...r.value[0]})):(l.value=null,a("select",null))}function V(){c.value="time",u.value=!u.value}function z(){c.value="name",d.value=!d.value}function j(R){R.pinned=!R.pinned,R.updatedAt=Date.now(),x()}function q(R){R.highlighted=!R.highlighted,R.updatedAt=Date.now(),x()}function fe(R){const H=p.value;H&&(H.content=R??"",H.updatedAt=Date.now(),clearTimeout(te),te=setTimeout(()=>x(),400))}let te=null;function I(R){try{const H=new Date(R);return`${H.getFullYear()}-${(H.getMonth()+1).toString().padStart(2,"0")}-${H.getDate().toString().padStart(2,"0")} ${H.getHours().toString().padStart(2,"0")}:${H.getMinutes().toString().padStart(2,"0")}`}catch{return""}}return t({updateSelectedContent:fe}),(R,H)=>(T(),C("div",Bx,[i("div",Hx,[be(i("input",{"onUpdate:modelValue":H[0]||(H[0]=U=>s.value=U),class:"mlm-search",type:"text",placeholder:"搜索标签…"},null,512),[[Le,s.value]]),i("button",{class:"mlm-add",onClick:W},"+ 新建标签"),i("div",jx,[i("button",{class:"mlm-sort",onClick:V}," 按时间 "+h(u.value?"后→先":"先→后"),1),i("button",{class:"mlm-sort",onClick:z}," 按名称 "+h(d.value?"A→Z":"Z→A"),1),i("button",{class:"mlm-edit",disabled:!p.value,onClick:w},"编辑",8,Wx),i("button",{class:"mlm-delete",disabled:!p.value,onClick:A},"删除",8,Vx)])]),i("div",zx,[(T(!0),C(Oe,null,We(g.value,U=>(T(),C("div",{key:U.id,class:Ce(["mlm-item",{active:U.id===l.value,pinned:!!U.pinned,highlighted:!!U.highlighted}]),onClick:ne=>$(U),title:U.updatedAt?I(U.updatedAt):""},[i("div",Gx,[U.pinned?(T(),C("span",Qx,"置顶")):de("",!0),i("span",Yx,h(U.name),1)]),i("div",Kx,[i("button",{class:Ce(["mini-btn","pin",{active:U.pinned}]),title:U.pinned?"取消置顶":"置顶",onClick:Xe(ne=>j(U),["stop"])},[...H[1]||(H[1]=[i("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[i("path",{d:"M4 14h4v6h8v-6h4L12 4 4 14z"})],-1)])],10,Jx),i("button",{class:Ce(["mini-btn","highlight",{active:U.highlighted}]),title:U.highlighted?"取消高亮":"高亮",onClick:Xe(ne=>q(U),["stop"])},[...H[2]||(H[2]=[i("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[i("path",{d:"M12 17.27L18.18 21 16.54 13.97 22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})],-1)])],10,Xx)])],10,qx))),128))])]))}},[["__scopeId","data-v-9feda682"]]);function Tg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={exports:{}},e9=Pr.exports,Sg;function t9(){return Sg||(Sg=1,(function(e){if(typeof t=="object"&&typeof t.version=="string")throw new Error("translate.js 已经加载过一次了,当前是重复加载,避免你的翻译出现异常,已帮你拦截此次加载。本信息只是给你一个提示,你可以检查一下你的项目中是否出现了重复引入 translate.js ,当然,这个异常并不会影响到你的具体使用,它已经自动帮你处理拦截了这个异常,只不过提示出来是让你知道,你的代码里出现了重复引入的情况。");var t={version:"3.18.0.20250816",useVersion:"v2",setUseVersion2:function(){t.useVersion="v2",console.log("提示:自 v2.10 之后的版本默认就是使用V2版本(当前版本为:"+t.version+"), translate.setUseVersion2() 可以不用再加这一行了。当然加了也无所谓,只是加了跟不加是完全一样的。")},translate:null,includedLanguages:"zh-CN,zh-TW,en",resourcesUrl:"//res.zvo.cn/translate",selectLanguageTag:{documentId:"translate",show:!0,languages:"",alreadyRender:!1,selectOnChange:function(n){var a=n.target.value;t.changeLanguage(a)},refreshRender:function(){let n=document.getElementById(t.selectLanguageTag.documentId+"SelectLanguage");n&&n.parentNode.removeChild(n),t.selectLanguageTag.alreadyRender=!1,t.selectLanguageTag.render()},customUI:function(n){var a=function(c){t.selectLanguageTag.selectOnChange(c)},s=document.createElement("select");s.id=t.selectLanguageTag.documentId+"SelectLanguage",s.className=t.selectLanguageTag.documentId+"SelectLanguage";for(var r=t.language.getCurrent(),l=0;l<n.length;l++){var u=document.createElement("option");if(u.setAttribute("value",n[l].id),t.selectLanguageTag.languages.length>0){var d=(","+t.selectLanguageTag.languages+",").toLowerCase();if(d.indexOf(","+n[l].id.toLowerCase()+",")<0)continue}r!=null&&typeof r<"u"&&r.length>0?r==n[l].id&&u.setAttribute("selected","selected"):n[l].id==t.language.getLocal()&&u.setAttribute("selected","selected"),u.appendChild(document.createTextNode(n[l].name)),s.appendChild(u)}window.addEventListener?s.addEventListener("change",a,!1):s.attachEvent("onchange",a),document.getElementById(t.selectLanguageTag.documentId).appendChild(s)},render:function(){if(!t.selectLanguageTag.alreadyRender&&(t.selectLanguageTag.alreadyRender=!0,!!t.selectLanguageTag.show)){if(document.getElementById(t.selectLanguageTag.documentId)==null){var n=document.getElementsByTagName("body");if(n.length==0){console.log("body tag not find, translate.selectLanguageTag.render() is not show Select Language");return}var a=n[0],s=document.createElement("div");s.id=t.selectLanguageTag.documentId,a.appendChild(s)}else if(document.getElementById(t.selectLanguageTag.documentId+"SelectLanguage")!=null)return;typeof t.request.api.language=="string"&&t.request.api.language.length>0?t.request.post(t.request.api.language,{},function(r){if(r.result==0){console.log("load language list error : "+r.info);return}t.selectLanguageTag.customUI(r.list)},null):typeof t.request.api.language=="object"&&t.selectLanguageTag.customUI(t.request.api.language)}}},localLanguage:"zh-CN",googleTranslateElementInit:function(){var n="";document.getElementById("translate")!=null&&(n="translate"),t.translate=new google.translate.TranslateElement({pageLanguage:"zh-CN",includedLanguages:t.selectLanguageTag.languages,layout:0},n)},execute_v1:function(){console.log("=====ERROR======"),console.log("The v1 version has been discontinued since 2022. Please use the latest V3 version and refer to: http://translate.zvo.cn/41162.html")},setCookie:function(n,a){var s=n+"="+escape(a);document.cookie=s},getCookie:function(n){for(var a=document.cookie,s=a.split("; "),r=0;r<s.length;r++){var l=s[r].split("=");if(l[0]==n)return unescape(l[1])}return""},currentLanguage:function(){var n=t.getCookie("googtrans");return n.length>0?n.substr(n.lastIndexOf("/")+1,n.length-1):t.localLanguage},changeLanguage:function(n){var a=",en,de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr,";if(a.indexOf(","+n+",")>-1){console.log("您使用的是v1版本的切换语种方式,v1已在2021年就以废弃,请更换为v2,参考文档: http://translate.zvo.cn/41549.html"),t.check();var s="/"+t.localLanguage+"/"+n,r=document.location.host.split(".");if(r.length>2){var l=r[r.length-2]+"."+r[r.length-1];document.cookie="googtrans=;expires="+new Date(1)+";domain="+l+";path=/",document.cookie="googtrans="+s+";domain="+l+";path=/"}t.setCookie("googtrans",""+s),t.refreshCurrentPage();return}if(t.useVersion="v2",t.to!=null&&t.to.length>0&&t.to!=t.language.getLocal())var u=!0;t.to=n,t.storage.set("to",n);try{window.self!==window.top&&typeof window.parent.translate=="object"&&typeof window.parent.translate.version=="string"&&window.parent.translate.language.getCurrent()!=n&&window.parent.translate.changeLanguage(n)}catch(d){console.log(d)}if(u)location.reload();else{t.execute();const d=document.querySelectorAll("iframe");for(let c=0;c<d.length;c++){const g=d[c].contentWindow;try{typeof g.translate=="object"&&typeof g.translate.version=="string"&&g.translate.to!=n&&(g.translate.to=n,g.translate.storage.set("to",n),g.translate.execute())}catch(p){console.log(p)}}}t.listener.use==!0&&t.listener.isStart==!1&&typeof t.listener.start<"u"&&t.listener.start()},check:function(){window.location.protocol=="file:"&&console.log(`\r
---WARNING----\r
translate.js 主动翻译组件自检异常,当前协议是file协议,翻译组件要在正常的线上http、https协议下才能正常使用翻译功能\r
------------`)},to:"",autoDiscriminateLocalLanguage:!1,documents:[],inProgressNodes:[],ignore:{tag:["style","script","link","pre","code"],class:["ignore","translateSelectLanguage"],id:[],isIgnore:function(n){if(n==null||typeof n>"u")return!1;for(var a=n,s=100;s-- >0;){if(a==null||typeof a>"u")return!1;var r=t.element.getNodeName(a).toLowerCase();if(r.length>0){if(r=="body"||r=="html"||r=="#document")return!1;if(t.ignore.tag.indexOf(r)>-1)return!0}if(a.className!=null){var l=a.className;if(l==null||typeof l!="string")continue;l=l.trim().split(" ");for(var u=0;u<l.length;u++)if(l[u]!=null&&l[u].trim().length>0&&t.ignore.class.indexOf(l[u])>-1)return!0}if(a.id!=null&&typeof a.id<"u"&&t.ignore.id.indexOf(a.id)>-1)return!0;a=a.parentNode}return!1},text:[],textRegex:[],setTextRegexs:function(n){if(!Array.isArray(n))throw new Error("参数必须为数组");for(let a=0;a<n.length;a++)if(!(n[a]instanceof RegExp))throw new Error("第"+a+"项不是RegExp对象");this.textRegex=this.textRegex.concat(n)}},refreshCurrentPage:function(){location.reload()},nomenclature:{data:new Array,old_Data:[],set:function(n){alert("请将 translate.nomenclature.set 更换为 append,具体使用可参考: https://github.com/xnx3/translate ")},append:function(n,a,s){typeof t.nomenclature.data[n]>"u"&&(t.nomenclature.data[n]=new Array),typeof t.nomenclature.data[n][a]>"u"&&(t.nomenclature.data[n][a]=new Array);for(var r=s.split(`
`),l=0;l<r.length;l++){var u=r[l].trim();if(!(u.length<1)){var d=u.split("=");if(d.length==2){var c=d[0].trim(),f=d[1].trim();c.length==0||f.length==0||(t.nomenclature.data[n][a][c]=f)}}}t.nomenclature.data[n][a]=t.util.objSort(t.nomenclature.data[n][a])},get:function(){return t.nomenclature.data},dispose:function(n){if(n==null||n.length==0||typeof t.nomenclature.data[t.language.getLocal()]>"u"||typeof t.nomenclature.data[t.language.getLocal()][t.to]>"u")return n;for(var a in t.nomenclature.data[t.language.getLocal()][t.to])if(t.nomenclature.data[t.language.getLocal()][t.to].hasOwnProperty(a)){var s=t.nomenclature.data[t.language.getLocal()][t.to][a];if(typeof s!="function"){var r=n.indexOf(a);if(r>-1)if(t.language.getLocal()=="english"){var l="";if(r!=0){l=n.substr(r-1,1);var u=t.language.getCharLanguage(l);if(u=="english"||u=="romance")continue}var d="";if(r+a.length!=n.length){d=n.substr(r+a.length,1);var u=t.language.getCharLanguage(d);if(u=="english"||u=="romance")continue}n=n.replace(new RegExp(l+a+d,"g"),l+s+d)}else n=n.replace(new RegExp(a,"g"),s)}}return n}},office:{export:function(){if(t.language.getLocal()==t.language.getCurrent()){alert("本地语种跟要翻译的语种一致,无需导出");return}var n="";for(var a in t.nodeQueue)if(t.nodeQueue.hasOwnProperty(a)){t.nodeQueue[a];for(var s in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(s)&&!(typeof s!="string"||s.length<1))for(var r in t.nodeQueue[a].list[s])t.nodeQueue[a].list[s].hasOwnProperty(r)&&(n=n+`
`+t.nodeQueue[a].list[s][r].original+"="+t.storage.get("hash_"+t.language.getCurrent()+"_"+r))}n.length>0?(n="translate.office.append('"+t.language.getCurrent()+"',`"+n+"\n`);",t.util.loadMsgJs(),msg.popups({text:'<textarea id="msgPopupsTextarea" style="width:100%; height:100%; color: black; padding: 8px;">loaing...</textarea>',width:"750px",height:"600px",padding:"1px"}),document.getElementById("msgPopupsTextarea").value=n):msg.alert("无有效内容!")},showPanel:function(){let n=document.createElement("div");n.setAttribute("id","translate_export"),n.setAttribute("class","ignore");let a=document.createElement("button");a.onclick=function(){t.office.export()},a.innerHTML="导出配置信息",a.setAttribute("style","margin-left: 72px; margin-top: 30px; margin-bottom: 20px; font-size: 25px; background-color: blue; padding: 15px; padding-top: 3px; padding-bottom: 3px; border-radius: 3px;"),n.appendChild(a);let s=document.createElement("div");s.innerHTML='1. 首先将当前语种切换为你要翻译的语种<br/>2. 点击导出按钮,将翻译的配置信息导出<br/>3. 将导出的配置信息粘贴到代码中,即可完成<br/><a href="asd" target="_black" style="color: aliceblue;">点此进行查阅详细使用说明</a>',s.setAttribute("style","font-size: 14px; padding: 12px;"),n.appendChild(s),n.setAttribute("style","background-color: black; color: #fff; width: 320px; height: 206px; position: fixed; bottom: 50px; right: 50px;"),document.body.appendChild(n),t.util.loadMsgJs()},append:function(n,a){for(var s=a.split(`
`),r=0;r<s.length;r++){var l=s[r].trim();if(!(l.length<1)){var u=l.split("=");if(u.length==2){var d=u[0],c=u[1];d.length==0||c.length==0||t.storage.set("hash_"+n+"_"+t.util.hash(d),c)}}}},fullExtract:{set:async function(n,a,s,r){if(typeof t.storage.IndexedDB>"u"){console.log("ERROR: translate.storage.IndexedDB not find");return}var l=await t.storage.IndexedDB.get("hash_"+n);typeof l>"u"&&l==null&&(l={originalText:a}),l[s]=r,await t.storage.IndexedDB.set("hash_"+n,l)},export:async function(n){if(typeof t.storage.IndexedDB>"u"){console.log("ERROR: translate.storage.IndexedDB not find");return}if(typeof n!="string"){console.log('error : to param not find, example: "english"');return}var a="translate.office.append('",s=await t.storage.IndexedDB.list("hash_*");for(var r in s)if(s.hasOwnProperty(r)){var l=s[r].value.originalText.replace(/\n/g,"\\n").replace(/\t/g,"\\t");a=a+`
`+l+"="+s[r].value.english.replace(/\n/g,"\\n").replace(/\t/g,"\\t")}a=a+"\n`);";const u=new Blob([a],{type:"text/plain"}),d=URL.createObjectURL(u),c=document.createElement("a");c.href=d,c.download=n+".txt",c.click(),URL.revokeObjectURL(d)},isUse:!1}},setAutoDiscriminateLocalLanguage:function(){t.autoDiscriminateLocalLanguage=!0},nodeQueue:{},setDocuments:function(n){n==null||typeof n>"u"||(typeof n.length>"u"?t.documents[0]=n:t.documents=n,t.nodeQueue={})},getDocuments:function(){if(t.documents!=null&&typeof t.documents<"u"&&t.documents.length>0)return t.documents;var n=new Array;return n[0]=document.documentElement,n},listener:{isStart:!1,use:!1,start:function(){t.listener.use=!0,t.temp_linstenerStartInterval=setInterval(function(){if(document.readyState=="complete"){if(clearInterval(t.temp_linstenerStartInterval),t.language.getCurrent()==t.language.getLocal()&&!t.language.translateLocal)return;t.listener.addListener()}},300)},ignoreNode:[],translateExecuteNodeIgnoreExpireTime:1e3,addIgnore:function(n,a,s){let r="";typeof n=="string"?r=n:r=o.uuid(n),t.listener.ignoreNode[r]={addtime:Date.now()+a,text:s}},refreshIgnoreNode:function(){var n=Date.now();for(const a in t.listener.ignoreNode)t.listener.ignoreNode[a].addtime<n&&delete t.listener.ignoreNode[a]},addListener:function(){if(t.listener.isStart==!0){console.log("translate.listener.start() 已经启动了,无需再重复启动监听,增加浏览器负担");return}t.listener.isStart=!0,t.listener.config={attributes:!0,childList:!0,subtree:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0},t.listener.callback=function(r,l){var u=[];for(let v of r){let y=[];v.type==="childList"?v.addedNodes.length>0?y=v.addedNodes:v.removedNodes.length>0:v.type==="attributes"||v.type==="characterData"&&(y=[v.target]);for(let x of y){for(var d=!1,c=0;c<u.length;c++)if(u[c].isSameNode(x)){d=!0;break}if(d)break;u.push.apply(u,[x])}}if(u.length>0){var f=[];for(let v of u){for(var g=!1,p=0;p<t.inProgressNodes.length;p++)if(t.inProgressNodes[p].node.isSameNode(v)){g=!0;break}if(g)continue;let y=o.uuid(v);typeof t.listener.ignoreNode[y]<"u"&&t.listener.ignoreNode[y].addtime>Date.now()&&typeof v.nodeValue=="string"&&v.nodeValue==t.listener.ignoreNode[y].text||f.push(v)}if(f.length<1)return;t.execute(f)}},t.listener.observer=new MutationObserver(t.listener.callback);for(var n=t.getDocuments(),a=0;a<n.length;a++){var s=n[a];s!=null&&t.listener.observer.observe(s,t.listener.config)}},renderTaskFinish:function(n){},execute:{renderStartByApi:[],renderStartByApiRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderStartByApi.length;r++)try{t.listener.execute.renderStartByApi[r](n,a,s)}catch(l){console.log(l)}},renderFinishByApi:[],renderFinishByApiRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderFinishByApi.length;r++)try{t.listener.execute.renderFinishByApi[r](n,a,s)}catch(l){console.log(l)}}}},renderTask:class{constructor(){this.taskQueue=[],this.nodes=[]}add(n,a,s,r){var l=t.element.nodeAnalyse.get(n,r),u=t.util.hash(l.text);typeof this.nodes[u]>"u"&&(this.nodes[u]=new Array),this.nodes[u].push(n);var d=this.taskQueue[u];(d==null||typeof d>"u")&&(d=new Array);var c=new Array;a.substr(0,1)==" "&&s.substr(0,1)!=" "&&(s=" "+s),a.substr(a.length-1,1)===" "&&s.substr(0,1)!=" "&&(s=s+" "),c.originalText=a,c.resultText=s,c.attribute=r,d.push(c),this.taskQueue[u]=d}execute(){for(var n in this.taskQueue)if(this.taskQueue.hasOwnProperty(n)){var a=this.taskQueue[n];typeof a!="function"&&(a.sort((f,g)=>g.originalText.length-f.originalText.length),this.taskQueue[n]=a)}t.listener.refreshIgnoreNode();for(var n in this.nodes)if(this.nodes.hasOwnProperty(n))for(var a=this.taskQueue[n],s=0;s<this.nodes[n].length;s++)for(var r=0;r<a.length;r++){var l=a[r];if(typeof a!="function"){var u=this.nodes[n][r];setTimeout(function(p){for(var v=0;v<t.inProgressNodes.length;v++)if(t.inProgressNodes[v].node.isSameNode(p)){t.inProgressNodes[v].number=t.inProgressNodes[v].number-1,t.inProgressNodes[v].number<1&&t.inProgressNodes.splice(v,1);break}},50,u);var d=t.element.nodeAnalyse.set(this.nodes[n][r],l.originalText,l.resultText,l.attribute);t.listener.addIgnore(this.nodes[n][r],t.listener.translateExecuteNodeIgnoreExpireTime,d.resultText)}}if(typeof this.taskQueue<"u"&&Object.keys(this.taskQueue).length>0){var c=this;setTimeout(function(){for(var f in c.nodes)if(c.nodes.hasOwnProperty(f)){for(var g in c.nodes[f])if(c.nodes[f].hasOwnProperty(g)){var p=t.element.nodeAnalyse.get(c.nodes[f][g]),v=o.uuid(p.node);v.length!=0&&(t.nodeHistory[v]={},t.nodeHistory[v].node=p.node,t.whole.isWhole(p.node)?t.nodeHistory[v].translateText=c.taskQueue[f][g].resultText:t.nodeHistory[v].translateText=p.text)}}t.listener.renderTaskFinish(c)},50)}}},state:0,waitingExecute:{use:!0,queue:[],add:function(n){t.waitingExecute.queue.push(n);let a=setInterval(function(){if(t.state==0){clearInterval(a);var s=t.waitingExecute.get();t.execute(s)}},500)},get:function(){return t.waitingExecute.queue.length>0?t.waitingExecute.queue.shift():(console.log("警告, translate.waitingExecute.get 出现异常,quque已空,但还往外取。"),null)},isAllExecuteFinish:function(n,a,s){t.listener.execute.renderFinishByApiRun(n,a,s);for(var r in t.translateRequest[n])if(t.translateRequest[n].hasOwnProperty(r)){for(var l=0;l<t.translateRequest[n][r].length;l++)if(t.translateRequest[n][r][l].executeFinish==0)return}t.lifecycle.execute.renderFinish_Trigger(n,s),t.state=0,t.executeNumber++}},executeNumber:0,lifecycle:{execute:{start:[],start_Trigger:function(n,a){for(var s=0;s<t.lifecycle.execute.start.length;s++)try{t.lifecycle.execute.start[s](n,a)}catch(r){console.log(r)}},start_old:[],startRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderStartByApi.length;r++)try{t.listener.execute.renderStartByApi[r](n,a,s)}catch(l){console.log(l)}},scanNodesFinsh:[],translateNetworkBefore:[],translateNetworkBefore_Trigger:function(n,a,s,r){for(var l=0;l<t.lifecycle.execute.translateNetworkBefore.length;l++)try{t.lifecycle.execute.translateNetworkBefore[l](n,a,s,r)}catch(u){console.log(u)}},translateNetworkAfter:[],renderFinish:[function(n,a){typeof t.visual<"u"&&t.visual.adjustTranslationSpacesByNodequeueUuid(n)}],renderFinish_Trigger:function(n,a){for(var s=0;s<t.lifecycle.execute.renderFinish.length;s++)try{t.lifecycle.execute.renderFinish[s](n,a)}catch(r){console.log(r)}}}},execute:function(n){if(t.waitingExecute.use&&t.state!=0){console.log("当前翻译还未完结,新的翻译任务已加入等待翻译队列中,待翻译结束后便会执行当前翻译任务。"),t.waitingExecute.add(n);return}t.state=1,typeof n<"u"&&(t.useVersion="v2"),t.useVersion=="v1"&&(console.log("提示:https://github.com/xnx3/translate 在 v2.5 版本之后,由于谷歌翻译调整,免费翻译通道不再支持,所以v1版本的翻译接口不再被支持,v1全线下架。考虑到v1已不能使用,当前已自动切换到v2版本。如果您使用中发现什么异常,请针对v2版本进行适配。"),t.useVersion="v2");try{t.init()}catch{}var a=t.util.uuid();if(t.to==null||t.to==""){var s=t.storage.get("to");s!=null&&typeof s<"u"&&s.length>0&&(t.to=s)}try{t.selectLanguageTag.render()}catch(ge){console.log(ge)}if(t.to==null||typeof t.to>"u"||t.to.length==0)if(t.autoDiscriminateLocalLanguage)t.executeByLocalLanguage();else{t.state=0;return}if(t.to==t.language.getLocal()&&!t.language.translateLocal){t.state=0;return}t.lifecycle.execute.start_Trigger(a,t.to),t.images.execute();var r;typeof n<"u"&&n!=null?typeof n.length>"u"?(r=new Array,r[0]=n):r=n:r=t.getDocuments(),r.length>500&&(console.log("------tip------"),console.log("translate.execute( docs ) 传入的docs.length 过大,超过500,这很不正常,当前 docs.length : "+r.length+" ,如果你感觉真的没问题,请联系作者 http://translate.zvo.cn/43006.html 说明情况,根据你的情况进行分析。 当前只取前500个元素进行翻译"));try{for(var l in t.element.tagAttribute)if(t.element.tagAttribute.hasOwnProperty(l)&&t.element.tagAttribute[l]instanceof Array){var u=t.element.tagAttribute[l];t.element.tagAttribute[l]={attribute:u,condition:function(ge){return!0}}}}catch(ge){console.log(ge)}for(var d=0;d<r.length&d<500;d++){var c=r[d];t.element.whileNodes(a,c)}if(t.language.translateLanguagesRange.length>0)for(var f in t.nodeQueue[a].list)t.nodeQueue[a].list.hasOwnProperty(f)&&t.language.translateLanguagesRange.indexOf(f)<0&&delete t.nodeQueue[a].list[f];typeof t.nodeQueue[a]>"u"&&(t.nodeQueue[a]=new Array,t.nodeQueue[a].list=[],console.log("--- translate.js warn tip 警告!! ---"),console.log("您使用translate.js时可能放的位置不对,不要吧 translate.js 放在网页最顶部,这样当 translate.js 进行执行,也就是 translate.execute() 执行时,因为网页是从上往下加载,它放在网页最顶部,那么它执行时网页后面的内容都还没加载出来,这个是不会获取到网页任何内容的,也就是它是不起任何作用的"));for(var f in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(f)){for(var g in t.nodeQueue[a].list[f])if(t.nodeQueue[a].list[f].hasOwnProperty(g)&&typeof t.nodeQueue[a].list[f][g]!="function"&&!(typeof t.nodeQueue[a].list[f][g].nodes>"u"||typeof t.nodeQueue[a].list[f][g].nodes.length>"u")){for(var p=t.nodeQueue[a].list[f][g].nodes.length-1;p>-1;p--){var v=t.element.nodeAnalyse.get(t.nodeQueue[a].list[f][g].nodes[p].node),y=o.uuid(v.node);typeof t.nodeHistory[y]<"u"&&t.nodeHistory[y].translateText==v.text&&t.nodeQueue[a].list[f][g].nodes.splice(p,1)}t.nodeQueue[a].list[f][g].nodes.length==0&&delete t.nodeQueue[a].list[f][g]}Object.keys(t.nodeQueue[a].list[f]).length==0&&delete t.nodeQueue[a].list[f]}var x={},S={},$={},W=[];for(var f in t.nodeQueue[a].list){if(!t.nodeQueue[a].list.hasOwnProperty(f)||f==null||typeof f>"u"||f.length==0||f=="undefined")continue;x[f]=[],S[f]=[];let k=new t.renderTask;$[f]=[];for(var g in t.nodeQueue[a].list[f])if(t.nodeQueue[a].list[f].hasOwnProperty(g)&&typeof t.nodeQueue[a].list[f][g]!="function"){var w=t.nodeQueue[a].list[f][g].original,A=t.nodeQueue[a].list[f][g].translateText,V=w==A?g:t.util.hash(A);t.nodeQueue[a].list[f][g].cacheHash=V;var z=t.storage.get("hash_"+t.to+"_"+V);if(z!=null&&z.length>0){for(var j=0;j<t.nodeQueue[a].list[f][g].nodes.length;j++){for(var q=t.nodeQueue[a].list[f][g].nodes[j].node,fe=!1,te=0;te<t.inProgressNodes.length;te++)t.inProgressNodes[te].node.isSameNode(q)&&(t.inProgressNodes[te].number++,fe=!0);fe||t.inProgressNodes.push({node:q,number:1});var I=t.nodeQueue[a].list[f][g].nodes[j].beforeText+z+t.nodeQueue[a].list[f][g].nodes[j].afterText;k.add(t.nodeQueue[a].list[f][g].nodes[j].node,w,I,t.nodeQueue[a].list[f][g].nodes[j].attribute);for(var R=-1,d=0;d<$[f].length;d++)if(t.nodeQueue[a].list[f][g].nodes[j].node.isSameNode($[f][d].node)){R=d;break}for(var H=-1,d=0;d<W.length;d++)if(t.nodeQueue[a].list[f][g].nodes[j].node.isSameNode(W[d].node)){H=d;break}R==-1&&(R=$[f].length,$[f][R]={},$[f][R].node=t.nodeQueue[a].list[f][g].nodes[j].node,$[f][R].array=[]),H==-1&&(H=W.length,W[H]={},W[H].node=t.nodeQueue[a].list[f][g].nodes[j].node,W[H].array=[]);var U=$[f][R].array.length;$[f][R].array[U]=I;var ne=W[H].array.length;W[H].array[ne]=I}continue}x[f].push(A),S[f].push(g)}k.execute()}if(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1){t.state=0,t.lifecycle.execute.renderFinish_Trigger(a,t.to),t.executeNumber++;return}for(var f in $)if($.hasOwnProperty(f)){for(var oe=Object.keys(t.nodeQueue[a].list[f]),D=oe.length,d=0;d<$[f].length;d++){for(var N=0;N<W.length;N++)if($[f][d].node.isSameNode(W[N].node)){$[f][d].array=W[N].array;break}$[f][d].array.sort(function(_,M){return M.length-_.length});for(var le=t.element.nodeAnalyse.get($[f][d].node),we=le.text,ae=0;ae<$[f][d].array.length;ae++)$[f][d].array[ae]<1||(we=we.replace(new RegExp(t.util.regExp.pattern($[f][d].array[ae]),"g"),t.util.regExp.resultText(`
`)));for(var ie=we.split(`
`),ve=0;ve<ie.length;ve++)ie[ve]<1||t.addNodeToQueue(a,le.node,ie[ve])}var Te=Object.keys(t.nodeQueue[a].list[f]),he=Te.length;if(D-he!=0)for(var P=0;P<Te.length;P++){var Y=Te[P];if(oe.indexOf(Y)==-1){var ee=t.nodeQueue[a].list[f][Y],V=ee.original==ee.translateText?Y:t.util.hash(ee.translateText);t.nodeQueue[a].list[f][Y].cacheHash=V,x[f].push(ee.translateText),S[f].push(Y)}}}var O=[];for(var f in t.nodeQueue[a].list)t.nodeQueue[a].list.hasOwnProperty(f)&&(typeof x[f]>"u"||x[f].length<1||f!=t.to&&O.push(f));if(O.length==0){t.lifecycle.execute.renderFinish_Trigger(a,t.to),t.state=0,t.executeNumber++;return}for(var f in S)if(S.hasOwnProperty(f)&&!(typeof S[f]>"u")&&!(S[f].length<1))for(var K=0;K<S[f].length;K++){var E=S[f][K];if(typeof t.nodeQueue[a].list[f][E].nodes>"u"||typeof t.nodeQueue[a].list[f][E].nodes.length>"u"){console.log("translate.nodeQueue['"+a+"']['list']['"+f+"']['"+E+"'].nodes.length is null ,理论上不应该存在,进行异常报出,但不影响使用,已容错。");continue}for(var L=0;L<t.nodeQueue[a].list[f][E].nodes.length;L++){for(var q=t.nodeQueue[a].list[f][E].nodes[L].node,fe=!1,te=0;te<t.inProgressNodes.length;te++)t.inProgressNodes[te].node.isSameNode(q)&&(t.inProgressNodes[te].number++,fe=!0);fe||t.inProgressNodes.push({node:q,number:1})}}t.state=20;for(var F in O)if(O.hasOwnProperty(F)){var f=O[F];if(typeof f=="string"){if(typeof x[f]>"u"||x[f].length<1){console.log("异常,理论上不应该存在, lang:"+f+", translateTextArray:"),console.log(x),console.log("你无需担心,这个只是个提示,它并不影响你翻译的正常进行,只是个异常提示而已,它会自动容错处理的,不会影响翻译的使用。"),t.state=0,t.executeNumber++;return}(typeof t.translateRequest[a]>"u"||t.translateRequest[a]==null)&&(t.translateRequest[a]={}),t.translateRequest[a][f]={},t.translateRequest[a][f].executeFinish=0,t.translateRequest[a][f].addtime=Math.floor(Date.now()/1e3),t.listener.execute.renderStartByApiRun(a,f,t.to),t.lifecycle.execute.translateNetworkBefore_Trigger(a,f,t.to,x[f]);var Z=t.request.api.translate,ce={from:f,to:t.to,text:encodeURIComponent(JSON.stringify(x[f]))};t.request.post(Z,ce,function(k){if(k.result==0){typeof t.translateRequest[a]=="object"&&typeof t.translateRequest[a][k.from]=="object"?(t.translateRequest[a][k.from].result=2,t.translateRequest[a][k.from].executeFinish=1,t.translateRequest[a][k.from].stoptime=Math.floor(Date.now()/1e3)):console.log("WARINNG!!! translate.translateRequest[uuid][data.from] is not object");var _="";typeof k.from<"u"&&k.from!=null&&(_=k.from);var M="";typeof k.to<"u"&&k.to!=null?M=k.to:M=t.to,t.waitingExecute.isAllExecuteFinish(a,_,M),console.log("=======ERROR START======="),console.log(x[k.from]),console.log("response : "+k.info),console.log("=======ERROR END =======");return}if(typeof t.nodeQueue[a]>"u"){console.log("提示:你很可能多次引入了 translate.js 所以造成了翻译本身的数据错乱,这只是个提示,它还是会给你正常翻译的,但是你最好不要重复引入太多次 translate.js ,正常情况下只需要引入一次 translate.js 就可以了。太多的话很可能会导致你页面卡顿");return}let G=new t.renderTask;for(var me=0;me<S[k.from].length;me++){var pe=k.from,Q=k.text[me];if(Q!=null){Q.toLowerCase().indexOf(x[k.from][me].toLowerCase())>-1&&(Q=x[k.from][me]);var se=S[k.from][me],Me=t.nodeQueue[a].list[pe][se].cacheHash,Ne="";try{Ne=t.nodeQueue[a].list[pe][se].original}catch(Je){console.log("uuid:"+a+", originalWord:"+Ne+", lang:"+pe+", hash:"+se+", text:"+Q+", queue:"+t.nodeQueue[a]),console.log(Je);continue}for(var je=0;je<t.nodeQueue[a].list[pe][se].nodes.length;je++)G.add(t.nodeQueue[a].list[pe][se].nodes[je].node,Ne,t.nodeQueue[a].list[pe][se].nodes[je].beforeText+Q+t.nodeQueue[a].list[pe][se].nodes[je].afterText,t.nodeQueue[a].list[pe][se].nodes[je].attribute);t.storage.set("hash_"+k.to+"_"+Me,Q),t.office.fullExtract.isUse&&t.office.fullExtract.set(se,Ne,k.to,Q)}}G.execute(),t.translateRequest[a][pe].result=1,t.translateRequest[a][pe].executeFinish=1,t.translateRequest[a][pe].stoptime=Math.floor(Date.now()/1e3),setTimeout(function(){t.waitingExecute.isAllExecuteFinish(a,k.from,k.to)},10)},function(k){t.translateRequest[a][k.data.from].executeFinish=1,t.translateRequest[a][k.data.from].stoptime=Math.floor(Date.now()/1e3),t.translateRequest[a][k.data.from].result=3,t.waitingExecute.isAllExecuteFinish(a,k.data.from,t.to)})}}},translateRequest:{},nodeHistory:{},element:{tagAttribute:{},nodeAnalyse:{get:function(n,a){return t.element.nodeAnalyse.analyse(n,"","",a)},set:function(n,a,s,r){return t.element.nodeAnalyse.analyse(n,a,s,r)},analyse:function(n,a,s,r){var l=new Array;l.node=n,l.text="";var u=t.element.getNodeName(n);if(r!=null&&typeof r=="string"&&r.length>0){var d;if(u=="INPUT"&&r.toLowerCase()=="value"?d=n.value:d=n[r],l.text=d,typeof a<"u"&&a.length>0){if(typeof d<"u"){var c=t.util.textReplace(d,a,s,t.to);u=="INPUT"&&r.toLowerCase()=="value"?n.value=c:n[r]=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}var f=n.getAttribute(r);if(f!=null&&typeof f<"u"){var c=t.util.textReplace(f,a,s,t.to);n.setAttribute(r,c),c.indexOf(s)>-1?l.resultText=c:l.resultText=""}}return l}if(u=="#text"&&typeof n.parentNode<"u"){var g=t.element.getNodeName(n.parentNode);g=="TEXTAREA"&&(u="TEXTAREA",n=n.parentNode)}if(u=="INPUT"||u=="TEXTAREA"){if(n.attributes==null||typeof n.attributes>"u")return l.text="",l;if(u=="INPUT"&&typeof n.attributes.type<"u"&&typeof n.attributes.type.nodeValue!=null&&(n.attributes.type.nodeValue.toLowerCase()=="button"||n.attributes.type.nodeValue.toLowerCase()=="submit")){var p=n.attributes.value;if(p!=null&&typeof p<"u"&&typeof p.nodeValue<"u"&&p.nodeValue.length>0){if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(p.nodeValue,a,s,t.to);p.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=p.nodeValue,l.node=p,l}}if(typeof n.attributes.placeholder<"u"){if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(n.attributes.placeholder.nodeValue,a,s,t.to);n.attributes.placeholder.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.attributes.placeholder.nodeValue,l.node=n.attributes.placeholder,l}return l.text="",l}if(u=="META"){if(typeof n.name<"u"&&n.name!=null){var v=n.name.toLowerCase(),y=n.getAttribute("property"),x="";if(typeof y<"u"&&y!=null&&y.length>0&&(x=y.toLowerCase()),v=="keywords"||v=="description"||v=="sharetitle"||x=="og:title"||x=="og:description"||x=="og:site_name"||x=="og:novel:latest_chapter_name"){if(typeof a<"u"&&a!=null&&a.length>0){var c=t.util.textReplace(n.content,a,s,t.to);n.content=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.content,l}}return l.text="",l}if(u=="IMG"){if(typeof n.alt>"u"||n.alt==null)return l.text="",l;if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(n.alt,a,s,t.to);n.alt=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.alt,l}if(n.nodeValue==null||typeof n.nodeValue>"u")l.text="";else if(n.nodeValue.trim().length==0)l.text="";else{if(typeof a<"u"&&a!=null&&a.length>0){var c=t.util.textReplace(n.nodeValue,a,s,t.to);n.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}l.text=n.nodeValue}return l}},getNodeName:function(n){return n==null||typeof n>"u"||n.nodeName==null||typeof n.nodeName>"u"?"":(n.nodeName,typeof n.nodeName=="string"?n.nodeName:typeof n.tagName=="string"&&n.tagName.length>0?n.tagName:(console.log("warn : get nodeName is null, this node ignore translate. node : "),console.log(n),""))},whileNodes:function(n,a){if(!(a==null||typeof a>"u")){(typeof t.nodeQueue[n]>"u"||t.nodeQueue[n]==null)&&(t.nodeQueue[n]=new Array,t.nodeQueue[n].expireTime=Date.now()+120*1e3,t.nodeQueue[n].list=new Array),typeof a=="object"&&typeof a.title=="string"&&a.title.length>0&&(t.ignore.isIgnore(a)||t.addNodeToQueue(n,a,a.title,"title"));var s=t.element.getNodeName(a).toLowerCase();if(typeof t.element.tagAttribute[s]<"u"){for(var r in t.element.tagAttribute[s].attribute)if(t.element.tagAttribute[s].attribute.hasOwnProperty(r)&&!(typeof t.element.tagAttribute[s].condition<"u"&&!t.element.tagAttribute[s].condition(a))){var l=t.element.tagAttribute[s].attribute[r];if(s=="input"&&l.toLowerCase()=="value")u=a.value;else{var u=a.getAttribute(l);if((typeof u>"u"||u==null)&&(u=a[l]),typeof u>"u"||u==null)continue}t.ignore.isIgnore(a)||t.addNodeToQueue(n,a,u,l)}}var d=a.childNodes;if(!(d==null||typeof d>"u"))if(d.length>0)for(var c=0;c<d.length;c++)t.element.whileNodes(n,d[c]);else t.element.findNode(n,a)}},findNode:function(n,a){if(!(a==null||typeof a>"u")&&a.parentNode!=null){var s=t.element.getNodeName(a.parentNode);if(s!=""&&!(t.ignore.tag.indexOf(s.toLowerCase())>-1)&&!t.ignore.isIgnore(a)){var r=t.element.nodeAnalyse.get(a);r.text.length>0&&t.addNodeToQueue(n,r.node,r.text)}}}},addNodeToQueue:function(n,a,s,r){if(!(a==null||s==null||s.length==0)){var l=t.element.getNodeName(a);if(l.toLowerCase()!="#comment"){if(t.util.hash(s),t.util.findTag(s)){if(a.parentNode==null)return;var u=t.element.getNodeName(a.parentNode);if(u=="SCRIPT"||u=="STYLE")return}var d=new Array;d.push(s);for(var c=0;c<t.ignore.textRegex.length;c++)for(var f=t.ignore.textRegex[c],g=0;g<d.length;g++){var s=d[g],p=s.match(f)||[];t.ignore.text=t.ignore.text.concat(p)}for(var v=0;v<t.ignore.text.length;v++)t.ignore.text[v].trim().length!=0&&(d=t.addNodeToQueueTextAnalysis(n,a,d,r,t.ignore.text[v],t.ignore.text[v]));if(typeof t.temp_nomenclature>"u"&&(t.temp_nomenclature=new Array),typeof t.temp_nomenclature[t.language.getLocal()]>"u"&&(y=new Array),typeof t.nomenclature.data[t.language.getLocal()]<"u"&&typeof t.nomenclature.data[t.language.getLocal()][t.to]<"u"){var y;for(var x in t.nomenclature.data[t.language.getLocal()][t.to])if(t.nomenclature.data[t.language.getLocal()][t.to].hasOwnProperty(x)){var S=t.nomenclature.data[t.language.getLocal()][t.to][x];d=t.addNodeToQueueTextAnalysis(n,a,d,r,x,S),typeof y<"u"&&y.push(x)}typeof t.temp_nomenclature[t.language.getLocal()]>"u"&&(t.temp_nomenclature[t.language.getLocal()]=y)}for(var g=0;g<d.length;g++)d[g].trim().length!=0&&(t.ignore.text.indexOf(d[g].trim())>-1||typeof t.temp_nomenclature[t.language.getLocal()]<"u"&&t.temp_nomenclature[t.language.getLocal()].indexOf(d[g].trim())>-1||t.addNodeToQueueAnalysis(n,a,d[g],r))}}},addNodeToQueueTextAnalysis:function(n,a,s,r,l,u){for(var d=new Array,c=0;c<s.length;c++){var f=s[c];if(f.trim()!=u.trim()){var g=f.indexOf(l);if(g>-1){if(l!=u){var p=g-u.length;p<0&&(p=0);var v=g+u.length;v>f.length&&(v=f.length);var y=f.substring(p,v);if(y.indexOf(u)>-1)continue}l!=u&&t.element.nodeAnalyse.set(a,l,u,r);for(var x=f.split(l),S=0;S<x.length;S++){var $=x[S];$.trim().length!=0&&(s.push($),d.push(f))}}}}if(d.length>0)for(var W=0;W<d.length;W++){let w=s.indexOf(d[W]);w>-1&&s.splice(w,1)}return s},addNodeToQueueAnalysis:function(n,a,s,r){var l=t.language.recognition(s),u=l.languageArray;typeof u[t.to]<"u"&&delete u[t.to];var d=t.whole.isWhole(a);if(d){var c=l.languageName;t.addNodeQueueItem(n,a,s,r,c,"","")}else for(var c in u)if(u.hasOwnProperty(c)){for(var f=0;f<u[c].list.length;f++)if(!(typeof u[c].list[f]>"u"||typeof u[c].list[f].text>"u")){var g=u[c].list[f].text,p=u[c].list[f].beforeText,v=u[c].list[f].afterText;t.addNodeQueueItem(n,a,g,r,c,p,v)}}},addNodeQueueItem:function(n,a,s,r,l,u,d){(t.nodeQueue[n].list[l]==null||typeof t.nodeQueue[n].list[l]>"u")&&(t.nodeQueue[n].list[l]=new Array);var c=t.util.hash(s);(t.nodeQueue[n].list[l][c]==null||typeof t.nodeQueue[n].list[l][c]>"u")&&(t.nodeQueue[n].list[l][c]=new Array,t.nodeQueue[n].list[l][c].nodes=new Array,t.nodeQueue[n].list[l][c].original=s,t.nodeQueue[n].list[l][c].translateText=s);var f=!1;if(typeof a.isSameNode<"u"){for(var g=0;g<t.nodeQueue[n].list[l][c].nodes.length;g++)if(a.isSameNode(t.nodeQueue[n].list[l][c].nodes[g].node)){f=!0;continue}}if(!f){var p=t.nodeQueue[n].list[l][c].nodes.length;t.nodeQueue[n].list[l][c].nodes[p]=new Array,t.nodeQueue[n].list[l][c].nodes[p].node=a,t.nodeQueue[n].list[l][c].nodes[p].attribute=r,t.nodeQueue[n].list[l][c].nodes[p].beforeText=u,t.nodeQueue[n].list[l][c].nodes[p].afterText=d}},whole:{isEnableAll:!1,enableAll:function(){t.whole.isEnableAll=!0},class:[],tag:[],id:[],executeTip:function(){t.whole.class.length==0&&t.whole.tag.length==0&&t.whole.id.length==0||console.log("您开启了 translate.whole 此次行为避开了浏览器端的文本语种自动识别,而是暴力的直接对某个元素的整个文本进行翻译,很可能会产生非常大的翻译量,请谨慎!有关每日翻译字符的说明,可参考: http://translate.zvo.cn/42557.html "),t.whole.tag.indexOf("html")>-1&&console.log("自检发现您设置了 translate.whole.tag 其中有 html ,这个是不生效的,最大只允许设置到 body ")},isWhole:function(n){if(t.whole.isEnableAll)return!0;if(t.whole.class.length==0&&t.whole.tag.length==0&&t.whole.id.length==0&&t.whole.isEnableAll==!1||n==null||typeof n>"u")return!1;for(var a=n,s=100;s-- >0;){if(a==null||typeof a>"u")return!1;var r=t.element.getNodeName(a).toLowerCase();if(r.length>0){if(r=="html"||r=="#document")return!1;if(t.whole.tag.indexOf(r)>-1)return!0}if(a.className!=null){var l=a.className;if(l==null||typeof l!="string")continue;l=l.trim().split(" ");for(var u=0;u<l.length;u++)if(l[u]!=null&&l[u].trim().length>0&&t.whole.class.indexOf(l[u])>-1)return!0}if(a.id!=null&&typeof a.id<"u"&&t.whole.id.indexOf(a.id)>-1)return!0;a=a.parentElement}return!1}},language:{englishVarietys:["french","italian","deutsch","portuguese"],local:"",translateLocal:!1,translateLanguagesRange:[],setLocal:function(n){t.useVersion="v2",t.language.local=n},getLocal:function(){return(t.language.local==null||t.language.local.length<1)&&t.language.autoRecognitionLocalLanguage(),t.language.local},getCurrent:function(){var n=t.storage.get("to");return n!=null&&typeof n<"u"&&n.length>0?n:t.language.getLocal()},setDefaultTo:function(n){var a=t.storage.get("to");a!=null&&typeof a<"u"&&a.length>0||(t.storage.set("to",n),t.to=n)},clearCacheLanguage:function(){typeof t.language.setUrlParamControl_use<"u"&&t.language.setUrlParamControl_use&&(console.log("使用提示:"),console.log("translate.language.setUrlParamControl(...) 的作用是 可以通过URL传一个语种,来指定当前页面以什么语种显示。 参考文档: http://translate.zvo.cn/4075.html"),console.log("translate.language.clearCacheLanguage() 是清除历史翻译语种缓存,也就是清除之前指定翻译为什么语种。 参考文档:http://translate.zvo.cn/4080.html"),console.log("如果你执行了 translate.language.setUrlParamControl(...) 那么是要根据url传参来切换语种的,但是后面又出现了 translate.language.clearCacheLanguage() 它会阻止 translate.language.setUrlParamControl(...) 它的设置,即使有url传递翻译为什么语言,也会因为 translate.language.clearCacheLanguage() 给清除掉,使URL传参的语种不起任何作用。")),t.to="",t.storage.set("to","")},setUrlParamControl:function(n){t.language.setUrlParamControl_use=!0,(typeof n>"u"||n.length<1)&&(n="language");var a=t.util.getUrlParam(n);typeof a>"u"||a==""||a=="null"||a=="undefined"||(t.storage.set("to",a),t.to=a)},getTranslateAreaText:function(){var n="",a=document.createElement("div");if(t.documents!=null&&typeof t.documents<"u"&&t.documents.length>0)for(var s=0;s<t.documents.length;s++){var r=t.documents[s];typeof r<"u"&&r!=null&&typeof r.innerText<"u"&&r.innerText!=null&&r.innerText.length>0&&a.appendChild(r.cloneNode(!0))}else typeof document.head<"u"&&a.appendChild(document.head.cloneNode(!0)),typeof document.body<"u"&&a.appendChild(document.body.cloneNode(!0));for(var l=0;l<t.ignore.tag.length;l++)for(var u=t.ignore.tag[l],d=a.querySelectorAll(u),c=Array.prototype.slice.call(d),f=0;f<c.length;f++){var g=c[f];g.parentNode&&g.parentNode.removeChild(g)}if(n=a.innerText,n==null||typeof n>"u"||n.length<1){t.language.local="chinese_simplified";return}return n=n.replace(/\s/g,""),n},autoRecognitionLocalLanguage:function(){if(t.language.local!=null&&t.language.local.length>2)return t.language.local;var n=t.language.getTranslateAreaText();t.language.local="chinese_simplified";var a=t.language.recognition(n);return t.language.local=a.languageName,t.language.local},get:function(n){for(var a=new Array,s=new Array,r=[],l=[],u=0;u<n.length;u++){var d=n.charAt(u),c=t.language.getCharLanguage(d);c==""&&(c="unidentification");var f=t.language.analyse(c,s,r,l,d);s=f.langStrs,typeof r.language<"u"&&(l.language=r.language,l.charstr=r.charstr,l.storage_language=r.storage_language),r.language=f.storage_language,r.charstr=d,r.storage_language=f.storage_language,a.push(c)}return typeof s.unidentification<"u"&&delete s.unidentification,typeof s.specialCharacter<"u"&&delete s.specialCharacter,typeof s.number<"u"&&delete s.number,s},recognitionAlgorithm:function(n,a,s,r){if(typeof s.english<"u"&&typeof s.romance<"u"&&a.languageName=="english"&&s.romance/s.english>.008&&(typeof t.language.local<"u"&&t.language.local.length>1&&t.language.englishVarietys.indexOf(t.language.local)>-1&&(a.languageName=t.language.local),a.languageName=="english")){var l=t.language.romanceSentenceAnaly(n);l.length==0?console.log("语种识别异常,应该是 法语、西班牙语、葡萄牙语、意大利语 中的一种才是,除非是除了这四种语种之外的别的 罗曼语族 中的语种,当前已将 "+n+"识别为英语。 你可以联系我们求助 https://translate.zvo.cn/4030.html"):a.languageName=l}if(typeof s.japanese<"u"&&a.languageName!="japanese"&&s.japanese/r>.08&&(a.languageName="japanese"),(typeof s.chinese_simplified<"u"||typeof s.chinese_traditional<"u")&&typeof s.english<"u"&&a.languageName=="english"){var u=0;typeof s.chinese_simplified<"u"&&(u=u+s.chinese_simplified),typeof s.chinese_traditional<"u"&&(u=u+s.chinese_traditional),u/s.english>.05&&(a.languageName="chinese_simplified")}return typeof s.chinese_simplified<"u"&&typeof s.chinese_traditional<"u"&&a.languageName=="chinese_simplified"&&s.chinese_traditional/s.chinese_simplified>.03&&(a.languageName="chinese_traditional"),a},recognition:function(n){var a=t.language.get(n),s=[],r=[],l=0;for(var u in a)if(a.hasOwnProperty(u)&&typeof a[u]=="object"){for(var d=0,c=0;c<a[u].length;c++)d=d+a[u][c].text.length;l=l+d,s[u]=d,r[u]=d}var f="",g=0;for(var p in s)s.hasOwnProperty(p)&&s[p]>g&&(f=p,g=s[p]);var v={};for(var p in a)a.hasOwnProperty(p)&&(v[p]={},v[p].number=r[p],v[p].list=a[p]);var y={languageName:f,languageArray:v};return t.language.recognitionAlgorithm(n,y,s,l)},getCharLanguage:function(n){if(n==null||typeof n>"u")return"";if(this.russian(n))return"russian";if(this.english(n))return"english";if(this.romance(n))return"romance";if(this.specialCharacter(n))return"specialCharacter";if(this.number(n))return"number";var a=this.chinese(n);return a=="simplified"?"chinese_simplified":a=="traditional"?"chinese_traditional":this.japanese(n)?"japanese":this.korean(n)?"korean":this.greek(n)?"greek":this.thai(n)?"thai":this.arabic(n)?"arabic":this.romanian(n)?"romanian":this.hebrew(n)?"hebrew":""},analyse:function(n,a,s,r,l){typeof a[n]>"u"&&(a[n]=new Array);var u=0;typeof s.storage_language>"u"||(t.language.connector(l)&&(n=s.storage_language),s.storage_language==n?u=a[n].length-1:u=a[n].length),typeof a[n][u]>"u"&&(a[n][u]=new Array,a[n][u].beforeText="",a[n][u].afterText="",a[n][u].text=""),a[n][u].text=a[n][u].text+l,t.language.wordBlankConnector(t.language.getLocal())==!1&&t.language.wordBlankConnector(t.to)&&s.storage_language!=null&&typeof s.storage_language<"u"&&s.storage_language.length>0&&s.storage_language!="specialCharacter"&&(t.language.wordBlankConnector(s.storage_language)==!1&&t.language.wordBlankConnector(n)?a[s.storage_language][a[s.storage_language].length-1].afterText=" ":s.storage_language=="english"&&n!="english"&&(a[n][u].beforeText=" "));var d=new Array;return d.langStrs=a,d.storage_language=n,d},connector:function(n){return!!(/.*[\u0020\u00A0\u202F\u205F\u3000]+.*$/.test(n)||/.*[\u0030-\u0039]+.*$/.test(n)||/.*[\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u002C\u002D\u002E\u003A\u003B\u003F\u0040]+.*$/.test(n)||/.*[\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\u3010\u3011\u2014\u2026\u2013\uFF0E\u300A\u300B\u3008\u3009\u00b7]+.*$/.test(n))},wordBlankConnector:function(n){if(n==null||typeof n>"u")return!0;switch(n.trim().toLowerCase()){case"chinese_simplified":return!1;case"chinese_traditional":return!1;case"korean":return!1;case"japanese":return!1}return!0},chinese_traditional_dict:"皚藹礙愛翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麽黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰甯擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊",chinese:function(n){return/.*[\u4e00-\u9fa5]+.*$/.test(n)?this.chinese_traditional_dict.indexOf(n)>-1?"traditional":"simplified":""},japanese:function(n){return!!/.*[\u3040-\u309F\u30A0-\u30FF]+.*$/.test(n)},korean:function(n){return!!/.*[\uAC00-\uD7AF]+.*$/.test(n)},russian:function(n){return!!/^[А-Яа-яЁё]$/.test(n)},thai:function(n){return!!/^[\u0E01-\u0E59]$/.test(n)},arabic:function(n){return/^[\u0600-\u06FF\u0750-\u077F]$/.test(n)},romanian:function(n){return/^[\u00C0-\u00FF\u0100-\u017F\u0218-\u021B]$/.test(n)},greek:function(n){return!!/^[\u0391-\u03A9\u03B1-\u03C9]$/.test(n)},hebrew:function(n){return/^[\u0590-\u05FF]$/.test(n)},number:function(n){return!!/.*[\u0030-\u0039]+.*$/.test(n)},english:function(n){return/.*[\u0041-\u005a]+.*$/.test(n)?!0:!!/.*[\u0061-\u007a]+.*$/.test(n)},romance_dict:["é","è","ê","à","ç","œ","ñ","á","ó","ò","ì","ã","õ"],romance:function(n){return this.romance_dict.indexOf(n)>-1},romanceSentenceAnaly:function(n){const a={french:{score:0,chars:["é","è","ê","à","ç","œ"]},spanish:{score:0,chars:["ñ","á","ó"],pairs:["ll"]},italian:{score:0,chars:["ò","ì"],pairs:["cc","ss"]},portuguese:{score:0,chars:["ã","õ"]}};for(let l=0;l<n.length;l++){const u=n[l].toLowerCase();if(Object.keys(a).forEach(d=>{a[d].chars.includes(u)&&(a[d].score+=1)}),l<n.length-1){const d=n.slice(l,l+2).toLowerCase();Object.keys(a).forEach(c=>{const f=a[c].pairs;f&&f.includes(d)&&(a[c].score+=2)})}}let s="",r=-1;return Object.keys(a).forEach(l=>{a[l].score>r&&(r=a[l].score,s=l)}),s||""},specialCharacter:function(n){return!!(/.*[\u2460-\u24E9]+.*$/.test(n)||/.*[\u2500-\u25FF]+.*$/.test(n)||/.*[\u3200-\u33FF]+.*$/.test(n)||/.*[\uFF00-\uFF5E]+.*$/.test(n)||/.*[\u2000-\u22FF]+.*$/.test(n)||/.*[\u3001-\u3036]+.*$/.test(n)||/.*[\u0020-\u002F]+.*$/.test(n)||/.*[\u003B\u003B\u003C\u003D\u003E\u003F\u005B\u005C\u005D\u005E\u005F\u0060\u007B\u007C\u007D\u007E]+.*$/.test(n)||/.*[\u0009\u000a\u0020\u00A0\u1680\u180E\u202F\u205F\u3000\uFEFF]+.*$/.test(n)||/.*[\u2000-\u200B]+.*$/.test(n)||/.*[\u2C60-\u2C77]+.*$/.test(n))},textTranslateReplace:function(n,a,s,r){return t.util.textReplace(n,a,s,r)}},executeByLocalLanguage:function(){var n=t.util.browserDefaultLanguage();if(typeof n<"u"&&n.length>0){t.changeLanguage(n);return}typeof t.request.api.ip!="string"||t.request.api.ip==null||t.request.api.ip.length<1||t.request.post(t.request.api.ip,{},function(a){a.result==0?(console.log("==== ERROR 获取当前用户所在区域异常 ===="),console.log(a.info),console.log("==== ERROR END ====")):(t.storage.set("to",a.language),t.to=a.language,t.selectLanguageTag,t.execute())},null)},util:{textReplace:function(n,a,s,r){if(n==a)return s;let l=0,u=30;for(;n.indexOf(a,l)>-1&&u-- >0;){let d=""+s,c=""+a;if(t.language.wordBlankConnector(r)){let g=n.indexOf(a,l);if(g+1<n.length){let p=n.charAt(g+a.length);/。/.test(p)?(d=d+". ",c=a+"。"):/,/.test(p)?(d=d+", ",c=a+","):/:/.test(p)?(d=d+": ",c=a+":"):[" ",`
`," ","]","|","_","-","/"].indexOf(p)!==-1||d.length>0&&d.charAt(d.length-1)==" "||(d=d+" ")}if(g>0){let p=n.charAt(g-1);/。/.test(p)?(d=". "+d,c="。"+c):/,/.test(p)?(d=", "+d,c=","+c):/:/.test(p)?(d=": "+d,c=":"+c):[" ",`
`," ","[","|","_","-","/"].indexOf(p)!==-1||d.length>0&&d.charAt(0)==" "||(d=" "+d)}}let f=t.util.replaceFromIndex(n,l,c,d);f.replaceEndIndex<1?console.log("while中已经 indexOf发现了,但是实际没有替换,出现异常了!理论上这是不应该出现的。 text:"+n+" , translateOriginal:"+a):(l=f.replaceEndIndex,n=f.text)}return n},replaceFromIndex:function(n,a,s,r){const l=n.slice(0,a),u=n.slice(a),d=u.indexOf(s);if(d>-1){const c=u.replace(s,r);return{text:l+c,replaceEndIndex:a+d+r.length}}else return{text:l+replacedAfter,replaceEndIndex:0}},uuid:function(){var n=new Date().getTime();window.performance&&typeof window.performance.now=="function"&&(n+=performance.now());var a="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,function(s){var r=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(s=="x"?r:r&3|8).toString(16)});return a},findTag:function(n){var a=/<[^>]+>/g;return a.test(n)},arrayFindMaxNumber:function(n){for(var a={},s=[],r=0,l=0,u=n.length;l<u;l++)a[n[l]]?a[n[l]]++:a[n[l]]=1,a[n[l]]>r&&(r=a[n[l]]);for(var d in a)a.hasOwnProperty(d)&&a[d]===r&&s.push(d);return s},hash:function(n){if(n==null||typeof n>"u")return n;var a=0,s,r;if(n.length===0)return a;for(s=0;s<n.length;s++)r=n.charCodeAt(s),a=(a<<5)-a+r,a|=0;return a+""},charReplace:function(n){return n==null?"":(n=n.trim(),n=n.replace(/\t|\n|\v|\r|\f/g,""),n)},regExp:{pattern:function(n){return n=n.replace(/\\/g,"\\\\"),n=n.replace(/\"/g,'\\"'),n=n.replace(/\?/g,"\\?"),n=n.replace(/\$/g,"\\$"),n=n.replace(/\(/g,"\\("),n=n.replace(/\)/g,"\\)"),n=n.replace(/\|/g,"\\|"),n=n.replace(/\+/g,"\\+"),n=n.replace(/\*/g,"\\*"),n=n.replace(/\[/g,"\\["),n=n.replace(/\]/g,"\\]"),n=n.replace(/\^/g,"\\^"),n=n.replace(/\{/g,"\\{"),n=n.replace(/\}/g,"\\}"),n},resultText:function(n){return n}},getUrlParam:function(n){var a=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),s=window.location.search.substr(1).match(a);return s!=null?unescape(s[2]):""},synchronizesLoadJs:function(n){var a=null;if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch{a=new ActiveXObject("Microsoft.XMLHTTP")}else window.XMLHttpRequest&&(a=new XMLHttpRequest);if(a.open("GET",n,!1),a.send(null),a.readyState==4)if(a.status>=200&&a.status<300||a.status==0||a.status==304){var s=document.getElementsByTagName("HTML")[0],r=document.createElement("script");r.language="javascript",r.type="text/javascript";try{r.appendChild(document.createTextNode(a.responseText))}catch{r.text=a.responseText}return s.appendChild(r),!0}else return!1;else return!1},loadMsgJs:function(){typeof msg<"u"||t.util.synchronizesLoadJs("https://res.zvo.cn/msg/msg.js")},objSort:function(n){var a=Array.from(Object.keys(n));a.sort(function(l,u){return u.length-l.length});var s=new Array;for(var r of a)s[r]=n[r];return s},versionStringToInt:function(n){var a=n.split("."),s=0;return s=parseInt(a[0])*1e3*1e3+s,s=parseInt(a[1])*1e3+s,s=parseInt(a[2])+s,s},split:function(n,a,s){let r=a,l=[];if(JSON.stringify(n).length<=a)l.push(n);else{let u=JSON.stringify(n).trim().substring(1,JSON.stringify(n).length-1);if(JSON.stringify(n).length-a<=2){a=a-4;let d=u.substring(0,u.lastIndexOf('","')+1),c=u.substring(u.lastIndexOf('","')+2);l.push(JSON.parse("["+d+"]")),l.push(JSON.parse("["+c+"]"))}else{a=a-2;let d=0;for(;d-u.length<0;){let c="";d+a-u.length>=0?c=u.substring(d):c=u.substring(d,d+a);let f=c.length,g=1;c.endsWith('"')?c.endsWith('","')?f-=2:c.startsWith('"')||(f=c.lastIndexOf('","')+1):c.endsWith('",')?f-=1:(f=c.lastIndexOf('","')+1,f<=0&&(c.startsWith('"')?f=c.length-1:f=c.length-2,c.endsWith('"')||(g=0)));let p="";f-c.length>0||f-0==0?(p=c,f=f+p.length):p=c.substring(0,f),!p.startsWith('"')&&!p.startsWith(',"')&&(p='"'+p),p.endsWith('"')||(p=p+'"'),d+=f+g,p="["+p+"]";try{l.push(JSON.parse(p))}catch{d=d-(f+g)+1}}}}return s&&s>0&&(l=t.util._splitMaxSize(l,r,s)),l},_splitMaxSize:function(n,a,s){let r=[],l=[];if(n.forEach(function(u,d){if(u=l.concat(u),u.length>s){let f=u.slice(0,s),g=u.slice(s),p=1;for(;JSON.stringify(f).length>a&&(f=u.slice(0,s-p),g=u.slice(s-p),p++,!(p>=u.length+1)););r.push(f),l.length=0,l=g}else{let f=u,g=[],p=1;for(;JSON.stringify(f).length>a&&(f=u.slice(0,s-p),g=u.slice(s-p),p++,!(p>=u.length+1)););r.push(f),l.length=0,l=g}}),l.length>0){let u=[];u.push(l);let d=t.util._splitMaxSize(u,a,s);r=r.concat(d)}return r},browserLanguage:{zh:"chinese_simplified","zh-CN":"chinese_simplified","zh-TW":"chinese_traditional","zh-HK":"chinese_traditional",co:"corsican",gn:"guarani",rw:"kinyarwanda",ha:"hausa",no:"norwegian",nl:"dutch",yo:"yoruba",en:"english","en-US":"english",kok:"gongen",la:"latin",ne:"nepali",fr:"french",cs:"czech",haw:"hawaiian",ka:"georgian",ru:"russian",fa:"persian",bho:"bhojpuri",hi:"hindi",be:"belarusian",sw:"swahili",is:"icelandic",yi:"yiddish",tw:"twi",ga:"irish",gu:"gujarati",km:"khmer",sk:"slovak",he:"hebrew",kn:"kannada",hu:"hungarian",ta:"tamil",ar:"arabic",bn:"bengali",az:"azerbaijani",sm:"samoan",af:"afrikaans",id:"indonesian",da:"danish",sn:"shona",bm:"bambara",lt:"lithuanian",vi:"vietnamese",mt:"maltese",tk:"turkmen",as:"assamese",ca:"catalan",si:"singapore",ceb:"cebuano",gd:"scottish-gaelic",sa:"sanskrit",pl:"polish",gl:"galician",lv:"latvian",uk:"ukrainian",tt:"tatar",cy:"welsh",ja:"japanese",fil:"filipino",ay:"aymara",lo:"lao",te:"telugu",ro:"romanian",ht:"haitian_creole",doi:"dogrid",sv:"swedish",mai:"maithili",th:"thai",hy:"armenian",my:"burmese",ps:"pashto",hmn:"hmong",dv:"dhivehi",lb:"luxembourgish",sd:"sindhi",ku:"kurdish",tr:"turkish",mk:"macedonian",bg:"bulgarian",ms:"malay",lg:"luganda",mr:"marathi",et:"estonian",ml:"malayalam",de:"deutsch",sl:"slovene",ur:"urdu",pt:"portuguese",ig:"igbo",ckb:"kurdish_sorani",om:"oromo",el:"greek",es:"spanish",fy:"frisian",so:"somali",am:"amharic",ny:"nyanja",pa:"punjabi",eu:"basque",it:"italian",sq:"albanian",ko:"korean",tg:"tajik",fi:"finnish",ky:"kyrgyz",ee:"ewe",hr:"croatian",kri:"creole",qu:"quechua",bs:"bosnian",mi:"maori"},browserDefaultLanguage:function(){var n=navigator.language||navigator.userLanguage;if(typeof n=="string"&&n.length>0){var a=t.util.browserLanguage[n];if(typeof a>"u")console.log("browser default language : "+n+", translate.js current translate channel not support this language ");else return a}return""},urlSplitByText:function(n){const a=/(https?:\/\/[\w\-._~:\/?#[\]@!$&'()*+;=%]+(?=[\s\u4e00-\u9fa5,。;,!?]|$))/gi,s=n.split(a);let r={};for(let l=0;l<s.length;l++)l%2===0?s[l]!==""&&(r[s[l]]="0"):r[s[l]]="1";return r},getElementPosition:function(n){const a=n.getBoundingClientRect(),s=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=a.left+s,u=a.top+r,d=a.right-a.left,c=a.bottom-a.top,f=l+d,g=u+c;return{startX:l,startY:u,endX:f,endY:g,width:d,height:c}}},service:{name:"translate.service",use:function(n){if(typeof t.enterprise<"u"&&t.enterprise.isUse==!0){console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档:https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('"+n+"'); (文档:https://translate.zvo.cn/4081.html) 将失效不起作用,有企业级翻译通道全部接管。");return}if(typeof n=="string"&&(t.service.name=n,n!="translate.service")){if(t.whole.enableAll(),n.toLowerCase()=="giteeai"){t.request.api.host=["https://giteeai.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn:1000/","https://api.translate.zvo.cn:1000/"];return}if(n.toLowerCase()=="siliconflow"){t.request.api.host=["https://siliconflow.zvo.cn/","https://america.api.translate.zvo.cn:1414/","https://deutsch.enterprise.api.translate.zvo.cn:1414/"];return}}},edge:{api:{auth:"https://edge.microsoft.com/translate/auth",translate:"https://api.cognitive.microsofttranslator.com/translate?from={from}&to={to}&api-version=3.0&includeSentenceLength=true"},language:{json:[{id:"ukrainian",name:"Україна",serviceId:"uk"},{id:"norwegian",name:"Norge",serviceId:"no"},{id:"welsh",name:"Iaith Weleg",serviceId:"cy"},{id:"dutch",name:"nederlands",serviceId:"nl"},{id:"japanese",name:"日本語",serviceId:"ja"},{id:"filipino",name:"Pilipino",serviceId:"fil"},{id:"english",name:"English",serviceId:"en"},{id:"lao",name:"ກະຣຸນາ",serviceId:"lo"},{id:"telugu",name:"తెలుగుName",serviceId:"te"},{id:"romanian",name:"Română",serviceId:"ro"},{id:"nepali",name:"नेपालीName",serviceId:"ne"},{id:"french",name:"Français",serviceId:"fr"},{id:"haitian_creole",name:"Kreyòl ayisyen",serviceId:"ht"},{id:"czech",name:"český",serviceId:"cs"},{id:"swedish",name:"Svenska",serviceId:"sv"},{id:"russian",name:"Русский язык",serviceId:"ru"},{id:"malagasy",name:"Malagasy",serviceId:"mg"},{id:"burmese",name:"ဗာရမ်",serviceId:"my"},{id:"pashto",name:"پښتوName",serviceId:"ps"},{id:"thai",name:"คนไทย",serviceId:"th"},{id:"armenian",name:"Արմենյան",serviceId:"hy"},{id:"chinese_simplified",name:"简体中文",serviceId:"zh-CHS"},{id:"persian",name:"Persian",serviceId:"fa"},{id:"chinese_traditional",name:"繁體中文",serviceId:"zh-CHT"},{id:"kurdish",name:"Kurdî",serviceId:"ku"},{id:"turkish",name:"Türkçe",serviceId:"tr"},{id:"hindi",name:"हिन्दी",serviceId:"hi"},{id:"bulgarian",name:"български",serviceId:"bg"},{id:"malay",name:"Malay",serviceId:"ms"},{id:"swahili",name:"Kiswahili",serviceId:"sw"},{id:"oriya",name:"ଓଡିଆ",serviceId:"or"},{id:"icelandic",name:"ÍslandName",serviceId:"is"},{id:"irish",name:"Íris",serviceId:"ga"},{id:"khmer",name:"ភាសា​ខ្មែរName",serviceId:"km"},{id:"gujarati",name:"ગુજરાતી",serviceId:"gu"},{id:"slovak",name:"Slovenská",serviceId:"sk"},{id:"kannada",name:"ಕನ್ನಡ್Name",serviceId:"kn"},{id:"hebrew",name:"היברית",serviceId:"he"},{id:"hungarian",name:"magyar",serviceId:"hu"},{id:"marathi",name:"मराठीName",serviceId:"mr"},{id:"tamil",name:"தாமில்",serviceId:"ta"},{id:"estonian",name:"eesti keel",serviceId:"et"},{id:"malayalam",name:"മലമാലം",serviceId:"ml"},{id:"inuktitut",name:"ᐃᓄᒃᑎᑐᑦ",serviceId:"iu"},{id:"arabic",name:"بالعربية",serviceId:"ar"},{id:"deutsch",name:"Deutsch",serviceId:"de"},{id:"slovene",name:"slovenščina",serviceId:"sl"},{id:"bengali",name:"বেঙ্গালী",serviceId:"bn"},{id:"urdu",name:"اوردو",serviceId:"ur"},{id:"azerbaijani",name:"azerbaijani",serviceId:"az"},{id:"portuguese",name:"português",serviceId:"pt"},{id:"samoan",name:"lifiava",serviceId:"sm"},{id:"afrikaans",name:"afrikaans",serviceId:"af"},{id:"tongan",name:"汤加语",serviceId:"to"},{id:"greek",name:"ελληνικά",serviceId:"el"},{id:"indonesian",name:"IndonesiaName",serviceId:"id"},{id:"spanish",name:"Español",serviceId:"es"},{id:"danish",name:"dansk",serviceId:"da"},{id:"amharic",name:"amharic",serviceId:"am"},{id:"punjabi",name:"ਪੰਜਾਬੀName",serviceId:"pa"},{id:"albanian",name:"albanian",serviceId:"sq"},{id:"lithuanian",name:"Lietuva",serviceId:"lt"},{id:"italian",name:"italiano",serviceId:"it"},{id:"vietnamese",name:"Tiếng Việt",serviceId:"vi"},{id:"korean",name:"한국어",serviceId:"ko"},{id:"maltese",name:"Malti",serviceId:"mt"},{id:"finnish",name:"suomi",serviceId:"fi"},{id:"catalan",name:"català",serviceId:"ca"},{id:"croatian",name:"hrvatski",serviceId:"hr"},{id:"bosnian",name:"bosnian",serviceId:"bs-Latn"},{id:"polish",name:"Polski",serviceId:"pl"},{id:"latvian",name:"latviešu",serviceId:"lv"},{id:"maori",name:"Maori",serviceId:"mi"}],getMap:function(){if(typeof t.service.edge.language.map>"u"){t.service.edge.language.map=new Array;for(var n=0;n<t.service.edge.language.json.length;n++){var a=t.service.edge.language.json[n];t.service.edge.language.map[a.id]=a.serviceId}}return t.service.edge.language.map}},translate:function(n,a,s,r){var l=JSON.parse(decodeURIComponent(a.text));let u=t.util.split(l,4e4,900);t.request.send(t.service.edge.api.auth,{},{},function(d){var c={from:a.from+"",to:a.to,text:a.text},f=a.from;f!="auto"&&(f=="romance"?f="fr":f=t.service.edge.language.getMap()[a.from]);for(var g=t.service.edge.language.getMap()[a.to],p=t.service.edge.api.translate.replace("{from}",f).replace("{to}",g),v=0;v<u.length;v++){for(var y=[],x=0;x<u[v].length;x++)y.push({Text:u[v][x]});t.request.send(p,JSON.stringify(y),c,function(S){var $={};$.info="SUCCESS",$.result=1,$.from=a.from,$.to=a.to,$.text=[];for(var W=0;W<S.length;W++)$.text.push(S[W].translations[0].text);if(u.length>1){for(var w=-1,A=0;A<u.length;A++)if(u[A].length-$.text.length==0){w=A;break}w<0&&(console.log("------ERROR--------"),console.log("翻译内容过多,进行拆分,但拆分判断出现异常,currentIndex:-1 请联系 http://translate.zvo.cn/43006.html 说明"));for(var V=0;V<w;V++)for(var z=u[V].length,j=0;j<z;j++)$.text.unshift(null);for(var q=u.length-1;q>w;q--)for(var fe=u[q].length,j=0;j<fe;j++)$.text.push(null)}s($)},"post",!0,{Authorization:"Bearer "+d,"Content-Type":"application/json"},r,!0)}},"get",!0,{"content-type":"application/x-www-form-urlencoded"},function(d){console.log("---------error--------"),console.log("edge translate service error, http code : "+d.status+", response text : "+d.responseText)},!0)}}},request:{api:{host:["https://api.translate.zvo.cn/","https://america.api.translate.zvo.cn/"],language:"language.json",translate:"translate.json",ip:"ip.json",connectTest:"connectTest.json",init:"init.json"},appendParams:{},appendHeaders:{},response:function(n){},speedDetectionControl:{hostMasterNodeCutTime:2e3,hostQueue:[],hostQueueIndex:-1,disableTime:1e6,setCurrentHost:function(n){t.storage.set("speedDetectionControl_hostQueue",""),t.request.api.host=n,t.request.speedDetectionControl.checkHostQueue=new Array,t.request.speedDetectionControl.checkResponseSpeed_Storage(n,0)},getHostQueue:function(){if(t.request.speedDetectionControl.hostQueue.length==0){var n=t.storage.get("speedDetectionControl_hostQueue");if(n==null||typeof n>"u"||n==""){typeof t.request.api.host=="string"&&(t.request.api.host=[""+t.request.api.host]),t.request.speedDetectionControl.hostQueue=[];for(var a=0;a<t.request.api.host.length;a++){var s=t.request.api.host[a];t.request.speedDetectionControl.hostQueue[a]={host:s,time:0}}}else t.request.speedDetectionControl.hostQueue=JSON.parse(n);var r=t.storage.get("speedDetectionControl_lasttime");(r==null||typeof r>"u")&&(r=0);var l=6e4;new Date().getTime()-r>l&&t.request.speedDetectionControl.checkResponseSpeed()}return t.request.speedDetectionControl.hostQueue},checkResponseSpeed_Storage:function(n,a){t.request.speedDetectionControl.checkHostQueue.push({host:n,time:a}),t.request.speedDetectionControl.checkHostQueue.sort((s,r)=>s.time-r.time),t.storage.set("speedDetectionControl_hostQueue",JSON.stringify(t.request.speedDetectionControl.checkHostQueue)),t.storage.set("speedDetectionControl_lasttime",new Date().getTime()),t.request.speedDetectionControl.hostQueue=t.request.speedDetectionControl.checkHostQueue},checkResponseSpeed:function(){var n={"content-type":"application/x-www-form-urlencoded"};if(!(typeof t.request.api.connectTest!="string"||t.request.api.connectTest==null||t.request.api.connectTest.length<1)){t.request.speedDetectionControl.checkHostQueue=[],t.request.speedDetectionControl.checkHostQueueMap=[],typeof t.request.api.host=="string"&&(t.request.api.host=[""+t.request.api.host]);for(var a=0;a<t.request.api.host.length;a++){var s=t.request.api.host[a];t.request.speedDetectionControl.checkHostQueueMap[s]={start:new Date().getTime()};try{t.request.send(s+t.request.api.connectTest,{host:s},{host:s},function(r){var l=r.info,u=t.request.speedDetectionControl.checkHostQueueMap[l],d=new Date().getTime()-u.start;t.request.api.host[0]==l&&(d=d-t.request.speedDetectionControl.hostMasterNodeCutTime,d<0&&(d=0)),t.request.speedDetectionControl.checkResponseSpeed_Storage(l,d)},"post",!0,n,function(r){var l=r.requestURL.replace(t.request.api.connectTest,"");t.request.speedDetectionControl.checkResponseSpeed_Storage(l,t.request.speedDetectionControl.disableTime)},!1)}catch(r){console.log(r)}}}},getHostQueueIndex:function(){if(t.request.speedDetectionControl.hostQueueIndex<0){var n=t.storage.get("speedDetectionControl_hostQueueIndex");typeof n>"u"||n==null?(t.request.speedDetectionControl.hostQueueIndex=0,t.storage.set("speedDetectionControl_hostQueueIndex",0)):t.request.speedDetectionControl.hostQueueIndex=n}return t.request.speedDetectionControl.hostQueueIndex},getHost:function(){var n=t.request.speedDetectionControl.getHostQueue(),a=t.request.speedDetectionControl.getHostQueueIndex();return n.length>a||(console.log("异常,下标越界了!index:"+a),a=n.length-1),n[a].host}},getUrl:function(n){var a=t.request.speedDetectionControl.getHost(),s=a+n+"?v="+t.version;return s},post:function(n,a,s,r){var l={"content-type":"application/x-www-form-urlencoded"};if(!(typeof a>"u")){if(typeof t.enterprise<"u"&&t.enterprise.automaticAdaptationService(),t.request.getUrl(n),t.service.name=="client.edge"){if(n==t.request.api.translate){t.service.edge.translate(n,a,s,r);return}if(n==t.request.api.language){var u={};u.info="SUCCESS",u.result=1,u.list=t.service.edge.language.json,s(u);return}}this.send(n,a,a,s,"post",!0,l,r,!0)}},send:function(n,a,s,r,l,u,d,c,f){var g="";if((a==null||typeof a>"u")&&(a={}),typeof a=="string")g=a;else{a.browserDefaultLanguage=t.util.browserDefaultLanguage();for(var p in t.request.appendParams)t.request.appendParams.hasOwnProperty(p)&&(a[p]=t.request.appendParams[p]);typeof t.enterprise<"u"&&typeof t.enterprise.key<"u"&&typeof t.enterprise.key=="string"&&t.enterprise.key.length>0&&(a.key=t.enterprise.key);for(var v in a)a.hasOwnProperty(v)&&(g.length>0&&(g=g+"&"),g=g+v+"="+a[v])}n.indexOf("https://")==0||n.indexOf("http://")==0||(n=t.request.getUrl(n));var y=null;try{y=new XMLHttpRequest}catch{y=new ActiveXObject("Microsoft.XMLHTTP")}if(y.data=s,y.open(l,n,u),d!=null)for(var v in d)d.hasOwnProperty(v)&&y.setRequestHeader(v,d[v]);for(var x in t.request.appendHeaders)t.request.appendHeaders.hasOwnProperty(x)&&y.setRequestHeader(x,t.request.appendHeaders[x]);return t.service.name=="translate.service"&&y.setRequestHeader("currentpage",window.location.href+""),y.send(g),y.onreadystatechange=function(){if(y.readyState==4)if(t.request.response(y),y.status==200){var S=null;if(!(typeof y.responseText>"u"||y.responseText==null)){if(y.responseText.indexOf("{")>-1&&y.responseText.indexOf("}")>-1)try{S=JSON.parse(y.responseText)}catch($){console.log($)}}S==null?r(y.responseText):r(S)}else f&&(n.indexOf(t.request.api.connectTest)>-1||(t.service.name=="translate.service"&&console.log(`----- translate.js 提示 -----
翻译服务响应异常,解决这种情况可以有两种方案:
【方案一】:使用采用最新版本 3.16.0及更高版本,js引用文件为 https://cdn.staticfile.net/translate.js/3.16.0/translate.js 并且使用 client.edge 模式 (增加一行设置代码就好,可参考 https://translate.zvo.cn/4081.html ),这样就不会再出现这种情况了,而且这个方案也是完全免费的。
【方案二】:采用企业级稳定翻译通道 ,但是这个相比于 方案一 来说,是有一定的收费的,大概一年600,这个就是专门为了高速及高稳定准备的,而相比于这个方案二,方案一则是全免费的。 因为方案二我们是部署了两个集群,而每个集群又下分了数个网络节点,包含中国大陆、香港、美国、欧洲、 等多个州,充分保障稳定、高效,同样也产生了不少成本,所以才需要付费。更多信息说明可以参考: http://translate.zvo.cn/4087.html
【方案三】:私有部署你自己的翻译通道,并且启用内存级翻译缓存,毫秒级响应,但是需要依赖一台1核2G服务器,是最推荐的方式。具体参考:https://translate.zvo.cn/391129.html
-------------`),console.log("------- translate.js service api response error --------"),console.log(" http code : "+y.status),console.log(" response : "+y.response),console.log(" request url : "+n),console.log(" request data : "+JSON.stringify(a)),console.log(" request method : "+l),console.log("---------------------- end ----------------------"))),y.requestURL=n,c!=null&&c(y)},y},translateText:function(n,a){var s=new Array,r=t.language.getLocal(),l=t.language.getCurrent();if(typeof n=="string")s[0]=n;else{var u=Object.prototype.toString.call(n);if(u=="[object Array]")s=n;else if(u=="[object Object]")typeof n.texts>"u"&&console.log("translate.request.translateText 传入的值类型异常,因为你没有传入 obj.texts 要翻译的具体文本! 请查阅文档: https://translate.zvo.cn/4077.html"),typeof n.texts=="string"?s=[n.texts]:s=n.texts,typeof n.from=="string"&&n.from.length>0&&(r=n.from),typeof n.to=="string"&&n.to.length>0&&(l=n.to);else{console.log("translate.request.translateText 传入的值类型错误,请查阅文档: https://translate.zvo.cn/4077.html");return}}for(var d=new Array,c=[],f={},g=0;g<s.length;g++){var p=t.util.hash(s[g]),v=t.storage.get("hash_"+l+"_"+p);v!=null&&v.length>0?d[g]=v:(d[g]="",c.push(s[g]),f[p]=g)}if(c.length==0){var x={from:r,to:l,text:d,result:1};a(x);return}if(!(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1)){var y=t.request.api.translate,x={from:r,to:l,text:encodeURIComponent(JSON.stringify(c))};t.request.post(y,x,function(S){S.result==0&&(console.log("=======ERROR START======="),console.log("from : "+S.from),console.log("to : "+S.to),console.log("translate text array : "+s),console.log("response : "+S.info),console.log("=======ERROR END ======="));for(var $=0;$<S.text.length;$++){var W=t.util.hash(c[$]);t.storage.set("hash_"+l+"_"+W,S.text[$]),t.office.fullExtract.isUse&&t.office.fullExtract.set(W,c[$],x.to,S.text[$]),d[f[W]]=S.text[$]}S.text=d,a(S)},null)}},listener:{minIntervalTime:800,lasttime:0,executetime:0,delayExecuteTime:200,addExecute:function(){var n=Date.now();t.request.listener.lasttime==0?(t.request.listener.executetime=n,t.request.listener.lasttime=1):t.request.listener.executetime>1||(n<t.request.listener.lasttime+t.request.listener.minIntervalTime?t.request.listener.executetime=t.request.listener.lasttime+t.request.listener.minIntervalTime:t.request.listener.executetime=n)},trigger:function(n){return!0},start:function(){if(typeof t.request.listener.isStart<"u")return;if(t.request.listener.isStart=!0,setInterval(function(){var l=Date.now();if(t.request.listener.executetime>1&&l>t.request.listener.executetime+t.request.listener.delayExecuteTime){t.request.listener.executetime=0,t.request.listener.lasttime=l;try{t.execute()}catch(u){console.log(u)}}},100),typeof PerformanceObserver>"u"){console.log("因浏览器版本较低, translate.request.listener.start() 中 PerformanceObserver 对象不存在,浏览器不支持,所以 translate.request.listener.start() 未生效。");return}const n=new PerformanceObserver(l=>{for(var u=!1,d=0;d<l.getEntries().length;d++){var c=l.getEntries()[d];if(c.initiatorType==="fetch"||c.initiatorType==="xmlhttprequest"){var f=c.name;typeof t.request.api.host=="string"&&(t.request.api.host=[t.request.api.host]);for(var g=!1,p=0;p<t.request.api.host.length;p++)if(f.indexOf(t.request.api.host[p])>-1){g=!0;break}if(typeof t.service.edge<"u"&&f.indexOf(t.service.edge.api.auth)>-1&&(g=!0),f.indexOf(".microsofttranslator.com/translate")>-1&&(g=!0),g||!t.request.listener.trigger())continue;u=!0;break}}u&&t.request.listener.addExecute()});var a=PerformanceObserver.supportedEntryTypes;if(a){for(var s=!1,r=0;r<a.length;r++)if(a[r]==="resource"){s=!0;break}if(s)try{n.observe({entryTypes:["resource"]});return}catch{console.log("PerformanceObserver entryTypes 失败,尝试 type 参数")}}try{n.observe({type:"resource",buffered:!0}),console.log("使用 PerformanceObserver type")}catch{console.log("当前浏览器不支持 PerformanceObserver 的任何参数, translate.request.listener.start() 未启动")}}}},storage:{IndexedDB:{db:null,initDB:function(){const n=this;return new Promise((a,s)=>{const r="translate.js",l="kvStore",d=indexedDB.open(r,1);d.onupgradeneeded=function(c){const f=c.target.result;f.objectStoreNames.contains(l)||f.createObjectStore(l,{keyPath:"key"})},d.onsuccess=function(c){n.db=c.target.result,a()},d.onerror=function(c){s("IndexedDB 打开失败")}})},set:async function(n,a){return this.db||await this.initDB(),new Promise((s,r)=>{const u=this.db.transaction("kvStore","readwrite").objectStore("kvStore"),d={key:n,value:a},c=u.put(d);c.onsuccess=()=>s(),c.onerror=()=>r("写入失败")})},get:async function(n){return this.db||await this.initDB(),new Promise((a,s)=>{const u=this.db.transaction("kvStore","readonly").objectStore("kvStore").get(n);u.onsuccess=()=>{const d=u.result;a(d?d.value:void 0)},u.onerror=()=>s("读取失败")})},list:async function(n=""){return this.db||await this.initDB(),new Promise((a,s)=>{const u=this.db.transaction("kvStore","readonly").objectStore("kvStore").openCursor(),d=[],c="^"+n.replace(/\*/g,".*")+"$",f=new RegExp(c);u.onsuccess=g=>{const p=g.target.result;p?(f.test(p.key)&&d.push({key:p.key,value:p.value.value}),p.continue()):a(d)},u.onerror=()=>s("游标读取失败")})}},set:function(n,a){localStorage.setItem(n,a)},get:function(n){return localStorage.getItem(n)}},images:{queues:[],add:function(n){for(var a in n)n.hasOwnProperty(a)&&(t.images.queues[a]=n[a])},execute:function(){if(!(Object.keys(t.images.queues).length<1)){for(var n=document.getElementsByTagName("img"),a=0;a<n.length;a++){var s=n[a];if(!(typeof s.src>"u"||s.src==null||s.src.length==0)){var r=s.getAttribute("src");for(var l in t.images.queues){var u=l,d=t.images.queues[l];u==r&&(d=d.replace(new RegExp("{language}","g"),t.to),s.src=d)}}}for(var c=document.getElementsByTagName("*"),a=0;a<c.length;a++){var f=c[a],g=window.getComputedStyle(f,null),p=g.backgroundImage;if(p!="none"){var v=t.images.gainCssBackgroundUrl(p);if(typeof t.images.queues[v]<"u"){var d=t.images.queues[v];d=d.replace(new RegExp("{language}","g"),t.to),f.style.backgroundImage='url("'+d+'")'}}}}},gainCssBackgroundUrl:function(n){var a=n.indexOf('"'),s=n.lastIndexOf('"');if(a!=-1&&s!=-1){var r=n.substring(a+1,s);return r}return n}},reset:function(){var n=t.language.getCurrent(),a="";for(var s in t.nodeQueue)t.nodeQueue.hasOwnProperty(s)&&(a=s);if(a==""){console.log("提示,你当前还未执行过翻译,所以你无需执行 translate.reset(); 进行还原。");return}for(var r in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(r)){for(var l in t.nodeQueue[a].list[r])if(t.nodeQueue[a].list[r].hasOwnProperty(l)){var u=t.nodeQueue[a].list[r][l];for(var d in u.nodes)if(u.nodes.hasOwnProperty(d)){var c=t.storage.get("hash_"+n+"_"+l);if(!(typeof c>"u")&&c!=null&&c.length!=0&&!(typeof u.nodes[d].node>"u")){var f=typeof u.nodes[d].node.attribute>"u"?null:u.nodes[d].node.attribute,g=t.element.nodeAnalyse.analyse(u.nodes[d].node,"","",f);t.element.nodeAnalyse.analyse(u.nodes[d].node,g.text,u.original,f)}}}}t.storage.set("to",""),t.to=null,t.selectLanguageTag.render()},selectionTranslate:{selectionX:0,selectionY:0,callTranslate:function(n){let a=window.getSelection();if(a.anchorOffset==a.focusOffset)return;let s=window.getSelection().toString();if(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1){console.log("已设置了不使用 translate 翻译接口,翻译请求被阻止");return}var r=t.request.api.translate,l={from:t.language.getLocal(),to:t.to,text:encodeURIComponent(JSON.stringify([s]))};t.request.post(r,l,function(u){if(u.result==0)return;let d=document.querySelector("#translateTooltip");d.innerText=u.text[0],d.style.top=selectionY+20+"px",d.style.left=selectionX+50+"px",d.style.display=""},null)},start:function(){let n=document.createElement("span");n.innerText="",n.setAttribute("id","translateTooltip"),n.setAttribute("style","background-color:black;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:999;top:150%;left:50%; "),document.body.appendChild(n),document.addEventListener("mousedown",a=>{selectionX=a.pageX,selectionY=a.pageY},!1),document.addEventListener("mouseup",t.selectionTranslate.callTranslate,!1),document.addEventListener("click",a=>{document.querySelector("#translateTooltip").style.display="none"},!1)}},enterprise:{isUse:!1,use:function(){if(t.enterprise.isUse=!0,t.request.speedDetectionControl.hostMasterNodeCutTime=300,t.request.api.host=["https://america-enterprise-api-translate.zvo.cn/","https://beijing.enterprise.api.translate.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn/","https://america.api.translate.zvo.cn:666/","https://api.translate.zvo.cn:666/","https://api.translate.zvo.cn:888/"],t.service.name=="client.edge"){t.service.name="translate.service",console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档:https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('client.edge'); (文档:https://translate.zvo.cn/4081.html) 将失效不起作用,有企业级翻译通道全部接管。");return}},automaticAdaptationService:function(){if(t.enterprise.isUse){var n=t.request.speedDetectionControl.getHostQueue();n.length>0&&n[0].time+1>t.request.speedDetectionControl.disableTime&&(t.service.name="client.edge")}},key:""},init:function(){if(!(typeof t.init_execute<"u")&&(t.init_execute="已进行",!(typeof t.request.api.init!="string"||t.request.api.init==null||t.request.api.init.length<1)))try{t.request.send(t.request.api.init,{},{},function(n){if(n.result==0){console.log("translate.js init 初始化异常:"+n.info);return}else if(n.result==1){var a=t.util.versionStringToInt(n.version),s=t.util.versionStringToInt(t.version.replace("v",""));a>s&&console.log("Tip : translate.js find new version : "+n.version)}},"post",!0,null,function(n){},!1)}catch{}},progress:{style:`
/* CSS部分 */
/* 灰色水平加载动画 */
.translate_api_in_progress {
position: relative;
overflow: hidden; /* 隐藏超出部分的动画 */
}
/* 蒙版层 */
.translate_api_in_progress::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 1); /* 半透明白色遮罩 */
z-index: 2;
}
/* 水平加载条动画 */
.translate_api_in_progress::before {
content: '';
position: absolute;
top: 50%;
left: 0;
width: 100%;
height:100%; /* 细线高度 */
background: linear-gradient(
90deg,
transparent 0%,
#e8e8e8 25%, /* 浅灰色 */
#d0d0d0 50%, /* 中灰色 */
#e8e8e8 75%, /* 浅灰色 */
transparent 100%
);
background-size: 200% 100%;
animation: translate_api_in_progress_horizontal-loader 3.5s linear infinite;
z-index: 3;
transform: translateY(-50%);
}
@keyframes translate_api_in_progress_horizontal-loader {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
`,api:{isTip:!0,setUITip:function(n){t.progress.api.isTip=n},removeChildClass:function(n,a){var s=n.childNodes;if(!(s==null||typeof s>"u")){if(s.length>0)for(var r=0;r<s.length;r++)t.progress.api.removeChildClass(s[r],a+1)}a!=1&&(typeof n>"u"||typeof n.className=="string"&&(n.className.indexOf("translate_api_in_progress")<-1||(n.className=n.className.replace(/translate_api_in_progress/g,""))))},startUITip:function(){const n=document.createElement("style");n.textContent=t.progress.style,document.head.appendChild(n),t.progress.api.isTip&&(t.listener.execute.renderStartByApi.push(function(a,s,r){for(var l in t.nodeQueue[a].list[s])if(t.nodeQueue[a].list[s].hasOwnProperty(l)){for(var u in t.nodeQueue[a].list[s][l].nodes)if(t.nodeQueue[a].list[s][l].nodes.hasOwnProperty(u)){var d=t.nodeQueue[a].list[s][l].nodes[u].node;if(!(typeof d>"u"||typeof d.parentNode>"u")){var c=d.parentNode;if(c!=null){var f=d.parentNode;if(!(f!=null&&typeof f.className<"u"&&f.className!=null&&c.className.indexOf("translate_api_in_progress")>-1))if(t.progress.api.removeChildClass(c,1),typeof c.className>"u"||c.className==null||c.className=="")c.className=" translate_api_in_progress";else{if(c.className.indexOf("translate_api_in_progress")>-1)continue;c.className=c.className+" translate_api_in_progress"}}}}}}),t.listener.execute.renderFinishByApi.push(function(a,s,r){for(var l in t.nodeQueue[a].list[s])if(t.nodeQueue[a].list[s].hasOwnProperty(l)){for(var u in t.nodeQueue[a].list[s][l].nodes)if(t.nodeQueue[a].list[s][l].nodes.hasOwnProperty(u)){var d=t.nodeQueue[a].list[s][l].nodes[u].node,c=d.parentNode;if(c!=null){var f=c.className;typeof f>"u"||f==null||f==""||f.indexOf("translate_api_in_progress")<-1||(c.className=f.replace(/translate_api_in_progress/g,""))}}}}))}}},js:{transString:function(n,a,s,r){let l;try{l=JSON.parse(n)}catch(u){r(u);return}t.js.transObject(l,a,s,r)},transObject:function(n,a,s,r){let l=t.js.find(n);var u=new Array;for(const c in l)u.push(c);var d={from:"auto",to:a,texts:u};t.request.translateText(d,function(c){if(typeof c.result>"u"||c.result==0){r("network connect failure");return}if(c.result==0){r(c.info);return}const f=c.text;f&&f.length===u.length?u.forEach((g,p)=>{const v=f[p],y=l[g];y&&y.length>0&&y.forEach(x=>{t.js.setValueByPath(n,x,v)})}):console.error("翻译结果长度不匹配或为空"),s(n)})},setValueByPath:function(n,a,s){const r=a.replace(/\[(\d+)\]/g,".$1").split(".");let l=n;for(let u=0;u<r.length-1;u++)l=l[r[u]];l[r[r.length-1]]=s},find:function(n,a=""){let s={};if(typeof n=="object"&&n!==null)if(Array.isArray(n))n.forEach((r,l)=>{const u=a?`${a}[${l}]`:`[${l}]`,d=t.js.find(r,u);for(const[c,f]of Object.entries(d))s[c]||(s[c]=[]),s[c]=s[c].concat(f)});else for(const r in n){const l=a?`${a}.${r}`:r;if(typeof n[r]=="object"&&n[r]!==null){const u=t.js.find(n[r],l);for(const[d,c]of Object.entries(u))s[d]||(s[d]=[]),s[d]=s[d].concat(c)}else typeof n[r]=="string"&&(typeof s[n[r]]>"u"&&(s[n[r]]=[]),s[n[r]].push(l))}else typeof n=="string"&&(typeof s[n]>"u"&&(s[n]=[]),s[n].push(a));return s}},network:{originalOpen:XMLHttpRequest.prototype.open,originalSend:XMLHttpRequest.prototype.send,setRequestHeaderOriginal:XMLHttpRequest.prototype.setRequestHeader,rules:[{url:/https:\/\/www\.guanleiming\.com\/a\/b\/.html/,methods:["GET","POST"],params:["a","b1"]}],getRuleMatch:function(n,a){for(let s=0;s<t.network.rules.length;s++){const r=t.network.rules[s];if(typeof r.url>"u"&&r.url==""){console.log("WARINNG : translate.network.rule find url is null:"),console.log(r);continue}if(!(!r.url.test(n)||!r.methods.includes(a.toUpperCase())))return r}return null},use:function(){XMLHttpRequest.prototype.open=function(...n){return t.network.hookOpen.apply(this,n)},XMLHttpRequest.prototype.send=function(...n){return t.network.hookSend.apply(this,n)},XMLHttpRequest.prototype.setRequestHeader=function(...n){return t.network.setRequestHeader.apply(this,n)},t.network.fetch.use()},_translateText(n){return t.language.getLocal()==t.language.getCurrent()||typeof n=="string"&&n.length>0&&t.language.recognition(n).languageName==t.language.getLocal()?new Promise((a,s)=>{const r={from:"auto",to:t.language.getLocal(),text:[n]};a(r)}):new Promise((a,s)=>{const r={from:"auto",to:t.language.getLocal(),texts:[n]};t.request.translateText(r,function(l){l.result===1?a(l):s(l)})})},setRequestHeader:function(n,a){return this._requestContext&&(this._requestContext.headers=this._requestContext.headers||{},this._requestContext.headers[n]=a),t.network.setRequestHeaderOriginal.call(this,n,a)},RequestHandler:{async handleGet(n,a){typeof a.params>"u"&&typeof a.params.length>"u"&&a.params.length<1&&(console.log("WARINNG: rule not find params , rule : "),console.log(a),a.params=[]);try{const l=new URL(n,window.location.origin),u=l.searchParams;for(var s=0;s<a.params.length;s++){var r=a.params[s];if(u.has(r)){const d=u.get(r),c=await t.network._translateText(d);typeof c>"u"?console.log("WARINNG: translateResultData is undefined"):typeof c.result>"u"?console.log("WARINNG: translateResultData.result is undefined"):c.result!=1?console.log("WARINNG: translateResultData.result failure : "+c.info):u.set(r,decodeURIComponent(c.text[0]))}}return l.toString()}catch(l){return console.warn("GET处理失败:",l),n}},async handleForm(n,a){try{const s=new URLSearchParams(n),r={...s};for(const l of a.params)if(s.has(l)){const u=s.get(l),d=await t.network._translateText(u);r[l]=d}return new URLSearchParams(r).toString()}catch(s){return console.warn("表单处理失败:",s),n}},async handleJson(n,a){try{const r={...JSON.parse(n)};for(const l of a.params)if(r.hasOwnProperty(l)){const u=r[l];r[l]=await t.network._translateText(u)}return JSON.stringify(r)}catch(s){return console.warn("JSON处理失败:",s),n}}},_requestContext:null,hookOpen(n,a,s,r,l){return this._requestContext={method:n.toUpperCase(),originalUrl:a,async:s,user:r,password:l,matchedRule:t.network.getRuleMatch(a,n)},t.network.originalOpen.call(this,n,a,s,r,l)},hookSend(n){const a=this._requestContext;if(!a||!a.matchedRule)return t.network.originalSend.call(this,n);const s=async()=>{let r=n;const l=a.method;try{const d=await t.network.RequestHandler.handleGet(a.originalUrl,a.matchedRule);if(t.network.originalOpen.call(this,l,d,a.async,a.user,a.password),a.headers)for(const c in a.headers)t.network.setRequestHeaderOriginal.call(this,c,a.headers[c]);if(l==="POST"&&typeof n<"u"&&n!=null&&n.length<2e3){var u=!1;if(n.trim().indexOf("[")==0||n.trim().indexOf("{")==0)try{r=await t.network.RequestHandler.handleJson(n,a.matchedRule),u=!0}catch{u=!1}if(!u)try{r=await t.network.RequestHandler.handleForm(n,a.matchedRule)}catch{}}}catch(d){console.warn("请求处理异常:",d)}t.network.originalSend.call(this,r)};a.async!==!1?s.call(this):(console.warn("同步请求不支持翻译拦截"),t.network.originalSend.call(this,n))},fetch:{originalFetch:window.fetch,use:function(){const n=this;window.fetch=function(...a){return n.hookFetch.apply(n,a)}},hookFetch:async function(n,a){const s=new Request(n,a),r=s.url,l=s.method,u=t.network.getRuleMatch(r,l);if(!u)return this.originalFetch.call(window,s);const d={method:l,url:r,headers:{},rule:u,isModified:!1};s.headers.forEach((f,g)=>{d.headers[g]=f}),this._requestContext=d;try{const f=await t.network.RequestHandler.handleGet(r,u);if(l==="GET"){const g=new Request(f,{method:l,headers:new Headers(d.headers),mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,referrer:s.referrer,referrerPolicy:s.referrerPolicy});return this.originalFetch.call(window,g)}if(l==="POST"){let g=null;s.body&&(g=await s.clone().text());const p=s.headers.get("Content-Type");let v=g;if(typeof g<"u"&&g!=null&&g.length<2e3){var c=!1;if(g.trim().indexOf("[")==0||g.trim().indexOf("{")==0)try{v=await t.network.RequestHandler.handleJson(g,u),c=!0}catch{c=!1}if(!c)try{v=await t.network.RequestHandler.handleForm(g,u)}catch{}}const y=new Request(f,{method:l,headers:new Headers(d.headers),body:v,mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,referrer:s.referrer,referrerPolicy:s.referrerPolicy});return this.originalFetch.call(window,y)}return this.originalFetch.call(window,s)}catch(f){return console.warn("fetch 请求处理异常:",f),this.originalFetch.call(window,s)}},_requestContext:null}},visual:{getRects:function(n){return n.map(a=>{if(!a)return null;let s;if(a.nodeType===Node.TEXT_NODE){const r=document.createRange();r.selectNodeContents(a);const l=r.getClientRects();s=l.length>0?l[0]:null}else a.nodeType===Node.ELEMENT_NODE&&(s=a.getBoundingClientRect());return s?{node:a,left:s.left,top:s.top,right:s.right,bottom:s.bottom,width:s.width,height:s.height}:null})},coordinateSort:function(n){return n.filter(s=>s!==null).sort((s,r)=>Math.abs(s.top-r.top)<5?s.left-r.left:s.top-r.top)},afterAdjacent:function(n){var a=t.visual.coordinateSort(n);const s=[];return t.visual.groupRectsByLine(a).forEach(l=>{for(let u=0;u<l.length;u++)for(let d=u+1;d<l.length;d++){const c=l[u],f=l[d];if(!t.visual.areHorizontallyAdjacent(c,f))break;s.push({before:c,after:f})}}),s},groupRectsByLine:function(n){const a=[];let s=[];return n.forEach(r=>{if(s.length===0)s.push(r);else{const l=s[s.length-1];Math.abs(r.top-l.top)<5?s.push(r):(a.push(s),s=[r])}}),s.length>0&&a.push(s),a},areHorizontallyAdjacent:function(n,a){const s=Math.min(n.bottom,a.bottom)-Math.max(n.top,a.top),r=a.left-n.right;return s>0&&Math.abs(r)<1},afterAddSpace:function(n){const a=[];return n.forEach(s=>{const{before:r,after:l}=s,u=r.node,d=l.node,c=window.getComputedStyle(u.nodeType===Node.TEXT_NODE?u.parentElement:u),f=window.getComputedStyle(d.nodeType===Node.TEXT_NODE?d.parentElement:d),g=parseFloat(c.marginRight)>0||parseFloat(c.paddingRight)>0,p=parseFloat(f.marginLeft)>0||parseFloat(f.paddingLeft)>0;!g&&!p&&typeof u.textContent=="string"&&typeof d.textContent=="string"&&(/\s$/.test(u.textContent)||/^\s/.test(d.textContent)||a.push(u))}),a},adjustTranslationSpaces:function(n){if(!t.language.wordBlankConnector(t.to))return;const a=t.visual.getRects(n),s=t.visual.afterAdjacent(a);t.visual.afterAddSpace(s).forEach(l=>{if(l.nodeType===Node.TEXT_NODE)l.textContent=l.textContent+" ";else if(l.nodeType===Node.ELEMENT_NODE){const u=l.lastChild;u&&u.nodeType===Node.TEXT_NODE&&(u.textContent=u.textContent+" ")}})},adjustTranslationSpacesByNodequeueUuid:function(n){var a=[];for(var s in t.nodeQueue[n].list)if(t.nodeQueue[n].list.hasOwnProperty(s)&&!(s.length<1)){for(var r in t.nodeQueue[n].list[s])if(t.nodeQueue[n].list[s].hasOwnProperty(r)){for(var l in t.nodeQueue[n].list[s][r].nodes)if(t.nodeQueue[n].list[s][r].nodes.hasOwnProperty(l)){var u=t.nodeQueue[n].list[s][r].nodes[l].node;a.push(u)}}}t.visual.adjustTranslationSpaces(a)},adjustTranslationSpacesByLastNodequeueUuid:function(a){var a="";for(var s in t.nodeQueue){a=s;break}typeof a=="string"&&a.length>1&&t.visual.adjustTranslationSpacesByNodequeueUuid(a)},hideText:{style:`
/* 文本隐藏核心样式 - 仅隐藏文本内容 */
html.translatejs-text-hidden p, html.translatejs-text-hidden div,
html.translatejs-text-hidden h1, html.translatejs-text-hidden h2, html.translatejs-text-hidden h3,
html.translatejs-text-hidden h4, html.translatejs-text-hidden h5, html.translatejs-text-hidden h6,
html.translatejs-text-hidden span, html.translatejs-text-hidden a, html.translatejs-text-hidden b,
html.translatejs-text-hidden strong, html.translatejs-text-hidden i, html.translatejs-text-hidden em,
html.translatejs-text-hidden mark,
html.translatejs-text-hidden blockquote, html.translatejs-text-hidden ul, html.translatejs-text-hidden ol,
html.translatejs-text-hidden li, html.translatejs-text-hidden table, html.translatejs-text-hidden th,
html.translatejs-text-hidden td, html.translatejs-text-hidden label, html.translatejs-text-hidden button,
html.translatejs-text-hidden input, html.translatejs-text-hidden select, html.translatejs-text-hidden textarea {
color: transparent !important;
text-shadow: none !important;
}
/* 隐藏占位符文字 */
html.translatejs-text-hidden ::placeholder {
color: transparent !important;
}
/* 确保媒体元素不受影响 */
img, video, iframe, canvas, svg,
object, embed, picture, source {
color: initial !important;
}
/* 忽略隐藏的元素保持可见 */
.ignore-hidden {
color: inherit !important;
}
`,hide:function(){const n=document.createElement("style");n.textContent=t.visual.hideText.style,document.head.appendChild(n),document.documentElement.classList.add("translatejs-text-hidden")},show:function(){document.documentElement.classList.remove("translatejs-text-hidden")}},webPageLoadTranslateBeforeHiddenText:function(){typeof document.body>"u"||document.body==null||console.log("错误警告: translate.visual.webPageLoadTranslateBeforeHiddenText() 要在 head 标签中触发才能达到最好的效果!"),t.language.local==""&&console.log("错误警告:在使用 translate.visual.webPageLoadTranslateBeforeHiddenText() 之前,请先手动设置你的本地语种,参考: http://translate.zvo.cn/4066.html 如果你不设置,则不管你是否有切换语言,网页打开后都会先短暂的不显示文字"),(t.language.local==""||t.language.local!=t.language.getCurrent())&&(t.visual.hideText.hide(),t.lifecycle.execute.renderFinish.push(function(n,a){t.visual.hideText.show()}))}}},o={index:function(n){var a=n.parentElement;if(a==null)return"";var s;if(typeof n.tagName>"u")s=a.childNodes;else{s=[];for(var r=a.childNodes,l=0;l<r.length;l++)r[l].tagName===n.tagName&&s.push(r[l])}var u=Array.prototype.indexOf.call(s,n);return n.nodeName+""+(u+1)},uuid:function(n){for(var a="",s=n;s!=null;){var r=o.index(s);r!=""&&(a!=""&&(a="_"+a),a=r+a),s=s.parentElement}return a}};console.log(`------ translate.js ------
Two lines of js html automatic translation, page without change, no language configuration file, no API Key, SEO friendly! Open warehouse : https://github.com/xnx3/translate
两行js实现html全自动翻译。 无需改动页面、无语言配置文件、无API Key、对SEO友好!完全开源,代码仓库:https://gitee.com/mail_osc/translate`),(function(n,a){e.exports?e.exports=a():n.translate=a()})(e9,function(){return t})})(Pr)),Pr.exports}var n9=t9();const Ta=Tg(n9),Dn={getHistory:async()=>await Ae({url:"/prompt/history/get_history",method:"get"}),saveHistory:async e=>await Ae({url:"/prompt/history/add_history",method:"post",data:e}),deleteHistory:async e=>await Ae({url:"/prompt/history/delete_history",method:"post",data:{id_index:e}}),batchDeleteHistory:async e=>await Ae({url:"/prompt/history/batch_delete_history",method:"post",data:{id_index:e}}),getFavorite:async()=>await Ae({url:"/prompt/collect_history/get_collect_history",method:"get"}),addFavorite:async e=>await Ae({url:"/prompt/collect_history/add_collect_history",method:"post",data:e}),editFavorite:async e=>await Ae({url:"/prompt/collect_history/edit_collect_history",method:"post",data:e}),deleteFavorite:async e=>await Ae({url:"/prompt/collect_history/delete_collect_history",method:"post",data:{id_index:e}}),batchDeleteFavorite:async e=>await Ae({url:"/prompt/collect_history/batch_delete_collect_history",method:"post",data:{id_indices:e}})},o9={class:"lora-manager-top-bar"},a9=["placeholder"],s9=["title"],r9=["title"],l9={class:"checkbox-container"},i9=["onClick"],u9=["onClick"],c9={key:0,class:"loading-indicator"},d9={key:1,class:"empty-list"},f9=["onClick","onMouseover"],p9=["src","alt","title"],g9={key:0,class:"loading-more"},m9={key:1,class:"no-more-data"},Bt="weilin_prompt_ui_",kg=vt({__name:"lora_index",props:{loraManager:{type:String,default:"look"}},setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(!1),s=b(!1),r=b(!1),l=b("all"),u=b(""),d=b(null),c=b(""),f=b(null),g=b(!1),p=b(""),v=b(100),y=b(0),x=b(),S=b(!1),$=b(!1),W=b(),w=b(localStorage.getItem("weilin_prompt_ui_showHoverInfo")),A=b(localStorage.getItem("weilin_prompt_ui_clickAddTag"));(w.value===null||w.value===void 0||w.value==="")&&(localStorage.setItem("weilin_prompt_ui_showHoverInfo",!0),w.value=!0),(A.value===null||A.value===void 0||A.value==="")&&(localStorage.setItem("weilin_prompt_ui_clickAddTag",!1),A.value=!1);const V=e;it(w,_=>{localStorage.setItem("weilin_prompt_ui_showHoverInfo",_)}),it(A,_=>{localStorage.setItem("weilin_prompt_ui_clickAddTag",_)});const z=b(1),j=b(50),q=et(()=>{if(l.value==="all"){const _=U.value;if(_){const M=Object.values(_);return Math.ceil(M.length/j.value)}}else{const _=U.value[u.value];if(_){const M=Object.values(_);return Math.ceil(M.length/j.value)}return 1}}),fe=()=>{S.value=!0,$.value=!0},te=(_,M)=>{if(!w.value||w.value=="false"||($.value=!0,p.value===_&&g.value))return;const me=M.currentTarget.getBoundingClientRect(),pe=window.innerHeight,Q=450;let se={left:me.left+(me.width-Q)/2,top:me.top+me.height+10};se.top+310>pe&&(se.top=me.top-310),se.left=Math.max(10,Math.min(se.left,window.innerWidth-Q-10)),se.top=Math.max(10,Math.min(se.top,pe-310)),v.value=se.left,y.value=se.top,g.value=!0,p.value=_,Ge(()=>{W.value.refresh()})},I=()=>{$.value=!1,setTimeout(()=>{!S.value&&!$.value&&(g.value=!1,p.value="",S.value=!1)},200)},R=()=>{g.value=!1,p.value="",S.value=!1},H=b([]),U=b([]),ne=b(""),oe=b(0),D=(_,M)=>{oe.value=_,ne.value=M},N=async()=>{try{const _=await Tn.getLoraFolderList();H.value=_.data}catch(_){console.error("Failed to get folder list:",_),X({type:"error",str:"message.loadFailed"})}},le=()=>{if(!f.value||s.value||r.value)return;const _=f.value;_.scrollHeight-_.scrollTop-_.clientHeight<100&&Z()},we=b(!1);let ae=null;const ie=()=>{ae&&clearTimeout(ae),ae=setTimeout(()=>{c.value.length>0?(we.value=!0,P()):(we.value=!1,F())},300)},ve=_=>{var M;return(M=_.local_info)!=null&&M.name&&_.local_info.name!==""&&_.local_info.name.length>0?_.local_info.name:_.name},Te=b(),he=_=>{V.loraManager==="addLora"?ge(_):V.loraManager==="prompt_inner"&&A.value?k(_):Te.value.open(_)},P=async()=>{try{const _=await Tn.searchLoraGetFolderList(c.value);if(U.value=_.data,U.value.length>0){z.value=1;const M=Object.values(U.value),G=(z.value-1)*50,me=G+50,pe=M.slice(G,me);K(pe)}}catch(_){console.error("Failed to get folder list:",_),X({type:"error",str:"message.loadFailed"})}},Y=b([]),ee=_=>{if(_==="all"){Y.value=[],l.value=_,u.value="/",U.value=H.value[_];const M=U.value;if(M){r.value=!1,z.value=1;const G=Object.values(M),me=(z.value-1)*50,pe=me+50,Q=G.slice(me,pe);K(Q)}}else{Y.value=[],l.value=_,u.value="/",U.value=H.value[_];const M=U.value["/"];if(M){r.value=!1,z.value=1;const G=Object.values(M),me=(z.value-1)*50,pe=me+50,Q=G.slice(me,pe);K(Q)}}},O=_=>{if(_!=u.value){u.value=_,Y.value=[];const M=U.value[u.value];if(M){r.value=!1,z.value=1;const G=Object.values(M),me=(z.value-1)*50,pe=me+50,Q=G.slice(me,pe);K(Q)}}},K=async _=>{const M=await Tn.getLoraRangeList(_);z.value===1?Y.value=M.data.loras:Y.value=Y.value.concat(M.data.loras)},E=async()=>{if(d.value!=null){X({type:"warn",str:"message.isLoading"});return}try{X({type:"success",str:"message.isLoadingPleaseWait"}),await Tn.getAllLoraList(),d.value=setInterval(async()=>{await L()},1e3)}catch(_){console.error("Failed to get all lora list:",_),X({type:"error",str:"message.loadFailed"})}},L=async()=>{try{const _=await Tn.getAllLoraStatus();_.data.isLoading===!1?(clearInterval(d.value),d.value=null,X({type:"success",str:"message.loaddingSuccess"}),await F()):X({type:"warn",str:"message.loaddingPrc",name:_.data.progress})}catch(_){console.error("Failed to get lora status:",_),clearInterval(d.value),d.value=null,X({type:"error",str:"message.loadFailed"})}},F=async()=>{if(!n.value){n.value=!0,z.value=1,r.value=!1,s.value=!1;try{await N(),Ge(()=>{ee("all")})}catch(_){console.error("Failed to refresh lora list:",_)}finally{n.value=!1}}},Z=async()=>{if(z.value>=q.value){r.value=!0;return}s.value=!0;try{if(z.value++,we.value){if(U.value=res.data,U.value.length>0){const _=Object.values(U.value),M=(z.value-1)*50,G=M+50,me=_.slice(M,G);K(me)}}else if(l.value==="all"){U.value=H.value[l.value];const _=U.value;if(_){const M=Object.values(_),G=(z.value-1)*50,me=G+50,pe=M.slice(G,me);K(pe)}}else{const _=U.value[u.value];if(_){const M=Object.values(_),G=(z.value-1)*50,me=G+50,pe=M.slice(G,me);K(pe)}}}finally{s.value=!1}},ce=()=>{z.value=1,r.value=!1,s.value=!1};it([l,u,c],()=>{ce()}),gt(()=>{F()});const ge=_=>{var M,G,me,pe,Q,se,Me,Ne,je;oe.value===0?window.postMessage({type:"weilin_prompt_ui_selectLora",lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(M=_.local_info)!=null&&M.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(G=_.local_info)!=null&&G.strWeight?_.local_info.strWeight:.5,loraWorks:(me=_.local_info)!=null&&me.loraWorks?_.local_info.loraWorks:""}},"*"):oe.value===1?window.postMessage({type:"weilin_prompt_ui_selectLora_stack_"+ne.value,lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(pe=_.local_info)!=null&&pe.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(Q=_.local_info)!=null&&Q.strWeight?_.local_info.strWeight:.5,loraWorks:(se=_.local_info)!=null&&se.loraWorks?_.local_info.loraWorks:""}},"*"):oe.value===2&&window.postMessage({type:"weilin_prompt_ui_selectLora_stack_node_"+ne.value,lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(Me=_.local_info)!=null&&Me.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(Ne=_.local_info)!=null&&Ne.strWeight?_.local_info.strWeight:.5,loraWorks:(je=_.local_info)!=null&&je.loraWorks?_.local_info.loraWorks:""}},"*")},k=_=>{var M,G,me;window.postMessage({type:"weilin_prompt_ui_addLoraTag_inner",lora:{tag:`<wlr:${_.model_name}:${(M=_.local_info)!=null&&M.strengthMin?_.local_info.strengthMin:.5}:${(G=_.local_info)!=null&&G.strWeight?_.local_info.strWeight:.5}>`,loraWorks:(me=_.local_info)!=null&&me.loraWorks?_.local_info.loraWorks:""}},"*")};return t({openSetSeed:D}),(_,M)=>(T(),C("div",{class:Ce(`${Bt}lora-manager`)},[i("div",o9,[be(i("input",{"onUpdate:modelValue":M[0]||(M[0]=G=>c.value=G),class:Ce(`${Bt}search-input`),placeholder:m(o)("loraManager.searchPlaceholder"),onInput:ie},null,42,a9),[[Le,c.value]]),i("button",{class:Ce(`${Bt}refresh-btn`),onClick:F,title:m(o)("loraManager.refresh")},[(T(),C("svg",{class:Ce([`${Bt}refresh-icon`,{"is-rotating":n.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...M[3]||(M[3]=[i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],10,s9),i("button",{style:{"margin-left":"10px"},class:Ce(`${Bt}refresh-btn`),onClick:E,title:m(o)("loraManager.cacheAll")},[(T(),C("svg",{class:Ce([`${Bt}refresh-icon`,{"is-rotating":n.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...M[4]||(M[4]=[i("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"},null,-1)])],2))],10,r9),i("div",l9,[i("label",{class:Ce(`${Bt}checkbox-label`)},[be(i("input",{type:"checkbox","onUpdate:modelValue":M[1]||(M[1]=G=>w.value=G),class:Ce(`${Bt}checkbox`)},null,2),[[qt,w.value]]),M[5]||(M[5]=i("span",null,"悬浮信息",-1))],2),e.loraManager=="prompt_inner"?(T(),C("label",{key:0,class:Ce(`${Bt}checkbox-label`)},[be(i("input",{type:"checkbox","onUpdate:modelValue":M[2]||(M[2]=G=>A.value=G),class:Ce(`${Bt}checkbox`)},null,2),[[qt,A.value]]),M[6]||(M[6]=i("span",null,"点击添加Tag",-1))],2)):de("",!0)])]),we.value?de("",!0):(T(),C("div",{key:0,class:Ce(`${Bt}category-nav`)},[(T(!0),C(Oe,null,We(Object.keys(H.value),G=>(T(),C("button",{key:G,class:Ce([`${Bt}category-btn`,{active:l.value===G}]),onClick:me=>ee(G)},h(G==="/"?m(o)("loraManager.root"):G=="all"?m(o)("loraManager.all"):G),11,i9))),128))],2)),l.value!="all"&&!we.value?(T(),C("div",{key:1,class:Ce(`${Bt}subcategory-nav`)},[(T(!0),C(Oe,null,We(Object.keys(U.value),G=>(T(),C("button",{key:G,class:Ce([`${Bt}category-btn`,{active:u.value===G}]),onClick:me=>O(G)},h(G==="/"?m(o)("loraManager.root"):G=="all"?m(o)("loraManager.all"):G),11,u9))),128))],2)):de("",!0),i("div",{class:Ce(`${Bt}lora-list-container`),ref_key:"scrollContainer",ref:f,onScroll:le},[a.value&&!s.value?(T(),C("div",c9,h(m(o)("loraManager.loading")),1)):Y.value.length===0?(T(),C("div",d9,h(m(o)("loraManager.noResults")),1)):de("",!0),i("div",{class:Ce(`${Bt}lora-list`),style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px"}},[(T(!0),C(Oe,null,We(Y.value,G=>(T(),C("div",{key:G.file_path,class:Ce(`${Bt}lora-card`),ref_for:!0,ref_key:"loraCardRef",ref:x,onClick:me=>he(G),onMouseover:me=>te(G.name,me),onMouseleave:I,style:{display:"flex","flex-direction":"column","min-height":"200px",cursor:"pointer"}},[i("div",{class:Ce(`${Bt}lora-preview`),style:{flex:"1",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden",width:"100%"}},[G.preview?(T(),C("img",{key:0,src:G.preview,alt:G.model_name,title:G.model_name,loading:"lazy",style:{width:"100%",height:"100%","object-fit":"contain","min-height":"150px"}},null,8,p9)):(T(),C("div",{key:1,class:Ce(`${Bt}no-preview`),style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","min-height":"150px"}},[...M[7]||(M[7]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[i("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})],-1)])],2))],2),i("div",{class:Ce(`${Bt}lora-name`),style:{padding:"8px","text-align":"center","word-break":"break-word","white-space":"normal",display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden","min-height":"40px","max-height":"40px","line-height":"1.2","text-overflow":"ellipsis"}},h(ve(G)),3)],42,f9))),128))],2),i("div",null,[s.value?(T(),C("div",g9,h(m(o)("loraManager.loadingMore")),1)):de("",!0),!s.value&&r.value?(T(),C("div",m9,h(m(o)("loraManager.noMoreData")),1)):de("",!0)])],34),Ve(Dr,{ref_key:"loraDetailRef",ref:Te},null,512),g.value?(T(),wt(ji,{key:2,ref_key:"loraCardItem",ref:W,fileNmae:p.value,paddingLeft:v.value,paddingTop:y.value,onCardLeave:R,onCardenter:fe},null,8,["fileNmae","paddingLeft","paddingTop"])):de("",!0)],2))}},[["__scopeId","data-v-2f0b875e"]]),h9={class:"tag-manager"},v9={class:"selected-categories-container"},_9={class:"selected-categories-header"},y9={class:"selected-categories-content"},b9={key:0,class:"selected-category-section"},w9={class:"section-title"},x9={class:"selected-items"},T9={class:"category-name"},S9=["onClick"],k9={key:1,class:"selected-category-section"},C9={class:"section-title"},E9={class:"selected-items"},L9={class:"category-name"},$9={class:"subcategory-name"},A9=["onClick"],I9={key:2,class:"no-selected"},M9={class:"category-tabs"},O9={class:"tabs-wrapper primary-tabs"},R9={class:"tabs-scroll"},N9=["onClick"],D9={class:"tab-text"},P9=["onClick","title"],F9={key:0,class:"tabs-wrapper group-tabs"},U9={class:"tabs-scroll"},B9=["onClick"],H9={class:"tab-text"},j9=["onClick","disabled","title"],W9=vt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=o,s=b([]),r=b(null),l=b(null),u=b([]),d=b(!1),c=b([]),f=b(!1),g=b(0),p=et(()=>c.value.filter(R=>!R.sub)),v=et(()=>c.value.filter(R=>R.sub)),y=R=>c.value.findIndex(H=>H.group.p_uuid===R.group.p_uuid&&!H.sub),x=R=>c.value.findIndex(H=>H.group.p_uuid===R.group.p_uuid&&H.sub&&H.sub.g_uuid===R.sub.g_uuid),S=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},$=async()=>{try{const R=await It.getTagsGroupList();if(s.value=R.info,l.value){const H=s.value.flatMap(U=>U.groups).find(U=>U.p_uuid===l.value.p_uuid);H?l.value=H:l.value=null}if(r.value){const H=s.value.find(U=>U.p_uuid===r.value.p_uuid);H?r.value=H:r.value=null}}catch(R){console.error("获取标签列表失败:",R)}},W=R=>{if(!R||R==="transparent")return"var(--primary-text)";let H,U,ne,oe=1;if(R.startsWith("rgba")){const N=R.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);N&&([,H,U,ne,oe]=N.map(Number))}else if(R.startsWith("rgb")){const N=R.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);N&&([,H,U,ne]=N.map(Number))}return oe<.5?"var(--primary-text)":(H*299+U*587+ne*114)/1e3>128?"#000000":"#ffffff"};gt(()=>{window.addEventListener("message",te)}),ca(()=>{window.removeEventListener("message",te)});const w=R=>{r.value=R,l.value=null,d.value=!1,u.value=[]},A=R=>{V(r.value)||(l.value=R,d.value=!1,u.value=[])},V=R=>R?c.value.some(H=>H.group.p_uuid===R.p_uuid&&!H.sub):!1,z=R=>{const H=c.value.findIndex(U=>U.group.p_uuid===R.p_uuid&&!U.sub);H!==-1?c.value.splice(H,1):(c.value=c.value.filter(U=>U.group.p_uuid!==R.p_uuid),c.value.push({group:{p_uuid:R.p_uuid,name:R.name},sub:null}))},j=(R,H)=>{if(V(R))return;const U=c.value.findIndex(ne=>ne.group.p_uuid===R.p_uuid&&ne.sub&&ne.sub.g_uuid===H.g_uuid);if(U!==-1)c.value.splice(U,1);else{const ne=c.value.findIndex(oe=>oe.group.p_uuid===R.p_uuid&&!oe.sub);ne!==-1&&c.value.splice(ne,1),c.value.push({group:{p_uuid:R.p_uuid,name:R.name},sub:H?{g_uuid:H.g_uuid,name:H.name}:null})}},q=R=>{c.value.splice(R,1)},fe=()=>{c.value=[]},te=R=>{R.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&$()},I=()=>{if(c.value.length===0){X({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{data:c.value,index:g.value}),f.value=!1};return t({open:(R,H)=>{S(),g.value=R,c.value=H,f.value=!0}}),(R,H)=>(T(),wt(ms,{modelValue:f.value,"onUpdate:modelValue":H[1]||(H[1]=U=>f.value=U),title:m(n)("importDialog.selectTitle")},{footer:pt(()=>[i("button",{onClick:H[0]||(H[0]=U=>f.value=!1)},h(m(n)("promptBox.settings.close")),1),i("button",{onClick:I},h(m(n)("importDialog.sureSelect")),1)]),default:pt(()=>[i("div",h9,[i("div",v9,[i("div",_9,[i("span",null,h(m(n)("importDialog.selectedCategories")),1),c.value.length>0?(T(),C("button",{key:0,class:"clear-all-btn",onClick:fe},h(m(n)("importDialog.clearAll")),1)):de("",!0)]),i("div",y9,[p.value.length>0?(T(),C("div",b9,[i("div",w9,h(m(n)("importDialog.primaryCategories")),1),i("div",x9,[(T(!0),C(Oe,null,We(p.value,(U,ne)=>(T(),C("div",{key:"primary-"+ne,class:"selected-item"},[i("span",T9,h(U.group.name),1),i("button",{class:"remove-selected-btn",onClick:oe=>q(y(U))},"×",8,S9)]))),128))])])):de("",!0),v.value.length>0?(T(),C("div",k9,[i("div",C9,h(m(n)("importDialog.subCategories")),1),i("div",E9,[(T(!0),C(Oe,null,We(v.value,(U,ne)=>(T(),C("div",{key:"sub-"+ne,class:"selected-item"},[i("span",L9,h(U.group.name),1),H[2]||(H[2]=i("span",{class:"separator"},">",-1)),i("span",$9,h(U.sub.name),1),i("button",{class:"remove-selected-btn",onClick:oe=>q(x(U))},"×",8,A9)]))),128))])])):de("",!0),c.value.length===0?(T(),C("div",I9,h(m(n)("importDialog.noSelectedCategories")),1)):de("",!0)])]),i("div",M9,[i("div",O9,[i("div",R9,[(T(!0),C(Oe,null,We(s.value,(U,ne)=>{var oe,D,N;return T(),C("div",{key:"Tabss-"+ne,class:Ce(["tab-item",{active:((oe=r.value)==null?void 0:oe.p_uuid)===U.p_uuid}]),style:ft({backgroundColor:((D=r.value)==null?void 0:D.p_uuid)===U.p_uuid?"var(--weilin-prompt-ui-primary-bg)":U.color,color:((N=r.value)==null?void 0:N.p_uuid)===U.p_uuid?"var(--weilin-prompt-ui-primary-text)":W(U.color)}),onClick:le=>w(U)},[i("span",D9,h(U.name),1),i("button",{class:"select-tab-btn",onClick:Xe(le=>z(U),["stop"]),title:m(n)("importDialog.selectCategory")},[...H[3]||(H[3]=[i("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[i("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)])],8,P9)],14,N9)}),128))])]),r.value?(T(),C("div",F9,[i("div",U9,[(T(!0),C(Oe,null,We(r.value.groups,(U,ne)=>{var oe,D,N;return T(),C("div",{key:"TabsSw-"+ne,class:Ce(["tab-item",{active:((oe=l.value)==null?void 0:oe.g_uuid)===U.g_uuid,disabled:V(r.value)}]),style:ft({backgroundColor:((D=l.value)==null?void 0:D.g_uuid)===U.g_uuid?"var(--weilin-prompt-ui-primary-bg)":U.color,color:((N=l.value)==null?void 0:N.g_uuid)===U.g_uuid?"var(--weilin-prompt-ui-primary-text)":W(U.color),opacity:V(r.value)?"0.5":"1",cursor:V(r.value)?"not-allowed":"pointer"}),onClick:le=>V(r.value)?null:A(U)},[i("span",H9,h(U.name),1),V(r.value)?de("",!0):(T(),C("button",{key:0,class:"select-tab-btn",onClick:Xe(le=>j(r.value,U),["stop"]),disabled:V(r.value),title:m(n)("importDialog.selectSubcategory")},[...H[4]||(H[4]=[i("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[i("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)])],8,j9))],14,B9)}),128))])])):de("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-7c9863cd"]]),dn={getTemplateList:async()=>await Ae({url:"/random_template/get_template_list",method:"post"}),getTemplateData:async e=>await Ae({url:"/random_template/get_template_data",method:"post",data:{name:e}}),saveTemplateData:async e=>await Ae({url:"/random_template/save_template",method:"post",data:{data:e}}),updateTemplateData:async(e,t)=>await Ae({url:"/random_template/update_template",method:"post",data:{name:e,data:t}}),deleteTemplateData:async e=>await Ae({url:"/random_template/delete_template",method:"post",data:{name:e}}),getRandomTemplateApple:async()=>await Ae({url:"/get/setting/get_random_template_setting",method:"post"}),updateRandomTemplateApple:async e=>await Ae({url:"/update/setting/update_random_template_setting",method:"post",data:{path:e}}),goRandomTemplate:async()=>await Ae({url:"/random_template/go_random_template",method:"post"}),goRandomTemplatePath:async e=>await Ae({url:"/random_template/go_random_template_path",method:"post",data:{name:e}})},V9={class:"random-rule-container"},z9={class:"settings-section template-section"},q9={class:"section-header"},G9={class:"template-controls"},Q9={class:"template-select-group"},Y9={class:"template-select-with-apply"},K9={value:""},J9=["value"],X9=["disabled"],Z9={class:"template-bottom-buttons"},eT=["disabled"],tT=["disabled"],nT={key:0,class:"template-name-input"},oT=["placeholder"],aT={class:"template-actions"},sT={key:0},rT={class:"settings-section"},lT={class:"section-header"},iT={class:"rules-reminder"},uT={class:"rules-list"},cT={class:"rule-header"},dT=["onClick"],fT={class:"rule-content"},pT={class:"form-group"},gT={class:"range-inputs"},mT=["onUpdate:modelValue"],hT=["onUpdate:modelValue"],vT={class:"form-group"},_T=["onUpdate:modelValue"],yT={value:"category"},bT={value:"specific"},wT={key:0,class:"form-group"},xT={class:"selected-categories-container"},TT={class:"selected-categories-header"},ST={class:"selected-categories-content"},kT={key:0,class:"selected-category-section"},CT={class:"section-title"},ET={class:"selected-items"},LT={class:"category-name"},$T={key:1,class:"selected-category-section"},AT={class:"section-title"},IT={class:"selected-items"},MT={class:"category-name"},OT={class:"subcategory-name"},RT={key:2,class:"no-selected"},NT=["onClick"],DT={key:1,class:"form-group"},PT={class:"tags-input-container"},FT=["onClick"],UT=["onUpdate:modelValue","onKeydown","placeholder"],BT=["onClick"],HT={class:"actions-section"},jT=["disabled"],Cg="weilin_tools_",WT=vt({__name:"random_setting",emits:["close","update","generateRandomTags"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(null),r=b(!1),l=b(""),u=b(""),d={randomRuleSetting:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},c={file_name:"new_random_template",rules:[{range:{min:1,max:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""},{range:{min:4,max:6},type:"category",categoryId:2,specificTags:[],tagGroupList:[],tagInput:""}]},f=b({});async function g(){try{l.value=="prompt_global"?await dn.getRandomTemplateApple().then(async ee=>{ee.data==""?f.value=c:await dn.getTemplateData(ee.data).then(async O=>{U.value=ee.data,f.value=O.data,r.value=!0}).catch(O=>{console.error("加载模板失败:",O),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(ee=>{console.error(ee),X({type:"warn",str:"message.networkError"})}):u.value==""?f.value=c:await dn.getTemplateData(u.value).then(async ee=>{U.value=u.value,f.value=ee.data,r.value=!0}).catch(ee=>{console.error("加载模板失败:",ee),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(ee){X({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",ee)}}function p(){try{const ee=JSON.parse(JSON.stringify(f.value));ee.rules&&ee.rules.forEach(O=>{delete O.tagInput}),dn.updateTemplateData(U.value,ee).then(async O=>{await dn.getTemplateData(O.path_name).then(async K=>{f.value=K.data,X({type:"success",str:"randomUtils.templateSaved"})}).catch(K=>{console.error("加载模板失败:",K),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(O=>{console.error("更新模板失败:",O),X({type:"warn",str:"randomUtils.errorSavingTemplate"})})}catch(ee){console.error("Error saving random tag settings:",ee),X({type:"warn",str:"randomUtils.errorSavingSettings"})}}function v(){f.value.rules.push({range:{min:f.value.rules.length>0?f.value.rules[f.value.rules.length-1].range.max+1:1,max:f.value.rules.length>0?f.value.rules[f.value.rules.length-1].range.max+3:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""})}function y(ee){f.value.rules.splice(ee,1)}function x(ee){ee.tagInput&&ee.tagInput.trim()&&(ee.specificTags.push(ee.tagInput.trim()),ee.tagInput="")}function S(ee,O){ee.specificTags.splice(O,1)}function $(){}const w=b((()=>{try{const ee=localStorage.getItem(`${Cg}randomRuleSettingState`);if(ee){const O=JSON.parse(ee),K={...d};return O.randomRuleSetting&&(K.randomRuleSetting={...d.randomRuleSetting,...O.randomRuleSetting}),K}}catch(ee){console.error("Error loading window states:",ee)}return{...d}})());it(w,ee=>{try{localStorage.setItem(`${Cg}randomRuleSettingState`,JSON.stringify(ee))}catch(O){console.error("Error saving window states:",O)}},{deep:!0});const A=ee=>{a.value=!1},V=(ee,O)=>{w.value[ee]&&(w.value[ee].position={...O})},z=(ee,O)=>{w.value[ee]&&(w.value[ee].size={...O})},j=ee=>{a.value=!0,l.value=ee,Be.registerWindow("randomRuleSetting"),Ge(()=>{Be.setActiveWindow("randomRuleSetting"),ee=="prompt_global"?N(1):P()})},q=(ee,O)=>{s.value.open(ee,O)},fe=()=>void 0,te=ee=>!ee||!Array.isArray(ee)||ee.length<=0?[]:ee.filter(O=>!O.sub),I=ee=>!ee||!Array.isArray(ee)||ee.length<=0?[]:ee.filter(O=>O.sub),R=ee=>{ee&&ee.data&&Array.isArray(ee.data)?f.value.rules[ee.index].tagGroupList=ee.data:f.value.rules[ee.index].tagGroupList=[]},H=b([]),U=b(""),ne=b(""),oe=b(!1),D=b(!1);async function N(ee=0){try{await dn.getTemplateList().then(O=>{H.value=O.data,ee==1&&g()}).catch(O=>{console.error(O),X({type:"warn",str:"message.networkError"})})}catch(O){X({type:"warn",str:"message.networkError"}),console.error("RandomTemplate获取列表失败:",O)}}function le(){oe.value=!0,ne.value=""}function we(){oe.value=!1,ne.value=""}function ae(){if(!U.value){X.warm(n("randomUtils.pleaseChooseTemplate"));return}l.value=="prompt_global"?dn.updateRandomTemplateApple(U.value).then(ee=>{X({type:"success",str:"randomUtils.templateApplied"})}).catch(ee=>{console.error("获取模板失败:",ee),X({type:"warn",str:"randomUtils.errorApplyingTemplate"})}):(window.postMessage({type:"weilin_prompt_ui_prompt_inner_update_node_tag_template_id",data:U.value},"*"),X({type:"success",str:"randomUtils.templateApplied"}))}function ie(){U.value&&dn.deleteTemplateData(U.value).then(()=>{X({type:"success",str:"randomUtils.templateDeleted"}),N(),U.value=""}).catch(ee=>{console.error("删除模板失败:",ee),X({type:"warn",str:"randomUtils.errorDeletingTemplate"})})}function ve(){if(!U.value)return;const ee=H.value.find(O=>O.path_name===U.value);ee&&(oe.value=!0,ne.value=ee.file_name,D.value=!0)}function Te(){if(!ne.value.trim()){X({type:"warn",str:"randomUtils.templateNameRequired"});return}if(f.value.file_name=ne.value.trim(),D.value){const ee=H.value.find(O=>O.path_name===U.value);if(ee){ee.file_name=ne.value.trim();const O=JSON.parse(JSON.stringify(f.value));O.rules&&O.rules.forEach(K=>{delete K.tagInput}),dn.updateTemplateData(ee.path_name,O).then(async K=>{X({type:"success",str:"randomUtils.templateSaved"}),await N().then(async()=>{await dn.getTemplateData(K.path_name).then(async E=>{U.value=K.path_name,f.value=E.data,X({type:"success",str:"randomUtils.templateSaved"})}).catch(E=>{console.error("加载模板失败:",E),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(K=>{console.error("保存模板失败:",K),X({type:"warn",str:"randomUtils.errorSavingTemplate"})})}}else{f.value=c,f.value.file_name=ne.value.trim();const ee=JSON.parse(JSON.stringify(f.value));ee.rules&&ee.rules.forEach(O=>{delete O.tagInput}),dn.saveTemplateData(ee).then(async O=>{await N().then(async()=>{await dn.getTemplateData(O.path_name).then(async K=>{U.value=O.path_name,f.value=K.data,X({type:"success",str:"randomUtils.templateSaved"})}).catch(K=>{console.error("加载模板失败:",K),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(O=>{console.error("保存模板失败:",O),X({type:"warn",str:"randomUtils.errorSavingTemplate"})})}oe.value=!1,ne.value="",D.value=!1}const he=async ee=>{if(ee.target.value!="")try{await dn.getTemplateData(ee.target.value).then(async O=>{U.value=O.path_name,f.value=O.data,r.value=!0}).catch(O=>{console.error("加载模板失败:",O),X({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(O){X({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",O)}},P=()=>{window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id"},"*")},Y=ee=>{ee.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response"&&(u.value=ee.data.data,N(1))};return gt(()=>{window.addEventListener("message",Y)}),On(()=>{Be.unregisterWindow("randomRuleSetting"),window.removeEventListener("message",Y)}),t({open:j,getRandomTags:fe}),(ee,O)=>(T(),C(Oe,null,[a.value?(T(),wt(xn,{key:0,title:m(n)("randomUtils.title"),position:w.value.randomRuleSetting.position,size:w.value.randomRuleSetting.size,"z-index":m(Be).getZIndex("randomRuleSetting"),"onUpdate:position":O[2]||(O[2]=K=>V("randomRuleSetting",K)),"onUpdate:size":O[3]||(O[3]=K=>z("randomRuleSetting",K)),onActive:O[4]||(O[4]=K=>m(Be).setActiveWindow("randomRuleSetting")),onClose:O[5]||(O[5]=K=>A())},{default:pt(()=>[i("div",V9,[i("div",z9,[i("div",q9,[i("h3",null,h(m(n)("randomUtils.ruleTemplates")),1)]),i("div",G9,[i("div",Q9,[i("div",Y9,[be(i("select",{"onUpdate:modelValue":O[0]||(O[0]=K=>U.value=K),onChange:he,class:"form-select template-select"},[i("option",K9,h(m(n)("randomUtils.selectTemplate")),1),(T(!0),C(Oe,null,We(H.value,(K,E)=>(T(),C("option",{key:E,value:K.path_name},h(K.file_name),9,J9))),128))],544),[[un,U.value]]),i("button",{class:"apply-template-btn",onClick:ae,disabled:!U.value},h(m(n)("randomUtils.applyTemplate")),9,X9)]),i("div",Z9,[i("button",{class:"new-template-btn",onClick:le},h(m(n)("randomUtils.newTemplate")),1),i("button",{class:"edit-template-btn",onClick:ve,disabled:!U.value},h(m(n)("randomUtils.editTemplate")),9,eT),i("button",{class:"delete-template-btn",onClick:ie,disabled:!U.value},h(m(n)("randomUtils.deleteTemplate")),9,tT)])]),oe.value?(T(),C("div",nT,[be(i("input",{type:"text","onUpdate:modelValue":O[1]||(O[1]=K=>ne.value=K),class:"form-input",placeholder:m(n)("randomUtils.templateNamePlaceholder")},null,8,oT),[[Le,ne.value]]),i("div",aT,[i("button",{class:"save-template-btn",onClick:Te},h(m(n)("randomUtils.save")),1),i("button",{class:"cancel-template-btn",onClick:we},h(m(n)("randomUtils.cancel")),1)])])):de("",!0)])]),U.value&&r.value?(T(),C("div",sT,[i("div",rT,[i("div",lT,[i("h3",null,h(m(n)("randomUtils.rules")),1),i("button",{class:"add-rule-btn",onClick:v},[O[6]||(O[6]=i("span",null,"+",-1)),qe(" "+h(m(n)("randomUtils.addRule")),1)])]),i("div",iT,[i("p",null,h(m(n)("randomUtils.rulesReminder")),1)]),i("div",uT,[(T(!0),C(Oe,null,We(f.value.rules,(K,E)=>(T(),C("div",{key:E,class:"rule-item"},[i("div",cT,[i("h4",null,h(m(n)("randomUtils.rule"))+" #"+h(E+1),1),i("button",{class:"delete-rule-btn",onClick:L=>y(E)},"×",8,dT)]),i("div",fT,[i("div",pT,[i("label",null,h(m(n)("randomUtils.range")),1),i("div",gT,[be(i("input",{type:"number","onUpdate:modelValue":L=>K.range.min=L,min:"1",class:"form-input range-input"},null,8,mT),[[Le,K.range.min,void 0,{number:!0}]]),O[7]||(O[7]=i("span",null,"-",-1)),be(i("input",{type:"number","onUpdate:modelValue":L=>K.range.max=L,min:"1",class:"form-input range-input"},null,8,hT),[[Le,K.range.max,void 0,{number:!0}]])])]),i("div",vT,[i("label",null,h(m(n)("randomUtils.tagType")),1),be(i("select",{"onUpdate:modelValue":L=>K.type=L,class:"form-select"},[i("option",yT,h(m(n)("randomUtils.category")),1),i("option",bT,h(m(n)("randomUtils.specificTags")),1)],8,_T),[[un,K.type]])]),K.type==="category"?(T(),C("div",wT,[i("div",xT,[i("div",TT,[i("span",null,h(m(n)("importDialog.selectedCategories")),1)]),i("div",ST,[te(K.tagGroupList).length>0?(T(),C("div",kT,[i("div",CT,h(m(n)("importDialog.primaryCategories")),1),i("div",ET,[(T(!0),C(Oe,null,We(te(K.tagGroupList),(L,F)=>(T(),C("div",{key:"primary-"+F,class:"selected-item"},[i("span",LT,h(L.group.name),1)]))),128))])])):de("",!0),I(K.tagGroupList).length>0?(T(),C("div",$T,[i("div",AT,h(m(n)("importDialog.subCategories")),1),i("div",IT,[(T(!0),C(Oe,null,We(I(K.tagGroupList),(L,F)=>(T(),C("div",{key:"sub-"+F,class:"selected-item"},[i("span",MT,h(L.group.name),1),O[8]||(O[8]=i("span",{class:"separator"},">",-1)),i("span",OT,h(L.sub.name),1)]))),128))])])):de("",!0),!K.tagGroupList||K.tagGroupList.length===0?(T(),C("div",RT,h(m(n)("importDialog.noSelectedCategories")),1)):de("",!0)])]),i("button",{class:"add-tag-btn",onClick:L=>q(E,K.tagGroupList)},h(m(n)("randomUtils.selectTagGroup")),9,NT)])):de("",!0),K.type==="specific"?(T(),C("div",DT,[i("label",null,h(m(n)("randomUtils.specificTags")),1),i("div",PT,[(T(!0),C(Oe,null,We(K.specificTags,(L,F)=>(T(),C("div",{key:F,class:"tag-chip"},[qe(h(L)+" ",1),i("button",{class:"remove-tag-btn",onClick:Z=>S(K,F)},"×",8,FT)]))),128)),be(i("input",{type:"text","onUpdate:modelValue":L=>K.tagInput=L,onKeydown:tn(Xe(L=>x(K),["prevent"]),["enter"]),class:"tag-input",placeholder:m(n)("randomUtils.addTagPlaceholder")},null,40,UT),[[Le,K.tagInput]])]),i("button",{class:"add-tag-btn",onClick:L=>x(K)},h(m(n)("randomUtils.addTag")),9,BT)])):de("",!0)])]))),128))])])])):de("",!0)]),i("div",HT,[i("button",{class:"save-btn",onClick:p,disabled:!U.value},h(m(n)("common.save")),9,jT)])]),_:1},8,["title","position","size","z-index"])):de("",!0),Ve(W9,{ref_key:"tagGroupSelectItem",ref:s,onSureSelect:R},null,512)],64))}},[["__scopeId","data-v-61460fd3"]]);function Sa(e){let t=e.length;for(;--t>=0;)e[t]=0}const VT=3,zT=258,Eg=29,qT=256+1+Eg,Lg=30,GT=512,QT=new Array((qT+2)*2);Sa(QT);const YT=new Array(Lg*2);Sa(YT);const KT=new Array(GT);Sa(KT);const JT=new Array(zT-VT+1);Sa(JT);const XT=new Array(Eg);Sa(XT);const ZT=new Array(Lg);Sa(ZT);try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Wi=new Uint8Array(256);for(let e=0;e<256;e++)Wi[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Wi[254]=Wi[254]=1;const eS={class:"weilin_prompt_ui_prompt-box"},tS={class:"center-container"},nS={class:"action-item"},oS=["title"],aS={class:"action-text"},sS={class:"action-item"},rS={class:"action-text"},lS={class:"action-item"},iS=["title"],uS={class:"action-text"},cS={class:"action-item"},dS=["title"],fS={class:"action-text"},pS={class:"action-item"},gS=["title"],mS={class:"action-text"},hS={key:0,class:"action-item"},vS=["title"],_S={class:"action-text"},yS={class:"action-item"},bS=["title"],wS={class:"action-text"},xS={class:"action-item"},TS=["title"],SS={class:"action-text"},kS={class:"action-item"},CS=["title"],ES={class:"action-text"},LS={class:"action-item"},$S=["title"],AS={class:"action-text"},IS={class:"action-item"},MS=["title"],OS={class:"action-text"},RS={class:"action-item"},NS=["title"],DS={class:"action-text"},PS={class:"action-item"},FS=["title"],US={class:"action-text"},BS=["placeholder"],HS={class:"token-counter"},jS=["onClick"],WS={class:"tag"},VS={class:"desc"},zS={class:"prompt-input-translate-area"},qS=["placeholder"],GS=["title"],QS={style:{"margin-left":"5px"},class:"action-text"},YS=["title"],KS={class:"action-text"},JS=["title"],XS={class:"action-text"},ZS={key:0,class:"tokens-container"},ek=["draggable","onDragstart","onDragover","onDrop","onDblclick"],tk={key:0,class:"newline-token"},nk=["title"],ok=["onMouseenter","onMouseleave"],ak=["title"],sk=["title","onMouseenter","onMouseleave"],rk={style:{"margin-left":"5px"}},lk=["onMouseenter","onMouseleave"],ik=["onClick"],uk=["value","onInput","onBlur","onKeyup"],ck={key:4,class:"translation-result"},dk=["onClick","title"],fk={class:"translated-text"},pk=["title"],gk={key:1,class:"line-break"},mk={class:"tag-tips-content"},hk=["innerHTML"],vk={key:0,class:"weight-control"},_k={class:"weight-label"},yk={key:1,class:"lora-weight-controls"},bk={class:"weight-control"},wk={class:"weight-label"},xk={class:"weight-control"},Tk={class:"weight-label"},Sk=["title"],kk={key:2,class:"bracket-btn-group"},Ck={class:"bracket-btn-container"},Ek={class:"vertical-btn-group"},Lk=["title"],$k=["title"],Ak={class:"bracket-btn-container"},Ik={class:"vertical-btn-group"},Mk=["title"],Ok=["title"],Rk={class:"bracket-btn-container"},Nk={class:"vertical-btn-group"},Dk=["title"],Pk=["title"],Fk={class:"tag-manager-section"},Uk={class:"header-left"},Bk={class:"section-title"},Hk={class:"header-right"},jk={class:"lora-manager-container"},Wk={class:"tag-manager-section"},Vk={class:"header-left"},zk={class:"section-title"},qk={class:"header-right"},Gk={class:"tag-manager-container"},Qk="weilin_prompt_ui_",Yk=vt({__name:"prompt_index",props:{promptManager:{type:String,default:"prompt_global"},hasPromptLoraStack:{type:Boolean,default:!1}},setup(e,{expose:t}){const o=b(null),{t:n}=ht(),a=b(),s=b(),r=b({top:0,left:0}),l=b(0),u=e,d=b(null),c=b(""),f=b([]),g={},p=b(null),v=b(!1),y=b({top:"0px",left:"0px"}),x=b(!1),S=b(null),$=b(null),W=b(null),w=b([]),A=b(!1),V=b(!1),z=b([]),j=b(0),q=b(null),fe=b(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),te=b(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),I=b(""),R=b(!1),H=b({top:"0px",left:"0px"}),U=b(null),ne=b(null),oe=b(""),D=b(0),N=()=>(D.value++,`token_${D.value}_${Date.now()}`),le=()=>{A.value=!A.value},we=()=>{A.value=!1},ae=b(null),ie=b(null),ve=et(()=>`calc(100% - ${(A.value?300:0)+280}px)`),Te=J=>{if(!J){ie.value=null,c.value="",Ge(()=>{s.value&&(s.value.value="",M({target:s.value}))});return}ie.value=J.id,c.value=J.content||"",Ge(()=>{s.value&&(s.value.value=c.value,M({target:s.value}))})};it(c,J=>{var B;ie.value&&((B=ae.value)!=null&&B.updateSelectedContent)&&ae.value.updateSelectedContent(J)});const he=()=>{S.value.open()},P=b(1),Y=()=>{if(p.value===null)return;let B=f.value[p.value].text;if(!F(B)){X({type:"warn",str:"message.noFinishKuo"});return}const xe=Se=>Se.startsWith("(")&&Se.endsWith(")")&&!Se.slice(1,-1).includes("(")&&!Se.slice(1,-1).includes(")")&&!Se.slice(1,-1).includes("[")&&!Se.slice(1,-1).includes("]")&&!Se.slice(1,-1).includes("{")&&!Se.slice(1,-1).includes("}")&&!Se.slice(1,-1).includes("<")&&!Se.slice(1,-1).includes(">"),$e=Se=>{const Pe=/^([\(\[\{\<]*)(.*?)([\)\]\}\>]*)$/,De=Se.match(Pe);if(!De)return Se;const[,Lt,lt,Ke]=De;if(/[\(\[\{\<].*[\)\]\}\>]/.test(lt))return Lt+$e(lt)+Ke;const Ht=lt.replace(/:\d+(\.\d+)?$/,"");return P.value===1?Lt+Ht+Ke:Lt+Ht+":"+P.value+Ke};let Fe=B;if(/[\(\[\{\<\)\]\}\>]/.test(B))P.value===1&&xe(B)?Fe=B.slice(1,-1).replace(/:\d+(\.\d+)?$/,""):Fe=$e(B);else{const Se=B.replace(/:\d+(\.\d+)?$/,"");P.value===1?Fe=Se:Fe=`(${Se}:${P.value})`}f.value[p.value].text=Fe,Xn()},ee=b(.5),O=b(.5);it(p,J=>{var B;if(J!==null&&((B=f.value[J])!=null&&B.isLoraTag)){const $e=f.value[J].text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);$e&&(ee.value=parseFloat($e[2]),O.value=parseFloat($e[3]))}});const K=()=>{var J;if(p.value!==null&&((J=f.value[p.value])!=null&&J.isLoraTag)){const B=f.value[p.value],xe=B.text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);if(xe){const Fe=`<wlr:${xe[1]}:${ee.value}:${O.value}>`;B.text=Fe,Xn()}}},E=J=>{if(p.value===null)return;let xe=f.value[p.value].text;const $e={"(":")","[":"]","{":"}","<":">"}[J];xe=`${J}${xe}${$e}`,f.value[p.value].text=xe,se()},L=J=>{if(p.value===null)return;let xe=f.value[p.value].text;const $e={"(":")","[":"]","{":"}","<":">"};xe.startsWith(J)&&xe.endsWith($e[J])&&(xe=xe.slice(1,-1),f.value[p.value].text=xe,se())},F=J=>{const B=[],xe={"(":")","[":"]","{":"}","<":">"};for(let $e of J)if(xe[$e])B.push($e);else if(Object.values(xe).includes($e)&&(B.length===0||xe[B.pop()]!==$e))return!1;return B.length===0};rc(()=>{for(const J in g)delete g[J]}),b(!0),b(!1);const Z=J=>/[\p{L}]/u.test(J),ce=J=>{const B=J.match(/([^:]+):[\d.]+/);return B?B[1]:J};let ge=null;const k=async()=>{ge&&clearTimeout(ge),ge=setTimeout(async()=>{if(!s.value)return;const J=s.value,B=J.selectionStart;await Ge();const xe=J.value.substring(0,B),$e=document.createElement("div");$e.style.position="absolute",$e.style.top="0",$e.style.left="0",$e.style.visibility="hidden",$e.style.whiteSpace="pre-wrap",$e.style.wordWrap="break-word",$e.style.width=window.getComputedStyle(J).width,$e.style.font=window.getComputedStyle(J).font,$e.style.padding=window.getComputedStyle(J).padding;const Fe=document.createTextNode(xe),Se=document.createElement("span");Se.textContent="|",$e.appendChild(Fe),$e.appendChild(Se),J.parentNode.appendChild($e);const Pe=Se.getBoundingClientRect(),De=J.parentNode.getBoundingClientRect();let Lt=Pe.top-De.top+Pe.height,lt=Pe.left-De.left;if(await Ge(),a.value){const Ke=a.value.offsetWidth,Ht=J.offsetWidth,fn=J.getBoundingClientRect().left-De.left;lt+Ke>fn+Ht&&(lt=fn+Ht-Ke),lt<fn&&(lt=fn),lt=Math.max(0,Math.min(lt,De.width-Ke))}J.parentNode.removeChild($e),r.value={top:Lt,left:lt},ge=null},50)},_=b(null),M=J=>{if(!(J!=null&&J.target)||!s.value)return;const B=J.target.value,xe=J.target.selectionStart,$e=J.target.selectionEnd,Fe={comma:{enabled:localStorage.getItem("weilin_prompt_ui_comma_conversion")!=="false",pattern:/,/g,replace:","},period:{enabled:localStorage.getItem("weilin_prompt_ui_period_conversion")!=="false",pattern:/。/g,replace:"."},bracket:{enabled:localStorage.getItem("weilin_prompt_ui_bracket_conversion")!=="false",patterns:[{pattern:/【/g,replace:"["},{pattern:/】/g,replace:"]"},{pattern:/(/g,replace:"("},{pattern:/)/g,replace:")"}]},angleBracket:{enabled:localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")!=="false",patterns:[{pattern:/《/g,replace:"<"},{pattern:/》/g,replace:">"}]},underscore:{enabled:localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",pattern:/_/g,replace:" "}};let Se=B.substring(0,xe),Pe=B;Object.values(Fe).forEach(Gt=>{Gt.enabled&&(Gt.pattern?(Se=Se.replace(Gt.pattern,Gt.replace),Pe=Pe.replace(Gt.pattern,Gt.replace)):Gt.patterns&&Gt.patterns.forEach(({pattern:at,replace:nt})=>{Se=Se.replace(at,nt),Pe=Pe.replace(at,nt)}))}),c.value=Pe;const De=Se.length,Lt=$e-xe,lt=De+Lt;Ge(()=>{s.value&&(s.value.setSelectionRange(De,lt),s.value.focus())});const Ke=Pe.substring(0,De);let Ht=De;for(;Ht>0&&!/[,\s]/.test(Ke[Ht-1]);)Ht--;const fn=Ke.substring(Ht,De).trim();U.value&&clearTimeout(U.value),U.value=setTimeout(()=>{fn&&Gr(fn),Me()},300),l.value=G(c.value)},G=J=>J?J.trim().split(/\s+/).length:0,me=async()=>{let J=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",B=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",xe=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",$e=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",Fe=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true";localStorage.getItem("weilin_prompt_ui_comma_conversion")||(localStorage.setItem("weilin_prompt_ui_comma_conversion","true"),J=!0),localStorage.getItem("weilin_prompt_ui_period_conversion")||(localStorage.setItem("weilin_prompt_ui_period_conversion","true"),B=!0),localStorage.getItem("weilin_prompt_ui_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_bracket_conversion","true"),xe=!0),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion","true"),$e=!0),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")||(localStorage.setItem("weilin_prompt_ui_underscore_to_bracket","false"),Fe=!1),J&&(c.value=c.value.replace(/,/g,",")),B&&(c.value=c.value.replace(/。/g,".")),xe&&(c.value=c.value.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),$e&&(c.value=c.value.replace(/《/g,"<").replace(/》/g,">")),Fe&&(c.value=c.value.replace(/_/g," "));const Se=c.value;let Pe=[];const De=f.value.map((at,nt)=>({token:at,originalIndex:nt,currentIndex:nt})).filter(({token:at})=>at.isHidden);Pe=((at,nt=0)=>{let kt=[],Ct=nt,Rt="",jt=[];for(;Ct<at.length;){const Un=at[Ct];if(Un===`
`){Rt.trim()&&(kt.push(Rt.trim()),Rt=""),kt.push(`
`),Ct++;continue}jt.length===0&&Un===","?(Rt.trim()&&kt.push(Rt.trim()),Rt=""):Rt+=Un,Ct++}return Rt.trim()&&(jt.length===0?kt.push(...Rt.split(",").filter(Boolean).map(Un=>Un.trim())):kt.push(Rt.trim())),kt})(Se);const lt=new Map;f.value.forEach((at,nt)=>{at.id||(at.id=N()),lt.set(nt,at)});const Ke=[];Pe.forEach(at=>{if(at===`
`)Ke.push({id:N(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""});else if(at.trim()){const nt=at.trim(),kt=/^<wlr:[^:]+:\d+(\.\d+)?:\d+(\.\d+)?>$/.test(nt);let Ct=!1;for(const[Rt,jt]of lt)if(jt.text===nt&&!jt.isHidden&&!Ke.includes(jt)){kt&&!jt.isLoraTag&&(jt.isLoraTag=!0),Ke.push(jt),lt.delete(Rt),Ct=!0;break}if(!Ct){for(const[Rt,jt]of lt)if(jt.text===nt&&!Ke.includes(jt)){kt&&!jt.isLoraTag&&(jt.isLoraTag=!0),Ke.push(jt),lt.delete(Rt),Ct=!0;break}}Ct||Ke.push({id:N(),text:nt,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:"",isLoraTag:kt})}});const Ht=new Set;De.forEach(({token:at,originalIndex:nt})=>{if(Ht.has(at.id)||(Ht.add(at.id),Ke.some(Rt=>Rt.id===at.id)))return;let Ct=nt;for(;Ct>Ke.length;)Ct--;Ct<0?Ke.push(at):Ke.splice(Ct,0,at)}),f.value=Ke,c.value=f.value.length>0?f.value.reduce((at,nt,kt)=>{var Fg,Ug;if(nt.isHidden)return at;if(nt.text===`
`){const vo=Mt(kt);return vo!==-1&&f.value[vo],at+nt.text}if(at===""){let vo=kt+1;for(;vo<f.value.length&&((Fg=f.value[vo])!=null&&Fg.isHidden);)vo++;const Q$=vo>=f.value.length,Bg=vo<f.value.length?f.value[vo]:null,Y$=Q$||Bg&&Bg.text===`
`;return nt.text+(Y$?",":"")}let Ct=kt+1;for(;Ct<f.value.length&&((Ug=f.value[Ct])!=null&&Ug.isHidden);)Ct++;const Rt=Ct>=f.value.length,jt=Ct<f.value.length?f.value[Ct]:null,Un=jt&&jt.text===`
`||Rt,Pg=Mt(kt);return Pg!==-1&&f.value[Pg].text===`
`?at+nt.text+(Un?",":""):at+", "+nt.text+(Un?",":"")},""):"",ne.value&&clearTimeout(ne.value),ne.value=setTimeout(()=>{se()},1e3),Me();const fn=20;let Gt=0;for(;Gt<f.value.length;){const at=Math.min(Gt+fn,f.value.length),nt=[];for(let kt=Gt;kt<at;kt++)if(f.value[kt].text.length>0&&!f.value[kt].translate){let Ct=f.value[kt].text;const Rt=ce(Ct.trim());nt.push($n.getTranslateLocal(Rt).then(jt=>{const Un=jt;f.value[kt].translate=Un.translated.translate,f.value[kt].color=Un.translated.color}))}await Promise.all(nt),Gt=at}l.value=G(c.value)},pe=async()=>{let B=0;for(;B<f.value.length;){const xe=Math.min(B+20,f.value.length),$e=[];for(let Fe=B;Fe<xe;Fe++){const Se=f.value[Fe];if(Se.translate&&/[a-zA-Z]/.test(Se.translate)){const Pe=Se.text,De=new Promise(Lt=>{localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"?Ta.request.translateText(Pe,function(lt){if(lt.result>0){const Ke=lt.text.map(Ht=>Ht.replace(/[\[\]“”]/g,"")).join(", ");f.value[Fe].translate=Ke}Lt()}):$n.translaterText(Pe).then(lt=>{lt.text.length>0&&(f.value[Fe].translate=lt.text),Lt()})});$e.push(De)}}await Promise.all($e),B=xe}},Q=b(""),se=()=>{const J=c.value.replace(/[\s\t\n]+/g,"");if(w.value.length>0){if(J.length>0){const B=w.value.filter(Fe=>!Fe.hidden);let xe={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:w.value};B.length>0&&(xe.lora=B);const $e=JSON.stringify(xe);Q.value!=$e&&(Q.value=$e,Dn.saveHistory({tag:$e}))}}else if(Q.value!=c.value){const B={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:""},xe=JSON.stringify(B);J.length>0&&Dn.saveHistory({tag:xe})}Me()},Me=()=>{if(w.value.length>0){Q.value=c.value;const J=w.value.filter($e=>!$e.hidden);let B={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:w.value};J.length>0&&(B.lora=J);const xe=JSON.stringify(B);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:xe},"*")}else{Q.value=c.value;const J={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:""},B=JSON.stringify(J);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:B},"*")}},Ne=(J,B)=>{Je.value&&(clearTimeout(Je.value),Je.value=null);const xe=B.target.getBoundingClientRect();y.value={top:`${xe.top-50}px`,left:`${xe.left+xe.width/2}px`},p.value=J;const $e=f.value[J].text;P.value=je($e),H.value={top:`${xe.bottom+window.scrollY+xe.height+10}px`,left:`${xe.left+xe.width/2}px`},f.value[J].isLoraTag||(R.value=!0)},je=J=>{const B=[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"<",close:">"}];for(const $e of B)if(J.startsWith($e.open)&&J.endsWith($e.close))return je(J.slice(1,-1));const xe=J.match(/:(\d+(\.\d+)?)$/);return xe?parseFloat(xe[1]):1},Je=b(null),tt=J=>{Je.value&&clearTimeout(Je.value),Je.value=setTimeout(()=>{v.value||ke(),Je.value=null},100),R.value=!1},Ie=()=>{v.value=!1,tt(p.value)},ke=()=>{v.value||(p.value=null)},Ee=()=>{if(p.value!==null){const J=p.value;_t(J),p.value=null,v.value=!1}},_t=J=>{const B=c.value;let xe=f.value[J],$e=0,Fe=-1;for(let Se=0;Se<J;Se++){let Pe=B.indexOf(f.value[Se].text,$e);Pe!==-1&&($e=Pe+f.value[Se].text.length)}if(xe.text===`
`||xe.text===" "){for(let Se=$e;Se<B.length;Se++)if(B[Se]===xe.text){Fe=Se;break}}else Fe=B.indexOf(xe.text,$e);if(Fe!==-1){const Se=xe.text===`
`?" ":"",Pe=B.substring(0,Fe)+Se+B.substring(Fe+xe.text.length);c.value=Pe}f.value.splice(J,1),c.value=f.value.length>0?f.value.reduce((Se,Pe,De)=>{var Gt,at;if(Pe.isHidden)return Se;if(Pe.text===`
`){const nt=Mt(De);return nt!==-1&&f.value[nt],Se+Pe.text}if(Se===""){let nt=De+1;for(;nt<f.value.length&&((Gt=f.value[nt])!=null&&Gt.isHidden);)nt++;const kt=nt>=f.value.length,Ct=nt<f.value.length?f.value[nt]:null,Rt=kt||Ct&&Ct.text===`
`;return Pe.text+(Rt?",":"")}let Lt=De+1;for(;Lt<f.value.length&&((at=f.value[Lt])!=null&&at.isHidden);)Lt++;const lt=Lt>=f.value.length,Ke=Lt<f.value.length?f.value[Lt]:null,Ht=Ke&&Ke.text===`
`||lt,fn=Mt(De);return fn!==-1&&f.value[fn].text===`
`?Se+Pe.text+(Ht?",":""):Se+", "+Pe.text+(Ht?",":"")},""):"",se()},St=(J,B)=>{const xe=c.value;let $e=0,Fe=-1;for(let Pe=0;Pe<J;Pe++){let De=xe.indexOf(f.value[Pe].text,$e);De!==-1&&($e=De+f.value[Pe].text.length)}const Se=f.value[J].text;if(Fe=xe.indexOf(Se,$e),Fe!==-1){const Pe=B.target.value,De=xe.substring(0,Fe)+Pe+xe.substring(Fe+Se.length);c.value=De,f.value[J]={...f.value[J],text:Pe},se()}},yn=J=>{f.value[J].isPunctuation||(f.value[J].isEditing=!0,setTimeout(()=>{const B=g[J];if(B){B.focus();const xe=B.value.length;B.setSelectionRange(xe,xe),Xo(B),B.addEventListener("input",()=>Xo(B)),se()}}))},Xo=J=>{const B=document.createElement("span");B.style.visibility="hidden",B.style.position="absolute",B.style.whiteSpace="pre";const xe=window.getComputedStyle(J);B.style.font=xe.font,B.style.fontSize=xe.fontSize,B.style.fontFamily=xe.fontFamily,B.style.padding=xe.padding,B.style.border=xe.border,B.textContent=J.value||J.placeholder||"",document.body.appendChild(B);const $e=B.offsetWidth;J.style.width=`${Math.max($e+4,20)}px`,document.body.removeChild(B)},Zo=J=>{f.value[J].isEditing=!1};it(f,J=>{Xn()},{deep:!0}),it(w,J=>{se()},{deep:!0});const Gi=()=>{x.value=!x.value,x.value&&Ge(()=>{var B;const J=$.value.getBoundingClientRect();(B=W.value)==null||B.setPosition(J)})},Hr=()=>{x.value=!1},La=J=>{var B,xe;$.value&&!$.value.contains(J.target)&&W.value&&!W.value.$el.contains(J.target)&&Hr(),(B=a.value)!=null&&B.contains&&((xe=s.value)!=null&&xe.contains)&&!a.value.contains(J.target)&&!s.value.contains(J.target)&&(V.value=!1)},jr=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openTagManager_prompt"},"*")},Wr=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openLoraManager"},"*")},Qi=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openHistoryManager"},"*")},$a=b(!0),Yi=()=>{$a.value=!$a.value},Aa=b(!1),Ki=()=>{Aa.value=!Aa.value};b(null);const Vr=()=>{const J=s.value;J&&(J.addEventListener("keyup",Do),J.addEventListener("click",Do),J.addEventListener("input",Do))},Do=()=>{V.value&&k()},Ia=()=>{if(s.value){const J=s.value.style.height||`${s.value.offsetHeight}px`;localStorage.setItem("weilinPromptTextAreaHeight",J)}},Ji=()=>{const J=localStorage.getItem("weilinPromptTextAreaHeight");J&&s.value&&(s.value.style.height=J)};gt(()=>{document.addEventListener("click",La),window.addEventListener("message",ea),xs(),Vr(),Ge(()=>{Ji()})}),ca(()=>{}),On(()=>{document.removeEventListener("click",La),_.value&&clearTimeout(_.value),window.removeEventListener("message",ea);const J=s.value;J&&(J.removeEventListener("keyup",Do),J.removeEventListener("click",Do),J.removeEventListener("input",Do))});const ea=J=>{if(J.data.type==="weilin_prompt_ui_insertTag"){const B=c.value,xe=J.data.tagText;B===""?c.value=xe:(B.endsWith(" "),c.value=B+", "+xe+","),oe.value=c.value,me()}else if(J.data.type==="weilin_prompt_ui_user_history_tag"){const B=J.data.tagText;Q.value=B,Kr(B)}else if(J.data.type!=="weilin_prompt_ui_refresh_all_data"){if(J.data.type==="weilin_prompt_ui_translate_setting")xs();else if(J.data.type==="weilin_prompt_ui_selectLora"){if(J.data.lora.loraWorks!=null&&J.data.lora.loraWorks.length>0){const B=c.value,xe=J.data.lora.loraWorks;B===""?c.value=xe:(B.endsWith(" "),c.value=B+", "+xe+","),oe.value=c.value,me()}}else if(J.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response")Fn(J.data.data);else if(J.data.type==="weilin_prompt_ui_addLoraTag_inner")if(J.data.lora.loraWorks!=null&&J.data.lora.loraWorks.length>0){const B=c.value,xe=J.data.lora.tag+(J.data.lora.loraWorks===""?"":", "+J.data.lora.loraWorks);B===""?c.value=xe:(B.endsWith(" "),c.value=B+", "+xe+","),oe.value=c.value,me()}else{const B=c.value,xe=J.data.lora.tag;B===""?c.value=xe:(B.endsWith(" "),c.value=B+", "+xe+","),oe.value=c.value,me()}}},xs=async()=>{const J=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",B=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified";localStorage.getItem("weilin_prompt_ui_sourceLanguage")||localStorage.setItem("weilin_prompt_ui_sourceLanguage",J),localStorage.getItem("weilin_prompt_ui_targetLanguage")||localStorage.setItem("weilin_prompt_ui_targetLanguage",B),J!=="auto"&&Ta.language.setLocal(J),Ta.language.setDefaultTo(B)},Pn=(J,B)=>{localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"?Ta.request.translateText(J,function(xe){if(xe.result>0){const $e=xe.text.map(Fe=>Fe.replace(/[\[\]“”]/g,"")).join(", ");B.translate=$e}}):$n.translaterText(J).then(xe=>{xe.text.length>0&&(B.translate=xe.text)})},zr=()=>{if(localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"){var J={from:Ta.language.recognition(I.value).languageName,to:"english",texts:[I.value]};Ta.request.translateText(J,function(xe){if(xe.result>0){const $e=xe.text.map(Fe=>Fe.replace(/[\[\]“”]/g,"")).join(", ");f.value.push({text:$e,translate:I.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),I.value="",Xn()}})}else $n.translaterInputText(I.value).then(B=>{B.text.length>0&&(f.value.push({text:B.text,translate:I.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),I.value="",Xn())})},qr=()=>{setTimeout(()=>{V.value||(oe.value=c.value,me())},100)},Gr=J=>{let B=J.replace(/[\[\](){}]/g,"").trim();const $e=ce(B).trim();if(!$e){V.value=!1;return}if($e.length>20){V.value=!1;return}try{const Fe=$e.toLowerCase();ki.getAutocomplete(String(Fe)).then(async Se=>{z.value=Se.data,await k(),setTimeout(()=>{fe.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450,te.value=localStorage.getItem("weilin_prompt_ui_auto_box_height")||350,V.value=z.value.length>0,j.value=0},50)})}catch(Fe){console.error("Autocomplete error:",Fe),V.value=!1}},Xi=J=>{V.value&&(J.key==="ArrowDown"?(J.preventDefault(),j.value=Math.min(j.value+1,z.value.length-1),Qr()):J.key==="ArrowUp"?(J.preventDefault(),j.value=Math.max(j.value-1,0),Qr()):J.key==="Tab"||J.key==="Enter"?(J.preventDefault(),Yr(j.value,null)):J.key==="Escape"&&(J.preventDefault(),Ts()))},Qr=()=>{Ge(()=>{if(q.value&&a.value){const J=a.value,B=q.value,xe=J.getBoundingClientRect(),$e=B.getBoundingClientRect(),Fe=$e.top<xe.top,Se=$e.bottom>xe.bottom;Fe?J.scrollTop=J.scrollTop+($e.top-xe.top):Se&&(J.scrollTop=J.scrollTop+($e.bottom-xe.bottom))}})},Zi=et(()=>{if(!d.value)return{left:r.value.left};const J=d.value.offsetWidth;fe.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450;const B=fe.value;let xe=r.value.left;return xe+B>J&&(xe=J-B),xe<0&&(xe=0),{left:xe}}),Yr=(J,B)=>{if(B&&(B.preventDefault(),B.stopPropagation()),!z.value[J])return;V.value=!1;const xe=s.value.selectionStart,$e=s.value.selectionEnd,Fe=c.value;let Se=z.value[J].text;localStorage.getItem("weilin_prompt_ui_comma_conversion")!=="false"&&(Se=Se.replace(/,/g,",")),localStorage.getItem("weilin_prompt_ui_period_conversion")!=="false"&&(Se=Se.replace(/。/g,".")),localStorage.getItem("weilin_prompt_ui_bracket_conversion")!=="false"&&(Se=Se.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")!=="false"&&(Se=Se.replace(/《/g,"<").replace(/》/g,">")),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"&&(Se=Se.replace(/_/g," "));let Pe=xe,De=$e;for(;Pe>0&&!/[,\s]/.test(Fe[Pe-1]);)Pe--;for(;!1;)De++;let Lt=Fe.substring(0,Pe)+Se+Fe.substring(De);Fe[De]&&!/[\,\s]/.test(Fe[De])&&(Lt=Fe.substring(0,Pe)+Se+", "+Fe.substring(De));const lt=Fe[De]&&!/[\,\s]/.test(Fe[De]),Ke=Pe+Se.length+(lt?2:0);c.value=Lt,oe.value=Lt,me(),Ge(()=>{s.value&&(s.value.selectionStart=Ke,s.value.selectionEnd=Ke)})},Ts=()=>{V.value=!1},Kr=J=>{if(J.length>0)try{const B=JSON.parse(J);if(c.value=B.prompt,oe.value=c.value,B.lora&&B.lora!=""&&(w.value=B.lora),B.temp_prompt&&B.temp_prompt!=""){const xe=B.temp_prompt;let $e=!1;xe.tokens&&xe.tokens.length>0&&xe.tokens!=""&&(f.value=xe.tokens,$e=!0),xe.lora&&xe.lora.length>0&&xe.lora!=""&&(w.value=xe.lora,$e=!0),!$e&&xe.length>0&&xe!=""&&(f.value=xe)}if(B.temp_lora&&B.temp_lora.length>0&&B.temp_lora!=""){const xe=B.temp_lora;w.value=xe}me()}catch{X({type:"warn",str:"promptBox.settings.errorPrompt"})}},Jn=b(null),eu=(J,B)=>{Jn.value=J,B.dataTransfer.effectAllowed="move"},tu=(J,B)=>{if(B.preventDefault(),Jn.value!==null&&Jn.value!==J){const xe=f.value[Jn.value],$e=[...f.value];$e.splice(Jn.value,1),$e.splice(J,0,xe),f.value=$e,Jn.value=J,Xn()}},Jr=(J,B)=>{B.preventDefault(),Jn.value=null,Xn()},Xn=()=>{c.value=f.value.length>0?f.value.reduce((J,B,xe)=>{var Lt,lt;if(B.isHidden)return J;if(B.text===`
`){const Ke=Mt(xe);return Ke!==-1&&f.value[Ke],J+B.text}if(J===""){let Ke=xe+1;for(;Ke<f.value.length&&((Lt=f.value[Ke])!=null&&Lt.isHidden);)Ke++;const Ht=Ke>=f.value.length,fn=Ke<f.value.length?f.value[Ke]:null,Gt=Ht||fn&&fn.text===`
`;return B.text+(Gt?",":"")}let $e=xe+1;for(;$e<f.value.length&&((lt=f.value[$e])!=null&&lt.isHidden);)$e++;const Fe=$e>=f.value.length,Se=$e<f.value.length?f.value[$e]:null,Pe=Se&&Se.text===`
`||Fe,De=Mt(xe);return De!==-1&&f.value[De].text===`
`?J+B.text+(Pe?",":""):J+", "+B.text+(Pe?",":"")},""):"",Me()},ue=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*")},re=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank")},ye=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_cloud_window"},"*")},Ye=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_danbooru_manager_window"},"*")},Dt=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},Mt=J=>{for(let B=J-1;B>=0;B--)if(!f.value[B].isHidden)return B;return-1},rt=J=>{if(J>=0&&J<f.value.length){if(f.value[J].text===`
`||f.value[J].text===" ")return;f.value[J].isHidden=!f.value[J].isHidden,f.value[J].isHidden?f.value[J].hiddenHint=n("promptBox.hiddenHint"):f.value[J].hiddenHint="",Xn()}},Pt=()=>{window.open("https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X","_blank")},Xr=async()=>{if(u.promptManager=="prompt_global")try{await dn.goRandomTemplate().then(J=>{J.code===200?(c.value=J.random_tags,Ge(()=>{me()})):X({type:"warn",str:J.info})}).catch(J=>{console.error(J),X({type:"warn",str:"message.networkError"})})}catch(J){X({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",J)}else window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"},"*")},Fn=async J=>{try{await dn.goRandomTemplatePath(J).then(B=>{B.code===200?(c.value=B.random_tags,Ge(()=>{me()})):X({type:"warn",str:B.info})}).catch(B=>{console.error(B),X({type:"warn",str:"message.networkError"})})}catch(B){X({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",B)}},nu=()=>{o.value.open(u.promptManager)};return t({setPromptText:Kr}),(J,B)=>{var xe,$e,Fe;return T(),C(Oe,null,[i("div",eS,[u.promptManager==="prompt"?(T(),wt(Ux,{key:0,"is-open":A.value,"selected-loras":w.value,onClose:we},null,8,["is-open","selected-loras"])):de("",!0),Ve(Zx,{ref_key:"mainLabelManagerRef",ref:ae,"selected-id":ie.value,onSelect:Te},null,8,["selected-id"]),i("div",{class:Ce(`${Qk}main-content`),style:ft({width:ve.value})},[i("div",tS,[i("div",nS,[i("button",{class:"language-switch-btn",onClick:Xe(Gi,["stop"]),ref_key:"langBtnRef",ref:$,title:m(n)("controls.language")},[B[13]||(B[13]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"translate-icon"},[i("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})],-1)),i("span",aS,h(m(n)("controls.language")),1)],8,oS),Ve(Dl,{name:"fade"},{default:pt(()=>[x.value?(T(),wt(u2,{key:0,ref_key:"languageSwitcherRef",ref:W,onClose:Hr},null,512)):de("",!0)]),_:1})]),i("div",sS,[Ve(_b,{title:m(n)("controls.switchTheme")},{default:pt(({isDark:Se})=>[i("span",rS,h(m(n)(Se?"controls.darkMode":"controls.lightMode")),1)]),_:1},8,["title"])]),i("div",lS,[i("button",{class:"settings-btn",onClick:he,title:m(n)("controls.settings")},[B[14]||(B[14]=i("svg",{class:"settings-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})],-1)),i("span",uS,h(m(n)("controls.settings")),1)],8,iS)]),i("div",cS,[i("button",{class:"tag-manager-btn",onClick:jr,title:m(n)("controls.tagManager")},[B[15]||(B[15]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon"},[i("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),i("span",fS,h(m(n)("controls.tagManager")),1)],8,dS)]),i("div",pS,[i("button",{class:"tag-manager-btn",onClick:Ye,title:m(n)("controls.danbooruManager")},[B[16]||(B[16]=i("svg",{class:"tag-icon",viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),i("span",mS,h(m(n)("controls.danbooruManager")),1)],8,gS)]),u.hasPromptLoraStack?(T(),C("div",hS,[i("button",{class:"tag-manager-btn",onClick:le,title:m(n)("controls.loraStack")},[B[17]||(B[17]=i("svg",{sxmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M902.5 485.1c-59-17.5-113.8-3.4-155 27.7V365.1c0-45.2-36.9-82.1-82.1-82.1H511.2c31.1-41.2 45.2-96 27.7-155C522.2 71.6 475 26.1 418 12 303.4-16.5 200.9 69.4 200.9 179.3c0 39.1 13.5 74.7 35.3 103.7H82.1C36.9 283 0 319.9 0 365.1v113.1c0 25.5 27.9 38.8 49.5 25.3 38.8-24.3 87.8-33.6 139.4-19.5 57 15.6 103.4 62.5 118.4 119.7 30.1 115.5-56.2 219.4-166.8 219.4-33.5 0-64.7-9.6-91.1-26.2C27.8 783.4 0 796.8 0 822.2v113.2c0 45.2 36.9 82.1 82.1 82.1h583.3c45.2 0 82.1-36.9 82.1-82.1V787.7c29 21.9 64.6 35.3 103.7 35.3 109.9 0 195.8-102.5 167.3-217.1-14.1-56.9-59.7-104.1-116-120.8z"})],-1)),i("span",_S,h(m(n)("controls.loraStack")),1)],8,vS)])):de("",!0),i("div",yS,[i("button",{class:"tag-manager-btn",onClick:Wr,title:m(n)("controls.loraManager")},[B[18]||(B[18]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M129 128h350v80H209v224h270v80H129V128zM129 895V576h768v319H129z m80-239v159h608V656H209zM730 356c19.882 0 36-16.118 36-36s-16.118-36-36-36-36 16.118-36 36 16.118 36 36 36z"}),i("path",{d:"M578.517 214.386a32.002 32.002 0 0 0-16.01 27.731l0.058 155.918a31.998 31.998 0 0 0 16 27.701l135.156 78.033a32.002 32.002 0 0 0 31.99 0.006l135.058-77.909a32.002 32.002 0 0 0 16.01-27.731l-0.058-155.918a32 32 0 0 0-16-27.701l-135.157-78.033a31.998 31.998 0 0 0-31.989-0.005l-135.058 77.908z m67.002 58.058l84.033-48.591 84.181 48.715 0.034 95.24-84.034 48.591-84.18-48.714-0.034-95.241z"})],-1)),i("span",wS,h(m(n)("controls.loraManager")),1)],8,bS)]),i("div",xS,[i("button",{class:"tag-manager-btn",onClick:Qi,title:m(n)("controls.history")},[B[19]||(B[19]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M653.7 85.83c-235.05 0-426.29 191.25-426.29 426.3s191.24 426.3 426.29 426.3c235.06 0 426.3-191.25 426.3-426.3S888.76 85.83 653.7 85.83z m0 779.98c-195.01 0-353.67-158.65-353.67-353.68S458.69 158.45 653.7 158.45c195.02 0 353.68 158.65 353.68 353.68S848.72 865.81 653.7 865.81z"}),i("path",{d:"M866.78 634.19L695.93 533.61V302.59c0-20.06-16.26-36.31-36.31-36.31s-36.31 16.26-36.31 36.31v253.66c0 17.06 11.8 31.26 27.66 35.16l178.98 105.36c17.28 10.17 39.54 4.41 49.71-12.87 10.17-17.28 4.4-39.54-12.88-49.71zM44.76 324.51h186.42c20.05 0 36.31-16.26 36.31-36.31s-16.26-36.31-36.31-36.31H44.76c-20.05 0-36.31 16.26-36.31 36.31s16.26 36.31 36.31 36.31zM231.18 703.25H44.76c-20.05 0-36.31 16.26-36.31 36.31s16.26 36.31 36.31 36.31h186.42c20.05 0 36.31-16.26 36.31-36.31s-16.25-36.31-36.31-36.31zM36.31 550.19h118.8c20.05 0 36.31-16.26 36.31-36.31s-16.26-36.31-36.31-36.31H36.31c-20.05 0-36.31 16.26-36.31 36.31 0 20.06 16.26 36.31 36.31 36.31z"})],-1)),i("span",SS,h(m(n)("controls.history")),1)],8,TS)]),i("div",kS,[i("button",{class:"tag-manager-btn",onClick:ue,title:m(n)("controls.aiChat")},[B[20]||(B[20]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"}),i("path",{d:"M6 14h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"})],-1)),i("span",ES,h(m(n)("controls.aiChat")),1)],8,CS)]),i("div",LS,[i("button",{class:"tag-manager-btn",onClick:re,title:m(n)("controls.github")},[B[21]||(B[21]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1)),i("span",AS,h(m(n)("controls.github")),1)],8,$S)]),i("div",IS,[i("button",{class:"tag-manager-btn",onClick:ye,title:m(n)("controls.shareCloudData")},[B[22]||(B[22]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})],-1)),i("span",OS,h(m(n)("controls.shareCloudData")),1)],8,MS)]),i("div",RS,[i("button",{class:"tag-manager-btn",onClick:Pt,title:m(n)("controls.tutorialVideo")},[B[23]||(B[23]=i("svg",{t:"1745234292993",class:"tag-icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1496",width:"128",height:"128"},[i("path",{d:"M204.288 63.488c-8.704 8.192-16.896 20.48-18.944 26.624-3.584 11.776 12.8 62.464 20.48 62.464S235.52 176.128 235.52 184.32c0 16.384-17.92 26.112-47.104 26.112-34.816 0-104.448 27.648-128.512 51.2-9.216 8.704-26.112 33.792-37.888 56.32L0 358.4v469.504l21.504 40.448c24.576 47.616 35.84 59.392 82.944 84.992l40.96 22.528h722.944l40.96-19.968c51.712-24.576 72.704-45.056 95.744-94.72l17.92-38.4v-231.424l0.512-231.424-17.92-36.352c-9.216-20.48-28.16-47.104-42.496-59.904-31.232-30.208-86.528-54.272-122.368-54.272-54.272 0-65.024-22.528-26.624-57.856 20.48-18.432 23.04-25.088 23.04-45.568 0-19.968-3.584-28.16-16.896-41.984-9.216-9.216-22.528-16.896-29.696-16.896-11.776 0-34.304 9.216-40.448 16.896-1.536 1.536-35.84 35.328-75.776 74.24l-73.216 71.168-83.456-0.512c-45.568 0-88.064-2.56-93.696-4.608-5.632-2.56-38.4-31.232-72.704-65.024C249.856 40.448 235.008 32.256 204.288 63.488z m652.8 262.656c5.12 0.512 19.968 9.216 31.744 20.48l21.504 19.968 1.536 217.088c1.024 197.12 0.512 218.112-8.704 236.032-14.336 27.136-34.816 40.448-65.536 41.984-14.336 0.512-173.568 0.512-353.28 0l-326.144-1.536-45.056-45.056V373.248l20.992-22.528c15.872-17.92 25.6-23.552 41.984-25.088 16.384-1.024 634.88-0.512 680.96 0.512z","p-id":"1497"}),i("path",{d:"M279.04 502.272c-20.48 22.016-20.992 25.088-20.992 66.56 0 39.936 1.024 44.544 17.92 64 29.184 33.28 55.808 32.256 84.48-2.56 11.264-12.8 12.8-22.016 13.312-64 0-47.104-0.512-48.64-19.968-68.096-27.136-27.648-47.616-26.112-74.752 4.096z m393.216-3.584c-18.944 18.944-19.968 20.992-19.968 69.12 0 47.616 0.512 49.664 18.432 67.072 24.576 23.552 35.84 26.624 58.368 13.824 29.184-16.896 39.936-43.52 36.864-90.624-2.56-35.328-4.608-41.984-22.016-59.904-25.088-25.6-45.568-25.6-71.68 0.512z","p-id":"1498"})],-1)),i("span",DS,h(m(n)("controls.tutorialVideo")),1)],8,NS)]),i("div",PS,[i("button",{class:"tag-manager-btn",onClick:Dt,title:m(n)("controls.sponsor")},[B[24]||(B[24]=i("svg",{t:"1745823985128",class:"tag-icon",viewBox:"0 0 1322 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},[i("path",{d:"M495.899049 634.906371c-17.304811 0-31.251971 13.947161-31.251971 31.251971S478.594238 697.410314 495.899049 697.410314c17.304811 0 31.251971-13.947161 31.251971-31.251972 0-17.304811-13.947161-31.251971-31.251971-31.251971zM790.855671 728.662285c-17.304811 0-31.251971 13.947161-31.251972 31.251971s13.947161 31.251971 31.251972 31.251972 31.251971-13.947161 31.251971-31.251972c0-17.04653-13.947161-30.993691-31.251971-31.251971z"}),i("path",{d:"M1262.99289 719.622459c-13.430599-8.264984-28.927445-13.430599-44.68257-14.980284 34.867902-84.974368 57.080047-196.293374-18.596215-306.837537-115.193217-168.657333-280.75118-256.73107-491.766556-260.863562-60.179416-1.291404-130.948343 1.549685-205.849762 4.649054-87.040614 3.35765-203.008673 8.006703-281.526023 1.549684 15.755126-8.523265 32.543375-16.788249 47.007098-23.761829 55.530362-27.119479 98.921529-48.04022 84.457807-85.232649-7.748423-21.695583-30.218848-33.059937-67.411277-34.09306C206.624604-1.755689 37.967271 43.443443 7.748423 119.636265c-17.04653 42.874605-19.887618 125.524447 152.902206 198.876182 71.027208 30.218848 271.969635 66.894715 349.453861 74.643138 17.563091 1.549685 34.867902 5.165615 51.397871 11.364353-17.821372 11.622634-35.901025 24.02011-54.238959 36.417586-31.768533-18.079653-83.941245-39.516955-122.683358-13.172318-14.463722 9.298107-23.503549 25.053233-24.02011 42.358044-0.516562 21.179022 12.397476 42.099763 26.861198 58.629731-57.080047 45.715694-103.312302 89.881703-119.84227 123.974762-18.337934 41.841482-25.828075 110.544163 8.523265 177.438879 43.391167 84.974368 138.955046 144.120661 284.625391 176.147474 190.352916 41.583202 354.619476 4.132492 463.355674-53.205835 60.437697-32.026814 103.570583-69.994085 124.233043-103.828864 6.457019 2.066246 12.914038 4.132492 19.629338 6.198738 9.298107 2.841088 18.596214 5.682177 27.37776 8.781546 28.669164 10.072949 60.695977 8.523265 85.232649-3.61593l1.291403-0.774843c17.821372-9.039826 31.510252-25.053233 37.708991-44.166009 15.238565-51.139589-29.444006-79.033911-56.563486-96.08044z m-811.776412-239.684541l-17.30481 12.655757c-5.165615-5.165615-9.814669-11.106072-13.430599-17.563091 6.7153-2.066246 18.337934 0.258281 30.735409 4.907334zM1262.99289 798.139808c-1.291404 3.874211-4.132492 6.97358-9.298107 9.814669-10.33123 5.165615-25.569795 5.423896-39.258675 0.774842-9.298107-3.35765-19.371057-6.457019-29.444006-9.556388-18.596214-5.682177-49.848186-15.238565-55.788643-22.470426-9.814669-12.914038-28.152602-15.755126-41.32492-5.940457s-15.755126 28.152602-5.940458 41.324921c3.615931 4.390773 7.490142 8.264984 12.139196 11.622634-44.940851 62.245662-242.267348 186.220424-521.468844 125.007885-125.782728-27.636041-210.498815-77.742507-244.850155-145.412065-24.794952-48.815063-19.112776-98.921529-7.231861-126.299289 34.09306-71.027208 280.75118-234.518925 438.30244-327.241716 13.947161-8.264984 18.596214-26.344637 10.33123-40.291798s-27.119479-19.629337-40.291797-10.33123c-12.655757 7.490142-55.788643 33.059937-111.060725 68.186119-18.596214-12.655757-50.881309-27.894322-102.537459-33.059936-81.874999-8.264984-270.936512-44.42429-332.149051-70.252366C139.471608 245.418993 40.033517 196.34565 61.987381 141.073568c5.165615-12.914038 29.185725-33.576498 81.100157-53.464116 35.384463-13.430599 72.318611-22.470426 109.769321-27.119479l-11.622634 5.682176c-35.384463 17.304811-73.868296 36.417586-99.954652 59.146293-1.807965-1.033123-3.615931-2.324527-5.165615-3.874211-10.847792-11.622634-29.185725-12.397476-41.06664-1.291404l-0.516562 0.516561c-11.880915 11.106072-12.139195 29.702287-1.033123 41.583202 10.589511 11.106072 26.086356 19.371057 45.715694 25.569795 0.774842 0.258281 1.291404 0.516562 2.066246 0.774842 68.702681 21.179022 190.611197 18.596214 362.367899 11.622634 74.126577-2.841088 144.120661-5.682177 202.492111-4.649054 193.710566 3.874211 339.122631 80.841876 444.75946 235.552049 64.828469 95.047318 41.583202 188.544951 4.390773 269.903388-4.649054-3.615931-9.039826-7.748423-12.655757-12.139195-10.33123-12.397476-28.669164-14.463722-41.324921-4.649054-12.655757 10.072949-14.722003 28.669164-4.649054 41.324921 5.940457 7.490142 36.675867 42.874605 74.643138 39.775236h2.066246c1.291404-0.258281 2.324527 0 3.615931-0.258281 25.828075-4.649054 42.358044-3.615931 57.596608 6.198738 20.40418 12.914038 30.218848 20.40418 28.410883 26.861199z"})],-1)),i("span",US,h(m(n)("controls.sponsor")),1)],8,FS)]),Ve(dp,{ref_key:"settingDialog",ref:S},null,512)]),i("div",{style:{position:"relative"},ref_key:"parentCneterBox",ref:d},[be(i("textarea",{"onUpdate:modelValue":B[0]||(B[0]=Se=>c.value=Se),class:"input-area",onInput:M,placeholder:m(n)("promptBox.placeholder"),onKeydown:Xi,onBlur:qr,rows:"6",ref_key:"inputAreaRef",ref:s,onMouseup:Ia,onResize:Ia},null,40,BS),[[Le,c.value]]),i("div",HS,h(l.value)+" tokens ",1),i("div",{class:"autocomplete-container",ref_key:"autocompleteContainerRef",ref:a,style:ft({top:`${r.value.top}px`,left:`${Zi.value.left}px`,display:V.value?"block":"none",width:`${fe.value}px`,maxHeight:`${te.value}px`})},[i("button",{class:"close-autocomplete-btn",onClick:Xe(Ts,["stop"])},"×"),(T(!0),C(Oe,null,We(z.value,(Se,Pe)=>(T(),C("div",{key:Pe,class:Ce(["autocomplete-item",{selected:Pe===j.value}]),onClick:Xe(De=>Yr(Pe,De),["stop"]),ref_for:!0,ref:De=>{De&&Pe===j.value&&(q.value=De)}},[i("span",WS,h(Se.text),1),i("span",VS,h(Se.desc),1)],10,jS))),128))],4)],512),i("div",zS,[be(i("input",{type:"text","onUpdate:modelValue":B[1]||(B[1]=Se=>I.value=Se),class:"prompt-input-translate-area-textarea",onKeyup:B[2]||(B[2]=tn(Se=>zr(),["enter"])),placeholder:m(n)("promptBox.translatePlaceholder")},null,40,qS),[[Le,I.value]]),i("button",{class:"translate-btn",onClick:pe,title:m(n)("promptBox.oneClickTranslate")},[B[25]||(B[25]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[i("path",{d:"M677.676657 294.6142c19.165116 57.5433 44.715939 102.2992 89.431879 147.0551 38.322239-38.3622 63.873063-89.5118 83.038178-147.0551h-172.470057z m-421.56861 319.685h166.076358l-83.038179-223.7795-83.038179 223.7795z","p-id":"2419"}),i("path",{d:"M894.854661 0.504H128.353929C58.095158 0.504 0.607803 58.0473 0.607803 128.378v767.244c0 70.3307 57.487355 127.874 127.746126 127.874h766.500733c70.258771 0 127.746126-57.5433 127.746126-127.874V128.378c0-70.3307-51.101647-127.874-127.746126-127.874zM581.867062 825.2913c-12.771416 12.7874-25.550824 12.7874-38.322239 12.7874-6.3937 0-19.165116 0-25.550824-6.3937-6.3937-6.3937-12.779408 0-12.779408-6.3937s-6.385708-12.7874-12.771415-25.5748c-6.3937-12.7874-6.3937-19.1811-12.779408-31.9685l-25.542832-70.3307H230.557224L205.0064 767.748c-12.771416 25.5748-19.165116 44.7559-25.550824 57.5433-6.3937 12.7874-19.165116 12.7874-38.322239 12.7874-12.779408 0-25.550824-6.3937-38.330231-12.7874-12.771416-12.7874-19.157124-19.1811-19.157124-31.9685 0-6.3937 0-12.7874 6.385708-25.5748 6.3937-12.7874 6.3937-19.1811 12.771416-31.9685l140.525533-358.0472c6.3937-12.7874 6.3937-25.5748 12.779408-38.3622 6.385708-12.7874 12.771416-25.5748 19.157124-31.9685 6.3937-6.3937 12.779408-19.1811 25.550823-25.5748 12.779408-6.3937 25.550824-6.3937 38.330232-6.3937 12.771416 0 25.542832 0 38.322239 6.3937 12.771416 6.3937 19.165116 12.7874 25.550824 25.5748 6.385708 6.3937 12.771416 19.1811 19.157124 31.9685 6.3937 12.7874 12.779408 25.5748 19.165115 44.7559l140.525534 351.6535c12.771416 25.5748 19.165116 44.7559 19.165116 57.5433-6.3937 6.3937-12.779408 19.1811-19.165116 31.9685zM933.176901 575.937c-70.258771-25.5748-121.360418-57.5433-166.076358-95.9055-44.707947 44.7559-102.195302 76.7244-172.462065 95.9055l-19.157124-31.9685c70.258771-19.1811 127.746126-44.7559 172.462066-89.5118C703.22748 409.7008 664.905241 352.1575 652.125833 288.2205h-63.873063v-25.5748h172.470058c-12.7874-19.1811-25.558816-44.7559-38.330232-63.937l19.157124-6.3937c12.779408 19.1811 31.944524 44.7559 44.715939 70.3307h159.682658v31.9685h-63.873063c-19.157124 63.937-51.093655 121.4803-89.423887 159.8425 44.715939 38.3622 95.809594 70.3307 166.076358 89.5118l-25.550824 31.9685z","p-id":"2420"})],-1)),i("span",QS,h(m(n)("promptBox.oneClickTranslate")),1)],8,GS),i("button",{class:"translate-btn random-tag-settings-btn",onClick:nu,title:m(n)("promptBox.randomTagSettings")},[B[26]||(B[26]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[i("path",{d:"M512 409.6c-56.32 0-102.4 46.08-102.4 102.4s46.08 102.4 102.4 102.4 102.4-46.08 102.4-102.4-46.08-102.4-102.4-102.4z m0 153.6c-28.16 0-51.2-23.04-51.2-51.2s23.04-51.2 51.2-51.2 51.2 23.04 51.2 51.2-23.04 51.2-51.2 51.2z"}),i("path",{d:"M512 204.8c-25.6 0-51.2 2.56-76.8 7.68l-15.36-61.44c-2.56-10.24-10.24-17.92-20.48-20.48-10.24-2.56-20.48 0-28.16 7.68l-76.8 76.8c-5.12 5.12-7.68 12.8-7.68 20.48s2.56 15.36 7.68 20.48l76.8 76.8c5.12 5.12 12.8 7.68 20.48 7.68 2.56 0 5.12 0 7.68-2.56 10.24-2.56 17.92-10.24 20.48-20.48l15.36-61.44c25.6-5.12 51.2-7.68 76.8-7.68 140.8 0 256 115.2 256 256s-115.2 256-256 256-256-115.2-256-256c0-25.6 2.56-51.2 7.68-76.8l61.44-15.36c10.24-2.56 17.92-10.24 20.48-20.48 2.56-10.24 0-20.48-7.68-28.16l-76.8-76.8c-5.12-5.12-12.8-7.68-20.48-7.68s-15.36 2.56-20.48 7.68l-76.8 76.8c-7.68 7.68-10.24 17.92-7.68 28.16 2.56 10.24 10.24 17.92 20.48 20.48l61.44 15.36c-5.12 25.6-7.68 51.2-7.68 76.8 0 168.96 138.24 307.2 307.2 307.2s307.2-138.24 307.2-307.2-138.24-307.2-307.2-307.2z"})],-1)),i("span",KS,h(m(n)("promptBox.randomTagSettings")),1)],8,YS),i("button",{class:"translate-btn random-tag-btn",onClick:Xr,title:m(n)("promptBox.oneClickRandomTag")},[B[27]||(B[27]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[i("path",{d:"M832 512c0-176-144-320-320-320S192 336 192 512s144 320 320 320 320-144 320-320z m-384 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m128-128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m128-128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m256 256c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-128 128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z"})],-1)),i("span",XS,h(m(n)("promptBox.oneClickRandomTag")),1)],8,JS)]),f.value.length>0?(T(),C("div",ZS,[(T(!0),C(Oe,null,We(f.value,(Se,Pe)=>(T(),C(Oe,{key:"tag-item-"+Pe},[i("div",{class:"token-item-box",draggable:!Se.isEditing,onDragstart:De=>eu(Pe,De),onDragover:Xe(De=>tu(Pe,De),["prevent"]),onDrop:De=>Jr(Pe,De),onDblclick:De=>rt(Pe),style:ft({backgroundColor:Se.color})},[Se.text===`
`?(T(),C("div",tk,[i("span",{class:"token-symbol",title:m(n)("promptBox.newline")},"↵",8,nk)])):Se.text===" "?(T(),C("div",{key:1,class:"token-item tab-token",onMouseenter:De=>Ne(Pe,De),onMouseleave:De=>tt()},[i("span",{class:"token-symbol",title:m(n)("promptBox.tab")},"→",8,ak)],40,ok)):Se.isLoraTag?(T(),C("div",{key:2,class:"lora-tag-icon",title:m(n)("promptBox.loraTag"),onMouseenter:De=>Ne(Pe,De),onMouseleave:De=>tt()},[B[28]||(B[28]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"15",height:"15"},[i("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"})],-1)),i("span",rk,h(Se.text),1)],40,sk)):Se.text&&!Se.isLoraTag?(T(),C("div",{key:3,class:Ce(["token-item",{punctuation:Se.isPunctuation}]),onMouseenter:De=>Ne(Pe,De),onMouseleave:De=>tt()},[!Se.isEditing||Se.isPunctuation?(T(),C("span",{key:0,onClick:De=>!Se.isPunctuation&&yn(Pe)},h(Se.text),9,ik)):Se.isPunctuation?de("",!0):(T(),C("input",{key:1,value:Se.text,onInput:De=>St(Pe,De),onBlur:De=>Zo(Pe),onKeyup:tn(De=>Zo(Pe),["enter"]),ref_for:!0,ref:De=>{De&&(g[Pe]=De)}},null,40,uk))],42,lk)):de("",!0),Se.text!==`
`&&Se.text!==" "&&!Se.isLoraTag?(T(),C("div",ck,[Z(Se.text)?(T(),C("div",{key:0,onClick:De=>Pn(Se.text,Se),class:"translate-button",title:m(n)("promptBox.translate")},[...B[29]||(B[29]=[i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[i("path",{d:"M677.676657 294.6142c19.165116 57.5433 44.715939 102.2992 89.431879 147.0551 38.322239-38.3622 63.873063-89.5118 83.038178-147.0551h-172.470057z m-421.56861 319.685h166.076358l-83.038179-223.7795-83.038179 223.7795z","p-id":"2419"}),i("path",{d:"M894.854661 0.504H128.353929C58.095158 0.504 0.607803 58.0473 0.607803 128.378v767.244c0 70.3307 57.487355 127.874 127.746126 127.874h766.500733c70.258771 0 127.746126-57.5433 127.746126-127.874V128.378c0-70.3307-51.101647-127.874-127.746126-127.874zM581.867062 825.2913c-12.771416 12.7874-25.550824 12.7874-38.322239 12.7874-6.3937 0-19.165116 0-25.550824-6.3937-6.3937-6.3937-12.779408 0-12.779408-6.3937s-6.385708-12.7874-12.771415-25.5748c-6.3937-12.7874-6.3937-19.1811-12.779408-31.9685l-25.542832-70.3307H230.557224L205.0064 767.748c-12.771416 25.5748-19.165116 44.7559-25.550824 57.5433-6.3937 12.7874-19.165116 12.7874-38.322239 12.7874-12.779408 0-25.550824-6.3937-38.330231-12.7874-12.771416-12.7874-19.157124-19.1811-19.157124-31.9685 0-6.3937 0-12.7874 6.385708-25.5748 6.3937-12.7874 6.3937-19.1811 12.771416-31.9685l140.525533-358.0472c6.3937-12.7874 6.3937-25.5748 12.779408-38.3622 6.385708-12.7874 12.771416-25.5748 19.157124-31.9685 6.3937-6.3937 12.779408-19.1811 25.550823-25.5748 12.779408-6.3937 25.550824-6.3937 38.330232-6.3937 12.771416 0 25.542832 0 38.322239 6.3937 12.771416 6.3937 19.165116 12.7874 25.550824 25.5748 6.385708 6.3937 12.771416 19.1811 19.157124 31.9685 6.3937 12.7874 12.779408 25.5748 19.165115 44.7559l140.525534 351.6535c12.771416 25.5748 19.165116 44.7559 19.165116 57.5433-6.3937 6.3937-12.779408 19.1811-19.165116 31.9685zM933.176901 575.937c-70.258771-25.5748-121.360418-57.5433-166.076358-95.9055-44.707947 44.7559-102.195302 76.7244-172.462065 95.9055l-19.157124-31.9685c70.258771-19.1811 127.746126-44.7559 172.462066-89.5118C703.22748 409.7008 664.905241 352.1575 652.125833 288.2205h-63.873063v-25.5748h172.470058c-12.7874-19.1811-25.558816-44.7559-38.330232-63.937l19.157124-6.3937c12.779408 19.1811 31.944524 44.7559 44.715939 70.3307h159.682658v31.9685h-63.873063c-19.157124 63.937-51.093655 121.4803-89.423887 159.8425 44.715939 38.3622 95.809594 70.3307 166.076358 89.5118l-25.550824 31.9685z","p-id":"2420"})],-1)])],8,dk)):de("",!0),i("span",fk,h(Se.translate?Se.translate:""),1)])):de("",!0)],44,ek),Se.isHidden?(T(),C("span",{key:0,class:"hidden-hint",title:Se.hiddenHint},[...B[30]||(B[30]=[i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},[i("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),i("circle",{cx:"12",cy:"12",r:"3"})],-1)])],8,pk)):de("",!0),Se.text===`
`?(T(),C("div",gk)):de("",!0)],64))),128))])):de("",!0),R.value?(T(),C("div",{key:1,class:"tag-tips-box",style:ft(H.value)},[i("div",mk,[i("p",{innerHTML:m(n)("promptBox.tagTips")},null,8,hk)])],4)):de("",!0),be(i("div",{class:"token-controls",style:ft(y.value),onMouseenter:B[12]||(B[12]=Se=>v.value=!0),onMouseleave:Ie},[(xe=f.value[p.value])!=null&&xe.isLoraTag?de("",!0):(T(),C("div",vk,[be(i("input",{type:"number","onUpdate:modelValue":B[3]||(B[3]=Se=>P.value=Se),step:"0.1",class:"weight-input",onChange:Y},null,544),[[Le,P.value]]),i("span",_k,h(m(n)("promptBox.weight")),1)])),($e=f.value[p.value])!=null&&$e.isLoraTag?(T(),C("div",yk,[i("div",bk,[be(i("input",{type:"number","onUpdate:modelValue":B[4]||(B[4]=Se=>ee.value=Se),step:"0.1",class:"weight-input",onChange:K},null,544),[[Le,ee.value]]),i("span",wk,h(m(n)("promptBox.modelWeight")),1)]),i("div",xk,[be(i("input",{type:"number","onUpdate:modelValue":B[5]||(B[5]=Se=>O.value=Se),step:"0.1",class:"weight-input",onChange:K},null,544),[[Le,O.value]]),i("span",Tk,h(m(n)("promptBox.textWeight")),1)])])):de("",!0),i("button",{onClick:Ee,class:"delete-btn",title:m(n)("promptBox.delete")},[...B[31]||(B[31]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,Sk),(Fe=f.value[p.value])!=null&&Fe.isLoraTag?de("",!0):(T(),C("div",kk,[i("div",Ck,[B[32]||(B[32]=i("div",{class:"bracket-btn"}," () ",-1)),i("div",Ek,[i("button",{class:"vertical-btn",onClick:B[6]||(B[6]=Se=>E("(")),title:m(n)("promptBox.addBracket")}," + ",8,Lk),i("button",{class:"vertical-btn",onClick:B[7]||(B[7]=Se=>L("(")),title:m(n)("promptBox.removeLayer")}," - ",8,$k)])]),i("div",Ak,[B[33]||(B[33]=i("div",{class:"bracket-btn"}," [] ",-1)),i("div",Ik,[i("button",{class:"vertical-btn",onClick:B[8]||(B[8]=Se=>E("[")),title:m(n)("promptBox.addBracket")}," + ",8,Mk),i("button",{class:"vertical-btn",onClick:B[9]||(B[9]=Se=>L("[")),title:m(n)("promptBox.removeLayer")}," - ",8,Ok)])]),i("div",Rk,[B[34]||(B[34]=i("div",{class:"bracket-btn"}," {} ",-1)),i("div",Nk,[i("button",{class:"vertical-btn",onClick:B[10]||(B[10]=Se=>E("{")),title:m(n)("promptBox.addBracket")}," + ",8,Dk),i("button",{class:"vertical-btn",onClick:B[11]||(B[11]=Se=>L("{")),title:m(n)("promptBox.removeLayer")}," - ",8,Pk)])])]))],36),[[or,p.value!==null&&f.value[p.value]]]),i("div",Fk,[i("div",{class:"tag-manager-header",onClick:Ki},[i("div",Uk,[B[35]||(B[35]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M129 128h350v80H209v224h270v80H129V128zM129 895V576h768v319H129z m80-239v159h608V656H209zM730 356c19.882 0 36-16.118 36-36s-16.118-36-36-36-36 16.118-36 36 16.118 36 36 36z"}),i("path",{d:"M578.517 214.386a32.002 32.002 0 0 0-16.01 27.731l0.058 155.918a31.998 31.998 0 0 0 16 27.701l135.156 78.033a32.002 32.002 0 0 0 31.99 0.006l135.058-77.909a32.002 32.002 0 0 0 16.01-27.731l-0.058-155.918a32 32 0 0 0-16-27.701l-135.157-78.033a31.998 31.998 0 0 0-31.989-0.005l-135.058 77.908z m67.002 58.058l84.033-48.591 84.181 48.715 0.034 95.24-84.034 48.591-84.18-48.714-0.034-95.241z"})],-1)),i("span",Bk,h(m(n)("controls.loraManager")),1)]),i("div",Hk,[(T(),C("svg",{class:Ce(["collapse-icon",{"is-collapsed":!Aa.value}]),viewBox:"0 0 24 24"},[...B[36]||(B[36]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),be(i("div",jk,[Ve(kg,{loraManager:"prompt_inner"})],512),[[or,Aa.value]])]),i("div",Wk,[i("div",{class:"tag-manager-header",onClick:Yi},[i("div",Vk,[B[37]||(B[37]=i("svg",{class:"tag-icon",viewBox:"0 0 24 24"},[i("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),i("span",zk,h(m(n)("controls.tagManager")),1)]),i("div",qk,[(T(),C("svg",{class:Ce(["collapse-icon",{"is-collapsed":!$a.value}]),viewBox:"0 0 24 24"},[...B[38]||(B[38]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),be(i("div",Gk,[Ve(hg)],512),[[or,$a.value]])])],6)]),Ve(WT,{ref_key:"randomSettingItem",ref:o},null,512)],64)}}},[["__scopeId","data-v-6959d7e9"]]),Kk={class:"container"},Jk={class:"tab-container"},Xk={key:0},Zk={class:"search-container"},eC=["placeholder"],tC=["title"],nC=["title","disabled"],oC=["title"],aC={class:"history-list"},sC={class:"action-buttons"},rC=["onClick","title"],lC=["onClick","title"],iC=["onClick","title"],uC=["value"],cC={key:1},dC={class:"search-container"},fC=["placeholder"],pC=["title"],gC=["title"],mC=["title","disabled"],hC=["title"],vC={class:"history-list"},_C={key:0,class:"favor-name"},yC={class:"action-buttons"},bC=["onClick","title"],wC=["onClick","title"],xC=["onClick","title"],TC=["value"],SC={key:2,class:"weilin-tools-dialog-overlay"},kC={class:"weilin-tools-dialog-header"},CC={class:"weilin-tools-dialog-body"},EC={class:"form-group"},LC=["placeholder"],$C={class:"form-group"},AC=["placeholder"],IC={class:"form-group"},MC={class:"color-picker"},OC={class:"color-controls"},RC={class:"alpha-control"},NC={class:"alpha-value"},DC={class:"weilin-tools-dialog-footer"},PC={key:3,class:"weilin-tools-dialog-overlay"},FC={class:"weilin-tools-dialog-header"},UC={class:"weilin-tools-dialog-body"},BC={class:"confirm-message"},HC={class:"weilin-tools-dialog-footer"},jC=vt({__name:"history_index",setup(e){const{t}=ht(),o=b(""),n=b([]),a=b([]),s=b([]),r=b([]),l=b("history"),u=b([]),d=b(!1),c=b(!1),f=b(!1),g=b({hex:"rgba(255, 123, 2, .4)",alpha:100}),p=b({name:"",tag:"",color:"rgba(255, 123, 2, .4)"}),v=b(!1),y=b(0),x=O=>JSON.parse(O).prompt,S=O=>({hex:"#FFFFFF",alpha:0}),$=O=>{const{hex:K,alpha:E}=S();g.value={hex:K,alpha:E}},W=()=>{f.value=!1,p.value={id:"",name:"",tag:"",backgroundColor:"transparent"},$(),d.value=!0},w=O=>{const K=O.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(K){const[,E,L,F,Z]=K,ce=`#${((1<<24)+(parseInt(E)<<16)+(parseInt(L)<<8)+parseInt(F)).toString(16).slice(1)}`,ge=Z?Math.round(parseFloat(Z)*100):100;return{hex:ce,alpha:ge}}return{hex:"#FF7B02",alpha:50}},A=O=>{f.value=!0,p.value={...O},g.value=w(O.color),d.value=!0},V=()=>{const O=oe(g.value.hex,g.value.alpha);p.value.color=O},z=()=>{d.value=!1,p.value={name:"",tag:"",color:"rgba(255, 123, 2, .4)"},f.value=!1},j=b(""),q=b(null),fe=et(()=>{if(!q.value)return"";switch(j.value){case"history":return t("history.deleteHistoryConfirm",{name:q.value.tag});case"favorite":return t("history.deleteFavoriteConfirm",{name:q.value.tag});case"deleteSelected":return t("history.confirmDeleteSelected");case"deleteSelectedFavorite":return t("history.confirmDeleteSelected");default:return""}}),te=O=>{j.value="history",q.value=O,c.value=!0},I=O=>{j.value="favorite",q.value=O,c.value=!0},R=()=>{v.value=!1,y.value=0,j.value="deleteSelected",q.value=u.value,c.value=!0},H=()=>{v.value=!1,y.value=0,j.value="deleteSelectedFavorite",q.value=u.value,c.value=!0},U=async()=>{try{switch(j.value){case"history":Dn.deleteHistory(q.value.id_index).then(O=>{le(),X({type:"success",str:"message.deleteSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})});break;case"favorite":Dn.deleteFavorite(q.value.id_index).then(O=>{we(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.deleteSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Dn.batchDeleteHistory(u.value).then(O=>{le(),X({type:"success",str:"message.deleteSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})});break;case"deleteSelectedFavorite":Dn.batchDeleteFavorite(q.value).then(O=>{we(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.deleteSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})});break}D()}catch{X({type:"warn",str:"message.networkError"})}},ne=O=>{O.target.checked?l.value==="history"?u.value=n.value.map(K=>K.id_index):u.value=s.value.map(K=>K.id_index):u.value=[]},oe=(O,K)=>{const E=parseInt(O.slice(1,3),16),L=parseInt(O.slice(3,5),16),F=parseInt(O.slice(5,7),16);return`rgba(${E}, ${L}, ${F}, ${K/100})`},D=()=>{c.value=!1,j.value="",q.value=null},N=()=>{if(!p.value.tag){X({type:"warn",str:"history.dialog.tag_placeholder"});return}f.value?Dn.editFavorite({id_index:p.value.id_index,name:p.value.name,tag:p.value.tag,color:p.value.color}).then(O=>{we(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.editSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})}):Dn.addFavorite({name:p.value.name,tag:p.value.tag,color:p.value.color}).then(O=>{we(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),X({type:"success",str:"message.addSuccess"})}).catch(O=>{X({type:"warn",str:"message.networkError"})}),z()},le=()=>{Dn.getHistory({}).then(O=>{n.value=O.data,a.value=n.value}).catch(O=>{X({type:"warn",str:"message.networkError"})})},we=()=>{Dn.getFavorite().then(O=>{s.value=O.data,r.value=s.value}).catch(O=>{X({type:"warn",str:"message.networkError"})})},ae=()=>{a.value=n.value.filter(O=>O.tag.includes(o.value))},ie=()=>{r.value=s.value.filter(O=>O.tag.includes(o.value))},ve=()=>{le()},Te=()=>{we()},he=O=>{Dn.addFavorite({tag:O.tag}).then(K=>{K.code===200?(window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),we(),X({type:"success",str:"message.addFavoriteSuccess"})):X({type:"success",str:"message.addFavoriteIsExist"})}).catch(K=>{X({type:"warn",str:"message.networkError"})})},P=O=>{window.postMessage({type:"weilin_prompt_ui_user_history_tag",tagText:O.tag},"*")},Y=()=>{u.value=[],v.value=!0},ee=()=>{u.value=[],v.value=!1,y.value=0};return gt(()=>{le(),we()}),(O,K)=>(T(),C("div",Kk,[i("h1",null,h(l.value==="history"?m(t)("history.title"):m(t)("history.favorites")),1),i("div",Jk,[i("button",{class:Ce([{active:l.value==="history"},"tab-button"]),onClick:K[0]||(K[0]=E=>l.value="history")},h(m(t)("history.history")),3),i("button",{class:Ce([{active:l.value==="favorites"},"tab-button"]),onClick:K[1]||(K[1]=E=>l.value="favorites")},h(m(t)("history.favorites")),3)]),l.value==="history"?(T(),C("div",Xk,[i("div",Zk,[i("button",{class:"refresh-btn",onClick:ve},[...K[14]||(K[14]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),be(i("input",{type:"text","onUpdate:modelValue":K[2]||(K[2]=E=>o.value=E),placeholder:m(t)("history.search_placeholder"),onInput:ae,class:"search-input"},null,40,eC),[[Le,o.value]]),v.value?be((T(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":K[3]||(K[3]=E=>y.value=E),value:1,class:"tag-checkbox",onChange:ne},null,544)),[[qt,y.value]]):de("",!0),v.value?de("",!0):(T(),C("button",{key:1,class:"bulk-delete-btn",onClick:Y,title:m(t)("history.bulk_delete")},[...K[15]||(K[15]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,tC)),v.value?(T(),C("button",{key:2,class:"bulk-delete-btn",onClick:R,title:m(t)("history.sure_delete"),disabled:u.value.length===0},[...K[16]||(K[16]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M392.533333 806.4L85.333333 503.466667l59.733334-59.733334 247.466666 247.466667L866.133333 213.333333l59.733334 59.733334L392.533333 806.4z"})],-1)])],8,nC)):de("",!0),v.value?(T(),C("button",{key:3,class:"bulk-delete-btn",onClick:ee,title:m(t)("history.cancel_delete")},[...K[17]||(K[17]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M794.8 794.8c-14 14-36.9 14-50.9 0L229.2 280.1c-14-14-14-36.9 0-50.9s36.9-14 50.9 0L794.9 744c13.9 13.9 13.9 36.8-0.1 50.8z"}),i("path",{d:"M794.8 229.2c14 14 14 36.9 0 50.9L280.1 794.8c-14 14-36.9 14-50.9 0s-14-36.9 0-50.9L744 229.1c13.9-13.9 36.8-13.9 50.8 0.1z"})],-1)])],8,oC)):de("",!0)]),i("ul",aC,[(T(!0),C(Oe,null,We(a.value,E=>(T(),C("li",{key:E.id_index,class:"history-item"},[i("span",null,h(x(E.tag)),1),i("div",sC,[i("button",{onClick:L=>he(E),class:"favorite-btn",title:m(t)("history.add_to_favorites")},[...K[18]||(K[18]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"favorite-icon"},[i("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"})],-1)])],8,rC),i("button",{onClick:L=>te(E),class:"delete-favorite-btn",title:m(t)("history.delete_history")},[...K[19]||(K[19]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,lC),i("button",{onClick:L=>P(E),class:"use-btn",title:m(t)("history.use_item")},[...K[20]||(K[20]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[i("path",{d:"M915.515273 142.819385 98.213046 458.199122c-46.058539 17.772838-44.90475 43.601756 2.348455 57.622994l197.477685 58.594874 80.292024 238.91085c10.51184 31.277988 37.972822 37.873693 61.462483 14.603752l103.584447-102.611545 204.475018 149.840224c26.565749 19.467242 53.878547 9.222132 61.049613-23.090076l149.210699-672.34491C965.264096 147.505054 946.218922 130.971848 915.515273 142.819385zM791.141174 294.834331l-348.61988 310.610267c-6.268679 5.58499-11.941557 16.652774-12.812263 24.846818l-15.390659 144.697741c-1.728128 16.24808-7.330491 16.918483-12.497501 1.344894l-67.457277-203.338603c-2.638691-7.954906 0.975968-17.705389 8.022355-21.931178l442.114555-265.181253C812.67481 268.984974 815.674251 272.975713 791.141174 294.834331z","p-id":"18085"})],-1)])],8,iC),v.value?be((T(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":K[4]||(K[4]=L=>u.value=L),value:E.id_index,class:"tag-checkbox"},null,8,uC)),[[qt,u.value]]):de("",!0)])]))),128))])])):(T(),C("div",cC,[i("div",dC,[i("button",{class:"refresh-btn",onClick:Te},[...K[21]||(K[21]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),be(i("input",{type:"text","onUpdate:modelValue":K[5]||(K[5]=E=>o.value=E),placeholder:m(t)("history.search_placeholder"),onInput:ie,class:"search-input"},null,40,fC),[[Le,o.value]]),v.value?be((T(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":K[6]||(K[6]=E=>y.value=E),value:1,class:"tag-checkbox",onChange:ne},null,544)),[[qt,y.value]]):de("",!0),i("button",{class:"add-his-btn",onClick:W,title:m(t)("history.add_new")},[...K[22]||(K[22]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"add-icon"},[i("path",{d:"M19 11h-6V5c0-.55-.45-1-1-1s-1 .45-1 1v6H5c-.55 0-1 .45-1 1s.45 1 1 1h6v6c0 .55.45 1 1 1s1-.45 1-1v-6h6c.55 0 1-.45 1-1s-.45-1-1-1z"})],-1)])],8,pC),v.value?de("",!0):(T(),C("button",{key:1,class:"bulk-delete-btn",onClick:Y,title:m(t)("history.bulk_delete")},[...K[23]||(K[23]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,gC)),v.value?(T(),C("button",{key:2,class:"bulk-delete-btn",onClick:H,title:m(t)("history.sure_delete"),disabled:u.value.length===0},[...K[24]||(K[24]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M392.533333 806.4L85.333333 503.466667l59.733334-59.733334 247.466666 247.466667L866.133333 213.333333l59.733334 59.733334L392.533333 806.4z"})],-1)])],8,mC)):de("",!0),v.value?(T(),C("button",{key:3,class:"bulk-delete-btn",onClick:ee,title:m(t)("history.cancel_delete")},[...K[25]||(K[25]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("path",{d:"M794.8 794.8c-14 14-36.9 14-50.9 0L229.2 280.1c-14-14-14-36.9 0-50.9s36.9-14 50.9 0L794.9 744c13.9 13.9 13.9 36.8-0.1 50.8z"}),i("path",{d:"M794.8 229.2c14 14 14 36.9 0 50.9L280.1 794.8c-14 14-36.9 14-50.9 0s-14-36.9 0-50.9L744 229.1c13.9-13.9 36.8-13.9 50.8 0.1z"})],-1)])],8,hC)):de("",!0)]),i("ul",vC,[(T(!0),C(Oe,null,We(r.value,E=>(T(),C("li",{key:E.id_index,class:"history-item"},[i("div",{class:"favor-name-box",style:ft({backgroundColor:E.color||"transparent"})},[E.name.length>0?(T(),C("span",_C,h(E.name),1)):de("",!0)],4),i("span",null,h(x(E.tag)),1),i("div",yC,[i("button",{onClick:L=>A(E),class:"delete-favorite-btn",title:m(t)("history.edit_favorite")},[...K[26]||(K[26]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("path",{d:"M200.59 626.48v129.5h129.5l381.93-381.93-129.5-129.5-381.93 381.93z m611.56-352.57c13.45-13.41 13.48-35.18 0.07-48.62l-0.07-0.07-80.81-80.81c-13.41-13.45-35.18-13.48-48.62-0.07l-0.07 0.07-63.19 63.19 129.5 129.5 63.19-63.19zM131.52 824.96h759.71c23.02 0 34.53 11.51 34.53 34.53 0 23.02-11.51 34.53-34.53 34.53H131.52c-23.02 0-34.53-11.51-34.53-34.53 0-23.02 11.51-34.53 34.53-34.53z","p-id":"2346"})],-1)])],8,bC),i("button",{onClick:L=>I(E),class:"delete-favorite-btn",title:m(t)("history.delete_favorite")},[...K[27]||(K[27]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,wC),i("button",{onClick:L=>P(E),class:"use-btn",title:m(t)("history.use_favorite")},[...K[28]||(K[28]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[i("path",{d:"M915.515273 142.819385 98.213046 458.199122c-46.058539 17.772838-44.90475 43.601756 2.348455 57.622994l197.477685 58.594874 80.292024 238.91085c10.51184 31.277988 37.972822 37.873693 61.462483 14.603752l103.584447-102.611545 204.475018 149.840224c26.565749 19.467242 53.878547 9.222132 61.049613-23.090076l149.210699-672.34491C965.264096 147.505054 946.218922 130.971848 915.515273 142.819385zM791.141174 294.834331l-348.61988 310.610267c-6.268679 5.58499-11.941557 16.652774-12.812263 24.846818l-15.390659 144.697741c-1.728128 16.24808-7.330491 16.918483-12.497501 1.344894l-67.457277-203.338603c-2.638691-7.954906 0.975968-17.705389 8.022355-21.931178l442.114555-265.181253C812.67481 268.984974 815.674251 272.975713 791.141174 294.834331z","p-id":"18085"})],-1)])],8,xC),v.value?be((T(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":K[7]||(K[7]=L=>u.value=L),value:E.id_index,class:"tag-checkbox"},null,8,TC)),[[qt,u.value]]):de("",!0)])]))),128))])])),d.value?(T(),C("div",SC,[i("div",{class:"weilin-tools-dialog-content",onMousedown:K[12]||(K[12]=Xe(()=>{},["stop"]))},[i("div",kC,[i("h2",null,h(f.value?m(t)("history.dialog.edit_tag"):m(t)("history.dialog.add_tag")),1),i("button",{class:"close-btn",onClick:z},"×")]),i("div",CC,[i("div",EC,[i("label",null,h(m(t)("history.dialog.name")),1),be(i("input",{type:"text","onUpdate:modelValue":K[8]||(K[8]=E=>p.value.name=E),placeholder:m(t)("history.dialog.name_placeholder")},null,8,LC),[[Le,p.value.name]])]),i("div",$C,[i("label",null,h(m(t)("history.dialog.tag")),1),be(i("textarea",{"onUpdate:modelValue":K[9]||(K[9]=E=>p.value.tag=E),placeholder:m(t)("history.dialog.tag_placeholder"),rows:"4"}," ",8,AC),[[Le,p.value.tag]])]),i("div",IC,[i("label",null,h(m(t)("history.dialog.background_color")),1),i("div",MC,[i("div",{class:"color-preview",style:ft({backgroundColor:O.previewColor})},null,4),i("div",OC,[be(i("input",{type:"color","onUpdate:modelValue":K[10]||(K[10]=E=>g.value.hex=E),onInput:V,class:"color-input"},null,544),[[Le,g.value.hex]]),i("div",RC,[be(i("input",{type:"range","onUpdate:modelValue":K[11]||(K[11]=E=>g.value.alpha=E),min:"0",max:"100",onInput:V,class:"alpha-slider"},null,544),[[Le,g.value.alpha,void 0,{number:!0}]]),i("span",NC,h(g.value.alpha)+"%",1)])])])])]),i("div",DC,[i("button",{class:"cancel-btn",onClick:z},h(m(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:N},h(m(t)("common.confirm")),1)])],32)])):de("",!0),c.value?(T(),C("div",PC,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:K[13]||(K[13]=Xe(()=>{},["stop"]))},[i("div",FC,[i("h2",null,h(m(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:D},"×")]),i("div",UC,[i("p",BC,h(fe.value),1)]),i("div",HC,[i("button",{class:"cancel-btn",onClick:D},h(m(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:U},h(m(t)("common.delete")),1)])],32)])):de("",!0)]))}},[["__scopeId","data-v-d9f9b5c3"]]),WC={key:0,class:"drop-zone"},VC={key:1,class:"preview-container"},zC=["srcdoc"],qC={class:"action-buttons"},$g="weilin_tools_",GC=vt({__name:"tranToWeb",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(""),r=b(null),l={tranToWeb:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},d=b((()=>{try{const j=localStorage.getItem(`${$g}tranToWebState`);if(j){const q=JSON.parse(j),fe={...l};return q.tranToWeb&&(fe.tranToWeb={...l.tranToWeb,...q.tranToWeb}),fe}}catch(j){console.error("Error loading window states:",j)}return{...l}})());it(d,j=>{try{localStorage.setItem(`${$g}tranToWebState`,JSON.stringify(j))}catch(q){console.error("Error saving window states:",q)}},{deep:!0}),gt(()=>{Be.registerWindow("tranToWeb")}),On(()=>{Be.unregisterWindow("tranToWeb")});const c=j=>{a.value=!1},f=(j,q)=>{d.value[j]&&(d.value[j].position={...q})},g=(j,q)=>{d.value[j]&&(d.value[j].size={...q})},p=()=>{a.value=!0,Be.setActiveWindow("tranToWeb")},v=j=>{j.dataTransfer.dropEffect="copy"},y=j=>{const q=j.dataTransfer.files[0];q&&q.type.startsWith("image/")&&S(q)},x=j=>{const q=j.clipboardData.items;for(let fe=0;fe<q.length;fe++)if(q[fe].type.startsWith("image/")){const te=q[fe].getAsFile();S(te);break}},S=j=>{const q=new FileReader;q.onload=fe=>{const te=fe.target.result,I=btoa(te);r.value=I,$()},q.readAsDataURL(j)},$=()=>{s.value=`
<!DOCTYPE html>
<html>
<head>
<title>WeiLin Comfyui Tools - Image to HTML</title>
<style>
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
</style>
<script>
window.onload = function() {
// 解密图片数据
try {
const encryptedData = "${r.value}";
const originalData = atob(encryptedData);
document.getElementById('decrypted-img').src = originalData;
document.getElementById('decrypted-img').style.display = 'block';
} catch(e) {
console.error('解密失败:', e);
document.body.innerHTML = '<p>图片解密失败</p>';
}
};
<\/script>
</head>
<body>
<img id="decrypted-img" style="display:none;" />
</body>
</html>
`},W=()=>{const j=new Blob([s.value],{type:"text/html"}),q=URL.createObjectURL(j),fe=document.createElement("a");fe.href=q,fe.download="image-to-html.html",document.body.appendChild(fe),fe.click(),document.body.removeChild(fe),URL.revokeObjectURL(q)},w=()=>{s.value="",r.value=null},A=b(null),V=()=>{s.value||A.value.click()},z=j=>{const q=j.target.files[0];q&&q.type.startsWith("image/")&&S(q)};return t({open:p}),(j,q)=>a.value?(T(),wt(xn,{key:0,title:m(n)("utils.tranToWeb"),position:d.value.tranToWeb.position,size:d.value.tranToWeb.size,"z-index":m(Be).getZIndex("tranToWeb"),"onUpdate:position":q[0]||(q[0]=fe=>f("tranToWeb",fe)),"onUpdate:size":q[1]||(q[1]=fe=>g("tranToWeb",fe)),onActive:q[2]||(q[2]=fe=>m(Be).setActiveWindow("tranToWeb")),onClose:q[3]||(q[3]=fe=>c())},{default:pt(()=>[i("div",{class:"utils_tran_web__content",onDragover:Xe(v,["prevent"]),onDrop:Xe(y,["prevent"]),onPaste:x,onClick:V},[s.value?(T(),C("div",VC,[i("iframe",{srcdoc:s.value,class:"html-preview"},null,8,zC),i("div",qC,[i("button",{onClick:W},h(m(n)("utils.downloadHtml")),1),i("button",{onClick:w},h(m(n)("utils.clear")),1)])])):(T(),C("div",WC,h(m(n)("utils.dropOrPasteImage")),1)),i("input",{type:"file",ref_key:"fileInput",ref:A,style:{display:"none"},accept:"image/*",onChange:z},null,544)],32)]),_:1},8,["title","position","size","z-index"])):de("",!0)}},[["__scopeId","data-v-aaebcad3"]]),QC=["onMouseenter","onMouseleave","onMousedown","onMouseup"],YC=vt({__name:"FloatingBall",setup(e){const{t}=ht(),o=b(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"))||1),n=b(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"))||66),a=b(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||n.value),s=b(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),r=b(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),l=b(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),u=b(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),d=b(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),c=b(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50);o.value<1&&(o.value=1,localStorage.setItem("weilin_prompt_ui_floatingBallCount",o.value)),n.value<5&&(n.value=66,localStorage.setItem("weilin_prompt_ui_floatingBallSize",n.value)),a.value<5&&(a.value=66,localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",a.value)),localStorage.getItem("weilin_prompt_ui_floatingBallCount")||localStorage.setItem("weilin_prompt_ui_floatingBallCount",o.value),localStorage.getItem("weilin_prompt_ui_floatingBallSize")||localStorage.setItem("weilin_prompt_ui_floatingBallSize",n.value),localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",n.value);const f=b([]),g=b([]),p=b([]),v=b([]),y=b(null),x=et(()=>v.value.map(te=>{const I={...te};return s.value==="custom"&&r.value?(I.backgroundImage=`url(${r.value})`,I.backgroundSize="contain",I.backgroundRepeat="no-repeat",I.backgroundPosition="center",I.imageRendering="optimizeQuality"):l.value==="gradient"?I.background=`linear-gradient(135deg, ${u.value}, ${d.value})`:I.background="transparent",I.borderRadius=`${c.value}%`,I}));for(let te=0;te<o.value;te++){p.value[te]=!1,g.value[te]=!1;const I=window.innerWidth,R=window.innerHeight,H=n.value,U=a.value,ne=10,oe=Math.floor(I/(H+ne)),D=Math.floor(te/oe);let le=20+te%oe*(H+ne),we=R-100-D*(U+ne);le=Math.max(0,le),le=Math.min(le,I-H),we=Math.max(0,we),we=Math.min(we,R-U),f.value[te]={x:le,y:we,width:H+"px",height:U+"px"},v.value[te]={left:`${f.value[te].x}px`,top:`${f.value[te].y}px`,width:`${H}px`,height:`${U}px`}}const S=(te,I)=>{te.target.closest(".weilin_prompt_ui_floating-ball")&&(g.value[I]=!0,document.addEventListener("mousemove",H=>$(H,I)),document.addEventListener("mouseup",H=>W(H,I)))},$=(te,I)=>{if(g.value[I]){const R=window.innerWidth,H=window.innerHeight,U=n.value,ne=a.value;let oe=te.clientX-U/2,D=te.clientY-ne/2;oe=Math.max(0,oe),oe=Math.min(oe,R-U),D=Math.max(0,D),D=Math.min(D,H-ne),f.value[I]={x:oe,y:D,width:U+"px",height:ne+"px"},v.value[I]={left:`${f.value[I].x}px`,top:`${f.value[I].y}px`,width:`${U}px`,height:`${ne}px`}}},W=(te,I)=>{g.value[I]=!1,document.removeEventListener("mousemove",R=>$(R,I)),document.removeEventListener("mouseup",R=>W(R,I))},w=()=>{},A=te=>{switch(te){case"item1":window.parent.postMessage({type:"weilin_prompt_ui_open_global_prompt_box"},"*");break;case"item2":window.parent.postMessage({type:"weilin_prompt_ui_open_global_tag_manager"},"*");break;case"item3":window.parent.postMessage({type:"weilin_prompt_ui_open_global_lora_manager"},"*");break;case"item4":window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*");break;case"item5":window.parent.postMessage({type:"weilin_prompt_ui_restore_window"},"*");break;case"item6":window.parent.postMessage({type:"weilin_prompt_ui_open_node_list_window"},"*");break;case"item7":z();break;case"item8":y.value.open();break}},V=b(),z=()=>{V.value.open()},j=te=>{if(te.data.type==="weilin_prompt_ui_floating_ball_setting"){o.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"))||1,n.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"))||66,a.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize"))||n.value,s.value=localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default",r.value=localStorage.getItem("weilin_prompt_ui_customSkinUrl")||"",l.value=localStorage.getItem("weilin_prompt_ui_bgType")||"gradient",u.value=localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb",d.value=localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc",c.value=localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50,p.value=[],g.value=[],f.value=[],v.value=[];for(let I=0;I<o.value;I++){p.value[I]=!1,g.value[I]=!1;const R=window.innerWidth,H=window.innerHeight,U=n.value,ne=a.value,oe=10,D=Math.floor(R/(U+oe)),N=Math.floor(I/D);let we=20+I%D*(U+oe),ae=H-100-N*(ne+oe);we=Math.max(0,we),we=Math.min(we,R-U),ae=Math.max(0,ae),ae=Math.min(ae,H-ne),f.value[I]={x:we,y:ae,width:U+"px",height:ne+"px"},v.value[I]={left:`${f.value[I].x}px`,top:`${f.value[I].y}px`,width:`${U}px`,height:`${ne}px`,...s.value==="custom"&&r.value?{backgroundImage:`url(${r.value})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:l.value==="gradient"?{background:`linear-gradient(135deg, ${u.value}, ${d.value})`}:{background:"transparent"},borderRadius:`${c.value}%`}}}},q=te=>{p.value[te]=!0},fe=te=>{p.value[te]=!1};return gt(()=>{window.addEventListener("message",j)}),On(()=>{window.removeEventListener("message",j),document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",W)}),(te,I)=>(T(),C(Oe,null,[(T(!0),C(Oe,null,We(o.value,R=>(T(),C("div",{class:"weilin_prompt_ui_floating-ball",style:ft(x.value[R-1]),onMouseenter:H=>q(R-1),onMouseleave:H=>fe(R-1),onMousedown:H=>S(H,R-1),onMouseup:H=>W(H,R-1),key:"floating-ball-"+R},[i("div",{class:"weilin_prompt_ui_ball-content",onClick:w},h(s.value==="default"?"WeiLin":""),1),p.value[R-1]?(T(),C("div",{key:0,class:"weilin_prompt_ui_menu-container",onMousedown:I[8]||(I[8]=Xe(()=>{},["stop"]))},[i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[0]||(I[0]=H=>A("item1"))},h(m(t)("floatingBall.promptBox")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[1]||(I[1]=H=>A("item2"))},h(m(t)("floatingBall.tagManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[2]||(I[2]=H=>A("item3"))},h(m(t)("floatingBall.loraManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[3]||(I[3]=H=>A("item4"))},h(m(t)("floatingBall.aiWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[4]||(I[4]=H=>A("item6"))},h(m(t)("floatingBall.openNodeListWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[5]||(I[5]=H=>A("item7"))},h(m(t)("floatingBall.tranToWeb")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[6]||(I[6]=H=>A("item8"))},h(m(t)("floatingBall.openSetting")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:I[7]||(I[7]=H=>A("item5"))},h(m(t)("floatingBall.restoreWindow")),1)],32)):de("",!0)],44,QC))),128)),Ve(GC,{ref_key:"tranToWebRef",ref:V},null,512),Ve(dp,{ref_key:"settingDialog",ref:y},null,512)],64))}},[["__scopeId","data-v-c4edc822"]]),KC={class:"ai-chat-window"},JC={class:"history-sidebar"},XC={class:"history-list"},ZC=["onClick"],eE={key:0},tE=["onKeyup","onBlur"],nE={class:"item-actions"},oE=["onClick"],aE=["onClick"],sE={class:"chat-main"},rE={class:"message-list"},lE={class:"message-content"},iE={key:0,class:"message assistant"},uE={class:"message-content"},cE={class:"input-area"},dE=["placeholder","onKeydown"],fE=["disabled"],pE=vt({__name:"ai_window",setup(e){const{t}=ht(),o=b([]),n=b(-1),a=b(""),s=b(!1),r=b({}),l=b(!1),u=b(""),d=A=>{var V;o.value[A]&&(l.value=!0,u.value=((V=o.value[A])==null?void 0:V.title)||`对话 ${A+1}`,n.value=A)},c=A=>{o.value[A]&&(u.value.trim()&&(o.value[A].title=u.value.trim(),S()),l.value=!1)},f=()=>{l.value=!1},g=()=>{hs.getOpenAiSetting().then(A=>{r.value=A.data}).catch(A=>{X({type:"warn",str:"message.networkError"})})};gt(()=>{g()});const p=et(()=>o.value[n.value]||{messages:[]}),v=A=>{n.value=A},y=()=>{s.value=!0;const A={title:`对话 ${o.value.length+1}`,messages:[],createdAt:new Date().toISOString()};return o.value.push(A),n.value=o.value.length-1,S(),s.value=!1,A},x=()=>{const A=localStorage.getItem("aiChatHistory");A&&(o.value=JSON.parse(A))},S=()=>{localStorage.setItem("aiChatHistory",JSON.stringify(o.value))};gt(()=>{g(),x()});const $=async()=>{if(!a.value.trim()||s.value)return;(o.value.length===0||n.value===-1)&&y();const A={role:"user",content:a.value,timestamp:new Date().toISOString()};p.value.messages.push(A),S(),a.value="";const V={role:"assistant",content:"",timestamp:new Date().toISOString()};p.value.messages.push(V),S(),s.value=!0;try{await w({messages:p.value.messages},z=>{const j=p.value.messages[p.value.messages.length-1];j.content+=z.content,S()},z=>{console.error("Error:",z);const j=p.value.messages[p.value.messages.length-1];j.content="抱歉,出错了,请稍后再试。",S()},()=>{s.value=!1,S()})}catch(z){console.error("Error:",z),s.value=!1;const j=p.value.messages[p.value.messages.length-1];j.content="请求失败,请检查网络连接。",S()}},W=A=>{o.value.splice(A,1),n.value===A&&(n.value=Math.max(0,A-1)),S()},w=async(A,V,z,j)=>{var q,fe;try{const te=await fetch(r.value.base_url+"/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r.value.api_key}`},body:JSON.stringify({model:r.value.model,messages:A.messages,stream:!0})});if(!te.ok)throw new Error(`HTTP error! status: ${te.status}`);const I=te.body.getReader(),R=new TextDecoder;let H="";for(;;){const{done:U,value:ne}=await I.read();if(U){j();break}H+=R.decode(ne,{stream:!0});const oe=H.split(`
`);H=oe.pop();for(const D of oe)if(D.trim()!==""){if(D==="data: [DONE]"){j();return}try{const N=D.replace(/^data: /,""),we=((fe=(q=JSON.parse(N).choices[0])==null?void 0:q.delta)==null?void 0:fe.content)||"";we&&V({content:we})}catch{console.error("Failed to parse message:",D)}}}}catch(te){z(te)}};return(A,V)=>(T(),C("div",KC,[i("div",JC,[i("button",{class:"new-chat-btn",onClick:y},h(m(t)("aiWindow.newChat")),1),i("div",XC,[(T(!0),C(Oe,null,We(o.value,(z,j)=>(T(),C("div",{key:j,class:Ce(["history-item",{active:n.value===j}]),onClick:q=>v(j)},[!l.value||n.value!==j?(T(),C("span",eE,h((z==null?void 0:z.title)||m(t)("aiWindow.chatName")+` ${j+1}`),1)):be((T(),C("input",{key:1,"onUpdate:modelValue":V[0]||(V[0]=q=>u.value=q),onKeyup:[tn(q=>c(j),["enter"]),tn(f,["esc"])],onBlur:q=>c(j),class:"rename-input"},null,40,tE)),[[Le,u.value]]),i("div",nE,[i("button",{class:"rename-btn",onClick:Xe(q=>d(j),["stop"])},"✎",8,oE),l.value?de("",!0):(T(),C("button",{key:0,class:"delete-btn",onClick:Xe(q=>W(j),["stop"])},"×",8,aE))])],10,ZC))),128))])]),i("div",sE,[i("div",rE,[(T(!0),C(Oe,null,We(p.value.messages,(z,j)=>(T(),C("div",{key:j,class:Ce(["message",z.role])},[i("div",lE,[i("pre",null,h(z.content),1)])],2))),128)),s.value?(T(),C("div",iE,[i("div",uE,[i("pre",null,h(m(t)("aiWindow.thinking")),1)])])):de("",!0)]),i("div",cE,[be(i("textarea",{class:"ai-chat-textarea","onUpdate:modelValue":V[1]||(V[1]=z=>a.value=z),placeholder:m(t)("aiWindow.inputMessage"),onKeydown:tn(Xe($,["exact","prevent"]),["enter"])},null,40,dE),[[Le,a.value]]),i("button",{class:"ai-chat-btn",onClick:$,disabled:s.value},h(m(t)("aiWindow.send")),9,fE)])])]))}},[["__scopeId","data-v-0cea2906"]]),gE={class:"lora-info"},mE={class:"lora-header"},hE=["title"],vE={class:"lora-weights"},_E={class:"weight-item"},yE=["title"],bE={class:"weight-item"},wE={class:"center-box"},xE=["onClick"],Fr="weilin_prompt_ui_",TE=vt({__name:"index",setup(e){const{t}=ht(),o=b([]);window.addEventListener("message",a=>{a.data.type==="weilin_prompt_ui_update_node_list_info"&&(o.value=a.data.nodeList)});const n=a=>{window.postMessage({type:"weilin_prompt_ui_prompt_open_node_wit_seed",seed:a},"*")};return gt(()=>{window.postMessage({type:"weilin_prompt_ui_prompt_get_node_list_info"},"*")}),(a,s)=>(T(),C("div",{class:Ce(`${Fr}lora-stack`)},[i("div",{class:Ce(`${Fr}lora-content`)},[i("div",{class:Ce(`${Fr}lora-body`)},[i("div",{class:Ce(`${Fr}lora-list`)},[(T(!0),C(Oe,null,We(o.value,r=>(T(),C("div",{key:r.id,class:"lora-item"},[i("div",gE,[i("div",mE,[i("span",{class:"lora-name",title:r.title},"#"+h(r.id)+" - "+h(r.title),9,hE)]),i("div",vE,[i("div",_E,[i("div",{class:"text-label",title:r.text},h(r.text),9,yE)]),i("div",bE,[i("div",wE,[i("button",{onClick:l=>n(r.seed),class:"open-button"},h(m(t)("nodeListWindow.openPromptUI")),9,xE)])])])])]))),128))],2)],2)],2)],2))}},[["__scopeId","data-v-0c15a742"]]),Vi={getTreeFromCloud:async e=>await Ae({url:"/cloud/get/tree",method:"post",data:{path:e}}),getLocalInstallPackage:async()=>await Ae({url:"/cloud/get/local/package",method:"post",data:{}}),installSelectPackage:async(e,t)=>await Ae({url:"/cloud/download/file",method:"post",timeout:0,data:{paths:t,path:e}})},SE={class:"cloud-manager"},kE={class:"toolbar"},CE={class:"current-path"},EE={class:"file-list"},LE={class:"file-info"},$E={class:"file-name"},AE={class:"file-type"},IE={class:"file-actions"},ME=["onClick"],OE={key:1,class:"install-container"},RE={key:0,class:"installed-badge"},NE=["onClick","disabled"],DE=vt({__name:"index",setup(e){const{t}=ht(),o=b([]),n=b("tags"),a=b("tags"),s=b([]),r=async y=>{try{const x=await Vi.getTreeFromCloud(y);o.value=x.data}catch(x){console.error("获取文件树失败:",x),X({type:"warn",str:"message.networkError"})}},l=async()=>{try{const y=await Vi.getLocalInstallPackage();s.value=y.data||[]}catch(y){console.error("获取已安装包列表失败:",y),X({type:"warn",str:"message.networkError"})}},u=y=>s.value.some(x=>x===y),d=async y=>{try{const x=o.value.find(S=>S.path===y);x&&(x.isInstalling=!0,await Vi.installSelectPackage(a.value,[y]).then(()=>{l(),X({type:"success",str:"message.installPackageSuccess"})}))}catch(x){console.error("安装包失败:",x),X({type:"warn",str:"message.installPackageFail"})}finally{const x=o.value.find(S=>S.path===y);x&&(x.isInstalling=!1)}},c=()=>{const y=n.value.split("/");y.length>1&&(n.value=y.slice(0,-1).join("/"),r(n.value))},f=()=>{r(n.value),l()},g=y=>{n.value=y,r(y)},p=()=>{a.value="tags",n.value="tags",r(n.value)},v=()=>{a.value="danbooru",n.value="danbooru",r(n.value)};return gt(()=>{r(n.value),l()}),(y,x)=>(T(),C("div",SE,[i("div",kE,[i("button",{class:"refresh-btn",onClick:f},[...x[0]||(x[0]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),i("button",{class:"database-btn",onClick:p},[x[1]||(x[1]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),i("span",null,h(m(t)("cloudWindow.tagDatabase")),1)]),i("button",{class:"database-btn",onClick:v},[x[2]||(x[2]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4v4z"})],-1)),i("span",null,h(m(t)("cloudWindow.danbooruDatabase")),1)]),i("div",CE,[i("span",null,h(m(t)("cloudWindow.currentPath"))+": "+h(a.value=="tags"?m(t)("cloudWindow.tagDatabase"):m(t)("cloudWindow.danbooruDatabase")),1)])]),i("div",EE,[n.value!=="tags"&&n.value!=="danbooru"?(T(),C("button",{key:0,class:"back-btn",onClick:c},[x[3]||(x[3]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),qe(" "+h(m(t)("cloudWindow.back")),1)])):de("",!0),(T(!0),C(Oe,null,We(o.value,S=>(T(),C("div",{key:S.path,class:"file-item"},[i("div",LE,[i("span",$E,h(S.name),1),i("span",AE,h(S.type=="dir"?"文件夹":S.type=="file"?"文件":"其它未知文件"),1)]),i("div",IE,[S.type==="dir"?(T(),C("button",{key:0,onClick:$=>g(S.path),class:"open-btn"},h(m(t)("cloudWindow.open")),9,ME)):S.type==="file"?(T(),C("div",OE,[u(S.path)?(T(),C("span",RE,h(m(t)("cloudWindow.installed")),1)):(T(),C("button",{key:1,onClick:$=>d(S.path),class:"install-btn",disabled:S.isInstalling},h(S.isInstalling?m(t)("cloudWindow.installing"):m(t)("cloudWindow.install")),9,NE))])):de("",!0)])]))),128))])]))}},[["__scopeId","data-v-508c00b0"]]),PE={class:"header-actions"},FE=["title"],UE=["onMouseover","onDragstart","onDrop"],BE={class:"lora-info"},HE={class:"lora-header"},jE=["title"],WE={class:"lora-actions"},VE=["onClick","title"],zE=["onClick","title"],qE={class:"lora-weights-row"},GE={class:"weight-item-col"},QE=["onUpdate:modelValue"],YE={class:"weight-item-col"},KE=["onUpdate:modelValue"],JE={class:"switch-item-col"},XE={class:"switch"},ZE=["checked","onChange"],ka="weilin_prompt_ui_",eL=vt({__name:"lora_stack",setup(e,{expose:t}){const{t:o}=ht(),n=b([]),a=b(""),s=b(!1),r=b(""),l=b(100),u=b(0),d=b(),c=b(!1),f=b(!1),g=b(),p=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora_stack",seed:a.value},"*")},v=I=>{I.hidden=!I.hidden},y=(I,R)=>{if(f.value=!0,r.value===I&&s.value)return;const U=R.currentTarget.getBoundingClientRect();let oe={left:U.left-450-10,top:U.top};oe.left<10&&(oe.left=U.right+10),oe.top=Math.max(10,Math.min(oe.top,window.innerHeight-310)),l.value=oe.left,u.value=oe.top,s.value=!0,r.value=I,Ge(()=>{g.value.refresh()})},x=()=>{f.value=!1,setTimeout(()=>{!c.value&&!f.value&&(s.value=!1,r.value="",c.value=!1)},200)},S=()=>{c.value=!0,f.value=!0},$=()=>{s.value=!1,r.value="",c.value=!1},W=I=>{n.value.find(R=>R.name===I.name)||n.value.push({name:I.name,weight:1,text_encoder_weight:1,...I})},w=I=>{const R=n.value.findIndex(H=>H.name===I.name);R>-1&&n.value.splice(R,1)},A=b(),V=I=>{A.value.open({name:I.lora})};window.addEventListener("message",I=>{I.data.type==="weilin_prompt_ui_selectLora_stack_"+a.value&&W(I.data.lora)});const z=(I,R)=>{if(a.value=R,I.length>0)try{const H=JSON.parse(I);if(H.lora&&H.lora!=""&&(n.value=H.lora),H.temp_lora&&H.temp_lora.length>0&&H.temp_lora!=""){const U=H.temp_lora;n.value=U}}catch{X({type:"warn",str:"promptBox.settings.errorPrompt"})}};it(n,I=>{j()},{deep:!0});const j=()=>{if(n.value.length>0){const I=n.value.filter(U=>!U.hidden);let R={lora:"",temp_lora:n.value};I.length>0&&(R.lora=I);const H=JSON.stringify(R);window.postMessage({type:"weilin_prompt_ui_prompt_finish_lora_stack_"+a.value,data:H},"*")}else{const R=JSON.stringify({lora:"",temp_lora:""});window.postMessage({type:"weilin_prompt_ui_prompt_finish_lora_stack_"+a.value,data:R},"*")}},q=b(null),fe=I=>{q.value=I},te=I=>{if(q.value===null||q.value===I)return;const R=n.value.splice(q.value,1)[0];n.value.splice(I,0,R),q.value=null,j()};return t({initLoraStack:z}),(I,R)=>(T(),C("div",{class:Ce(`${ka}lora-stack`)},[i("div",{class:Ce(`${ka}lora-content`)},[i("div",{class:Ce(`${ka}lora-header`)},[i("div",PE,[i("button",{class:Ce(`${ka}add-btn`),onClick:p,title:m(o)("controls.addLora")},[...R[1]||(R[1]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,FE)])],2),i("div",{class:Ce(`${ka}lora-body`)},[i("div",{class:Ce(`${ka}lora-list`)},[(T(!0),C(Oe,null,We(n.value,(H,U)=>(T(),C("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:d,key:H.name,class:Ce(["lora-item",{"hidden-lora":H.hidden}]),onMouseover:ne=>y(H.lora,ne),onMouseleave:x,draggable:"true",onDragstart:ne=>fe(U),onDragover:R[0]||(R[0]=Xe(()=>{},["prevent"])),onDrop:ne=>te(U)},[i("div",BE,[i("div",HE,[i("span",{class:"lora-name",title:H.name},h(H.name),9,jE),i("div",WE,[i("button",{class:"look-on-btn",onClick:ne=>V(H),title:m(o)("controls.lookOnLora")},[...R[2]||(R[2]=[i("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[i("path",{d:"M576.5 930.2H163.1c-52.9 0-96-43.1-96-96v-672c0-52.9 43.1-96 96-96h672c52.9 0 96 43.1 96 96V577c0 17.7-14.3 32-32 32s-32-14.3-32-32V162.2c0-17.6-14.4-32-32-32h-672c-17.6 0-32 14.4-32 32v672c0 17.6 14.4 32 32 32h413.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z","p-id":"3466"}),i("path",{d:"M692.4 322.3H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h446.7c17.7 0 32 14.3 32 32s-14.3 32-32 32zM388.5 530.2H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.6-14.3 32-31.9 32zM388.5 738H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.7-14.3 32-31.9 32z","p-id":"3467"}),i("path",{d:"M624.1 792.5c-94.8 0-172-77.2-172-172s77.2-172 172-172 172 77.2 172 172-77.1 172-172 172z m0-280c-59.6 0-108 48.4-108 108s48.4 108 108 108 108-48.4 108-108-48.4-108-108-108z","p-id":"3468"}),i("path",{d:"M820.8 864.2L710.5 753.9c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L866 818.9c12.5 12.5 12.5 32.8 0 45.3s-32.7 12.5-45.2 0z","p-id":"3469"})],-1)])],8,VE),i("button",{class:"remove-btn",onClick:ne=>w(H),title:m(o)("controls.removeLora")},[...R[3]||(R[3]=[i("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[i("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,zE)])]),i("div",qE,[i("div",GE,[i("label",null,h(m(o)("loraManager.modelWeight")),1),be(i("input",{type:"number","onUpdate:modelValue":ne=>H.weight=ne,class:"lora-weight",step:"0.1"},null,8,QE),[[Le,H.weight]])]),i("div",YE,[i("label",null,h(m(o)("loraManager.textEncoderWeight")),1),be(i("input",{type:"number","onUpdate:modelValue":ne=>H.text_encoder_weight=ne,class:"lora-weight",step:"0.1"},null,8,KE),[[Le,H.text_encoder_weight]])]),i("div",JE,[i("label",null,h(H.hidden?m(o)("lora.hideLora"):m(o)("lora.showLora")),1),i("label",XE,[i("input",{type:"checkbox",checked:!H.hidden,onChange:ne=>v(H)},null,40,ZE),R[4]||(R[4]=i("span",{class:"slider"},null,-1))])])])])],42,UE))),128))],2)],2)],2),Ve(Dr,{ref_key:"loraDetailLoraStackRef",ref:A},null,512),s.value?(T(),wt(ji,{key:0,ref_key:"loraCardItem",ref:g,fileNmae:r.value,paddingLeft:l.value,paddingTop:u.value,onCardLeave:$,onCardenter:S},null,8,["fileNmae","paddingLeft","paddingTop"])):de("",!0)],2))}},[["__scopeId","data-v-0949451e"]]),Ca={searchDanbooru:async(e="",t=1,o=100)=>await Ae({url:"/danbooru/get_tags",method:"post",data:{search:e,page:t,limit:o}}),addDanbooruTag:async e=>await Ae({url:"/danbooru/add_tag",method:"post",data:e}),updateDanbooruTag:async e=>await Ae({url:"/danbooru/update_tag",method:"post",timeout:0,data:e}),deleteDanbooruTag:async e=>await Ae({url:"/danbooru/delete_tag",method:"post",timeout:0,data:{id:e}}),batchDeleteDanbooruTags:async e=>await Ae({url:"/danbooru/batch_delete_tag",method:"post",timeout:0,data:{values:e}}),runSQLToServer:async e=>await Ae({url:"/danbooru/run_sql_text",method:"post",timeout:0,data:{sql:e}})},tL={key:0,class:"loading-overlay"},nL={class:"settings-content"},oL={style:{"margin-bottom":"16px"}},aL=["placeholder"],sL={style:{"margin-bottom":"16px"}},rL=["placeholder"],lL=["placeholder"],iL=["placeholder"],uL={class:"data-container"},cL={key:0},dL={key:0},fL={class:"tag-group-container"},pL={key:0},gL={key:1},mL={style:{display:"flex","align-items":"center"}},hL={key:0},vL=["placeholder"],_L=["placeholder"],yL=["placeholder"],bL=["placeholder"],wL=["onClick"],xL=["onClick"],TL=["onClick"],SL={key:1},kL={class:"tag-group-container"},CL={key:0},EL={key:1},LL={style:{display:"flex","align-items":"center"}},$L={key:0},AL=["placeholder"],IL=["placeholder"],ML=["placeholder"],OL=["placeholder"],RL=["onClick"],NL=["onClick"],DL=["onClick"],PL=vt({__name:"import_danbooru",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(""),s=b(""),r=b(""),l=b(""),u=b(""),d=b(""),c=b(""),f=b(""),g=b(""),p=b([]),v=b(-1),y=b(""),x=b(""),S=b(null);b(null);const $=b(null),W=b(!1),w=b(""),A=b(0),V=b(0);function z(){a.value="",s.value="",A.value=0,V.value=0,r.value="",l.value="",u.value="",d.value="",c.value="",f.value="",g.value="",p.value=[],v.value=-1,y.value="",x.value="",W.value=!1}function j(he){z();const P=he.target.files[0];if(P){const Y=new FileReader;Y.onload=ee=>{ee.target.result.split(";").filter(E=>E.trim()).forEach(E=>{if((E.includes("tag_groups")||E.includes("tag_subgroups"))&&E.includes("p_uuid"))if(E.includes("g_uuid")){u.value=E+";";const F=E.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);F&&(g.value=F[1]);const Z=E.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Z&&(c.value=Z[1].replace(/''/g,"'"))}else{l.value=E+";";const F=E.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);F&&(f.value=F[1]);const Z=E.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Z&&(d.value=Z[1].replace(/''/g,"'"))}else E.includes("tag_tags")&&p.value.push(E+";")})},Y.readAsText(P)}he.target.value=""}function q(he){const P=he.target.files[0];if(P){const Y=new FileReader;Y.onload=ee=>{ee.target.result.split(`
`).filter(E=>E.trim()).forEach(E=>{const L=E.split(",");if(L.length>=2){let F,Z,ce,ge;L.length===2?(F=L[0].trim(),ge=L[1].trim(),Z=0,ce=0):L.length>=3&&(F=L[0].trim(),Z=parseInt(L[1].trim())||0,ce=parseInt(L[2].trim())||0,ge=L.slice(3).join(",").trim(),ge=ge.replace(/^"(.*)"$/,"$1"));const k=F.replace(/'/g,"''"),_=ge.replace(/'/g,"''"),M=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${k}', '', '${_}', ${ce}, ${Z});`;p.value.push(M)}})},Y.readAsText(P)}he.target.value=""}function fe(){$.value.click()}function te(){let he;p.value.length>0&&R(p.value[0])?he=[...p.value].join(`
`):he=[l.value,u.value,...p.value].join(`
`);const P=new Blob([he],{type:"text/sql"}),Y=document.createElement("a");if(Y.href=URL.createObjectURL(P),w.value.length<=0){const ee=parseInt(new Date().getTime()/1e3);Y.download="export_"+ee+".sql"}else Y.download=w.value+".sql";Y.click()}function I(he){const P=he.match(/VALUES\s*\([^']*'([^']+)'/),Y=he.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:P?P[1].replace(/''/g,"'"):"",desc:Y?Y[1].replace(/''/g,"'"):""}}function R(he){return he.includes("danbooru_tag")}function H(he){const P=he.match(/VALUES\s*\(\s*'([^']+)'\s*,\s*'([^']*)'\s*,\s*'([^']*)'\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return P?{tag:P[1].replace(/''/g,"'"),color_id:P[2],translate:P[3].replace(/''/g,"'"),hot:parseInt(P[4]),aliases:parseInt(P[5])}:{tag:"",color_id:"",translate:"",hot:0,aliases:0}}const U=b(0),ne=b(0);function oe(he){const P=p.value[he];if(R(P)){const Y=H(P);y.value=Y.tag,x.value=Y.translate,U.value=Y.hot,ne.value=Y.aliases}else{const Y=I(P);y.value=Y.text,x.value=Y.desc}v.value=he}function D(he){const P=y.value.replace(/'/g,"''"),Y=x.value.replace(/'/g,"''");if(R(p.value[he])){const ee=H(p.value[he]),O=parseInt(U.value)||0,K=parseInt(ne.value)||0;p.value[he]=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${P}', '${ee.color_id}', '${Y}', ${O}, ${K});`}else p.value[he]=p.value[he].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${P}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${Y}'`);v.value=-1}function N(){v.value=-1,y.value="",x.value="",U.value=0,ne.value=0}function le(he){p.value.splice(he,1)}function we(){const he=a.value.replace(/'/g,"''"),P=s.value.replace(/'/g,"''"),Y=parseInt(A.value)||0,ee=parseInt(V.value)||0,O=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${he}', '', '${P}', ${Y}, ${ee});`;p.value.push(O),a.value="",s.value="",A.value=0,V.value=0}const ae=b(!1),ie=async he=>{ae.value=!0;try{await Ca.runSQLToServer(he).then(P=>{if(P.code!=200){X({type:"warn",str:P.message});return}else ve(),X({type:"success",str:"importDialog.successImport"})}).catch(P=>{console.error(P),X({type:"warn",str:"importDialog.importFail"})})}catch(P){console.error(P),X({type:"warn",str:"importDialog.importFail"})}finally{ae.value=!1}},ve=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},Te=async()=>{if(p.value.length>0&&R(p.value[0])){const he=[...p.value];await ie(he)}else if(W.value){if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}const he=[...p.value];await ie(he)}else{if(l.value.length<=0||u.value.length<=0){X({type:"warn",str:"importDialog.pleaseFullRequest"});return}const he=[l.value,u.value,...p.value];await ie(he)}};return it(l,(he,P)=>{var O,K;if(!he||he===P)return;const Y=(O=he.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:O[1],ee=(K=P==null?void 0:P.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:K[1];Y&&ee&&u.value&&(u.value=u.value.replace(new RegExp(`'${ee}'`,"g"),`'${Y}'`))}),it(u,(he,P)=>{var O,K;if(!he||he===P)return;const Y=(O=he.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:O[1],ee=(K=P==null?void 0:P.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:K[1];Y&&ee&&p.value.length>0&&(p.value=p.value.map(E=>E.replace(new RegExp(`'${ee}'`,"g"),`'${Y}'`)))}),t({open:()=>{n.value=!0}}),(he,P)=>(T(),C(Oe,null,[ae.value?(T(),C("div",tL,[...P[19]||(P[19]=[i("div",{class:"loading-spinner"},null,-1)])])):de("",!0),Ve(ms,{modelValue:n.value,"onUpdate:modelValue":P[18]||(P[18]=Y=>n.value=Y),title:m(o)("danbooruManager.importBatchTitle")},{footer:pt(()=>[i("button",{onClick:P[17]||(P[17]=Y=>n.value=!1)},h(m(o)("promptBox.settings.close")),1),i("button",{onClick:Te},h(m(o)("importDialog.sure")),1)]),default:pt(()=>[i("div",nL,[i("div",oL,[i("button",{onClick:z,class:"upload-btn"},h(m(o)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:te},h(m(o)("importDialog.dumpSQL")),1),be(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":P[0]||(P[0]=Y=>w.value=Y),placeholder:m(o)("importDialog.settingOutputName")},null,8,aL),[[Le,w.value]]),i("input",{type:"file",ref_key:"fileInput",ref:S,onChange:j,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"danbooruTxtFileInput",ref:$,onChange:q,accept:".txt,.csv",style:{display:"none"}},null,544)]),i("div",sL,[be(i("input",{"onUpdate:modelValue":P[1]||(P[1]=Y=>a.value=Y),placeholder:"Tag"},null,512),[[Le,a.value]]),be(i("input",{"onUpdate:modelValue":P[2]||(P[2]=Y=>s.value=Y),placeholder:m(o)("importDialog.translater")},null,8,rL),[[Le,s.value]]),be(i("input",{"onUpdate:modelValue":P[3]||(P[3]=Y=>A.value=Y),placeholder:m(o)("danbooruManager.hot"),type:"number"},null,8,lL),[[Le,A.value]]),be(i("input",{"onUpdate:modelValue":P[4]||(P[4]=Y=>V.value=Y),placeholder:m(o)("danbooruManager.aliases"),type:"number"},null,8,iL),[[Le,V.value]]),i("button",{onClick:we},h(m(o)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:fe,class:"upload-btn"},h(m(o)("danbooruManager.import")),1)]),i("div",uL,[l.value?(T(),C("div",cL,[i("h3",null,h(I(l.value).text),1),u.value?(T(),C("div",dL,[i("h4",null,h(I(u.value).text),1),i("div",fL,[(T(!0),C(Oe,null,We(p.value,(Y,ee)=>(T(),C("div",{key:ee,style:{display:"flex","flex-direction":"column","align-items":"center"}},[R(Y)?(T(),C("p",pL,h(H(Y).tag)+" - "+h(H(Y).translate)+" ("+h(m(o)("danbooruManager.hot"))+": "+h(H(Y).hot)+", "+h(m(o)("danbooruManager.aliases"))+": "+h(H(Y).aliases)+")",1)):(T(),C("p",gL,h(I(Y).text)+" - "+h(I(Y).desc),1)),i("div",mL,[v.value===ee?(T(),C("div",hL,[R(Y)?be((T(),C("input",{key:0,"onUpdate:modelValue":P[5]||(P[5]=O=>y.value=O),placeholder:"Tag"},null,512)),[[Le,y.value]]):be((T(),C("input",{key:1,"onUpdate:modelValue":P[6]||(P[6]=O=>y.value=O),placeholder:"Tag"},null,512)),[[Le,y.value]]),R(Y)?be((T(),C("input",{key:2,"onUpdate:modelValue":P[7]||(P[7]=O=>x.value=O),placeholder:m(o)("importDialog.translate")},null,8,vL)),[[Le,x.value]]):be((T(),C("input",{key:3,"onUpdate:modelValue":P[8]||(P[8]=O=>x.value=O),placeholder:m(o)("importDialog.translater")},null,8,_L)),[[Le,x.value]]),R(Y)?be((T(),C("input",{key:4,"onUpdate:modelValue":P[9]||(P[9]=O=>U.value=O),placeholder:m(o)("danbooruManager.hot"),type:"number"},null,8,yL)),[[Le,U.value]]):de("",!0),R(Y)?be((T(),C("input",{key:5,"onUpdate:modelValue":P[10]||(P[10]=O=>ne.value=O),placeholder:m(o)("danbooruManager.aliases"),type:"number"},null,8,bL)),[[Le,ne.value]]):de("",!0),i("button",{onClick:O=>D(ee)},h(m(o)("importDialog.sureYes")),9,wL),i("button",{style:{"margin-left":"10px"},onClick:N},h(m(o)("importDialog.cancel")),1)])):(T(),C("button",{key:1,onClick:O=>oe(ee)},h(m(o)("importDialog.edit")),9,xL)),i("button",{style:{"margin-left":"10px"},onClick:O=>le(ee)},h(m(o)("importDialog.delete")),9,TL)])]))),128))])])):de("",!0)])):p.value.length>0?(T(),C("div",SL,[i("h3",null,h(m(o)("danbooruManager.importTitle")),1),i("div",kL,[(T(!0),C(Oe,null,We(p.value,(Y,ee)=>(T(),C("div",{key:ee,style:{display:"flex","flex-direction":"column","align-items":"center"}},[R(Y)?(T(),C("p",CL,h(H(Y).tag)+" - "+h(H(Y).translate)+" (热度: "+h(H(Y).hot)+", 别名: "+h(H(Y).aliases)+")",1)):(T(),C("p",EL,h(I(Y).text)+" - "+h(I(Y).desc),1)),i("div",LL,[v.value===ee?(T(),C("div",$L,[R(Y)?be((T(),C("input",{key:0,"onUpdate:modelValue":P[11]||(P[11]=O=>y.value=O),placeholder:"Tag"},null,512)),[[Le,y.value]]):be((T(),C("input",{key:1,"onUpdate:modelValue":P[12]||(P[12]=O=>y.value=O),placeholder:"Tag"},null,512)),[[Le,y.value]]),R(Y)?be((T(),C("input",{key:2,"onUpdate:modelValue":P[13]||(P[13]=O=>x.value=O),placeholder:m(o)("importDialog.translater")},null,8,AL)),[[Le,x.value]]):be((T(),C("input",{key:3,"onUpdate:modelValue":P[14]||(P[14]=O=>x.value=O),placeholder:m(o)("importDialog.translater")},null,8,IL)),[[Le,x.value]]),R(Y)?be((T(),C("input",{key:4,"onUpdate:modelValue":P[15]||(P[15]=O=>U.value=O),placeholder:m(o)("danbooruManager.hot"),type:"number"},null,8,ML)),[[Le,U.value]]):de("",!0),R(Y)?be((T(),C("input",{key:5,"onUpdate:modelValue":P[16]||(P[16]=O=>ne.value=O),placeholder:m(o)("danbooruManager.aliases"),type:"number"},null,8,OL)),[[Le,ne.value]]):de("",!0),i("button",{onClick:O=>D(ee)},h(m(o)("importDialog.sureYes")),9,RL),i("button",{style:{"margin-left":"10px"},onClick:N},h(m(o)("importDialog.cancel")),1)])):(T(),C("button",{key:1,onClick:O=>oe(ee)},h(m(o)("importDialog.edit")),9,NL)),i("button",{style:{"margin-left":"10px"},onClick:O=>le(ee)},h(m(o)("importDialog.delete")),9,DL)])]))),128))])])):de("",!0)])])]),_:1},8,["modelValue","title"])],64))}},[["__scopeId","data-v-4dfbaa15"]]),FL={class:"danbooru-manager"},UL={class:"title"},BL={class:"action-bar"},HL={class:"search-box"},jL=["placeholder"],WL=["disabled"],VL={class:"pagination"},zL=["disabled"],qL={class:"page-info"},GL=["disabled"],QL={class:"page-size-control"},YL={key:0,class:"tag-list"},KL={style:{"table-layout":"fixed",overflow:"auto"}},JL={class:"checkbox-column"},XL=["checked"],ZL={class:"tag-column"},e$={class:"translate-column"},t$={class:"color-column"},n$={class:"hot-column"},o$={class:"aliases-column"},a$={class:"control-column"},s$=["value"],r$=["onClick"],l$=["onClick"],i$={key:1,class:"no-results"},u$={key:2,class:"weilin-tools-dialog"},c$={class:"weilin-tools-dialog-content"},d$={class:"form-group"},f$=["placeholder"],p$={class:"form-group"},g$=["placeholder"],m$={class:"form-group"},h$=["value"],v$={class:"form-group"},_$={key:0,class:"form-group"},y$={class:"weilin-tools-dialog-actions"},b$={key:3,class:"weilin-tools-dialog"},w$={class:"weilin-tools-dialog-content"},x$={class:"weilin-tools-dialog-actions"},T$={key:4,class:"weilin-tools-dialog"},S$={class:"weilin-tools-dialog-content"},k$={class:"weilin-tools-dialog-actions"},C$={key:5,class:"overlay"},E$=vt({__name:"danbooru_manager",setup(e){const{t}=ht(),o=b(""),n=b([]),a=b(1),s=b(1),r=b(100),l=b(!1),u=b(!1),d=b(!1),c=b(!1),f=b(!1),g=b(null),p=b({tag:"",translate:"",color_id:0,hot:0,aliases:0}),v=[{name:"默认",color:"#888888"},{name:"红色",color:"#FF6666"},{name:"绿色",color:"#66FF66"},{name:"蓝色",color:"#6666FF"},{name:"黄色",color:"#FFFF66"},{name:"紫色",color:"#FF66FF"},{name:"青色",color:"#66FFFF"},{name:"橙色",color:"#FF9966"},{name:"粉色",color:"#FF99CC"},{name:"棕色",color:"#996633"}],y=D=>v[D]?v[D].color:v[0].color;let x=null;const S=()=>{x&&clearTimeout(x),x=setTimeout(()=>{a.value=1,$()},300)},$=async()=>{l.value=!0,te.value=[];try{const D=await Ca.searchDanbooru(o.value,a.value,r.value);D&&D.data?(n.value=D.data.data||[],s.value=D.data.total_pages||1):(n.value=[],s.value=1)}catch(D){console.error("搜索标签失败:",D),X({type:"error",str:t("message.searchFailed")}),n.value=[]}finally{l.value=!1}},W=D=>{D<1||D>s.value||(a.value=D,$())},w=()=>{r.value<10&&(r.value=10),r.value>500&&(r.value=500),a.value=1,te.value=[],$()},A=()=>{f.value=!1,p.value={tag:"",translate:"",color_id:0,hot:0,aliases:0},u.value=!0},V=D=>{f.value=!0,g.value=D,p.value={id:D.id_index,tag:D.tag,translate:D.translate||"",color_id:D.color_id||0,hot:D.hot||0,aliases:D.aliases||0},u.value=!0},z=()=>{u.value=!1},j=async()=>{if(!p.value.tag){X({type:"error",str:t("tagManager.textRequired")});return}try{if(f.value){const D=await Ca.updateDanbooruTag({id:p.value.id,update_data:{tag:p.value.tag,translate:p.value.translate,color_id:p.value.color_id,hot:p.value.hot,aliases:p.value.aliases}});D&&D.code===200?(X({type:"success",str:t("message.editSuccess")}),$()):X({type:"error",str:t("message.editFailed")})}else{const D=await Ca.addDanbooruTag({tag:p.value.tag,translate:p.value.translate,color_id:p.value.color_id,hot:p.value.hot,aliases:p.value.aliases});D&&D.code===200?(X({type:"success",str:t("message.addSuccess")}),$()):X({type:"error",str:t("message.addFailed")})}z()}catch(D){console.error("提交表单失败:",D),X({type:"error",str:f.value?t("message.editFailed"):t("message.addFailed")})}},q=D=>{g.value=D,d.value=!0},fe=async()=>{if(!(!g.value||!g.value.id_index))try{const D=await Ca.deleteDanbooruTag(g.value.id_index);D&&D.code===200?(X({type:"success",str:t("message.deleteSuccess")}),$()):X({type:"error",str:t("message.deleteFailed")}),d.value=!1}catch(D){console.error("删除标签失败:",D),X({type:"error",str:t("message.deleteFailed")})}},te=b([]),I=et(()=>n.value.length>0&&te.value.length===n.value.length),R=()=>{I.value?te.value=[]:te.value=n.value.map(D=>D.id_index)},H=()=>{te.value.length!==0&&(c.value=!0)},U=async()=>{if(te.value.length!==0){try{const D=await Ca.batchDeleteDanbooruTags(te.value);D&&D.code===200?(X({type:"success",str:`成功删除 ${te.value.length} 个标签`}),te.value=[],$()):X({type:"error",str:"批量删除失败"})}catch(D){console.error("批量删除失败:",D),X({type:"error",str:"批量删除失败"})}c.value=!1}},ne=b(),oe=()=>{ne.value.open()};return gt(()=>{$()}),(D,N)=>{var le;return T(),C("div",FL,[i("h2",UL,h(m(t)("danbooruManager.title")),1),i("div",BL,[i("div",HL,[be(i("input",{"onUpdate:modelValue":N[0]||(N[0]=we=>o.value=we),type:"text",placeholder:m(t)("danbooruManager.searchPlaceholder"),onInput:S},null,40,jL),[[Le,o.value]]),i("button",{class:"search-btn",onClick:$},h(m(t)("tagManager.search")),1)]),i("button",{class:"add-btn",onClick:A},h(m(t)("danbooruManager.add")),1),i("button",{class:"add-btn",onClick:oe},h(m(t)("tagManager.importDanbooru")),1),i("button",{class:Ce(["batch-delete-btn",{disabled:te.value.length===0}]),disabled:te.value.length===0,onClick:H},h(m(t)("tagManager.hasDeleteAction"))+" ("+h(te.value.length)+") ",11,WL)]),i("div",VL,[i("button",{disabled:a.value<=1,onClick:N[1]||(N[1]=we=>W(a.value-1)),class:"page-btn"},h(m(t)("loraManager.prevPage")),9,zL),i("span",qL,h(a.value)+" / "+h(s.value),1),i("button",{disabled:a.value>=s.value,onClick:N[2]||(N[2]=we=>W(a.value+1)),class:"page-btn"},h(m(t)("loraManager.nextPage")),9,GL),i("div",QL,[i("label",null,h(m(t)("danbooruManager.pageShow")),1),be(i("input",{"onUpdate:modelValue":N[3]||(N[3]=we=>r.value=we),type:"number",min:"10",max:"500",onChange:w,class:"page-size-input"},null,544),[[Le,r.value,void 0,{number:!0}]]),i("span",null,h(m(t)("danbooruManager.pageLimit")),1)])]),n.value.length>0?(T(),C("div",YL,[i("table",KL,[i("thead",null,[i("tr",null,[i("th",JL,[i("input",{type:"checkbox",checked:I.value,onChange:R},null,40,XL)]),N[12]||(N[12]=i("th",{class:"id-column"},"ID",-1)),i("th",ZL,h(m(t)("tagManager.description")),1),i("th",e$,h(m(t)("promptBox.translate")),1),i("th",t$,h(m(t)("tagManager.backgroundColor")),1),i("th",n$,h(m(t)("danbooruManager.hot")),1),i("th",o$,h(m(t)("danbooruManager.aliases")),1),i("th",a$,h(m(t)("danbooruManager.controle")),1)])]),i("tbody",null,[(T(!0),C(Oe,null,We(n.value,we=>(T(),C("tr",{key:we.id_index},[i("td",null,[be(i("input",{type:"checkbox",value:we.id_index,"onUpdate:modelValue":N[4]||(N[4]=ae=>te.value=ae)},null,8,s$),[[qt,te.value]])]),i("td",null,h(we.id_index),1),i("td",null,h(we.tag),1),i("td",null,h(we.translate),1),i("td",null,[i("div",{class:"color-box",style:ft({backgroundColor:y(we.color_id)})},null,4)]),i("td",null,h(we.hot),1),i("td",null,h(we.aliases),1),i("td",null,[i("button",{class:"edit-btn",onClick:ae=>V(we)},h(m(t)("common.edit")),9,r$),i("button",{style:{"margin-left":"10px"},class:"delete-btn",onClick:ae=>q(we)},h(m(t)("common.delete")),9,l$)])]))),128))])])])):(T(),C("div",i$,h(m(t)("tagManager.noResults")),1)),u.value?(T(),C("div",u$,[i("div",c$,[i("h3",null,h(f.value?m(t)("danbooruManager.edit"):m(t)("danbooruManager.add")),1),i("div",d$,[i("label",null,h(m(t)("tagManager.description")),1),be(i("input",{"onUpdate:modelValue":N[5]||(N[5]=we=>p.value.tag=we),type:"text",placeholder:m(t)("tagManager.descriptionPlaceholder")},null,8,f$),[[Le,p.value.tag]])]),i("div",p$,[i("label",null,h(m(t)("promptBox.translate")),1),be(i("input",{"onUpdate:modelValue":N[6]||(N[6]=we=>p.value.translate=we),type:"text",placeholder:m(t)("danbooruManager.translatePlaceholder")},null,8,g$),[[Le,p.value.translate]])]),i("div",m$,[i("label",null,h(m(t)("tagManager.backgroundColor")),1),be(i("select",{"onUpdate:modelValue":N[7]||(N[7]=we=>p.value.color_id=we)},[(T(),C(Oe,null,We(v,(we,ae)=>i("option",{key:ae,value:ae},h(we.name),9,h$)),64))],512),[[un,p.value.color_id]]),i("div",{class:"color-preview",style:ft({backgroundColor:y(p.value.color_id)})},null,4)]),i("div",v$,[N[13]||(N[13]=i("label",null,"Hot",-1)),be(i("input",{"onUpdate:modelValue":N[8]||(N[8]=we=>p.value.hot=we),type:"number",min:"0"},null,512),[[Le,p.value.hot,void 0,{number:!0}]])]),f.value?de("",!0):(T(),C("div",_$,[N[14]||(N[14]=i("label",null,"Aliases",-1)),be(i("input",{"onUpdate:modelValue":N[9]||(N[9]=we=>p.value.aliases=we),type:"number",min:"0"},null,512),[[Le,p.value.aliases,void 0,{number:!0}]])])),i("div",y$,[i("button",{onClick:z},h(m(t)("common.cancel")),1),i("button",{onClick:j},h(m(t)("common.save")),1)])])])):de("",!0),d.value?(T(),C("div",b$,[i("div",w$,[i("h3",null,h(m(t)("common.confirmDelete")),1),i("p",null,h(m(t)("tagManager.deleteTagConfirm",{name:((le=g.value)==null?void 0:le.tag)||""})),1),i("div",x$,[i("button",{onClick:N[10]||(N[10]=we=>d.value=!1)},h(m(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:fe},h(m(t)("common.delete")),1)])])])):de("",!0),c.value?(T(),C("div",T$,[i("div",S$,[i("h3",null,h(m(t)("danbooruManager.sureBatchDelete")),1),i("p",null,h(m(t)("danbooruManager.sureBatchDeleteTips1"))+" "+h(te.value.length)+" "+h(m(t)("danbooruManager.sureBatchDeleteTips2")),1),i("div",k$,[i("button",{onClick:N[11]||(N[11]=we=>c.value=!1)},h(m(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:U},h(m(t)("danbooruManager.sureDelete")),1)])])])):de("",!0),u.value||d.value||c.value?(T(),C("div",C$)):de("",!0),Ve(PL,{ref_key:"importDanbooruDialog",ref:ne},null,512)])}}},[["__scopeId","data-v-0c23bf70"]]),L$={id:"weilin_comfyui_tools_prompt_ui_div"},$$={key:10,class:"version-update-notification"},A$={class:"version-update-content"},Ea="weilin_tools_",I$=vt({__name:"App",setup(e){mr();const t=b(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true");localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")||(localStorage.setItem("weilin_prompt_ui_floatingBallEnabled","true"),t.value=!0);const{t:o}=ht(),n=b(""),a=b("look"),s=b("manager"),r=b("prompt_global"),l=b(!1),u=`${Ea}theme`,d=b(localStorage.getItem(u)==="dark"),c=b(""),f=b(!1),g=b(""),p=b(null),v=`${Ea}version_update_remind`,y=()=>{f.value=!1,p.value&&(clearTimeout(p.value),p.value=null)},x=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank"),y()},S=()=>{localStorage.setItem(v,"false"),y()},$={prompt:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:600,height:500}},tag:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}},lora:{visible:!1,is_default_close:!1,position:{x:200,y:200},size:{width:800,height:600}},history:{visible:!1,is_default_close:!1,position:{x:300,y:300},size:{width:800,height:600}},ai_window:{visible:!1,is_default_close:!1,position:{x:400,y:400},size:{width:800,height:600}},node_list_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:300,height:600}},cloud_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:800,height:600}},lora_stack_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:300,height:600}},danbooru_manager_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:800,height:600}}},W=()=>{try{const D=localStorage.getItem(`${Ea}windowStates`);if(D){const N=JSON.parse(D),le={...$};for(const we in N)we in le&&(le[we]={...$[we],...N[we],visible:N[we].is_default_close?!1:N[we].visible});return le}}catch(D){console.error("Error loading window states:",D)}return{...$}},w=b(W());it(w,D=>{try{localStorage.setItem(`${Ea}windowStates`,JSON.stringify(D))}catch(N){console.error("Error saving window states:",N)}},{deep:!0}),gt(()=>{Object.keys(w.value).forEach(D=>{Be.registerWindow(D)}),A(),window.addEventListener("message",ne),oe()});const A=()=>{let D=localStorage.getItem(u);D||(localStorage.setItem(u,"dark"),D="dark",d.value=!0),d.value=D==="dark";const N=document.getElementById("weilin_comfyui_tools_prompt_ui_div");N&&N.setAttribute("data-theme",d.value?"dark":"light")};On(()=>{Object.keys(w.value).forEach(D=>{Be.unregisterWindow(D)}),window.removeEventListener("message",ne),p.value&&(clearTimeout(p.value),p.value=null)});const V=D=>{D==="prompt"&&(n.value=""),w.value[D].visible=!1},z=(D,N)=>{w.value[D]&&(w.value[D].position={...N})},j=(D,N)=>{w.value[D]&&(w.value[D].size={...N})},q=()=>{const D={loraDetail:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}}},N={prompt:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:600,height:400}},tag:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}},lora:{visible:!1,is_default_close:!1,position:{x:200,y:200},size:{width:800,height:600}},history:{visible:!1,is_default_close:!1,position:{x:300,y:300},size:{width:800,height:600}},ai_window:{visible:!1,is_default_close:!1,position:{x:400,y:400},size:{width:800,height:600}},node_list_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:400,height:800}},cloud_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:800,height:600}},lora_stack_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:300,height:600}},danbooru_manager_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:800,height:600}}};localStorage.setItem(`${Ea}windowStates`,JSON.stringify(N)),localStorage.setItem(`${Ea}loraDetailState`,JSON.stringify(D)),w.value=W()};(()=>{$n.getTranslateSetting().then(D=>{localStorage.setItem("weilin_prompt_ui_translater_setting",D.data)}).catch(D=>{message({type:"warn",str:"message.getTranslaterFail"})})})();const te=b(),I=b(),R=b(),H=b(),U=b(),ne=D=>{D.data.type==="weilin_prompt_ui_openTagManager"?(s.value="manager",w.value.tag.visible=!0,Be.setActiveWindow("tag")):D.data.type==="weilin_prompt_ui_openTagManager_prompt"?(s.value="prompt",w.value.tag.visible=!0,Be.setActiveWindow("tag")):D.data.type==="weilin_prompt_ui_openPromptBox"?(n.value=D.data.id,r.value="prompt",w.value.prompt.visible=!0,l.value=!1,D.data.node==="WeiLinPromptUI"&&(l.value=!0),Ge(()=>{te.value.setPromptText(D.data.prompt)}),Be.setActiveWindow("prompt")):D.data.type==="weilin_prompt_ui_openLoraManager"?(a.value="look",w.value.lora.visible=!0,Be.setActiveWindow("lora")):D.data.type==="weilin_prompt_ui_openLoraManager_addLora"?(a.value="addLora",w.value.lora.visible=!0,Ge(()=>{R.value.openSetSeed(0,"")}),Be.setActiveWindow("lora")):D.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack"?(a.value="addLora",w.value.lora.visible=!0,Ge(()=>{R.value.openSetSeed(1,D.data.seed)}),Be.setActiveWindow("lora")):D.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack_node"?(a.value="addLora",w.value.lora.visible=!0,Ge(()=>{R.value.openSetSeed(2,D.data.seed)}),Be.setActiveWindow("lora")):D.data.type==="weilin_prompt_ui_openHistoryManager"?(w.value.history.visible=!0,Be.setActiveWindow("history")):D.data.type==="weilin_prompt_ui_openAiWindow"?(w.value.ai_window.visible=!0,Be.setActiveWindow("ai_window")):D.data.type==="weilin_prompt_ui_open_node_list_window"?(w.value.node_list_window.visible=!0,Be.setActiveWindow("node_list_window")):D.data.type==="weilin_prompt_ui_prompt_finish_prompt"?window.postMessage({type:"weilin_prompt_ui_prompt_update_prompt_"+n.value,data:D.data.data},"*"):D.data.type==="weilin_prompt_ui_open_global_prompt_box"?(r.value="prompt_global",n.value="global",w.value.prompt.visible=!0,l.value=!1,Ge(()=>{te.value.setPromptText(c.value)}),Be.setActiveWindow("prompt")):D.data.type==="weilin_prompt_ui_open_global_tag_manager"?(s.value="manager",w.value.tag.visible=!0,Be.setActiveWindow("tag")):D.data.type==="weilin_prompt_ui_open_global_lora_manager"?(a.value="look",w.value.lora.visible=!0,Be.setActiveWindow("lora")):D.data.type==="weilin_prompt_ui_prompt_update_prompt_global"?c.value=D.data.data:D.data.type==="weilin_prompt_ui_floating_ball_setting"?t.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true":D.data.type==="weilin_prompt_ui_restore_window"?q():D.data.type==="weilin_prompt_ui_open_cloud_window"?(w.value.cloud_window.visible=!0,Be.setActiveWindow("cloud_window")):D.data.type==="weilin_prompt_ui_open_node_lora_stack_window"?(w.value.lora_stack_window.visible=!0,Ge(()=>{I.value.initLoraStack(D.data.prompt,D.data.seed)}),Be.setActiveWindow("lora_stack_window")):D.data.type==="weilin_prompt_ui_openLoraDetail"?H.value.open({name:D.data.lora}):D.data.type==="weilin_prompt_ui_open_danbooru_manager_window"?(w.value.danbooru_manager_window.visible=!0,Be.setActiveWindow("danbooru_manager_window")):D.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id"?window.postMessage({type:"weilin_prompt_ui_get_template_"+n.value,data:D.data.data},"*"):D.data.type==="weilin_prompt_ui_get_template_response"?n.value===D.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response",data:D.data.data},"*"):D.data.type==="weilin_prompt_ui_prompt_inner_update_node_tag_template_id"?window.postMessage({type:"weilin_prompt_ui_update_template_"+n.value,data:D.data.data},"*"):D.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"?window.postMessage({type:"weilin_prompt_ui_get_template_go_random_"+n.value,data:D.data.data},"*"):D.data.type==="weilin_prompt_ui_get_template_go_random_response"&&n.value===D.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response",data:D.data.data},"*")},oe=async()=>{try{if(localStorage.getItem(v)==="false"){console.info("WeiLin-Comfyui-Tools 版本更新提醒已禁用");return}const N=await fetch("https://raw.githubusercontent.com/weilin9999/WeiLin-Comfyui-Tools/refs/heads/main/src/src/utils/version.js");if(!N.ok){console.error("获取版本信息失败:",N.status);return}const we=(await N.text()).match(/export const version = "([^"]+)"/);if(we&&we[1]){const ae=we[1];console.info(`WeiLin-Comfyui-Tools GitHub版本: ${ae}`),ae!==po&&(g.value=`WeiLin-Comfyui-Tools 发现新版本 ${ae},当前版本 ${po}`,f.value=!0,p.value&&clearTimeout(p.value),p.value=setTimeout(()=>{f.value=!1,p.value=null},1e4),console.info(`WeiLin-Comfyui-Tools 发现新版本 ${ae},当前版本 ${po} GitHub链接:https://github.com/weilin9999/WeiLin-Comfyui-Tools`))}}catch(D){console.error("WeiLin-Comfyui-Tools 检查更新失败:",D)}};return(D,N)=>(T(),C("div",L$,[w.value.prompt.visible?(T(),wt(xn,{key:0,name:"promptBox",title:r.value==="prompt"?m(o)("promptBox.windowTitle"):m(o)("promptBox.windowTitleGlobal"),position:w.value.prompt.position,size:w.value.prompt.size,"z-index":m(Be).getZIndex("prompt"),"onUpdate:position":N[0]||(N[0]=le=>z("prompt",le)),"onUpdate:size":N[1]||(N[1]=le=>j("prompt",le)),onActive:N[2]||(N[2]=le=>m(Be).setActiveWindow("prompt")),onClose:N[3]||(N[3]=le=>V("prompt"))},{default:pt(()=>[Ve(Yk,{promptManager:r.value,hasPromptLoraStack:l.value,ref_key:"promptBoxRef",ref:te},null,8,["promptManager","hasPromptLoraStack"])]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.tag.visible?(T(),wt(xn,{key:1,name:"tagManager",title:m(o)("tagManager.windowTitle"),position:w.value.tag.position,size:w.value.tag.size,"z-index":m(Be).getZIndex("tag"),"onUpdate:position":N[4]||(N[4]=le=>z("tag",le)),"onUpdate:size":N[5]||(N[5]=le=>j("tag",le)),onActive:N[6]||(N[6]=le=>m(Be).setActiveWindow("tag")),onClose:N[7]||(N[7]=le=>V("tag"))},{default:pt(()=>[Ve(hg,{tagManager:s.value},null,8,["tagManager"])]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.lora.visible?(T(),wt(xn,{key:2,name:"loraManager",title:m(o)("loraManager.windowTitle"),position:w.value.lora.position,size:w.value.lora.size,"z-index":m(Be).getZIndex("lora"),"onUpdate:position":N[8]||(N[8]=le=>z("lora",le)),"onUpdate:size":N[9]||(N[9]=le=>j("lora",le)),onActive:N[10]||(N[10]=le=>m(Be).setActiveWindow("lora")),onClose:N[11]||(N[11]=le=>V("lora"))},{default:pt(()=>[Ve(kg,{loraManager:a.value,ref_key:"loraManagerRef",ref:R},null,8,["loraManager"])]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.history.visible?(T(),wt(xn,{key:3,name:"historyManager",title:m(o)("history.windowTitle"),position:w.value.history.position,size:w.value.history.size,"z-index":m(Be).getZIndex("history"),"onUpdate:position":N[12]||(N[12]=le=>z("history",le)),"onUpdate:size":N[13]||(N[13]=le=>j("history",le)),onActive:N[14]||(N[14]=le=>m(Be).setActiveWindow("history")),onClose:N[15]||(N[15]=le=>V("history"))},{default:pt(()=>[Ve(jC)]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.ai_window.visible?(T(),wt(xn,{key:4,name:"aiWindow",title:m(o)("aiWindow.windowTitle"),position:w.value.ai_window.position,size:w.value.ai_window.size,"z-index":m(Be).getZIndex("ai_window"),"onUpdate:position":N[16]||(N[16]=le=>z("ai_window",le)),"onUpdate:size":N[17]||(N[17]=le=>j("ai_window",le)),onActive:N[18]||(N[18]=le=>m(Be).setActiveWindow("ai_window")),onClose:N[19]||(N[19]=le=>V("ai_window"))},{default:pt(()=>[Ve(pE)]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.node_list_window.visible?(T(),wt(xn,{key:5,name:"nodeListWindow",title:m(o)("nodeListWindow.windowTitle"),position:w.value.node_list_window.position,size:w.value.node_list_window.size,"z-index":m(Be).getZIndex("node_list_window"),"onUpdate:position":N[20]||(N[20]=le=>z("node_list_window",le)),"onUpdate:size":N[21]||(N[21]=le=>j("node_list_window",le)),onActive:N[22]||(N[22]=le=>m(Be).setActiveWindow("node_list_window")),onClose:N[23]||(N[23]=le=>V("node_list_window"))},{default:pt(()=>[Ve(TE)]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.cloud_window.visible?(T(),wt(xn,{key:6,name:"cloudWindow",title:m(o)("cloudWindow.windowTitle"),position:w.value.cloud_window.position,size:w.value.cloud_window.size,"z-index":m(Be).getZIndex("cloud_window"),"onUpdate:position":N[24]||(N[24]=le=>z("cloud_window",le)),"onUpdate:size":N[25]||(N[25]=le=>j("cloud_window",le)),onActive:N[26]||(N[26]=le=>m(Be).setActiveWindow("cloud_window")),onClose:N[27]||(N[27]=le=>V("cloud_window"))},{default:pt(()=>[Ve(DE)]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.lora_stack_window.visible?(T(),wt(xn,{key:7,name:"loraStackWindow",title:m(o)("controls.loraStack"),position:w.value.lora_stack_window.position,size:w.value.lora_stack_window.size,"z-index":m(Be).getZIndex("lora_stack_window"),"onUpdate:position":N[28]||(N[28]=le=>z("lora_stack_window",le)),"onUpdate:size":N[29]||(N[29]=le=>j("lora_stack_window",le)),onActive:N[30]||(N[30]=le=>m(Be).setActiveWindow("lora_stack_window")),onClose:N[31]||(N[31]=le=>V("lora_stack_window"))},{default:pt(()=>[Ve(eL,{ref_key:"loraStackRef",ref:I},null,512)]),_:1},8,["title","position","size","z-index"])):de("",!0),w.value.danbooru_manager_window.visible?(T(),wt(xn,{key:8,name:"DanbooruManagerWindow",title:m(o)("controls.danbooruManager"),position:w.value.danbooru_manager_window.position,size:w.value.danbooru_manager_window.size,"z-index":m(Be).getZIndex("danbooru_manager_window"),"onUpdate:position":N[32]||(N[32]=le=>z("danbooru_manager_window",le)),"onUpdate:size":N[33]||(N[33]=le=>j("danbooru_manager_window",le)),onActive:N[34]||(N[34]=le=>m(Be).setActiveWindow("danbooru_manager_window")),onClose:N[35]||(N[35]=le=>V("danbooru_manager_window"))},{default:pt(()=>[Ve(E$,{ref_key:"danbooruManagerRef",ref:U},null,512)]),_:1},8,["title","position","size","z-index"])):de("",!0),t.value?(T(),wt(YC,{key:9})):de("",!0),Ve(Dr,{ref_key:"loraDetailLoraStackRef",ref:H},null,512),f.value?(T(),C("div",$$,[i("div",A$,[i("span",null,h(g.value),1),i("div",{class:"version-update-actions"},[i("button",{class:"goto-github-btn",onClick:x},"前往GitHub"),i("button",{class:"no-remind-btn",onClick:S},"不再提醒"),i("button",{class:"close-version-update",onClick:y},"×")])])])):de("",!0)]))}},[["__scopeId","data-v-a6646a15"]]);var Ur={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var M$=Ur.exports,Ag;function O$(){return Ag||(Ag=1,(function(e,t){(function(n,a){e.exports=a()})(M$,function(){return(function(){var o={686:(function(s,r,l){l.d(r,{default:function(){return we}});var u=l(279),d=l.n(u),c=l(370),f=l.n(c),g=l(817),p=l.n(g);function v(ae){try{return document.execCommand(ae)}catch{return!1}}var y=function(ie){var ve=p()(ie);return v("cut"),ve},x=y;function S(ae){var ie=document.documentElement.getAttribute("dir")==="rtl",ve=document.createElement("textarea");ve.style.fontSize="12pt",ve.style.border="0",ve.style.padding="0",ve.style.margin="0",ve.style.position="absolute",ve.style[ie?"right":"left"]="-9999px";var Te=window.pageYOffset||document.documentElement.scrollTop;return ve.style.top="".concat(Te,"px"),ve.setAttribute("readonly",""),ve.value=ae,ve}var $=function(ie,ve){var Te=S(ie);ve.container.appendChild(Te);var he=p()(Te);return v("copy"),Te.remove(),he},W=function(ie){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Te="";return typeof ie=="string"?Te=$(ie,ve):ie instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(ie==null?void 0:ie.type)?Te=$(ie.value,ve):(Te=p()(ie),v("copy")),Te},w=W;function A(ae){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(ve){return typeof ve}:A=function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},A(ae)}var V=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ve=ie.action,Te=ve===void 0?"copy":ve,he=ie.container,P=ie.target,Y=ie.text;if(Te!=="copy"&&Te!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(P!==void 0)if(P&&A(P)==="object"&&P.nodeType===1){if(Te==="copy"&&P.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Te==="cut"&&(P.hasAttribute("readonly")||P.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Y)return w(Y,{container:he});if(P)return Te==="cut"?x(P):w(P,{container:he})},z=V;function j(ae){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(ve){return typeof ve}:j=function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},j(ae)}function q(ae,ie){if(!(ae instanceof ie))throw new TypeError("Cannot call a class as a function")}function fe(ae,ie){for(var ve=0;ve<ie.length;ve++){var Te=ie[ve];Te.enumerable=Te.enumerable||!1,Te.configurable=!0,"value"in Te&&(Te.writable=!0),Object.defineProperty(ae,Te.key,Te)}}function te(ae,ie,ve){return ie&&fe(ae.prototype,ie),ve&&fe(ae,ve),ae}function I(ae,ie){if(typeof ie!="function"&&ie!==null)throw new TypeError("Super expression must either be null or a function");ae.prototype=Object.create(ie&&ie.prototype,{constructor:{value:ae,writable:!0,configurable:!0}}),ie&&R(ae,ie)}function R(ae,ie){return R=Object.setPrototypeOf||function(Te,he){return Te.__proto__=he,Te},R(ae,ie)}function H(ae){var ie=oe();return function(){var Te=D(ae),he;if(ie){var P=D(this).constructor;he=Reflect.construct(Te,arguments,P)}else he=Te.apply(this,arguments);return U(this,he)}}function U(ae,ie){return ie&&(j(ie)==="object"||typeof ie=="function")?ie:ne(ae)}function ne(ae){if(ae===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae}function oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function D(ae){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(ve){return ve.__proto__||Object.getPrototypeOf(ve)},D(ae)}function N(ae,ie){var ve="data-clipboard-".concat(ae);if(ie.hasAttribute(ve))return ie.getAttribute(ve)}var le=(function(ae){I(ve,ae);var ie=H(ve);function ve(Te,he){var P;return q(this,ve),P=ie.call(this),P.resolveOptions(he),P.listenClick(Te),P}return te(ve,[{key:"resolveOptions",value:function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof he.action=="function"?he.action:this.defaultAction,this.target=typeof he.target=="function"?he.target:this.defaultTarget,this.text=typeof he.text=="function"?he.text:this.defaultText,this.container=j(he.container)==="object"?he.container:document.body}},{key:"listenClick",value:function(he){var P=this;this.listener=f()(he,"click",function(Y){return P.onClick(Y)})}},{key:"onClick",value:function(he){var P=he.delegateTarget||he.currentTarget,Y=this.action(P)||"copy",ee=z({action:Y,container:this.container,target:this.target(P),text:this.text(P)});this.emit(ee?"success":"error",{action:Y,text:ee,trigger:P,clearSelection:function(){P&&P.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(he){return N("action",he)}},{key:"defaultTarget",value:function(he){var P=N("target",he);if(P)return document.querySelector(P)}},{key:"defaultText",value:function(he){return N("text",he)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(he){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(he,P)}},{key:"cut",value:function(he){return x(he)}},{key:"isSupported",value:function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],P=typeof he=="string"?[he]:he,Y=!!document.queryCommandSupported;return P.forEach(function(ee){Y=Y&&!!document.queryCommandSupported(ee)}),Y}}]),ve})(d()),we=le}),828:(function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function u(d,c){for(;d&&d.nodeType!==r;){if(typeof d.matches=="function"&&d.matches(c))return d;d=d.parentNode}}s.exports=u}),438:(function(s,r,l){var u=l(828);function d(g,p,v,y,x){var S=f.apply(this,arguments);return g.addEventListener(v,S,x),{destroy:function(){g.removeEventListener(v,S,x)}}}function c(g,p,v,y,x){return typeof g.addEventListener=="function"?d.apply(null,arguments):typeof v=="function"?d.bind(null,document).apply(null,arguments):(typeof g=="string"&&(g=document.querySelectorAll(g)),Array.prototype.map.call(g,function(S){return d(S,p,v,y,x)}))}function f(g,p,v,y){return function(x){x.delegateTarget=u(x.target,p),x.delegateTarget&&y.call(g,x)}}s.exports=c}),879:(function(s,r){r.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},r.nodeList=function(l){var u=Object.prototype.toString.call(l);return l!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in l&&(l.length===0||r.node(l[0]))},r.string=function(l){return typeof l=="string"||l instanceof String},r.fn=function(l){var u=Object.prototype.toString.call(l);return u==="[object Function]"}}),370:(function(s,r,l){var u=l(879),d=l(438);function c(v,y,x){if(!v&&!y&&!x)throw new Error("Missing required arguments");if(!u.string(y))throw new TypeError("Second argument must be a String");if(!u.fn(x))throw new TypeError("Third argument must be a Function");if(u.node(v))return f(v,y,x);if(u.nodeList(v))return g(v,y,x);if(u.string(v))return p(v,y,x);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(v,y,x){return v.addEventListener(y,x),{destroy:function(){v.removeEventListener(y,x)}}}function g(v,y,x){return Array.prototype.forEach.call(v,function(S){S.addEventListener(y,x)}),{destroy:function(){Array.prototype.forEach.call(v,function(S){S.removeEventListener(y,x)})}}}function p(v,y,x){return d(document.body,v,y,x)}s.exports=c}),817:(function(s){function r(l){var u;if(l.nodeName==="SELECT")l.focus(),u=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var d=l.hasAttribute("readonly");d||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),d||l.removeAttribute("readonly"),u=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(l),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}s.exports=r}),279:(function(s){function r(){}r.prototype={on:function(l,u,d){var c=this.e||(this.e={});return(c[l]||(c[l]=[])).push({fn:u,ctx:d}),this},once:function(l,u,d){var c=this;function f(){c.off(l,f),u.apply(d,arguments)}return f._=u,this.on(l,f,d)},emit:function(l){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),c=0,f=d.length;for(c;c<f;c++)d[c].fn.apply(d[c].ctx,u);return this},off:function(l,u){var d=this.e||(this.e={}),c=d[l],f=[];if(c&&u)for(var g=0,p=c.length;g<p;g++)c[g].fn!==u&&c[g].fn._!==u&&f.push(c[g]);return f.length?d[l]=f:delete d[l],this}},s.exports=r,s.exports.TinyEmitter=r})},n={};function a(s){if(n[s])return n[s].exports;var r=n[s]={exports:{}};return o[s](r,r.exports,a),r.exports}return(function(){a.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(r,{a:r}),r}})(),(function(){a.d=function(s,r){for(var l in r)a.o(r,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:r[l]})}})(),(function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}})(),a(686)})().default})})(Ur)),Ur.exports}var R$=O$();const N$=Tg(R$),D$=e=>({toClipboard(t,o){return new Promise((n,a)=>{const s=document.createElement("button"),r=new N$(s,{text:()=>t,action:()=>"copy",container:o!==void 0?o:document.body});r.on("success",l=>{r.destroy(),n(l)}),r.on("error",l=>{r.destroy(),a(l)}),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}}),P$=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,F$=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,U$=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function B$(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){H$(e);return}return t}function H$(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function j$(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const o=e.trim();if(o.length<=9)switch(o.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!U$.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(P$.test(e)||F$.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,B$)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function W$(e,t){if(e==null)return;let o=e;for(let n=0;n<t.length;n++){if(o==null||o[t[n]]==null)return;o=o[t[n]]}return o}function zi(e,t,o){if(o.length===0)return t;const n=o[0];return o.length>1&&(t=zi(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,n)?Number.isInteger(Number(o[1]))?[]:{}:e[n],t,Array.prototype.slice.call(o,1))),Number.isInteger(Number(n))&&Array.isArray(e)?e.slice()[n]:Object.assign({},e,{[n]:t})}function Ig(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const o={};for(const n in e)o[n]=e[n];return delete o[t[0]],o}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const o={};for(const n in e)o[n]=e[n];return o}return zi(e,Ig(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function Mg(e,t){return t.map(o=>o.split(".")).map(o=>[o,W$(e,o)]).filter(o=>o[1]!==void 0).reduce((o,n)=>zi(o,n[1],n[0]),{})}function Og(e,t){return t.map(o=>o.split(".")).reduce((o,n)=>Ig(o,n),e)}function Rg(e,{storage:t,serializer:o,key:n,debug:a,pick:s,omit:r,beforeHydrate:l,afterHydrate:u},d,c=!0){try{c&&(l==null||l(d));const f=t.getItem(n);if(f){const g=o.deserialize(f),p=s?Mg(g,s):g,v=r?Og(p,r):p;e.$patch(v)}c&&(u==null||u(d))}catch(f){a&&console.error("[pinia-plugin-persistedstate]",f)}}function Ng(e,{storage:t,serializer:o,key:n,debug:a,pick:s,omit:r}){try{const l=s?Mg(e,s):e,u=r?Og(l,r):l,d=o.serialize(u);t.setItem(n,d)}catch(l){a&&console.error("[pinia-plugin-persistedstate]",l)}}function V$(e,t,o){const{pinia:n,store:a,options:{persist:s=o}}=e;if(!s)return;if(!(a.$id in n.state.value)){const u=n._s.get(a.$id.replace("__hot:",""));u&&Promise.resolve().then(()=>u.$persist());return}const l=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(t);a.$hydrate=({runHooks:u=!0}={})=>{l.forEach(d=>{Rg(a,d,e,u)})},a.$persist=()=>{l.forEach(u=>{Ng(a.$state,u)})},l.forEach(u=>{Rg(a,u,e),a.$subscribe((d,c)=>Ng(c,u),{detached:!0})})}function z$(e={}){return function(t){V$(t,o=>({key:(e.key?e.key:n=>n)(o.key??t.store.$id),debug:o.debug??e.debug??!1,serializer:o.serializer??e.serializer??{serialize:n=>JSON.stringify(n),deserialize:n=>j$(n)},storage:o.storage??e.storage??window.localStorage,beforeHydrate:o.beforeHydrate,afterHydrate:o.afterHydrate,pick:o.pick,omit:o.omit}),e.auto??!1)}}var q$=z$();const{toClipboard:G$}=D$(),qi=document.createElement("div");qi.id="weilin_comfyui_tools_prompt_ui_div",document.querySelector("body").appendChild(qi);const Dg=T0();Dg.use(q$);const Br=y1(I$);Br.use(Dg),Br.use(gs),t2(),Br.config.globalProperties.$copyText=G$,Br.mount(qi),console.log("WeiLin Prompt UI is running - version "+po),console.log("WeiLin 节点插件已运行 - 版本 "+po)}));
//# sourceMappingURL=main.entry.js.map