import{B as e,a as t,C as a,D as l,E as n,b as s,c as o,F as i,K as r,R as u,S as c,d,T as p,e as v,f as m,g as f,h as g,i as h,V as y,j as b,k as _,l as k,m as S,n as w,o as x,p as C,q as T,r as E,s as I,t as M,u as V,v as O,w as A,x as L,y as B,z as $,A as D,G as P,H as N,I as F,J as z,L as R,M as j,N as U,O as H,P as K,Q as W,U as q,W as Y,X as G,Y as J,Z as Q,_ as X,$ as Z,a0 as ee,a1 as te,a2 as ae,a3 as le,a4 as ne,a5 as se,a6 as oe,a7 as ie,a8 as re,a9 as ue,aa as ce,ab as de,ac as pe,ad as ve,ae as me,af as fe,ag as ge,ah as he,ai as ye,aj as be,ak as _e,al as ke,am as Se,an as we,ao as xe,ap as Ce,aq as Te,ar as Ee,as as Ie,at as Me,au as Ve,av as Oe,aw as Ae,ax as Le,ay as Be,az as $e,aA as De,aB as Pe,aC as Ne,aD as Fe,aE as ze,aF as Re,aG as je,aH as Ue,aI as He,aJ as Ke,aK as We,aL as qe,aM as Ye,aN as Ge,aO as Je,aP as Qe,aQ as Xe,aR as Ze,aS as et,aT as tt,aU as at,aV as lt,aW as nt,aX as st,aY as ot,aZ as it,a_ as rt,a$ as ut,b0 as ct,b1 as dt,b2 as pt,b3 as vt,b4 as mt,b5 as ft,b6 as gt,b7 as ht,b8 as yt,b9 as bt,ba as _t,bb as kt,bc as St,bd as wt,be as xt,bf as Ct,bg as Tt,bh as Et,bi as It,bj as Mt,bk as Vt,bl as Ot,bm as At,bn as Lt,bo as Bt,bp as Dt,bq as Pt,br as Nt,bs as Ft,bt as zt,bu as Rt,bv as jt,bw as Ut,bx as Ht,by as Kt,bz as Wt,bA as qt,bB as Yt,bC as Gt,bD as Jt,bE as Qt,bF as Xt,bG as Zt,bH as ea,bI as ta,bJ as aa,bK as la,bL as na,bM as sa,bN as oa,bO as ia,bP as ra,bQ as ua,bR as ca,bS as da,bT as pa,bU as va,bV as ma,bW as fa,bX as ga,bY as ha,bZ as ya,b_ as ba,b$ as _a,c0 as ka,c1 as Sa,c2 as wa,c3 as xa,c4 as Ca,c5 as Ta,c6 as Ea,c7 as Ia,c8 as Ma,c9 as Va,ca as Oa,cb as Aa,cc as La,cd as Ba,ce as $a,cf as Da,cg as Pa,ch as Na,ci as Fa,cj as za,ck as Ra,cl as ja,cm as Ua,cn as Ha,co as Ka,cp as Wa,cq as qa,cr as Ya,cs as Ga,ct as Ja,cu as Qa,cv as Xa,cw as Za,cx as el,cy as tl,cz as al,cA as ll,cB as nl,cC as sl,cD as ol,cE as il,cF as rl,cG as ul,cH as cl,cI as dl,cJ as pl,cK as vl,cL as ml,cM as fl,cN as gl,cO as hl,cP as yl,cQ as bl,cR as _l,cS as kl,cT as Sl,cU as wl,cV as xl,cW as Cl,cX as Tl,cY as El,cZ as Il,c_ as Ml,c$ as Vl,d0 as Ol,d1 as Al,d2 as Ll,d3 as Bl,d4 as $l,d5 as Dl,d6 as Pl,d7 as Nl,d8 as Fl,d9 as zl,da as Rl,db as jl,dc as Ul,dd as Hl,de as Kl,df as Wl,dg as ql,dh as Yl,di as Gl,dj as Jl}from"./index-H1gHScdk.js";import{D as Ql,_ as Xl,L as Zl}from"./login-9KPwLdkw.js";import{c as en}from"./index-v0YnrYDl.js";import{u as tn,a as an,c as ln}from"./index-AYdyW-i7.js";/* empty css             */import{v as nn}from"./el-loading-BMCK-0qT.js";import{u as sn,E as on,a as rn,b as un}from"./el-popper-aOp5k1wb.js";import{U as cn,C as dn,I as pn,E as vn,i as mn,u as fn,P as gn,S as hn,F as yn}from"./file-item-Ad7EnaeR.js";import{_ as bn}from"./icon-close-IHa1HKOl.js";import{t as _n,d as kn,E as Sn,O as wn,i as xn,g as Cn,c as Tn,a as En}from"./oss-service-i56iqe3y.js";import{c as In,l as Mn,g as Vn,a as On,b as An,s as Ln,p as Bn,d as $n,e as Dn,f as Pn,h as Nn,i as Fn}from"./chat-service-x-MR5jy5.js";import{u as zn,E as Rn}from"./el-button-RvZh9zGf.js";import{u as jn,i as Un,a as Hn,b as Kn,c as Wn,d as qn}from"./use-form-item-LN35a4U9.js";import{M as Yn}from"./message-mind-map-RBzm4UwA.js";import{c as Gn}from"./castArray-FLSmcXUH.js";const Jn=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:e,BaseTransitionPropsValidators:t,Comment:a,DeprecationTypes:l,EffectScope:n,ErrorCodes:s,ErrorTypeStrings:o,Fragment:i,KeepAlive:r,ReactiveEffect:u,Static:c,Suspense:d,Teleport:p,Text:v,TrackOpTypes:m,Transition:f,TransitionGroup:g,TriggerOpTypes:h,VueElement:y,assertNumber:b,callWithAsyncErrorHandling:_,callWithErrorHandling:k,camelize:S,capitalize:w,cloneVNode:x,compatUtils:C,compile:()=>{},computed:T,createApp:E,createBlock:I,createCommentVNode:M,createElementBlock:V,createElementVNode:O,createHydrationRenderer:A,createPropsRestProxy:L,createRenderer:B,createSSRApp:$,createSlots:D,createStaticVNode:P,createTextVNode:N,createVNode:F,customRef:z,defineAsyncComponent:R,defineComponent:j,defineCustomElement:U,defineEmits:H,defineExpose:K,defineModel:W,defineOptions:q,defineProps:Y,defineSSRCustomElement:G,defineSlots:J,devtools:Q,effect:X,effectScope:Z,getCurrentInstance:ee,getCurrentScope:te,getTransitionRawChildren:ae,guardReactiveProps:le,h:ne,handleError:se,hasInjectionContext:oe,hydrate:ie,initCustomFormatter:re,initDirectivesForSSR:ue,inject:ce,isMemoSame:de,isProxy:pe,isReactive:ve,isReadonly:me,isRef:fe,isRuntimeOnly:ge,isShallow:he,isVNode:ye,markRaw:be,mergeDefaults:_e,mergeModels:ke,mergeProps:Se,nextTick:we,normalizeClass:xe,normalizeProps:Ce,normalizeStyle:Te,onActivated:Ee,onBeforeMount:Ie,onBeforeUnmount:Me,onBeforeUpdate:Ve,onDeactivated:Oe,onErrorCaptured:Ae,onMounted:Le,onRenderTracked:Be,onRenderTriggered:$e,onScopeDispose:De,onServerPrefetch:Pe,onUnmounted:Ne,onUpdated:Fe,openBlock:ze,popScopeId:Re,provide:je,proxyRefs:Ue,pushScopeId:He,queuePostFlushCb:Ke,reactive:We,readonly:qe,ref:Ye,registerRuntimeCompiler:Ge,render:Je,renderList:Qe,renderSlot:Xe,resolveComponent:Ze,resolveDirective:et,resolveDynamicComponent:tt,resolveFilter:at,resolveTransitionHooks:lt,setBlockTracking:nt,setDevtoolsHook:st,setTransitionHooks:ot,shallowReactive:it,shallowReadonly:rt,shallowRef:ut,ssrContextKey:ct,ssrUtils:dt,stop:pt,toDisplayString:vt,toHandlerKey:mt,toHandlers:ft,toRaw:gt,toRef:ht,toRefs:yt,toValue:bt,transformVNodeArgs:_t,triggerRef:kt,unref:St,useAttrs:wt,useCssModule:xt,useCssVars:Ct,useModel:Tt,useSSRContext:Et,useSlots:It,useTransitionState:Mt,vModelCheckbox:Vt,vModelDynamic:Ot,vModelRadio:At,vModelSelect:Lt,vModelText:Bt,vShow:Dt,version:Pt,warn:Nt,watch:Ft,watchEffect:zt,watchPostEffect:Rt,watchSyncEffect:jt,withAsyncContext:Ut,withCtx:Ht,withDefaults:Kt,withDirectives:Wt,withKeys:qt,withMemo:Yt,withModifiers:Gt,withScopeId:Jt},Symbol.toStringTag,{value:"Module"})),Qn=e=>Array.from(e.querySelectorAll('a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])')).filter((e=>{return Xn(e)&&(t=e,"fixed"!==getComputedStyle(t).position&&null!==t.offsetParent);var t})),Xn=e=>{if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return!("hidden"===e.type||"file"===e.type);case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}};var Zn=/\s/,es=/^\s+/;var ts=NaN,as=/^[-+]0x[0-9a-f]+$/i,ls=/^0b[01]+$/i,ns=/^0o[0-7]+$/i,ss=parseInt;function os(e){if("number"==typeof e)return e;if(Qt(e))return ts;if(Xt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Zn.test(e.charAt(t)););return t}(e)+1).replace(es,""):e}(e);var a=ls.test(e);return a||ns.test(e)?ss(e.slice(2),a?2:8):as.test(e)?ts:+e}function is(e){return e}var rs=Zt(ea,"WeakMap"),us=9007199254740991,cs=/^(?:0|[1-9]\d*)$/;function ds(e,t){var a=typeof e;return!!(t=null==t?us:t)&&("number"==a||"symbol"!=a&&cs.test(e))&&e>-1&&e%1==0&&e<t}var ps=9007199254740991;function vs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ps}var ms=Object.prototype;function fs(e){return aa(e)&&"[object Arguments]"==la(e)}var gs=Object.prototype,hs=gs.hasOwnProperty,ys=gs.propertyIsEnumerable,bs=fs(function(){return arguments}())?fs:function(e){return aa(e)&&hs.call(e,"callee")&&!ys.call(e,"callee")},_s="object"==typeof exports&&exports&&!exports.nodeType&&exports,ks=_s&&"object"==typeof module&&module&&!module.nodeType&&module,Ss=ks&&ks.exports===_s?ea.Buffer:void 0,ws=(Ss?Ss.isBuffer:void 0)||function(){return!1},xs={};xs["[object Float32Array]"]=xs["[object Float64Array]"]=xs["[object Int8Array]"]=xs["[object Int16Array]"]=xs["[object Int32Array]"]=xs["[object Uint8Array]"]=xs["[object Uint8ClampedArray]"]=xs["[object Uint16Array]"]=xs["[object Uint32Array]"]=!0,xs["[object Arguments]"]=xs["[object Array]"]=xs["[object ArrayBuffer]"]=xs["[object Boolean]"]=xs["[object DataView]"]=xs["[object Date]"]=xs["[object Error]"]=xs["[object Function]"]=xs["[object Map]"]=xs["[object Number]"]=xs["[object Object]"]=xs["[object RegExp]"]=xs["[object Set]"]=xs["[object String]"]=xs["[object WeakMap]"]=!1;var Cs,Ts="object"==typeof exports&&exports&&!exports.nodeType&&exports,Es=Ts&&"object"==typeof module&&module&&!module.nodeType&&module,Is=Es&&Es.exports===Ts&&na.process,Ms=function(){try{return Es&&Es.require&&Es.require("util").types||Is&&Is.binding&&Is.binding("util")}catch(e){}}(),Vs=Ms&&Ms.isTypedArray,Os=Vs?(Cs=Vs,function(e){return Cs(e)}):function(e){return aa(e)&&vs(e.length)&&!!xs[la(e)]},As=Object.prototype.hasOwnProperty;var Ls=function(e,t){return function(a){return e(t(a))}}(Object.keys,Object),Bs=Object.prototype.hasOwnProperty;function $s(e){return null!=(t=e)&&vs(t.length)&&!ta(t)?function(e,t){var a=sa(e),l=!a&&bs(e),n=!a&&!l&&ws(e),s=!a&&!l&&!n&&Os(e),o=a||l||n||s,i=o?function(e,t){for(var a=-1,l=Array(e);++a<e;)l[a]=t(a);return l}(e.length,String):[],r=i.length;for(var u in e)!t&&!As.call(e,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ds(u,r))||i.push(u);return i}(e):function(e){if(a=(t=e)&&t.constructor,t!==("function"==typeof a&&a.prototype||ms))return Ls(e);var t,a,l=[];for(var n in Object(e))Bs.call(e,n)&&"constructor"!=n&&l.push(n);return l}(e);var t}function Ds(e){var t=this.__data__=new oa(e);this.size=t.size}Ds.prototype.clear=function(){this.__data__=new oa,this.size=0},Ds.prototype.delete=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a},Ds.prototype.get=function(e){return this.__data__.get(e)},Ds.prototype.has=function(e){return this.__data__.has(e)},Ds.prototype.set=function(e,t){var a=this.__data__;if(a instanceof oa){var l=a.__data__;if(!ia||l.length<199)return l.push([e,t]),this.size=++a.size,this;a=this.__data__=new ra(l)}return a.set(e,t),this.size=a.size,this};var Ps=Object.prototype.propertyIsEnumerable,Ns=Object.getOwnPropertySymbols,Fs=Ns?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var a=-1,l=null==e?0:e.length,n=0,s=[];++a<l;){var o=e[a];t(o)&&(s[n++]=o)}return s}(Ns(e),(function(t){return Ps.call(e,t)})))}:function(){return[]};const zs=Fs;function Rs(e){return a=zs,l=$s(t=e),sa(t)?l:function(e,t){for(var a=-1,l=t.length,n=e.length;++a<l;)e[n+a]=t[a];return e}(l,a(t));var t,a,l}var js=Zt(ea,"DataView"),Us=Zt(ea,"Promise"),Hs=Zt(ea,"Set"),Ks="[object Map]",Ws="[object Promise]",qs="[object Set]",Ys="[object WeakMap]",Gs="[object DataView]",Js=ua(js),Qs=ua(ia),Xs=ua(Us),Zs=ua(Hs),eo=ua(rs),to=la;(js&&to(new js(new ArrayBuffer(1)))!=Gs||ia&&to(new ia)!=Ks||Us&&to(Us.resolve())!=Ws||Hs&&to(new Hs)!=qs||rs&&to(new rs)!=Ys)&&(to=function(e){var t=la(e),a="[object Object]"==t?e.constructor:void 0,l=a?ua(a):"";if(l)switch(l){case Js:return Gs;case Qs:return Ks;case Xs:return Ws;case Zs:return qs;case eo:return Ys}return t});const ao=to,lo=ea.Uint8Array;function no(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new ra;++t<a;)this.add(e[t])}function so(e,t){for(var a=-1,l=null==e?0:e.length;++a<l;)if(t(e[a],a,e))return!0;return!1}no.prototype.add=no.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},no.prototype.has=function(e){return this.__data__.has(e)};var oo=1,io=2;function ro(e,t,a,l,n,s){var o=a&oo,i=e.length,r=t.length;if(i!=r&&!(o&&r>i))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,v=a&io?new no:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var m=e[d],f=t[d];if(l)var g=o?l(f,m,d,t,e,s):l(m,f,d,e,t,s);if(void 0!==g){if(g)continue;p=!1;break}if(v){if(!so(t,(function(e,t){if(o=t,!v.has(o)&&(m===e||n(m,e,a,l,s)))return v.push(t);var o}))){p=!1;break}}else if(m!==f&&!n(m,f,a,l,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function uo(e){var t=-1,a=Array(e.size);return e.forEach((function(e,l){a[++t]=[l,e]})),a}function co(e){var t=-1,a=Array(e.size);return e.forEach((function(e){a[++t]=e})),a}var po=1,vo=2,mo="[object Boolean]",fo="[object Date]",go="[object Error]",ho="[object Map]",yo="[object Number]",bo="[object RegExp]",_o="[object Set]",ko="[object String]",So="[object Symbol]",wo="[object ArrayBuffer]",xo="[object DataView]",Co=ca?ca.prototype:void 0,To=Co?Co.valueOf:void 0,Eo=1,Io=Object.prototype.hasOwnProperty,Mo=1,Vo="[object Arguments]",Oo="[object Array]",Ao="[object Object]",Lo=Object.prototype.hasOwnProperty;function Bo(e,t,a,l,n){return e===t||(null==e||null==t||!aa(e)&&!aa(t)?e!=e&&t!=t:function(e,t,a,l,n,s){var o=sa(e),i=sa(t),r=o?Oo:ao(e),u=i?Oo:ao(t),c=(r=r==Vo?Ao:r)==Ao,d=(u=u==Vo?Ao:u)==Ao,p=r==u;if(p&&ws(e)){if(!ws(t))return!1;o=!0,c=!1}if(p&&!c)return s||(s=new Ds),o||Os(e)?ro(e,t,a,l,n,s):function(e,t,a,l,n,s,o){switch(a){case xo:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case wo:return!(e.byteLength!=t.byteLength||!s(new lo(e),new lo(t)));case mo:case fo:case yo:return da(+e,+t);case go:return e.name==t.name&&e.message==t.message;case bo:case ko:return e==t+"";case ho:var i=uo;case _o:var r=l&po;if(i||(i=co),e.size!=t.size&&!r)return!1;var u=o.get(e);if(u)return u==t;l|=vo,o.set(e,t);var c=ro(i(e),i(t),l,n,s,o);return o.delete(e),c;case So:if(To)return To.call(e)==To.call(t)}return!1}(e,t,r,a,l,n,s);if(!(a&Mo)){var v=c&&Lo.call(e,"__wrapped__"),m=d&&Lo.call(t,"__wrapped__");if(v||m){var f=v?e.value():e,g=m?t.value():t;return s||(s=new Ds),n(f,g,a,l,s)}}return!!p&&(s||(s=new Ds),function(e,t,a,l,n,s){var o=a&Eo,i=Rs(e),r=i.length;if(r!=Rs(t).length&&!o)return!1;for(var u=r;u--;){var c=i[u];if(!(o?c in t:Io.call(t,c)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=o;++u<r;){var f=e[c=i[u]],g=t[c];if(l)var h=o?l(g,f,c,t,e,s):l(f,g,c,e,t,s);if(!(void 0===h?f===g||n(f,g,a,l,s):h)){v=!1;break}m||(m="constructor"==c)}if(v&&!m){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(v=!1)}return s.delete(e),s.delete(t),v}(e,t,a,l,n,s))}(e,t,a,l,Bo,n))}var $o=1,Do=2;function Po(e){return e==e&&!Xt(e)}function No(e,t){return function(a){return null!=a&&a[e]===t&&(void 0!==t||e in Object(a))}}function Fo(e,t){return null!=e&&t in Object(e)}function zo(e){return"function"==typeof e?e:null==e?is:"object"==typeof e?sa(e)?(t=e[0],a=e[1],ma(t)&&Po(a)?No(va(t),a):function(e){var l=fa(e,t);return void 0===l&&l===a?function(e,t){return null!=e&&function(e,t,a){for(var l=-1,n=(t=pa(t,e)).length,s=!1;++l<n;){var o=va(t[l]);if(!(s=null!=e&&a(e,o)))break;e=e[o]}return s||++l!=n?s:!!(n=null==e?0:e.length)&&vs(n)&&ds(o,n)&&(sa(e)||bs(e))}(e,t,Fo)}(e,t):Bo(a,l,3)}):function(e){var t=function(e){for(var t=$s(e),a=t.length;a--;){var l=t[a],n=e[l];t[a]=[l,n,Po(n)]}return t}(e);return 1==t.length&&t[0][2]?No(t[0][0],t[0][1]):function(a){return a===e||function(e,t,a,l){var n=a.length,s=n;if(null==e)return!s;for(e=Object(e);n--;){var o=a[n];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){var i=(o=a[n])[0],r=e[i],u=o[1];if(o[2]){if(void 0===r&&!(i in e))return!1}else{var c,d=new Ds;if(!(void 0===c?Bo(u,r,$o|Do,l,d):c))return!1}}return!0}(a,0,t)}}(e):function(e){return ma(e)?(t=va(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return ga(t,e)}}(e);var t}(e);var t,a}var Ro=function(){return ea.Date.now()},jo=Math.max,Uo=Math.min;Math.max,Math.min;function Ho(e,t){return Bo(e,t)}let Ko;var Wo,qo=((Wo=qo||{})[Wo.TEXT=1]="TEXT",Wo[Wo.CLASS=2]="CLASS",Wo[Wo.STYLE=4]="STYLE",Wo[Wo.PROPS=8]="PROPS",Wo[Wo.FULL_PROPS=16]="FULL_PROPS",Wo[Wo.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",Wo[Wo.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",Wo[Wo.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",Wo[Wo.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",Wo[Wo.NEED_PATCH=512]="NEED_PATCH",Wo[Wo.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",Wo[Wo.HOISTED=-1]="HOISTED",Wo[Wo.BAIL=-2]="BAIL",Wo);const Yo=()=>Math.floor(1e4*Math.random()),Go=e=>{if(!e)return{onClick:Ta,onMousedown:Ta,onMouseup:Ta};let t=!1,a=!1;return{onClick:l=>{t&&a&&e(l),t=a=!1},onMousedown:e=>{t=e.target===e.currentTarget},onMouseup:e=>{a=e.target===e.currentTarget}}},Jo=new Map;let Qo;function Xo(e,t){let a=[];return Array.isArray(t.arg)?a=t.arg:Ea(t.arg)&&a.push(t.arg),function(l,n){const s=t.instance.popperRef,o=l.target,i=null==n?void 0:n.target,r=!t||!t.instance,u=!o||!i,c=e.contains(o)||e.contains(i),d=e===o,p=a.length&&a.some((e=>null==e?void 0:e.contains(o)))||a.length&&a.includes(i),v=s&&(s.contains(o)||s.contains(i));r||u||c||d||p||v||t.value(l,n)}}ha&&(document.addEventListener("mousedown",(e=>Qo=e)),document.addEventListener("mouseup",(e=>{for(const t of Jo.values())for(const{documentHandler:a}of t)a(e,Qo)})));const Zo={beforeMount(e,t){Jo.has(e)||Jo.set(e,[]),Jo.get(e).push({documentHandler:Xo(e,t),bindingFn:t.value})},updated(e,t){Jo.has(e)||Jo.set(e,[]);const a=Jo.get(e),l=a.findIndex((e=>e.bindingFn===t.oldValue)),n={documentHandler:Xo(e,t),bindingFn:t.value};l>=0?a.splice(l,1,n):a.push(n)},unmounted(e){Jo.delete(e)}},ei=100,ti=600,ai={beforeMount(e,t){const a=t.value,{interval:l=ei,delay:n=ti}=Ia(a)?{}:a;let s,o;const i=()=>Ia(a)?a():a.handler(),r=()=>{o&&(clearTimeout(o),o=void 0),s&&(clearInterval(s),s=void 0)};e.addEventListener("mousedown",(e=>{0===e.button&&(r(),i(),document.addEventListener("mouseup",(()=>r()),{once:!0}),o=setTimeout((()=>{s=setInterval((()=>{i()}),l)}),n))}))}},li="_trap-focus-children",ni=[],si=e=>{if(0===ni.length)return;const t=ni[ni.length-1][li];if(t.length>0&&e.code===Ma.tab){if(1===t.length)return e.preventDefault(),void(document.activeElement!==t[0]&&t[0].focus());const a=e.shiftKey,l=e.target===t[0],n=e.target===t[t.length-1];l&&a&&(e.preventDefault(),t[t.length-1].focus()),n&&!a&&(e.preventDefault(),t[0].focus())}},oi={beforeMount(e){e[li]=Qn(e),ni.push(e),ni.length<=1&&document.addEventListener("keydown",si)},updated(e){we((()=>{e[li]=Qn(e)}))},unmounted(){ni.shift(),0===ni.length&&document.removeEventListener("keydown",si)}},ii=Va({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:ya,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),ri={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},ui=j({name:"ElTag"}),ci=j({...ui,props:ii,emits:ri,setup(e,{emit:t}){const a=e,l=jn(),n=_a("tag"),s=T((()=>{const{type:e,hit:t,effect:s,closable:o,round:i}=a;return[n.b(),n.is("closable",o),n.m(e),n.m(l.value),n.m(s),n.is("hit",t),n.is("round",i)]})),o=e=>{t("close",e)},i=e=>{t("click",e)};return(e,t)=>e.disableTransitions?(ze(),V("span",{key:0,class:xe(St(s)),style:Te({backgroundColor:e.color}),onClick:i},[O("span",{class:xe(St(n).e("content"))},[Xe(e.$slots,"default")],2),e.closable?(ze(),I(St(Aa),{key:0,class:xe(St(n).e("close")),onClick:Gt(o,["stop"])},{default:Ht((()=>[F(St(Oa))])),_:1},8,["class","onClick"])):M("v-if",!0)],6)):(ze(),I(f,{key:1,name:`${St(n).namespace.value}-zoom-in-center`,appear:""},{default:Ht((()=>[O("span",{class:xe(St(s)),style:Te({backgroundColor:e.color}),onClick:i},[O("span",{class:xe(St(n).e("content"))},[Xe(e.$slots,"default")],2),e.closable?(ze(),I(St(Aa),{key:0,class:xe(St(n).e("close")),onClick:Gt(o,["stop"])},{default:Ht((()=>[F(St(Oa))])),_:1},8,["class","onClick"])):M("v-if",!0)],6)])),_:3},8,["name"]))}}),di=Ba(La(ci,[["__file","tag.vue"]])),pi=e=>Pa(e)||Na(e)||Fa(e),vi=Va({accordion:Boolean,modelValue:{type:$a([Array,String,Number]),default:()=>Da([])}}),mi={[cn]:pi,[dn]:pi},fi=Symbol("collapseContextKey"),gi=j({name:"ElCollapse"}),hi=j({...gi,props:vi,emits:mi,setup(e,{expose:t,emit:a}){const l=e,{activeNames:n,setActiveNames:s}=((e,t)=>{const a=Ye(Gn(e.modelValue)),l=l=>{a.value=l;const n=e.accordion?a.value[0]:a.value;t(cn,n),t(dn,n)};return Ft((()=>e.modelValue),(()=>a.value=Gn(e.modelValue)),{deep:!0}),je(fi,{activeNames:a,handleItemClick:t=>{if(e.accordion)l([a.value[0]===t?"":t]);else{const e=[...a.value],n=e.indexOf(t);n>-1?e.splice(n,1):e.push(t),l(e)}}}),{activeNames:a,setActiveNames:l}})(l,a),{rootKls:o}=(()=>{const e=_a("collapse");return{rootKls:T((()=>e.b()))}})();return t({activeNames:n,setActiveNames:s}),(e,t)=>(ze(),V("div",{class:xe(St(o))},[Xe(e.$slots,"default")],2))}});var yi=La(hi,[["__file","collapse.vue"]]);const bi=j({name:"ElCollapseTransition"});var _i=La(j({...bi,setup(e){const t=_a("collapse-transition"),a=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},l={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame((()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:0!==e.scrollHeight?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"}))},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){a(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){0!==e.scrollHeight&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){a(e)},leaveCancelled(e){a(e)}};return(e,a)=>(ze(),I(f,Se({name:St(t).b()},ft(l)),{default:Ht((()=>[Xe(e.$slots,"default")])),_:3},16,["name"]))}}),[["__file","collapse-transition.vue"]]);_i.install=e=>{e.component(_i.name,_i)};const ki=_i,Si=Va({title:{type:String,default:""},name:{type:$a([String,Number]),default:()=>Yo()},disabled:Boolean}),wi=["id","aria-expanded","aria-controls","aria-describedby","tabindex"],xi=["id","aria-hidden","aria-labelledby"],Ci=j({name:"ElCollapseItem"});var Ti=La(j({...Ci,props:Si,setup(e,{expose:t}){const a=e,{focusing:l,id:n,isActive:s,handleFocus:o,handleHeaderClick:i,handleEnterClick:r}=(e=>{const t=ce(fi),a=Ye(!1),l=Ye(!1),n=Ye(Yo()),s=T((()=>null==t?void 0:t.activeNames.value.includes(e.name)));return{focusing:a,id:n,isActive:s,handleFocus:()=>{setTimeout((()=>{l.value?l.value=!1:a.value=!0}),50)},handleHeaderClick:()=>{e.disabled||(null==t||t.handleItemClick(e.name),a.value=!1,l.value=!0)},handleEnterClick:()=>{null==t||t.handleItemClick(e.name)}}})(a),{arrowKls:u,headKls:c,rootKls:d,itemWrapperKls:p,itemContentKls:v,scopedContentId:m,scopedHeadId:f}=((e,{focusing:t,isActive:a,id:l})=>{const n=_a("collapse"),s=T((()=>[n.b("item"),n.is("active",St(a)),n.is("disabled",e.disabled)])),o=T((()=>[n.be("item","header"),n.is("active",St(a)),{focusing:St(t)&&!e.disabled}]));return{arrowKls:T((()=>[n.be("item","arrow"),n.is("active",St(a))])),headKls:o,rootKls:s,itemWrapperKls:T((()=>n.be("item","wrap"))),itemContentKls:T((()=>n.be("item","content"))),scopedContentId:T((()=>n.b(`content-${St(l)}`))),scopedHeadId:T((()=>n.b(`head-${St(l)}`)))}})(a,{focusing:l,isActive:s,id:n});return t({isActive:s}),(e,t)=>(ze(),V("div",{class:xe(St(d))},[O("button",{id:St(f),class:xe(St(c)),"aria-expanded":St(s),"aria-controls":St(m),"aria-describedby":St(m),tabindex:e.disabled?-1:0,type:"button",onClick:t[0]||(t[0]=(...e)=>St(i)&&St(i)(...e)),onKeydown:t[1]||(t[1]=qt(Gt(((...e)=>St(r)&&St(r)(...e)),["stop","prevent"]),["space","enter"])),onFocus:t[2]||(t[2]=(...e)=>St(o)&&St(o)(...e)),onBlur:t[3]||(t[3]=e=>l.value=!1)},[Xe(e.$slots,"title",{},(()=>[N(vt(e.title),1)])),F(St(Aa),{class:xe(St(u))},{default:Ht((()=>[F(St(za))])),_:1},8,["class"])],42,wi),F(St(ki),null,{default:Ht((()=>[Wt(O("div",{id:St(m),role:"region",class:xe(St(p)),"aria-hidden":!St(s),"aria-labelledby":St(f)},[O("div",{class:xe(St(v))},[Xe(e.$slots,"default")],2)],10,xi),[[Dt,St(s)]])])),_:3})],2))}}),[["__file","collapse-item.vue"]]);const Ei=Ba(yi,{CollapseItem:Ti}),Ii=Ra(Ti);var Mi=j({name:"ElOverlay",props:Va({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:$a([String,Array,Object])},zIndex:{type:$a([String,Number])}}),emits:{click:e=>e instanceof MouseEvent},setup(e,{slots:t,emit:a}){const l=_a("overlay"),{onClick:n,onMousedown:s,onMouseup:o}=Go(e.customMaskEvent?void 0:e=>{a("click",e)});return()=>e.mask?F("div",{class:[l.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:n,onMousedown:s,onMouseup:o},[Xe(t,"default")],qo.STYLE|qo.CLASS|qo.PROPS,["onClick","onMouseup","onMousedown"]):ne("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Xe(t,"default")])}});const Vi=Mi,Oi=Va({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:ja,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>null===e||Pa(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0}}),Ai={[dn]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[pn]:e=>Pa(e)||Un(e),[cn]:e=>Pa(e)||Un(e)},Li=["aria-label","onKeydown"],Bi=["aria-label","onKeydown"],$i=j({name:"ElInputNumber"}),Di=j({...$i,props:Oi,emits:Ai,setup(e,{expose:t,emit:a}){const l=e,{t:n}=Ua(),s=_a("input-number"),o=Ye(),i=We({currentValue:l.modelValue,userInput:null}),{formItem:r}=Hn(),u=T((()=>Pa(l.modelValue)&&l.modelValue<=l.min)),c=T((()=>Pa(l.modelValue)&&l.modelValue>=l.max)),d=T((()=>{const e=h(l.step);return Ha(l.precision)?Math.max(h(l.modelValue),e):(l.precision,l.precision)})),p=T((()=>l.controls&&"right"===l.controlsPosition)),v=jn(),m=Kn(),f=T((()=>{if(null!==i.userInput)return i.userInput;let e=i.currentValue;if(Un(e))return"";if(Pa(e)){if(Number.isNaN(e))return"";Ha(l.precision)||(e=e.toFixed(l.precision))}return e})),g=(e,t)=>{if(Ha(t)&&(t=d.value),0===t)return Math.round(e);let a=String(e);const l=a.indexOf(".");if(-1===l)return e;if(!a.replace(".","").split("")[l+t])return e;const n=a.length;return"5"===a.charAt(n-1)&&(a=`${a.slice(0,Math.max(0,n-1))}6`),Number.parseFloat(Number(a).toFixed(t))},h=e=>{if(Un(e))return 0;const t=e.toString(),a=t.indexOf(".");let l=0;return-1!==a&&(l=t.length-a-1),l},y=(e,t=1)=>Pa(e)?g(e+l.step*t):i.currentValue,b=()=>{if(l.readonly||m.value||c.value)return;const e=Number(f.value)||0,t=y(e);S(t),a(pn,i.currentValue),O()},_=()=>{if(l.readonly||m.value||u.value)return;const e=Number(f.value)||0,t=y(e,-1);S(t),a(pn,i.currentValue),O()},k=(e,t)=>{const{max:n,min:s,step:o,precision:i,stepStrictly:r,valueOnClear:u}=l;n<s&&_n("InputNumber","min should not be greater than max.");let c=Number(e);if(Un(e)||Number.isNaN(c))return null;if(""===e){if(null===u)return null;c=Na(u)?{min:s,max:n}[u]:u}return r&&(c=g(Math.round(c/o)*o,i)),Ha(i)||(c=g(c,i)),(c>n||c<s)&&(c=c>n?n:s,t&&a(cn,c)),c},S=(e,t=!0)=>{var n;const s=i.currentValue,o=k(e);t?s!==o&&(i.userInput=null,a(cn,o),a(dn,o,s),l.validateEvent&&(null==(n=null==r?void 0:r.validate)||n.call(r,"change").catch((e=>kn()))),i.currentValue=o):a(cn,o)},w=e=>{i.userInput=e;const t=""===e?null:Number(e);a(pn,t),S(t,!1)},x=e=>{const t=""!==e?Number(e):"";(Pa(t)&&!Number.isNaN(t)||""===e)&&S(t),O(),i.userInput=null},C=e=>{a("focus",e)},E=e=>{var t;i.userInput=null,a("blur",e),l.validateEvent&&(null==(t=null==r?void 0:r.validate)||t.call(r,"blur").catch((e=>kn())))},O=()=>{i.currentValue!==l.modelValue&&(i.currentValue=l.modelValue)};return Ft((()=>l.modelValue),((e,t)=>{const a=k(e,!0);null===i.userInput&&a!==t&&(i.currentValue=a)}),{immediate:!0}),Le((()=>{var e;const{min:t,max:n,modelValue:s}=l,r=null==(e=o.value)?void 0:e.input;if(r.setAttribute("role","spinbutton"),Number.isFinite(n)?r.setAttribute("aria-valuemax",String(n)):r.removeAttribute("aria-valuemax"),Number.isFinite(t)?r.setAttribute("aria-valuemin",String(t)):r.removeAttribute("aria-valuemin"),r.setAttribute("aria-valuenow",i.currentValue||0===i.currentValue?String(i.currentValue):""),r.setAttribute("aria-disabled",String(m.value)),!Pa(s)&&null!=s){let e=Number(s);Number.isNaN(e)&&(e=null),a(cn,e)}})),Fe((()=>{var e,t;const a=null==(e=o.value)?void 0:e.input;null==a||a.setAttribute("aria-valuenow",`${null!=(t=i.currentValue)?t:""}`)})),t({focus:()=>{var e,t;null==(t=null==(e=o.value)?void 0:e.focus)||t.call(e)},blur:()=>{var e,t;null==(t=null==(e=o.value)?void 0:e.blur)||t.call(e)}}),(e,t)=>(ze(),V("div",{class:xe([St(s).b(),St(s).m(St(v)),St(s).is("disabled",St(m)),St(s).is("without-controls",!e.controls),St(s).is("controls-right",St(p))]),onDragstart:t[1]||(t[1]=Gt((()=>{}),["prevent"]))},[e.controls?Wt((ze(),V("span",{key:0,role:"button","aria-label":St(n)("el.inputNumber.decrease"),class:xe([St(s).e("decrease"),St(s).is("disabled",St(u))]),onKeydown:qt(_,["enter"])},[F(St(Aa),null,{default:Ht((()=>[St(p)?(ze(),I(St(Ka),{key:0})):(ze(),I(St(Wa),{key:1}))])),_:1})],42,Li)),[[St(ai),_]]):M("v-if",!0),e.controls?Wt((ze(),V("span",{key:1,role:"button","aria-label":St(n)("el.inputNumber.increase"),class:xe([St(s).e("increase"),St(s).is("disabled",St(c))]),onKeydown:qt(b,["enter"])},[F(St(Aa),null,{default:Ht((()=>[St(p)?(ze(),I(St(qa),{key:0})):(ze(),I(St(Ya),{key:1}))])),_:1})],42,Bi)),[[St(ai),b]]):M("v-if",!0),F(St(vn),{id:e.id,ref_key:"input",ref:o,type:"number",step:e.step,"model-value":St(f),placeholder:e.placeholder,readonly:e.readonly,disabled:St(m),size:St(v),max:e.max,min:e.min,name:e.name,label:e.label,"validate-event":!1,onWheel:t[0]||(t[0]=Gt((()=>{}),["prevent"])),onKeydown:[qt(Gt(b,["prevent"]),["up"]),qt(Gt(_,["prevent"]),["down"])],onBlur:E,onFocus:C,onInput:w,onChange:x},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","label","onKeydown"])],34))}}),Pi=Ba(La(Di,[["__file","input-number.vue"]])),Ni=Symbol("ElSelectGroup"),Fi=Symbol("ElSelect"),zi=j({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=_a("select"),a=Wn(),l=T((()=>[t.be("dropdown","item"),t.is("disabled",St(i)),t.is("selected",St(o)),t.is("hovering",St(p))])),n=We({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:o,isDisabled:i,select:r,hoverItem:u,updateOption:c}=function(e,t){const a=ce(Fi),l=ce(Ni,{disabled:!1}),n=T((()=>a.props.multiple?c(a.props.modelValue,e.value):Ho(e.value,a.props.modelValue))),s=T((()=>{if(a.props.multiple){const e=a.props.modelValue||[];return!n.value&&e.length>=a.props.multipleLimit&&a.props.multipleLimit>0}return!1})),o=T((()=>e.label||(Ga(e.value)?"":e.value))),i=T((()=>e.value||e.label||"")),r=T((()=>e.disabled||t.groupDisabled||s.value)),u=ee(),c=(t=[],l)=>{if(Ga(e.value)){const e=a.props.valueKey;return t&&t.some((t=>gt(fa(t,e))===fa(l,e)))}return t&&t.includes(l)};return Ft((()=>o.value),(()=>{e.created||a.props.remote||a.setSelected()})),Ft((()=>e.value),((t,l)=>{const{remote:n,valueKey:s}=a.props;if(Ho(t,l)||(a.onOptionDestroy(l,u.proxy),a.onOptionCreate(u.proxy)),!e.created&&!n){if(s&&Ga(t)&&Ga(l)&&t[s]===l[s])return;a.setSelected()}})),Ft((()=>l.disabled),(()=>{t.groupDisabled=l.disabled}),{immediate:!0}),{select:a,currentLabel:o,currentValue:i,itemSelected:n,isDisabled:r,hoverItem:()=>{e.disabled||l.disabled||(a.states.hoveringIndex=a.optionsArray.indexOf(u.proxy))},updateOption:a=>{const l=new RegExp(((e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"))(a),"i");t.visible=l.test(o.value)||e.created}}}(e,n),{visible:d,hover:p}=yt(n),v=ee().proxy;return r.onOptionCreate(v),Me((()=>{const e=v.value,{selected:t}=r.states,a=(r.props.multiple?t:[t]).some((e=>e.value===v.value));we((()=>{r.states.cachedOptions.get(e)!==v||a||r.states.cachedOptions.delete(e)})),r.onOptionDestroy(e,v)})),{ns:t,id:a,containerKls:l,currentLabel:s,itemSelected:o,isDisabled:i,select:r,hoverItem:u,updateOption:c,visible:d,hover:p,selectOptionClick:function(){!0!==e.disabled&&!0!==n.groupDisabled&&r.handleOptionSelect(v)},states:n}}}),Ri=["id","aria-disabled","aria-selected"];var ji=La(zi,[["render",function(e,t,a,l,n,s){return Wt((ze(),V("li",{id:e.id,class:xe(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...t)=>e.hoverItem&&e.hoverItem(...t)),onClick:t[1]||(t[1]=Gt(((...t)=>e.selectOptionClick&&e.selectOptionClick(...t)),["stop"]))},[Xe(e.$slots,"default",{},(()=>[O("span",null,vt(e.currentLabel),1)]))],42,Ri)),[[Dt,e.visible]])}],["__file","option.vue"]]),Ui=La(j({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ce(Fi),t=_a("select"),a=T((()=>e.props.popperClass)),l=T((()=>e.props.multiple)),n=T((()=>e.props.fitInputWidth)),s=Ye("");function o(){var t;s.value=`${null==(t=e.selectRef)?void 0:t.offsetWidth}px`}return Le((()=>{o(),Ja(e.selectRef,o)})),{ns:t,minWidth:s,popperClass:a,isMultiple:l,isFitInputWidth:n}}}),[["render",function(e,t,a,l,n,s){return ze(),V("div",{class:xe([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Te({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(ze(),V("div",{key:0,class:xe(e.ns.be("dropdown","header"))},[Xe(e.$slots,"header")],2)):M("v-if",!0),Xe(e.$slots,"default"),e.$slots.footer?(ze(),V("div",{key:1,class:xe(e.ns.be("dropdown","footer"))},[Xe(e.$slots,"footer")],2)):M("v-if",!0)],6)}],["__file","select-dropdown.vue"]]);const Hi=(e,t)=>{const{t:a}=Ua(),l=Wn(),n=_a("select"),s=_a("input"),o=We({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});zn({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},T((()=>!1===e.suffixTransition)));const i=Ye(null),r=Ye(null),u=Ye(null),c=Ye(null),d=Ye(null),p=Ye(null),v=Ye(null),m=Ye(null),f=Ye(null),g=Ye(null),h=Ye(null),{wrapperRef:y,isFocused:b,handleFocus:_,handleBlur:k}=fn(d,{afterFocus(){e.automaticDropdown&&!S.value&&(S.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(e){var t,a;return(null==(t=u.value)?void 0:t.isFocusInsideContent(e))||(null==(a=c.value)?void 0:a.isFocusInsideContent(e))},afterBlur(){S.value=!1,o.menuVisibleOnFocus=!1}}),S=Ye(!1),w=Ye(),{form:x,formItem:C}=Hn(),{inputId:E}=qn(e,{formItemContext:C}),I=T((()=>e.disabled||(null==x?void 0:x.disabled))),M=T((()=>e.multiple?Fa(e.modelValue)&&e.modelValue.length>0:void 0!==e.modelValue&&null!==e.modelValue&&""!==e.modelValue)),V=T((()=>e.clearable&&!I.value&&o.inputHovering&&M.value)),O=T((()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon)),A=T((()=>n.is("reverse",O.value&&S.value&&e.suffixTransition))),L=T((()=>(null==C?void 0:C.validateState)||"")),B=T((()=>Qa[L.value])),$=T((()=>e.remote?300:0)),D=T((()=>e.loading?e.loadingText||a("el.select.loading"):!(e.remote&&!o.inputValue&&0===o.options.size)&&(e.filterable&&o.inputValue&&o.options.size>0&&0===P.value?e.noMatchText||a("el.select.noMatch"):0===o.options.size?e.noDataText||a("el.select.noData"):null))),P=T((()=>N.value.filter((e=>e.visible)).length)),N=T((()=>{const e=Array.from(o.options.values()),t=[];return o.optionValues.forEach((a=>{const l=e.findIndex((e=>e.value===a));l>-1&&t.push(e[l])})),t.length>=e.length?t:e})),F=T((()=>Array.from(o.cachedOptions.values()))),z=T((()=>{const t=N.value.filter((e=>!e.created)).some((e=>e.currentLabel===o.inputValue));return e.filterable&&e.allowCreate&&""!==o.inputValue&&!t})),R=()=>{e.filterable&&Ia(e.filterMethod)||e.filterable&&e.remote&&Ia(e.remoteMethod)||N.value.forEach((e=>{e.updateOption(o.inputValue)}))},j=jn(),U=T((()=>["small"].includes(j.value)?"small":"default")),H=T({get:()=>S.value&&!1!==D.value,set(e){S.value=e}}),K=T((()=>Fa(e.modelValue)?0===e.modelValue.length&&!o.inputValue:!e.filterable||!o.inputValue)),W=T((()=>{var t;const l=null!=(t=e.placeholder)?t:a("el.select.placeholder");return e.multiple||!M.value?l:o.selectedLabel}));Ft((()=>e.modelValue),((t,a)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(o.inputValue="",q("")),G(),!Ho(t,a)&&e.validateEvent&&(null==C||C.validate("change").catch((e=>kn())))}),{flush:"post",deep:!0}),Ft((()=>S.value),(e=>{e?q(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),t("visible-change",e)})),Ft((()=>o.options.entries()),(()=>{var t;if(!ha)return;const a=(null==(t=i.value)?void 0:t.querySelectorAll("input"))||[];(e.filterable||e.defaultFirstOption||Ha(e.modelValue))&&Array.from(a).includes(document.activeElement)||G(),e.defaultFirstOption&&(e.filterable||e.remote)&&P.value&&Y()}),{flush:"post"}),Ft((()=>o.hoveringIndex),(e=>{Pa(e)&&e>-1?w.value=N.value[e]||{}:w.value={},N.value.forEach((e=>{e.hover=w.value===e}))})),zt((()=>{o.isBeforeHide||R()}));const q=t=>{o.previousQuery!==t&&(o.previousQuery=t,e.filterable&&Ia(e.filterMethod)?e.filterMethod(t):e.filterable&&e.remote&&Ia(e.remoteMethod)&&e.remoteMethod(t),e.defaultFirstOption&&(e.filterable||e.remote)&&P.value?we(Y):we(Q))},Y=()=>{const e=N.value.filter((e=>e.visible&&!e.disabled&&!e.states.groupDisabled)),t=e.find((e=>e.created)),a=e[0];o.hoveringIndex=re(N.value,t||a)},G=()=>{if(!e.multiple){const t=J(e.modelValue);return o.selectedLabel=t.currentLabel,void(o.selected=t)}o.selectedLabel="";const t=[];Fa(e.modelValue)&&e.modelValue.forEach((e=>{t.push(J(e))})),o.selected=t},J=t=>{let a;const l="object"===Xa(t).toLowerCase(),n="null"===Xa(t).toLowerCase(),s="undefined"===Xa(t).toLowerCase();for(let i=o.cachedOptions.size-1;i>=0;i--){const n=F.value[i];if(l?fa(n.value,e.valueKey)===fa(t,e.valueKey):n.value===t){a={value:t,currentLabel:n.currentLabel,isDisabled:n.isDisabled};break}}return a||{value:t,currentLabel:l?t.label:n||s?"":t}},Q=()=>{e.multiple?o.selected.length>0?o.hoveringIndex=Math.min(...o.selected.map((e=>N.value.findIndex((t=>he(t)===he(e)))))):o.hoveringIndex=-1:o.hoveringIndex=N.value.findIndex((e=>he(e)===he(o.selected)))},X=()=>{o.calculatorWidth=p.value.getBoundingClientRect().width},Z=()=>{var e,t;null==(t=null==(e=u.value)?void 0:e.updatePopper)||t.call(e)},ee=()=>{var e,t;null==(t=null==(e=c.value)?void 0:e.updatePopper)||t.call(e)},te=()=>{q(o.inputValue)},ae=t=>{if(o.inputValue=t.target.value,o.inputValue.length>0&&!S.value&&(S.value=!0),!e.remote)return te();le()},le=function(e,t,a){var l,n,s,o,i,r,u=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var a=l,s=n;return l=n=void 0,u=t,o=e.apply(s,a)}function m(e){var a=e-r;return void 0===r||a>=t||a<0||d&&e-u>=s}function f(){var e,a,l=Ro();if(m(l))return g(l);i=setTimeout(f,(a=t-((e=l)-r),d?Uo(a,s-(e-u)):a))}function g(e){return i=void 0,p&&l?v(e):(l=n=void 0,o)}function h(){var e,a=Ro(),s=m(a);if(l=arguments,n=this,r=a,s){if(void 0===i)return u=e=r,i=setTimeout(f,t),c?v(e):o;if(d)return clearTimeout(i),i=setTimeout(f,t),v(r)}return void 0===i&&(i=setTimeout(f,t)),o}return t=os(t)||0,Xt(a)&&(c=!!a.leading,s=(d="maxWait"in a)?jo(os(a.maxWait)||0,t):s,p="trailing"in a?!!a.trailing:p),h.cancel=function(){void 0!==i&&clearTimeout(i),u=0,l=r=n=i=void 0},h.flush=function(){return void 0===i?o:g(Ro())},h}((()=>{te()}),$.value),ne=a=>{Ho(e.modelValue,a)||t(dn,a)},se=e=>function(e,t,a){var l=null==e?0:e.length;if(!l)return-1;var n=l-1;return function(e,t,a,l){e.length;for(var n=a+1;n--;)if(t(e[n],n,e))return n;return-1}(e,zo((e=>!o.disabledOptions.has(e))),n)}(e),oe=a=>{a.stopPropagation();const l=e.multiple?[]:"";if(!Na(l))for(const e of o.selected)e.isDisabled&&l.push(e.value);t(cn,l),ne(l),o.hoveringIndex=-1,S.value=!1,t("clear"),me()},ie=a=>{if(e.multiple){const l=(e.modelValue||[]).slice(),n=re(l,a.value);n>-1?l.splice(n,1):(e.multipleLimit<=0||l.length<e.multipleLimit)&&l.push(a.value),t(cn,l),ne(l),a.created&&q(""),e.filterable&&!e.reserveKeyword&&(o.inputValue="")}else t(cn,a.value),ne(a.value),S.value=!1;me(),S.value||we((()=>{ue(a)}))},re=(t=[],a)=>{if(!Ga(a))return t.indexOf(a);const l=e.valueKey;let n=-1;return t.some(((e,t)=>gt(fa(e,l))===fa(a,l)&&(n=t,!0))),n},ue=e=>{var t,a,l,s,o;const i=Fa(e)?e[0]:e;let r=null;if(null==i?void 0:i.value){const e=N.value.filter((e=>e.value===i.value));e.length>0&&(r=e[0].$el)}if(u.value&&r){const e=null==(s=null==(l=null==(a=null==(t=u.value)?void 0:t.popperRef)?void 0:a.contentRef)?void 0:l.querySelector)?void 0:s.call(l,`.${n.be("dropdown","wrap")}`);e&&function(e,t){if(!ha)return;if(!t)return void(e.scrollTop=0);const a=[];let l=t.offsetParent;for(;null!==l&&e!==l&&e.contains(l);)a.push(l),l=l.offsetParent;const n=t.offsetTop+a.reduce(((e,t)=>e+t.offsetTop),0),s=n+t.offsetHeight,o=e.scrollTop,i=o+e.clientHeight;n<o?e.scrollTop=n:s>i&&(e.scrollTop=s-e.clientHeight)}(e,r)}null==(o=h.value)||o.handleScroll()},{handleCompositionStart:ce,handleCompositionUpdate:de,handleCompositionEnd:pe}=function(e){const t=Ye(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:e=>{const a=e.target.value,l=a[a.length-1]||"";t.value=!mn(l)},handleCompositionEnd:a=>{t.value&&(t.value=!1,Ia(e)&&e(a))}}}((e=>ae(e))),ve=T((()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.popperRef)?void 0:t.contentRef})),me=()=>{var e;null==(e=d.value)||e.focus()},fe=e=>{if(S.value=!1,b.value){const t=new FocusEvent("focus",e);we((()=>k(t)))}},ge=()=>{I.value||(o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:S.value=!S.value)},he=t=>Ga(t.value)?fa(t.value,e.valueKey):t.value,ye=T((()=>N.value.filter((e=>e.visible)).every((e=>e.disabled)))),be=T((()=>e.multiple?e.collapseTags?o.selected.slice(0,e.maxCollapseTags):o.selected:[])),_e=T((()=>e.multiple&&e.collapseTags?o.selected.slice(e.maxCollapseTags):[])),ke=e=>{if(S.value){if(0!==o.options.size&&0!==P.value&&!ye.value){"next"===e?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):"prev"===e&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const t=N.value[o.hoveringIndex];!0!==t.disabled&&!0!==t.states.groupDisabled&&t.visible||ke(e),we((()=>ue(w.value)))}}else S.value=!0},Se=T((()=>({maxWidth:`${o.selectionWidth}px`}))),xe=T((()=>({width:`${Math.max(o.calculatorWidth,11)}px`})));return e.multiple&&!Fa(e.modelValue)&&t(cn,[]),!e.multiple&&Fa(e.modelValue)&&t(cn,""),Ja(r,(()=>{o.selectionWidth=r.value.getBoundingClientRect().width})),Ja(p,X),Ja(f,Z),Ja(g,ee),Le((()=>{G()})),{inputId:E,contentId:l,nsSelect:n,nsInput:s,states:o,isFocused:b,expanded:S,optionsArray:N,hoverOption:w,selectSize:j,filteredOptionsCount:P,resetCalculatorWidth:X,updateTooltip:Z,updateTagTooltip:ee,debouncedOnInputChange:le,onInput:ae,deletePrevTag:a=>{if(e.multiple&&a.code!==Ma.delete&&a.target.value.length<=0){const a=e.modelValue.slice(),l=se(a);if(l<0)return;a.splice(l,1),t(cn,a),ne(a)}},deleteTag:(a,l)=>{const n=o.selected.indexOf(l);if(n>-1&&!I.value){const a=e.modelValue.slice();a.splice(n,1),t(cn,a),ne(a),t("remove-tag",l.value)}a.stopPropagation(),me()},deleteSelected:oe,handleOptionSelect:ie,scrollToOption:ue,hasModelValue:M,shouldShowPlaceholder:K,currentPlaceholder:W,showClose:V,iconComponent:O,iconReverse:A,validateState:L,validateIcon:B,showNewOption:z,updateOptions:R,collapseTagSize:U,setSelected:G,selectDisabled:I,emptyText:D,handleCompositionStart:ce,handleCompositionUpdate:de,handleCompositionEnd:pe,onOptionCreate:e=>{o.options.set(e.value,e),o.cachedOptions.set(e.value,e),e.disabled&&o.disabledOptions.set(e.value,e)},onOptionDestroy:(e,t)=>{o.options.get(e)===t&&o.options.delete(e)},handleMenuEnter:()=>{we((()=>ue(o.selected)))},handleFocus:_,focus:me,blur:()=>{fe()},handleBlur:k,handleClearClick:e=>{oe(e)},handleClickOutside:fe,handleEsc:()=>{o.inputValue.length>0?o.inputValue="":S.value=!1},toggleMenu:ge,selectOption:()=>{S.value?N.value[o.hoveringIndex]&&ie(N.value[o.hoveringIndex]):ge()},getValueKey:he,navigateOptions:ke,dropdownMenuVisible:H,showTagList:be,collapseTagList:_e,tagStyle:Se,inputStyle:xe,popperRef:ve,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:p,prefixRef:v,suffixRef:m,selectRef:i,wrapperRef:y,selectionRef:r,scrollbarRef:h,menuRef:f,tagMenuRef:g}};var Ki=j({name:"ElOptions",setup(e,{slots:t}){const a=ce(Fi);let l=[];return()=>{var e,n;const s=null==(e=t.default)?void 0:e.call(t),o=[];return s.length&&function e(t){Fa(t)&&t.forEach((t=>{var a,l,n,s;const i=null==(a=(null==t?void 0:t.type)||{})?void 0:a.name;"ElOptionGroup"===i?e(Na(t.children)||Fa(t.children)||!Ia(null==(l=t.children)?void 0:l.default)?t.children:null==(n=t.children)?void 0:n.default()):"ElOption"===i?o.push(null==(s=t.props)?void 0:s.value):Fa(t.children)&&e(t.children)}))}(null==(n=s[0])?void 0:n.children),Ho(o,l)||(l=o,a&&(a.states.optionValues=o)),s}}});const Wi=Va({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:ja,effect:{type:$a(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:$a(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:sn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Za,default:el},fitInputWidth:Boolean,suffixIcon:{type:Za,default:Ka},tagType:{...ii.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:$a(String),values:on,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),qi="ElSelect",Yi=j({name:qi,componentName:qi,components:{ElInput:vn,ElSelectMenu:Ui,ElOption:ji,ElOptions:Ki,ElTag:di,ElScrollbar:Sn,ElTooltip:rn,ElIcon:Aa},directives:{ClickOutside:Zo},props:Wi,emits:[cn,dn,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const a=Hi(e,t);return je(Fi,We({props:e,states:a.states,optionsArray:a.optionsArray,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy,selectRef:a.selectRef,setSelected:a.setSelected})),{...a}}}),Gi=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Ji=["textContent"];var Qi=La(Yi,[["render",function(e,t,a,l,n,s){const o=Ze("el-tag"),r=Ze("el-tooltip"),u=Ze("el-icon"),c=Ze("el-option"),d=Ze("el-options"),p=Ze("el-scrollbar"),v=Ze("el-select-menu"),m=et("click-outside");return Wt((ze(),V("div",{ref:"selectRef",class:xe([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=t=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=t=>e.states.inputHovering=!1),onClick:t[17]||(t[17]=Gt(((...t)=>e.toggleMenu&&e.toggleMenu(...t)),["stop"]))},[F(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=t=>e.states.isBeforeHide=!1)},{default:Ht((()=>{var a;return[O("div",{ref:"wrapperRef",class:xe([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(ze(),V("div",{key:0,ref:"prefixRef",class:xe(e.nsSelect.e("prefix"))},[Xe(e.$slots,"prefix")],2)):M("v-if",!0),O("div",{ref:"selectionRef",class:xe([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?Xe(e.$slots,"tag",{key:0},(()=>[(ze(!0),V(i,null,Qe(e.showTagList,(t=>(ze(),V("div",{key:e.getValueKey(t),class:xe(e.nsSelect.e("selected-item"))},[F(o,{closable:!e.selectDisabled&&!t.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Te(e.tagStyle),onClose:a=>e.deleteTag(a,t)},{default:Ht((()=>[O("span",{class:xe(e.nsSelect.e("tags-text"))},vt(t.currentLabel),3)])),_:2},1032,["closable","size","type","style","onClose"])],2)))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(ze(),I(r,{key:0,ref:"tagTooltipRef",disabled:!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:Ht((()=>[O("div",{class:xe(e.nsSelect.e("selected-item"))},[F(o,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Te(e.tagStyle)},{default:Ht((()=>[O("span",{class:xe(e.nsSelect.e("tags-text"))}," + "+vt(e.states.selected.length-e.maxCollapseTags),3)])),_:1},8,["size","type","style"])],2)])),content:Ht((()=>[O("div",{ref:"tagMenuRef",class:xe(e.nsSelect.e("selection"))},[(ze(!0),V(i,null,Qe(e.collapseTagList,(t=>(ze(),V("div",{key:e.getValueKey(t),class:xe(e.nsSelect.e("selected-item"))},[F(o,{class:"in-tooltip",closable:!e.selectDisabled&&!t.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:a=>e.deleteTag(a,t)},{default:Ht((()=>[O("span",{class:xe(e.nsSelect.e("tags-text"))},vt(t.currentLabel),3)])),_:2},1032,["closable","size","type","onClose"])],2)))),128))],2)])),_:1},8,["disabled","effect","teleported"])):M("v-if",!0)])):M("v-if",!0),e.selectDisabled?M("v-if",!0):(ze(),V("div",{key:1,class:xe([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[Wt(O("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=t=>e.states.inputValue=t),type:"text",class:xe([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Te(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":(null==(a=e.hoverOption)?void 0:a.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...t)=>e.handleFocus&&e.handleFocus(...t)),onBlur:t[2]||(t[2]=(...t)=>e.handleBlur&&e.handleBlur(...t)),onKeydown:[t[3]||(t[3]=qt(Gt((t=>e.navigateOptions("next")),["prevent"]),["down"])),t[4]||(t[4]=qt(Gt((t=>e.navigateOptions("prev")),["prevent"]),["up"])),t[5]||(t[5]=qt(((...t)=>e.handleEsc&&e.handleEsc(...t)),["esc"])),t[6]||(t[6]=qt(Gt(((...t)=>e.selectOption&&e.selectOption(...t)),["stop","prevent"]),["enter"])),t[7]||(t[7]=qt(Gt(((...t)=>e.deletePrevTag&&e.deletePrevTag(...t)),["stop"]),["delete"])),t[8]||(t[8]=qt((t=>e.expanded=!1),["tab"]))],onCompositionstart:t[9]||(t[9]=(...t)=>e.handleCompositionStart&&e.handleCompositionStart(...t)),onCompositionupdate:t[10]||(t[10]=(...t)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...t)),onCompositionend:t[11]||(t[11]=(...t)=>e.handleCompositionEnd&&e.handleCompositionEnd(...t)),onInput:t[12]||(t[12]=(...t)=>e.onInput&&e.onInput(...t)),onClick:t[13]||(t[13]=Gt((()=>{}),["stop"]))},null,46,Gi),[[Bt,e.states.inputValue]]),e.filterable?(ze(),V("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:xe(e.nsSelect.e("input-calculator")),textContent:vt(e.states.inputValue)},null,10,Ji)):M("v-if",!0)],2)),e.shouldShowPlaceholder?(ze(),V("div",{key:2,class:xe([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[O("span",null,vt(e.currentPlaceholder),1)],2)):M("v-if",!0)],2),O("div",{ref:"suffixRef",class:xe(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(ze(),I(u,{key:0,class:xe([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:Ht((()=>[(ze(),I(tt(e.iconComponent)))])),_:1},8,["class"])):M("v-if",!0),e.showClose&&e.clearIcon?(ze(),I(u,{key:1,class:xe([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:Ht((()=>[(ze(),I(tt(e.clearIcon)))])),_:1},8,["class","onClick"])):M("v-if",!0),e.validateState&&e.validateIcon?(ze(),I(u,{key:2,class:xe([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:Ht((()=>[(ze(),I(tt(e.validateIcon)))])),_:1},8,["class"])):M("v-if",!0)],2)],2)]})),content:Ht((()=>[F(v,{ref:"menuRef"},{default:Ht((()=>[e.$slots.header?(ze(),V("div",{key:0,class:xe(e.nsSelect.be("dropdown","header"))},[Xe(e.$slots,"header")],2)):M("v-if",!0),Wt(F(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:xe([e.nsSelect.is("empty",0===e.filteredOptionsCount)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:Ht((()=>[e.showNewOption?(ze(),I(c,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):M("v-if",!0),F(d,null,{default:Ht((()=>[Xe(e.$slots,"default")])),_:3})])),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Dt,e.states.options.size>0&&!e.loading]]),e.loading||0===e.filteredOptionsCount?Xe(e.$slots,"empty",{key:1},(()=>[O("p",{class:xe(e.nsSelect.be("dropdown","empty"))},vt(e.emptyText),3)])):M("v-if",!0),e.$slots.footer?(ze(),V("div",{key:2,class:xe(e.nsSelect.be("dropdown","footer"))},[Xe(e.$slots,"footer")],2)):M("v-if",!0)])),_:3},512)])),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[m,e.handleClickOutside,e.popperRef]])}],["__file","select.vue"]]),Xi=La(j({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=_a("select"),a=Ye(null),l=ee(),n=Ye([]);je(Ni,We({...yt(e)}));const s=T((()=>n.value.some((e=>!0===e.visible)))),o=e=>{const t=[];return Fa(e.children)&&e.children.forEach((e=>{var a;e.type&&"ElOption"===e.type.name&&e.component&&e.component.proxy?t.push(e.component.proxy):(null==(a=e.children)?void 0:a.length)&&t.push(...o(e))})),t},i=()=>{n.value=o(l.subTree)};return Le((()=>{i()})),tl(a,i,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:s,ns:t}}}),[["render",function(e,t,a,l,n,s){return Wt((ze(),V("ul",{ref:"groupRef",class:xe(e.ns.be("group","wrap"))},[O("li",{class:xe(e.ns.be("group","title"))},vt(e.label),3),O("li",null,[O("ul",{class:xe(e.ns.b("group"))},[Xe(e.$slots,"default")],2)])],2)),[[Dt,e.visible]])}],["__file","option-group.vue"]]);const Zi=Ba(Qi,{Option:ji,OptionGroup:Xi}),er=Ra(ji);Ra(Xi);const tr=j({name:"ElMessageBox",directives:{TrapFocus:oi},components:{ElButton:Rn,ElFocusTrap:un,ElInput:vn,ElOverlay:Vi,ElIcon:Aa,...al},inheritAttrs:!1,props:{buttonSize:{type:String,validator:e=>["",...ya].includes(e)},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:a,zIndex:l,ns:n,size:s}=ll("message-box",T((()=>e.buttonSize))),{t:o}=a,{nextZIndex:i}=l,r=Ye(!1),u=We({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),c=T((()=>{const e=u.type;return{[n.bm("icon",e)]:e&&nl[e]}})),d=Wn(),p=Wn(),v=T((()=>u.icon||nl[u.type]||"")),m=T((()=>!!u.message)),f=Ye(),g=Ye(),h=Ye(),y=Ye(),b=Ye(),_=T((()=>u.confirmButtonClass));Ft((()=>u.inputValue),(async t=>{await we(),"prompt"===e.boxType&&null!==t&&E()}),{immediate:!0}),Ft((()=>r.value),(t=>{var a,l;t&&("prompt"!==e.boxType&&(u.autofocus?h.value=null!=(l=null==(a=b.value)?void 0:a.$el)?l:f.value:h.value=f.value),u.zIndex=i()),"prompt"===e.boxType&&(t?we().then((()=>{var e;y.value&&y.value.$el&&(u.autofocus?h.value=null!=(e=I())?e:f.value:h.value=f.value)})):(u.editorErrorMessage="",u.validateError=!1))}));const k=T((()=>e.draggable));function S(){r.value&&(r.value=!1,we((()=>{u.action&&t("action",u.action)})))}((e,t,a)=>{let l={offsetX:0,offsetY:0};const n=t=>{const a=t.clientX,n=t.clientY,{offsetX:s,offsetY:o}=l,i=e.value.getBoundingClientRect(),r=i.left,u=i.top,c=i.width,d=i.height,p=document.documentElement.clientWidth,v=document.documentElement.clientHeight,m=-r+s,f=-u+o,g=p-r-c+s,h=v-u-d+o,y=t=>{const i=Math.min(Math.max(s+t.clientX-a,m),g),r=Math.min(Math.max(o+t.clientY-n,f),h);l={offsetX:i,offsetY:r},e.value&&(e.value.style.transform=`translate(${ba(i)}, ${ba(r)})`)},b=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b)},s=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",n)};Le((()=>{zt((()=>{a.value?t.value&&e.value&&t.value.addEventListener("mousedown",n):s()}))})),Me((()=>{s()}))})(f,g,k),Le((async()=>{await we(),e.closeOnHashChange&&window.addEventListener("hashchange",S)})),Me((()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",S)}));const w=()=>{e.closeOnClickModal&&C(u.distinguishCancelAndClose?"close":"cancel")},x=Go(w),C=t=>{var a;("prompt"!==e.boxType||"confirm"!==t||E())&&(u.action=t,u.beforeClose?null==(a=u.beforeClose)||a.call(u,t,u,S):S())},E=()=>{if("prompt"===e.boxType){const e=u.inputPattern;if(e&&!e.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;const t=u.inputValidator;if("function"==typeof t){const e=t(u.inputValue);if(!1===e)return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;if("string"==typeof e)return u.editorErrorMessage=e,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},I=()=>{const e=y.value.$refs;return e.input||e.textarea},M=()=>{C("close")};return e.lockScroll&&((e,t={})=>{fe(e)||_n("[useLockscreen]","You need to pass a ref param to this function");const a=t.ns||_a("popup"),l=ka((()=>a.bm("parent","hidden")));if(!ha||Sa(document.body,l.value))return;let n=0,s=!1,o="0";const i=()=>{setTimeout((()=>{Ca(null==document?void 0:document.body,l.value),s&&document&&(document.body.style.width=o)}),200)};Ft(e,(e=>{if(!e)return void i();s=!Sa(document.body,l.value),s&&(o=document.body.style.width),n=(e=>{var t;if(!ha)return 0;if(void 0!==Ko)return Ko;const a=document.createElement("div");a.className=`${e}-scrollbar__wrap`,a.style.visibility="hidden",a.style.width="100px",a.style.position="absolute",a.style.top="-9999px",document.body.appendChild(a);const l=a.offsetWidth;a.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%",a.appendChild(n);const s=n.offsetWidth;return null==(t=a.parentNode)||t.removeChild(a),Ko=l-s,Ko})(a.namespace.value);const t=document.documentElement.clientHeight<document.body.scrollHeight,r=wa(document.body,"overflowY");n>0&&(t||"scroll"===r)&&s&&(document.body.style.width=`calc(100% - ${n}px)`),xa(document.body,l.value)})),De((()=>i()))})(r),{...yt(u),ns:n,overlayEvent:x,visible:r,hasMessage:m,typeClass:c,contentId:d,inputId:p,btnSize:s,iconComponent:v,confirmButtonClasses:_,rootRef:f,focusStartRef:h,headerRef:g,inputRef:y,confirmRef:b,doClose:S,handleClose:M,onCloseRequested:()=>{e.closeOnPressEscape&&M()},handleWrapperClick:w,handleInputEnter:e=>{if("textarea"!==u.inputType)return e.preventDefault(),C("confirm")},handleAction:C,t:o}}}),ar=["aria-label","aria-describedby"],lr=["aria-label"],nr=["id"];var sr=La(tr,[["render",function(e,t,a,l,n,s){const o=Ze("el-icon"),i=Ze("close"),r=Ze("el-input"),u=Ze("el-button"),c=Ze("el-focus-trap"),d=Ze("el-overlay");return ze(),I(f,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=t=>e.$emit("vanish")),persisted:""},{default:Ht((()=>[Wt(F(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:Ht((()=>[O("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:xe(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...t)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...t)),onMousedown:t[9]||(t[9]=(...t)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...t)),onMouseup:t[10]||(t[10]=(...t)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...t))},[F(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:Ht((()=>[O("div",{ref:"rootRef",class:xe([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Te(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Gt((()=>{}),["stop"]))},[null!==e.title&&void 0!==e.title?(ze(),V("div",{key:0,ref:"headerRef",class:xe(e.ns.e("header"))},[O("div",{class:xe(e.ns.e("title"))},[e.iconComponent&&e.center?(ze(),I(o,{key:0,class:xe([e.ns.e("status"),e.typeClass])},{default:Ht((()=>[(ze(),I(tt(e.iconComponent)))])),_:1},8,["class"])):M("v-if",!0),O("span",null,vt(e.title),1)],2),e.showClose?(ze(),V("button",{key:0,type:"button",class:xe(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=t=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=qt(Gt((t=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),["prevent"]),["enter"]))},[F(o,{class:xe(e.ns.e("close"))},{default:Ht((()=>[F(i)])),_:1},8,["class"])],42,lr)):M("v-if",!0)],2)):M("v-if",!0),O("div",{id:e.contentId,class:xe(e.ns.e("content"))},[O("div",{class:xe(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(ze(),I(o,{key:0,class:xe([e.ns.e("status"),e.typeClass])},{default:Ht((()=>[(ze(),I(tt(e.iconComponent)))])),_:1},8,["class"])):M("v-if",!0),e.hasMessage?(ze(),V("div",{key:1,class:xe(e.ns.e("message"))},[Xe(e.$slots,"default",{},(()=>[e.dangerouslyUseHTMLString?(ze(),I(tt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(ze(),I(tt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:Ht((()=>[N(vt(e.dangerouslyUseHTMLString?"":e.message),1)])),_:1},8,["for"]))]))],2)):M("v-if",!0)],2),Wt(O("div",{class:xe(e.ns.e("input"))},[F(r,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=t=>e.inputValue=t),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:xe({invalid:e.validateError}),onKeydown:qt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),O("div",{class:xe(e.ns.e("errormsg")),style:Te({visibility:e.editorErrorMessage?"visible":"hidden"})},vt(e.editorErrorMessage),7)],2),[[Dt,e.showInput]])],10,nr),O("div",{class:xe(e.ns.e("btns"))},[e.showCancelButton?(ze(),I(u,{key:0,loading:e.cancelButtonLoading,class:xe([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=t=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=qt(Gt((t=>e.handleAction("cancel")),["prevent"]),["enter"]))},{default:Ht((()=>[N(vt(e.cancelButtonText||e.t("el.messagebox.cancel")),1)])),_:1},8,["loading","class","round","size"])):M("v-if",!0),Wt(F(u,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:xe([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=t=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=qt(Gt((t=>e.handleAction("confirm")),["prevent"]),["enter"]))},{default:Ht((()=>[N(vt(e.confirmButtonText||e.t("el.messagebox.confirm")),1)])),_:1},8,["loading","class","round","disabled","size"]),[[Dt,e.showConfirmButton]])],2)],6)])),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,ar)])),_:3},8,["z-index","overlay-class","mask"]),[[Dt,e.visible]])])),_:3})}],["__file","index.vue"]]);const or=new Map,ir=(e,t)=>{const a=document.createElement("div");e.onVanish=()=>{Je(null,a),or.delete(n)},e.onAction=t=>{const a=or.get(n);let s;s=e.showInput?{value:n.inputValue,action:t}:t,e.callback?e.callback(s,l.proxy):"cancel"===t||"close"===t?e.distinguishCancelAndClose&&"cancel"!==t?a.reject("close"):a.reject("cancel"):a.resolve(s)};const l=((e,t,a=null)=>{const l=F(sr,e,Ia(e.message)||ye(e.message)?{default:Ia(e.message)?e.message:()=>e.message}:null);return l.appContext=a,Je(l,t),(e=>{let t=document.body;return e.appendTo&&(Na(e.appendTo)&&(t=document.querySelector(e.appendTo)),Ea(e.appendTo)&&(t=e.appendTo),Ea(t)||(t=document.body)),t})(e).appendChild(t.firstElementChild),l.component})(e,a,t),n=l.proxy;for(const s in e)sl(e,s)&&!sl(n.$props,s)&&(n[s]=e[s]);return n.visible=!0,n};function rr(e,t=null){if(!ha)return Promise.reject();let a;return Na(e)||ye(e)?e={message:e}:a=e.callback,new Promise(((l,n)=>{const s=ir(e,null!=t?t:rr._context);or.set(s,{options:e,callback:a,resolve:l,reject:n})}))}const ur={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};["alert","confirm","prompt"].forEach((e=>{rr[e]=function(e){return(t,a,l,n)=>{let s="";return Ga(a)?(l=a,s=""):s=Ha(a)?"":a,rr(Object.assign({title:s,message:t,type:"",...ur[e]},l,{boxType:e}),n)}}(e)})),rr.close=()=>{or.forEach(((e,t)=>{t.doClose()})),or.clear()},rr._context=null;const cr=rr;cr.install=e=>{cr._context=e._context,e.config.globalProperties.$msgbox=cr,e.config.globalProperties.$messageBox=cr,e.config.globalProperties.$alert=cr.alert,e.config.globalProperties.$confirm=cr.confirm,e.config.globalProperties.$prompt=cr.prompt};const dr=cr,pr="/assets/icon-used-progress-OPXO4O9l.svg",vr={class:"current-plan"},mr={class:"title"},fr={class:"plan-name"},gr={key:0,class:"icon-star",src:"/assets/icon-star-16-eEkVyoew.svg"},hr={class:"plan-container"},yr={class:"plan-used-item pdfs"},br={class:"name"},_r={class:"used-wrapper"},kr={class:"plan-name"},Sr={class:"used"},wr={src:pr},xr={src:pr},Cr={class:"plan-used-item questions"},Tr={class:"name"},Er={class:"used-wrapper questions"},Ir={class:"plan-name"},Mr={class:"used"},Vr={src:pr},Or={src:pr},Ar={class:"plan-table"},Lr={border:"0",cellspacing:"0"},Br={class:"vip"},$r={class:"unlimited"},Dr={class:"vip"},Pr={class:"vip"},Nr={class:"vip"},Fr={class:"vip"},zr={class:"vip"},Rr={class:"vip"},jr=ol({__name:"plan",emits:["on-close"],setup(e,{emit:t}){const a=t,l=T((()=>tn.planUsage)),n=T((()=>tn.isVip)),s=T((()=>tn.isUnlimited));T((()=>{var e;return(null==(e=tn.userInfo)?void 0:e.companyUser)||!1}));const o=T((()=>{const e=tn.planNums.file_nums-tn.planUsed.file_nums;return e>=0?e:0})),i=T((()=>{const e=tn.planNums.chat_nums-tn.planUsed.chat_nums;return e>=0?e:0})),r=T((()=>s.value?1:parseInt(tn.planUsed.file_nums/(tn.planNums.file_nums||1)*100))),u=T((()=>s.value?1:parseInt(tn.planUsed.chat_nums/(tn.planNums.chat_nums||1)*100))),c=T((()=>!n.value||!s.value&&(tn.planUsed.file_nums>=tn.planNums.file_nums||tn.planUsed.chat_nums>=tn.planNums.chat_nums)));return Le((()=>{})),(e,t)=>{var d,p,v,m,f,g,h,y,b,_,k,S;const w=et("svg-inline");return ze(),V("div",{class:xe(["plan-wrapper",{vip:n.value,unlimited:s.value}])},[O("p",vr,[O("span",mr,vt(e.$t("Current Plan")),1),O("span",fr,[n.value&&!s.value?(ze(),V("img",gr)):M("",!0),N(" "+vt(n.value&&s.value?e.$t("Unlimited"):n.value?e.$t("Standard"):e.$t("FREE")),1)])]),O("div",hr,[O("div",yr,[O("span",br,vt(e.$t("PDF Files")),1),O("div",_r,[O("span",kr,vt(s.value?e.$t("ai_quantity_Unlimited"):`${o.value} / ${St(tn).planNums.file_nums}`),1),O("div",Sr,[Wt(O("img",wr,null,512),[[w]]),O("div",{class:"used-progress",style:Te({width:`${r.value}%`})},[Wt(O("img",xr,null,512),[[w]])],4)])])]),O("div",Cr,[O("span",Tr,vt(e.$t("Questions")),1),O("div",Er,[O("span",Ir,vt(s.value?e.$t("ai_quantity_Unlimited"):`${i.value} / ${St(tn).planNums.chat_nums}`),1),O("div",Mr,[Wt(O("img",Vr,null,512),[[w]]),O("div",{class:"used-progress",style:Te({width:`${u.value}%`})},[Wt(O("img",Or,null,512),[[w]])],4)])])]),O("div",Ar,[O("table",Lr,[O("tr",null,[O("th",null,vt(e.$t("Benefits")),1),O("th",null,vt(e.$t("FREE")),1),O("th",Br,vt(e.$t("Standard")),1),O("th",$r,vt(e.$t("Unlimited")),1)]),O("tr",null,[O("td",null,vt(e.$t("PDF Files")),1),O("td",null,vt(null==(d=l.value.free)?void 0:d.file_nums),1),O("td",Dr,vt(null==(p=l.value.pro)?void 0:p.file_nums)+vt(e.$t("/mo.")),1),O("td",{class:xe(["vip",{unlimited:-1===(null==(v=l.value.unlimited)?void 0:v.file_nums)}])},null,2)]),O("tr",null,[O("td",null,vt(e.$t("Questions")),1),O("td",null,vt(null==(m=l.value.free)?void 0:m.chat_nums),1),O("td",Pr,vt(null==(f=l.value.pro)?void 0:f.chat_nums)+vt(e.$t("/mo.")),1),O("td",{class:xe(["vip",{unlimited:-1===(null==(g=l.value.unlimited)?void 0:g.file_nums)}])},null,2)]),O("tr",null,[O("td",null,vt(e.$t("PDF Size")),1),O("td",null,vt(St(il)(null==(h=l.value.free)?void 0:h.file_size))+"/PDF",1),O("td",Nr,vt(St(il)(null==(y=l.value.pro)?void 0:y.file_size))+"/PDF",1),O("td",Fr,vt(St(il)(null==(b=l.value.unlimited)?void 0:b.file_size))+"/PDF",1)]),O("tr",null,[O("td",null,vt(e.$t("PDF Pages")),1),O("td",null,vt(null==(_=l.value.free)?void 0:_.file_pages)+"/PDF",1),O("td",zr,vt(null==(k=l.value.pro)?void 0:k.file_pages)+"/PDF",1),O("td",Rr,vt(null==(S=l.value.unlimited)?void 0:S.file_pages)+"/PDF",1)])])]),c.value?(ze(),V("button",{key:0,class:"bottom-btn btn-upgrade hover-translate",onClick:t[0]||(t[0]=e=>(()=>{const e=en.getCheckoutUrl();a("on-close"),window.open(e)})())},vt(e.$t("Upgrade")),1)):(ze(),V("button",{key:1,class:"bottom-btn hover-translate",onClick:t[1]||(t[1]=e=>(rl(),void a("on-close")))},vt(e.$t("View My Account")),1))])],2)}}},[["__scopeId","data-v-040e598c"]]),Ur=(e=>(He("data-v-82438c34"),e=e(),Re(),e))((()=>O("img",{class:"emoji",src:"/assets/icon-emoji-han-4ZEGpkWC.png"},null,-1))),Hr={key:0,class:"desc"},Kr={key:1,class:"desc"},Wr={key:2,class:"desc"},qr={key:3,class:"desc"},Yr=ol({__name:"plan-exceed",props:{exceedType:{type:String,default:"chat_num"}},emits:["on-close"],setup(e,{emit:t}){const a=e;Ye(null);const l=Ye("0");return Le((()=>{we((()=>{var e;const t=(null==(e=document.querySelector(".plan-wrapper"))?void 0:e.clientWidth)||324;t&&(l.value=t+"px")}))})),(e,t)=>(ze(),V(i,null,[a.exceedType?(ze(),V("div",{key:0,class:"tip",style:Te({width:`${l.value}`})},[Ur,a.exceedType===St(ul).chat_num?(ze(),V("p",Hr,vt(e.$t("Sorry, you have exceeded the maximum number of conversations, please refer to the Benefits panel.")),1)):a.exceedType===St(ul).file_num?(ze(),V("p",Kr,vt(e.$t("Sorry, you have exceeded the maximum number of files allowed to be uploaded, please check the Benefits panel.")),1)):a.exceedType===St(ul).file_size?(ze(),V("p",Wr,vt(e.$t("Sorry, you have exceeded the maximum size of file allowed to be uploaded, please check the Benefits panel.")),1)):a.exceedType===St(ul).file_page?(ze(),V("p",qr,vt(e.$t("Sorry, you have exceeded the maximum number of pages allowed to be uploaded, please check the Benefits panel.")),1)):M("",!0)],4)):M("",!0),F(jr)],64))}},[["__scopeId","data-v-82438c34"]]),Gr="/assets/icon-user-inf-about-ZAm5GCOl.svg",Jr=ol({__name:"plan-name",setup(e){const{$t:t}=ee().proxy,a=T((()=>tn.isVip)),l=T((()=>tn.isUnlimited)),n=T((()=>l.value?t("Unlimited"):a.value?t("Standard"):t("FREE")));return Le((()=>{})),(e,t)=>(ze(),V("button",{class:xe(["plan-btn",{unlimited:l.value,vip:a.value&&!l.value}])},[O("span",null,vt(n.value),1)],2))}},[["__scopeId","data-v-03c339c1"]]),Qr=["accept"],Xr={__name:"upload-app-file",props:{acceptType:{type:String||Array,default:cl.all},acceptExts:{type:Array,default:()=>[]},fileType:{type:String,default:"tmp"},dir:{type:String,default:"feedback"},uploadedFiles:{type:Array,default:()=>[]}},emits:["on-select","on-progress","on-success","on-error"],setup(e,{emit:t}){const a=e,l=t,n=Ye(!1),s=T((()=>{if(a.acceptExts.length)return a.acceptExts;if(dl(a.acceptType)){const e=[];return a.acceptType.forEach((t=>{e.push(...pl[t])})),e}return pl[a.acceptType]})),o=T((()=>{var e;return null==(e=s.value)?void 0:e.map((e=>`.${e}`)).join(",")})),i={},r=async e=>{const t=e.target.files[0];e.target.value="";const o=t.name.split(".").pop();if(!s.value.includes(o))return vl.error($t("Upload of this file type is not supported.")),!1;const r={fileType:a.fileType},u=2147483648;if(t.size>u)return vl.error(sprintf($t("Your file is too large, the maximum file size is %s."),il(u))),!1;n.value=!0,l("on-select",t);const c=await ml(t);if(a.uploadedFiles.filter((e=>e.hash===c)).length)return n.value=!1,!1;try{if(!i.accessKeyId||1e3*i.expiration<(new Date).getTime()){const{data:e}=await fl(r);Object.assign(i,e)}const e=i.endpoint.includes("oss-cn-hangzhou")?en.ossApp["cn-east"]:en.ossApp["us-east"],n=new wn({region:e.region,accessKeyId:i.accessKeyId,accessKeySecret:i.accessKeySecret,stsToken:i.securityToken,refreshSTSTokenInterval:36e5,refreshSTSToken:async()=>{const{data:e}=await fl(r);return{accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,stsToken:e.securityToken}},bucket:i.bucketName}),s={progress:(e,t,a)=>{const n=parseInt(100*e);l("on-progress",n)},parallel:4,partSize:1048576,mime:t.type},{data:o}=await gl({dir:a.dir,fileName:t.name}),u=(await n.multipartUpload(o.remotePath,t,s),await hl(t)),d=t.name.split(".").pop().toLowerCase();l("on-success",{url:u,size:t.size,name:t.name,ext:d,hash:c,...o})}catch(d){}n.value=!1};return(e,t)=>{const a=nn;return Wt((ze(),V("div",{class:xe({loading:n.value})},[Xe(e.$slots,"default",{},void 0,!0),Wt(O("input",{type:"file",accept:o.value,title:"",onChange:r},null,40,Qr),[[Dt,!n.value]])],2)),[[a,n.value]])}}},Zr=ol(Xr,[["__scopeId","data-v-0d044b53"]]),eu=e=>(He("data-v-ddc2b47e"),e=e(),Re(),e),tu={class:"feedback-container"},au={class:"feedback-rate"},lu=[eu((()=>O("img",{src:"/assets/icon-feedback-1-dnP0CvQO.png"},null,-1)))],nu=[eu((()=>O("img",{src:"/assets/icon-feedback-2-2wnMIYSY.png"},null,-1)))],su=[eu((()=>O("img",{src:"/assets/icon-feedback-3-EjXPUW06.png"},null,-1)))],ou=[eu((()=>O("img",{src:"/assets/icon-feedback-4-LcaEtK8b.png"},null,-1)))],iu=[eu((()=>O("img",{src:"/assets/icon-feedback-5-fogWQlz2.png"},null,-1)))],ru={key:0,class:"file-list"},uu=["title"],cu={class:"file-icon",src:"/assets/icon-file-2i3VEhPH.svg"},du={class:"file-name"},pu={class:"file-size"},vu=["onClick"],mu=[eu((()=>O("img",{src:bn},null,-1)))],fu={key:0,class:"file-viewer"},gu=["src"],hu=["title"],yu={class:"file-size"},bu=eu((()=>O("img",{src:"/assets/icon-link-urrgHj_S.png",alt:""},null,-1))),_u=ol({__name:"feedback",setup(e,{expose:t}){var a,l;const{$t:n}=ee().proxy,s=Ye(!1);t({show:()=>{s.value=!0}});const o=Ye(null),r=Ye(2),u=["Very Dissatisfied","Dissatisfied","Neutral","Satisfied","Very Satisfied"],c=Ye(""),d=Ye(null==(a=tn.userInfo)?void 0:a.email),p=it([]);We({content:"",remotePaths:[],system:"",build:"",email:null==(l=tn.userInfo)?void 0:l.email,questionType:"Other"});const v=T((()=>d.value.trim()&&c.value.trim())),m=Ye(!1),f=e=>{p.push(e)},g=async()=>{let e=c.value.trim();const t=d.value.trim();if(!t)return vl.error(n("Please correctly fill in your email address.")),!1;if(!yl("email",t))return vl.error(n("Invalid email address, please re-enter.")),!1;if(!e)return vl.error(n("Please provide detailed feedback content.")),!1;const a=p.map((e=>({fileName:e.name,remotePath:e.name})));e=`${e}\n\nUserAgent: ${navigator.userAgent}\n\nRate: ${u[r.value]}\n\nUID: ${tn.uid}\n  `;const l={content:e,remotePaths:a,system:bl()+"-WEBAI",build:an.version,email:d.value,questionType:"Other"};o.value.startBtnLoading();try{await _l(l),vl.success(n("Hello, we have received your feedback and will respond to you as soon as possible. Please be patient, and thank you for your understanding.")),c.value="",r.value=2,p.splice(0,p.length),s.value=!1}catch(i){vl.error((null==i?void 0:i.msg)||n("Submission Failed"))}o.value.stopBtnLoading()};return Le((()=>{})),(e,t)=>{const a=rn,l=vn,u=et("svg-inline");return ze(),I(Ql,{ref_key:"refDialog",ref:o,modelValue:s.value,"onUpdate:modelValue":t[10]||(t[10]=e=>s.value=e),title:St(n)("Feedback"),"cancel-text":St(n)("Later"),"confirm-text":St(n)("Submit"),"confirm-disabled":!v.value,"show-footer":!0,width:"80%","max-width":"4.2rem",onOnCancel:t[11]||(t[11]=e=>s.value=!1),onOnConfirm:g},{footerLeft:Ht((()=>[F(a,{visible:m.value,placement:"bottom",effect:"dark",content:St(n)("Attachment")},{default:Ht((()=>[F(Zr,{class:"insert-file","uploaded-files":St(p),onOnSuccess:f,onMouseenter:t[7]||(t[7]=e=>m.value=!0),onMouseout:t[8]||(t[8]=e=>m.value=!1),onClick:t[9]||(t[9]=e=>m.value=!1)},{default:Ht((()=>[bu])),_:1},8,["uploaded-files"])])),_:1},8,["visible","content"])])),default:Ht((()=>[O("div",tu,[O("ul",au,[F(a,{placement:"top",effect:"dark","hide-after":0,content:St(n)("Very Dissatisfied")},{default:Ht((()=>[O("li",{class:xe({active:0===r.value}),onClick:t[0]||(t[0]=e=>r.value=0)},lu,2)])),_:1},8,["content"]),F(a,{placement:"top",effect:"dark","hide-after":0,content:St(n)("Dissatisfied")},{default:Ht((()=>[O("li",{class:xe({active:1===r.value}),onClick:t[1]||(t[1]=e=>r.value=1)},nu,2)])),_:1},8,["content"]),F(a,{placement:"top",effect:"dark","hide-after":0,content:St(n)("Neutral")},{default:Ht((()=>[O("li",{class:xe({active:2===r.value}),onClick:t[2]||(t[2]=e=>r.value=2)},su,2)])),_:1},8,["content"]),F(a,{placement:"top",effect:"dark","hide-after":0,content:St(n)("Satisfied")},{default:Ht((()=>[O("li",{class:xe({active:3===r.value}),onClick:t[3]||(t[3]=e=>r.value=3)},ou,2)])),_:1},8,["content"]),F(a,{placement:"top",effect:"dark","hide-after":0,content:St(n)("Very Satisfied")},{default:Ht((()=>[O("li",{class:xe({active:4===r.value}),onClick:t[4]||(t[4]=e=>r.value=4)},iu,2)])),_:1},8,["content"])]),F(l,{modelValue:d.value,"onUpdate:modelValue":t[5]||(t[5]=e=>d.value=e),placeholder:St(n)("Your email"),class:"email"},null,8,["modelValue","placeholder"]),F(l,{modelValue:c.value,"onUpdate:modelValue":t[6]||(t[6]=e=>c.value=e),resize:"none",placeholder:St(n)("Is there anything we can help you with?"),class:"message",type:"textarea",rows:10},null,8,["modelValue","placeholder"]),St(p).length?(ze(),V("ul",ru,[(ze(!0),V(i,null,Qe(St(p),((e,t)=>(ze(),V("li",{key:t,title:e.name},[Wt(O("img",cu,null,512),[[u]]),O("span",du,vt(e.name),1),O("span",pu,vt(St(il)(e.size)),1),O("button",{class:"close",onClick:Gt((e=>{return a=t,void p.splice(a,1);var a}),["stop"])},mu,8,vu),["jpg","jpeg","png","gif"].includes(e.ext)?(ze(),V("div",fu,[O("img",{src:e.url,alt:""},null,8,gu),O("p",{class:"file-name",title:e.name},vt(e.name),9,hu),O("p",yu,vt(St(il)(e.size)),1)])):M("",!0)],8,uu)))),128))])):M("",!0)])])),_:1},8,["modelValue","title","cancel-text","confirm-text","confirm-disabled"])}}},[["__scopeId","data-v-ddc2b47e"]]),ku=e=>(He("data-v-f76d2adf"),e=e(),Re(),e),Su={class:"nickname"},wu=ku((()=>O("span",{class:"icon-dropdown"},null,-1))),xu={class:"right"},Cu={class:"nickname"},Tu={class:"name"},Eu={class:"type"},Iu={class:"email"},Mu={key:0,class:"user-plan"},Vu={class:"title"},Ou={class:"plan-list"},Au={class:"plan-item"},Lu={class:"plan-type"},Bu=ku((()=>O("img",{src:"/assets/icon-file-num-oRbn8P69.png"},null,-1))),$u={class:"plan-item"},Du={class:"plan-type"},Pu=ku((()=>O("img",{src:"/assets/icon-chat-num-uMr5bbt_.png"},null,-1))),Nu={key:1,class:"user-controls"},Fu={class:"controls-item no-hover"},zu={class:"icon",src:"/assets/icon-language-24-5q4pc4Vs.svg"},Ru=["data-lang"],ju={class:"user-controls"},Uu={class:"icon",src:Gr},Hu={class:"icon",src:"/assets/icon-user-inf-help-m76oo5vY.svg"},Ku={class:"user-controls"},Wu={class:"icon",src:"/assets/icon-user-inf-logout-NDT-HBMA.svg"},qu=ku((()=>O("img",{src:"/assets/icon-download-Jhu3Z2TW.png",alt:""},null,-1))),Yu={class:"title"},Gu={class:"desc"},Ju=ol({__name:"info",setup(e){const{locale:t}=kl.global,a=Ye(!1),l=T((()=>{var e;return(null==(e=tn.planNums)?void 0:e.file_nums)||1})),n=T((()=>{var e;return(null==(e=tn.planNums)?void 0:e.chat_nums)||1})),s=T((()=>{var e,t;const a=((null==(e=tn.planNums)?void 0:e.file_nums)||0)-((null==(t=tn.planUsed)?void 0:t.file_nums)||0);return a>=0?a:0})),o=T((()=>{var e,t;const a=((null==(e=tn.planNums)?void 0:e.chat_nums)||0)-((null==(t=tn.planUsed)?void 0:t.chat_nums)||0);return a>=0?a:0})),r=T((()=>parseInt(s.value/l.value*100))),u=T((()=>parseInt(o.value/n.value*100))),c=()=>{a.value=!a.value,a.value&&Cl()},d=()=>{rl()},p=()=>{Tl()},v=e=>{const t=en.localeLangs[an.language].websiteHome+e;window.open(t)},m=Ye(null),f=()=>{m.value.show()},g=Ye(!1),h=e=>{const a=e.target.dataset.lang;t.value=a,an.language=a,El("language",a),g.value=!1};return(e,t)=>{var y,b;const _=et("svg-inline");return ze(),V(i,null,[O("div",{class:"user-info-container",onClick:c},[O("div",{class:xe(["user-info-small",{active:a.value}])},[O("span",{class:"avatar",style:Te({backgroundImage:`url(${null==(y=St(tn).userInfo)?void 0:y.headerImg})`})},null,4),O("span",Su,vt(null==(b=St(tn).userInfo)?void 0:b.nickName),1),wu],2),F(gn,{class:"user-info-prompt","transition-name":"fade-bottom",modelValue:a.value,"onUpdate:modelValue":t[5]||(t[5]=e=>a.value=e),position:"bottom right","close-btn":!1,"click-outside-hidden":!0,onOnClose:t[6]||(t[6]=e=>g.value=!1)},{default:Ht((()=>{var a,c,m,y;return[O("div",{class:"user-info-large",onClick:d},[O("div",{class:"avatar",style:Te({backgroundImage:`url(${null==(a=St(tn).userInfo)?void 0:a.headerImg})`})},null,4),O("div",xu,[O("div",Cu,[O("span",Tu,vt(null==(c=St(tn).userInfo)?void 0:c.nickName),1),F(Jr,{class:"plan-name"})]),O("div",Eu,vt((null==(m=St(tn).userInfo)?void 0:m.companyUser)?e.$t("Company Account"):e.$t("Personal Account")),1),O("div",Iu,vt(null==(y=St(tn).userInfo)?void 0:y.email),1)])]),St(tn).isUnlimited?M("",!0):(ze(),V("div",Mu,[O("div",Vu,[O("b",null,vt(e.$t("Benefits")),1),St(tn).isVip?M("",!0):(ze(),V("button",{key:0,class:"upgrade",onClick:t[0]||(t[0]=e=>St(Sl)())},vt(e.$t("Upgrade")),1))]),O("div",Ou,[O("div",Au,[O("p",Lu,[Bu,N(vt(e.$t("PDF Files"))+": "+vt(s.value)+" / "+vt(l.value),1)]),O("p",{class:"plan-percent",style:Te(`--last-percent: ${r.value}%; --bg: #3EDF9C;`)},null,4)]),O("div",$u,[O("p",Du,[Pu,N(vt(e.$t("Questions"))+": "+vt(o.value)+" / "+vt(n.value),1)]),O("p",{class:"plan-percent",style:Te(`--last-percent: ${u.value}%; --bg: #1D92FF;`)},null,4)])])])),St(an).isCN?M("",!0):(ze(),V("div",Nu,[O("div",Fu,[Wt(O("img",zu,null,512),[[_]]),N(" "+vt(e.$t("Language"))+" ",1),O("button",{class:xe(["change-language has-bg",{focused:g.value}]),onClick:t[2]||(t[2]=Gt((e=>g.value=!g.value),["stop"]))},[N("   "),O("span",null,vt(St(xl)(St(wl)[St(an).language])),1),O("span",{class:xe(["dropdown",{focus:g.value}])},null,2),F(gn,{class:"select-language",modelValue:g.value,"onUpdate:modelValue":t[1]||(t[1]=e=>g.value=e),position:"bottom right","auto-set-position":!0,"click-outside-hidden":!0,"close-btn":!1},{default:Ht((()=>[F(hn,{class:"select-language-viewer",y:!0},{default:Ht((()=>[O("ul",{onClick:Gt(h,["stop"])},[(ze(!0),V(i,null,Qe(St(an).languages,((t,a)=>(ze(),V("li",{key:a,"data-lang":t},vt(e.$t(St(wl)[t])),9,Ru)))),128))])])),_:1})])),_:1},8,["modelValue"])],2)])])),O("div",ju,[O("div",{class:"controls-item",onClick:t[3]||(t[3]=e=>v(""))},[Wt(O("img",Uu,null,512),[[_]]),N(" "+vt(e.$t("About UPDF")),1)]),O("div",{class:"controls-item",onClick:f},[Wt(O("img",Hu,null,512),[[_]]),N(" "+vt(e.$t("Feedback")),1)])]),O("div",Ku,[O("div",{class:"controls-item",onClick:p},[Wt(O("img",Wu,null,512),[[_]]),N(" "+vt(e.$t("Sign Out")),1)])]),O("div",{class:"download-container",onClick:t[4]||(t[4]=e=>v("download"))},[qu,O("p",Yu,vt(e.$t("Download the UPDF Client")),1),O("p",Gu,vt(e.$t("Enhance your PDF editing experience with our advanced UPDF client. Download now!")),1)])]})),_:1},8,["modelValue"])]),F(_u,{ref_key:"refFeedBack",ref:m},null,512)],64)}}},[["__scopeId","data-v-f76d2adf"]]),Qu={class:"chat-header"},Xu={src:"/assets/icon-menu-Z6lJ6Uc0.svg"},Zu=["disabled"],ec={src:"/assets/icon-delete-O3LTRBFi.svg"},tc=(e=>(He("data-v-492095f8"),e=e(),Re(),e))((()=>O("div",{class:"logo"},"UPDF AI",-1))),ac=ol({__name:"chat-header",setup(e){const{$t:t,$bus:a}=ee().proxy,l=()=>{dr.confirm(t("Would you like to delete this conversation?"),{type:"info",confirmButtonText:t("Confirm Delete"),cancelButtonText:t("Cancel")}).then((()=>{ln.chatId&&In(ln.chatId).then((e=>{})).catch((e=>{}))}))},n=T((()=>ln.chatTalkStatus!==Il.noAsk)),s=()=>{a.emit("on-taggle-left-nav")};return(e,a)=>{const o=rn,i=et("svg-inline");return ze(),V("div",Qu,[O("button",{class:"icon-menu right-line",onClick:s},[Wt(O("img",Xu,null,512),[[i]])]),F(o,{placement:"bottom",effect:"dark",content:St(t)("Clear Conversation"),disabled:n.value},{default:Ht((()=>[O("button",{onClick:l,disabled:n.value},[Wt(O("img",ec,null,512),[[i]])],8,Zu)])),_:1},8,["content","disabled"]),tc,F(Ju,{class:"user-info-btn"})])}}},[["__scopeId","data-v-492095f8"]]),lc={class:"logo-loading",src:"/assets/icon-logo-loading-Zldfhp7J.svg"},nc=ol({},[["render",function(e,t){const a=et("svg-inline");return Wt((ze(),V("img",lc,null,512)),[[a]])}],["__scopeId","data-v-b7ad56e9"]]),sc={key:0,class:"message-controls"},oc={key:0,class:"left"},ic={src:"/assets/icon-like--6ASaQbm.svg"},rc={src:"/assets/icon-unlike-IKl2dJt5.svg"},uc={class:"right"},cc={src:Gr},dc={src:"/assets/icon-regenerate-EKcnUAK-.svg"},pc={src:"/assets/icon-copy-3B3hV_EO.svg"},vc={__name:"message-controls",props:{message:{type:Object,default:()=>{}},messageIndex:{type:Number,default:0}},emits:["on-show-talk-history"],setup(e,{emit:t}){const{$t:a,$bus:l}=ee().proxy,n=e,s=t,o=T((()=>n.message)),i=Ye(0),r=Ye(0),u=T((()=>0===r.value?a("Copy"):a("Copied"))),c=(e,t,a)=>{const l=a===t?Vl.default:t;Mn(e,l).then((e=>{}))};return(e,t)=>{const d=rn,p=et("svg-inline");return!o.value.is_ai_talk||o.value.loading||[St(Ml).fileAnalyzeExpired].includes(o.value.true_chat_type)?M("",!0):(ze(),V("div",sc,[o.value.has_error?M("",!0):(ze(),V("div",oc,[F(d,{placement:"top",effect:"dark",content:St(a)("Helpful")},{default:Ht((()=>[O("button",{class:xe(["like",{active:o.value.liked===St(Vl).like}]),onClick:t[0]||(t[0]=e=>c(o.value.id,St(Vl).like,o.value.liked))},[Wt(O("img",ic,null,512),[[p]])],2)])),_:1},8,["content"]),F(d,{placement:"top",effect:"dark",content:St(a)("Not Helpful")},{default:Ht((()=>[O("button",{class:xe(["unlike",{active:o.value.liked===St(Vl).unlike}]),onClick:t[1]||(t[1]=e=>c(o.value.id,St(Vl).unlike,o.value.liked))},[Wt(O("img",rc,null,512),[[p]])],2)])),_:1},8,["content"])])),O("div",uc,[St(ln).showTalkHistoryDialog?(ze(),V("button",{key:0,onClick:t[2]||(t[2]=e=>(o.value.content,void s("on-show-talk-history",n.message.single_chat_id)))},[Wt(O("img",cc,null,512),[[p]])])):M("",!0),[St(Ml).autoSummary,St(Ml).autoSummaryNoQ,St(Ml).autoSummaryPaper].includes(o.value.true_chat_type)?M("",!0):(ze(),V("button",{key:1,class:"regenerate",onClick:t[3]||(t[3]=e=>(e=>{if(ln.chatTalkStatus!==Il.noAsk)return!1;const t=ln.chatMessageList[e];let a="",n=null,s=t.chat_type;if([Ml.filePageSummary,Ml.fileSummary,Ml.fileSummaryMD,Ml.filePageTranslate,Ml.fileTranslate,Ml.fileTalkMD].includes(s)){const e=t.actual_end_page||t.end_page||t.page;return l.emit("on-tools-regenerate",[s,t.page,e]),!1}if(e>0){const t=ln.chatMessageList[e-1];t.message_type===Al.user&&(a=t.content,n=t.chat_image)}const o=s===Ml.autoSummary?1:0,i={content:a,images:n,retry:t.is_stopped?0:1,chat_type:s,last_single_chat_id:t.is_stopped?0:t.single_chat_id,auto_summary:o,target_lang:t.target_lang||Vn()};l.emit("on-regenerate",i)})(n.messageIndex))},[Wt(O("img",dc,null,512),[[p]]),N(vt(St(a)("Regenerate"))+" ",1)])),o.value.has_error?M("",!0):(ze(),V("button",{key:2,onClick:t[4]||(t[4]=e=>{return t=o.value.content,Ol(t),r.value=1,i.value++,void(an.isInMobile&&vl.success(a("Copied")));var t}),onMouseleave:t[5]||(t[5]=e=>{setTimeout((()=>{i.value++,r.value=0}),500)})},[Wt(O("img",pc,null,512),[[p]]),N(vt(u.value)+" ",1)],32))])]))}}},mc=ol(vc,[["__scopeId","data-v-be77b4ca"]]),fc={class:"same-question-container"},gc={class:"title"},hc={class:"question-list"},yc=["onClick"],bc=(e=>(He("data-v-a709252e"),e=e(),Re(),e))((()=>O("div",{class:"border-gradient"},null,-1))),_c={__name:"message-same-questions",props:{message:{type:Object,default:{}}},setup(e){const{$bus:t}=ee().proxy,a=e,l=T((()=>a.message));return(e,a)=>{const n=nn;return ze(),V("div",fc,[O("p",gc,vt(e.$t("You might be interested in the following questions:")),1),Wt((ze(),V("ul",hc,[St(dl)(l.value.q_content)?(ze(!0),V(i,{key:0},Qe(l.value.q_content,((e,a)=>(ze(),V("li",{class:"question-item",key:a,onClick:a=>{return l=e.question,void t.emit("on-send-message",{content:l});var l}},[bc,O("span",null,vt(e.question),1)],8,yc)))),128)):M("",!0)])),[[n,l.value.q_content_loading]])])}}},kc=ol(_c,[["__scopeId","data-v-a709252e"]]),Sc={class:"image-list"},wc=["onClick"],xc=["onClick"],Cc={src:bn},Tc={class:"image-preview"},Ec={src:bn},Ic=["src"],Mc={__name:"message-images",props:ke({width:{type:String,default:"1rem"},canDelete:{type:Boolean,default:!1}},{images:{},imagesModifiers:{}}),emits:["update:images"],setup(e){const t=e,a=Tt(e,"images"),l=()=>{n.value=!1},n=Ye(!1),s=Ye(0);return(e,o)=>{const r=et("svg-inline");return ze(),V("div",Sc,[(ze(!0),V(i,null,Qe(a.value,((e,l)=>(ze(),V("div",{class:"image-item",style:Te({width:t.width,height:t.width,backgroundImage:`url(${e.url})`}),key:l,onClick:e=>{return t=l,n.value=!0,void(s.value=t);var t}},[t.canDelete?(ze(),V("button",{key:0,class:"icon-btn",onClick:Gt((e=>{return t=l,a.value.splice(t,1);var t}),["stop"])},[Wt(O("img",Cc,null,512),[[r]])],8,xc)):M("",!0)],12,wc)))),128)),(ze(),I(p,{to:"body"},[F(f,{name:"fade"},{default:Ht((()=>[Wt(O("div",Tc,[O("div",{class:"screen",onClick:l}),O("button",{class:"icon-close",onClick:l},[Wt(O("img",Ec,null,512),[[r]])]),(ze(!0),V(i,null,Qe(a.value,((e,t)=>(ze(),V("img",{src:e.url,class:xe({active:t===s.value}),key:t},null,10,Ic)))),128))],512),[[Dt,n.value]])])),_:1})]))])}}},Vc=ol(Mc,[["__scopeId","data-v-c6f2a511"]]);var Oc=Ll(Jn),Ac=Oc.defineComponent({name:"VueMathjax",props:{formula:{type:String,default:""},safe:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},setup(e){const t=Oc.reactive({mathjaxRef:null}),a=()=>{e.safe?t.mathjaxRef.textContent=e.formula:t.mathjaxRef.innerHTML=e.formula,window.MathJax&&(window.MathJax.Hub.Config({tex2jax:{inlineMath:[["$","$"],["(",")"]],displayMath:[["$$","$$"],["[","]"]],processEscapes:!0,processEnvironments:!0},displayAlign:"center","HTML-CSS":{styles:{".MathJax_Display":{margin:0}},linebreaks:{automatic:!0}},...e.options}),window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,t.mathjaxRef]))};return Oc.watch((()=>e.formula),(()=>{a()})),Oc.onMounted((()=>{a()})),{...Oc.toRefs(t)}}});const Lc={ref:"mathjaxRef"};Ac.render=function(e,t,a,l,n,s){return Oc.openBlock(),Oc.createElementBlock("span",Lc,null,512)},Ac.__file="src/index.vue",Ac.install=function(e){e.component(Ac.name,Ac)};const Bc=["innerHTML"],$c={key:0,class:"stream-loading"},Dc=[(e=>(He("data-v-53cbf007"),e=e(),Re(),e))((()=>O("span",{class:"middle"},null,-1)))],Pc=ol({__name:"message-markdown",props:{message:{type:Object,default:()=>{}}},setup(e){const t=e,a="chat-message-md-"+t.message.id;let l=null;const n=Ye(""),s=Ye(0);Ft((()=>t.message.key),(()=>{let e=t.message.content;t.message.loading||(e=e.replace(/\\\((.*?)\\\)/g,"\\\\($1\\\\)"),e=e.replace(/\\\[(.*?)\\\]/gs,"\\\\[$1\\\\]\n")),n.value=Bl(e||""),s.value++,we((()=>{t.message.loading||(l||(l=document.querySelector(`#${a} .chat-message-content`)),MathJax.startup.promise.then((()=>{MathJax.typesetPromise([l]).then((()=>{l.querySelectorAll("mjx-container").forEach((e=>{e.parentElement.classList.add("MathJax-wrapper")}))})).catch((e=>{}))})))}))}),{immediate:!0});const o=()=>{const e=event.target;if("A"===e.nodeName){event.preventDefault();const t=e.getAttribute("href");window.open(t,"_blank")}};return Le((()=>{})),(e,l)=>(ze(),V("div",{class:"chat-message-md",id:a,onClick:o},[O("div",{class:xe(["chat-message-content",`${t.message.target_lang}`]),innerHTML:n.value},null,10,Bc),t.message.streamLoading?(ze(),V("div",$c,Dc)):M("",!0)]))}},[["__scopeId","data-v-53cbf007"]]),Nc={class:"history-container"},Fc=["innerHTML"],zc={__name:"message-history",props:{singleChatId:{type:String,default:""}},setup(e){const t=e,a=We([]),l=Ye(!1),n=We([]);return Ft((()=>t.singleChatId),(e=>{e&&(async()=>{l.value=!0,a.splice(0,a.length);try{const{data:e}=await $l(t.singleChatId);null==e||e.list.forEach((e=>{if(Dl(e.content)){const t=JSON.stringify(JSON.parse(e.content),((e,t)=>{if(On.isArray(t)){let e=!0;if(t.forEach((t=>{On.isString(t)||On.isNumber(t)||(e=!1)})),e)return JSON.stringify(t)}else if("content"===e)return Bl(t);return t}),2);e.content="<pre><code>"+t+"</code></pre>"}})),a.push(...(null==e?void 0:e.list)||[]),n.splice(0,n.length,...Array.from({length:a.length}).map(((e,t)=>t)))}catch(e){}l.value=!1})()}),{immediate:!0}),(e,t)=>{const s=Ii,o=Ei,r=et("highlight"),u=nn;return Wt((ze(),V("div",Nc,[F(hn,{class:"scroll-main"},{default:Ht((()=>[F(o,{modelValue:n,"onUpdate:modelValue":t[0]||(t[0]=e=>n=e),onChange:e.handleChange},{default:Ht((()=>[(ze(!0),V(i,null,Qe(a,((e,t)=>(ze(),I(s,{class:"collapse-item",title:e.description,name:t},{default:Ht((()=>[Wt(O("div",{innerHTML:e.content},null,8,Fc),[[r]])])),_:2},1032,["title","name"])))),256))])),_:1},8,["modelValue","onChange"])])),_:1})])),[[u,l.value]])}}},Rc=ol(zc,[["__scopeId","data-v-ada4e722"]]),jc={key:0,class:"chat-message-wrapper show"},Uc={class:"chat-message chat-file-message"},Hc=["innerHTML"],Kc=["innerHTML"],Wc={key:0,class:"logo-loading"},qc={class:"load-history-loading"},Yc={key:0,class:"chat-user ai"},Gc={src:"/assets/icon-avatar-ai-TGbkjsGe.svg",class:"icon-avatar"},Jc={class:"chat-message"},Qc={key:0,class:"message-header"},Xc={key:2,class:"chat-loading"},Zc={key:4,class:"message-footer-controls"},ed={key:0,class:"file-page-tip"},td={key:1,class:"file-page-tip"},ad={class:"file-page-tip"},ld=["onClick"],nd=["onClick"],sd=["onClick"],od=["data-page"],id={key:0,class:"full-screen-container"},rd={__name:"chat-viewer",props:{fileAnalyzed:{type:Boolean,default:!1},vectorDeleted:{type:Boolean,default:!1}},emits:["on-analysis","on-re-analysis","on-loaded"],setup(e,{expose:t,emit:a}){const{$t:l,$bus:n}=ee().proxy,s=e;let o=!0;const r=Ye(!1),u=Ye(-1),c=T((()=>u.value>=0?ln.chatMessageList[u.value]:null)),d=e=>{const{type:t,messageIndex:a}=e;r.value=t,u.value=t?a:-1,we((()=>{if(t){const e=document.querySelector(".full-screen-container");e&&zl(e)}else Rl()}))},p=()=>{(null===document.fullscreenElement||void 0===document.fullscreenElement&&!document.webkitIsFullScreen)&&(r.value=!1,u.value=-1)},v=Ye(""),m=Ye(!1),f=e=>{v.value=e,m.value=!0},g=T((()=>ln.chatTalkStatus!==Il.noAsk)),h=Ye(!1),y=Ye(!1),b=T((()=>{var e;return(null==(e=ln.chatFile)?void 0:e.total_page)||0})),_=Ye(0),k=a,S=Ye(null),w=T((()=>ln.chatMessageList.length)),x=Ye(!1);let C=!1,E=2;const A=async()=>{if(x.value||C||ln.chatMessageList.length<20)return;const e=S.value.viewEl.clientHeight;x.value=!0;try{const t=await An(ln.chatType,ln.chatFileId,E);ln.chatMessageList.unshift(...t),t.length?E++:C=!0,we((()=>{const t=S.value.viewEl.clientHeight-e;S.value.scrollTo(0,t),x.value=!1}))}catch(t){x.value=!1}},L=()=>{o||(o=!0)};let B=0;const $=()=>{if(!g.value||!o)return!1;const{currentY:e}=S.value.getScrollData();B>0&&e<B&&(S.value.stopScroll(),o=!1),B=e},D=e=>{var t;null==(t=S.value)||t.scrollToBottom(e)},P=()=>{h.value=!0,k("on-analysis",ln.chatFileId)},z=()=>{k("on-re-analysis",ln.chatFileId)},R=(e,t)=>{let a=t.actual_end_page+1;n.emit("on-continue",{chatType:e,page:a})},j=e=>{const t=parseInt(e.target.dataset.page);n.emit("on-goto-page",{fileId:ln.chatFileId,page:t})},U=()=>{var e,t,a;const l=null==(e=document.querySelector(".chat-wrapper"))?void 0:e.clientWidth;l>975?null==(t=document.querySelector(".chat-list"))||t.classList.remove("ipad"):null==(a=document.querySelector(".chat-list"))||a.classList.add("ipad"),_.value=l};return Ft((()=>ln.streamIndex),(()=>{o&&D(100)})),Ft((()=>g.value),(()=>{o||(o=!0)})),Ft((()=>ln.chatMessageList.length),(e=>{e&&(On.findLast(ln.chatMessageList).is_show=!0,setTimeout((()=>{ln.chatTalkStatus!==Il.noAsk&&ln.streamIndex++}),300))})),Ft((()=>s.fileAnalyzed),(e=>{e?(h.value=!1,y.value=!1):y.value=!0}),{immediate:!0}),Le((async()=>{const e=await An(ln.chatType,ln.chatFileId);if(e.length||ln.chatType!==Ml.randomTalk?ln.chatMessageList.push(...e):await Ln(ln.chatType),ln.chatMessageList.length){const e=On.findLast(ln.chatMessageList,(e=>e.message_type===Al.assistant&&0!==e.chat_id));ln.chatId=(null==e?void 0:e.chat_id)||ln.chatId,ln.chatFileId=(null==e?void 0:e.file_id)||ln.chatFileId}if(s.vectorDeleted){const e={content:l("You haven't opened the document recently. Please reload the requested PDF."),is_ai_talk:!0,reloaded:!1,message_type:Al.assistant,chat_type:Ml.fileAnalyzeExpired,true_chat_type:Ml.fileAnalyzeExpired};Bn(e,!1,!1,!1)}we((()=>{setTimeout((()=>{D(0)}),500),k("on-loaded")})),U(),window.addEventListener("resize",U),n.on("on-pdf-viewer-resize",U),n.on("on-fullscreen-mindmap",d),document.addEventListener("fullscreenchange",p),document.addEventListener("webkitfullscreenchange",p)})),Ne((()=>{window.removeEventListener("resize",U),n.off("on-pdf-viewer-resize",U),n.off("on-fullscreen-mindmap",d),document.removeEventListener("fullscreenchange",p),document.removeEventListener("webkitfullscreenchange",p)})),t({startBtnLoading:h,showStartBtn:y}),(e,t)=>{const a=Rn,n=nn,o=et("svg-inline");return ze(),V(i,null,[F(hn,{ref_key:"refScroll",ref:S,y:!0,class:"chat-list",onOnScrollTop:A,onOnScrollBottom:L,onWheel:$},{default:Ht((()=>{var e,t;return[St(ln).chatFileId?(ze(),V("div",jc,[O("div",Uc,[F(yn,{class:"chat-file","show-index":!1,logo:"/images/file/pdf-logo.png",size:null==(e=St(ln).chatFile)?void 0:e.size,"show-name":null==(t=St(ln).chatFile)?void 0:t.show_name,"total-page":b.value},null,8,["size","show-name","total-page"]),s.fileAnalyzed?(ze(),V("div",{key:1,class:"chat-message-content",innerHTML:St(l)("Hello, I am <span>UPDF AI</span>")},null,8,Kc)):(ze(),V("div",{key:0,class:"chat-message-content",innerHTML:St(l)("Hello, I am <span>UPDF AI</span><br>Please start conversations with AI assistant.")},null,8,Hc)),y.value?(ze(),I(a,{key:2,class:"start-btn hover-translate",onClick:P,disabled:h.value},{default:Ht((()=>[h.value?(ze(),V("span",Wc,[F(nc)])):M("",!0),N(" "+vt(h.value?St(l)("Reloading..."):St(l)("Get Started")),1)])),_:1},8,["disabled"])):M("",!0)])])):M("",!0),Wt(O("div",qc,null,512),[[n,x.value]]),(ze(!0),V(i,null,Qe(St(ln).chatMessageList,((e,t)=>{var a,n;return ze(),V("div",{class:xe(["chat-message-wrapper",`from-${e.message_type} ${e.is_show?"show":""}`]),key:e.id},[e.message_type===St(Al).assistant?(ze(),V("div",Yc,[Wt(O("img",Gc,null,512),[[o]])])):(ze(),V("div",{key:1,class:"chat-user ai",style:Te({backgroundImage:`url(${null==(a=St(tn).userInfo)?void 0:a.headerImg})`})},null,4)),O("div",Jc,[e.message_type===St(Al).user&&[St(Ml).filePageSummary,St(Ml).filePageTranslate,St(Ml).fileSummary,St(Ml).fileSummaryMD,St(Ml).fileTranslate,St(Ml).summary,St(Ml).explain,St(Ml).translate].includes(e.true_chat_type)?(ze(),V("div",Qc,[e.true_chat_type===St(Ml).translate&&e.target_lang?(ze(),V(i,{key:0},[N(vt(St(Nl)(St(l)("Translate to [%s]"),St(xl)(St(Pl)[e.target_lang]))),1)],64)):(ze(),V(i,{key:1},[N(vt(St(l)(e.true_chat_type)),1)],64))])):M("",!0),e.chat_image&&e.chat_image.length?(ze(),I(Vc,{key:1,class:"chat-images",images:e.chat_image,"onUpdate:images":t=>e.chat_image=t},null,8,["images","onUpdate:images"])):M("",!0),e.loading&&!e.content?(ze(),V("div",Xc,[F(nc,{class:"loading-icon"}),[St(Ml).fileAnalyzeExpired].includes(e.true_chat_type)?(ze(),V(i,{key:0},[N(vt(St(l)("Reloading...")),1)],64)):(ze(),V(i,{key:1},[N(vt(St(l)("Loading...")),1)],64))])):(ze(),V(i,{key:3},[[St(Ml).fileTalkMD,St(Ml).fileTalkMD2].includes(e.true_chat_type)&&e.message_type===St(Al).assistant?(ze(),I(Yn,{key:0,chatWrapperWidth:_.value,index:t,message:e},null,8,["chatWrapperWidth","index","message"])):(ze(),I(Pc,{key:1,message:e},null,8,["message"]))],64)),e.message_type!==St(Al).assistant||e.loading?M("",!0):(ze(),V("div",Zc,[[St(Ml).fileSummary,St(Ml).fileSummaryMD,St(Ml).fileSummaryMD2,St(Ml).fileTranslate,St(Ml).autoSummaryNoQ,St(Ml).autoSummary,St(Ml).autoSummaryPaper].includes(e.true_chat_type)?(ze(),V(i,{key:0},[e.page>0?(ze(),V(i,{key:0},[[St(Ml).fileSummary,St(Ml).fileSummaryMD,St(Ml).fileSummaryMD2].includes(e.true_chat_type)?(ze(),V("span",ed,vt(St(Nl)(St(l)(St(Fl)[e.page!==e.actual_end_page&&e.actual_end_page?St(Ml).fileSummary:St(Ml).filePageSummary]),e.page,e.actual_end_page)),1)):e.true_chat_type===St(Ml).fileTranslate?(ze(),V("span",td,vt(St(Nl)(St(l)(St(Fl)[e.page!==e.actual_end_page&&e.actual_end_page?St(Ml).fileTranslate:St(Ml).filePageTranslate]),e.page,e.actual_end_page)),1)):[St(Ml).autoSummary,St(Ml).autoSummaryNoQ,St(Ml).autoSummaryPaper].includes(e.true_chat_type)&&e.actual_end_page<b.value?(ze(),V(i,{key:2},[O("span",ad,vt(St(Nl)(St(l)(St(Fl)[e.page!==e.actual_end_page&&e.actual_end_page?St(Ml).fileSummary:St(Ml).filePageSummary]),e.page,e.actual_end_page)),1),1===w.value&&St(ln).chatTalkStatus===St(Il).noAsk?(ze(),V("button",{key:0,onClick:t=>R(St(Ml).fileSummaryMD,e),class:"right-btn btn-continue hover-translate"},vt(St(l)("Keep Summarize")),9,ld)):M("",!0)],64)):M("",!0),t!==w.value-1||g.value||e.actual_end_page===b.value?M("",!0):(ze(),V(i,{key:3},[[St(Ml).fileSummary,St(Ml).fileSummaryMD,St(Ml).autoSummaryNoQ,St(Ml).autoSummaryPaper,St(Ml).autoSummary,St(Ml).fileTranslate].includes(e.true_chat_type)?(ze(),V(i,{key:0},[[St(Ml).fileSummary,St(Ml).fileSummaryMD].includes(e.true_chat_type)?(ze(),V("button",{key:0,onClick:t=>R(St(Ml).fileSummaryMD,e),class:"right-btn btn-continue hover-translate"},vt(St(l)("Keep Summarize")),9,nd)):e.true_chat_type===St(Ml).fileTranslate?(ze(),V("button",{key:1,onClick:t=>R(St(Ml).fileTranslate,e),class:"right-btn btn-continue hover-translate"},vt(St(l)("Keep Translate")),9,sd)):M("",!0)],64)):M("",!0)],64))],64)):M("",!0)],64)):[St(Ml).fileAnalyzeExpired].includes(e.true_chat_type)&&!e.reloaded?(ze(),V("button",{key:1,onClick:z,class:"right-btn btn-reload hover-translate"},vt(St(l)("ai_Reload")),1)):M("",!0)])),(null==(n=null==e?void 0:e.pages)?void 0:n.length)?(ze(),V("div",{key:5,class:"message-footer-pages",onClick:j},[(ze(!0),V(i,null,Qe(e.pages,(e=>(ze(),V("span",{class:"btn-page hover-translate","data-page":e,key:e},vt(e),9,od)))),128))])):M("",!0),e.message_type===St(Al).assistant?(ze(),I(mc,{key:6,message:e,messageIndex:t,onOnShowTalkHistory:f},null,8,["message","messageIndex"])):M("",!0),!e.loading&&e.message_type===St(Al).assistant&&e.q_content?(ze(),I(kc,{key:7,message:e},null,8,["message"])):M("",!0)])],2)})),128))]})),_:1},512),r.value?(ze(),V("div",id,[c.value?(ze(),I(Yn,{key:0,message:c.value,"is-full-screen":!0,"auto-fit-when-update":!1},null,8,["message"])):M("",!0)])):M("",!0),F(Ql,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=e=>m.value=e),title:"调试记录",width:"80%"},{default:Ht((()=>[F(Rc,{"single-chat-id":v.value},null,8,["single-chat-id"])])),_:1},8,["modelValue"])],64)}}},ud=ol(rd,[["__scopeId","data-v-e766fda6"]]),cd="/images/icon/icon-summary-32.svg",dd="/images/icon/icon-translate-32.svg",pd="/assets/icon-back-24-6AneIpXm.svg",vd=e=>(He("data-v-ec7a6d3e"),e=e(),Re(),e),md={class:"title"},fd=vd((()=>O("span",{class:"title-icon"},null,-1))),gd={class:"tools-list"},hd={src:cd},yd={src:dd},bd={src:cd},_d={class:"tip-span"},kd={class:"current-page"},Sd={class:"language-flag"},wd={src:dd},xd={class:"tip-span"},Cd={class:"current-page"},Td={class:"language-flag"},Ed={src:"/images/icon/icon-mindmap-24.svg"},Id={class:"tip-span"},Md={class:"title"},Vd={src:pd},Od={key:0,class:"tip"},Ad={key:1,class:"tip"},Ld={key:2,class:"tip"},Bd={class:"select-page"},$d=vd((()=>O("span",{class:"line"},"-",-1))),Dd=ol({__name:"tools-chat-file",emits:["on-plan-exceed","on-send-message"],setup(e,{expose:t,emit:a}){const{$t:l,$bus:n}=ee().proxy,s=a,o=Ye(!1),r=Ye(!1),u=Ye(""),c=T((()=>o.value||r.value)),d=We([]),p=Ye(1),v=Ye(0),m=T((()=>ln.chatFile.total_page)),f=(e=null,t=1,a=null)=>{e?(u.value=e,p.value=t,o.value=!1,r.value=!0):(o.value=!0,r.value=!1),a&&(v.value=a)},g=()=>{o.value=!1,r.value=!1},h=e=>{o.value=!1,r.value=!0,u.value=e},y=(e,t,a=null,n=!1)=>{let o=e;if(a&&t!==a||(e===Ml.fileSummaryMD?o=Ml.filePageSummary:e===Ml.fileTranslate&&(o=Ml.filePageTranslate)),a&&t>a){const e=t;t=a,a=e,p.value=t,v.value=a}const i={content:Nl(l(Fl[o]),t,a)||"",auto_summary:0,chat_type:e,page:t,end_page:a||t,autoSend:n?1:0};g(),s("on-send-message",i)},b=()=>{let e=v.value;e<p.value&&(e=p.value),e!==v.value&&(v.value=e)};return Ft((()=>[o.value,r.value]),(()=>{v.value||(v.value=m.value)})),t({show:f,hide:g,isShow:c}),Le((()=>{d.push(...$n()),n.on("on-continue",(e=>f(e.chatType,e.page,m.value))),n.on("on-tools-regenerate",(e=>y(...e)))})),Ne((()=>{n.off("on-continue"),n.off("on-tools-regenerate")})),(e,t)=>{const a=Pi,n=Rn,s=et("svg-inline");return ze(),V(i,null,[F(gn,{position:"top",modelValue:o.value,"onUpdate:modelValue":t[5]||(t[5]=e=>o.value=e),class:"tools-prompt step1","click-outside-hidden":!0},{default:Ht((()=>{var e,a;return[O("p",md,[fd,N(" "+vt(St(l)("Prompt")),1)]),O("ul",gd,[O("li",{onClick:t[0]||(t[0]=e=>h(St(Ml).fileSummaryMD))},[Wt(O("img",hd,null,512),[[s]]),N(" "+vt(St(l)("Summarize by Page")),1)]),O("li",{onClick:t[1]||(t[1]=e=>h(St(Ml).fileTranslate))},[Wt(O("img",yd,null,512),[[s]]),N(" "+vt(St(l)("Translate by Page")),1)]),O("li",{onClick:t[2]||(t[2]=e=>{var t;return y(St(Ml).fileSummaryMD,null==(t=St(ln).chatFile)?void 0:t.current_page)})},[Wt(O("img",bd,null,512),[[s]]),O("span",_d,vt(St(l)("Summarize Page")),1),O("span",kd,vt(null==(e=St(ln).chatFile)?void 0:e.current_page),1),O("span",Sd,vt(St(ln).chatTargetLang),1)]),O("li",{onClick:t[3]||(t[3]=e=>{var t;return y(St(Ml).fileTranslate,null==(t=St(ln).chatFile)?void 0:t.current_page)})},[Wt(O("img",wd,null,512),[[s]]),O("span",xd,vt(St(l)("Translate Page")),1),O("span",Cd,vt(null==(a=St(ln).chatFile)?void 0:a.current_page),1),O("span",Td,vt(St(ln).chatTargetLang),1)]),O("li",{onClick:t[4]||(t[4]=e=>h(St(Ml).fileTalkMD))},[Wt(O("img",Ed,null,512),[[s]]),O("span",Id,vt(St(l)("Generate Mind Map")),1)])])]})),_:1},8,["modelValue"]),F(gn,{position:"top",modelValue:r.value,"onUpdate:modelValue":t[10]||(t[10]=e=>r.value=e),class:"tools-prompt step2","click-outside-hidden":!0},{default:Ht((()=>[O("p",Md,[O("span",{class:"back hover-translate",onClick:t[6]||(t[6]=e=>f())},[Wt(O("img",Vd,null,512),[[s]]),N(" "+vt(St(l)("Back")),1)]),u.value===St(Ml).fileSummaryMD?(ze(),V("p",Od,vt(St(l)("Please specify the page range for the summary.")),1)):u.value===St(Ml).fileTranslate?(ze(),V("p",Ad,vt(St(l)("Please specify the page range for the translation.")),1)):u.value===St(Ml).fileTalkMD?(ze(),V("p",Ld,vt(St(l)("Please enter the page range to generate")),1)):M("",!0)]),O("ul",null,[O("li",Bd,[F(a,{class:"page-number",modelValue:p.value,"onUpdate:modelValue":t[7]||(t[7]=e=>p.value=e),min:1,max:m.value,"controls-position":"right"},null,8,["modelValue","max"]),$d,F(a,{class:"page-number",modelValue:v.value,"onUpdate:modelValue":t[8]||(t[8]=e=>v.value=e),min:1,max:m.value,"controls-position":"right",onChange:b},null,8,["modelValue","max"])])]),F(n,{class:"send-btn",type:"primary",onClick:t[9]||(t[9]=e=>y(u.value,p.value,v.value))},{default:Ht((()=>[N(vt(St(l)("Go")),1)])),_:1})])),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-ec7a6d3e"]]),Pd={class:"title"},Nd=(e=>(He("data-v-2fa17a95"),e=e(),Re(),e))((()=>O("span",{class:"title-icon"},null,-1))),Fd={class:"tools-list"},zd={src:cd},Rd={src:dd},jd={src:"/images/icon/icon-explain-32.svg"},Ud={class:"title"},Hd={src:pd},Kd={src:dd},Wd=ol({__name:"tools-chat-random",setup(e,{expose:t}){const a=Ye(!1),l=Ye(!1),n=T((()=>a.value||l.value)),s=We([]),o=e=>{const t=ln.chatType===e;a.value=!1,ln.chatType=e,t||Ln(e,ln.chatTargetLang)},r=e=>{ln.chatTargetLang=e,c()},u=()=>{a.value=!0,l.value=!1},c=()=>{a.value=!1,l.value=!1};return Le((()=>{s.push(...$n())})),t({show:u,hide:c,isShow:n}),(e,t)=>{const n=er,c=Zi,d=et("svg-inline");return ze(),V(i,null,[F(gn,{position:"top",modelValue:a.value,"onUpdate:modelValue":t[3]||(t[3]=e=>a.value=e),class:"tools-prompt step1","click-outside-hidden":!0},{default:Ht((()=>[O("p",Pd,[Nd,N(vt(e.$t("Prompt")),1)]),O("ul",Fd,[O("li",{onClick:t[0]||(t[0]=e=>o(St(Ml).summary))},[Wt(O("img",zd,null,512),[[d]]),N(" "+vt(e.$t("Summarize")),1)]),O("li",{onClick:t[1]||(t[1]=e=>o(St(Ml).translate))},[Wt(O("img",Rd,null,512),[[d]]),N(" "+vt(e.$t("Translate")),1)]),O("li",{onClick:t[2]||(t[2]=e=>o(St(Ml).explain))},[Wt(O("img",jd,null,512),[[d]]),N(" "+vt(e.$t("Explain")),1)])])])),_:1},8,["modelValue"]),F(gn,{position:"top",modelValue:l.value,"onUpdate:modelValue":t[6]||(t[6]=e=>l.value=e),class:"tools-prompt","click-outside-hidden":!0},{default:Ht((()=>[O("p",Ud,[O("span",{class:"back hover-translate",onClick:t[4]||(t[4]=e=>u())},[Wt(O("img",Hd,null,512),[[d]])]),N(" "+vt(e.$t("Guess you want to")),1)]),O("ul",null,[O("li",null,[Wt(O("img",Kd,null,512),[[d]]),N(" "+vt(e.$t("Translate")),1)]),O("li",null,[F(c,{modelValue:St(ln).chatTargetLang,"onUpdate:modelValue":t[5]||(t[5]=e=>St(ln).chatTargetLang=e),onChange:r,"fit-input-width":!0},{default:Ht((()=>[(ze(!0),V(i,null,Qe(s,((t,a)=>(ze(),I(n,{key:a,label:e.$t(t.label),value:t.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])])])),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-2fa17a95"]]),qd=["accept"],Yd={__name:"upload-common-file",props:ke({acceptType:{type:String||Array,default:cl.all},acceptExts:{type:Array,default:()=>[]},fileType:{type:String,default:"tmp"},dir:{type:String,default:"feedback"},uploadedFiles:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},maxCount:{type:Number,default:1},maxFileSize:{type:Number,default:10485760},maxImageWidth:{type:Number,default:1024}},{loading:{},loadingModifiers:{}}),emits:ke(["on-select","on-progress","on-success","on-error"],["update:loading"]),setup(e,{expose:t,emit:a}){const{$t:l}=ee().proxy,n=e,s=a,o=Tt(e,"loading"),i=T((()=>{if(n.acceptExts.length)return n.acceptExts;if(dl(n.acceptType)){const e=[];return n.acceptType.forEach((t=>{e.push(...pl[t])})),e}return pl[n.acceptType]})),r=T((()=>{var e;return null==(e=i.value)?void 0:e.map((e=>`.${e}`)).join(",")})),u={},c=async e=>{const{data:t}=await En({ext:e});return t.credentials.localNow=parseInt((new Date).getTime()/1e3),Object.assign(u,t.credentials),u},d=T((()=>o.value||n.disabled||n.maxCount>0&&n.uploadedFiles.length&&n.uploadedFiles.length>=n.maxCount)),p=async e=>{if(d.value)return!1;try{let t=e;if(jl(e)||(t=e.target.files[0],e.target.value=""),d.value)return!1;const a=t.name.split(".").pop().toLowerCase(),r={pdf:"Please select PDF file format.",image:"Please select an image file format.",all:"Upload of this file type is not supported."};if(!i.value.includes(a))return vl.error(l(r[n.acceptType])),!1;if(o.value=!0,pl[cl.image].includes(a)){if("gif"===a.toLowerCase()&&await xn(t))return o.value=!1,vl.error(l(r.all)),!1;const e=await hl(t),s=await Cn(e);(s.width>n.maxImageWidth||s.height>n.maxImageWidth||t.size>n.maxFileSize)&&(t=await Tn(t,n.maxImageWidth,n.maxFileSize))}if(t.size>n.maxFileSize)return vl.error(sprintf(l("Your file is too large, the maximum file size is %s."),il(maxFileSize))),o.value=!1,!1;s("on-select",t);const p=await ml(t);if(n.uploadedFiles.filter((e=>e.hash===p)).length)return o.value=!1,!1;await c(a);const v=u.endpoint.includes("oss-cn-hangzhou")?en.oss["cn-east"]:en.oss["us-east"],m=new wn({region:v.region,accessKeyId:u.accessKeyId,accessKeySecret:u.accessKeySecret,stsToken:u.securityToken,refreshSTSTokenInterval:36e5,refreshSTSToken:async()=>{const e=await c(a);return{accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,stsToken:e.securityToken}},bucket:u.bucketName}),f={progress:(e,t,a)=>{const l=parseInt(100*e);s("on-progress",l)},parallel:4,partSize:1048576,mime:t.type};await m.multipartUpload(u.file_path,t,f);const g=await hl(t);s("on-success",{url:g,size:t.size,name:t.name,ext:a,hash:p,filePath:u.file_path})}catch(t){vl.error(l("Upload failed"))}o.value=!1},v=e=>{const t=(e.clipboardData||e.originalEvent.clipboardData).items[0].getAsFile();jl(t)&&p(t)};return t({handleSelectedFile:p}),Le((()=>{document.addEventListener("paste",v)})),Ne((()=>{document.removeEventListener("paste",v)})),(e,t)=>{const a=nn;return Wt((ze(),V("div",{class:xe({loading:o.value,disabled:d.value})},[Xe(e.$slots,"default",{},void 0,!0),Wt(O("input",{type:"file",accept:r.value,title:"",onChange:p},null,40,qd),[[Dt,!o.value&&!n.disabled]])],2)),[[a,o.value]])}}},Gd=ol(Yd,[["__scopeId","data-v-7357762e"]]),Jd={__name:"tooltip",props:ke({placement:{type:String,default:"bottom"}},{modelValue:!1,modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Tt(e,"modelValue",!1),a=wt();return(e,l)=>{const n=rn;return ze(),I(n,Se({visible:t.value},St(a)),{default:Ht((()=>[O("span",{onMouseenter:l[0]||(l[0]=e=>t.value=!0),onMouseout:l[1]||(l[1]=e=>t.value=!1),onClick:l[2]||(l[2]=e=>t.value=!1)},[Xe(e.$slots,"default")],32)])),_:3},16,["visible"])}}},Qd={imageExts:an.isCN?["png","bmp","jpg","jpeg","webp"]:["png","jpg","jpeg","webp","gif"]},Xd="undefined"!=typeof window&&"undefined"!=typeof document;function Zd(e){var t;const a="function"==typeof(l=e)?l():St(l);var l;return null!=(t=null==a?void 0:a.$el)?t:a}"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const ep=Xd?window:void 0;function tp(e,t,a={}){const{window:l=ep,...n}=a;let s;const o=function(e){const t=function(){const e=Ye(!1),t=ee();return t&&Le((()=>{e.value=!0}),t),e}();return T((()=>(t.value,Boolean(e()))))}((()=>l&&"ResizeObserver"in l)),i=()=>{s&&(s.disconnect(),s=void 0)},r=T((()=>Array.isArray(e)?e.map((e=>Zd(e))):[Zd(e)])),u=Ft(r,(e=>{if(i(),o.value&&l){s=new ResizeObserver(t);for(const t of e)t&&s.observe(t,n)}}),{immediate:!0,flush:"post"}),c=()=>{i(),u()};var d;return d=c,te()&&De(d),{isSupported:o,stop:c}}const ap=e=>(He("data-v-e3abc63a"),e=e(),Re(),e),lp=ap((()=>O("div",{class:"border-gradient"},null,-1))),np=ap((()=>O("div",{class:"border-gradient border-gradient-hover"},null,-1))),sp=["src"],op={class:"icon",src:Xl},ip=["data-lang"],rp={class:"input-container"},up={key:0,class:"input-container-header"},cp={class:"input-container-wrapper"},dp={src:"/assets/icon-attachment-nQJ8RvWn.svg"},pp={class:"send-container"},vp={src:"/assets/icon-send-start-40-mOiGutJK.svg"},mp=["innerHTML"],fp={src:"/assets/icon-send-40-B8GwqhC9.svg",class:"btn-send-enable"},gp=ap((()=>O("img",{src:"/assets/icon-send-disabled-40-poDZAWID.svg",class:"btn-send-disabled"},null,-1))),hp={key:0,class:"chat-input-wrapper stop-container show"},yp={class:"stop-wrapper hover"},bp=ap((()=>O("div",{class:"border-gradient"},null,-1))),_p={class:"btn-icon",src:"/assets/icon-send-stop-24-Z8HYBZPl.svg"},kp={__name:"chat-input",props:{fileAnalyzed:{type:Boolean,default:!1},vectorDeleted:{type:Boolean,default:!1}},emits:["om-send-message","on-re-analysis"],setup(e,{expose:t,emit:a}){const{$t:l,$bus:n}=ee().proxy,s=e,o=a,r=Ye(null),{width:u}=function(e,t={width:0,height:0},a={}){const{window:l=ep,box:n="content-box"}=a,s=T((()=>{var t,a;return null==(a=null==(t=Zd(e))?void 0:t.namespaceURI)?void 0:a.includes("svg")})),o=Ye(t.width),i=Ye(t.height),{stop:r}=tp(e,(([t])=>{const a="border-box"===n?t.borderBoxSize:"content-box"===n?t.contentBoxSize:t.devicePixelContentBoxSize;if(l&&s.value){const t=Zd(e);if(t){const e=l.getComputedStyle(t);o.value=Number.parseFloat(e.width),i.value=Number.parseFloat(e.height)}}else if(a){const e=Array.isArray(a)?a:[a];o.value=e.reduce(((e,{inlineSize:t})=>e+t),0),i.value=e.reduce(((e,{blockSize:t})=>e+t),0)}else o.value=t.contentRect.width,i.value=t.contentRect.height}),a);!function(e,t=!0,a){ee()?Le(e,a):t?e():we(e)}((()=>{const a=Zd(e);a&&(o.value="offsetWidth"in a?a.offsetWidth:t.width,i.value="offsetHeight"in a?a.offsetHeight:t.height)}));const u=Ft((()=>Zd(e)),(e=>{o.value=e?t.width:0,i.value=e?t.height:0}));return{width:o,height:i,stop:function(){r(),u()}}}(r),c=T((()=>an.isCN?Ul:Pl)),d=Ye(!1),p=l('Send<span class="tooltip-span">Enter</span>'),v=Ye(null),m=Ye(null),f=Ye(""),g=Ye(null),h=T((()=>!f.value.trim().length||E.value)),y=T((()=>C.length)),b=T((()=>ln.chatFileId>0)),_=T((()=>!b.value&&ln.chatType!==Ml.randomTalk)),k=T((()=>ln.chatTalkStatus!==Il.noAsk)),S=T((()=>{var e;const t=b.value?v:m;return(null==(e=null==t?void 0:t.value)?void 0:e.isShow)||!1})),w=T((()=>![Ml.randomTalk,Ml.fileTalk].includes(ln.chatType))),x=Ye(null),C=We([]),E=Ye(!1),A=Ye(!1);let L=null;const B=e=>{L=e.target,A.value=!0},$=e=>{L===e.target&&(A.value=!1)},D=e=>{A.value=!1,x.value.handleSelectedFile(e.dataTransfer.files[0])},P=e=>{C.push(e),H()},z=e=>{if(k.value)return!1;setTimeout((()=>{const t=b.value?v:m;e?t.value.show():t.value.hide()}),10)},R=Ye(!1),j=Ye("auto"),U=e=>{let t=e.target.dataset.lang;j.value=t,"auto"===t&&(t=Vn()),ln.chatTargetLang=t},H=()=>{document.querySelector(".message-input textarea").focus()},K=e=>{const t=(e.clipboardData||e.originalEvent.clipboardData).items[0].getAsFile();jl(t)&&e.preventDefault()},W=async e=>{13!==e.keyCode||e.shiftKey||(e.preventDefault(),q())},q=async(e=null)=>{const t=f.value;if(!e&&h.value)return!1;const a=(null==e?void 0:e.chat_type)?e:{content:(null==e?void 0:e.content)||t,target_lang:ln.chatTargetLang};if(e||C.length&&(a.images=C.map((e=>({url:e.url,path:e.filePath})))),f.value="",C.splice(0,C.length),s.vectorDeleted)return o("on-re-analysis",ln.chatFileId,a),!1;Dn(a).then((e=>{if(e.code===Hl.chat_num_exceed)return document.body.clientWidth<600?Sl(ul.chat_num):d.value=!0,!1;ln.chatTalkStatus=Il.noAsk,setTimeout((()=>{H()}),100)}))},Y=()=>{Pn()};return t({planIsExceedVisibility:d,handleSendMessage:q}),Le((()=>{n.on("on-regenerate",(e=>q(e))),n.on("on-send-message",(e=>q(e))),document.querySelector(".message-input textarea").addEventListener("paste",K)})),Ne((()=>{n.off("on-regenerate"),n.on("on-send-message");const e=document.querySelector(".message-input textarea");e&&e.removeEventListener("paste",K)})),(e,t)=>{const a=vn,n=rn,o=Rn,T=et("svg-inline");return ze(),V(i,null,[O("div",{class:xe(["chat-input-wrapper",{show:s.fileAnalyzed&&!k.value,focused:A.value}]),ref_key:"refInputWrapper",ref:r,onDragenter:Gt(B,["prevent"]),onDragleave:Gt($,["prevent"]),onDragover:t[12]||(t[12]=Gt((()=>{}),["prevent"])),onDrop:Gt(D,["prevent"])},[lp,np,b.value?(ze(),I(Dd,{key:0,ref_key:"refToolsChatFile",ref:v,onOnSendMessage:q},null,512)):(ze(),I(Wd,{key:1,ref_key:"refToolsChatRandom",ref:m},null,512)),F(gn,{class:"plan-prompt",modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d.value=e),position:"top","close-btn":!0,"show-header":"true",title:St(l)("UPDF AI")},{default:Ht((()=>[d.value?(ze(),I(Yr,{key:0,"exceed-type":"chat_num",onOnClose:t[0]||(t[0]=e=>d.value=!1)})):M("",!0)])),_:1},8,["modelValue","title"]),O("div",{class:xe(["input-header controls",{"themes-tag":_.value}])},[O("div",{class:xe(["left",{disabled:y.value}])},[_.value?(ze(),V("button",{key:0,class:xe(["current-tools",{focused:S.value}]),onClick:t[3]||(t[3]=e=>z(!S.value))},[O("img",{class:"icon-chat-type",src:`/images/icon/icon-${St(ln).chatType}-32.svg`},null,8,sp),Wt(O("span",{onClick:t[2]||(t[2]=Gt((e=>(z(!1),void(ln.chatType=b.value?Ml.fileTalk:Ml.randomTalk))),["stop"])),class:"close"},null,512),[[Dt,!S.value]]),O("span",{class:"current-chat-type",style:Te({maxWidth:St(u)/4+"px"})},vt(St(l)(St(ln).chatType)),5),O("span",{class:xe(["dropdown",{focus:S.value}])},null,2)],2)):(ze(),V("button",{key:1,class:xe(["btn-tools",{focused:S.value}]),onClick:t[4]||(t[4]=e=>z(!S.value))},[Wt(O("img",op,null,512),[[T]]),N(" "+vt(St(l)("Prompt"))+" ",1),O("span",{class:xe(["dropdown",{focus:S.value}])},null,2)],2))],2),St(ln).chatType!==St(Ml).randomTalk?(ze(),V("div",{key:0,class:xe(["right",{disabled:y.value}])},[Wt(O("span",{class:"output"},vt(St(l)("Output")),513),[[Dt,St(u)>500]]),O("button",{class:xe(["change-language has-bg",{focused:R.value}]),onClick:t[6]||(t[6]=e=>R.value=!R.value)},[N("   "),O("span",null,vt(St(xl)(c.value[St(ln).chatTargetLang])),1),O("span",{class:xe(["dropdown",{focus:R.value}])},null,2),F(gn,{class:xe(["select-language",{"is-cn":St(an).isCN}]),modelValue:R.value,"onUpdate:modelValue":t[5]||(t[5]=e=>R.value=e),position:"top left","auto-set-position":!0,"click-outside-hidden":!0,"close-btn":!1},{default:Ht((()=>[F(hn,{class:"select-language-viewer",y:!0},{default:Ht((()=>[O("ul",{onClick:U},[(ze(!0),V(i,null,Qe(St($n)(),((e,t)=>(ze(),V("li",{key:t,"data-lang":e.value},vt(St(l)(e.label)),9,ip)))),128))])])),_:1})])),_:1},8,["class","modelValue"])],2)],2)):M("",!0)],2),O("div",rp,[w.value?M("",!0):(ze(),V("div",up,[C.length?(ze(),I(Vc,{key:0,images:C,"onUpdate:images":t[7]||(t[7]=e=>C=e),class:"input-images",width:".6rem","can-delete":!0},null,8,["images"])):M("",!0)])),O("div",cp,[F(Jd,{placement:"top",disabled:w.value,"raw-content":"",content:St(l)("Only support for image upload<br> (One at a time)")},{default:Ht((()=>[F(Gd,{ref_key:"refInputAttachments",ref:x,loading:E.value,"onUpdate:loading":t[8]||(t[8]=e=>E.value=e),class:"add-attachment",disabled:w.value,"uploaded-files":C,"accept-exts":St(Qd).imageExts,"max-count":1,onOnSuccess:P},{default:Ht((()=>[O("button",null,[Wt(O("img",dp,null,512),[[T]])])])),_:1},8,["loading","disabled","uploaded-files","accept-exts"])])),_:1},8,["disabled","content"]),F(a,{class:"message-input",ref_key:"refInputMessage",ref:g,modelValue:f.value,"onUpdate:modelValue":t[9]||(t[9]=e=>f.value=e),size:"small",disabled:k.value,placeholder:St(l)("Ask something"),type:"textarea",onKeydown:W,autosize:{minRows:1,maxRows:5}},null,8,["modelValue","disabled","placeholder"]),O("div",pp,[Wt(O("p",{class:"send-tip"}," Enter "+vt(St(l)("Send"))+"; Shift + Enter "+vt(St(l)("Newline")),513),[[Dt,!f.value.trim().length]]),s.fileAnalyzed?k.value?M("",!0):(ze(),I(n,{key:1,"raw-content":"",placement:"top",effect:"dark"},{content:Ht((()=>[O("p",{innerHTML:St(p),class:"send-tooltip"},null,8,mp)])),default:Ht((()=>[O("button",{class:xe(["btn-send",{disabled:h.value}]),onClick:t[11]||(t[11]=e=>q())},[Wt(O("img",fp,null,512),[[T]]),gp],2)])),_:1})):(ze(),I(n,{key:0,content:"Start",placement:"top",effect:"dark"},{default:Ht((()=>[O("button",{class:"btn-send",onClick:t[10]||(t[10]=(...t)=>e.handleStartAnalysis&&e.handleStartAnalysis(...t))},[Wt(O("img",vp,null,512),[[T]])])])),_:1}))])])])],34),k.value?(ze(),V("div",hp,[O("div",yp,[bp,F(o,{class:"btn-stop",onClick:Y},{default:Ht((()=>[Wt(O("img",_p,null,512),[[T]]),N(" "+vt(St(l)("Stop")),1)])),_:1})])])):M("",!0)],64)}}},Sp=ol(kp,[["__scopeId","data-v-e3abc63a"]]),wp={class:"chat-container"},xp={class:"chat-wrapper"},Cp={class:"chat-footer"},Tp=ol({__name:"index",setup(e){const{$t:t,$bus:a}=ee().proxy,l=Ye(!1),n=Ye(!1),s=Ye(!1),o=Ye(""),i=Ye(null),r=Ye(null),u=()=>{setTimeout((()=>l.value=!1),300)},c=e=>{Sl(e),r.startBtnLoading=!1},d=async e=>{try{if(n.value&&!s.value)h(o.value,e);else{const t=(await Kl(e)).data;f(t.id,e,!0)}}catch(t){if(r.value.startBtnLoading=!1,t.code===Hl.file_num_exceed)return c(ul.file_num),!1;vl.error(t.msg)}};let p=null;const v=async(e,t=null)=>{p=t;const a=On.findLast(ln.chatMessageList);a.loading=!0,a.content="",d(e)};let m=null;const f=async(e,t,a=!1,l=!0)=>{m&&(clearTimeout(m),m=null),m=setTimeout((async()=>{try{const{data:n}=await Yl(e);n.code===Hl.file_page_exceed?(l&&c(ul.file_page),r.value.startBtnLoading=!1):n.file_status!==ql.down||n.code?n.file_status===ql.doing?(m=null,f(e,t,a)):y(n.msg):g(n.id,t,a)}catch(n){if(r.value.startBtnLoading=!1,n.code===Hl.file_page_exceed)return l&&c(ul.file_page),!1;vl.error(n.msg)}}),1e3)},g=(e,a,l)=>{var o,r;if(s.value)if(p)ln.chatMessageList.pop(),we((()=>{i.value.handleSendMessage(p),p=null}));else{const e=On.findLast(ln.chatMessageList);e.loading=!1,e.reloaded=!0,e.content=t("Loading successfully, you can continue with Ask PDF."),Nn(gt(e))}else l&&(h(e,a),(null==(r=null==(o=tn.planUsage)?void 0:o.usage)?void 0:r.file_nums)>=0&&tn.planUsage.usage.file_nums++);ln.chatFileAnalyzeId=e,n.value=!0,s.value=!1},h=(e,t)=>{const a={content:"summarize",id:e,file_id:t,retry:0,auto_summary:1,chat_type:Ml.autoSummaryNoQ,autoSend:1,target_lang:Vn()};r.value.showStartBtn=!1,Dn(a).then((e=>{(null==e?void 0:e.code)&&(r.value.startBtnLoading=!1,r.value.showStartBtn=!0),(null==e?void 0:e.code)===Hl.chat_num_exceed&&(i.value.planIsExceedVisibility.value=!0),ln.chatTalkStatus=Il.noAsk,[Hl.file_is_empty,Hl.ai_error].includes(null==e?void 0:e.code)&&tn.planUsage.usage.file_nums--})).catch((e=>{}))},y=e=>{vl.error(e),n.value=!0};return Ft((()=>ln.chatViewerKey),(()=>{ln.chatTalkStatus!==Il.noAsk&&Pn()})),Ft((()=>ln.chatFileId),(e=>{s.value=!1,e?(n.value=!1,(async e=>{a.emit("on-pdf-viewer-resize");const{data:l}=await Wl(e);s.value=!1,o.value=null==l?void 0:l.id,l.file_status!==ql.down||l.code?l.file_status===ql.doing?l.code>0?(n.value=!1,y(t("Your most recent request failed. Please retry."))):f(o.value,e,!1,!1):l.file_status===ql.no?n.value=!1:l.code!==Hl.file_page_exceed||(null==l?void 0:l.vector_deleted)?y(l.msg):n.value=!1:l.vector_deleted?s.value=!0:g(o.value,e,!1)})(e)):n.value=!0,l.value=!0,ln.chatMessageList.splice(0,ln.chatMessageList.length),ln.chatViewerKey++}),{immediate:!0}),Le((()=>{})),(e,t)=>{const a=nn;return ze(),V("section",wp,[F(ac),Wt((ze(),V("div",xp,[(ze(),I(ud,{ref_key:"refChatViewer",ref:r,key:St(ln).chatViewerKey,"file-analyzed":n.value,"vector-deleted":s.value,onOnAnalysis:d,onOnReAnalysis:v,onOnLoaded:u},null,8,["file-analyzed","vector-deleted"]))])),[[a,l.value]]),Wt(O("div",Cp,[(ze(),I(Sp,{ref_key:"refChatInput",ref:i,key:St(ln).chatViewerKey,"file-analyzed":n.value,"vector-deleted":s.value,onOnReAnalysis:v},null,8,["file-analyzed","vector-deleted"]))],512),[[Dt,!l.value]])])}}},[["__scopeId","data-v-2c6c75f0"]]),Ep={key:1},Ip=ol({__name:"index",setup(e){const{$bus:t}=ee().proxy,a=Gl(),l=T((()=>a.name)),n=Ye(!1),s=()=>{n.value=!n.value};return Ft((()=>a.fullPath),(()=>{n.value=!1})),Le((()=>{tn.isLogin&&Cl(),ln.chatTargetLang=Vn(),window.addEventListener("beforeunload",(()=>{Fn()})),t.on("on-taggle-left-nav",s)})),Ne((()=>{t.off("on-taggle-left-nav",s)})),(e,t)=>St(tn).isLogin?(ze(),V("main",Ep,[F(Ql,{modelValue:St(an).planExceedVisibility,"onUpdate:modelValue":t[0]||(t[0]=e=>St(an).planExceedVisibility=e),title:"UPDF AI"},{default:Ht((()=>[F(Yr,{"exceed-type":St(an).planExceedType},null,8,["exceed-type"])])),_:1},8,["modelValue"]),F(f,{name:"fade"},{default:Ht((()=>[n.value?(ze(),V("div",{key:0,class:"left-nav-screen",onClick:s})):M("",!0)])),_:1}),St(tn).isLogin?(ze(),I(St(Jl),{key:0,class:xe(`left-nav ${l.value} ${n.value?"show":""}`),onOnCloseMobileNav:s},null,8,["class"])):M("",!0),St(ln).chatType&&St(tn).isLogin?(ze(),I(Tp,{key:1,class:"chat-viewer"})):M("",!0)])):(ze(),I(Zl,{key:0}))}},[["__scopeId","data-v-bafcc812"]]);export{Ip as default};