zipcalm 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +259 -2
- package/bin/zipcalm.js +191 -0
- package/package.json +64 -4
- package/server/app.js +309 -0
- package/server/boot.js +145 -0
- package/server/config/defaults.js +153 -0
- package/server/config/index.js +140 -0
- package/server/config/schema.js +244 -0
- package/server/core/auth/password.js +89 -0
- package/server/core/auth/store.js +261 -0
- package/server/core/compress/blacklist.js +236 -0
- package/server/core/compress/capRegistry.js +171 -0
- package/server/core/compress/deleter.js +285 -0
- package/server/core/compress/hardlinkScan.js +67 -0
- package/server/core/compress/orchestrator.js +783 -0
- package/server/core/compress/preflight.js +376 -0
- package/server/core/compress/registry.js +240 -0
- package/server/core/compress/sourceWalk.js +84 -0
- package/server/core/compress/verify.js +47 -0
- package/server/core/engineRunner.js +369 -0
- package/server/core/fs/list.js +164 -0
- package/server/core/fs/repairNames.js +150 -0
- package/server/core/fs/roots.js +185 -0
- package/server/core/fs/safePath.js +173 -0
- package/server/core/fs/search.js +108 -0
- package/server/core/fs/stat.js +110 -0
- package/server/core/fs/systemTrash.js +212 -0
- package/server/core/fs/writeOps.js +257 -0
- package/server/core/hardlink/executor.js +106 -0
- package/server/core/hardlink/scanner.js +193 -0
- package/server/core/metrics/collector.js +279 -0
- package/server/core/metrics/procfs.js +107 -0
- package/server/core/task/events.js +82 -0
- package/server/core/task/manager.js +987 -0
- package/server/core/task/recovery.js +116 -0
- package/server/core/task/store.js +240 -0
- package/server/http/middleware/auth.js +130 -0
- package/server/http/middleware/error.js +54 -0
- package/server/http/middleware/logger.js +27 -0
- package/server/http/middleware/pathGuard.js +119 -0
- package/server/http/router.js +29 -0
- package/server/http/routes/auth.js +115 -0
- package/server/http/routes/blacklist.js +97 -0
- package/server/http/routes/capabilities.js +21 -0
- package/server/http/routes/compress.js +339 -0
- package/server/http/routes/fs.js +109 -0
- package/server/http/routes/hardlink.js +160 -0
- package/server/http/routes/health.js +52 -0
- package/server/http/routes/metrics.js +36 -0
- package/server/http/routes/tasks.js +304 -0
- package/server/lib/atomic-json.js +118 -0
- package/server/lib/errors.js +145 -0
- package/server/lib/fs-probe.js +25 -0
- package/server/lib/logger.js +68 -0
- package/server/lib/runtime-guard.js +49 -0
- package/server/lib/throttle.js +42 -0
- package/server/plugins/capabilities/password/index.js +300 -0
- package/server/plugins/capabilities/password/methods/aes256.js +31 -0
- package/server/plugins/capabilities/password/methods/zip20.js +29 -0
- package/server/plugins/formats/_shared/createGuards.js +26 -0
- package/server/plugins/formats/_shared/entrySafety.js +174 -0
- package/server/plugins/formats/_shared/nameRepair.js +123 -0
- package/server/plugins/formats/_shared/streams.js +18 -0
- package/server/plugins/formats/_shared/tar/compression.js +114 -0
- package/server/plugins/formats/_shared/tar/reader.js +74 -0
- package/server/plugins/formats/_shared/tar/writer.js +206 -0
- package/server/plugins/formats/_shared/tarFamily.js +207 -0
- package/server/plugins/formats/rar/index.js +354 -0
- package/server/plugins/formats/rar/js-engine.js +122 -0
- package/server/plugins/formats/rar/js-runner.mjs +129 -0
- package/server/plugins/formats/rar/unrar.js +266 -0
- package/server/plugins/formats/sevenzip/engine.js +355 -0
- package/server/plugins/formats/sevenzip/index.js +461 -0
- package/server/plugins/formats/sevenzip/wasm-runner.mjs +72 -0
- package/server/plugins/formats/tar/index.js +19 -0
- package/server/plugins/formats/targz/index.js +19 -0
- package/server/plugins/formats/tarzst/index.js +26 -0
- package/server/plugins/formats/zip/index.js +587 -0
- package/shared/app-version.js +7 -0
- package/shared/capabilities.js +21 -0
- package/shared/compress-modes.js +38 -0
- package/shared/error-codes.js +117 -0
- package/shared/format-list.js +101 -0
- package/shared/hardlink-hint.js +21 -0
- package/shared/task-phase.js +62 -0
- package/shared/task-status.js +84 -0
- package/web/dist/assets/index-D9Vdmrb9.css +1 -0
- package/web/dist/assets/index-DiDB4ClR.js +131 -0
- package/web/dist/index.html +18 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();/**
|
|
2
|
+
* @vue/shared v3.5.44
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Pu(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const at={},mr=[],cs=()=>{},dp=()=>!1,di=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pi=e=>e.startsWith("onUpdate:"),en=Object.assign,Nu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zg=Object.prototype.hasOwnProperty,et=(e,t)=>Zg.call(e,t),Le=Array.isArray,Js=e=>oo(e)==="[object Map]",Qr=e=>oo(e)==="[object Set]",Yc=e=>oo(e)==="[object Date]",Ve=e=>typeof e=="function",Et=e=>typeof e=="string",Cn=e=>typeof e=="symbol",rt=e=>e!==null&&typeof e=="object",pp=e=>(rt(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),hp=Object.prototype.toString,oo=e=>hp.call(e),Xg=e=>oo(e).slice(8,-1),mp=e=>oo(e)==="[object Object]",hi=e=>Et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fl=Pu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},e_=/-\w/g,_n=mi(e=>e.replace(e_,t=>t.slice(1).toUpperCase())),t_=/\B([A-Z])/g,nr=mi(e=>e.replace(t_,"-$1").toLowerCase()),gi=mi(e=>e.charAt(0).toUpperCase()+e.slice(1)),_a=mi(e=>e?`on${gi(e)}`:""),as=(e,t)=>!Object.is(e,t),Ho=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},gp=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},$u=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Jc;const _i=()=>Jc||(Jc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Is(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Et(s)?l_(s):Is(s);if(r)for(const l in r)t[l]=r[l]}return t}else if(Et(e)||rt(e))return e}const n_=/;(?![^(]*\))/g,s_=/:([^]+)/,r_=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function l_(e){const t={};return e.replace(r_,n=>n.startsWith("/*")?"":n).split(n_).forEach(n=>{if(n){const s=n.split(s_);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ft(e){let t="";if(Et(e))t=e;else if(Le(e))for(let n=0;n<e.length;n++){const s=ft(e[n]);s&&(t+=s+" ")}else if(rt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const o_="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",i_=Pu(o_);function _p(e){return!!e||e===""}function a_(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let r=0;s&&r<e.length;r++)s=Qs(e[r],t[r],n);return s}function Qc(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),r=new Uint8Array(s.length);for(const l of e){let o=-1;for(let i=0;i<s.length;i++)if(!r[i]&&Qs(l,s[i],n)){o=i;break}if(o<0)return!1;r[o]=1}return!0}function u_(e,t,n){let s=Js(e),r=Js(t);if(s||r||(s=Qr(e),r=Qr(t),s||r))return s&&r?Qc(e,t,n):!1;const l=Object.keys(e).length,o=Object.keys(t).length;if(l!==o)return!1;for(const i in e){const a=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(a&&!u||!a&&u||!Qs(e[i],t[i],n))return!1}return String(e)===String(t)}function Zc(e,t,n,s){n||(n=[new Map,new Map]);const[r,l]=n;if(r.has(e)||l.has(t))return r.get(e)===t&&l.get(t)===e;r.set(e,t),l.set(t,e);const o=s(e,t,n);return r.delete(e),l.delete(t),o}function Qs(e,t,n){if(e===t)return!0;let s=Yc(e),r=Yc(t);return s||r?s&&r?e.getTime()===t.getTime():!1:(s=Cn(e),r=Cn(t),s||r?e===t:(s=Le(e),r=Le(t),s||r?s&&r?Zc(e,t,n,a_):!1:(s=rt(e),r=rt(t),s||r?!s||!r?!1:Zc(e,t,n,u_):String(e)===String(t))))}function yp(e,t){return e.findIndex(n=>Qs(n,t))}const vp=e=>!!(e&&e.__v_isRef===!0),k=e=>Et(e)?e:e==null?"":Le(e)||rt(e)&&(e.toString===hp||!Ve(e.toString))?vp(e)?k(e.value):JSON.stringify(e,bp,2):String(e),bp=(e,t)=>vp(t)?bp(e,t.value):Js(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],l)=>(n[ya(s,l)+" =>"]=r,n),{})}:Qr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ya(n))}:Cn(t)?ya(t):rt(t)&&!Le(t)&&!mp(t)?String(t):t,ya=(e,t="")=>{var n;return Cn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.44
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Ft;class wp{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ft&&(Ft.active?(this.parent=Ft,this.index=(Ft.scopes||(Ft.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Ft;try{return Ft=this,t()}finally{Ft=n}}}on(){++this._on===1&&(this.prevScope=Ft,Ft=this)}off(){if(this._on>0&&--this._on===0){if(Ft===this)Ft=this.prevScope;else{let t=Ft;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ep(e){return new wp(e)}function Sp(){return Ft}function c_(e,t=!1){Ft&&Ft.cleanups.push(e)}let pt;const va=new WeakSet;class Rp{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ft&&(Ft.active?Ft.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,va.has(this)&&(va.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Tp(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Xc(this),Op(this);const t=pt,n=Yn;pt=this,Yn=!0;try{return this.fn()}finally{kp(this),pt=t,Yn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Fu(t);this.deps=this.depsTail=void 0,Xc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?va.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ka(this)&&this.run()}get dirty(){return Ka(this)}}let Ap=0,Ul,Bl;function Tp(e,t=!1){if(e.flags|=8,t){e.next=Bl,Bl=e;return}e.next=Ul,Ul=e}function Lu(){Ap++}function Mu(){if(--Ap>0)return;if(Bl){let t=Bl;for(Bl=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ul;){let t=Ul;for(Ul=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Op(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function kp(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Fu(s),f_(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ka(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(xp(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function xp(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Yl)||(e.globalVersion=Yl,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ka(e))))return;e.flags|=2;const t=e.dep,n=pt,s=Yn;pt=e,Yn=!0;try{Op(e);const r=e.fn(e._value);(t.version===0||as(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{pt=n,Yn=s,kp(e),e.flags&=-3}}function Fu(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)Fu(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function f_(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Yn=!0;const Cp=[];function ds(){Cp.push(Yn),Yn=!1}function ps(){const e=Cp.pop();Yn=e===void 0?!0:e}function Xc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=pt;pt=void 0;try{t()}finally{pt=n}}}let Yl=0;class d_{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Uu{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!pt||!Yn||pt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==pt)n=this.activeLink=new d_(pt,this),pt.deps?(n.prevDep=pt.depsTail,pt.depsTail.nextDep=n,pt.depsTail=n):pt.deps=pt.depsTail=n,Ip(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=pt.depsTail,n.nextDep=void 0,pt.depsTail.nextDep=n,pt.depsTail=n,pt.deps===n&&(pt.deps=s)}return n}trigger(t){this.version++,Yl++,this.notify(t)}notify(t){Lu();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Mu()}}}function Ip(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ip(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Jo=new WeakMap,yr=Symbol(""),Ya=Symbol(""),Jl=Symbol("");function nn(e,t,n){if(Yn&&pt){let s=Jo.get(e);s||Jo.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Uu),r.map=s,r.key=n),r.track()}}function Es(e,t,n,s,r,l){const o=Jo.get(e);if(!o){Yl++;return}const i=a=>{a&&a.trigger()};if(Lu(),t==="clear")o.forEach(i);else{const a=Le(e),u=a&&hi(n);if(a&&n==="length"){const f=Number(s);o.forEach((c,d)=>{(d==="length"||d===Jl||!Cn(d)&&d>=f)&&i(c)})}else switch((n!==void 0||o.has(void 0))&&i(o.get(n)),u&&i(o.get(Jl)),t){case"add":a?u&&i(o.get("length")):(i(o.get(yr)),Js(e)&&i(o.get(Ya)));break;case"delete":a||(i(o.get(yr)),Js(e)&&i(o.get(Ya)));break;case"set":Js(e)&&i(o.get(yr));break}}Mu()}function p_(e,t){const n=Jo.get(e);return n&&n.get(t)}function Fr(e){const t=Je(e);return t===e||(nn(t,"iterate",Jl),kn(e))?t:hs(e)?fs(e)?t.map(n=>Zs(Mn(n))):t.map(Zs):t.map(Mn)}function yi(e){return nn(e=Je(e),"iterate",Jl),e}function ls(e,t){return hs(e)?Zs(fs(e)?Mn(t):t):Mn(t)}const h_={__proto__:null,[Symbol.iterator](){return ba(this,Symbol.iterator,e=>ls(this,e))},concat(...e){return Fr(this).concat(...e.map(t=>Le(t)?Fr(t):t))},entries(){return ba(this,"entries",e=>(e[1]=ls(this,e[1]),e))},every(e,t){return ys(this,"every",e,t,void 0,arguments)},filter(e,t){return ys(this,"filter",e,t,n=>n.map(s=>ls(this,s)),arguments)},find(e,t){return ys(this,"find",e,t,n=>ls(this,n),arguments)},findIndex(e,t){return ys(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ys(this,"findLast",e,t,n=>ls(this,n),arguments)},findLastIndex(e,t){return ys(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ys(this,"forEach",e,t,void 0,arguments)},includes(...e){return wa(this,"includes",e)},indexOf(...e){return wa(this,"indexOf",e)},join(e){return Fr(this).join(e)},lastIndexOf(...e){return wa(this,"lastIndexOf",e)},map(e,t){return ys(this,"map",e,t,void 0,arguments)},pop(){return wl(this,"pop")},push(...e){return wl(this,"push",e)},reduce(e,...t){return tf(this,"reduce",e,t)},reduceRight(e,...t){return tf(this,"reduceRight",e,t)},shift(){return wl(this,"shift")},some(e,t){return ys(this,"some",e,t,void 0,arguments)},splice(...e){return wl(this,"splice",e)},toReversed(){return Fr(this).toReversed()},toSorted(e){return Fr(this).toSorted(e)},toSpliced(...e){return Fr(this).toSpliced(...e)},unshift(...e){return wl(this,"unshift",e)},values(){return ba(this,"values",e=>ls(this,e))}};function ba(e,t,n){const s=yi(e),r=s[t],l=r.call(s);if(s!==e&&!kn(e)){if(l[Symbol.toStringTag]==="Array Iterator"){const o=Object.create(Object.getPrototypeOf(l));return o.next=()=>ef(l.next(),n),r!==Dp[t]&&Object.defineProperties(o,{return:{get(){const i=l.return;return typeof i=="function"?i.bind(l):i}},throw:{get(){const i=l.throw;return typeof i=="function"?i.bind(l):i}}}),o}l._next=l.next,l.next=()=>ef(l._next(),n)}return l}function ef(e,t){return e.done||(e.value=t(e.value)),e}const Dp=Array.prototype;function ys(e,t,n,s,r,l){const o=yi(e),i=o!==e&&!kn(e),a=o[t];if(a!==Dp[t]){const c=a.apply(e,l);return i?Mn(c):c}let u=n;o!==e&&(i?u=function(c,d){return n.call(this,ls(e,c),d,e)}:n.length>2&&(u=function(c,d){return n.call(this,c,d,e)}));const f=a.call(o,u,s);return i&&r?r(f):f}function tf(e,t,n,s){const r=yi(e),l=r!==e&&!kn(e);let o=n,i=!1;r!==e&&(l?(i=s.length===0,o=function(u,f,c){return i&&(i=!1,u=ls(e,u)),n.call(this,u,ls(e,f),c,e)}):n.length>3&&(o=function(u,f,c){return n.call(this,u,f,c,e)}));const a=r[t](o,...s);return i?ls(e,a):a}function wa(e,t,n){const s=Je(e);nn(s,"iterate",Jl);const r=s[t](...n);return(r===-1||r===!1)&&vi(n[0])?(n[0]=Je(n[0]),s[t](...n)):r}function wl(e,t,n=[]){ds(),Lu();const s=Je(e)[t].apply(e,n);return Mu(),ps(),s}const m_=Pu("__proto__,__v_isRef,__isVue"),Pp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Cn));function g_(e){Cn(e)||(e=String(e));const t=Je(this);return nn(t,"has",e),t.hasOwnProperty(e)}class Np{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(r?l?T_:Fp:l?Mp:Lp).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=Le(t);if(!r){let a;if(o&&(a=h_[n]))return a;if(n==="hasOwnProperty")return g_}const i=Reflect.get(t,n,It(t)?t:s);if((Cn(n)?Pp.has(n):m_(n))||(r||nn(t,"get",n),l))return i;if(It(i)){const a=o&&hi(n)?i:i.value;return r&&rt(a)?Qa(a):a}return rt(i)?r?Qa(i):io(i):i}}class $p extends Np{constructor(t=!1){super(!1,t)}set(t,n,s,r){let l=t[n];const o=Le(t)&&hi(n);if(!this._isShallow){const u=hs(l);if(!kn(s)&&!hs(s)&&(l=Je(l),s=Je(s)),!o&&It(l)&&!It(s))return u||(l.value=s),!0}const i=o?Number(n)<t.length:et(t,n),a=Reflect.set(t,n,s,It(t)?t:r);return t===Je(r)&&a&&(i?as(s,l)&&Es(t,"set",n,s):Es(t,"add",n,s)),a}deleteProperty(t,n){const s=et(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Es(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Cn(n)||!Pp.has(n))&&nn(t,"has",n),s}ownKeys(t){return nn(t,"iterate",Le(t)?"length":yr),Reflect.ownKeys(t)}}class __ extends Np{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const y_=new $p,v_=new __,b_=new $p(!0);const Ja=e=>e,Co=e=>Reflect.getPrototypeOf(e);function w_(e,t,n){return function(...s){const r=this.__v_raw,l=Je(r),o=Js(l),i=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,u=r[e](...s),f=n?Ja:t?Zs:Mn;return!t&&nn(l,"iterate",a?Ya:yr),en(Object.create(u),{next(){const{value:c,done:d}=u.next();return d?{value:c,done:d}:{value:i?[f(c[0]),f(c[1])]:f(c),done:d}}})}}function Io(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function E_(e,t){const n={get(r){const l=this.__v_raw,o=Je(l),i=Je(r);e||(as(r,i)&&nn(o,"get",r),nn(o,"get",i));const{has:a}=Co(o),u=t?Ja:e?Zs:Mn;if(a.call(o,r))return u(l.get(r));if(a.call(o,i))return u(l.get(i));l!==o&&l.get(r)},get size(){const r=this.__v_raw;return!e&&nn(Je(r),"iterate",yr),r.size},has(r){const l=this.__v_raw,o=Je(l),i=Je(r);return e||(as(r,i)&&nn(o,"has",r),nn(o,"has",i)),r===i?l.has(r):l.has(r)||l.has(i)},forEach(r,l){const o=this,i=o.__v_raw,a=Je(i),u=t?Ja:e?Zs:Mn;return!e&&nn(a,"iterate",yr),i.forEach((f,c)=>r.call(l,u(f),u(c),o))}};return en(n,e?{add:Io("add"),set:Io("set"),delete:Io("delete"),clear:Io("clear")}:{add(r){const l=Je(this),o=Co(l),i=Je(r),a=!t&&!kn(r)&&!hs(r)?i:r;return o.has.call(l,a)||as(r,a)&&o.has.call(l,r)||as(i,a)&&o.has.call(l,i)||(l.add(a),Es(l,"add",a,a)),this},set(r,l){!t&&!kn(l)&&!hs(l)&&(l=Je(l));const o=Je(this),{has:i,get:a}=Co(o);let u=i.call(o,r);u||(r=Je(r),u=i.call(o,r));const f=a.call(o,r);return o.set(r,l),u?as(l,f)&&Es(o,"set",r,l):Es(o,"add",r,l),this},delete(r){const l=Je(this),{has:o,get:i}=Co(l);let a=o.call(l,r);a||(r=Je(r),a=o.call(l,r)),i&&i.call(l,r);const u=l.delete(r);return a&&Es(l,"delete",r,void 0),u},clear(){const r=Je(this),l=r.size!==0,o=r.clear();return l&&Es(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=w_(r,e,t)}),n}function Bu(e,t){const n=E_(e,t);return(s,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?s:Reflect.get(et(n,r)&&r in s?n:s,r,l)}const S_={get:Bu(!1,!1)},R_={get:Bu(!1,!0)},A_={get:Bu(!0,!1)};const Lp=new WeakMap,Mp=new WeakMap,Fp=new WeakMap,T_=new WeakMap;function O_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function io(e){return hs(e)?e:Hu(e,!1,y_,S_,Lp)}function Up(e){return Hu(e,!1,b_,R_,Mp)}function Qa(e){return Hu(e,!0,v_,A_,Fp)}function Hu(e,t,n,s,r){if(!rt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=r.get(e);if(l)return l;const o=O_(Xg(e));if(o===0)return e;const i=new Proxy(e,o===2?s:n);return r.set(e,i),i}function fs(e){return hs(e)?fs(e.__v_raw):!!(e&&e.__v_isReactive)}function hs(e){return!!(e&&e.__v_isReadonly)}function kn(e){return!!(e&&e.__v_isShallow)}function vi(e){return e?!!e.__v_raw:!1}function Je(e){const t=e&&e.__v_raw;return t?Je(t):e}function Vu(e){return!et(e,"__v_skip")&&Object.isExtensible(e)&&gp(e,"__v_skip",!0),e}const Mn=e=>rt(e)?io(e):e,Zs=e=>rt(e)?Qa(e):e;function It(e){return e?e.__v_isRef===!0:!1}function de(e){return Hp(e,!1)}function Bp(e){return Hp(e,!0)}function Hp(e,t){return It(e)?e:new k_(e,t)}class k_{constructor(t,n){this.dep=new Uu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Je(t),this._value=n?t:Mn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||kn(t)||hs(t);t=s?t:Je(t),as(t,n)&&(this._rawValue=t,this._value=s?t:Mn(t),this.dep.trigger())}}function Z(e){return It(e)?e.value:e}const x_={get:(e,t,n)=>t==="__v_raw"?e:Z(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return It(r)&&!It(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Vp(e){return fs(e)?e:new Proxy(e,x_)}function C_(e){const t=Le(e)?new Array(e.length):{};for(const n in e)t[n]=D_(e,n);return t}class I_{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Cn(n)?n:String(n),this._raw=Je(t);let r=!0,l=t;if(!Le(t)||Cn(this._key)||!hi(this._key))do r=!vi(l)||kn(l);while(r&&(l=l.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Z(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&It(this._raw[this._key])){const n=this._object[this._key];if(It(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return p_(this._raw,this._key)}}function D_(e,t,n){return new I_(e,t,n)}class P_{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Uu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&pt!==this)return Tp(this,!0),!0}get value(){const t=this.dep.track();return xp(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function N_(e,t,n=!1){let s,r;return Ve(e)?s=e:(s=e.get,r=e.set),new P_(s,r,n)}const Do={},Qo=new WeakMap;let cr;function $_(e,t=!1,n=cr){if(n){let s=Qo.get(n);s||Qo.set(n,s=[]),s.push(e)}}function L_(e,t,n=at){const{immediate:s,deep:r,once:l,scheduler:o,augmentJob:i,call:a}=n,u=w=>r?w:kn(w)||r===!1||r===0?Ss(w,1):Ss(w);let f,c,d,h,S=!1,R=!1;if(It(e)?(c=()=>e.value,S=kn(e)):fs(e)?(c=()=>u(e),S=!0):Le(e)?(R=!0,S=e.some(w=>fs(w)||kn(w)),c=()=>e.map(w=>{if(It(w))return w.value;if(fs(w))return u(w);if(Ve(w))return a?a(w,2):w()})):Ve(e)?t?c=a?()=>a(e,2):e:c=()=>{if(d){ds();try{d()}finally{ps()}}const w=cr;cr=f;try{return a?a(e,3,[h]):e(h)}finally{cr=w}}:c=cs,t&&r){const w=c,T=r===!0?1/0:r;c=()=>Ss(w(),T)}const D=Sp(),_=()=>{f.stop(),D&&D.active&&Nu(D.effects,f)};if(l&&t){const w=t;t=(...T)=>{try{return w(...T)}finally{_()}}}let g=R?new Array(e.length).fill(Do):Do;const O=w=>{if(!(!(f.flags&1)||!f.dirty&&!w))if(t){const T=f.run();if(w||r||S||(R?T.some((C,U)=>as(C,g[U])):as(T,g))){const C=cr;ds();try{d&&d(),cr=f;const U=[T,g===Do?void 0:R&&g[0]===Do?[]:g,h];g=T,a?a(t,3,U):t(...U)}finally{cr=C,ps()}}}else f.run()};return i&&i(O),f=new Rp(c),f.scheduler=o?()=>o(O,!1):O,h=w=>$_(w,!1,f),d=f.onStop=()=>{const w=Qo.get(f);if(w){if(a)a(w,4);else for(const T of w)T();Qo.delete(f)}},t?s?O(!0):g=f.run():o?o(O.bind(null,!0),!0):f.run(),_.pause=f.pause.bind(f),_.resume=f.resume.bind(f),_.stop=_,_}function Ss(e,t=1/0,n){if(t<=0||!rt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,It(e))Ss(e.value,t,n);else if(Le(e))for(let s=0;s<e.length;s++)Ss(e[s],t,n);else if(Qr(e)||Js(e))e.forEach(s=>{Ss(s,t,n)});else if(mp(e)){for(const s in e)Ss(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ss(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.44
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function ao(e,t,n,s){try{return s?e(...s):e()}catch(r){bi(r,t,n)}}function Jn(e,t,n,s){if(Ve(e)){const r=ao(e,t,n,s);return r&&pp(r)&&r.catch(l=>{bi(l,t,n)}),r}if(Le(e)){const r=[];for(let l=0;l<e.length;l++)r.push(Jn(e[l],t,n,s));return r}}function bi(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||at;if(t){let i=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const f=i.ec;if(f){for(let c=0;c<f.length;c++)if(f[c](e,a,u)===!1)return}i=i.parent}if(l){ds(),ao(l,null,10,[e,a,u]),ps();return}}M_(e,n,r,s,o)}function M_(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const mn=[];let Gn=-1;const os=[];let Ws=null,jr=0;const jp=Promise.resolve();let Zo=null;function uo(e){const t=Zo||jp;return e?t.then(this?e.bind(this):e):t}function F_(e){let t=Gn+1,n=mn.length;for(;t<n;){const s=t+n>>>1,r=mn[s],l=Ql(r);l<e||l===e&&r.flags&2?t=s+1:n=s}return t}function ju(e){if(!(e.flags&1)){const t=Ql(e),n=mn[mn.length-1];!n||!(e.flags&2)&&t>=Ql(n)?mn.push(e):mn.splice(F_(t),0,e),e.flags|=1,zp()}}function zp(){Zo||(Zo=jp.then(qp))}function U_(e){if(!Le(e))Ws&&e.id===-1?Ws.splice(jr+1,0,e):e.flags&1||(os.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)os.push(e[t]);zp()}function Gp(e,t,n,s=Gn+1){for(;s<mn.length;s++){const r=mn[s];if(r&&r.flags&2){if(e&&r.id!==e.uid||t!==void 0&&!(r.id>=t))continue;mn.splice(s,1),s=e?s-1:Gn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Wp(e,t,n=0){if(os.length){let s=os,r=0;if(t){s=[];for(let o=0;o<os.length;o++){const i=os[o];(i.i!==void 0?!i.i||i.i.uid<n:t.has(i))?os[r++]=i:s.push(i)}}const l=[...new Set(s)].sort((o,i)=>Ql(o)-Ql(i));if(os.length=r,Ws){for(let o=0;o<l.length;o++)Ws.push(l[o]);return}for(Ws=l,jr=0;jr<Ws.length;jr++){const o=Ws[jr];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}Ws=null,jr=0}}let Ea=!1;function B_(e,t){if(Ea){e();return}const n=t===void 0?void 0:new Set(os);e(),Ea=!0;try{Gp(void 0,t),Wp(void 0,n,t)}finally{Ea=!1}}const Ql=e=>e.id==null?e.flags&2?-1:1/0:e.id;function qp(e){try{for(Gn=0;Gn<mn.length;Gn++){const t=mn[Gn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ao(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Gn<mn.length;Gn++){const t=mn[Gn];t&&(t.flags&=-2)}Gn=-1,mn.length=0,Wp(),Zo=null,(mn.length||os.length)&&qp()}}let Xt=null,Kp=null;function Xo(e){const t=Xt;return Xt=e,Kp=e&&e.type.__scopeId||null,t}function co(e,t=Xt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&si(-1);const l=Xo(t),o=Ts.length;let i;try{i=e(...r)}finally{for(let a=Ts.length;a>o;a--)Ku();Xo(l),s._d&&si(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function Tn(e,t){if(Xt===null)return e;const n=Ti(Xt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[l,o,i,a=at]=t[r];l&&(Ve(l)&&(l={mounted:l,updated:l}),l.deep&&Ss(o),s.push({dir:l,instance:n,value:o,oldValue:void 0,arg:i,modifiers:a}))}return e}function ar(e,t,n,s){const r=e.dirs,l=t&&t.dirs;for(let o=0;o<r.length;o++){const i=r[o];l&&(i.oldValue=l[o].value);let a=i.dir[s];a&&(ds(),Jn(a,n,8,[e.el,i,e,t]),ps())}}function Vo(e,t){if(sn){let n=sn.provides;const s=sn.parent&&sn.parent.provides;s===n&&(n=sn.provides=Object.create(s)),n[e]=t}}function Ln(e,t,n=!1){const s=Th();if(s||vr){let r=vr?vr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Ve(t)?t.call(s&&s.proxy):t}}function H_(){return!!(Th()||vr)}const V_=Symbol.for("v-scx"),j_=()=>Ln(V_);function wt(e,t,n){return Yp(e,t,n)}function Yp(e,t,n=at){const{immediate:s,deep:r,flush:l,once:o}=n,i=en({},n),a=t&&s||!t&&l!=="post";let u;if(eo){if(l==="sync"){const h=j_();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=cs,h.resume=cs,h.pause=cs,h}}const f=sn;i.call=(h,S,R)=>Jn(h,f,S,R);let c=!1;l==="post"?i.scheduler=h=>{h.i=f,pn(h,f&&f.suspense)}:l!=="sync"&&(c=!0,i.scheduler=(h,S)=>{S?h():ju(h)}),i.augmentJob=h=>{t&&(h.flags|=4),c&&(h.flags|=2,f&&(h.id=f.uid,h.i=f))};const d=L_(e,t,i);return eo&&(u?u.push(d):a&&d()),d}function z_(e,t,n){const s=this.proxy,r=Et(e)?e.includes(".")?Jp(s,e):()=>s[e]:e.bind(s,s);let l;Ve(t)?l=t:(l=t.handler,n=t);const o=po(this),i=Yp(r,l.bind(s),n);return o(),i}function Jp(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const zs=new WeakMap,Qp=Symbol("_vte"),wi=e=>e.__isTeleport,pr=e=>e&&(e.disabled||e.disabled===""),G_=e=>e&&(e.defer||e.defer===""),nf=e=>typeof SVGElement<"u"&&e instanceof SVGElement,sf=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Za=(e,t)=>{const n=e&&e.to;return Et(n)?t?t(n):null:n},W_={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,l,o,i,a,u){const{mc:f,pc:c,pbc:d,o:{insert:h,querySelector:S,createText:R,createComment:D,parentNode:_}}=u,g=pr(t.props);let{dynamicChildren:O}=t;const w=(U,j,ee)=>{U.shapeFlag&16&&f(U.children,j,ee,r,l,o,i,a)},T=(U=t)=>{const j=pr(U.props),ee=U.target=Za(U.props,S),le=Xa(ee,U,R,h);ee&&(o!=="svg"&&nf(ee)?o="svg":o!=="mathml"&&sf(ee)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(ee),j||(w(U,ee,le),Il(U,!1)))},C=U=>{const j=()=>{if(zs.get(U)===j){if(zs.delete(U),pr(U.props)){const ee=_(U.el)||n;w(U,ee,U.anchor),Il(U,!0)}T(U)}};zs.set(U,j),pn(j,l)};if(e==null){const U=t.el=R(""),j=t.anchor=R("");if(h(U,n,s),h(j,n,s),G_(t.props)||l&&l.pendingBranch){C(t);return}g&&(w(t,n,j),Il(t,!0)),T()}else{t.el=e.el;const U=t.anchor=e.anchor,j=zs.get(e);if(j){j.flags|=8,zs.delete(e),C(t);return}t.targetStart=e.targetStart;const ee=t.target=e.target,le=t.targetAnchor=e.targetAnchor,z=pr(e.props),ke=z?n:ee,we=z?U:le;if(o==="svg"||nf(ee)?o="svg":(o==="mathml"||sf(ee))&&(o="mathml"),O?(d(e.dynamicChildren,O,ke,r,l,o,i),qu(e,t,!0)):a||c(e,t,ke,we,r,l,o,i,!1),g)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Po(t,n,U,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const te=Za(t.props,S);te&&(t.target=te,Po(t,te,null,u,0))}else z&&Po(t,ee,le,u,1);Il(t,g)}},remove(e,t,n,{um:s,o:{remove:r}},l){const{shapeFlag:o,children:i,anchor:a,targetStart:u,targetAnchor:f,target:c,props:d}=e,h=pr(d),S=l||!h,R=zs.get(e);if(R&&(R.flags|=8,zs.delete(e)),c&&(r(u),r(f)),l&&r(a),!R&&(h||c)&&o&16)for(let D=0;D<i.length;D++){const _=i[D];s(_,t,n,S,!!_.dynamicChildren)}},move:Po,hydrate:q_};function Po(e,t,n,{o:{insert:s},m:r},l=2){l===0&&(e.targetStart&&s(e.targetStart,t,n),s(e.targetAnchor,t,n),n=e.targetAnchor);const{el:o,anchor:i,shapeFlag:a,children:u,props:f}=e,c=l===2;if(c&&s(o,t,n),!zs.has(e)&&(!c||pr(f))&&a&16)for(let d=0;d<u.length;d++)r(u[d],t,n,2);c&&s(i,t,n)}function q_(e,t,n,s,r,l,{o:{nextSibling:o,parentNode:i,querySelector:a,insert:u,createText:f}},c){function d(D,_){let g=_;for(;g;){if(g&&g.nodeType===8){if(g.data==="teleport start anchor")t.targetStart=g;else if(g.data==="teleport anchor"){t.targetAnchor=g,D._lpa=t.targetAnchor&&o(t.targetAnchor);break}}g=o(g)}}function h(D,_){_.anchor=c(o(D),_,i(D),n,s,r,l)}const S=t.target=Za(t.props,a),R=pr(t.props);if(S){const D=S._lpa||S.firstChild;t.shapeFlag&16&&(R?(h(e,t),d(S,D),t.targetAnchor||Xa(S,t,f,u,i(e)===S?e:null)):(t.anchor=o(e),d(S,D),t.targetAnchor||Xa(S,t,f,u),c(D&&o(D),t,S,n,s,r,l))),Il(t,R)}else R&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const Zp=W_;function Il(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function Xa(e,t,n,s,r=null){const l=t.targetStart=n(""),o=t.targetAnchor=n("");return l[Qp]=o,e&&(s(l,e,r),s(o,e,r)),o}const Sa=Symbol("_leaveCb");function K_(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Fn){t=n;break}}return t}function Xp(e){if(!zu(e))return wi(e.type)&&e.children?K_(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ve(n.default))return n.default()}}function ei(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ei(wi(n.type)&&Xp(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Oe&&Le(e.children)){const n=fh(e.children,!1);n&&ei(n,t)}}function eu(e){if(e.component)return eu(e.component.subTree);if(e.type===Oe){const t=Le(e.children)&&fh(e.children,!1);return t?eu(t):void 0}if(e.type!==Fn)return e}function eh(e,t){return Ve(e)?en({name:e.name},t,{setup:e}):e}function th(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function rf(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ti=new WeakMap;function Hl(e,t,n,s,r=!1){if(Le(e)){e.forEach((R,D)=>Hl(R,t&&(Le(t)?t[D]:t),n,s,r));return}if(qr(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Hl(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?Ti(s.component):s.el,o=r?null:l,{i,r:a}=e,u=t&&t.r,f=i.refs===at?i.refs={}:i.refs,c=i.setupState,d=Je(c),h=c===at?dp:R=>rf(f,R)?!1:et(d,R),S=(R,D)=>!(D&&rf(f,D));if(u!=null&&u!==a){if(lf(t),Et(u))f[u]=null,h(u)&&(c[u]=null);else if(It(u)){const R=t;S(u,R.k)&&(u.value=null),R.k&&(f[R.k]=null)}}if(Ve(a))ao(a,i,12,[o,f]);else{const R=Et(a),D=It(a);if(R||D){const _=()=>{if(e.f){const g=R?h(a)?c[a]:f[a]:S()||!e.k?a.value:f[e.k];if(r)Le(g)&&Nu(g,l);else if(Le(g))g.includes(l)||g.push(l);else if(R)f[a]=[l],h(a)&&(c[a]=f[a]);else{const O=[l];S(a,e.k)&&(a.value=O),e.k&&(f[e.k]=O)}}else R?(f[a]=o,h(a)&&(c[a]=o)):D&&(S(a,e.k)&&(a.value=o),e.k&&(f[e.k]=o))};if(o){const g=()=>{_(),ti.delete(e)};g.id=-1,ti.set(e,g),pn(g,n)}else lf(e),_()}}}function lf(e){const t=ti.get(e);t&&(t.flags|=8,ti.delete(e))}_i().requestIdleCallback;_i().cancelIdleCallback;const qr=e=>!!e.type.__asyncLoader,zu=e=>e.type.__isKeepAlive;function Y_(e,t){nh(e,"a",t)}function J_(e,t){nh(e,"da",t)}function nh(e,t,n=sn){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ei(t,s,n),n){let r=n.parent;for(;r&&r.parent;)zu(r.parent.vnode)&&Q_(s,t,n,r),r=r.parent}}function Q_(e,t,n,s){const r=Ei(t,e,s,!0);fo(()=>{Nu(s[t],r)},n)}function Ei(e,t,n=sn,s=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...o)=>{ds();const i=po(n),a=Jn(t,n,e,o);return i(),ps(),a});return s?r.unshift(l):r.push(l),l}}const Ds=e=>(t,n=sn)=>{(!eo||e==="sp")&&Ei(e,(...s)=>t(...s),n)},Z_=Ds("bm"),Cs=Ds("m"),X_=Ds("bu"),ey=Ds("u"),Si=Ds("bum"),fo=Ds("um"),ty=Ds("sp"),ny=Ds("rtg"),sy=Ds("rtc");function ry(e,t=sn){Ei("ec",e,t)}const sh="components";function ly(e,t){return lh(sh,e,!0,t)||e}const rh=Symbol.for("v-ndc");function oy(e){return Et(e)?lh(sh,e,!1)||e:e||rh}function lh(e,t,n=!0,s=!1){const r=Xt||sn;if(r){const l=r.type;{const i=zy(l,!1);if(i&&(i===t||i===_n(t)||i===gi(_n(t))))return l}const o=of(r[e]||l[e],t)||of(r.appContext[e],t);return!o&&s?l:o}}function of(e,t){return e&&(e[t]||e[_n(t)]||e[gi(_n(t))])}function ht(e,t,n,s){let r;const l=n,o=Le(e);if(o||Et(e)){const i=o&&fs(e);let a=!1,u=!1;i&&(a=!kn(e),u=hs(e),e=yi(e)),r=new Array(e.length);for(let f=0,c=e.length;f<c;f++)r[f]=t(a?u?Zs(Mn(e[f])):Mn(e[f]):e[f],f,void 0,l)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,l)}else if(rt(e))if(e[Symbol.iterator])r=Array.from(e,(i,a)=>t(i,a,void 0,l));else{const i=Object.keys(e);r=new Array(i.length);for(let a=0,u=i.length;a<u;a++){const f=i[a];r[a]=t(e[f],f,a,l)}}else r=[];return r}function af(e,t,n,s,r,l){if(n==null&&(n={}),Xt.ce||Xt.parent&&qr(Xt.parent)&&Xt.parent.ce){const u=n,f=Object.keys(u).length>0;return t!=="default"&&(u.name=t),N(),Zr(Oe,null,[je("slot",u,s)],f?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);const i=Ts.length;N();let a;try{const u=o&&oh(o(n)),f=n.key||l||u&&u.key;a=Zr(Oe,{key:(f&&!Cn(f)?f:`_${t}`)+(!u&&s?"_fb":"")},u||(s?s():[]),u&&e._===1?64:-2)}catch(u){for(let f=Ts.length;f>i;f--)Ku();throw u}finally{o&&o._c&&(o._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function oh(e){return e.some(t=>Xr(t)?!(t.type===Fn||t.type===Oe&&!oh(t.children)):!0)?e:null}const tu=e=>e?Oh(e)?Ti(e):tu(e.parent):null,Vl=en(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>tu(e.parent),$root:e=>tu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ah(e),$forceUpdate:e=>e.f||(e.f=()=>{ju(e.update)}),$nextTick:e=>e.n||(e.n=uo.bind(e.proxy)),$watch:e=>z_.bind(e)}),Ra=(e,t)=>e!==at&&!e.__isScriptSetup&&et(e,t),iy={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:l,accessCache:o,type:i,appContext:a}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(Ra(s,t))return o[t]=1,s[t];if(r!==at&&et(r,t))return o[t]=2,r[t];if(et(l,t))return o[t]=3,l[t];if(n!==at&&et(n,t))return o[t]=4,n[t];nu&&(o[t]=0)}}const u=Vl[t];let f,c;if(u)return t==="$attrs"&&nn(e.attrs,"get",""),u(e);if((f=i.__cssModules)&&(f=f[t]))return f;if(n!==at&&et(n,t))return o[t]=4,n[t];if(c=a.config.globalProperties,et(c,t))return c[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:l}=e;return Ra(r,t)?(r[t]=n,!0):s!==at&&et(s,t)?(s[t]=n,!0):et(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:l,type:o}},i){let a;return!!(n[i]||e!==at&&i[0]!=="$"&&et(e,i)||Ra(t,i)||et(l,i)||et(s,i)||et(Vl,i)||et(r.config.globalProperties,i)||(a=o.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:et(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function uf(e){return Le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let nu=!0;function ay(e){const t=ah(e),n=e.proxy,s=e.ctx;nu=!1,t.beforeCreate&&cf(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:o,watch:i,provide:a,inject:u,created:f,beforeMount:c,mounted:d,beforeUpdate:h,updated:S,activated:R,deactivated:D,beforeDestroy:_,beforeUnmount:g,destroyed:O,unmounted:w,render:T,renderTracked:C,renderTriggered:U,errorCaptured:j,serverPrefetch:ee,expose:le,inheritAttrs:z,components:ke,directives:we,filters:te}=t;if(u&&uy(u,s,null),o)for(const H in o){const Q=o[H];Ve(Q)&&(s[H]=Q.bind(n))}if(r){const H=r.call(n,n);rt(H)&&(e.data=io(H))}if(nu=!0,l)for(const H in l){const Q=l[H],me=Ve(Q)?Q.bind(n,n):Ve(Q.get)?Q.get.bind(n,n):cs,_e=!Ve(Q)&&Ve(Q.set)?Q.set.bind(n):cs,Ee=xe({get:me,set:_e});Object.defineProperty(s,H,{enumerable:!0,configurable:!0,get:()=>Ee.value,set:oe=>Ee.value=oe})}if(i)for(const H in i)ih(i[H],s,n,H);if(a){const H=Ve(a)?a.call(n):a;Reflect.ownKeys(H).forEach(Q=>{Vo(Q,H[Q])})}f&&cf(f,e,"c");function q(H,Q){Le(Q)?Q.forEach(me=>H(me.bind(n))):Q&&H(Q.bind(n))}if(q(Z_,c),q(Cs,d),q(X_,h),q(ey,S),q(Y_,R),q(J_,D),q(ry,j),q(sy,C),q(ny,U),q(Si,g),q(fo,w),q(ty,ee),Le(le))if(le.length){const H=e.exposed||(e.exposed={});le.forEach(Q=>{Object.defineProperty(H,Q,{get:()=>n[Q],set:me=>n[Q]=me,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===cs&&(e.render=T),z!=null&&(e.inheritAttrs=z),ke&&(e.components=ke),we&&(e.directives=we),ee&&th(e)}function uy(e,t,n=cs){Le(e)&&(e=su(e));for(const s in e){const r=e[s];let l;rt(r)?"default"in r?l=Ln(r.from||s,r.default,!0):l=Ln(r.from||s):l=Ln(r),It(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:o=>l.value=o}):t[s]=l}}function cf(e,t,n){Jn(Le(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ih(e,t,n,s){let r=s.includes(".")?Jp(n,s):()=>n[s];if(Et(e)){const l=t[e];Ve(l)&&wt(r,l)}else if(Ve(e))wt(r,e.bind(n));else if(rt(e))if(Le(e))e.forEach(l=>ih(l,t,n,s));else{const l=Ve(e.handler)?e.handler.bind(n):t[e.handler];Ve(l)&&wt(r,l,e)}}function ah(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:o}}=e.appContext,i=l.get(t);let a;return i?a=i:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(u=>ni(a,u,o,!0)),ni(a,t,o)),rt(t)&&l.set(t,a),a}function ni(e,t,n,s=!1){const{mixins:r,extends:l}=t;l&&ni(e,l,n,!0),r&&r.forEach(o=>ni(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const i=cy[o]||n&&n[o];e[o]=i?i(e[o],t[o]):t[o]}return e}const cy={data:ff,props:df,emits:df,methods:Dl,computed:Dl,beforeCreate:dn,created:dn,beforeMount:dn,mounted:dn,beforeUpdate:dn,updated:dn,beforeDestroy:dn,beforeUnmount:dn,destroyed:dn,unmounted:dn,activated:dn,deactivated:dn,errorCaptured:dn,serverPrefetch:dn,components:Dl,directives:Dl,watch:dy,provide:ff,inject:fy};function ff(e,t){return t?e?function(){return en(Ve(e)?e.call(this,this):e,Ve(t)?t.call(this,this):t)}:t:e}function fy(e,t){return Dl(su(e),su(t))}function su(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function dn(e,t){return e?[...new Set([].concat(e,t))]:t}function Dl(e,t){return e?en(Object.create(null),e,t):t}function df(e,t){return e?Le(e)&&Le(t)?[...new Set([...e,...t])]:en(Object.create(null),uf(e),uf(t??{})):t}function dy(e,t){if(!e)return t;if(!t)return e;const n=en(Object.create(null),e);for(const s in t)n[s]=dn(e[s],t[s]);return n}function uh(){return{app:null,config:{isNativeTag:dp,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let py=0;function hy(e,t){return function(s,r=null){Ve(s)||(s=en({},s)),r!=null&&!rt(r)&&(r=null);const l=uh(),o=new WeakSet,i=[];let a=!1;const u=l.app={_uid:py++,_component:s,_props:r,_container:null,_context:l,_instance:null,version:Wy,get config(){return l.config},set config(f){},use(f,...c){return o.has(f)||(f&&Ve(f.install)?(o.add(f),f.install(u,...c)):Ve(f)&&(o.add(f),f(u,...c))),u},mixin(f){return l.mixins.includes(f)||l.mixins.push(f),u},component(f,c){return c?(l.components[f]=c,u):l.components[f]},directive(f,c){return c?(l.directives[f]=c,u):l.directives[f]},mount(f,c,d){if(!a){const h=u._ceVNode||je(s,r);return h.appContext=l,d===!0?d="svg":d===!1&&(d=void 0),e(h,f,d),a=!0,u._container=f,f.__vue_app__=u,Ti(h.component)}},onUnmount(f){i.push(f)},unmount(){a&&(Jn(i,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(f,c){return l.provides[f]=c,u},runWithContext(f){const c=vr;vr=u;try{return f()}finally{vr=c}}};return u}}let vr=null;const my=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_n(t)}Modifiers`]||e[`${nr(t)}Modifiers`];function gy(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||at;let r=n;const l=t.startsWith("update:"),o=l&&my(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>Et(f)?f.trim():f)),o.number&&(r=r.map($u)));let i,a=s[i=_a(t)]||s[i=_a(_n(t))];!a&&l&&(a=s[i=_a(nr(t))]),a&&Jn(a,e,6,r);const u=s[i+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Jn(u,e,6,r)}}const _y=new WeakMap;function ch(e,t,n=!1){const s=n?_y:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const l=e.emits;let o={},i=!1;if(!Ve(e)){const a=u=>{const f=ch(u,t,!0);f&&(i=!0,en(o,f))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!l&&!i?(rt(e)&&s.set(e,null),null):(Le(l)?l.forEach(a=>o[a]=null):en(o,l),rt(e)&&s.set(e,o),o)}function Ri(e,t){return!e||!di(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),et(e,t[0].toLowerCase()+t.slice(1))||et(e,nr(t))||et(e,t))}function pf(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[l],slots:o,attrs:i,emit:a,render:u,renderCache:f,props:c,data:d,setupState:h,ctx:S,inheritAttrs:R}=e,D=Xo(e);let _,g;try{if(n.shapeFlag&4){const w=r||s,T=w;_=is(u.call(T,w,f,c,h,d,S)),g=i}else{const w=t;_=is(w.length>1?w(c,{attrs:i,slots:o,emit:a}):w(c,null)),g=t.props?i:yy(i)}}catch(w){Ts.length=0,bi(w,e,1),_=je(Fn)}let O=_;if(g&&R!==!1){const w=Object.keys(g),{shapeFlag:T}=O;w.length&&T&7&&(l&&w.some(pi)&&(g=vy(g,l)),O=el(O,g,!1,!0))}if(n.dirs&&(O=el(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition){const w=wi(O.type)&&Xp(O)||O;ei(w,n.transition)}return _=O,Xo(D),_}function fh(e,t=!0){let n;for(let s=0;s<e.length;s++){const r=e[s];if(Xr(r)){if(r.type!==Fn||r.children==="v-if"){if(n)return;n=r}}else return}return n}const yy=e=>{let t;for(const n in e)(n==="class"||n==="style"||di(n))&&((t||(t={}))[n]=e[n]);return t},vy=(e,t)=>{const n={};for(const s in e)(!pi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function by(e,t,n){const{props:s,children:r,component:l}=e,{props:o,children:i,patchFlag:a}=t,u=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?hf(s,o,u):!!o;if(a&8){const f=t.dynamicProps;for(let c=0;c<f.length;c++){const d=f[c];if(dh(o,s,d)&&!Ri(u,d))return!0}}}else return(r||i)&&(!i||!i.$stable)?!0:s===o?!1:s?o?hf(s,o,u):!0:!!o;return!1}function hf(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const l=s[r];if(!et(e,l)||dh(t,e,l)&&!Ri(n,l))return!0}return!1}function dh(e,t,n){const s=e[n],r=t[n];return n==="style"&&rt(s)&&rt(r)?!Qs(s,r):s!==r}function wy({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ph={},hh=()=>Object.create(ph),mh=e=>Object.getPrototypeOf(e)===ph;function Ey(e,t,n,s=!1){const r={},l=hh();e.propsDefaults=Object.create(null),gh(e,t,r,l);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Up(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Sy(e,t,n,s){const{props:r,attrs:l,vnode:{patchFlag:o}}=e,i=Je(r),[a]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let c=0;c<f.length;c++){let d=f[c];if(Ri(e.emitsOptions,d))continue;const h=t[d];if(a)if(et(l,d))h!==l[d]&&(l[d]=h,u=!0);else{const S=_n(d);r[S]=ru(a,i,S,h,e,!1)}else h!==l[d]&&(l[d]=h,u=!0)}}}else{gh(e,t,r,l)&&(u=!0);let f;for(const c in i)(!t||!et(t,c)&&((f=nr(c))===c||!et(t,f)))&&(a?n&&(n[c]!==void 0||n[f]!==void 0)&&(r[c]=ru(a,i,c,void 0,e,!0)):delete r[c]);if(l!==i)for(const c in l)(!t||!et(t,c))&&(delete l[c],u=!0)}u&&Es(e.attrs,"set","")}function gh(e,t,n,s){const[r,l]=e.propsOptions;let o=!1,i;if(t)for(let a in t){if(Fl(a))continue;const u=t[a];let f;r&&et(r,f=_n(a))?!l||!l.includes(f)?n[f]=u:(i||(i={}))[f]=u:Ri(e.emitsOptions,a)||(!(a in s)||u!==s[a])&&(s[a]=u,o=!0)}if(l){const a=Je(n),u=i||at;for(let f=0;f<l.length;f++){const c=l[f];n[c]=ru(r,a,c,u[c],e,!et(u,c))}}return o}function ru(e,t,n,s,r,l){const o=e[n];if(o!=null){const i=et(o,"default");if(i&&s===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&Ve(a)){const{propsDefaults:u}=r;if(n in u)s=u[n];else{const f=po(r);s=u[n]=a.call(null,t),f()}}else s=a;r.ce&&r.ce._setProp(n,s)}o[0]&&(l&&!i?s=!1:o[1]&&(s===""||s===nr(n))&&(s=!0))}return s}const Ry=new WeakMap;function _h(e,t,n=!1){const s=n?Ry:t.propsCache,r=s.get(e);if(r)return r;const l=e.props,o={},i=[];let a=!1;if(!Ve(e)){const f=c=>{a=!0;const[d,h]=_h(c,t,!0);en(o,d),h&&i.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!l&&!a)return rt(e)&&s.set(e,mr),mr;if(Le(l))for(let f=0;f<l.length;f++){const c=_n(l[f]);mf(c)&&(o[c]=at)}else if(l)for(const f in l){const c=_n(f);if(mf(c)){const d=l[f],h=o[c]=Le(d)||Ve(d)?{type:d}:en({},d),S=h.type;let R=!1,D=!0;if(Le(S))for(let _=0;_<S.length;++_){const g=S[_],O=Ve(g)&&g.name;if(O==="Boolean"){R=!0;break}else O==="String"&&(D=!1)}else R=Ve(S)&&S.name==="Boolean";h[0]=R,h[1]=D,(R||et(h,"default"))&&i.push(c)}}const u=[o,i];return rt(e)&&s.set(e,u),u}function mf(e){return e[0]!=="$"&&!Fl(e)}const Gu=e=>e==="_"||e==="_ctx"||e==="$stable",Wu=e=>Le(e)?e.map(is):[is(e)],Ay=(e,t,n)=>{if(t._n)return t;const s=co((...r)=>Wu(t(...r)),n);return s._c=!1,s},yh=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Gu(r))continue;const l=e[r];if(Ve(l))t[r]=Ay(r,l,s);else if(l!=null){const o=Wu(l);t[r]=()=>o}}},vh=(e,t)=>{const n=Wu(t);e.slots.default=()=>n},bh=(e,t,n)=>{for(const s in t)(n||!Gu(s))&&(e[s]=t[s])},Ty=(e,t,n)=>{const s=e.slots=hh();if(e.vnode.shapeFlag&32){const r=t._;r?(bh(s,t,n),n&&gp(s,"_",r,!0)):yh(t,s)}else t&&vh(e,t)},Oy=(e,t,n)=>{const{vnode:s,slots:r}=e;let l=!0,o=at;if(s.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:bh(r,t,n):(l=!t.$stable,yh(t,r)),o=t}else t&&(vh(e,t),o={default:1});if(l)for(const i in r)!Gu(i)&&o[i]==null&&delete r[i]},pn=Dy;function ky(e){return xy(e)}function xy(e,t){const n=_i();n.__VUE__=!0;const{insert:s,remove:r,patchProp:l,createElement:o,createText:i,createComment:a,setText:u,setElementText:f,parentNode:c,nextSibling:d,setScopeId:h=cs,insertStaticContent:S}=e,R=(v,A,x,B=null,K=null,X=null,se=void 0,J=null,re=!!A.dynamicChildren)=>{if(v===A)return;v&&!El(v,A)&&(B=M(v),oe(v,K,X,!0),v=null),A.patchFlag===-2&&(re=!1,A.dynamicChildren=null),A.dynamicChildren&&v&&v.dynamicChildren&&v.dynamicChildren.hasOnce&&(A.dynamicChildren===mr&&(A.dynamicChildren=[]),A.dynamicChildren.hasOnce=!0);const{type:Y,ref:Ae,shapeFlag:ye}=A;switch(Y){case Ai:D(v,A,x,B);break;case Fn:_(v,A,x,B);break;case jo:v==null&&g(A,x,B,se);break;case Oe:ke(v,A,x,B,K,X,se,J,re);break;default:ye&1?T(v,A,x,B,K,X,se,J,re):ye&6?we(v,A,x,B,K,X,se,J,re):(ye&64||ye&128)&&Y.process(v,A,x,B,K,X,se,J,re,ae)}Ae!=null&&K?Hl(Ae,v&&v.ref,X,A||v,!A):Ae==null&&v&&v.ref!=null&&Hl(v.ref,null,X,v,!0)},D=(v,A,x,B)=>{if(v==null)s(A.el=i(A.children),x,B);else{const K=A.el=v.el;A.children!==v.children&&u(K,A.children)}},_=(v,A,x,B)=>{v==null?s(A.el=a(A.children||""),x,B):A.el=v.el},g=(v,A,x,B)=>{[v.el,v.anchor]=S(v.children,A,x,B,v.el,v.anchor)},O=({el:v,anchor:A},x,B)=>{let K;for(;v&&v!==A;)K=d(v),s(v,x,B),v=K;s(A,x,B)},w=({el:v,anchor:A})=>{let x;for(;v&&v!==A;)x=d(v),r(v),v=x;r(A)},T=(v,A,x,B,K,X,se,J,re)=>{if(A.type==="svg"?se="svg":A.type==="math"&&(se="mathml"),v==null)C(A,x,B,K,X,se,J,re);else{const Y=v.el&&v.el._isVueCE?v.el:null;try{Y&&Y._beginPatch(),ee(v,A,K,X,se,J,re)}finally{Y&&Y._endPatch()}}},C=(v,A,x,B,K,X,se,J)=>{let re,Y;const{props:Ae,shapeFlag:ye,transition:Ie,dirs:ce}=v;if(re=v.el=o(v.type,X,Ae&&Ae.is,Ae),ye&8?f(re,v.children):ye&16&&j(v.children,re,null,B,K,Aa(v,X),se,J),ce&&ar(v,null,B,"created"),U(re,v,v.scopeId,se,B),Ae){for(const Pe in Ae)Pe!=="value"&&!Fl(Pe)&&l(re,Pe,null,Ae[Pe],X,B);"value"in Ae&&l(re,"value",null,Ae.value,X),(Y=Ae.onVnodeBeforeMount)&&ss(Y,B,v)}ce&&ar(v,null,B,"beforeMount");const ie=Cy(K,Ie);ie&&Ie.beforeEnter(re),s(re,A,x),((Y=Ae&&Ae.onVnodeMounted)||ie||ce)&&pn(()=>{try{Y&&ss(Y,B,v),ie&&Ie.enter(re),ce&&ar(v,null,B,"mounted")}finally{}},K)},U=(v,A,x,B,K)=>{if(x&&h(v,x),B)for(let X=0;X<B.length;X++)h(v,B[X]);if(K){let X=K.subTree;if(A===X||Eh(X.type)&&(X.ssContent===A||X.ssFallback===A)){const se=K.vnode;U(v,se,se.scopeId,se.slotScopeIds,K.parent)}}},j=(v,A,x,B,K,X,se,J,re=0)=>{for(let Y=re;Y<v.length;Y++){const Ae=v[Y]=J?ws(v[Y]):is(v[Y]);R(null,Ae,A,x,B,K,X,se,J)}},ee=(v,A,x,B,K,X,se)=>{const J=A.el=v.el;let{patchFlag:re,dynamicChildren:Y,dirs:Ae}=A;re|=v.patchFlag&16;const ye=v.props||at,Ie=A.props||at;let ce;if(x&&ur(x,!1),(ce=Ie.onVnodeBeforeUpdate)&&ss(ce,x,A,v),Ae&&ar(A,v,x,"beforeUpdate"),x&&ur(x,!0),Y&&(!v.dynamicChildren||v.dynamicChildren.length!==Y.length)&&(re=0,se=!1,Y=null),(ye.innerHTML&&Ie.innerHTML==null||ye.textContent&&Ie.textContent==null)&&f(J,""),Y?le(v.dynamicChildren,Y,J,x,B,Aa(A,K),X):se||Q(v,A,J,null,x,B,Aa(A,K),X,!1),re>0){if(re&16)z(J,ye,Ie,x,K);else if(re&2&&ye.class!==Ie.class&&l(J,"class",null,Ie.class,K),re&4&&l(J,"style",ye.style,Ie.style,K),re&8){const ie=A.dynamicProps;for(let Pe=0;Pe<ie.length;Pe++){const Fe=ie[Pe],st=ye[Fe],ot=Ie[Fe];(ot!==st||Fe==="value")&&l(J,Fe,st,ot,K,x)}}re&1&&v.children!==A.children&&f(J,A.children)}else!se&&Y==null&&z(J,ye,Ie,x,K);((ce=Ie.onVnodeUpdated)||Ae)&&pn(()=>{ce&&ss(ce,x,A,v),Ae&&ar(A,v,x,"updated")},B)},le=(v,A,x,B,K,X,se)=>{for(let J=0;J<A.length;J++){const re=v[J],Y=A[J],Ae=re.el||lu(re),ye=Ae&&(re.type===Oe||!El(re,Y)||re.shapeFlag&198)?c(Ae):x;R(re,Y,ye,null,B,K,X,se,!0)}},z=(v,A,x,B,K)=>{if(A!==x){if(A!==at)for(const X in A)!Fl(X)&&!(X in x)&&l(v,X,A[X],null,K,B);for(const X in x){if(Fl(X))continue;const se=x[X],J=A[X];se!==J&&X!=="value"&&l(v,X,J,se,K,B)}"value"in x&&l(v,"value",A.value,x.value,K)}},ke=(v,A,x,B,K,X,se,J,re)=>{const Y=A.el=v?v.el:i(""),Ae=A.anchor=v?v.anchor:i("");let{patchFlag:ye,dynamicChildren:Ie,slotScopeIds:ce}=A;ce&&(J=J?J.concat(ce):ce),v==null?(s(Y,x,B),s(Ae,x,B),j(A.children||[],x,Ae,K,X,se,J,re)):ye>0&&ye&64&&Ie&&v.dynamicChildren&&v.dynamicChildren.length===Ie.length?(le(v.dynamicChildren,Ie,x,K,X,se,J),(A.key!=null||K&&A===K.subTree)&&qu(v,A,!0)):Q(v,A,x,Ae,K,X,se,J,re)},we=(v,A,x,B,K,X,se,J,re)=>{A.slotScopeIds=J,v==null?A.shapeFlag&512?K.ctx.activate(A,x,B,se,re):te(A,x,B,K,X,se,re):W(v,A,re)},te=(v,A,x,B,K,X,se)=>{const J=v.component=Uy(v,B,K);if(zu(v)&&(J.ctx.renderer=ae),By(J,!1,se),J.asyncDep){if(K&&K.registerDep(J,q,se,X),!v.el){const re=J.subTree=je(Fn);_(null,re,A,x),v.placeholder=re.el}}else q(J,v,A,x,K,X,se)},W=(v,A,x)=>{const B=A.component=v.component;if(by(v,A,x))if(B.asyncDep&&!B.asyncResolved){A.el=v.el,A.placeholder=v.placeholder,H(B,A,x);return}else B.next=A,B.update();else A.el=v.el,A.placeholder=v.placeholder,B.vnode=A},q=(v,A,x,B,K,X,se)=>{const J=()=>{if(v.isMounted){let{next:ye,bu:Ie,u:ce,parent:ie,vnode:Pe}=v;{const Rt=wh(v);if(Rt){ye&&(ye.el=Pe.el,H(v,ye,se)),Rt.asyncDep.then(()=>{pn(()=>{v.isUnmounted||Y()},K)});return}}let Fe=ye,st;ur(v,!1),ye?(ye.el=Pe.el,H(v,ye,se)):ye=Pe,Ie&&Ho(Ie),(st=ye.props&&ye.props.onVnodeBeforeUpdate)&&ss(st,ie,ye,Pe),ur(v,!0);const ot=pf(v),St=v.subTree;v.subTree=ot,R(St,ot,c(St.el),M(St),v,K,X),ye.el=ot.el,Fe===null&&wy(v,ot.el),ce&&pn(ce,K),(st=ye.props&&ye.props.onVnodeUpdated)&&pn(()=>ss(st,ie,ye,Pe),K)}else{let ye;const{el:Ie,props:ce}=A,{bm:ie,m:Pe,parent:Fe,root:st,type:ot}=v,St=qr(A);ur(v,!1),ie&&Ho(ie),!St&&(ye=ce&&ce.onVnodeBeforeMount)&&ss(ye,Fe,A),ur(v,!0);{st.ce&&st.ce._hasShadowRoot()&&st.ce._injectChildStyle(ot,v.parent?v.parent.type:void 0);const Rt=v.subTree=pf(v);R(null,Rt,x,B,v,K,X),A.el=Rt.el}if(Pe&&pn(Pe,K),!St&&(ye=ce&&ce.onVnodeMounted)){const Rt=A;pn(()=>ss(ye,Fe,Rt),K)}(A.shapeFlag&256||Fe&&qr(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&v.a&&pn(v.a,K),v.isMounted=!0,A=x=B=null}};v.scope.on();const re=v.effect=new Rp(J);v.scope.off();const Y=v.update=re.run.bind(re),Ae=v.job=re.runIfDirty.bind(re);Ae.i=v,Ae.id=v.uid,re.scheduler=()=>ju(Ae),ur(v,!0),Y()},H=(v,A,x)=>{A.component=v;const B=v.vnode.props;v.vnode=A,v.next=null,Sy(v,A.props,B,x),Oy(v,A.children,x),ds(),Gp(v),ps()},Q=(v,A,x,B,K,X,se,J,re=!1)=>{const Y=v&&v.children,Ae=v?v.shapeFlag:0,ye=A.children,{patchFlag:Ie,shapeFlag:ce}=A;if(Ie>0){if(Ie&128){_e(Y,ye,x,B,K,X,se,J,re);return}else if(Ie&256){me(Y,ye,x,B,K,X,se,J,re);return}}ce&8?(Ae&16&&Me(Y,K,X),ye!==Y&&f(x,ye)):Ae&16?ce&16?_e(Y,ye,x,B,K,X,se,J,re):Me(Y,K,X,!0):(Ae&8&&f(x,""),ce&16&&j(ye,x,B,K,X,se,J,re))},me=(v,A,x,B,K,X,se,J,re)=>{v=v||mr,A=A||mr;const Y=v.length,Ae=A.length,ye=Math.min(Y,Ae);let Ie;for(Ie=0;Ie<ye;Ie++){const ce=A[Ie]=re?ws(A[Ie]):is(A[Ie]);R(v[Ie],ce,x,null,K,X,se,J,re)}Y>Ae?Me(v,K,X,!0,!1,ye):j(A,x,B,K,X,se,J,re,ye)},_e=(v,A,x,B,K,X,se,J,re)=>{let Y=0;const Ae=A.length;let ye=v.length-1,Ie=Ae-1;for(;Y<=ye&&Y<=Ie;){const ce=v[Y],ie=A[Y]=re?ws(A[Y]):is(A[Y]);if(El(ce,ie))R(ce,ie,x,null,K,X,se,J,re);else break;Y++}for(;Y<=ye&&Y<=Ie;){const ce=v[ye],ie=A[Ie]=re?ws(A[Ie]):is(A[Ie]);if(El(ce,ie))R(ce,ie,x,null,K,X,se,J,re);else break;ye--,Ie--}if(Y>ye){if(Y<=Ie){const ce=Ie+1,ie=ce<Ae?A[ce].el:B;for(;Y<=Ie;)R(null,A[Y]=re?ws(A[Y]):is(A[Y]),x,ie,K,X,se,J,re),Y++}}else if(Y>Ie)for(;Y<=ye;)oe(v[Y],K,X,!0),Y++;else{const ce=Y,ie=Y,Pe=new Map;for(Y=ie;Y<=Ie;Y++){const qe=A[Y]=re?ws(A[Y]):is(A[Y]);qe.key!=null&&Pe.set(qe.key,Y)}let Fe,st=0;const ot=Ie-ie+1;let St=!1,Rt=0;const Tt=new Array(ot);for(Y=0;Y<ot;Y++)Tt[Y]=0;for(Y=ce;Y<=ye;Y++){const qe=v[Y];if(st>=ot){oe(qe,K,X,!0);continue}let it;if(qe.key!=null)it=Pe.get(qe.key);else for(Fe=ie;Fe<=Ie;Fe++)if(Tt[Fe-ie]===0&&El(qe,A[Fe])){it=Fe;break}it===void 0?oe(qe,K,X,!0):(Tt[it-ie]=Y+1,it>=Rt?Rt=it:St=!0,R(qe,A[it],x,null,K,X,se,J,re),st++)}const Dt=St?Iy(Tt):mr;for(Fe=Dt.length-1,Y=ot-1;Y>=0;Y--){const qe=ie+Y,it=A[qe],$s=A[qe+1],on=qe+1<Ae?$s.el||lu($s):B;Tt[Y]===0?R(null,it,x,on,K,X,se,J,re):St&&(Fe<0||Y!==Dt[Fe]?Ee(it,x,on,2):Fe--)}}},Ee=(v,A,x,B,K=null)=>{const{el:X,type:se,transition:J,children:re,shapeFlag:Y}=v;if(Y&6){Ee(v.component.subTree,A,x,B);return}if(Y&128){v.suspense.move(A,x,B);return}if(Y&64){se.move(v,A,x,ae);return}if(se===Oe){s(X,A,x);for(let ye=0;ye<re.length;ye++)Ee(re[ye],A,x,B);s(v.anchor,A,x);return}if(se===jo){O(v,A,x);return}if(B!==2&&Y&1&&J)if(B===0)J.persisted&&!X[Sa]?s(X,A,x):(J.beforeEnter(X),s(X,A,x),pn(()=>J.enter(X),K));else{const{leave:ye,delayLeave:Ie,afterLeave:ce}=J,ie=()=>{v.ctx.isUnmounted?r(X):s(X,A,x)},Pe=()=>{const Fe=X._isLeaving||!!X[Sa];X._isLeaving&&X[Sa](!0),J.persisted&&!Fe?ie():ye(X,()=>{ie(),ce&&ce()})};Ie?Ie(X,ie,Pe):Pe()}else s(X,A,x)},oe=(v,A,x,B=!1,K=!1)=>{const{type:X,props:se,ref:J,children:re,dynamicChildren:Y,shapeFlag:Ae,patchFlag:ye,dirs:Ie,cacheIndex:ce,memo:ie}=v;if((ye===-2||Y&&Y.hasOnce)&&(K=!1),J!=null&&(ds(),Hl(J,null,x,v,!0),ps()),ce!=null&&(!v.ctx||v.ctx===A)&&(A.renderCache[ce]=void 0),Ae&256){A.ctx.deactivate(v);return}const Pe=Ae&1&&Ie,Fe=!qr(v);let st;if(Fe&&(st=se&&se.onVnodeBeforeUnmount)&&ss(st,A,v),Ae&6)He(v.component,x,B);else{if(Ae&128){v.suspense.unmount(x,B);return}Pe&&ar(v,null,A,"beforeUnmount"),Ae&64?v.type.remove(v,A,x,ae,B):Y&&!Y.hasOnce&&(X!==Oe||ye>0&&ye&64)?Me(Y,A,x,!1,!0):(X===Oe&&ye&384||!K&&Ae&16)&&Me(re,A,x),B&&pe(v)}const ot=ie!=null&&ce==null;(Fe&&(st=se&&se.onVnodeUnmounted)||Pe||ot)&&pn(()=>{st&&ss(st,A,v),Pe&&ar(v,null,A,"unmounted"),ot&&(v.el=null)},x)},pe=v=>{const{type:A,el:x,anchor:B,transition:K}=v,X=A===Oe;if(X&&!K){$e(x,B);return}if(A===jo){w(v),K&&!K.persisted&&K.afterLeave&&K.afterLeave();return}const se=X?eu(v):v,J=()=>{X?c(x)&&$e(x,B):r(x),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(se&&se.shapeFlag&1&&K&&!K.persisted){const{leave:re,delayLeave:Y}=K,Ae=se.el,ye=()=>re(Ae,J);Y?Y(Ae,J,ye):ye()}else J()},$e=(v,A)=>{let x;for(;v!==A;)x=d(v),r(v),v=x;r(A)},He=(v,A,x)=>{const{bum:B,scope:K,job:X,subTree:se,um:J,m:re,a:Y}=v;gf(re),gf(Y),B&&Ho(B),K.stop(),X?(X.flags|=8,oe(se,v,A,x)):v.vnode.el&&se&&(se.transition=v.vnode.transition,oe(se,v,A,x)),J&&pn(J,A),pn(()=>{v.isUnmounted=!0},A)},Me=(v,A,x,B=!1,K=!1,X=0)=>{for(let se=X;se<v.length;se++)oe(v[se],A,x,B,K)},M=v=>{if(v.shapeFlag&6)return M(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const A=d(v.anchor||v.el),x=A&&A[Qp];return x?d(x):A},fe=(v,A,x)=>{const B=v&&A._vnode?void 0:v&&v.component?v.component.uid:Fy();B_(()=>{v==null?A._vnode&&oe(A._vnode,null,null,!0):R(A._vnode||null,v,A,null,null,null,x),A._vnode=v},B)},ae={p:R,um:oe,m:Ee,r:pe,mt:te,mc:j,pc:Q,pbc:le,n:M,o:e};return{render:fe,hydrate:void 0,createApp:hy(fe)}}function Aa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ur({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Cy(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function qu(e,t,n=!1){const s=e.children,r=t.children;if(Le(s)&&Le(r))for(let l=0;l<s.length;l++){const o=s[l];let i=r[l];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=r[l]=ws(r[l]),i.el=o.el),!n&&i.patchFlag!==-2&&qu(o,i)),i.type===Ai&&(i.patchFlag===-1&&(i=r[l]=ws(i)),i.el=o.el),i.type===Fn&&!i.el&&(i.el=o.el)}}function Iy(e){const t=e.slice(),n=[0];let s,r,l,o,i;const a=e.length;for(s=0;s<a;s++){const u=e[s];if(u!==0){if(r=n[n.length-1],e[r]<u){t[s]=r,n.push(s);continue}for(l=0,o=n.length-1;l<o;)i=l+o>>1,e[n[i]]<u?l=i+1:o=i;u<e[n[l]]&&(l>0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,o=n[l-1];l-- >0;)n[l]=o,o=t[o];return n}function wh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wh(t)}function gf(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lu(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lu(t.subTree):null}const Eh=e=>e.__isSuspense;function Dy(e,t){t&&t.pendingBranch?Le(e)?t.effects.push(...e):t.effects.push(e):U_(e)}const Oe=Symbol.for("v-fgt"),Ai=Symbol.for("v-txt"),Fn=Symbol.for("v-cmt"),jo=Symbol.for("v-stc"),Ts=[];let On=null;function N(e=!1){Ts.push(On=e?null:[])}function Ku(){Ts.pop(),On=Ts[Ts.length-1]||null}let Zl=1;function si(e,t=!1){Zl+=e,e<0&&On&&t&&(On.hasOnce=!0)}function Sh(e){return e.dynamicChildren=Zl>0?On||mr:null,Ku(),Zl>0&&On&&On.push(e),e}function L(e,t,n,s,r,l){return Sh(m(e,t,n,s,r,l,!0))}function Zr(e,t,n,s,r){return Sh(je(e,t,n,s,r,!0))}function Xr(e){return e?e.__v_isVNode===!0:!1}function El(e,t){return e.type===t.type&&e.key===t.key}const Rh=({key:e})=>e??null,zo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Et(e)||It(e)||Ve(e)?{i:Xt,r:e,k:t,f:!!n}:e:null);function m(e,t=null,n=null,s=0,r=null,l=e===Oe?0:1,o=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Rh(t),ref:t&&zo(t),scopeId:Kp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Xt};return i?(ri(a,n),l&128&&e.normalize(a)):n&&(a.shapeFlag|=Et(n)?8:16),Zl>0&&!o&&On&&(a.patchFlag>0||l&6)&&a.patchFlag!==32&&On.push(a),a}const je=Py;function Py(e,t=null,n=null,s=0,r=null,l=!1){if((!e||e===rh)&&(e=Fn),Xr(e)){const i=el(e,t,!0);return n&&ri(i,n),Zl>0&&!l&&On&&(i.shapeFlag&6?On[On.indexOf(e)]=i:On.push(i)),i.patchFlag=-2,i}if(Gy(e)&&(e=e.__vccOpts),t){t=Ny(t);let{class:i,style:a}=t;i&&!Et(i)&&(t.class=ft(i)),rt(a)&&(vi(a)&&!Le(a)&&(a=en({},a)),t.style=Is(a))}const o=Et(e)?1:Eh(e)?128:wi(e)?64:rt(e)?4:Ve(e)?2:0;return m(e,t,n,s,r,o,l,!0)}function Ny(e){return e?vi(e)||mh(e)?en({},e):e:null}function el(e,t,n=!1,s=!1){const{props:r,ref:l,patchFlag:o,children:i,transition:a}=e,u=t?Ly(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Rh(u),ref:t&&t.ref?n&&l?Le(l)?l.concat(zo(t)):[l,zo(t)]:zo(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&el(e.ssContent),ssFallback:e.ssFallback&&el(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return a&&s&&ei(f,a.clone(f)),f}function ge(e=" ",t=0){return je(Ai,null,e,t)}function $y(e,t){const n=je(jo,null,e);return n.staticCount=t,n}function be(e="",t=!1){return t?(N(),Zr(Fn,null,e)):je(Fn,null,e)}function is(e){return e==null||typeof e=="boolean"?je(Fn):Le(e)?je(Oe,null,e.slice()):Xr(e)?ws(e):je(Ai,null,String(e))}function ws(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:el(e)}function ri(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Le(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),ri(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!mh(t)?t._ctx=Xt:r===3&&Xt&&(Xt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ve(t)){if(s&65){ri(e,{default:t});return}t={default:t,_ctx:Xt},n=32}else t=String(t),s&64?(n=16,t=[ge(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ly(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=ft([t.class,s.class]));else if(r==="style")t.style=Is([t.style,s.style]);else if(di(r)){const l=t[r],o=s[r];o&&l!==o&&!(Le(l)&&l.includes(o))?t[r]=l?[].concat(l,o):o:o==null&&l==null&&!pi(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function ss(e,t,n,s=null){Jn(e,t,7,[n,s])}const My=uh();let Ah=0;function Fy(){return Ah}function Uy(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||My,l={uid:Ah++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new wp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:_h(s,r),emitsOptions:ch(s,r),emit:null,emitted:null,propsDefaults:at,inheritAttrs:s.inheritAttrs,ctx:at,data:at,props:at,attrs:at,slots:at,refs:at,setupState:at,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=gy.bind(null,l),e.ce&&e.ce(l),l}let sn=null;const Th=()=>sn||Xt;let li,Xl;{const e=_i(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),l=>{r.length>1?r.forEach(o=>o(l)):r[0](l)}};li=t("__VUE_INSTANCE_SETTERS__",n=>sn=n),Xl=t("__VUE_SSR_SETTERS__",n=>eo=n)}const po=e=>{const t=sn;return li(e),e.scope.on(),()=>{e.scope.off(),li(t)}},_f=()=>{sn&&sn.scope.off(),li(null)};function Oh(e){return e.vnode.shapeFlag&4}let eo=!1;function By(e,t=!1,n=!1){t&&Xl(t);const{props:s,children:r}=e.vnode,l=Oh(e);Ey(e,s,l,t),Ty(e,r,n||t);const o=l?Hy(e,t):void 0;return t&&Xl(!1),o}function Hy(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,iy);const{setup:s}=n;if(s){ds();const r=e.setupContext=s.length>1?jy(e):null,l=po(e),o=ao(s,e,0,[e.props,r]),i=pp(o);if(ps(),l(),(i||e.sp)&&!qr(e)&&th(e),i){if(o.then(_f,_f),t)return o.then(a=>{Xl(!0);try{yf(e,a,t)}finally{Xl(!1)}}).catch(a=>{bi(a,e,0)});e.asyncDep=o}else yf(e,o)}else kh(e)}function yf(e,t,n){Ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:rt(t)&&(e.setupState=Vp(t)),kh(e)}function kh(e,t,n){const s=e.type;e.render||(e.render=s.render||cs);{const r=po(e);ds();try{ay(e)}finally{ps(),r()}}}const Vy={get(e,t){return nn(e,"get",""),e[t]}};function jy(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Vy),slots:e.slots,emit:e.emit,expose:t}}function Ti(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vp(Vu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vl)return Vl[n](e)},has(t,n){return n in t||n in Vl}})):e.proxy}function zy(e,t=!0){return Ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Gy(e){return Ve(e)&&"__vccOpts"in e}const xe=(e,t)=>N_(e,t,eo);function to(e,t,n){try{si(-1);const s=arguments.length;return s===2?rt(t)&&!Le(t)?Xr(t)?je(e,null,[t]):je(e,t):je(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Xr(n)&&(n=[n]),je(e,t,n))}finally{si(1)}}const Wy="3.5.44";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.44
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let ou;const vf=typeof window<"u"&&window.trustedTypes;if(vf)try{ou=vf.createPolicy("vue",{createHTML:e=>e})}catch{}const xh=ou?e=>ou.createHTML(e):e=>e,qy="http://www.w3.org/2000/svg",Ky="http://www.w3.org/1998/Math/MathML",bs=typeof document<"u"?document:null,bf=bs&&bs.createElement("template"),Yy={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?bs.createElementNS(qy,e):t==="mathml"?bs.createElementNS(Ky,e):n?bs.createElement(e,{is:n}):bs.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>bs.createTextNode(e),createComment:e=>bs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,l){const o=n?n.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===l||!(r=r.nextSibling)););else{bf.innerHTML=xh(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const i=bf.content;if(s==="svg"||s==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jy=Symbol("_vtc");function Qy(e,t,n){const s=e[Jy];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const wf=Symbol("_vod"),Zy=Symbol("_vsh"),Xy=Symbol(""),ev=/(?:^|;)\s*display\s*:/;function tv(e,t,n){const s=e.style,r=Et(n);let l=!1;if(n&&!r){if(t)if(Et(t))for(const o of t.split(";")){const i=o.slice(0,o.indexOf(":")).trim();n[i]==null&&Pl(s,i,"")}else for(const o in t)n[o]==null&&Pl(s,o,"");for(const o in n){o==="display"&&(l=!0);const i=n[o];i!=null?sv(e,o,!Et(t)&&t?t[o]:void 0,i)||Pl(s,o,i):Pl(s,o,"")}}else if(r){if(t!==n){const o=s[Xy];o&&(n+=";"+o),s.cssText=n,l=ev.test(n)}}else t&&e.removeAttribute("style");wf in e&&((!r||t!==n)&&(e[wf]=l?s.display:""),e[Zy]&&(s.display="none"))}const No=/\s*!important$/;function Pl(e,t,n){if(Le(n))n.forEach(s=>Pl(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))No.test(n)?e.setProperty(t,n.replace(No,""),"important"):e.setProperty(t,n);else{const s=nv(e,t);No.test(n)?e.setProperty(nr(s),n.replace(No,""),"important"):e[s]=n}}const Ef=["Webkit","Moz","ms"],Ta={};function nv(e,t){const n=Ta[t];if(n)return n;let s=_n(t);if(s!=="filter"&&s in e)return Ta[t]=s;s=gi(s);for(let r=0;r<Ef.length;r++){const l=Ef[r]+s;if(l in e)return Ta[t]=l}return t}function sv(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Et(s)&&n===s}const Sf="http://www.w3.org/1999/xlink";function Rf(e,t,n,s,r,l=i_(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Sf,t.slice(6,t.length)):e.setAttributeNS(Sf,t,n):n==null||l&&!_p(n)?e.removeAttribute(t):e.setAttribute(t,l?"":Cn(n)?String(n):n)}function Af(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?xh(n):n);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const i=l==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=_p(n):n==null&&i==="string"?(n="",o=!0):i==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function Ys(e,t,n,s){e.addEventListener(t,n,s)}function rv(e,t,n,s){e.removeEventListener(t,n,s)}const Tf=Symbol("_vei");function lv(e,t,n,s,r=null){const l=e[Tf]||(e[Tf]={}),o=l[t];if(s&&o)o.value=s;else{const[i,a]=av(t);if(s){const u=l[t]=fv(s,r);Ys(e,i,u,a)}else o&&(rv(e,i,o,a),l[t]=void 0)}}const ov=/(Once|Passive|Capture)$/,iv=/^on:?(?:Once|Passive|Capture)$/;function av(e){let t,n;for(;(n=e.match(ov))&&!iv.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):nr(e.slice(2)),t]}let Oa=0;const uv=Promise.resolve(),cv=()=>Oa||(uv.then(()=>Oa=0),Oa=Date.now());function fv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(Le(r)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const o=r.slice(),i=[s];for(let a=0;a<o.length&&!s._stopped;a++){const u=o[a];u&&Jn(u,t,5,i)}}else Jn(r,t,5,[s])};return n.value=e,n.attached=cv(),n}const Of=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,dv=(e,t,n,s,r,l)=>{const o=r==="svg";t==="class"?Qy(e,s,o):t==="style"?tv(e,n,s):di(t)?pi(t)||lv(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pv(e,t,s,o))?(Af(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Rf(e,t,s,o,l,t!=="value")):e._isVueCE&&(hv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Et(s)))?Af(e,_n(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Rf(e,t,s,o))};function pv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Of(t)&&Ve(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Of(t)&&Et(n)?!1:t in e}function hv(e,t){const n=e._def.props;if(!n)return!1;const s=_n(t);return Array.isArray(n)?n.some(r=>_n(r)===s):Object.keys(n).some(r=>_n(r)===s)}const tl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Le(t)?n=>Ho(t,n):t};function mv(e){e.target.composing=!0}function kf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const us=Symbol("_assign"),$o=Symbol("_initialValue");function ka(e,t,n){return t&&(e=e.trim()),n&&(e=$u(e)),e}const Xs={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[$o]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[$o]=e.defaultValue.replace(/\r\n?/g,`
|
|
18
|
+
`))),e[us]=tl(r);const l=s||r.props&&r.props.type==="number";Ys(e,t?"change":"input",o=>{o.target.composing||e[us](ka(e.value,n,l))}),(n||l)&&Ys(e,"change",()=>{e.value=ka(e.value,n,l)}),t||(Ys(e,"compositionstart",mv),Ys(e,"compositionend",kf),Ys(e,"change",kf))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",l=e[$o];delete e[$o],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[us](ka(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:l}},o){if(e[us]=tl(o),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?$u(e.value):e.value,a=t??"";if(i===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},iu={deep:!0,created(e,t,n){e[us]=tl(n),Ys(e,"change",()=>{const s=e._modelValue,r=Ch(e),l=e.checked,o=e[us];if(Le(s)){const i=yp(s,r),a=i!==-1;if(l&&!a)o(s.concat(r));else if(!l&&a){const u=[...s];u.splice(i,1),o(u)}}else if(Qr(s)){const i=new Set(s);l?i.add(r):i.delete(r),o(i)}else o(Ih(e,l))})},mounted:xf,beforeUpdate(e,t,n){e[us]=tl(n),xf(e,t,n)}};function xf(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(Le(t))r=yp(t,s.props.value)>-1;else if(Qr(t))r=t.has(s.props.value);else{if(t===n)return;r=Qs(t,Ih(e,!0))}e.checked!==r&&(e.checked=r)}const Cf={created(e,{value:t},n){e.checked=Qs(t,n.props.value),e[us]=tl(n),Ys(e,"change",()=>{e[us](Ch(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[us]=tl(s),t!==n&&(e.checked=Qs(t,s.props.value))}};function Ch(e){return"_value"in e?e._value:e.value}function Ih(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const gv=["ctrl","shift","alt","meta"],_v={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>gv.some(n=>e[`${n}Key`]&&!t.includes(n))},Bt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...l)=>{for(let o=0;o<t.length;o++){const i=_v[t[o]];if(i&&i(r,t))return}return e(r,...l)})},yv={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},oi=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const l=nr(r.key);if(t.some(o=>o===l||yv[o]===l))return e(r)})},vv=en({patchProp:dv},Yy);let If;function bv(){return If||(If=ky(vv))}const wv=(...e)=>{const t=bv().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Sv(s);if(!r)return;const l=t._component;!Ve(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Ev(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function Ev(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sv(e){return Et(e)?document.querySelector(e):e}/*!
|
|
19
|
+
* pinia v2.3.1
|
|
20
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/let Dh;const Oi=e=>Dh=e,Ph=Symbol();function au(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var jl;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(jl||(jl={}));function Rv(){const e=Ep(!0),t=e.run(()=>de({}));let n=[],s=[];const r=Vu({install(l){Oi(r),r._a=l,l.provide(Ph,r),l.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(l){return this._a?n.push(l):s.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Nh=()=>{};function Df(e,t,n,s=Nh){e.push(t);const r=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),s())};return!n&&Sp()&&c_(r),r}function Ur(e,...t){e.slice().forEach(n=>{n(...t)})}const Av=e=>e(),Pf=Symbol(),xa=Symbol();function uu(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];au(r)&&au(s)&&e.hasOwnProperty(n)&&!It(s)&&!fs(s)?e[n]=uu(r,s):e[n]=s}return e}const Tv=Symbol();function Ov(e){return!au(e)||!e.hasOwnProperty(Tv)}const{assign:Gs}=Object;function kv(e){return!!(It(e)&&e.effect)}function xv(e,t,n,s){const{state:r,actions:l,getters:o}=t,i=n.state.value[e];let a;function u(){i||(n.state.value[e]=r?r():{});const f=C_(n.state.value[e]);return Gs(f,l,Object.keys(o||{}).reduce((c,d)=>(c[d]=Vu(xe(()=>{Oi(n);const h=n._s.get(e);return o[d].call(h,h)})),c),{}))}return a=$h(e,u,t,n,s,!0),a}function $h(e,t,n={},s,r,l){let o;const i=Gs({actions:{}},n),a={deep:!0};let u,f,c=[],d=[],h;const S=s.state.value[e];!l&&!S&&(s.state.value[e]={});let R;function D(j){let ee;u=f=!1,typeof j=="function"?(j(s.state.value[e]),ee={type:jl.patchFunction,storeId:e,events:h}):(uu(s.state.value[e],j),ee={type:jl.patchObject,payload:j,storeId:e,events:h});const le=R=Symbol();uo().then(()=>{R===le&&(u=!0)}),f=!0,Ur(c,ee,s.state.value[e])}const _=l?function(){const{state:ee}=n,le=ee?ee():{};this.$patch(z=>{Gs(z,le)})}:Nh;function g(){o.stop(),c=[],d=[],s._s.delete(e)}const O=(j,ee="")=>{if(Pf in j)return j[xa]=ee,j;const le=function(){Oi(s);const z=Array.from(arguments),ke=[],we=[];function te(H){ke.push(H)}function W(H){we.push(H)}Ur(d,{args:z,name:le[xa],store:T,after:te,onError:W});let q;try{q=j.apply(this&&this.$id===e?this:T,z)}catch(H){throw Ur(we,H),H}return q instanceof Promise?q.then(H=>(Ur(ke,H),H)).catch(H=>(Ur(we,H),Promise.reject(H))):(Ur(ke,q),q)};return le[Pf]=!0,le[xa]=ee,le},w={_p:s,$id:e,$onAction:Df.bind(null,d),$patch:D,$reset:_,$subscribe(j,ee={}){const le=Df(c,j,ee.detached,()=>z()),z=o.run(()=>wt(()=>s.state.value[e],ke=>{(ee.flush==="sync"?f:u)&&j({storeId:e,type:jl.direct,events:h},ke)},Gs({},a,ee)));return le},$dispose:g},T=io(w);s._s.set(e,T);const U=(s._a&&s._a.runWithContext||Av)(()=>s._e.run(()=>(o=Ep()).run(()=>t({action:O}))));for(const j in U){const ee=U[j];if(It(ee)&&!kv(ee)||fs(ee))l||(S&&Ov(ee)&&(It(ee)?ee.value=S[j]:uu(ee,S[j])),s.state.value[e][j]=ee);else if(typeof ee=="function"){const le=O(ee,j);U[j]=le,i.actions[j]=ee}}return Gs(T,U),Gs(Je(T),U),Object.defineProperty(T,"$state",{get:()=>s.state.value[e],set:j=>{D(ee=>{Gs(ee,j)})}}),s._p.forEach(j=>{Gs(T,o.run(()=>j({store:T,app:s._a,pinia:s,options:i})))}),S&&l&&n.hydrate&&n.hydrate(T.$state,S),u=!0,f=!0,T}/*! #__NO_SIDE_EFFECTS__ */function ki(e,t,n){let s,r;const l=typeof t=="function";typeof e=="string"?(s=e,r=l?n:t):(r=e,s=e.id);function o(i,a){const u=H_();return i=i||(u?Ln(Ph,null):null),i&&Oi(i),i=Dh,i._s.has(s)||(l?$h(s,t,r,i):xv(s,r,i)),i._s.get(s)}return o.$id=s,o}/*!
|
|
23
|
+
* vue-router v4.6.4
|
|
24
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
25
|
+
* @license MIT
|
|
26
|
+
*/const zr=typeof document<"u";function Lh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Cv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Lh(e.default)}const nt=Object.assign;function Ca(e,t){const n={};for(const s in t){const r=t[s];n[s]=Qn(r)?r.map(e):e(r)}return n}const zl=()=>{},Qn=Array.isArray;function Nf(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Mh=/#/g,Iv=/&/g,Dv=/\//g,Pv=/=/g,Nv=/\?/g,Fh=/\+/g,$v=/%5B/g,Lv=/%5D/g,Uh=/%5E/g,Mv=/%60/g,Bh=/%7B/g,Fv=/%7C/g,Hh=/%7D/g,Uv=/%20/g;function Yu(e){return e==null?"":encodeURI(""+e).replace(Fv,"|").replace($v,"[").replace(Lv,"]")}function Bv(e){return Yu(e).replace(Bh,"{").replace(Hh,"}").replace(Uh,"^")}function cu(e){return Yu(e).replace(Fh,"%2B").replace(Uv,"+").replace(Mh,"%23").replace(Iv,"%26").replace(Mv,"`").replace(Bh,"{").replace(Hh,"}").replace(Uh,"^")}function Hv(e){return cu(e).replace(Pv,"%3D")}function Vv(e){return Yu(e).replace(Mh,"%23").replace(Nv,"%3F")}function jv(e){return Vv(e).replace(Dv,"%2F")}function no(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const zv=/\/$/,Gv=e=>e.replace(zv,"");function Ia(e,t,n="/"){let s,r={},l="",o="";const i=t.indexOf("#");let a=t.indexOf("?");return a=i>=0&&a>i?-1:a,a>=0&&(s=t.slice(0,a),l=t.slice(a,i>0?i:t.length),r=e(l.slice(1))),i>=0&&(s=s||t.slice(0,i),o=t.slice(i,t.length)),s=Yv(s??t,n),{fullPath:s+l+o,path:s,query:r,hash:no(o)}}function Wv(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function $f(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function qv(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&nl(t.matched[s],n.matched[r])&&Vh(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function nl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Kv(e[n],t[n]))return!1;return!0}function Kv(e,t){return Qn(e)?Lf(e,t):Qn(t)?Lf(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Lf(e,t){return Qn(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Yv(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let l=n.length-1,o,i;for(o=0;o<s.length;o++)if(i=s[o],i!==".")if(i==="..")l>1&&l--;else break;return n.slice(0,l).join("/")+"/"+s.slice(o).join("/")}const js={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let fu=function(e){return e.pop="pop",e.push="push",e}({}),Da=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Jv(e){if(!e)if(zr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Gv(e)}const Qv=/^[^#]+#/;function Zv(e,t){return e.replace(Qv,"#")+t}function Xv(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const xi=()=>({left:window.scrollX,top:window.scrollY});function e0(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Xv(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Mf(e,t){return(history.state?history.state.position-t:-1)+e}const du=new Map;function t0(e,t){du.set(e,t)}function n0(e){const t=du.get(e);return du.delete(e),t}function s0(e){return typeof e=="string"||e&&typeof e=="object"}function jh(e){return typeof e=="string"||typeof e=="symbol"}let Ct=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const zh=Symbol("");Ct.MATCHER_NOT_FOUND+"",Ct.NAVIGATION_GUARD_REDIRECT+"",Ct.NAVIGATION_ABORTED+"",Ct.NAVIGATION_CANCELLED+"",Ct.NAVIGATION_DUPLICATED+"";function sl(e,t){return nt(new Error,{type:e,[zh]:!0},t)}function vs(e,t){return e instanceof Error&&zh in e&&(t==null||!!(e.type&t))}const r0=["params","query","hash"];function l0(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of r0)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function o0(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const r=n[s].replace(Fh," "),l=r.indexOf("="),o=no(l<0?r:r.slice(0,l)),i=l<0?null:no(r.slice(l+1));if(o in t){let a=t[o];Qn(a)||(a=t[o]=[a]),a.push(i)}else t[o]=i}return t}function Ff(e){let t="";for(let n in e){const s=e[n];if(n=Hv(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(Qn(s)?s.map(r=>r&&cu(r)):[s&&cu(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function i0(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Qn(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const a0=Symbol(""),Uf=Symbol(""),Ci=Symbol(""),Ju=Symbol(""),pu=Symbol("");function Sl(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function qs(e,t,n,s,r,l=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,a)=>{const u=d=>{d===!1?a(sl(Ct.NAVIGATION_ABORTED,{from:n,to:t})):d instanceof Error?a(d):s0(d)?a(sl(Ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:d})):(o&&s.enterCallbacks[r]===o&&typeof d=="function"&&o.push(d),i())},f=l(()=>e.call(s&&s.instances[r],t,n,u));let c=Promise.resolve(f);e.length<3&&(c=c.then(u)),c.catch(d=>a(d))})}function Pa(e,t,n,s,r=l=>l()){const l=[];for(const o of e)for(const i in o.components){let a=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(Lh(a)){const u=(a.__vccOpts||a)[t];u&&l.push(qs(u,n,s,o,i,r))}else{let u=a();l.push(()=>u.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${i}" at "${o.path}"`);const c=Cv(f)?f.default:f;o.mods[i]=f,o.components[i]=c;const d=(c.__vccOpts||c)[t];return d&&qs(d,n,s,o,i,r)()}))}}return l}function u0(e,t){const n=[],s=[],r=[],l=Math.max(t.matched.length,e.matched.length);for(let o=0;o<l;o++){const i=t.matched[o];i&&(e.matched.find(u=>nl(u,i))?s.push(i):n.push(i));const a=e.matched[o];a&&(t.matched.find(u=>nl(u,a))||r.push(a))}return[n,s,r]}/*!
|
|
27
|
+
* vue-router v4.6.4
|
|
28
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
29
|
+
* @license MIT
|
|
30
|
+
*/let c0=()=>location.protocol+"//"+location.host;function Gh(e,t){const{pathname:n,search:s,hash:r}=t,l=e.indexOf("#");if(l>-1){let o=r.includes(e.slice(l))?e.slice(l).length:1,i=r.slice(o);return i[0]!=="/"&&(i="/"+i),$f(i,"")}return $f(n,e)+s+r}function f0(e,t,n,s){let r=[],l=[],o=null;const i=({state:d})=>{const h=Gh(e,location),S=n.value,R=t.value;let D=0;if(d){if(n.value=h,t.value=d,o&&o===S){o=null;return}D=R?d.position-R.position:0}else s(h);r.forEach(_=>{_(n.value,S,{delta:D,type:fu.pop,direction:D?D>0?Da.forward:Da.back:Da.unknown})})};function a(){o=n.value}function u(d){r.push(d);const h=()=>{const S=r.indexOf(d);S>-1&&r.splice(S,1)};return l.push(h),h}function f(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(nt({},d.state,{scroll:xi()}),"")}}function c(){for(const d of l)d();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:a,listen:u,destroy:c}}function Bf(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?xi():null}}function d0(e){const{history:t,location:n}=window,s={value:Gh(e,n)},r={value:t.state};r.value||l(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(a,u,f){const c=e.indexOf("#"),d=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+a:c0()+e+a;try{t[f?"replaceState":"pushState"](u,"",d),r.value=u}catch(h){console.error(h),n[f?"replace":"assign"](d)}}function o(a,u){l(a,nt({},t.state,Bf(r.value.back,a,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=a}function i(a,u){const f=nt({},r.value,t.state,{forward:a,scroll:xi()});l(f.current,f,!0),l(a,nt({},Bf(s.value,a,null),{position:f.position+1},u),!1),s.value=a}return{location:s,state:r,push:i,replace:o}}function p0(e){e=Jv(e);const t=d0(e),n=f0(e,t.state,t.location,t.replace);function s(l,o=!0){o||n.pauseListeners(),history.go(l)}const r=nt({location:"",base:e,go:s,createHref:Zv.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function h0(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),p0(e)}let gr=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Lt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Lt||{});const m0={type:gr.Static,value:""},g0=/[a-zA-Z0-9_]/;function _0(e){if(!e)return[[]];if(e==="/")return[[m0]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=Lt.Static,s=n;const r=[];let l;function o(){l&&r.push(l),l=[]}let i=0,a,u="",f="";function c(){u&&(n===Lt.Static?l.push({type:gr.Static,value:u}):n===Lt.Param||n===Lt.ParamRegExp||n===Lt.ParamRegExpEnd?(l.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),l.push({type:gr.Param,value:u,regexp:f,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=a}for(;i<e.length;){if(a=e[i++],a==="\\"&&n!==Lt.ParamRegExp){s=n,n=Lt.EscapeNext;continue}switch(n){case Lt.Static:a==="/"?(u&&c(),o()):a===":"?(c(),n=Lt.Param):d();break;case Lt.EscapeNext:d(),n=s;break;case Lt.Param:a==="("?n=Lt.ParamRegExp:g0.test(a)?d():(c(),n=Lt.Static,a!=="*"&&a!=="?"&&a!=="+"&&i--);break;case Lt.ParamRegExp:a===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+a:n=Lt.ParamRegExpEnd:f+=a;break;case Lt.ParamRegExpEnd:c(),n=Lt.Static,a!=="*"&&a!=="?"&&a!=="+"&&i--,f="";break;default:t("Unknown state");break}}return n===Lt.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),c(),o(),r}const Hf="[^/]+?",y0={sensitive:!1,strict:!1,start:!0,end:!0};var hn=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(hn||{});const v0=/[.+*?^${}()[\]/\\]/g;function b0(e,t){const n=nt({},y0,t),s=[];let r=n.start?"^":"";const l=[];for(const u of e){const f=u.length?[]:[hn.Root];n.strict&&!u.length&&(r+="/");for(let c=0;c<u.length;c++){const d=u[c];let h=hn.Segment+(n.sensitive?hn.BonusCaseSensitive:0);if(d.type===gr.Static)c||(r+="/"),r+=d.value.replace(v0,"\\$&"),h+=hn.Static;else if(d.type===gr.Param){const{value:S,repeatable:R,optional:D,regexp:_}=d;l.push({name:S,repeatable:R,optional:D});const g=_||Hf;if(g!==Hf){h+=hn.BonusCustomRegExp;try{`${g}`}catch(w){throw new Error(`Invalid custom RegExp for param "${S}" (${g}): `+w.message)}}let O=R?`((?:${g})(?:/(?:${g}))*)`:`(${g})`;c||(O=D&&u.length<2?`(?:/${O})`:"/"+O),D&&(O+="?"),r+=O,h+=hn.Dynamic,D&&(h+=hn.BonusOptional),R&&(h+=hn.BonusRepeatable),g===".*"&&(h+=hn.BonusWildcard)}f.push(h)}s.push(f)}if(n.strict&&n.end){const u=s.length-1;s[u][s[u].length-1]+=hn.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function i(u){const f=u.match(o),c={};if(!f)return null;for(let d=1;d<f.length;d++){const h=f[d]||"",S=l[d-1];c[S.name]=h&&S.repeatable?h.split("/"):h}return c}function a(u){let f="",c=!1;for(const d of e){(!c||!f.endsWith("/"))&&(f+="/"),c=!1;for(const h of d)if(h.type===gr.Static)f+=h.value;else if(h.type===gr.Param){const{value:S,repeatable:R,optional:D}=h,_=S in u?u[S]:"";if(Qn(_)&&!R)throw new Error(`Provided param "${S}" is an array but it is not repeatable (* or + modifiers)`);const g=Qn(_)?_.join("/"):_;if(!g)if(D)d.length<2&&(f.endsWith("/")?f=f.slice(0,-1):c=!0);else throw new Error(`Missing required param "${S}"`);f+=g}}return f||"/"}return{re:o,score:s,keys:l,parse:i,stringify:a}}function w0(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===hn.Static+hn.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===hn.Static+hn.Segment?1:-1:0}function Wh(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const l=w0(s[n],r[n]);if(l)return l;n++}if(Math.abs(r.length-s.length)===1){if(Vf(s))return 1;if(Vf(r))return-1}return r.length-s.length}function Vf(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const E0={strict:!1,end:!0,sensitive:!1};function S0(e,t,n){const s=b0(_0(e.path),n),r=nt(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function R0(e,t){const n=[],s=new Map;t=Nf(E0,t);function r(c){return s.get(c)}function l(c,d,h){const S=!h,R=zf(c);R.aliasOf=h&&h.record;const D=Nf(t,c),_=[R];if("alias"in c){const w=typeof c.alias=="string"?[c.alias]:c.alias;for(const T of w)_.push(zf(nt({},R,{components:h?h.record.components:R.components,path:T,aliasOf:h?h.record:R})))}let g,O;for(const w of _){const{path:T}=w;if(d&&T[0]!=="/"){const C=d.record.path,U=C[C.length-1]==="/"?"":"/";w.path=d.record.path+(T&&U+T)}if(g=S0(w,d,D),h?h.alias.push(g):(O=O||g,O!==g&&O.alias.push(g),S&&c.name&&!Gf(g)&&o(c.name)),qh(g)&&a(g),R.children){const C=R.children;for(let U=0;U<C.length;U++)l(C[U],g,h&&h.children[U])}h=h||g}return O?()=>{o(O)}:zl}function o(c){if(jh(c)){const d=s.get(c);d&&(s.delete(c),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(c);d>-1&&(n.splice(d,1),c.record.name&&s.delete(c.record.name),c.children.forEach(o),c.alias.forEach(o))}}function i(){return n}function a(c){const d=O0(c,n);n.splice(d,0,c),c.record.name&&!Gf(c)&&s.set(c.record.name,c)}function u(c,d){let h,S={},R,D;if("name"in c&&c.name){if(h=s.get(c.name),!h)throw sl(Ct.MATCHER_NOT_FOUND,{location:c});D=h.record.name,S=nt(jf(d.params,h.keys.filter(O=>!O.optional).concat(h.parent?h.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),c.params&&jf(c.params,h.keys.map(O=>O.name))),R=h.stringify(S)}else if(c.path!=null)R=c.path,h=n.find(O=>O.re.test(R)),h&&(S=h.parse(R),D=h.record.name);else{if(h=d.name?s.get(d.name):n.find(O=>O.re.test(d.path)),!h)throw sl(Ct.MATCHER_NOT_FOUND,{location:c,currentLocation:d});D=h.record.name,S=nt({},d.params,c.params),R=h.stringify(S)}const _=[];let g=h;for(;g;)_.unshift(g.record),g=g.parent;return{name:D,path:R,params:S,matched:_,meta:T0(_)}}e.forEach(c=>l(c));function f(){n.length=0,s.clear()}return{addRoute:l,resolve:u,removeRoute:o,clearRoutes:f,getRoutes:i,getRecordMatcher:r}}function jf(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function zf(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:A0(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function A0(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Gf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function T0(e){return e.reduce((t,n)=>nt(t,n.meta),{})}function O0(e,t){let n=0,s=t.length;for(;n!==s;){const l=n+s>>1;Wh(e,t[l])<0?s=l:n=l+1}const r=k0(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function k0(e){let t=e;for(;t=t.parent;)if(qh(t)&&Wh(e,t)===0)return t}function qh({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Wf(e){const t=Ln(Ci),n=Ln(Ju),s=xe(()=>{const a=Z(e.to);return t.resolve(a)}),r=xe(()=>{const{matched:a}=s.value,{length:u}=a,f=a[u-1],c=n.matched;if(!f||!c.length)return-1;const d=c.findIndex(nl.bind(null,f));if(d>-1)return d;const h=qf(a[u-2]);return u>1&&qf(f)===h&&c[c.length-1].path!==h?c.findIndex(nl.bind(null,a[u-2])):d}),l=xe(()=>r.value>-1&&D0(n.params,s.value.params)),o=xe(()=>r.value>-1&&r.value===n.matched.length-1&&Vh(n.params,s.value.params));function i(a={}){if(I0(a)){const u=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch(zl);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:xe(()=>s.value.href),isActive:l,isExactActive:o,navigate:i}}function x0(e){return e.length===1?e[0]:e}const C0=eh({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Wf,setup(e,{slots:t}){const n=io(Wf(e)),{options:s}=Ln(Ci),r=xe(()=>({[Kf(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Kf(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&x0(t.default(n));return e.custom?l:to("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},l)}}}),Ii=C0;function I0(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function D0(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Qn(r)||r.length!==s.length||s.some((l,o)=>l.valueOf()!==r[o].valueOf()))return!1}return!0}function qf(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Kf=(e,t,n)=>e??t??n,P0=eh({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ln(pu),r=xe(()=>e.route||s.value),l=Ln(Uf,0),o=xe(()=>{let u=Z(l);const{matched:f}=r.value;let c;for(;(c=f[u])&&!c.components;)u++;return u}),i=xe(()=>r.value.matched[o.value]);Vo(Uf,xe(()=>o.value+1)),Vo(a0,i),Vo(pu,r);const a=de();return wt(()=>[a.value,i.value,e.name],([u,f,c],[d,h,S])=>{f&&(f.instances[c]=u,h&&h!==f&&u&&u===d&&(f.leaveGuards.size||(f.leaveGuards=h.leaveGuards),f.updateGuards.size||(f.updateGuards=h.updateGuards))),u&&f&&(!h||!nl(f,h)||!d)&&(f.enterCallbacks[c]||[]).forEach(R=>R(u))},{flush:"post"}),()=>{const u=r.value,f=e.name,c=i.value,d=c&&c.components[f];if(!d)return Yf(n.default,{Component:d,route:u});const h=c.props[f],S=h?h===!0?u.params:typeof h=="function"?h(u):h:null,D=to(d,nt({},S,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(c.instances[f]=null)},ref:a}));return Yf(n.default,{Component:D,route:u})||D}}});function Yf(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const N0=P0;function $0(e){const t=R0(e.routes,e),n=e.parseQuery||o0,s=e.stringifyQuery||Ff,r=e.history,l=Sl(),o=Sl(),i=Sl(),a=Bp(js);let u=js;zr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Ca.bind(null,M=>""+M),c=Ca.bind(null,jv),d=Ca.bind(null,no);function h(M,fe){let ae,he;return jh(M)?(ae=t.getRecordMatcher(M),he=fe):he=M,t.addRoute(he,ae)}function S(M){const fe=t.getRecordMatcher(M);fe&&t.removeRoute(fe)}function R(){return t.getRoutes().map(M=>M.record)}function D(M){return!!t.getRecordMatcher(M)}function _(M,fe){if(fe=nt({},fe||a.value),typeof M=="string"){const B=Ia(n,M,fe.path),K=t.resolve({path:B.path},fe),X=r.createHref(B.fullPath);return nt(B,K,{params:d(K.params),hash:no(B.hash),redirectedFrom:void 0,href:X})}let ae;if(M.path!=null)ae=nt({},M,{path:Ia(n,M.path,fe.path).path});else{const B=nt({},M.params);for(const K in B)B[K]==null&&delete B[K];ae=nt({},M,{params:c(B)}),fe.params=c(fe.params)}const he=t.resolve(ae,fe),v=M.hash||"";he.params=f(d(he.params));const A=Wv(s,nt({},M,{hash:Bv(v),path:he.path})),x=r.createHref(A);return nt({fullPath:A,hash:v,query:s===Ff?i0(M.query):M.query||{}},he,{redirectedFrom:void 0,href:x})}function g(M){return typeof M=="string"?Ia(n,M,a.value.path):nt({},M)}function O(M,fe){if(u!==M)return sl(Ct.NAVIGATION_CANCELLED,{from:fe,to:M})}function w(M){return U(M)}function T(M){return w(nt(g(M),{replace:!0}))}function C(M,fe){const ae=M.matched[M.matched.length-1];if(ae&&ae.redirect){const{redirect:he}=ae;let v=typeof he=="function"?he(M,fe):he;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=g(v):{path:v},v.params={}),nt({query:M.query,hash:M.hash,params:v.path!=null?{}:M.params},v)}}function U(M,fe){const ae=u=_(M),he=a.value,v=M.state,A=M.force,x=M.replace===!0,B=C(ae,he);if(B)return U(nt(g(B),{state:typeof B=="object"?nt({},v,B.state):v,force:A,replace:x}),fe||ae);const K=ae;K.redirectedFrom=fe;let X;return!A&&qv(s,he,ae)&&(X=sl(Ct.NAVIGATION_DUPLICATED,{to:K,from:he}),Ee(he,he,!0,!1)),(X?Promise.resolve(X):le(K,he)).catch(se=>vs(se)?vs(se,Ct.NAVIGATION_GUARD_REDIRECT)?se:_e(se):Q(se,K,he)).then(se=>{if(se){if(vs(se,Ct.NAVIGATION_GUARD_REDIRECT))return U(nt({replace:x},g(se.to),{state:typeof se.to=="object"?nt({},v,se.to.state):v,force:A}),fe||K)}else se=ke(K,he,!0,x,v);return z(K,he,se),se})}function j(M,fe){const ae=O(M,fe);return ae?Promise.reject(ae):Promise.resolve()}function ee(M){const fe=$e.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(M):M()}function le(M,fe){let ae;const[he,v,A]=u0(M,fe);ae=Pa(he.reverse(),"beforeRouteLeave",M,fe);for(const B of he)B.leaveGuards.forEach(K=>{ae.push(qs(K,M,fe))});const x=j.bind(null,M,fe);return ae.push(x),Me(ae).then(()=>{ae=[];for(const B of l.list())ae.push(qs(B,M,fe));return ae.push(x),Me(ae)}).then(()=>{ae=Pa(v,"beforeRouteUpdate",M,fe);for(const B of v)B.updateGuards.forEach(K=>{ae.push(qs(K,M,fe))});return ae.push(x),Me(ae)}).then(()=>{ae=[];for(const B of A)if(B.beforeEnter)if(Qn(B.beforeEnter))for(const K of B.beforeEnter)ae.push(qs(K,M,fe));else ae.push(qs(B.beforeEnter,M,fe));return ae.push(x),Me(ae)}).then(()=>(M.matched.forEach(B=>B.enterCallbacks={}),ae=Pa(A,"beforeRouteEnter",M,fe,ee),ae.push(x),Me(ae))).then(()=>{ae=[];for(const B of o.list())ae.push(qs(B,M,fe));return ae.push(x),Me(ae)}).catch(B=>vs(B,Ct.NAVIGATION_CANCELLED)?B:Promise.reject(B))}function z(M,fe,ae){i.list().forEach(he=>ee(()=>he(M,fe,ae)))}function ke(M,fe,ae,he,v){const A=O(M,fe);if(A)return A;const x=fe===js,B=zr?history.state:{};ae&&(he||x?r.replace(M.fullPath,nt({scroll:x&&B&&B.scroll},v)):r.push(M.fullPath,v)),a.value=M,Ee(M,fe,ae,x),_e()}let we;function te(){we||(we=r.listen((M,fe,ae)=>{if(!He.listening)return;const he=_(M),v=C(he,He.currentRoute.value);if(v){U(nt(v,{replace:!0,force:!0}),he).catch(zl);return}u=he;const A=a.value;zr&&t0(Mf(A.fullPath,ae.delta),xi()),le(he,A).catch(x=>vs(x,Ct.NAVIGATION_ABORTED|Ct.NAVIGATION_CANCELLED)?x:vs(x,Ct.NAVIGATION_GUARD_REDIRECT)?(U(nt(g(x.to),{force:!0}),he).then(B=>{vs(B,Ct.NAVIGATION_ABORTED|Ct.NAVIGATION_DUPLICATED)&&!ae.delta&&ae.type===fu.pop&&r.go(-1,!1)}).catch(zl),Promise.reject()):(ae.delta&&r.go(-ae.delta,!1),Q(x,he,A))).then(x=>{x=x||ke(he,A,!1),x&&(ae.delta&&!vs(x,Ct.NAVIGATION_CANCELLED)?r.go(-ae.delta,!1):ae.type===fu.pop&&vs(x,Ct.NAVIGATION_ABORTED|Ct.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),z(he,A,x)}).catch(zl)}))}let W=Sl(),q=Sl(),H;function Q(M,fe,ae){_e(M);const he=q.list();return he.length?he.forEach(v=>v(M,fe,ae)):console.error(M),Promise.reject(M)}function me(){return H&&a.value!==js?Promise.resolve():new Promise((M,fe)=>{W.add([M,fe])})}function _e(M){return H||(H=!M,te(),W.list().forEach(([fe,ae])=>M?ae(M):fe()),W.reset()),M}function Ee(M,fe,ae,he){const{scrollBehavior:v}=e;if(!zr||!v)return Promise.resolve();const A=!ae&&n0(Mf(M.fullPath,0))||(he||!ae)&&history.state&&history.state.scroll||null;return uo().then(()=>v(M,fe,A)).then(x=>x&&e0(x)).catch(x=>Q(x,M,fe))}const oe=M=>r.go(M);let pe;const $e=new Set,He={currentRoute:a,listening:!0,addRoute:h,removeRoute:S,clearRoutes:t.clearRoutes,hasRoute:D,getRoutes:R,resolve:_,options:e,push:w,replace:T,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:l.add,beforeResolve:o.add,afterEach:i.add,onError:q.add,isReady:me,install(M){M.component("RouterLink",Ii),M.component("RouterView",N0),M.config.globalProperties.$router=He,Object.defineProperty(M.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(a)}),zr&&!pe&&a.value===js&&(pe=!0,w(r.location).catch(he=>{}));const fe={};for(const he in js)Object.defineProperty(fe,he,{get:()=>a.value[he],enumerable:!0});M.provide(Ci,He),M.provide(Ju,Up(fe)),M.provide(pu,a);const ae=M.unmount;$e.add(M),M.unmount=function(){$e.delete(M),$e.size<1&&(u=js,we&&we(),we=null,a.value=js,pe=!1,H=!1),ae()}}};function Me(M){return M.reduce((fe,ae)=>fe.then(()=>ee(ae)),Promise.resolve())}return He}function Di(){return Ln(Ci)}function Kh(e){return Ln(Ju)}function Yh(e,t){return function(){return e.apply(t,arguments)}}const{toString:L0}=Object.prototype,{getPrototypeOf:er}=Object,{iterator:ho,toStringTag:Jh}=Symbol,so=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qh=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Zh=(e,t,n)=>e===Object.prototype||!n&&t===null,M0=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Qh(n))return!1;const s=Object.getOwnPropertyDescriptor(e,n);return!!s&&s.configurable&&s.writable===!0})},ro=(e,t)=>{let n=e;const s=[];for(;n!=null;){if(s.indexOf(n)!==-1)return!1;s.push(n);const r=er(n);if(Zh(n,r,n===e))return!1;if(so(n,t))return!0;n=r}return!1},F0=(e,t)=>e!=null&&ro(e,t)?e[t]:void 0,U0=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=er(e);if(t===null&&M0(e))return e;const n=Object.create(null),s=Object.create(null),r=[];let l=e;for(;l!=null&&r.indexOf(l)===-1;){r.push(l);const o=l===e?t:er(l);if(Zh(l,o,l===e))break;const i=Object.getOwnPropertyNames(l);Object.getOwnPropertySymbols&&i.push(...Object.getOwnPropertySymbols(l));for(const a of i)Qh(a)||so(s,a)||(n[a]=e[a],s[a]=!0);l=o}return n},Qu=(e=>t=>{const n=L0.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Un=e=>(e=e.toLowerCase(),t=>Qu(t)===e),Pi=e=>t=>typeof t===e,{isArray:Er}=Array,Sr=Pi("undefined");function al(e){return e!==null&&!Sr(e)&&e.constructor!==null&&!Sr(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xh=Un("ArrayBuffer");function B0(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xh(e.buffer),t}const H0=Pi("string"),bn=Pi("function"),em=Pi("number"),ul=e=>e!==null&&typeof e=="object",V0=e=>e===!0||e===!1,Go=e=>{if(!ul(e))return!1;const t=er(e);return(t===null||t===Object.prototype||er(t)===null)&&!ro(e,Jh)&&!ro(e,ho)},j0=e=>{if(!ul(e)||al(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},z0=Un("Date"),G0=Un("File"),W0=e=>!!(e&&typeof e.uri<"u"),q0=e=>e&&typeof e.getParts<"u",K0=Un("Blob"),Y0=Un("FileList"),J0=Un("Set"),Q0=e=>ul(e)&&bn(e.pipe);function Z0(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Jf=Z0(),Qf=typeof Jf.FormData<"u"?Jf.FormData:void 0,X0=e=>{if(!e)return!1;if(Qf&&e instanceof Qf)return!0;const t=er(e);if(!t||t===Object.prototype||!bn(e.append))return!1;const n=Qu(e);return n==="formdata"||n==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"},eb=Un("URLSearchParams"),[tb,nb,sb,rb]=["ReadableStream","Request","Response","Headers"].map(Un),lb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),Er(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(al(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),o=l.length;let i;for(s=0;s<o;s++)i=l[s],t.call(null,e[i],i,e)}}function tm(e,t){if(al(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,r;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const _r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nm=e=>!Sr(e)&&e!==_r;function hu(...e){const{caseless:t,skipUndefined:n}=nm(this)&&this||{},s={},r=(l,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=t&&typeof o=="string"&&tm(s,o)||o,a=so(s,i)?s[i]:void 0;Go(a)&&Go(l)?s[i]=hu(a,l):Go(l)?s[i]=hu({},l):Er(l)?s[i]=l.slice():(!n||!Sr(l))&&(s[i]=l)};for(let l=0,o=e.length;l<o;l++){const i=e[l];if(!i||al(i)||(mo(i,r),typeof i!="object"||Er(i)))continue;const a=Object.getOwnPropertySymbols(i);for(let u=0;u<a.length;u++){const f=a[u];_b.call(i,f)&&r(i[f],f)}}return s}const ob=(e,t,n,{allOwnKeys:s}={})=>(mo(t,(r,l)=>{n&&bn(r)?Object.defineProperty(e,l,{__proto__:null,value:Yh(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),ib=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ab=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},ub=(e,t,n,s)=>{let r,l,o;const i={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),l=r.length;l-- >0;)o=r[l],(!s||s(o,e,t))&&!i[o]&&(t[o]=e[o],i[o]=!0);e=n!==!1&&er(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},fb=e=>{if(!e)return null;if(Er(e))return e;let t=e.length;if(!em(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},db=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&er(Uint8Array)),pb=(e,t)=>{const s=(e&&e[ho]).call(e);let r;for(;(r=s.next())&&!r.done;){const l=r.value;t.call(e,l[0],l[1])}},hb=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},mb=Un("HTMLFormElement"),gb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),{propertyIsEnumerable:_b}=Object.prototype,yb=Un("RegExp"),sm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};mo(n,(r,l)=>{let o;(o=t(r,l,e))!==!1&&(s[l]=o||r)}),Object.defineProperties(e,s)},vb=e=>{sm(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(bn(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bb=(e,t)=>{const n={},s=r=>{r.forEach(l=>{n[l]=!0})};return Er(e)?s(e):s(String(e).split(t)),n},wb=()=>{},Eb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sb(e){return!!(e&&bn(e.append)&&e[Jh]==="FormData"&&e[ho])}const Rb=e=>{const t=new WeakSet,n=s=>{if(ul(s)){if(t.has(s))return;if(al(s))return s;if(!("toJSON"in s)){t.add(s);let r;if(J0(s)){r=[];for(const l of s){const o=n(l);!Sr(o)&&r.push(o)}}else r=Er(s)?[]:{},mo(s,(l,o)=>{const i=n(l);!Sr(i)&&(r[o]=i)});return t.delete(s),r}}return s};return n(e)},Ab=Un("AsyncFunction"),Tb=e=>e&&(ul(e)||bn(e))&&bn(e.then)&&bn(e.catch),rm=((e,t)=>e?setImmediate:t?((n,s)=>(_r.addEventListener("message",({source:r,data:l})=>{r===_r&&l===n&&s.length&&s.shift()()},!1),r=>{s.push(r),_r.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(_r.postMessage)),Ob=typeof queueMicrotask<"u"?queueMicrotask.bind(_r):typeof process<"u"&&process.nextTick||rm,lm=e=>e!=null&&bn(e[ho]),kb=e=>e!=null&&ro(e,ho)&&lm(e),I={isArray:Er,isArrayBuffer:Xh,isBuffer:al,isFormData:X0,isArrayBufferView:B0,isString:H0,isNumber:em,isBoolean:V0,isObject:ul,isPlainObject:Go,isEmptyObject:j0,isReadableStream:tb,isRequest:nb,isResponse:sb,isHeaders:rb,isUndefined:Sr,isDate:z0,isFile:G0,isReactNativeBlob:W0,isReactNative:q0,isBlob:K0,isRegExp:yb,isFunction:bn,isStream:Q0,isURLSearchParams:eb,isTypedArray:db,isFileList:Y0,forEach:mo,merge:hu,extend:ob,trim:lb,stripBOM:ib,inherits:ab,toFlatObject:ub,kindOf:Qu,kindOfTest:Un,endsWith:cb,toArray:fb,forEachEntry:pb,matchAll:hb,isHTMLForm:mb,hasOwnProperty:so,hasOwnProp:so,hasOwnInPrototypeChain:ro,getSafeProp:F0,toSafeFlatObject:U0,reduceDescriptors:sm,freezeMethods:vb,toObjectSet:bb,toCamelCase:gb,noop:wb,toFiniteNumber:Eb,findKey:tm,global:_r,isContextDefined:nm,isSpecCompliantForm:Sb,toJSONObject:Rb,isAsyncFn:Ab,isThenable:Tb,setImmediate:rm,asap:Ob,isIterable:lm,isSafeIterable:kb},xb=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Cb=e=>{const t={};let n,s,r;return e&&e.split(`
|
|
31
|
+
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim();const i=I.hasOwnProp(t,n);!n||i&&I.hasOwnProp(xb,n)||(n==="set-cookie"?i?t[n].push(s):t[n]=[s]:t[n]=i?t[n]+", "+s:s)}),t};function Ib(e){let t=0,n=e.length;for(;t<n;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Db=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Pb=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Zu(e,t){return I.isArray(e)?e.map(n=>Zu(n,t)):Ib(String(e).replace(t,""))}const Nb=e=>Zu(e,Db),$b=e=>Zu(e,Pb);function om(e){const t=Object.create(null);return I.forEach(e.toJSON(),(n,s)=>{t[s]=$b(n)}),t}const Zf=Symbol("internals");function Rl(e){return e&&String(e).trim().toLowerCase()}function Wo(e){return e===!1||e==null?e:I.isArray(e)?e.map(Wo):Nb(String(e))}function Lb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Mb=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Na(e){let t=0,n=e.length;for(;t<n;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Fb(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let s=1;s<t;s++){const r=e.charCodeAt(s);if(r===34||r===92&&(s+=1,s>=t))return e;n+=e[s]}return n}function Ub(e){const t=Object.create(null),n=String(e);let s=0,r=!1,l=!1;function o(i){const a=Na(n.slice(s,i)),u=a.indexOf("=");if(u<1)return;const f=Na(a.slice(0,u));if(!Mb.test(f))return;const c=f.toLowerCase();if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=Na(a.slice(u+1));t[c]=Fb(d)}for(let i=0;i<n.length;i++){const a=n.charCodeAt(i);r?l?l=!1:a===92?l=!0:a===34&&(r=!1):a===34?r=!0:(a===44||a===59)&&(o(i),s=i+1)}return o(n.length),t}const Bb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $a(e,t,n,s,r){if(I.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!I.isString(t)){if(I.isString(s))return t.indexOf(s)!==-1;if(I.isRegExp(s))return s.test(t)}}function Hb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Vb(e,t){const n=I.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(r,l,o){return this[s].call(this,t,r,l,o)},configurable:!0})})}let rn=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function l(i,a,u){const f=Rl(a);if(!f)return;const c=I.findKey(r,f);(!c||r[c]===void 0||u===!0||u===void 0&&r[c]!==!1)&&(r[c||a]=Wo(i))}const o=(i,a)=>I.forEach(i,(u,f)=>l(u,f,a));if(I.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(I.isString(t)&&(t=t.trim())&&!Bb(t))o(Cb(t),n);else if(I.isObject(t)&&I.isSafeIterable(t)){let i=Object.create(null),a,u;for(const f of t){if(!I.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],I.hasOwnProp(i,u)?(a=i[u],i[u]=I.isArray(a)?[...a,f[1]]:[a,f[1]]):i[u]=f[1]}o(i,n)}else t!=null&&l(n,t,s);return this}get(t,n){if(t=Rl(t),t){const s=I.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return Lb(r);if(I.isFunction(n))return n.call(this,r,s);if(I.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Rl(t),t){const s=I.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||$a(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function l(o){if(o=Rl(o),o){const i=I.findKey(s,o);i&&(!n||$a(s,s[i],i,n))&&(delete s[i],r=!0)}}return I.isArray(t)?t.forEach(l):l(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const l=n[s];(!t||$a(this,this[l],l,t,!0))&&(delete this[l],r=!0)}return r}normalize(t){const n=this,s={};return I.forEach(this,(r,l)=>{const o=I.findKey(s,l);if(o){n[o]=Wo(r),delete n[l];return}const i=t?Hb(l):String(l).trim();i!==l&&delete n[l],n[i]=Wo(r),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return I.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&I.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
32
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return I.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Ub(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Zf]=this[Zf]={accessors:{}}).accessors,r=this.prototype;function l(o){const i=Rl(o);s[i]||(Vb(r,o),s[i]=!0)}return I.isArray(t)?t.forEach(l):l(t),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(rn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});I.freezeMethods(rn);const ii="[REDACTED ****]";function jb(e){if(I.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(I.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function zb(e,t){const n=new Set(t.map(l=>String(l).toLowerCase())),s=[],r=l=>{if(l===null||typeof l!="object"||I.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof rn&&(l=l.toJSON()),s.push(l);let o;if(I.isArray(l))o=[],l.forEach((i,a)=>{const u=r(i);I.isUndefined(u)||(o[a]=u)});else{if(!I.isPlainObject(l)&&jb(l))return s.pop(),l;o=Object.create(null);for(const[i,a]of Object.entries(l)){const u=n.has(i.toLowerCase())?ii:r(a);I.isUndefined(u)||(o[i]=u)}}return s.pop(),o};return r(e)}function Xf(e){try{return String(e)}catch{return""}}function Gb(e){return e.errors.map(n=>{try{return n&&n.message?Xf(n.message):Xf(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Se=class im extends Error{static from(t,n,s,r,l,o){let i=t.message;!i&&I.isArray(t.errors)&&t.errors.length&&(i=Gb(t));const a=new im(i,n||t.code,s,r,l);return Object.defineProperty(a,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,n,s,r,l){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),r&&(this.request=r),l&&(this.response=l,this.status=l.status)}toJSON(){const t=this.config,n=t&&I.hasOwnProp(t,"redact")?t.redact:void 0,s=I.isArray(n)&&n.length>0?zb(t,n):I.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};Se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Se.ERR_BAD_OPTION="ERR_BAD_OPTION";Se.ECONNABORTED="ECONNABORTED";Se.ETIMEDOUT="ETIMEDOUT";Se.ECONNREFUSED="ECONNREFUSED";Se.ERR_NETWORK="ERR_NETWORK";Se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Se.ERR_DEPRECATED="ERR_DEPRECATED";Se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Se.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Se.ERR_CANCELED="ERR_CANCELED";Se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Se.ERR_INVALID_URL="ERR_INVALID_URL";Se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Wb=null,am=100;function mu(e){return I.isPlainObject(e)||I.isArray(e)}function um(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function La(e,t,n){return e?e.concat(t).map(function(r,l){return r=um(r),!n&&l?"["+r+"]":r}).join(n?".":""):t}function qb(e){return I.isArray(e)&&!e.some(mu)}const Kb=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function Ni(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(g,O)=>{const w=I.getSafeProp(n,g);return I.isUndefined(w)?O:w},r=s("metaTokens",!0),l=s("visitor")||R,o=s("dots",!1),i=s("indexes",!1),a=s("Blob")||typeof Blob<"u"&&Blob,u=s("maxDepth",am),f=a&&I.isSpecCompliantForm(t),c=[];if(!I.isFunction(l))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(I.isDate(g))return g.toISOString();if(I.isBoolean(g))return g.toString();if(!f&&I.isBlob(g))throw new Se("Blob is not supported. Use a Buffer instead.");if(I.isArrayBuffer(g)||I.isTypedArray(g)){if(f&&typeof a=="function")return new a([g]);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return g}function h(g){if(g>u)throw new Se("Object is too deeply nested ("+g+" levels). Max depth: "+u,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(g,O){if(u===1/0)return JSON.stringify(g);const w=[];return JSON.stringify(g,function(C,U){if(!I.isObject(U))return U;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(U),h(O+w.length-1),U})}function R(g,O,w){let T=g;if(I.isReactNative(t)&&I.isReactNativeBlob(g))return t.append(La(w,O,o),d(g)),!1;if(g&&!w&&typeof g=="object"){if(I.endsWith(O,"{}"))O=r?O:O.slice(0,-2),g=S(g,1);else if(I.isArray(g)&&qb(g)||(I.isFileList(g)||I.endsWith(O,"[]"))&&(T=I.toArray(g)))return O=um(O),T.forEach(function(U,j){!(I.isUndefined(U)||U===null)&&t.append(i===!0?La([O],j,o):i===null?O:O+"[]",d(U))}),!1}return mu(g)?!0:(t.append(La(w,O,o),d(g)),!1)}const D=Object.assign(Kb,{defaultVisitor:R,convertValue:d,isVisitable:mu});function _(g,O,w=0){if(!I.isUndefined(g)){if(h(w),c.indexOf(g)!==-1)throw new Error("Circular reference detected in "+O.join("."));c.push(g),I.forEach(g,function(C,U){(!(I.isUndefined(C)||C===null)&&l.call(t,C,I.isString(U)?U.trim():U,O,D))===!0&&_(C,O?O.concat(U):[U],w+1)}),c.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return _(e),t}function ed(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function Xu(e,t){this._pairs=[],e&&Ni(e,this,t)}const cm=Xu.prototype;cm.append=function(t,n){this._pairs.push([t,n])};cm.toString=function(t){const n=t?s=>t.call(this,s,ed):ed;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Yb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fm(e,t,n){if(!t)return e;e=e||"";const s=I.isFunction(n)?{serialize:n}:n,r=I.getSafeProp(s,"encode")||Yb,l=I.getSafeProp(s,"serialize");let o;if(l?o=l(t,s):o=I.isURLSearchParams(t)?t.toString():new Xu(t,s).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const Al=Symbol("internals");function dm(e){return e?e.length:0}function td(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Tl(e,t){const n=e.handlers,s=dm(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):s!==t.handlersLength&&(s?t.handlerEntries.forEach(function(l,o){n[l.index]!==l.handler&&t.handlerEntries.delete(o)}):t.handlerEntries.clear()),t.handlersLength=s}class nd{constructor(){this.handlers=[],this[Al]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,s){const r={fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null},l=this[Al];this.handlers==null&&(this.handlers=[]),Tl(this,l);const o=l.nextId++;return this.handlers.push(r),l.handlerEntries.set(o,{handler:r,index:this.handlers.length-1}),l.handlersLength=this.handlers.length,o}eject(t){const n=this[Al];Tl(this,n);const s=n.handlerEntries.get(t);if(s){if(n.handlerEntries.delete(t),this.handlers[s.index]!==s.handler)return;this.handlers[s.index]=null,n.iterationDepth||(td(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Tl(this,this[Al]))}forEach(t){const n=this[Al];Tl(this,n),n.iterationDepth++;try{I.forEach(this.handlers,function(r){r!==null&&t(r)})}finally{--n.iterationDepth||(Tl(this,n),td(this.handlers),n.handlersLength=dm(this.handlers))}}}const ec={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Jb=typeof URLSearchParams<"u"?URLSearchParams:Xu,Qb=typeof FormData<"u"?FormData:null,Zb=typeof Blob<"u"?Blob:null,Xb={isBrowser:!0,classes:{URLSearchParams:Jb,FormData:Qb,Blob:Zb},protocols:["http","https","file","blob","url","data"]},tc=typeof window<"u"&&typeof document<"u",gu=typeof navigator=="object"&&navigator||void 0,e1=tc&&(!gu||["ReactNative","NativeScript","NS"].indexOf(gu.product)<0),t1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n1=tc&&window.location.href||"http://localhost",s1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tc,hasStandardBrowserEnv:e1,hasStandardBrowserWebWorkerEnv:t1,navigator:gu,origin:n1},Symbol.toStringTag,{value:"Module"})),Yt={...s1,...Xb};function r1(e,t){return Ni(e,new Yt.classes.URLSearchParams,{visitor:function(n,s,r,l){return Yt.isNode&&I.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}const sd=am;function pm(e){if(e>sd)throw new Se("FormData field is too deeply nested ("+e+" levels). Max depth: "+sd,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function l1(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;(s=n.exec(e))!==null;)pm(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function o1(e){const t={},n=Object.keys(e);let s;const r=n.length;let l;for(s=0;s<r;s++)l=n[s],t[l]=e[l];return t}function hm(e){function t(n,s,r,l){pm(l);let o=n[l++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),a=l>=n.length;return o=!o&&I.isArray(r)?r.length:o,a?(I.hasOwnProp(r,o)?r[o]=I.isArray(r[o])?r[o].concat(s):[r[o],s]:r[o]=s,!i):((!I.hasOwnProp(r,o)||!I.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],l)&&I.isArray(r[o])&&(r[o]=o1(r[o])),!i)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,(s,r)=>{t(l1(s),r,n,0)}),n}return null}const mm=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Br=(e,t)=>e!=null&&I.hasOwnProp(e,t)?e[t]:void 0;function i1(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const go={transitional:ec,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,l=I.isObject(t);if(l&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return r?JSON.stringify(hm(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(l){const a=Br(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return r1(t,a).toString();if((i=I.isFileList(t))||s.indexOf("multipart/form-data")>-1){const u=Br(this,"env"),f=u&&u.FormData;return Ni(i?{"files[]":t}:t,f&&new f,a)}}return l||r?(n.setContentType("application/json",!1),i1(t)):t}],transformResponse:[function(t){const n=Br(this,"transitional")||go.transitional,s=n&&n.forcedJSONParsing,r=Br(this,"responseType"),l=r==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(s&&!r||l)){const i=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(t,Br(this,"parseReviver"))}catch(a){if(i)throw a.name==="SyntaxError"?Se.from(a,Se.ERR_BAD_RESPONSE,this,null,Br(this,"response")):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(mm,e=>{go.headers[e]={}});function Ma(e,t){const n=this||go,s=t||n,r=rn.from(s.headers);let l=s.data;return I.forEach(e,function(i){l=i.call(n,l,r.normalize(),t?t.status:void 0)}),r.normalize(),l}function gm(e){return!!(e&&e.__CANCEL__)}let _o=class extends Se{constructor(t,n,s){super(t??"canceled",Se.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function _m(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Se("Request failed with status code "+n.status,n.status>=400&&n.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,n.config,n.request,n))}const a1=/[\t\n\r]/g;function ym(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(a1,"")}function Fa(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function u1(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,l=0,o;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),f=s[l];o||(o=u),n[r]=a,s[r]=u;let c=l,d=0;for(;c!==r;)d+=n[c++],c=c%e;if(r=(r+1)%e,r===l&&(l=(l+1)%e),u-o<t)return;const h=f&&u-f;return h?Math.round(d*1e3/h):void 0}}function c1(e,t){let n=0,s=1e3/t,r,l;const o=(f,c=Date.now())=>{n=c,r=null,l&&(clearTimeout(l),l=null),e(...f)};return[(...f)=>{const c=Date.now(),d=c-n;d>=s?o(f,c):(r=f,l||(l=setTimeout(()=>{l=null,o(r)},s-d)))},()=>r&&o(r),(...f)=>o(f)]}const ai=(e,t,n=3)=>{let s=0;const r=u1(50,250);return c1(l=>{if(!l||!I.isNumber(l.loaded))return;const o=l.loaded,i=l.lengthComputable?l.total:void 0,a=Math.max(0,i!=null?Math.min(o,i):o),u=Math.max(0,a-s),f=r(u);s=Math.max(s,a);const c={loaded:a,total:i,progress:i?a/i:void 0,bytes:u,rate:f||void 0,estimated:f&&i?(i-a)/f:void 0,event:l,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(c)},n)},rd=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},ld=(e,t=I.asap)=>(...n)=>t(()=>e(...n)),f1=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,d1=Yt.hasStandardBrowserEnv?{write(e,t,n,s,r,l,o){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];I.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),I.isString(s)&&i.push(`path=${s}`),I.isString(r)&&i.push(`domain=${r}`),l===!0&&i.push("secure"),I.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),r=s.indexOf("=");if(r!==-1&&s.slice(0,r)===e)try{return decodeURIComponent(s.slice(r+1))}catch{return s.slice(r+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function p1(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function h1(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const m1=/^https?:(?!\/\/)/i;function g1(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,s="")=>`${n}${s}${ii}`)}function _1(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ii}@`),n=t.indexOf("#"),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ii}`);return n===-1?r:`${r}#${g1(t.slice(n+1))}`}function od(e,t){if(typeof e=="string"){const n=ym(e);if(m1.test(n))throw new Se(`Invalid URL ${JSON.stringify(_1(n))}: missing "//" after protocol`,Se.ERR_INVALID_URL,t)}}function vm(e,t,n,s){od(t,s);let r=!p1(t);return e&&(r||n===!1)?(od(e,s),h1(e,t)):t}const id=e=>e instanceof rn?{...e}:e,y1=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Rr(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(f,c,d,h){return I.isPlainObject(f)&&I.isPlainObject(c)?I.merge.call({caseless:h},f,c):I.isPlainObject(c)?I.merge({},c):I.isArray(c)?c.slice():c}function r(f,c,d,h){if(I.isUndefined(c)){if(!I.isUndefined(f))return s(void 0,f,d,h)}else return s(f,c,d,h)}function l(f,c){if(!I.isUndefined(c))return s(void 0,c)}function o(f,c){if(I.isUndefined(c)){if(!I.isUndefined(f))return s(void 0,f)}else return s(void 0,c)}function i(f){const c=I.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!I.isUndefined(c))if(I.isPlainObject(c)){if(I.hasOwnProp(c,f))return c[f]}else return;const d=I.hasOwnProp(e,"transitional")?e.transitional:void 0;if(I.isPlainObject(d)&&I.hasOwnProp(d,f))return d[f]}function a(f,c,d){if(I.hasOwnProp(t,d))return s(f,c);if(I.hasOwnProp(e,d))return s(void 0,f)}const u={url:l,method:l,data:l,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:a,headers:(f,c,d)=>r(id(f),id(c),d,!0)};return I.forEach(y1({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=I.hasOwnProp(u,c)?u[c]:r,h=I.hasOwnProp(e,c)?e[c]:void 0,S=I.hasOwnProp(t,c)?t[c]:void 0,R=d(h,S,c);I.isUndefined(R)&&d!==a||(n[c]=R)}),I.hasOwnProp(t,"validateStatus")&&I.isUndefined(t.validateStatus)&&i("validateStatusUndefinedResolves")===!1&&(I.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const v1=["content-type","content-length"];function b1(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,r])=>{v1.includes(s.toLowerCase())&&e.set(s,r)})}const w1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function bm(e){const t=Rr({},e),n=d=>I.hasOwnProp(t,d)?t[d]:void 0,s=n("data");let r=n("withXSRFToken");const l=n("xsrfHeaderName"),o=n("xsrfCookieName");let i=n("headers");const a=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),c=n("url");if(t.headers=i=rn.from(i),t.url=fm(vm(u,c,f,t),n("params"),n("paramsSerializer")),a){const d=I.getSafeProp(a,"username")||"",h=I.getSafeProp(a,"password")||"";try{i.set("Authorization","Basic "+btoa(d+":"+(h?w1(h):"")))}catch(S){throw Se.from(S,Se.ERR_BAD_OPTION_VALUE,e)}}if(I.isFormData(s)){const d=I.getSafeProp(s,"getHeaders");Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv||I.isReactNative(s)?i.setContentType(void 0):I.isFunction(d)&&b1(i,d.call(s),n("formDataHeaderPolicy"))}if(Yt.hasStandardBrowserEnv&&(I.isFunction(r)&&(r=r(t)),r===!0||r==null&&f1(t.url))){const h=l&&o&&d1.read(o);h&&i.set(l,h)}return t}const E1=typeof XMLHttpRequest<"u",S1=E1&&function(e){return new Promise(function(n,s){const r=bm(e);let l=r.data;const o=rn.from(r.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:u}=r,f,c,d,h,S,R;function D(){h&&h(),S&&S(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(r.method.toUpperCase(),r.url,!0),_.timeout=r.timeout;function g(w){if(!_)return;if(_.status===0&&(Fa(ym(r.url))||Fa(Yt.origin))!=="file"&&!(_.responseURL&&_.responseURL.startsWith("file:"))){s(new Se("Request aborted",Se.ECONNABORTED,e,_)),D(),_=null;return}try{w?R&&R(w):S&&S()}catch(j){setTimeout(()=>{throw j})}if(!_)return;const T=rn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),U={data:!i||i==="text"||i==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:T,config:e,request:_};_m(function(ee){n(ee),D()},function(ee){s(ee),D()},U),_=null}"onloadend"in _?_.onloadend=g:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(g)},_.onabort=function(){_&&(s(new Se("Request aborted",Se.ECONNABORTED,e,_)),D(),_=null)},_.onerror=function(T){const C=T&&T.message?T.message:"Network Error",U=new Se(C,Se.ERR_NETWORK,e,_);U.event=T||null,s(U),D(),_=null},_.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||ec;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),s(new Se(T,C.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,_)),D(),_=null},l===void 0&&o.setContentType(null),"setRequestHeader"in _&&I.forEach(om(o),function(T,C){_.setRequestHeader(C,T)}),I.isUndefined(r.withCredentials)||(_.withCredentials=!!r.withCredentials),i&&i!=="json"&&(_.responseType=r.responseType),u&&([d,S,R]=ai(u,!0),_.addEventListener("progress",d)),a&&_.upload&&([c,h]=ai(a),_.upload.addEventListener("progress",c),_.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(f=w=>{_&&(s(!w||w.type?new _o(null,e,_):w),_.abort(),D(),_=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const O=Fa(r.url);if(O&&!Yt.protocols.includes(O)){s(new Se("Unsupported protocol "+O+":",Se.ERR_BAD_REQUEST,e)),D();return}_.send(l||null)})},R1=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const r=function(a){if(!s){s=!0,o();const u=a instanceof Error?a:this.reason;n.abort(u instanceof Se?u:new _o(u instanceof Error?u.message:u))}};let l=t&&setTimeout(()=>{l=null,r(new Se(`timeout of ${t}ms exceeded`,Se.ETIMEDOUT))},t);const o=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(r):a.removeEventListener("abort",r)}),e=null)};e.forEach(a=>{if(!s){if(a.aborted){r.call(a);return}a.addEventListener("abort",r,{once:!0})}});const{signal:i}=n;return i.unsubscribe=()=>I.asap(o),i},A1=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},T1=async function*(e,t){for await(const n of O1(e))yield*A1(n,t)},O1=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},ad=(e,t,n,s)=>{const r=T1(e,t);let l=0,o,i=a=>{o||(o=!0,s&&s(a))};return new ReadableStream({async pull(a){try{const{done:u,value:f}=await r.next();if(u){i(),a.close();return}let c=f.byteLength;if(n){let d=l+=c;n(d)}a.enqueue(new Uint8Array(f))}catch(u){throw i(u),u}},cancel(a){return i(a),r.return()}},{highWaterMark:2})},ud=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,wm=(e,t,n)=>t+2<n&&ud(e.charCodeAt(t+1))&&ud(e.charCodeAt(t+2)),cd=e=>e<=57?e-48:(e&223)-55,k1=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,x1=e=>e===9||e===10||e===12||e===13||e===32,C1=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},I1=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},D1=e=>{const t=e.length;let n=0,s=0,r=!1;for(let l=0;l<t;l++){let o=e.charCodeAt(l);if(o===37&&wm(e,l,t)&&(o=cd(e.charCodeAt(l+1))*16+cd(e.charCodeAt(l+2)),l+=2),!x1(o)){if(o===61){s++;continue}if(!k1(o)||s>0){r=!0;continue}n++}}return r||s>2||s>0&&(n+s)%4!==0||n%4===1?I1(e):C1(n)},P1=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),r=e.slice(n+1);if(/;base64/i.test(s))return t(r);let o=0;for(let i=0,a=r.length;i<a;i++){const u=r.charCodeAt(i);if(u===37&&wm(r,i,a))o+=1,i+=2;else if(u<128)o+=1;else if(u<2048)o+=2;else if(u>=55296&&u<=56319&&i+1<a){const f=r.charCodeAt(i+1);f>=56320&&f<=57343?(o+=4,i++):o+=3}else o+=3}return o};function N1(e){const t=typeof e=="string"?e.indexOf("#"):-1;return P1(t===-1?e:e.slice(0,t),D1)}const nc="1.20.0",fd=64*1024,$1={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Lo}=I,L1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),dd=e=>{if(!I.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},pd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},M1=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},F1=e=>{const t=I.global!==void 0&&I.global!==null?I.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=I.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:l,Response:o}=e,i=r?Lo(r):typeof fetch=="function",a=Lo(l),u=Lo(o);if(!i)return!1;const f=i&&Lo(n),c=i&&(typeof s=="function"?(_=>g=>_.encode(g))(new s):async _=>new Uint8Array(await new l(_).arrayBuffer())),d=a&&f&&pd(()=>{let _=!1;const g=new l(Yt.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),O=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),_&&!O}),h=u&&f&&pd(()=>I.isReadableStream(new o("").body)),S={stream:h&&(_=>_.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!S[_]&&(S[_]=(g,O)=>{let w=g&&g[_];if(w)return w.call(g);throw new Se(`Response type '${_}' is not supported`,Se.ERR_NOT_SUPPORT,O)})});const R=async _=>{if(_==null)return 0;if(I.isBlob(_))return _.size;if(I.isSpecCompliantForm(_))return(await new l(Yt.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(I.isArrayBufferView(_)||I.isArrayBuffer(_))return _.byteLength;if(I.isURLSearchParams(_)&&(_=_+""),I.isString(_))return(await c(_)).byteLength},D=async(_,g)=>{const O=I.toFiniteNumber(_.getContentLength());return O??R(g)};return async _=>{let{url:g,method:O,data:w,signal:T,cancelToken:C,timeout:U,onDownloadProgress:j,onUploadProgress:ee,responseType:le,headers:z,withCredentials:ke="same-origin",fetchOptions:we,maxContentLength:te,maxBodyLength:W,maxRedirects:q}=bm(_);const H=I.isNumber(te)&&te>-1,Q=I.isNumber(W)&&W>-1,me=M=>I.hasOwnProp(_,M)?_[M]:void 0;let _e=r||fetch;le=le?(le+"").toLowerCase():"text";let Ee=R1([T,C&&C.toAbortSignal()],U),oe=null;const pe=Ee&&Ee.unsubscribe&&(()=>{Ee.unsubscribe()});let $e,He=null;const Me=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,_,oe);try{let M;const fe=me("auth");if(fe){const J=I.getSafeProp(fe,"username")||"",re=I.getSafeProp(fe,"password")||"";M={username:J,password:re}}if(M1(g)){const J=new URL(g,Yt.origin);if(!M&&(J.username||J.password)){const re=dd(J.username),Y=dd(J.password);M={username:re,password:Y}}(J.username||J.password)&&(J.username="",J.password="",g=J.href)}if(M&&(z.delete("authorization"),z.set("Authorization","Basic "+btoa(L1((M.username||"")+":"+(M.password||""))))),H&&typeof g=="string"&&g.startsWith("data:")&&N1(g)>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,oe);if(Q&&O!=="get"&&O!=="head"){const J=await R(w);if(typeof J=="number"&&isFinite(J)&&($e=J,J>W))throw Me()}const ae=Q&&(I.isReadableStream(w)||I.isStream(w)),he=(J,re,Y)=>ad(J,fd,Ae=>{if(Q&&Ae>W)throw He=Me();re&&re(Ae)},Y);if(d&&O!=="get"&&O!=="head"&&(ee||ae)){if($e=$e??await D(z,w),$e!==0||ae){let J=new l(g,{method:"POST",body:w,duplex:"half"}),re;if(I.isFormData(w)&&(re=J.headers.get("content-type"))&&z.setContentType(re),J.body){const[Y,Ae]=ee&&rd($e,ai(ld(ee)))||[];w=he(J.body,Y,Ae)}}}else if(ae&&!a&&f&&O!=="get"&&O!=="head")w=he(w);else if(ae&&a&&!d&&O!=="get"&&O!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,_,oe);I.isString(ke)||(ke=ke?"include":"omit");const v=a&&"credentials"in l.prototype;if(I.isFormData(w)){const J=z.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&z.delete("content-type")}z.set("User-Agent","axios/"+nc,!1);const A=we==null?we:Object.assign(Object.create(null),we);A&&(delete A.body,delete A.headers,delete A.method,delete A.signal,delete A.duplex,delete A.credentials);const x=Object.assign(Object.create(null),A,{signal:Ee,method:O.toUpperCase(),headers:om(z.normalize()),body:w,duplex:"half",credentials:v?ke:void 0});a&&(I.forEach($1,(J,re)=>{x[re]===void 0&&(x[re]=J)}),x.signal===void 0&&(x.signal=null),x.body===void 0&&(x.body=null)),q===0&&(x.redirect="manual",A&&(A.redirect="manual")),oe=a&&new l(g,x);let B=await(a?_e(oe,A):_e(g,x));const K=rn.from(B.headers);if(H){const J=I.toFiniteNumber(K.getContentLength());if(J!=null&&J>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,oe)}const X=h&&(le==="stream"||le==="response");if(h&&B.body&&(j||H||X&&pe)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=B[ce]});const re=I.toFiniteNumber(K.getContentLength()),[Y,Ae]=j&&rd(re,ai(ld(j),!0))||[];let ye=0;const Ie=ce=>{if(H&&(ye=ce,ye>te))throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,oe);Y&&Y(ce)};B=new o(ad(B.body,fd,Ie,()=>{Ae&&Ae(),pe&&pe()}),J)}le=le||"text";let se=await S[I.findKey(S,le)||"text"](B,_);if(H&&!h&&!X){let J;if(se!=null&&(typeof se.byteLength=="number"?J=se.byteLength:typeof se.size=="number"?J=se.size:typeof se=="string"&&(J=typeof s=="function"?new s().encode(se).byteLength:se.length)),typeof J=="number"&&J>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,oe)}return!X&&pe&&pe(),await new Promise((J,re)=>{_m(J,re,{data:se,headers:rn.from(B.headers),status:B.status,statusText:B.statusText,config:_,request:oe})})}catch(M){if(pe&&pe(),Ee&&Ee.aborted&&Ee.reason instanceof Se){const fe=Ee.reason;throw fe.config=_,oe&&(fe.request=oe),M!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:M,writable:!0,enumerable:!1,configurable:!0}),fe}if(He)throw oe&&!He.request&&(He.request=oe),He;if(M instanceof Se)throw oe&&!M.request&&(M.request=oe),M;if(M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)){const fe=new Se("Network Error",Se.ERR_NETWORK,_,oe,M&&M.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:M.cause||M,writable:!0,enumerable:!1,configurable:!0}),fe}throw Se.from(M,M&&M.code,_,oe,M&&M.response)}}},U1=new Map,Em=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:r}=t,l=[s,r,n];let o=l.length,i=o,a,u,f=U1;for(;i--;)a=l[i],u=f.get(a),u===void 0&&f.set(a,u=i?new Map:F1(t)),f=u;return u};Em();const sc={http:Wb,xhr:S1,fetch:{get:Em}};I.forEach(sc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const hd=e=>`- ${e}`,B1=e=>I.isFunction(e)||e===null||e===!1;function H1(e,t){e=I.isArray(e)?e:[e];const{length:n}=e;let s,r;const l={};for(let o=0;o<n;o++){s=e[o];let i;if(r=s,!B1(s)&&(r=sc[(i=String(s)).toLowerCase()],r===void 0))throw new Se(`Unknown adapter '${i}'`);if(r&&(I.isFunction(r)||(r=r.get(t))))break;l[i||"#"+o]=r}if(!r){const o=Object.entries(l).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=n?o.length>1?`since :
|
|
33
|
+
`+o.map(hd).join(`
|
|
34
|
+
`):" "+hd(o[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+i,Se.ERR_NOT_SUPPORT)}return r}const Sm={getAdapter:H1,adapters:sc};function Ua(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _o(null,e)}function Ba(e){const t=I.toSafeFlatObject(e);return Ua(t),t.headers=rn.from(I.getSafeProp(t,"headers")),t.data=Ma.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Sm.getAdapter(t.adapter||go.adapter,t)(t).then(function(r){Ua(t),t.response=r;try{r.data=Ma.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=rn.from(r.headers),r},function(r){if(!gm(r)&&(Ua(t),r&&r.response)){t.response=r.response;try{r.response.data=Ma.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=rn.from(r.response.headers)}return Promise.reject(r)})}const $i={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$i[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const md={};$i.transitional=function(t,n,s){function r(l,o){return"[Axios v"+nc+"] Transitional option '"+l+"'"+o+(s?". "+s:"")}return(l,o,i)=>{if(t===!1)throw new Se(r(o," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!md[o]&&(md[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,o,i):!0}};$i.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function V1(e,t,n){if(typeof e!="object"||e===null)throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const l=s[r],o=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0;if(o){const i=e[l],a=i===void 0||o(i,l,e);if(a!==!0)throw new Se("option "+l+" must be "+a,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+l,Se.ERR_BAD_OPTION)}}const qo={assertOptions:V1,validators:$i},tn=qo.validators;let br=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nd,response:new nd}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error)try{let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const l=r.stack;let o="";if(typeof l=="string"){const i=l.indexOf(`
|
|
35
|
+
`);o=i===-1?"":l.slice(i+1)}if(!s.stack)s.stack=o;else if(o){const i=o.indexOf(`
|
|
36
|
+
`),a=i===-1?-1:o.indexOf(`
|
|
37
|
+
`,i+1),u=a===-1?"":o.slice(a+1);String(s.stack).endsWith(u)||(s.stack+=`
|
|
38
|
+
`+o)}}catch{}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rr(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:l}=n;s!==void 0&&qo.assertOptions(s,{silentJSONParsing:tn.transitional(tn.boolean),forcedJSONParsing:tn.transitional(tn.boolean),clarifyTimeoutError:tn.transitional(tn.boolean),legacyInterceptorReqResOrdering:tn.transitional(tn.boolean),advertiseZstdAcceptEncoding:tn.transitional(tn.boolean),validateStatusUndefinedResolves:tn.transitional(tn.boolean)},!1),r!=null&&(I.isFunction(r)?n.paramsSerializer={serialize:r}:qo.assertOptions(r,{encode:tn.function,serialize:tn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qo.assertOptions(n,{baseUrl:tn.spelling("baseURL"),withXsrfToken:tn.spelling("withXSRFToken")},!0),n.method=(I.getSafeProp(n,"method")||I.getSafeProp(this.defaults,"method")||"get").toLowerCase();let o=l&&I.merge(l.common,l[n.method]);l&&I.forEach(mm.concat("common"),S=>{delete l[S]}),n.headers=rn.concat(o,l);const i=[];let a=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(n)===!1)return;a=a&&R.synchronous;const D=n.transitional||ec;D&&D.legacyInterceptorReqResOrdering?i.unshift(R.fulfilled,R.rejected):i.push(R.fulfilled,R.rejected)});const u=[];this.interceptors.response.forEach(function(R){u.push(R.fulfilled,R.rejected)});let f,c=0,d;if(!a){const S=[Ba.bind(this),void 0];for(S.unshift(...i),S.push(...u),d=S.length,f=Promise.resolve(n);c<d;)f=f.then(S[c++],S[c++]);return f}d=i.length;let h=n;for(;c<d;){const S=i[c++],R=i[c++];try{h=S?S(h):h}catch(D){if(!R){f=Promise.reject(D);break}try{const _=R.call(this,D);I.isThenable(_)&&(f=Promise.resolve(_).then(()=>Ba.call(this,h)))}catch(_){f=Promise.reject(_)}break}}if(!f)try{f=Ba.call(this,h)}catch(S){f=Promise.reject(S)}for(c=0,d=u.length;c<d;)f=f.then(u[c++],u[c++]);return f}getUri(t){t=Rr(this.defaults,t);const n=vm(t.baseURL,t.url,t.allowAbsoluteUrls,t);return fm(n,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){br.prototype[t]=function(n,s){return this.request(Rr(s||{},{method:t,url:n,data:s&&I.hasOwnProp(s,"data")?s.data:void 0}))}});I.forEach(["post","put","patch","query"],function(t){function n(s){return function(l,o,i){return this.request(Rr(i||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:l,data:o}))}}br.prototype[t]=n(),t!=="query"&&(br.prototype[t+"Form"]=n(!0))});let j1=class Rm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const s=this;this.promise.then(r=>{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](r);s._listeners=null}),this.promise.then=r=>{let l;const o=new Promise(i=>{s.subscribe(i),l=i}).then(r);return o.cancel=function(){s.unsubscribe(l)},o},t(function(l,o,i){s.reason||(s.reason=new _o(l,o,i),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Rm(function(r){t=r}),cancel:t}}};function z1(e){return function(n){return e.apply(null,n)}}function G1(e){return I.isObject(e)&&e.isAxiosError===!0}const Ko={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ko).forEach(([e,t])=>{Ko[t]===void 0&&(Ko[t]=e)});function Am(e){const t=new br(e),n=Yh(br.prototype.request,t);return I.extend(n,br.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Am(Rr(e,r))},n}const Pt=Am(go);Pt.Axios=br;Pt.CanceledError=_o;Pt.CancelToken=j1;Pt.isCancel=gm;Pt.VERSION=nc;Pt.toFormData=Ni;Pt.AxiosError=Se;Pt.Cancel=Pt.CanceledError;Pt.all=function(t){return Promise.all(t)};Pt.spread=z1;Pt.isAxiosError=G1;Pt.mergeConfig=Rr;Pt.AxiosHeaders=rn;Pt.formToJSON=e=>hm(I.isHTMLForm(e)?new FormData(e):e);Pt.getAdapter=Sm.getAdapter;Pt.HttpStatusCode=Ko;Pt.default=Pt;const{Axios:jx,AxiosError:zx,CanceledError:Gx,isCancel:Wx,CancelToken:qx,VERSION:Kx,all:Yx,Cancel:Jx,isAxiosError:Qx,spread:Zx,toFormData:Xx,AxiosHeaders:eC,HttpStatusCode:tC,formToJSON:nC,getAdapter:sC,mergeConfig:rC,create:lC}=Pt,De=Object.freeze({BAD_REQUEST:"BAD_REQUEST",VALIDATION_FAILED:"VALIDATION_FAILED",INVALID_PATH:"INVALID_PATH",PATH_OUT_OF_ROOT:"PATH_OUT_OF_ROOT",PATH_NOT_FOUND:"PATH_NOT_FOUND",NOT_A_DIRECTORY:"NOT_A_DIRECTORY",PERMISSION_DENIED:"PERMISSION_DENIED",AUTH_REQUIRED:"AUTH_REQUIRED",AUTH_INVALID:"AUTH_INVALID",AUTH_EXPIRED:"AUTH_EXPIRED",FORBIDDEN:"FORBIDDEN",TASK_NOT_FOUND:"TASK_NOT_FOUND",TASK_CONFLICT:"TASK_CONFLICT",TASK_NOT_CANCELLABLE:"TASK_NOT_CANCELLABLE",INVALID_STATE:"INVALID_STATE",TARGET_EXISTS:"TARGET_EXISTS",CROSS_DEVICE_UNSUPPORTED:"CROSS_DEVICE_UNSUPPORTED",UNSUPPORTED_FORMAT:"UNSUPPORTED_FORMAT",FORMAT_UNAVAILABLE:"FORMAT_UNAVAILABLE",DISK_FULL:"DISK_FULL",QUOTA_EXCEEDED:"QUOTA_EXCEEDED",VERIFY_FAILED:"VERIFY_FAILED",ARCHIVE_CORRUPTED:"ARCHIVE_CORRUPTED",ALL_SOURCES_SKIPPED:"ALL_SOURCES_SKIPPED",SCAN_LIMIT_EXCEEDED:"SCAN_LIMIT_EXCEEDED",RANGE_NOT_SATISFIABLE:"RANGE_NOT_SATISFIABLE",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMITED:"RATE_LIMITED",INTERNAL_ERROR:"INTERNAL_ERROR",INTERRUPTED:"INTERRUPTED",ABORTED:"ABORTED",MISSING_PASSWORD:"MISSING_PASSWORD",BAD_PASSWORD:"BAD_PASSWORD",SEVENZIP_MISSING:"SEVENZIP_MISSING"}),W1=Object.freeze(Object.values(De)),gd=Object.freeze({[De.BAD_REQUEST]:{http:400,label:"请求格式错误",retryable:!1},[De.VALIDATION_FAILED]:{http:400,label:"字段校验失败",retryable:!1},[De.INVALID_PATH]:{http:400,label:"路径格式非法",retryable:!1},[De.PATH_OUT_OF_ROOT]:{http:403,label:"路径超出可访问范围",retryable:!1},[De.PATH_NOT_FOUND]:{http:404,label:"路径不存在",retryable:!1},[De.NOT_A_DIRECTORY]:{http:400,label:"目标不是目录",retryable:!1},[De.PERMISSION_DENIED]:{http:403,label:"没有访问权限",retryable:!1},[De.AUTH_REQUIRED]:{http:401,label:"需要登录",retryable:!1},[De.AUTH_INVALID]:{http:401,label:"凭据无效",retryable:!1},[De.AUTH_EXPIRED]:{http:401,label:"登录已过期",retryable:!1},[De.FORBIDDEN]:{http:403,label:"策略拒绝",retryable:!1},[De.TASK_NOT_FOUND]:{http:404,label:"任务不存在",retryable:!1},[De.TASK_CONFLICT]:{http:409,label:"路径正被其他任务使用",retryable:!1},[De.TASK_NOT_CANCELLABLE]:{http:409,label:"当前状态不可取消",retryable:!1},[De.INVALID_STATE]:{http:409,label:"当前状态不允许该操作",retryable:!1},[De.TARGET_EXISTS]:{http:409,label:"目标已存在(不会覆盖)",retryable:!1},[De.CROSS_DEVICE_UNSUPPORTED]:{http:409,label:"不支持跨分区移动",retryable:!1},[De.UNSUPPORTED_FORMAT]:{http:400,label:"不支持的压缩格式",retryable:!1},[De.FORMAT_UNAVAILABLE]:{http:503,label:"该格式当前不可用",retryable:!1},[De.DISK_FULL]:{http:507,label:"磁盘空间不足",retryable:!0},[De.QUOTA_EXCEEDED]:{http:507,label:"已达到存储配额",retryable:!0},[De.VERIFY_FAILED]:{http:422,label:"压缩包校验未通过",retryable:!1},[De.ARCHIVE_CORRUPTED]:{http:422,label:"压缩包无法解析",retryable:!1},[De.ALL_SOURCES_SKIPPED]:{http:422,label:"没有可压缩的文件",retryable:!1},[De.SCAN_LIMIT_EXCEEDED]:{http:400,label:"扫描条目超出上限",retryable:!1},[De.RANGE_NOT_SATISFIABLE]:{http:416,label:"请求区间超出文件大小",retryable:!1},[De.NOT_IMPLEMENTED]:{http:501,label:"该功能尚未实现",retryable:!1},[De.SERVICE_UNAVAILABLE]:{http:503,label:"服务暂不可用",retryable:!0},[De.RATE_LIMITED]:{http:429,label:"请求过于频繁",retryable:!0},[De.INTERNAL_ERROR]:{http:500,label:"服务内部错误",retryable:!1},[De.INTERRUPTED]:{http:null,label:"服务重启导致任务中断",retryable:!0,taskOnly:!0},[De.ABORTED]:{http:null,label:"任务已取消",retryable:!1,taskOnly:!0},[De.MISSING_PASSWORD]:{http:422,label:"该压缩包已加密,请输入密码",retryable:!0},[De.BAD_PASSWORD]:{http:422,label:"密码错误",retryable:!0},[De.SEVENZIP_MISSING]:{http:503,label:"当前环境缺少 7z,无法解压 AES-256 加密包",retryable:!1}});Object.freeze([De.INTERRUPTED,De.ABORTED]);function q1(e){return typeof e=="string"&&W1.includes(e)}function Tm(e){return gd[e]||gd[De.INTERNAL_ERROR]}function K1(e){return Tm(e).http}const Y1="/api/v1",_u="zipcalm.auth.token",J1=15e3,Q1=[De.AUTH_REQUIRED,De.AUTH_INVALID,De.AUTH_EXPIRED],Z1=507,Om={400:De.BAD_REQUEST,401:De.AUTH_REQUIRED,403:De.FORBIDDEN,404:De.PATH_NOT_FOUND,409:De.INVALID_STATE,416:De.RANGE_NOT_SATISFIABLE,422:De.VERIFY_FAILED,429:De.RATE_LIMITED,500:De.INTERNAL_ERROR,501:De.NOT_IMPLEMENTED,503:De.SERVICE_UNAVAILABLE,[Z1]:De.DISK_FULL};class Gl extends Error{constructor(t={}){const n=q1(t.code)?t.code:De.INTERNAL_ERROR,s=Tm(n);super(t.message||s.label),this.name="ApiError",this.code=n,this.details=t.details||null,this.httpStatus=t.httpStatus??K1(n),this.retryable=s.retryable===!0,this.network=t.network===!0,this.isAuthError=Q1.includes(n)}}function X1(){try{return window.localStorage.getItem(_u)}catch{return null}}function km(e){try{e?window.localStorage.setItem(_u,e):window.localStorage.removeItem(_u)}catch{}}function ew(){km(null)}let yu=null;function tw(e){yu=typeof e=="function"?e:null}function nw(e,t){if(yu)try{yu({code:e.code,message:e.message,url:t})}catch(n){console.error("[api] unauthorized 钩子执行失败:",n)}}const Li=Pt.create({baseURL:Y1,timeout:J1,withCredentials:!0,headers:{Accept:"application/json"}});Li.interceptors.request.use(e=>{const t=X1();return t&&(e.headers=e.headers||{},e.headers.Authorization=`Bearer ${t}`),e});Li.interceptors.response.use(e=>sw(e),e=>Promise.reject(rw(e)));function sw(e){const{status:t,data:n,config:s}=e;if(s&&(s.responseType==="blob"||s.responseType==="arraybuffer"))return e;if(n&&typeof n=="object"&&typeof n.ok=="boolean"){if(n.ok)return n.data;throw new Gl({code:n.error&&n.error.code,message:n.error&&n.error.message,details:n.error&&n.error.details,httpStatus:t})}throw new Gl({code:Om[t]||De.INTERNAL_ERROR,message:`响应不是契约信封(HTTP ${t})`,httpStatus:t})}function rw(e){const t=e.config&&e.config.url||"",n=!!(e.config&&e.config.skipAuthHandler);let s;const r=e.response;if(r){const l=r.data;l&&typeof l=="object"&&typeof l.ok=="boolean"&&!l.ok?s=new Gl({code:l.error&&l.error.code,message:l.error&&l.error.message,details:l.error&&l.error.details,httpStatus:r.status}):s=new Gl({code:Om[r.status]||De.INTERNAL_ERROR,message:`请求失败(HTTP ${r.status})`,httpStatus:r.status})}else{const l=e.code==="ECONNABORTED"||e.code==="ETIMEDOUT";s=new Gl({code:De.SERVICE_UNAVAILABLE,message:l?"请求超时":"网络请求失败",details:{reason:e.code||"NETWORK"},network:!0})}return s.isAuthError&&!n&&nw(s,t),s}async function Hr(e){return Li.request({method:"get",...e})}const Ge={request:Hr,get(e,t,n){return Hr({method:"get",url:e,params:t,...n})},post(e,t,n){return Hr({method:"post",url:e,data:t,...n})},put(e,t,n){return Hr({method:"put",url:e,data:t,...n})},patch(e,t,n){return Hr({method:"patch",url:e,data:t,...n})},del(e,t,n){return Hr({method:"delete",url:e,data:t,...n})},async download(e,t={}){const n={};t.range&&(n.Range=`bytes=${t.range.start}-${t.range.end??""}`);const s=await Li.request({method:"get",url:"/fs/download",params:{path:e},headers:n,responseType:"blob",timeout:t.timeout||0});return{blob:s.data,headers:s.headers}}},At=Object.freeze({QUEUED:"queued",RUNNING:"running",CANCELLING:"cancelling",DONE:"done",FAILED:"failed",ABORTED:"aborted",INTERRUPTED:"interrupted"}),lw=Object.freeze(Object.values(At));Object.freeze([At.DONE,At.FAILED,At.ABORTED,At.INTERRUPTED]);Object.freeze([At.QUEUED,At.RUNNING]);Object.freeze([At.FAILED,At.INTERRUPTED]);const xm=Object.freeze({[At.QUEUED]:"排队中",[At.RUNNING]:"压缩中",[At.CANCELLING]:"正在取消",[At.DONE]:"已完成",[At.FAILED]:"失败",[At.ABORTED]:"已取消",[At.INTERRUPTED]:"已中断"}),ow=Object.freeze({[At.QUEUED]:"muted",[At.RUNNING]:"active",[At.CANCELLING]:"warn",[At.DONE]:"ok",[At.FAILED]:"error",[At.ABORTED]:"muted",[At.INTERRUPTED]:"warn"});function Wr(e){return xm[e]||"未知状态"}function Wl(e){return ow[e]||"muted"}const Zt=Object.freeze({PRECHECK:"precheck",SCANNING:"scanning",COMPRESSING:"compressing",VERIFYING:"verifying",WAITING_CONFIRM:"waiting_confirm",DELETING:"deleting"}),iw=Object.freeze([Zt.PRECHECK,Zt.SCANNING,Zt.COMPRESSING,Zt.VERIFYING,Zt.WAITING_CONFIRM,Zt.DELETING]);Object.freeze(Object.values(Zt));const rc=Object.freeze({[Zt.PRECHECK]:"检查权限与空间",[Zt.SCANNING]:"统计文件",[Zt.COMPRESSING]:"压缩中",[Zt.VERIFYING]:"校验压缩包",[Zt.WAITING_CONFIRM]:"待确认删除原文件",[Zt.DELETING]:"删除原文件"});Object.freeze([Zt.PRECHECK,Zt.SCANNING,Zt.COMPRESSING,Zt.VERIFYING]);const Os=Object.freeze({SINGLE:"single",BUNDLE:"bundle"}),aw=Object.freeze(Object.values(Os));Os.SINGLE;const Cm=Object.freeze({[Os.SINGLE]:"每个文件/文件夹单独压缩",[Os.BUNDLE]:"合并为一个压缩包"}),uw=Object.freeze({[Os.SINGLE]:"选中的每一项各自生成一个压缩包,产物名与源同名",[Os.BUNDLE]:"所有选中项打包进同一个压缩包,包内保留目录结构"}),Nl=Object.freeze({ZIP:"zip",TAR:"tar",TARGZ:"targz",TARZST:"tarzst"}),cw=19,Mi=Object.freeze([{id:Nl.ZIP,name:"ZIP",ext:".zip",extAliases:[],mime:"application/zip",defaultLevel:6,levelRange:[0,9]},{id:Nl.TAR,name:"TAR",ext:".tar",extAliases:[],mime:"application/x-tar",defaultLevel:null,levelRange:null},{id:Nl.TARGZ,name:"TAR.GZ",ext:".tar.gz",extAliases:[".tgz"],mime:"application/gzip",defaultLevel:6,levelRange:[0,9]},{id:Nl.TARZST,name:"TAR.ZST",ext:".tar.zst",extAliases:[".tzst"],mime:"application/zstd",defaultLevel:3,levelRange:[1,cw]}]);Object.freeze(Mi.map(e=>e.id));Nl.ZIP;new Map(Mi.map(e=>[e.id,e]));const fw=new Map;for(const e of Mi)for(const t of[e.ext,...e.extAliases])fw.set(t.toLowerCase(),e);const Im="ZipCalm",Dm="压压惊",vt=Object.freeze({FILES:"/files",TASKS:"/tasks",METRICS:"/metrics",HARDLINK:"/hardlink",SETTINGS:"/settings",LOGIN:"/login"}),Pm=vt.FILES;vt.LOGIN;const Rs=Object.freeze({LIST:"list",GRID:"grid"}),vu=Object.freeze(Object.values(Rs)),dw=Object.freeze({[Rs.LIST]:"列表",[Rs.GRID]:"网格"}),pw=2e3;function Nm(e){const n=(typeof e=="string"&&e.length>0?e:"/").split("/").filter(s=>s!==""&&s!==".");return n.length===0?"/":`/${n.join("/")}`}function hw(e){const t=Nm(e);if(t==="/")return null;const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function $m(e){const t=Nm(e),n=[{label:"根目录",path:"/"}],s=t.split("/").filter(Boolean);let r="";for(const l of s)r+=`/${l}`,n.push({label:l,path:r});return n}const Ps=ki("ui",{state:()=>({route:Pm,pageTitle:"",pageHint:"",fsPath:null,searchQuery:"",searchState:{running:!1,error:"",items:[],truncated:!1,elapsedMs:0,scannedDirs:0},currentRootId:"default",roots:[],rootsReady:!1,rootsError:"",runtimeUser:"",runtimeUid:null,viewMode:Rs.LIST,taskSummary:{active:0,queued:0,parallel:!1},sidebarOpen:!0}),getters:{currentRootLabel(e){const t=e.roots.find(n=>n.id===e.currentRootId);return t&&t.label?t.label:e.currentRootId},currentDirLabel(e){const t=e.fsPath||"/";return t==="/"?"根目录":t},breadcrumbs:e=>e.route===vt.FILES?$m(e.fsPath||"/"):[{label:"根目录",path:"/"},{label:e.pageTitle||"ZipCalm",path:e.route}],viewModeLabel:e=>vu.find(t=>t===e.viewMode)||Rs.LIST},actions:{syncRoute(e){if(this.route=e.path,this.pageTitle=e.meta&&e.meta.title||"",this.pageHint=e.meta&&e.meta.hint||"",e.path===vt.FILES){const t=e.query&&e.query.path;this.fsPath=typeof t=="string"&&t.length>0?t:"/"}else this.fsPath=null},setRoots(e){this.roots=Array.isArray(e)?e:[]},setRootsResolved(e={}){Array.isArray(e.roots)&&(this.roots=e.roots),typeof e.rootId=="string"&&e.rootId.length>0&&(this.currentRootId=e.rootId),this.rootsError=typeof e.error=="string"?e.error:"",this.rootsReady=!0},setRuntime(e){const t=e||{};this.runtimeUser=typeof t.user=="string"?t.user:"",this.runtimeUid=Number.isInteger(t.uid)?t.uid:null},setSearchQuery(e){this.searchQuery=typeof e=="string"?e:""},async runSearch(e,t=500){const n=this.searchQuery.trim();if(n.length===0){this.clearSearch();return}this.searchState={...this.searchState,running:!0,error:""};try{const s=await Ge.get("/fs/search",{q:n,rootId:e,limit:t});this.searchState={running:!1,error:"",items:s&&s.items||[],truncated:!!(s&&s.truncated),elapsedMs:Number(s&&s.elapsedMs||0),scannedDirs:Number(s&&s.scannedDirs||0)}}catch(s){this.searchState={running:!1,error:`[${s.code||"ERROR"}] ${s.message}`,items:[],truncated:!1,elapsedMs:0,scannedDirs:0}}},clearSearch(){this.searchQuery="",this.searchState={running:!1,error:"",items:[],truncated:!1,elapsedMs:0,scannedDirs:0}},setCurrentRoot(e){typeof e=="string"&&e.length>0&&(this.currentRootId=e)},setViewMode(e){vu.includes(e)&&(this.viewMode=e)},toggleSidebar(){this.sidebarOpen=!this.sidebarOpen},setTaskSummary(e){this.taskSummary={...this.taskSummary,...e}}}}),yo=ki("session",{state:()=>({authenticated:!1,userName:null,expired:!1,lastAuthErrorCode:null,authType:null,checking:!1}),getters:{label:e=>e.authenticated?e.userName||"已登录":e.expired?"登录已过期":"未登录",tone:e=>e.authenticated?"ok":e.expired?"warn":"muted",badgeClass(){return`badge--${this.tone}`}},actions:{setAuthenticated(e,t){this.authenticated=!0,this.userName=e&&e.name||this.userName,this.authType=t||this.authType,this.expired=!1,this.lastAuthErrorCode=null},markUnauthorized(e){this.authenticated=!1,this.userName=null,this.authType=null,this.expired=!0,this.lastAuthErrorCode=e&&e.code?e.code:De.AUTH_REQUIRED},clear(){this.authenticated=!1,this.userName=null,this.authType=null,this.expired=!1,this.lastAuthErrorCode=null},async login(e,t){const n=await Ge.post("/auth/login",{username:e,password:t},{skipAuthHandler:!0});return n&&n.token&&km(n.token),this.setAuthenticated(n&&n.user||{name:e},"session"),n},async logout(){try{await Ge.post("/auth/logout",{})}catch{}ew(),this.clear()},async ensureLoaded(){this.checking=!0;try{const e=await Ge.get("/auth/me",void 0,{skipAuthHandler:!0});return this.setAuthenticated(e&&e.user||null,e&&e.authType),!0}catch(e){if(e&&e.isAuthError)return this.authenticated=!1,this.userName=null,this.authType=null,this.expired=!1,!1;throw e}finally{this.checking=!1}}}}),mw={class:"topbar","data-region":"topbar"},gw=["aria-expanded"],_w={class:"topbar__brand"},yw={class:"topbar__brand-sub"},vw={class:"topbar__crumbs","aria-label":"面包屑","data-testid":"topbar-breadcrumb"},bw={key:0,"aria-hidden":"true"},ww=["aria-current"],Ew={class:"topbar__search"},Sw=["value"],Rw={class:"topbar__views",role:"group","aria-label":"视图切换"},Aw=["aria-pressed","onClick"],Tw={class:"topbar__user"},Ow=300,kw={__name:"TopBar",setup(e){const t=Ps(),n=yo(),s=Di(),r=xe(()=>t.breadcrumbs),l=vu;async function o(){await n.logout(),await s.replace({path:vt.LOGIN})}let i=null;function a(f){if(t.setSearchQuery(f.target.value),i&&clearTimeout(i),t.searchQuery.trim().length===0){t.clearSearch();return}i=setTimeout(()=>{t.runSearch(t.currentRootId)},Ow)}function u(){t.clearSearch()}return(f,c)=>(N(),L("header",mw,[m("button",{type:"button",class:"topbar__menu","data-testid":"sidebar-toggle","aria-label":"打开导航","aria-expanded":Z(t).sidebarOpen?"true":"false",onClick:c[0]||(c[0]=d=>Z(t).toggleSidebar())},"☰",8,gw),m("div",_w,[ge(k(Z(Im))+" ",1),m("span",yw,k(Z(Dm)),1)]),m("nav",vw,[(N(!0),L(Oe,null,ht(r.value,(d,h)=>(N(),L(Oe,{key:d.path},[h>0?(N(),L("span",bw,"/")):be("",!0),m("span",{"aria-current":h===r.value.length-1?"page":void 0},k(d.label),9,ww)],64))),128))]),m("div",Ew,[c[1]||(c[1]=m("label",{class:"visually-hidden",for:"topbar-search"},"搜索文件",-1)),m("input",{id:"topbar-search",value:Z(t).searchQuery,type:"search",placeholder:"搜索当前根内的文件(结果显示在文件列表)","data-testid":"topbar-search",autocomplete:"off",onInput:a,onKeydown:oi(u,["esc"])},null,40,Sw)]),c[2]||(c[2]=m("div",{class:"topbar__spacer"},null,-1)),m("div",Rw,[(N(!0),L(Oe,null,ht(Z(l),d=>(N(),L("button",{key:d,type:"button",class:"view-toggle","aria-pressed":Z(t).viewMode===d,onClick:h=>Z(t).setViewMode(d)},k(Z(dw)[d]),9,Aw))),128))]),m("div",Tw,[m("span",{class:ft(["badge",Z(n).badgeClass]),"data-testid":"session-badge"},k(Z(n).label),3),Z(n).authenticated?(N(),L("button",{key:0,type:"button","data-testid":"logout",onClick:o}," 登出 ")):be("",!0)])]))}};/**
|
|
39
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/const xw=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
44
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the ISC license.
|
|
47
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/const _d=e=>e==="";/**
|
|
49
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const Cw=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
54
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/const yd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
59
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const Iw=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());/**
|
|
64
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const Dw=e=>{const t=Iw(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
69
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/var Ol={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
74
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const Pw=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":s,strokeWidth:r,"stroke-width":l,size:o=Ol.width,color:i=Ol.stroke,...a},{slots:u})=>to("svg",{...Ol,...a,width:o,height:o,stroke:i,"stroke-width":_d(n)||_d(s)||n===!0||s===!0?Number(r||l||Ol["stroke-width"])*24/Number(o):r||l||Ol["stroke-width"],class:Cw("lucide",a.class,...e?[`lucide-${yd(Dw(e))}-icon`,`lucide-${yd(e)}`]:["lucide-icon"]),...!u.default&&!xw(a)&&{"aria-hidden":"true"}},[...t.map(f=>to(...f)),...u.default?[u.default()]:[]]);/**
|
|
79
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const Ns=(e,t)=>(n,{slots:s,attrs:r})=>to(Pw,{...r,...n,iconNode:t,name:e},s);/**
|
|
84
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const Nw=Ns("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
89
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const $w=Ns("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
94
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const Lw=Ns("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
99
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const Mw=Ns("file-archive",[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]);/**
|
|
104
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const Fw=Ns("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
|
|
109
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const Uw=Ns("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
114
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const Bw=Ns("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);/**
|
|
119
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const Hw=Ns("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
124
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const Vw=Ns("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Kr={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:16},strokeWidth:{type:[Number,String],default:1.8}},setup(e){const t=e,n={files:Uw,file:Fw,tasks:Nw,metrics:$w,settings:Vw,storage:Bw,hardlink:Hw,formats:Mw},s=Lw,r=new Set,l=xe(()=>{const o=n[t.name];return o||(r.has(t.name)||(r.add(t.name),console.warn(`[Icon] 未登记的图标名 "${t.name}",已回落为占位图标。请到 Icon.vue 的 ICON_COMPONENTS 中登记。`)),s)});return(o,i)=>(N(),Zr(oy(l.value),{class:"icon",size:e.size,"stroke-width":e.strokeWidth,"aria-hidden":"true"},null,8,["size","stroke-width"]))}},jw=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zw=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Gw=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ww=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],vd=(e,t,n)=>{let s=e;return typeof t=="string"||Array.isArray(t)?s=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(s=e.toLocaleString(void 0,n)),s};function bd(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?Ww:Gw:t.binary?zw:jw,s=t.space?" ":"";if(t.signed&&e===0)return` 0${s}${n[0]}`;const r=e<0,l=r?"-":t.signed?"+":"";r&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1){const f=vd(e,t.locale,o);return l+f+s+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,o||(e=e.toPrecision(3));const a=vd(Number(e),t.locale,o),u=n[i];return l+a+s+u}var lc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mm={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(lc,function(){var n=1e3,s=6e4,r=36e5,l="millisecond",o="second",i="minute",a="hour",u="day",f="week",c="month",d="quarter",h="year",S="date",R="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(te){var W=["th","st","nd","rd"],q=te%100;return"["+te+(W[(q-20)%10]||W[q]||W[0])+"]"}},O=function(te,W,q){var H=String(te);return!H||H.length>=W?te:""+Array(W+1-H.length).join(q)+te},w={s:O,z:function(te){var W=-te.utcOffset(),q=Math.abs(W),H=Math.floor(q/60),Q=q%60;return(W<=0?"+":"-")+O(H,2,"0")+":"+O(Q,2,"0")},m:function te(W,q){if(W.date()<q.date())return-te(q,W);var H=12*(q.year()-W.year())+(q.month()-W.month()),Q=W.clone().add(H,c),me=q-Q<0,_e=W.clone().add(H+(me?-1:1),c);return+(-(H+(q-Q)/(me?Q-_e:_e-Q))||0)},a:function(te){return te<0?Math.ceil(te)||0:Math.floor(te)},p:function(te){return{M:c,y:h,w:f,d:u,D:S,h:a,m:i,s:o,ms:l,Q:d}[te]||String(te||"").toLowerCase().replace(/s$/,"")},u:function(te){return te===void 0}},T="en",C={};C[T]=g;var U="$isDayjsObject",j=function(te){return te instanceof ke||!(!te||!te[U])},ee=function te(W,q,H){var Q;if(!W)return T;if(typeof W=="string"){var me=W.toLowerCase();C[me]&&(Q=me),q&&(C[me]=q,Q=me);var _e=W.split("-");if(!Q&&_e.length>1)return te(_e[0])}else{var Ee=W.name;C[Ee]=W,Q=Ee}return!H&&Q&&(T=Q),Q||!H&&T},le=function(te,W){if(j(te))return te.clone();var q=typeof W=="object"?W:{};return q.date=te,q.args=arguments,new ke(q)},z=w;z.l=ee,z.i=j,z.w=function(te,W){return le(te,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var ke=function(){function te(q){this.$L=ee(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[U]=!0}var W=te.prototype;return W.parse=function(q){this.$d=function(H){var Q=H.date,me=H.utc;if(Q===null)return new Date(NaN);if(z.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var _e=Q.match(D);if(_e){var Ee=_e[2]-1||0,oe=(_e[7]||"0").substring(0,3);return me?new Date(Date.UTC(_e[1],Ee,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,oe)):new Date(_e[1],Ee,_e[3]||1,_e[4]||0,_e[5]||0,_e[6]||0,oe)}}return new Date(Q)}(q),this.init()},W.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},W.$utils=function(){return z},W.isValid=function(){return this.$d.toString()!==R},W.isSame=function(q,H){var Q=le(q);return this.startOf(H)<=Q&&Q<=this.endOf(H)},W.isAfter=function(q,H){return le(q)<this.startOf(H)},W.isBefore=function(q,H){return this.endOf(H)<le(q)},W.$g=function(q,H,Q){return z.u(q)?this[H]:this.set(Q,q)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(q,H){var Q=this,me=!!z.u(H)||H,_e=z.p(q),Ee=function(ae,he){var v=z.w(Q.$u?Date.UTC(Q.$y,he,ae):new Date(Q.$y,he,ae),Q);return me?v:v.endOf(u)},oe=function(ae,he){return z.w(Q.toDate()[ae].apply(Q.toDate("s"),(me?[0,0,0,0]:[23,59,59,999]).slice(he)),Q)},pe=this.$W,$e=this.$M,He=this.$D,Me="set"+(this.$u?"UTC":"");switch(_e){case h:return me?Ee(1,0):Ee(31,11);case c:return me?Ee(1,$e):Ee(0,$e+1);case f:var M=this.$locale().weekStart||0,fe=(pe<M?pe+7:pe)-M;return Ee(me?He-fe:He+(6-fe),$e);case u:case S:return oe(Me+"Hours",0);case a:return oe(Me+"Minutes",1);case i:return oe(Me+"Seconds",2);case o:return oe(Me+"Milliseconds",3);default:return this.clone()}},W.endOf=function(q){return this.startOf(q,!1)},W.$set=function(q,H){var Q,me=z.p(q),_e="set"+(this.$u?"UTC":""),Ee=(Q={},Q[u]=_e+"Date",Q[S]=_e+"Date",Q[c]=_e+"Month",Q[h]=_e+"FullYear",Q[a]=_e+"Hours",Q[i]=_e+"Minutes",Q[o]=_e+"Seconds",Q[l]=_e+"Milliseconds",Q)[me],oe=me===u?this.$D+(H-this.$W):H;if(me===c||me===h){var pe=this.clone().set(S,1);pe.$d[Ee](oe),pe.init(),this.$d=pe.set(S,Math.min(this.$D,pe.daysInMonth())).$d}else Ee&&this.$d[Ee](oe);return this.init(),this},W.set=function(q,H){return this.clone().$set(q,H)},W.get=function(q){return this[z.p(q)]()},W.add=function(q,H){var Q,me=this;q=Number(q);var _e=z.p(H),Ee=function($e){var He=le(me);return z.w(He.date(He.date()+Math.round($e*q)),me)};if(_e===c)return this.set(c,this.$M+q);if(_e===h)return this.set(h,this.$y+q);if(_e===u)return Ee(1);if(_e===f)return Ee(7);var oe=(Q={},Q[i]=s,Q[a]=r,Q[o]=n,Q)[_e]||1,pe=this.$d.getTime()+q*oe;return z.w(pe,this)},W.subtract=function(q,H){return this.add(-1*q,H)},W.format=function(q){var H=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||R;var me=q||"YYYY-MM-DDTHH:mm:ssZ",_e=z.z(this),Ee=this.$H,oe=this.$m,pe=this.$M,$e=Q.weekdays,He=Q.months,Me=Q.meridiem,M=function(he,v,A,x){return he&&(he[v]||he(H,me))||A[v].slice(0,x)},fe=function(he){return z.s(Ee%12||12,he,"0")},ae=Me||function(he,v,A){var x=he<12?"AM":"PM";return A?x.toLowerCase():x};return me.replace(_,function(he,v){return v||function(A){switch(A){case"YY":return String(H.$y).slice(-2);case"YYYY":return z.s(H.$y,4,"0");case"M":return pe+1;case"MM":return z.s(pe+1,2,"0");case"MMM":return M(Q.monthsShort,pe,He,3);case"MMMM":return M(He,pe);case"D":return H.$D;case"DD":return z.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return M(Q.weekdaysMin,H.$W,$e,2);case"ddd":return M(Q.weekdaysShort,H.$W,$e,3);case"dddd":return $e[H.$W];case"H":return String(Ee);case"HH":return z.s(Ee,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ae(Ee,oe,!0);case"A":return ae(Ee,oe,!1);case"m":return String(oe);case"mm":return z.s(oe,2,"0");case"s":return String(H.$s);case"ss":return z.s(H.$s,2,"0");case"SSS":return z.s(H.$ms,3,"0");case"Z":return _e}return null}(he)||_e.replace(":","")})},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(q,H,Q){var me,_e=this,Ee=z.p(H),oe=le(q),pe=(oe.utcOffset()-this.utcOffset())*s,$e=this-oe,He=function(){return z.m(_e,oe)};switch(Ee){case h:me=He()/12;break;case c:me=He();break;case d:me=He()/3;break;case f:me=($e-pe)/6048e5;break;case u:me=($e-pe)/864e5;break;case a:me=$e/r;break;case i:me=$e/s;break;case o:me=$e/n;break;default:me=$e}return Q?me:z.a(me)},W.daysInMonth=function(){return this.endOf(c).$D},W.$locale=function(){return C[this.$L]},W.locale=function(q,H){if(!q)return this.$L;var Q=this.clone(),me=ee(q,H,!0);return me&&(Q.$L=me),Q},W.clone=function(){return z.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},te}(),we=ke.prototype;return le.prototype=we,[["$ms",l],["$s",o],["$m",i],["$H",a],["$W",u],["$M",c],["$y",h],["$D",S]].forEach(function(te){we[te[1]]=function(W){return this.$g(W,te[0],te[1])}}),le.extend=function(te,W){return te.$i||(te(W,ke,le),te.$i=!0),le},le.locale=ee,le.isDayjs=j,le.unix=function(te){return le(1e3*te)},le.en=C[T],le.Ls=C,le.p={},le})})(Mm);var Fm=Mm.exports;const Fi=Lm(Fm);var Um={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(lc,function(){return function(n,s,r){n=n||{};var l=s.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(u,f,c,d){return l.fromToBase(u,f,c,d)}r.en.relativeTime=o,l.fromToBase=function(u,f,c,d,h){for(var S,R,D,_=c.$locale().relativeTime||o,g=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],O=g.length,w=0;w<O;w+=1){var T=g[w];T.d&&(S=d?r(u).diff(c,T.d,!0):c.diff(u,T.d,!0));var C=(n.rounding||Math.round)(Math.abs(S));if(D=S>0,C<=T.r||!T.r){C<=1&&w>0&&(T=g[w-1]);var U=_[T.l];h&&(C=h(""+C)),R=typeof U=="string"?U.replace("%d",C):U(C,f,T.l,D);break}}if(f)return R;var j=D?_.future:_.past;return typeof j=="function"?j(R):j.replace("%s",R)},l.to=function(u,f){return i(u,f,this,!0)},l.from=function(u,f){return i(u,f,this)};var a=function(u){return u.$u?r.utc():r()};l.toNow=function(u){return this.to(a(this),u)},l.fromNow=function(u){return this.from(a(this),u)}}})})(Um);var qw=Um.exports;const Kw=Lm(qw);var Yw={exports:{}};(function(e,t){(function(n,s){e.exports=s(Fm)})(lc,function(n){function s(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var r=s(n),l={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(o,i){return i==="W"?o+"周":o+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(o,i){var a=100*o+i;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return r.default.locale(l,null,!0),l})})(Yw);Fi.extend(Kw);Fi.locale("zh-cn");const Ar="—";function dt(e){if(!Number.isFinite(e)||e<0)return Ar;try{return bd(e,{locale:"zh-CN",binary:!1})}catch{return bd(e)}}function qn(e){if(!Number.isFinite(e))return Ar;const t=Math.min(100,Math.max(0,e));return`${Number(t.toFixed(1))}%`}function Yr(e,t="YYYY-MM-DD HH:mm"){if(!Number.isFinite(e))return Ar;const n=Fi(e);return n.isValid()?n.format(t):Ar}function Jw(e){if(!Number.isFinite(e))return Ar;const t=Fi(e);return t.isValid()?t.valueOf()>Date.now()?Yr(e):t.fromNow():Ar}function wd(e){return!Number.isFinite(e)||e<0?Ar:`${dt(e)}/s`}const Qw={class:"sidebar__section"},Zw={class:"nav-list","aria-label":"主导航"},Xw={class:"nav-item__icon","aria-hidden":"true"},eE={class:"sidebar__section"},tE={class:"sidebar__title","data-testid":"roots-title"},nE={key:0,class:"card__desc","data-testid":"roots-error"},sE={key:1,class:"card__desc"},rE={key:2,class:"tree","data-testid":"roots-list"},lE=["data-testid","title","onClick"],oE={class:"root-item__name"},iE={key:0,class:"root-item__size"},aE=["aria-valuenow","aria-label"],uE={class:"sidebar__section"},cE={class:"sidebar__title"},fE={class:"tree"},dE={class:"badge"},pE={key:0,class:"badge",title:"只能解压,不能压缩"},hE={__name:"Sidebar",setup(e){const t=[{to:vt.FILES,label:"文件浏览",icon:"files"},{to:vt.TASKS,label:"压缩任务",icon:"tasks"},{to:vt.HARDLINK,label:"硬链接去重",icon:"hardlink"},{to:vt.METRICS,label:"性能看板",icon:"metrics"},{to:vt.SETTINGS,label:"设置",icon:"settings"}],n=Ps(),s=yo(),r=Di(),l=de([]),o=de(""),i=de(""),a=xe(()=>o.value==="C"?"位置":"存储卷");let u=0;const f=de([]),c=xe(()=>f.value.length>0?f.value:Mi);async function d(){try{const w=await Ge.get("/formats"),T=w&&w.formats||[];f.value=T.map(C=>({id:C.id,name:C.name,ext:C.ext,extractOnly:C.extractOnly===!0}))}catch{f.value=[]}}function h(w){u=0,l.value=w&&w.roots||[],o.value=w&&w.mode||"",n.setRoots(l.value),!l.value.some(T=>T.id===n.currentRootId)&&l.value.length>0&&n.setCurrentRoot(l.value[0].id)}function S(w){return w.code==="AUTH_REQUIRED"&&u<5?(u+=1,i.value="",window.setTimeout(()=>{R()},600),!0):(i.value=`[${w.code||"ERROR"}] ${w.message}`,n.setRootsResolved({roots:l.value,rootId:n.currentRootId,error:i.value}),!1)}async function R(){try{h(await Ge.get("/fs/volumes"));const w=await D();n.setRootsResolved({roots:l.value,mode:o.value,rootId:w||n.currentRootId,error:""})}catch(w){S(w)}}async function D(){const w=[...l.value.filter(T=>T.id===n.currentRootId),...l.value.filter(T=>T.id!==n.currentRootId)];for(const T of w)try{return await Ge.get("/fs/list",{path:"/",limit:1,rootId:T.id}),n.currentRootId!==T.id&&n.setCurrentRoot(T.id),T.id}catch{}}function _(w){const T=Number(w.totalBytes),C=Number(w.freeBytes);if(!(T>0)||!Number.isFinite(C))return 0;const U=(T-C)/T*100;return Math.min(100,Math.max(0,Math.round(U)))}function g(w){const T=_(w);return T>90?"root-item__bar-fill--danger":T>=80?"root-item__bar-fill--warn":""}function O(w){n.currentRootId!==w&&(n.setCurrentRoot(w),r.push({path:vt.FILES,query:{path:"/"}}))}return Cs(()=>{R(),d()}),wt(()=>n.route,()=>{R(),d()}),wt(()=>s.authenticated,w=>{w&&(u=0,i.value="",R(),d())}),(w,T)=>(N(),L("aside",{class:ft(["sidebar scroll-area",{"sidebar--open":Z(n).sidebarOpen}]),"data-region":"sidebar"},[m("button",{type:"button",class:"sidebar__close","data-testid":"sidebar-close","aria-label":"关闭导航",onClick:T[0]||(T[0]=C=>Z(n).toggleSidebar())},"✕"),m("section",Qw,[T[1]||(T[1]=m("h2",{class:"sidebar__title"},"导航",-1)),m("nav",Zw,[(N(),L(Oe,null,ht(t,C=>je(Z(Ii),{key:C.to,to:C.to,class:"nav-item"},{default:co(()=>[m("span",Xw,[je(Kr,{name:C.icon,size:16},null,8,["name"])]),m("span",null,k(C.label),1)]),_:2},1032,["to"])),64))])]),m("section",eE,[m("h2",tE,[je(Kr,{name:"storage",size:13}),ge(" "+k(a.value),1)]),i.value?(N(),L("p",nE,k(i.value),1)):l.value.length===0?(N(),L("p",sE,"未发现可用的存储位置")):(N(),L("ul",rE,[(N(!0),L(Oe,null,ht(l.value,C=>(N(),L("li",{key:C.id,class:"tree__item"},[m("button",{type:"button",class:ft(["root-item",{"root-item--active":Z(n).currentRootId===C.id}]),"data-testid":`root-${C.id}`,title:C.path,onClick:U=>O(C.id)},[m("span",oE,k(C.label),1),C.totalBytes?(N(),L("span",iE,k(Z(dt)(C.freeBytes))+" 可用 / "+k(Z(dt)(C.totalBytes)),1)):be("",!0),C.totalBytes?(N(),L("span",{key:1,class:"root-item__bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":_(C),"aria-label":`${C.label} 已用 ${_(C)}%`},[m("i",{class:ft(["root-item__bar-fill",g(C)]),style:Is({width:`${_(C)}%`})},null,6)],8,aE)):be("",!0)],10,lE)]))),128))]))]),m("section",uE,[m("h2",cE,[je(Kr,{name:"formats",size:13}),T[2]||(T[2]=ge(" 支持格式 ",-1))]),m("ul",fE,[(N(!0),L(Oe,null,ht(c.value,C=>(N(),L("li",{key:C.id,class:"tree__item"},[m("span",null,k(C.name),1),m("span",dE,k(C.ext),1),C.extractOnly?(N(),L("span",pE,"仅解压")):be("",!0)]))),128))])])],2))}},mE={class:"main-area","data-region":"main-area"},gE={class:"main-area__toolbar"},_E={class:"main-area__toolbar-title"},yE={key:0,class:"main-area__toolbar-hint"},vE={class:"main-area__body scroll-area"},bE={class:"page-outlet"},wE={__name:"MainArea",setup(e){const t=Ps();return(n,s)=>(N(),L("main",mE,[m("div",gE,[m("span",_E,k(Z(t).pageTitle||"文件浏览"),1),Z(t).pageHint?(N(),L("span",yE,k(Z(t).pageHint),1)):be("",!0),s[0]||(s[0]=m("div",{class:"topbar__spacer"},null,-1)),af(n.$slots,"toolbar")]),m("div",vE,[m("div",bE,[af(n.$slots,"default")])])]))}},EE=5,SE=3,Ed=3,Bm=ki("metrics",{state:()=>({frame:null,history:[],recent:[],errorText:"",loadedOnce:!1,running:!1,inFlight:!1,tickCount:0,timer:null,onVisibilityChange:null}),actions:{async fetchSnapshot(){const e=await Ge.get("/metrics/snapshot");this.frame=e||null,this.loadedOnce=!0},async fetchHistory(){const e=await Ge.get("/metrics/history",{window:300,step:5});this.history=e&&e.samples||[]},async fetchRecent(){const e=await Ge.get("/tasks/history",{limit:Ed});this.recent=(e&&e.items||[]).slice(0,Ed)},async tick(){if(!this.inFlight){this.inFlight=!0,this.tickCount=(this.tickCount||0)+1;try{await this.fetchSnapshot(),this.tickCount%EE===1&&await this.fetchHistory(),this.tickCount%SE===1&&await this.fetchRecent(),this.errorText=""}catch(e){this.errorText=`[${e.code||"ERROR"}] ${e.message}`}finally{this.inFlight=!1}}},start(){this.running||(this.running=!0,this.tickCount=0,this.tick(),this.timer=setInterval(()=>{document.visibilityState!=="hidden"&&this.tick()},pw),this.onVisibilityChange=()=>{document.visibilityState==="visible"&&this.running&&this.tick()},document.addEventListener("visibilitychange",this.onVisibilityChange))},stop(){this.running=!1,this.timer&&clearInterval(this.timer),this.timer=null,this.onVisibilityChange&&document.removeEventListener("visibilitychange",this.onVisibilityChange),this.onVisibilityChange=null}}}),RE=15e3,AE=1e3,TE=3,Sd=1e3;function OE({collection:e,connectionMode:t,lastEventAt:n,lastEventStatus:s}){let r=null,l=null,o=null,i=Sd,a=0;function u(){if(o)return;t.value="polling";const T=async()=>{try{const C=await Ge.get("/tasks",{limit:50});e.replaceFromList(C)}catch{}};T(),o=setInterval(T,AE)}function f(){o&&(clearInterval(o),o=null)}function c(){l||(l=setTimeout(()=>{l=null,O()},i),i=Math.min(i*2,RE))}function d(){return a+=1,a<TE?!1:(u(),!0)}function h(){return`/api/v1/tasks/events?channels=tasks${e.lastSeq.value>0?`&since=${e.lastSeq.value}`:""}`}function S(T){try{return JSON.parse(T.data)}catch{return null}}function R(T){const C=S(T);C&&(e.bumpSeq(C.seq),e.applySnapshot(C),t.value="connected",a=0,i=Sd,f())}function D(T){const C=S(T);C&&(e.bumpSeq(C.seq),e.upsert(C.task),n.value=Date.now(),s.value=C.task&&C.task.status)}function _(){t.value="connecting",r&&(r.close(),r=null),d(),c()}function g(T){T.addEventListener("snapshot",R),T.addEventListener("task",D),T.addEventListener("heartbeat",()=>{t.value="connected"}),T.onopen=()=>{t.value="connected",a=0},T.onerror=_}function O(){if(typeof EventSource>"u"){u();return}r&&(r.close(),r=null),t.value="connecting";try{r=new EventSource(h())}catch{d()||c();return}g(r)}function w(){r&&(r.close(),r=null),l&&(clearTimeout(l),l=null),f(),t.value="connecting"}return{connect:O,disconnect:w,startPolling:u,stopPolling:f}}function kE({collection:e}){async function t(i){const a=await Ge.get(`/tasks/${i}`);return e.upsert(a.task),a.task}async function n(i=50){const a=await Ge.get("/tasks/history",{limit:i});return e.history.value=a.items||[],e.history.value}async function s(i){const a=await Ge.post(`/tasks/${i}/cancel`,{});return e.upsert(a.task),a.task}async function r(i){const a=await Ge.post(`/tasks/${i}/retry`,{});return e.upsert(a.task),a.task}async function l(i,a){const u=await Ge.post(`/tasks/${i}/confirm-delete`,{confirm:!0,expectedFiles:a});return e.upsert(u.task),u.task}async function o(i){const a=await Ge.del(`/tasks/${i}`);return e.removeLocal(i),await n().catch(()=>{}),a}return{loadDetail:t,loadHistory:n,cancel:s,retry:r,confirmDelete:l,remove:o}}const Rd=["queued","running","cancelling"],Ad=["failed","interrupted"];function xE(){const e=de(new Map),t=de([]),n=de({active:null,waiting:0,parallel:!1}),s=de(0),r=de(null),l=xe(()=>[...e.value.values()].sort((_,g)=>g.createdAt-_.createdAt)),o=xe(()=>l.value.filter(_=>Rd.includes(_.status))),i=xe(()=>l.value.filter(_=>Ad.includes(_.status))),a=xe(()=>l.value.filter(_=>_.status==="queued").length),u=xe(()=>l.value.filter(_=>_.status==="running").length),f=xe(()=>l.value.find(_=>_.status==="running"||_.status==="cancelling")||l.value.find(_=>_.status==="queued")||null);function c(_){const g=e.value.get(_);return!!(g&&(Rd.includes(g.status)||Ad.includes(g.status)))}function d(_){if(!_||!_.id)return;const g=new Map(e.value),O=g.get(_.id);g.set(_.id,O?{...O,..._,progress:{..._.progress}}:{..._}),e.value=g}function h(_){const g=new Map;for(const O of _.tasks||[])g.set(O.id,O);e.value=g,n.value=_.queue||n.value,r.value=_.bootId||r.value,Number.isInteger(_.seq)&&(s.value=Math.max(s.value,_.seq))}function S(_){const g=new Map;for(const O of _.items||[])g.set(O.id,O);e.value=g,n.value=_.queue||n.value,t.value=_.history||t.value,Number.isInteger(_.seq)&&(s.value=Math.max(s.value,_.seq))}function R(_){const g=new Map(e.value);g.delete(_),e.value=g}function D(_){Number.isInteger(_)&&(s.value=Math.max(s.value,_))}return{tasks:e,history:t,queue:n,lastSeq:s,bootId:r,list:l,unfinished:o,retryable:i,queuedCount:a,runningCount:u,activeTask:f,hasActiveRecord:c,upsert:d,applySnapshot:h,replaceFromList:S,removeLocal:R,bumpSeq:D}}const vo=ki("tasks",()=>{const e=xE(),t=de("connecting"),n=de(!1),s=de(0),r=de(null),l=OE({collection:e,connectionMode:t,lastEventAt:s,lastEventStatus:r}),o=kE({collection:e});return{tasks:e.tasks,history:e.history,queue:e.queue,lastSeq:e.lastSeq,bootId:e.bootId,list:e.list,unfinished:e.unfinished,retryable:e.retryable,queuedCount:e.queuedCount,runningCount:e.runningCount,activeTask:e.activeTask,hasActiveRecord:e.hasActiveRecord,upsert:e.upsert,connectionMode:t,drawerOpen:n,lastEventAt:s,lastEventStatus:r,connect:l.connect,disconnect:l.disconnect,loadDetail:o.loadDetail,loadHistory:o.loadHistory,cancel:o.cancel,retry:o.retry,confirmDelete:o.confirmDelete,remove:o.remove}}),CE={class:"bottom-task-bar","data-region":"bottom-task-bar","data-testid":"task-bar"},IE={class:"bottom-task-bar__summary"},DE={class:"badge","data-testid":"task-bar-queued"},PE={class:"badge","data-testid":"task-bar-connection"},NE={class:"bottom-task-bar__current","data-testid":"task-bar-current"},$E=["aria-valuenow"],LE={"data-testid":"task-bar-percent"},ME={key:0,class:"bottom-task-bar__file","data-testid":"task-bar-current-file"},FE={key:1},UE={key:0,class:"bottom-task-bar__metrics","aria-label":"微型指标","data-testid":"task-bar-metrics"},BE={class:"bottom-task-bar__actions"},HE=["disabled"],VE={__name:"BottomTaskBar",setup(e){const t=vo(),n=xe(()=>t.activeTask),s=xe(()=>n.value&&n.value.progress||{}),r=xe(()=>{const f=n.value;if(!f)return"暂无进行中的任务";const c=f.kind==="extract"?"解压":"压缩",d=f.sources&&f.sources[0]?f.sources[0].name:f.archivePath||"";return`${c}中 · ${d}`}),l=xe(()=>t.connectionMode==="connected"?"SSE 已连接":t.connectionMode==="polling"?"轮询降级":"连接中…");async function o(){n.value&&await t.cancel(n.value.id)}const i=Bm(),a=xe(()=>{const f=i.frame&&i.frame.system;return!f||!f.memUsedBytes||!f.memTotalBytes?null:f.memUsedBytes/f.memTotalBytes*100}),u=xe(()=>{const f=i.frame&&i.frame.process||{};return typeof f.eventLoopDelayMs=="number"?`${f.eventLoopDelayMs.toFixed(1)} ms`:"—"});return(f,c)=>(N(),L("footer",CE,[m("div",IE,[m("span",{class:ft(["badge",{"badge--active":Z(t).runningCount>0}]),"data-testid":"task-bar-running"}," 活跃 "+k(Z(t).runningCount),3),m("span",DE,"排队 "+k(Z(t).queuedCount),1),c[1]||(c[1]=m("span",{class:"badge",title:"v1 契约:压缩串行执行;并行开关为占位"},"串行执行",-1)),m("span",PE,k(l.value),1)]),m("div",NE,[n.value?(N(),L(Oe,{key:0},[m("span",{class:ft(["badge",`badge--${Z(Wl)(n.value.status)}`])},k(Z(Wr)(n.value.status)),3),m("span",null,k(r.value),1),m("span",{class:"bottom-task-bar__progress",role:"progressbar","aria-valuenow":s.value.percent||0,"aria-valuemin":"0","aria-valuemax":"100"},[m("span",{class:"progress__bar","data-testid":"task-bar-progress-bar",style:Is({width:`${s.value.percent||0}%`})},null,4)],8,$E),m("span",LE,k(Z(qn)(s.value.percent||0))+" · "+k(s.value.processedFiles||0)+"/"+k(s.value.totalFiles||0)+" · "+k(Z(dt)(s.value.processedBytes||0))+"/"+k(Z(dt)(s.value.totalBytes||0)),1),s.value.currentFile?(N(),L("span",ME,k(s.value.currentFile),1)):be("",!0)],64)):(N(),L("span",FE,"暂无进行中的任务"))]),Z(i).frame?(N(),L("div",UE,[m("span",null,"CPU "+k(Z(qn)(Z(i).frame.system.cpuPercent)),1),m("span",null,"内存 "+k(Z(qn)(a.value)),1),m("span",null,"事件循环 "+k(u.value),1)])):be("",!0),m("div",BE,[m("button",{type:"button",disabled:!n.value,"data-testid":"task-bar-cancel",onClick:o},"取消",8,HE),m("button",{type:"button","data-testid":"task-bar-open-drawer",onClick:c[0]||(c[0]=d=>Z(t).drawerOpen=!0)},"任务")])]))}},jE={class:"drawer drawer--wide",role:"dialog","aria-label":"任务列表"},zE={class:"drawer__header"},GE={class:"badge","data-testid":"drawer-connection"},WE={class:"drawer__body task-drawer__body"},qE={class:"task-drawer__list"},KE=["data-task-id","onClick"],YE={class:"card__desc"},JE={key:0,class:"card__desc"},QE=["data-retryable-id","onClick"],ZE=["data-delete","onClick"],XE=["disabled","data-confirm-delete","onClick"],eS={key:1,class:"card__desc"},tS=["data-history-id","onClick"],nS={class:"card__desc"},sS={key:0,class:"badge","data-history-only":""},rS=["data-delete","onClick"],lS=["disabled","data-confirm-delete","onClick"],oS={key:2,class:"card__desc"},iS={class:"task-drawer__detail","data-testid":"task-detail"},aS={class:"task-drawer__kv"},uS={key:0},cS={key:1},fS={key:2},dS={key:3},pS={key:4},hS={key:5},mS={key:6},gS={key:7},_S={key:8},yS={key:9},vS={class:"task-drawer__actions"},bS=["disabled"],wS=["disabled"],ES=["disabled"],SS=["disabled"],RS={key:1,class:"card__desc"},AS={key:2,class:"login-form__error","data-testid":"detail-error",role:"alert"},TS={__name:"TaskDrawer",setup(e){const t=["done","failed","aborted","interrupted"],n=vo(),s=de(null),r=de(null),l=de(""),o=de(!1),i=de(null),a=xe(()=>n.unfinished),u=xe(()=>n.retryable);function f(D){return!!(D&&t.includes(D.status))}function c(D){return D?D.phase==="waiting_confirm"?"待确认删除":rc[D.phase]||D.phase||"":""}function d(D){return D?D.sources&&D.sources[0]?D.sources[0].name:D.archivePath||D.id.slice(0,8):""}async function h(D){s.value=D,l.value="";try{r.value=await n.loadDetail(D)}catch(_){r.value=null,l.value=`[${_.code||"ERROR"}] ${_.message}`}}async function S(D){if(!(!s.value||o.value)){o.value=!0,l.value="";try{if(D==="cancel"&&await n.cancel(s.value),D==="retry"){const _=await n.retry(s.value);await h(_.id);return}if(D==="confirm-delete"){const _=r.value&&r.value.delete?r.value.delete.targets.length:0;await n.confirmDelete(s.value,_)}await h(s.value)}catch(_){l.value=`[${_.code||"ERROR"}] ${_.message}`}finally{o.value=!1}}}async function R(D){if(!o.value){o.value=!0,l.value="";try{await n.remove(D),i.value=null,s.value===D&&(s.value=null,r.value=null)}catch(_){l.value=`[${_.code||"ERROR"}] ${_.message}`}finally{o.value=!1}}}return wt(()=>n.drawerOpen,D=>{if(!D){i.value=null;return}n.loadHistory(50).catch(()=>{}),!s.value&&n.activeTask&&h(n.activeTask.id)}),(D,_)=>Z(n).drawerOpen?(N(),L("div",{key:0,class:"drawer-backdrop","data-testid":"task-drawer",onClick:_[7]||(_[7]=Bt(g=>Z(n).drawerOpen=!1,["self"]))},[m("section",jE,[m("header",zE,[_[8]||(_[8]=m("h3",null,"任务",-1)),m("span",GE,k(Z(n).connectionMode==="connected"?"SSE 已连接":Z(n).connectionMode==="polling"?"轮询降级":"连接中…"),1),m("button",{type:"button",class:"drawer__close","data-testid":"task-drawer-close",onClick:_[0]||(_[0]=g=>Z(n).drawerOpen=!1)},"关闭")]),m("div",WE,[m("div",qE,[m("h4",null,"进行中("+k(a.value.length)+")",1),(N(!0),L(Oe,null,ht(a.value,g=>(N(),L("div",{key:g.id,class:ft(["task-drawer__row",{"task-drawer__row--active":g.id===s.value}]),"data-task-id":g.id,role:"button",tabindex:"0",onClick:O=>h(g.id)},[m("span",{class:ft(["badge",`badge--${Z(Wl)(g.status)}`])},k(Z(Wr)(g.status)),3),m("span",null,k(d(g)),1),m("span",YE,k(Z(qn)(g.progress.percent||0)),1),_[9]||(_[9]=m("span",{class:"topbar__spacer"},null,-1)),_[10]||(_[10]=m("button",{type:"button",disabled:"",title:"任务未结束,请先取消再删除记录"},"删除",-1))],10,KE))),128)),a.value.length===0?(N(),L("p",JE,"没有进行中的任务。")):be("",!0),m("h4",null,"待重试 / 待清理("+k(u.value.length)+")",1),(N(!0),L(Oe,null,ht(u.value,g=>(N(),L("div",{key:g.id,class:ft(["task-drawer__row",{"task-drawer__row--active":g.id===s.value}]),"data-retryable-id":g.id,role:"button",tabindex:"0",onClick:O=>h(g.id)},[m("span",{class:ft(["badge",`badge--${Z(Wl)(g.status)}`])},k(Z(Wr)(g.status)),3),m("span",null,k(d(g)),1),_[11]||(_[11]=m("span",{class:"topbar__spacer"},null,-1)),i.value!==g.id?(N(),L("button",{key:0,type:"button","data-delete":g.id,onClick:Bt(O=>i.value=g.id,["stop"])}," 删除 ",8,ZE)):(N(),L(Oe,{key:1},[m("button",{type:"button",disabled:o.value,"data-confirm-delete":g.id,onClick:Bt(O=>R(g.id),["stop"])}," 确认删除 ",8,XE),m("button",{type:"button",onClick:_[1]||(_[1]=Bt(O=>i.value=null,["stop"]))},"取消")],64))],10,QE))),128)),u.value.length===0?(N(),L("p",eS,"没有待重试或待清理的记录。")):be("",!0),m("h4",null,"历史("+k(Z(n).history.length)+",最多 200)",1),(N(!0),L(Oe,null,ht(Z(n).history,g=>(N(),L("div",{key:g.id,class:ft(["task-drawer__row",{"task-drawer__row--active":g.id===s.value}]),"data-history-id":g.id,role:"button",tabindex:"0",onClick:O=>h(g.id)},[m("span",{class:ft(["badge",`badge--${Z(Wl)(g.status)}`])},k(Z(Wr)(g.status)),3),m("span",null,k(d(g)),1),m("span",nS,k(Z(Yr)(g.finishedAt||g.createdAt)),1),_[12]||(_[12]=m("span",{class:"topbar__spacer"},null,-1)),Z(n).hasActiveRecord(g.id)?i.value!==g.id?(N(),L("button",{key:1,type:"button","data-delete":g.id,onClick:Bt(O=>i.value=g.id,["stop"])}," 删除 ",8,rS)):(N(),L(Oe,{key:2},[m("button",{type:"button",disabled:o.value,"data-confirm-delete":g.id,onClick:Bt(O=>R(g.id),["stop"])}," 确认删除 ",8,lS),m("button",{type:"button",onClick:_[2]||(_[2]=Bt(O=>i.value=null,["stop"]))},"取消")],64)):(N(),L("span",sS,"仅历史"))],10,tS))),128)),Z(n).history.length===0?(N(),L("p",oS,"暂无历史。")):be("",!0)]),m("div",iS,[r.value?(N(),L(Oe,{key:0},[_[18]||(_[18]=m("h4",null,"详情",-1)),m("dl",aS,[_[13]||(_[13]=m("dt",null,"ID",-1)),m("dd",null,[m("code",null,k(r.value.id),1)]),_[14]||(_[14]=m("dt",null,"类型",-1)),m("dd",null,k(r.value.kind==="extract"?"解压":"压缩")+" · "+k(r.value.format),1),_[15]||(_[15]=m("dt",null,"状态",-1)),m("dd",null,k(Z(Wr)(r.value.status))+" · "+k(c(r.value)),1),_[16]||(_[16]=m("dt",null,"进度",-1)),m("dd",null,k(Z(qn)(r.value.progress.percent||0))+" · "+k(r.value.progress.processedFiles||0)+"/"+k(r.value.progress.totalFiles||0)+" 文件 · "+k(Z(dt)(r.value.progress.processedBytes||0)),1),r.value.progress.speedBps?(N(),L("dt",uS,"速率")):be("",!0),r.value.progress.speedBps?(N(),L("dd",cS,k(Z(dt)(r.value.progress.speedBps))+"/s · 剩余 "+k(r.value.progress.etaSeconds)+"s",1)):be("",!0),_[17]||(_[17]=m("dt",null,"创建",-1)),m("dd",null,k(Z(Yr)(r.value.createdAt)),1),r.value.finishedAt?(N(),L("dt",fS,"结束")):be("",!0),r.value.finishedAt?(N(),L("dd",dS,k(Z(Yr)(r.value.finishedAt)),1)):be("",!0),r.value.retryOf?(N(),L("dt",pS,"重试自")):be("",!0),r.value.retryOf?(N(),L("dd",hS,[m("code",null,k(r.value.retryOf),1)])):be("",!0),r.value.error?(N(),L("dt",mS,"错误")):be("",!0),r.value.error?(N(),L("dd",gS,[m("code",null,k(r.value.error.code),1),ge(" "+k(r.value.error.message),1)])):be("",!0),r.value.result?(N(),L("dt",_S,"产物")):be("",!0),r.value.result?(N(),L("dd",yS,k((r.value.result.packages||[]).map(g=>g.outputPath).join("、")||"—"),1)):be("",!0)]),m("div",vS,[["running","queued","cancelling"].includes(r.value.status)?(N(),L("button",{key:0,type:"button",disabled:o.value,"data-testid":"detail-cancel",onClick:_[3]||(_[3]=g=>S("cancel"))}," 取消任务 ",8,bS)):be("",!0),["failed","interrupted"].includes(r.value.status)?(N(),L("button",{key:1,type:"button",disabled:o.value,"data-testid":"detail-retry",onClick:_[4]||(_[4]=g=>S("retry"))}," 重试(新建任务) ",8,wS)):be("",!0),r.value.phase==="waiting_confirm"?(N(),L("button",{key:2,type:"button",disabled:o.value,"data-testid":"detail-confirm-delete",onClick:_[5]||(_[5]=g=>S("confirm-delete"))}," 确认删除("+k(r.value.delete?r.value.delete.targets.length:0)+" 项) ",9,ES)):be("",!0),f(r.value)?(N(),L("button",{key:3,type:"button",disabled:o.value,"data-testid":"detail-remove",onClick:_[6]||(_[6]=g=>R(r.value.id))}," 删除记录 ",8,SS)):be("",!0)])],64)):(N(),L("p",RS,"从左侧选一个任务查看详情。")),l.value?(N(),L("p",AS,k(l.value),1)):be("",!0)])])])])):be("",!0)}},OS={class:"app-shell"},kS=760,xS={__name:"App",setup(e){const t=vo(),n=Ps();function s(){n.sidebarOpen=window.innerWidth>kS}return Cs(()=>{t.connect(),s(),window.addEventListener("resize",s)}),Si(()=>t.disconnect()),fo(()=>{window.removeEventListener("resize",s)}),(r,l)=>{const o=ly("router-view");return N(),L("div",OS,[je(kw),je(hE),je(wE,null,{default:co(()=>[je(o)]),_:1}),je(VE),je(TS)])}}},CS={key:0,class:"context-menu__divider",role:"separator"},IS=["disabled","data-testid","onClick"],DS={class:"context-menu__label"},PS={key:0,class:"context-menu__shortcut"},Mo=8,NS={__name:"ContextMenu",props:{open:{type:Boolean,default:!1},x:{type:Number,default:0},y:{type:Number,default:0},items:{type:Array,default:()=>[]}},emits:["close","pick"],setup(e,{emit:t}){const n=e,s=t,r=de(null),l=de({left:0,top:0}),o=xe(()=>n.items.filter(Boolean));async function i(){await uo();const c=r.value;if(!c)return;const d=c.getBoundingClientRect(),h=window.innerWidth-d.width-Mo,S=window.innerHeight-d.height-Mo;l.value={left:Math.max(Mo,Math.min(n.x,h)),top:Math.max(Mo,Math.min(n.y,S))}}function a(c){n.open&&(r.value&&r.value.contains(c.target)||s("close"))}function u(c){n.open&&c.key==="Escape"&&(c.stopPropagation(),s("close"))}wt(()=>n.open,c=>{c&&(i(),document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",u,!0))}),Si(()=>{document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",u,!0)});function f(c){c.disabled||c.divider||(s("pick",c.key),s("close"))}return(c,d)=>(N(),Zr(Zp,{to:"body"},[e.open?(N(),L("div",{key:0,ref_key:"menuRef",ref:r,class:"context-menu",role:"menu","data-testid":"context-menu",style:Is({left:`${l.value.left}px`,top:`${l.value.top}px`}),onContextmenu:d[0]||(d[0]=Bt(()=>{},["prevent"]))},[(N(!0),L(Oe,null,ht(o.value,(h,S)=>(N(),L(Oe,{key:h.divider?`divider-${S}`:h.key},[h.divider?(N(),L("div",CS)):(N(),L("button",{key:1,type:"button",class:ft(["context-menu__item",{"context-menu__item--danger":h.danger}]),role:"menuitem",disabled:h.disabled,"data-testid":`menu-item-${h.key}`,onClick:R=>f(h)},[m("span",DS,k(h.label),1),h.shortcut?(N(),L("span",PS,k(h.shortcut),1)):be("",!0)],10,IS))],64))),128))],36)):be("",!0)]))}},$S=["aria-label"],LS={class:"dialog__title"},MS={key:0,class:"dialog__field"},FS={key:1,class:"dialog__text"},US={class:"dialog__footer"},BS=["disabled"],HS=["disabled"],Hm={__name:"PromptDialog",props:{open:{type:Boolean,default:!1},mode:{type:String,default:"prompt"},title:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},danger:{type:Boolean,default:!1},busy:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(e,{emit:t}){const n=e,s=t,r=de(n.value),l=de(null);wt(()=>n.open,async i=>{var a,u;i&&(r.value=n.value,await uo(),n.mode==="prompt"&&l.value&&(l.value.focus(),(u=(a=l.value).select)==null||u.call(a)))});function o(){s("confirm",n.mode==="prompt"?r.value.trim():!0)}return(i,a)=>(N(),Zr(Zp,{to:"body"},[e.open?(N(),L("div",{key:0,class:"dialog-backdrop","data-testid":"prompt-dialog",onClick:a[3]||(a[3]=Bt(u=>s("cancel"),["self"]))},[m("section",{class:"dialog",role:"dialog","aria-modal":"true","aria-label":e.title,onKeydown:a[2]||(a[2]=oi(Bt(u=>s("cancel"),["stop"]),["esc"]))},[m("h3",LS,k(e.title),1),e.mode==="prompt"?(N(),L("label",MS,[m("span",null,k(e.label),1),Tn(m("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":a[0]||(a[0]=u=>r.value=u),type:"text","data-testid":"prompt-input",onKeyup:oi(o,["enter"])},null,544),[[Xs,r.value]])])):(N(),L("p",FS,k(e.label),1)),m("footer",US,[m("button",{type:"button","data-testid":"prompt-cancel",disabled:e.busy,onClick:a[1]||(a[1]=u=>s("cancel"))},"取消",8,BS),m("button",{type:"button",class:ft(["dialog__primary",{"dialog__primary--danger":e.danger}]),"data-testid":"prompt-confirm",disabled:e.busy||e.mode==="prompt"&&r.value.trim().length===0,onClick:o},k(e.busy?"处理中…":"确定"),11,HS)])],40,$S)])):be("",!0)]))}},oc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},VS={key:0,class:"modal-mask","data-testid":"repair-names-dialog"},jS={class:"modal-card"},zS={class:"modal-card__head"},GS={class:"modal-card__hint"},WS={key:0,class:"modal-card__hint","data-testid":"repair-loading"},qS={key:1,class:"modal-card__error","data-testid":"repair-error"},KS={class:"modal-card__stats","data-testid":"repair-stats"},YS={"data-testid":"repair-renamed"},JS={key:0,class:"modal-card__list","data-testid":"repair-candidates"},QS={class:"from"},ZS={class:"to"},XS={key:1,class:"modal-card__hint"},eR={key:2,class:"modal-card__list"},tR={class:"from"},nR={class:"arrow"},sR={class:"modal-card__foot"},rR=["disabled"],lR={__name:"RepairNamesDialog",props:{open:{type:Boolean,default:!1},path:{type:String,default:""},rootId:{type:String,default:""}},emits:["close","renamed"],setup(e,{emit:t}){const n=e,s=t,r=de(!1),l=de(!1),o=de(""),i=de(null);async function a(){r.value=!0,o.value="",i.value=null;try{i.value=await Ge.post("/fs/repair-names",{path:n.path,rootId:n.rootId,dryRun:!0})}catch(f){o.value=`[${f.code||"ERROR"}] ${f.message}`}finally{r.value=!1}}wt(()=>n.open,f=>{f&&a()});async function u(){l.value=!0,o.value="";try{const f=await Ge.post("/fs/repair-names",{path:n.path,rootId:n.rootId,dryRun:!1});i.value=f,f.renamed>0&&s("renamed",f.renamed)}catch(f){o.value=`[${f.code||"ERROR"}] ${f.message}`}finally{l.value=!1}}return(f,c)=>e.open?(N(),L("div",VS,[m("div",jS,[m("header",zS,[c[2]||(c[2]=m("h3",null,"修复乱码文件名",-1)),m("button",{class:"modal-card__close",type:"button","data-testid":"repair-close",onClick:c[0]||(c[0]=d=>s("close"))},"关闭")]),m("p",GS,[c[3]||(c[3]=ge(" 目录:",-1)),m("code",null,k(e.path),1),c[4]||(c[4]=m("br",null,null,-1)),c[5]||(c[5]=ge(" 这些名字是老版引擎把 UTF-8 字节写成「U+FFFE + 私有区字符」造成的,可无损还原;带 ",-1)),c[6]||(c[6]=m("code",null,"?",-1)),c[7]||(c[7]=ge(" 的有损名救不回来,只列清单。 ",-1))]),r.value?(N(),L("p",WS,"正在扫描…")):be("",!0),o.value?(N(),L("p",qS,k(o.value),1)):be("",!0),i.value?(N(),L(Oe,{key:2},[m("ul",KS,[m("li",null,[c[8]||(c[8]=ge("可还原:",-1)),m("b",null,k(i.value.counts.candidates),1)]),m("li",null,[c[9]||(c[9]=ge("已改名:",-1)),m("b",YS,k(i.value.renamed),1)]),m("li",null,[c[10]||(c[10]=ge("撞名跳过:",-1)),m("b",null,k(i.value.counts.conflicts),1)]),m("li",null,[c[11]||(c[11]=ge("不可还原(有损):",-1)),m("b",null,k(i.value.counts.unrecoverable),1)]),m("li",null,"已扫描:"+k(i.value.scanned),1)]),i.value.candidates.length?(N(),L("ul",JS,[(N(!0),L(Oe,null,ht(i.value.candidates.slice(0,8),d=>(N(),L("li",{key:d.from},[m("span",QS,k(d.from),1),c[12]||(c[12]=m("span",{class:"arrow"},"→",-1)),m("span",ZS,k(d.to),1)]))),128))])):(N(),L("p",XS,"没有可还原的名字(或已经修复过了)。")),i.value.unrecoverable.length?(N(),L("ul",eR,[(N(!0),L(Oe,null,ht(i.value.unrecoverable.slice(0,5),d=>(N(),L("li",{key:d.path},[m("span",tR,k(d.path),1),m("span",nR,"不可还原:"+k(d.reason),1)]))),128))])):be("",!0)],64)):be("",!0),m("footer",sR,[m("button",{type:"button",class:"btn","data-testid":"repair-cancel",onClick:c[1]||(c[1]=d=>s("close"))},"取消"),m("button",{type:"button",class:"btn btn--primary","data-testid":"repair-confirm",disabled:l.value||r.value||!i.value||i.value.counts.candidates===0,onClick:u},k(l.value?"执行中…":"确认修复"),9,rR)])])])):be("",!0)}},oR=oc(lR,[["__scopeId","data-v-b8c79d1b"]]),iR={class:"dir-tree","data-testid":"directory-tree"},aR=["data-drop-active"],uR={class:"dir-tree__list"},cR=["aria-label","aria-expanded","data-testid","onClick"],fR=["data-drop-active","data-testid","onClick","onDragover","onDrop"],kl="/",dR={__name:"DirectoryTree",props:{currentPath:{type:String,default:"/"},rootId:{type:String,default:"default"}},emits:["navigate","drop-paths"],setup(e,{emit:t}){const n=e,s=t,r=de(new Map),l=de(null);async function o(c){const d=r.value.get(c);if(!(d&&d.loaded)){r.value.set(c,{...d||{},loading:!0,children:(d==null?void 0:d.children)||[],expanded:!0,loaded:!1});try{const h=await Ge.get("/fs/list",{path:c,sort:"name",order:"asc",rootId:n.rootId}),S=(h&&h.entries||[]).filter(R=>R.type==="dir").map(R=>({path:R.path,name:R.name}));r.value.set(c,{loading:!1,children:S,expanded:!0,loaded:!0})}catch{r.value.set(c,{loading:!1,children:[],expanded:!0,loaded:!1})}}}async function i(c){const d=r.value.get(c);if(d&&d.expanded){r.value.set(c,{...d,expanded:!1});return}await o(c)}const a=xe(()=>{const c=[],d=(h,S)=>{var D,_;const R=r.value.get(h);if(R)for(const g of R.children||[])c.push({...g,depth:S,expanded:!!((D=r.value.get(g.path))!=null&&D.expanded)}),(_=r.value.get(g.path))!=null&&_.expanded&&d(g.path,S+1)};return d(kl,0),c});async function u(c,d){l.value=null;let h=[];try{h=JSON.parse(d.dataTransfer.getData("application/x-zipcalm-paths")||"[]")}catch{h=[]}!Array.isArray(h)||h.length===0||s("drop-paths",{paths:h,targetDir:c})}function f(c,d){d.preventDefault(),l.value=c}return wt(()=>[n.currentPath,n.rootId],async()=>{r.value=new Map,r.value.set(kl,{loading:!1,children:[],expanded:!0,loaded:!1}),await o(kl)}),Cs(()=>{r.value.set(kl,{loading:!1,children:[],expanded:!0}),o(kl)}),(c,d)=>(N(),L("div",iR,[d[5]||(d[5]=m("p",{class:"dir-tree__caption"},"目录树(拖文件到这里可移动)",-1)),m("button",{type:"button",class:ft(["dir-tree__node dir-tree__node--root",{"dir-tree__node--active":e.currentPath==="/"}]),"data-drop-active":l.value==="/","data-testid":"tree-node-root",onClick:d[0]||(d[0]=h=>s("navigate","/")),onDragover:d[1]||(d[1]=h=>f("/",h)),onDragleave:d[2]||(d[2]=h=>l.value=null),onDrop:d[3]||(d[3]=h=>u("/",h))}," / 根目录 ",42,aR),m("ul",uR,[(N(!0),L(Oe,null,ht(a.value,h=>(N(),L("li",{key:h.path,class:"dir-tree__row",style:Is({paddingLeft:`${h.depth*14}px`})},[m("button",{type:"button",class:"dir-tree__toggle","aria-label":`${h.expanded?"收起":"展开"} ${h.name}`,"aria-expanded":h.expanded?"true":"false","data-testid":`tree-toggle-${h.name}`,onClick:Bt(S=>i(h.path),["stop"])},k(h.expanded?"▾":"▸"),9,cR),m("button",{type:"button",class:ft(["dir-tree__node",{"dir-tree__node--active":e.currentPath===h.path}]),"data-drop-active":l.value===h.path,"data-testid":`tree-node-${h.name}`,onClick:S=>s("navigate",h.path),onDragover:S=>f(h.path,S),onDragleave:d[4]||(d[4]=S=>l.value=null),onDrop:S=>u(h.path,S)},k(h.name),43,fR)],4))),128))])]))}},pR={class:"drawer",role:"dialog","aria-label":"压缩设置"},hR={class:"drawer__header"},mR={class:"drawer__body"},gR={class:"card__desc","data-testid":"compress-dest"},_R={class:"field"},yR=["title"],vR=["value","disabled","data-testid"],bR={key:0,class:"badge badge--warn"},wR={class:"field"},ER=["value"],SR={class:"field__hint"},RR={class:"field__option"},AR={class:"field"},TR={class:"field__option"},OR=["title"],kR={class:"badge"},xR={key:1,class:"login-form__error","data-testid":"compress-error",role:"alert"},CR={class:"drawer__footer"},IR=["disabled"],DR={__name:"CompressDrawer",props:{open:{type:Boolean,default:!1},sources:{type:Array,default:()=>[]},rootId:{type:String,default:"default"}},emits:["close","submitted"],setup(e,{emit:t}){const n=e,s=t,r=de([]),l=de("zip"),o=de(Os.SINGLE),i=de(!0),a=de(!0),u=de({count:0,patterns:[],layers:[]}),f=de(0),c=de(!1),d=de(""),h=[Os.SINGLE,Os.BUNDLE],S=xe(()=>n.sources.length>0&&!c.value),R=Ps(),D=de(null);async function _(){const w=f.value+1;if(f.value=w,n.sources.length===0){D.value=null,u.value={count:0,patterns:[],layers:[]};return}try{const T=await Ge.post("/compress/preflight",{sources:n.sources.map(U=>U.path),format:l.value,mode:o.value,rootId:n.rootId,options:{blacklist:{enabled:a.value}}});if(w!==f.value)return;D.value=T||null;const C=T&&T.skipped||[];u.value={count:C.length,patterns:[...new Set(C.map(U=>U.pattern))],layers:[...new Set(C.map(U=>U.layer))]}}catch{w===f.value&&(D.value=null,u.value={count:0,patterns:[],layers:[]})}}const g=xe(()=>{const w=D.value&&D.value.hardlinks;return!w||!w.groups?null:w.preservedByFormat?{tone:"ok",groups:w.groups,files:w.files,savedText:w.duplicateBytes>0?dt(w.duplicateBytes):null}:w.hint?{tone:"info",groups:w.groups,files:w.files,estimatedText:dt(w.estimatedBytes),tarEstimatedText:dt(Math.max(0,w.logicalBytes-w.duplicateBytes)),savedText:dt(w.duplicateBytes)}:null});wt(()=>n.open,async w=>{if(w){d.value="";try{const T=await Ge.get("/formats");r.value=(T&&T.formats||[]).filter(U=>U.extractOnly!==!0);const C=r.value.find(U=>U.available);C&&(l.value=C.id)}catch(T){d.value=`[${T.code||"ERROR"}] ${T.message}`}await _()}}),wt(()=>n.sources,()=>{_()}),wt(a,()=>{_()}),wt(l,()=>{_()});async function O(){if(S.value){c.value=!0,d.value="";try{const w=await Ge.post("/compress/tasks",{sources:n.sources.map(T=>T.path),rootId:n.rootId,mode:o.value,format:l.value,options:{keepOriginal:i.value,blacklist:{enabled:a.value}}});s("submitted",w.task.id)}catch(w){d.value=`[${w.code||"ERROR"}] ${w.message}`}finally{c.value=!1}}}return(w,T)=>e.open?(N(),L("div",{key:0,class:"drawer-backdrop","data-testid":"compress-drawer",onClick:T[5]||(T[5]=Bt(C=>s("close"),["self"]))},[m("section",pR,[m("header",hR,[T[6]||(T[6]=m("h3",null,"压缩设置",-1)),m("button",{type:"button",class:"drawer__close","data-testid":"compress-close",onClick:T[0]||(T[0]=C=>s("close"))},"关闭")]),m("div",mR,[m("p",gR," 已选 "+k(e.sources.length)+" 项 · 产物将保存到「"+k(Z(R).currentRootLabel)+"」的 "+k(Z(R).currentDirLabel),1),m("fieldset",_R,[T[7]||(T[7]=m("legend",null,"格式",-1)),(N(!0),L(Oe,null,ht(r.value,C=>(N(),L("label",{key:C.id,class:"field__option",title:C.available?`${C.mime}`:C.unavailableReason||"不可用"},[Tn(m("input",{"onUpdate:modelValue":T[1]||(T[1]=U=>l.value=U),type:"radio",name:"format",value:C.id,disabled:!C.available,"data-testid":`format-${C.id}`},null,8,vR),[[Cf,l.value]]),m("span",null,[ge(k(C.name)+" ",1),m("code",null,k(C.ext),1)]),C.available?be("",!0):(N(),L("span",bR,k(C.unavailableReason||"不可用"),1))],8,yR))),128))]),g.value?(N(),L("p",{key:0,class:ft(["drawer__hardlink-hint",`drawer__hardlink-hint--${g.value.tone}`]),"data-testid":"hardlink-hint"},[g.value.tone==="ok"?(N(),L(Oe,{key:0},[T[9]||(T[9]=ge(" 已检测到 ",-1)),m("b",null,k(g.value.groups),1),T[10]||(T[10]=ge(" 组硬链接(共 ",-1)),m("b",null,k(g.value.files),1),T[11]||(T[11]=ge(" 个文件):当前格式会保留硬链接,同一份数据只存一份",-1)),g.value.savedText?(N(),L(Oe,{key:0},[T[8]||(T[8]=ge(",比各存一份省 ",-1)),m("b",null,k(g.value.savedText),1)],64)):be("",!0),T[12]||(T[12]=ge("。 ",-1))],64)):(N(),L(Oe,{key:1},[T[13]||(T[13]=ge(" 检测到 ",-1)),m("b",null,k(g.value.groups),1),T[14]||(T[14]=ge(" 组硬链接(共 ",-1)),m("b",null,k(g.value.files),1),T[15]||(T[15]=ge(" 个文件):",-1)),m("b",null,k(l.value.toUpperCase()),1),T[16]||(T[16]=ge(" 不支持硬链接,同一份数据会各存一份,预计产出 ",-1)),m("b",null,k(g.value.estimatedText),1),T[17]||(T[17]=ge(";改用 TAR 只存一份,约 ",-1)),m("b",null,k(g.value.tarEstimatedText),1),T[18]||(T[18]=ge("(省 ",-1)),m("b",null,k(g.value.savedText),1),T[19]||(T[19]=ge(")。 ",-1))],64))],2)):be("",!0),m("fieldset",wR,[T[20]||(T[20]=m("legend",null,"压缩方式",-1)),(N(),L(Oe,null,ht(h,C=>m("label",{key:C,class:"field__option"},[Tn(m("input",{"onUpdate:modelValue":T[2]||(T[2]=U=>o.value=U),type:"radio",name:"mode",value:C},null,8,ER),[[Cf,o.value]]),m("span",null,k(Z(Cm)[C]),1)])),64)),m("p",SR,k(Z(uw)[o.value]),1)]),m("label",RR,[Tn(m("input",{"onUpdate:modelValue":T[3]||(T[3]=C=>i.value=C),type:"checkbox","data-testid":"keep-original"},null,512),[[iu,i.value]]),T[21]||(T[21]=m("span",null,[ge("保留原文件(推荐;不勾选则在"),m("b",null,"校验通过后"),ge("按 delete.mode 处理)")],-1))]),m("fieldset",AR,[T[24]||(T[24]=m("legend",null,"黑名单",-1)),m("label",TR,[Tn(m("input",{"onUpdate:modelValue":T[4]||(T[4]=C=>a.value=C),type:"checkbox","data-testid":"blacklist-enabled"},null,512),[[iu,a.value]]),T[22]||(T[22]=m("span",null,"启用黑名单(跳过系统垃圾与你自定义规则命中的文件)",-1))]),T[25]||(T[25]=m("p",{class:"field__hint"},[ge(" 默认开启;"),m("b",null,"重启服务后恢复默认"),ge("(关掉全局保护是临时决定,不该被静默记住)。 ")],-1)),a.value&&u.value.count>0?(N(),L("p",{key:0,class:"field__hint","data-testid":"blacklist-skip-hint",title:`命中规则:${u.value.patterns.join("、")}(层:${u.value.layers.join("、")})`},[m("span",kR,k(u.value.count)+" 个文件已跳过(命中黑名单规则)",1),T[23]||(T[23]=ge(" 这些文件不会进压缩包,也不会被「删除原文件」删掉。 ",-1))],8,OR)):be("",!0)]),d.value?(N(),L("p",xR,k(d.value),1)):be("",!0)]),m("footer",CR,[m("button",{type:"button",class:"login-form__submit",disabled:!S.value,"data-testid":"compress-submit",onClick:O},k(c.value?"提交中…":"开始压缩"),9,IR)])])])):be("",!0)}},PR={class:"drawer",role:"dialog","aria-label":"解压设置"},NR={class:"drawer__header"},$R={class:"drawer__body"},LR={class:"card__desc"},MR={key:0,class:"card__desc"},FR={class:"badge","data-testid":"extract-format"},UR={key:1,class:"field__label",for:"extract-password"},BR={class:"field__option"},HR={key:3,class:"login-form__error","data-testid":"extract-error",role:"alert"},VR={class:"drawer__footer"},jR=["disabled"],zR={__name:"ExtractDialog",props:{open:{type:Boolean,default:!1},archivePath:{type:String,default:""},rootId:{type:String,default:"default"}},emits:["close","submitted"],setup(e,{emit:t}){const n=e,s=t,r=de(""),l=de(!1),o=de(!1),i=de(""),a=de(null),u=de(!1),f=de("");wt(()=>n.open,async d=>{if(a.value=null,i.value="",u.value=!1,f.value="",!!d)try{const h=await Ge.post("/extract/preflight",{path:n.archivePath,rootId:n.rootId});a.value=h,h&&h.targetDir&&(r.value=h.targetDir),h&&h.encrypted&&(u.value=!0)}catch(h){if(h.code==="MISSING_PASSWORD"){u.value=!0;return}i.value=`[${h.code||"ERROR"}] ${h.message}`}});async function c(){if(!o.value){o.value=!0,i.value="";try{const d=await Ge.post("/extract/tasks",{rootId:n.rootId,path:n.archivePath,targetDir:r.value||void 0,options:{deleteArchiveAfterExtract:l.value,...u.value&&f.value?{password:f.value}:{}}});s("submitted",d.task.id)}catch(d){d.code==="MISSING_PASSWORD"?(u.value=!0,i.value="该压缩包已加密,请输入密码"):d.code==="BAD_PASSWORD"?i.value="密码错误":i.value=`[${d.code||"ERROR"}] ${d.message}`}finally{o.value=!1}}}return(d,h)=>e.open?(N(),L("div",{key:0,class:"drawer-backdrop","data-testid":"extract-dialog",onClick:h[4]||(h[4]=Bt(S=>s("close"),["self"]))},[m("section",PR,[m("header",NR,[h[5]||(h[5]=m("h3",null,"解压",-1)),m("button",{type:"button",class:"drawer__close","data-testid":"extract-close",onClick:h[0]||(h[0]=S=>s("close"))},"关闭")]),m("div",$R,[m("p",LR,[h[6]||(h[6]=ge("压缩包:",-1)),m("code",null,k(e.archivePath),1)]),a.value?(N(),L("p",MR,[h[7]||(h[7]=ge(" 识别格式:",-1)),m("span",FR,k(a.value.formatName||a.value.format||"未知"),1),ge(" · 内含 "+k(a.value.entries)+" 个条目,解压后约 "+k(a.value.totalBytes)+" 字节 ",1)])):be("",!0),h[9]||(h[9]=m("label",{class:"field__label",for:"extract-target"},"目标目录",-1)),Tn(m("input",{id:"extract-target","onUpdate:modelValue":h[1]||(h[1]=S=>r.value=S),type:"text","data-testid":"extract-target",placeholder:"/目录名"},null,512),[[Xs,r.value]]),u.value?(N(),L("label",UR," 解压密码(该压缩包已加密) ")):be("",!0),u.value?Tn((N(),L("input",{key:2,id:"extract-password","onUpdate:modelValue":h[2]||(h[2]=S=>f.value=S),type:"password","data-testid":"extract-password",autocomplete:"off"},null,512)),[[Xs,f.value]]):be("",!0),m("label",BR,[Tn(m("input",{"onUpdate:modelValue":h[3]||(h[3]=S=>l.value=S),type:"checkbox","data-testid":"delete-archive"},null,512),[[iu,l.value]]),h[8]||(h[8]=m("span",null,"解压后删除压缩包(先校验通过,再按 delete.mode 处理)",-1))]),i.value?(N(),L("p",HR,k(i.value),1)):be("",!0)]),m("footer",VR,[m("button",{type:"button",class:"login-form__submit",disabled:o.value,"data-testid":"extract-submit",onClick:c},k(o.value?"提交中…":"开始解压"),9,jR)])])])):be("",!0)}},GR={key:0,class:"card task-panel","data-testid":"task-panel"},WR={class:"task-panel__head"},qR={class:"progress"},KR={class:"card__desc","data-testid":"task-progress-text"},YR={key:0,class:"card__desc","data-testid":"task-current-file"},JR={key:1,class:"card__desc","data-testid":"task-result"},QR={key:2,class:"card__desc","data-testid":"task-delete-state"},ZR={key:3,class:"task-panel__confirm","data-testid":"task-waiting-confirm"},XR=["disabled"],eA={key:4,class:"login-form__error","data-testid":"task-error",role:"alert"},tA={key:1,class:"login-form__error",role:"alert"},nA={__name:"TaskProgress",props:{taskId:{type:String,default:null}},emits:["finished","dismiss"],setup(e,{emit:t}){const n=e,s=t,r=vo(),l=de(""),o=de(!1),i=de(null),a=xe(()=>n.taskId&&r.tasks.get(n.taskId)||null),u=xe(()=>a.value&&a.value.progress||{}),f=xe(()=>!!(a.value&&["done","failed","aborted","interrupted"].includes(a.value.status))),c=xe(()=>a.value?a.value.phase==="waiting_confirm"?"待确认删除":rc[a.value.phase]||a.value.phase||"":""),d=xe(()=>a.value?Wl(a.value.status):"muted"),h=xe(()=>a.value&&a.value.delete&&a.value.delete.targets?a.value.delete.targets.length:0);wt(()=>n.taskId,async R=>{if(l.value="",i.value=null,!!R)try{await r.loadDetail(R)}catch(D){l.value=`[${D.code||"ERROR"}] ${D.message}`}},{immediate:!0}),wt(f,R=>{R&&a.value&&i.value!==a.value.id+a.value.status&&(i.value=a.value.id+a.value.status,s("finished",a.value))});async function S(){if(!(o.value||!n.taskId)){o.value=!0,l.value="";try{await r.confirmDelete(n.taskId,h.value),await r.loadDetail(n.taskId)}catch(R){l.value=`[${R.code||"ERROR"}] ${R.message}`}finally{o.value=!1}}}return(R,D)=>e.taskId?(N(),L("section",GR,[m("div",WR,[m("strong",null,k(a.value?a.value.kind==="extract"?"解压任务":"压缩任务":"任务"),1),a.value?(N(),L("span",{key:0,class:ft(["badge",`badge--${d.value}`]),"data-testid":"task-status"},[ge(k(Z(Wr)(a.value.status)),1),f.value?be("",!0):(N(),L(Oe,{key:0},[ge(" · "+k(c.value),1)],64))],2)):be("",!0),D[1]||(D[1]=m("span",{class:"topbar__spacer"},null,-1)),m("button",{type:"button","data-testid":"task-dismiss",onClick:D[0]||(D[0]=_=>s("dismiss"))},"收起")]),a.value?(N(),L(Oe,{key:0},[m("div",qR,[m("div",{class:"progress__bar","data-testid":"task-progress-bar",style:Is({width:`${u.value.percent||0}%`})},null,4)]),m("p",KR,[ge(k(Z(qn)(u.value.percent||0))+" · "+k(u.value.processedFiles||0)+"/"+k(u.value.totalFiles||0)+" 个文件 · "+k(Z(dt)(u.value.processedBytes||0))+"/"+k(Z(dt)(u.value.totalBytes||0))+" ",1),u.value.speedBps?(N(),L(Oe,{key:0},[ge("· "+k(Z(dt)(u.value.speedBps))+"/s",1),u.value.etaSeconds?(N(),L(Oe,{key:0},[ge(" · 剩余 "+k(u.value.etaSeconds)+"s",1)],64)):be("",!0)],64)):be("",!0)]),u.value.currentFile?(N(),L("p",YR," 当前:"+k(u.value.currentFile),1)):be("",!0),a.value.status==="done"&&a.value.result?(N(),L("p",JR,[a.value.kind==="compress"?(N(),L(Oe,{key:0},[ge(" 产物:"+k((a.value.result.packages||[]).map(_=>_.outputPath).join("、")||"—")+" (校验 "+k((a.value.result.packages||[]).every(_=>_.verified)?"通过":"未通过")+") ",1)],64)):(N(),L(Oe,{key:1},[ge(" 解压到:"+k(a.value.targetDir)+"("+k(a.value.result.entries||0)+" 个条目,校验通过) ",1)],64))])):be("",!0),a.value.delete?(N(),L("p",QR," 删除状态:"+k(a.value.delete.status)+"(目标 "+k(h.value)+" 项) ",1)):be("",!0),a.value.phase==="waiting_confirm"?(N(),L("div",ZR,[m("span",null,"需确认删除 "+k(h.value)+" 项",1),m("button",{type:"button",disabled:o.value,"data-testid":"confirm-delete",onClick:S},k(o.value?"提交中…":"确认删除"),9,XR)])):be("",!0),a.value.error?(N(),L("p",eA," ["+k(a.value.error.code)+"] "+k(a.value.error.message),1)):be("",!0)],64)):be("",!0),l.value?(N(),L("p",tA,k(l.value),1)):be("",!0)])):be("",!0)}},sA={class:"file-browser__toolbar"},rA=["disabled"],lA={class:"file-browser__crumbs","aria-label":"面包屑","data-testid":"files-breadcrumb"},oA=["title"],iA={key:0,"aria-hidden":"true"},aA=["aria-current","onClick"],uA={key:0,class:"badge","data-testid":"selection-count"},cA=["disabled","title"],fA=["disabled"],dA=["disabled"],pA={class:"file-browser__split"},hA={class:"file-browser__tree-pane"},mA={class:"file-browser__content"},gA={key:0,class:"search-panel","data-testid":"search-panel"},_A={class:"file-browser__hint","data-testid":"search-summary"},yA={key:0,class:"login-form__error",role:"alert"},vA={key:1,class:"file-browser__empty","data-testid":"search-empty"},bA={key:2,class:"file-table","data-testid":"search-table"},wA=["data-name","data-type","onClick"],EA={class:"file-table__name"},SA={class:"file-table__col-type"},RA={class:"file-table__size"},AA={class:"file-table__mtime"},TA={class:"file-table__mtime"},OA={key:0,class:"file-browser__hint","data-testid":"action-notice"},kA={key:1,class:"login-form__error",role:"alert","data-testid":"action-error"},xA={key:2,class:"file-browser__hint","data-testid":"files-loading"},CA={key:3,class:"file-browser__error","data-testid":"files-error",role:"alert"},IA={class:"badge badge--error"},DA={key:0,class:"card__desc","data-testid":"roots-error-hint"},PA={key:1,class:"file-browser__permission","data-testid":"root-hint"},NA={key:4,class:"file-browser__empty","data-testid":"files-empty"},$A={class:"card__desc"},LA={key:5,class:"file-table","data-testid":"files-table"},MA={scope:"col"},FA={scope:"col"},UA={scope:"col"},BA=["data-name","data-type","onClick","onContextmenu","onPointerdown","onDragstart"],HA=["checked","aria-label","data-select","onChange"],VA={class:"file-table__name"},jA=["title"],zA={class:"file-table__col-type"},GA={class:"file-table__size"},WA={class:"file-table__mtime"},qA={key:6,class:"file-grid","data-testid":"files-grid"},KA=["data-name","data-type","onClick","onContextmenu","onPointerdown"],YA={class:"file-card__icon"},JA=["title"],QA={class:"file-card__meta"},ZA={key:0,class:"badge"},XA={key:7,class:"file-browser__hint"},eT=500,tT=3e3,nT={__name:"FilesPage",setup(e){const t=Kh(),n=Di(),s=de("loading"),r=de([]),l=de({path:"/",parent:null,total:0,truncated:!1}),o=de(null),i=de("name"),a=de("asc"),u=de(new Map),f=de(!1),c=de(""),d=de(!1),h=de(null),S=vo(),R=Ps(),D=de(null),_=de({open:!1,x:0,y:0,target:null}),g=de({open:!1,mode:"prompt",title:"",label:"",value:"",danger:!1,busy:!1,submit:null}),O=de(-1),w=de([]),T=de(!1),C=de(""),U=de(!1);let j=null;function ee(){const $=typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches;U.value=$||window.innerWidth<760}function le(){U.value&&R.viewMode===Rs.LIST&&R.setViewMode(Rs.GRID)}const z=de(""),ke=xe(()=>h.value||(S.activeTask?S.activeTask.id:null)),we=xe(()=>R.searchQuery.trim().length>0),te=xe(()=>R.searchState&&R.searchState.items||[]),W=de("");function q($){const F=String($||"").split("/").slice(0,-1).join("/");return F.length===0?"/":F}function H($){if(R.clearSearch(),$.type==="dir"){B($.path);return}W.value=$.path,B(q($.path))}const Q=xe(()=>R.currentRootId),me=xe(()=>{const $=t.query.path;return typeof $=="string"&&$.length>0?$:"/"}),_e=xe(()=>$m(me.value)),Ee=xe(()=>hw(me.value)),oe=xe(()=>[...u.value.values()]),pe=xe(()=>oe.value.length>0),$e=de([]);async function He(){try{const $=await Ge.get("/formats"),F=[];for(const G of $&&$.formats||[])for(const Ke of[G.ext,...G.extAliases||[]])typeof Ke=="string"&&Ke.startsWith(".")&&F.push(Ke.toLowerCase());$e.value=[...new Set(F)].sort((G,Ke)=>Ke.length-G.length)}catch{$e.value=[]}}function Me($){const F=String($||"").toLowerCase();return $e.value.some(G=>F.endsWith(G))}const M=xe(()=>{const $=oe.value;if($.length!==1)return null;const F=$[0];return F.type==="file"&&Me(F.name)?F:null});function fe($){r.value=Array.isArray($&&$.entries)?$.entries:[],l.value={path:$&&$.path||me.value,parent:$&&typeof $.parent=="string"?$.parent:null,total:$&&Number.isInteger($.total)?$.total:r.value.length,truncated:!!($&&$.truncated)},O.value=-1;const F=$&&typeof $.path=="string"?$.path:me.value;if(W.value&&F===q(W.value)){const G=r.value.find(Ke=>Ke.path===W.value);W.value="",G&&(Rt(G),O.value=r.value.indexOf(G))}}function ae($){o.value={code:$&&$.code||"INTERNAL_ERROR",message:$&&$.message||"加载目录失败"},r.value=[],s.value="error"}async function he(){try{const $=await Ge.get("/health");R.setRuntime($&&$.runtime)}catch{}}const v=xe(()=>R.runtimeUser&&R.runtimeUid!==null?`${R.runtimeUser}(uid=${R.runtimeUid})`:R.runtimeUser?R.runtimeUser:R.runtimeUid!==null?`uid=${R.runtimeUid}`:"未知用户");async function A(){if(R.rootsReady)return!0;const $=Date.now()+tT;for(;Date.now()<$;)if(await new Promise(F=>{window.setTimeout(F,50)}),R.rootsReady)return!0;return!1}async function x(){s.value="loading",o.value=null,await A();const $=Q.value;try{fe(await Ge.get("/fs/list",{path:me.value,sort:i.value,order:a.value,rootId:Q.value})),s.value="ready"}catch(F){if(Q.value!==$){x();return}F&&F.code==="PERMISSION_DENIED"&&he(),ae(F)}}wt(me,()=>{u.value=new Map,x()},{immediate:!0}),Cs(He);function B($){const F=typeof $=="string"&&$.length>0?$:"/";n.push(F==="/"?{path:vt.FILES}:{path:vt.FILES,query:{path:F}})}function K($){$.type==="dir"&&B($.path)}function X($){i.value===$?a.value=a.value==="asc"?"desc":"asc":(i.value=$,a.value="asc"),x()}function se($){return i.value!==$?"":a.value==="asc"?"↑":"↓"}function J($){const F=new Map(u.value);F.has($.path)?F.delete($.path):F.set($.path,$),u.value=F}function re($){return u.value.has($.path)}function Y($){f.value=!1,d.value=!1,h.value=$}function Ae(){h.value=null}function ye(){x()}function Ie($){return $.type==="dir"?"目录":$.type==="symlink"?"链接":($.extension||"").replace(".","").toUpperCase()||"文件"}function ce($){return $.type==="dir"?"files":"file"}function ie($,F){F&&!re(F)&&(u.value=new Map([[F.path,F]])),_.value={open:!0,x:$.clientX,y:$.clientY,target:F}}const Pe=xe(()=>_.value.target),Fe=xe(()=>{const $=Pe.value,F=u.value.size,G=[];return $?(G.push({key:"compress",label:F>1?`压缩选中的 ${F} 项`:"压缩"}),$.type==="dir"&&G.push({key:"enter",label:"进入目录"}),$.type==="dir"&&G.push({key:"repair-names",label:"修复乱码文件名"}),$.type==="file"&&Me($.name)&&G.push({key:"extract",label:"解压"}),G.push({divider:!0}),G.push({key:"rename",label:"重命名",shortcut:"F2",disabled:F>1}),G.push({key:"move",label:"移动到…",disabled:F===0}),G.push({key:"copy-path",label:"复制路径"}),G.push({divider:!0}),G.push({key:"delete",label:`删除${F>1?` ${F} 项`:""}`,shortcut:"Delete",danger:!0}),G):(G.push({key:"compress",label:F>0?`压缩选中的 ${F} 项`:"压缩",disabled:F===0}),G.push({key:"select-all",label:"全选",shortcut:"Ctrl+A"}),G.push({key:"mkdir",label:"新建文件夹"}),G.push({divider:!0}),G.push({key:"reload",label:"刷新"}),G)});function st(){c.value="",x()}const ot={compress:()=>{u.value.size>0&&(f.value=!0)},extract:$=>{$&&Rt($),d.value=!0},enter:$=>{$&&B($.path)},"repair-names":$=>{$&&(c.value=$.path)},rename:$=>{$&&sr($)},move:()=>bo(),"copy-path":$=>{ms($)},delete:()=>an(),"select-all":()=>Tt(),mkdir:()=>pl(),reload:()=>{x()}};function St($){const F=ot[$];typeof F=="function"&&F(Pe.value)}function Rt($){u.value=new Map([[$.path,$]])}function Tt(){u.value=new Map(r.value.map($=>[$.path,$]))}function Dt(){u.value=new Map}function qe($){g.value={open:!0,mode:"prompt",title:"",label:"",value:"",danger:!1,busy:!1,...$}}function it(){g.value={...g.value,open:!1,busy:!1}}async function $s($){const F=g.value.submit;if(!F){it();return}g.value={...g.value,busy:!0};try{await F($),it()}catch(G){z.value=`[${G.code||"ERROR"}] ${G.message}`,g.value={...g.value,busy:!1}}}function on($){z.value="",C.value=$,window.setTimeout(()=>{C.value=""},2500)}function Zn($){C.value="",z.value=`[${$.code||"ERROR"}] ${$.message}`}async function ms($){if($)try{if(navigator.clipboard&&navigator.clipboard.writeText&&window.isSecureContext){await navigator.clipboard.writeText($.path),on(`已复制:${$.path}`);return}const F=document.createElement("textarea");F.value=$.path,F.setAttribute("readonly","readonly"),F.style.position="fixed",F.style.opacity="0",document.body.appendChild(F),F.select();const G=document.execCommand&&document.execCommand("copy");if(document.body.removeChild(F),!G)throw new Error("复制失败(浏览器不允许剪贴板操作)");on(`已复制:${$.path}`)}catch(F){Zn(F)}}function sr($){qe({title:"重命名",label:"新名称(不能包含 / )",value:$.name,submit:async F=>{F!==$.name&&(await Ge.post("/fs/rename",{path:$.path,newName:F,rootId:Q.value}),on(`已重命名为 ${F}`),await x())}})}function an(){const $=oe.value;if($.length===0)return;const F=$.length===1?$[0].path:`${$[0].path} 等 ${$.length} 项`;qe({mode:"confirm",title:"删除",label:`将把 ${F} 移入回收站(可在 storage/trash 恢复)。确定删除?`,danger:!0,submit:async()=>{const G=await Ge.post("/fs/delete",{paths:$.map(Ot=>Ot.path),rootId:Q.value}),Ke=G&&G.deleted&&G.deleted.length||0;on(`已移入回收站:${Ke} 项`),Dt(),await x()}})}function pl(){qe({title:"新建文件夹",label:"文件夹名称",value:"",submit:async $=>{const F=me.value==="/"?"":me.value;await Ge.post("/fs/mkdir",{path:`${F}/${$}`,rootId:Q.value}),on(`已创建 ${$}`),await x()}})}function bo(){const $=oe.value;$.length!==0&&qe({title:"移动到",label:"目标目录(例如 /备份/2024)",value:me.value,submit:async F=>{const G=await Ge.post("/fs/move",{paths:$.map(Ot=>Ot.path),targetDir:F,rootId:Q.value}),Ke=G&&G.moved&&G.moved.length||0;on(`已移动 ${Ke} 项到 ${F}`),Dt(),await x()}})}async function Ki({paths:$,targetDir:F}){try{const G=await Ge.post("/fs/move",{paths:$,targetDir:F,rootId:Q.value});on(`已移动 ${G&&G.moved&&G.moved.length||0} 项到 ${F}`),Dt(),await x()}catch(G){Zn(G)}}function Bn(){j&&(clearTimeout(j),j=null)}function wo($,F){if(!U.value)return;Bn();const{clientX:G,clientY:Ke}=F;j=window.setTimeout(()=>{if(j=null,re($)){const Ot=new Map(u.value);Ot.delete($.path),u.value=Ot}else Rt($);_.value={open:!0,x:G,y:Ke,target:$}},eT)}function Eo($){if(Bn(),U.value&&u.value.size>0){J($);return}K($)}function Yi($){if(!$)return!1;const F=$.tagName?$.tagName.toLowerCase():"";return F==="input"||F==="textarea"||$.isContentEditable===!0}function gs($){if(r.value.length===0)return;const F=Math.max(0,Math.min(r.value.length-1,O.value+$));O.value=F;const G=r.value[F];G&&!re(G)&&Rt(G);const Ke=D.value?D.value.querySelector(`tr[data-name="${CSS.escape(G.name)}"]`):null;Ke&&Ke.scrollIntoView&&Ke.scrollIntoView({block:"nearest"})}function Vt(){return oe.value.length>0?oe.value:O.value>=0?[r.value[O.value]].filter(Boolean):[]}function wn($){if(Yi($.target))return;if(g.value.open){$.key==="Escape"&&it();return}if(_.value.open){$.key==="Escape"&&(_.value={..._.value,open:!1});return}if(($.ctrlKey||$.metaKey)&&$.key.toLowerCase()==="a"){$.preventDefault(),Tt();return}if($.key==="ArrowDown"||$.key==="ArrowUp"){$.preventDefault(),gs($.key==="ArrowDown"?1:-1);return}if($.key==="Enter"){const G=Vt();G.length===1&&($.preventDefault(),G[0].type==="dir"?B(G[0].path):Me(G[0].name)?d.value=!0:f.value=!0);return}if($.key==="F2"){const Ke=(O.value>=0?r.value[O.value]:null)||(oe.value.length===1?oe.value[0]:null);Ke&&($.preventDefault(),sr(Ke));return}if($.key==="Delete"||$.key==="Backspace"){u.value.size>0&&($.preventDefault(),an());return}$.key==="Escape"&&Dt()}function Ls($,F){const G=re($)?oe.value.map(Ke=>Ke.path):[$.path];w.value=G,F.dataTransfer.setData("application/x-zipcalm-paths",JSON.stringify(G)),F.dataTransfer.setData("text/plain",G.join(`
|
|
129
|
+
`)),F.dataTransfer.effectAllowed="move"}function Ms(){w.value=[],T.value=!1}function yn($){$.preventDefault(),T.value=!1;try{const F=JSON.parse($.dataTransfer.getData("application/x-zipcalm-paths")||"[]");if(!Array.isArray(F)||F.length===0)return;u.value=new Map(r.value.filter(G=>F.includes(G.path)).map(G=>[G.path,G])),u.value.size>0&&(f.value=!0)}catch(F){Zn(F)}}return wt(()=>R.searchQuery,($,F)=>{F&&!$&&x()}),wt(Q,()=>{Dt(),O.value=-1,me.value!=="/"?B("/"):x()}),Cs(()=>{he(),window.addEventListener("keydown",wn),ee(),le(),window.addEventListener("resize",ee)}),fo(()=>{window.removeEventListener("keydown",wn),window.removeEventListener("resize",ee),Bn()}),($,F)=>(N(),L(Oe,null,[m("section",{ref_key:"rootRef",ref:D,class:"card file-browser","data-testid":"files-page",onContextmenu:F[10]||(F[10]=Bt(G=>ie(G,null),["prevent"]))},[m("div",sA,[m("button",{type:"button","data-testid":"go-up",disabled:!Ee.value,onClick:F[0]||(F[0]=G=>B(Ee.value))},"← 上级",8,rA),m("nav",lA,[m("button",{type:"button",class:"file-browser__crumb file-browser__crumb--root","data-testid":"crumb-root",title:`当前存储位置:${Z(R).currentRootLabel}(点它回到该位置根目录)`,onClick:F[1]||(F[1]=G=>B("/"))},k(Z(R).currentRootLabel),9,oA),F[16]||(F[16]=m("span",{"aria-hidden":"true"},"/",-1)),(N(!0),L(Oe,null,ht(_e.value,(G,Ke)=>(N(),L(Oe,{key:G.path},[Ke>0?(N(),L("span",iA,"/")):be("",!0),m("button",{type:"button",class:"file-browser__crumb","aria-current":Ke===_e.value.length-1?"page":void 0,onClick:Ot=>B(G.path)},k(G.label),9,aA)],64))),128))]),F[17]||(F[17]=m("div",{class:"topbar__spacer"},null,-1)),oe.value.length>0?(N(),L("span",uA,"已选 "+k(oe.value.length)+" 项",1)):be("",!0),m("button",{type:"button",disabled:!pe.value,class:ft({"drop-target":T.value}),"data-testid":"open-compress",title:pe.value?"压缩选中项(也可把文件拖到此处)":"先选中文件,或把文件拖到此处",onClick:F[2]||(F[2]=G=>f.value=!0),onDragover:F[3]||(F[3]=Bt(G=>T.value=!0,["prevent"])),onDragleave:F[4]||(F[4]=G=>T.value=!1),onDrop:yn},"压缩",42,cA),m("button",{type:"button",disabled:!M.value,"data-testid":"open-extract",onClick:F[5]||(F[5]=G=>d.value=!0)},"解压",8,fA),m("button",{type:"button","data-testid":"reload",disabled:s.value==="loading",onClick:x},"刷新",8,dA)]),m("div",pA,[m("aside",hA,[je(dR,{"current-path":me.value,"root-id":Q.value,onNavigate:B,onDropPaths:Ki},null,8,["current-path","root-id"])]),m("div",mA,[we.value?(N(),L("div",gA,[m("p",_A,[F[18]||(F[18]=ge(" 搜索「",-1)),m("strong",null,k(Z(R).searchQuery),1),F[19]||(F[19]=ge("」· ",-1)),Z(R).searchState.running?(N(),L(Oe,{key:0},[ge("搜索中…")],64)):(N(),L(Oe,{key:1},[ge(k(te.value.length)+" 项",1),Z(R).searchState.truncated?(N(),L(Oe,{key:0},[ge("(已达上限,结果被截断)")],64)):be("",!0),ge(" · "+k(Z(R).searchState.elapsedMs)+"ms · 扫描 "+k(Z(R).searchState.scannedDirs)+" 个目录 ",1)],64))]),Z(R).searchState.error?(N(),L("p",yA,k(Z(R).searchState.error),1)):!Z(R).searchState.running&&te.value.length===0?(N(),L("div",vA,[...F[20]||(F[20]=[m("p",null,"没有匹配的文件。",-1),m("p",{class:"card__desc"},"换个关键字试试;搜索只匹配文件名,且只在当前存储根内。",-1)])])):(N(),L("table",bA,[F[21]||(F[21]=m("thead",null,[m("tr",null,[m("th",{scope:"col"},"名称"),m("th",{scope:"col",class:"file-table__col-type"},"类型"),m("th",{scope:"col"},"大小"),m("th",{scope:"col"},"修改时间"),m("th",{scope:"col"},"所在路径")])],-1)),m("tbody",null,[(N(!0),L(Oe,null,ht(te.value,G=>(N(),L("tr",{key:G.path,class:ft(["file-table__row",{"file-table__row--dir":G.type==="dir"}]),"data-name":G.name,"data-type":G.type,"data-testid":"search-row",onClick:Ke=>H(G)},[m("td",null,[m("span",EA,[je(Kr,{name:G.type==="dir"?"files":"file",size:15},null,8,["name"]),m("span",null,k(G.name),1)])]),m("td",SA,k(G.type==="dir"?"目录":"文件"),1),m("td",RA,k(G.type==="dir"?"—":Z(dt)(G.size)),1),m("td",AA,k(Z(Yr)(G.mtime)),1),m("td",TA,k(q(G.path)),1)],10,wA))),128))])]))])):be("",!0),we.value?be("",!0):(N(),L(Oe,{key:1},[C.value?(N(),L("p",OA,"✅ "+k(C.value),1)):be("",!0),z.value?(N(),L("p",kA,k(z.value),1)):be("",!0),s.value==="loading"?(N(),L("p",xA,"正在加载目录…")):s.value==="error"?(N(),L("div",CA,[F[31]||(F[31]=m("strong",null,"加载失败",-1)),m("span",IA,k(o.value.code),1),m("p",null,k(o.value.message),1),Z(R).rootsError?(N(),L("p",DA,"存储位置探测:"+k(Z(R).rootsError),1)):be("",!0),o.value.code==="PERMISSION_DENIED"?(N(),L("div",PA,[m("p",null,[F[22]||(F[22]=ge(" 网页服务当前以「",-1)),m("strong",null,k(v.value),1),F[23]||(F[23]=ge("」身份访问文件, 这可能与你登录 DSM 的账号不同。 ",-1))]),F[29]||(F[29]=m("p",null,"修复方式(任选其一):",-1)),m("ul",null,[m("li",null,[F[24]||(F[24]=ge(" DSM → 控制面板 → 共享文件夹 → 选中该文件夹 → 编辑 → 权限 → 给「",-1)),m("strong",null,k(v.value),1),F[25]||(F[25]=ge("」读写权限 ",-1))]),F[26]||(F[26]=m("li",null,"或给该文件夹 everyone 读权限(更省事,但范围更宽)",-1))]),F[30]||(F[30]=m("p",{class:"card__desc"},[ge(" 提示:手动执行 "),m("code",null,"scripts/start.sh"),ge(" 启动时服务以你的账号运行; 由 DSH 等套件代启时则是套件用户身份。 ")],-1)),m("p",null,[je(Z(Ii),{to:Z(vt).SETTINGS,"data-testid":"root-hint-settings"},{default:co(()=>[...F[27]||(F[27]=[ge("去设置看看",-1)])]),_:1},8,["to"]),F[28]||(F[28]=m("span",{"aria-hidden":"true"},"·",-1)),m("button",{type:"button",class:"file-browser__crumb",onClick:x},"重试")])])):be("",!0),m("button",{type:"button",onClick:x},"重试")])):r.value.length===0?(N(),L("div",NA,[F[32]||(F[32]=m("p",null,"这个目录是空的。",-1)),m("p",$A,"当前路径:"+k(l.value.path),1)])):be("",!0),Z(R).viewMode===Z(Rs).LIST?(N(),L("table",LA,[m("thead",null,[m("tr",null,[F[33]||(F[33]=m("th",{scope:"col",class:"file-table__col-check"},null,-1)),m("th",MA,[m("button",{type:"button",class:"file-table__sort",onClick:F[6]||(F[6]=G=>X("name"))},"名称 "+k(se("name")),1)]),F[34]||(F[34]=m("th",{scope:"col",class:"file-table__col-type"},"类型",-1)),m("th",FA,[m("button",{type:"button",class:"file-table__sort",onClick:F[7]||(F[7]=G=>X("size"))},"大小 "+k(se("size")),1)]),m("th",UA,[m("button",{type:"button",class:"file-table__sort",onClick:F[8]||(F[8]=G=>X("mtime"))},"修改时间 "+k(se("mtime")),1)])])]),m("tbody",null,[(N(!0),L(Oe,null,ht(r.value,(G,Ke)=>(N(),L("tr",{key:G.path,class:ft(["file-table__row",{"file-table__row--dir":G.type==="dir","file-table__row--focused":Ke===O.value,"file-table__row--selected":re(G)}]),"data-name":G.name,"data-type":G.type,draggable:"true",onClick:Ot=>Eo(G),onContextmenu:Bt(Ot=>ie(Ot,G),["prevent","stop"]),onPointerdown:Ot=>wo(G,Ot),onPointerup:Bn,onPointermove:Bn,onPointercancel:Bn,onDragstart:Ot=>Ls(G,Ot),onDragend:Ms},[m("td",{class:"file-table__col-check",onClick:F[9]||(F[9]=Bt(()=>{},["stop"]))},[m("input",{type:"checkbox",checked:re(G),"aria-label":`选择 ${G.name}`,"data-select":G.name,onChange:Ot=>J(G)},null,40,HA)]),m("td",null,[m("span",VA,[je(Kr,{name:ce(G),size:15},null,8,["name"]),m("span",null,k(G.name),1),G.blacklisted?(N(),L("span",{key:0,class:"badge","data-testid":"blacklist-badge",title:`命中黑名单(${G.blacklistLayer} 层):压缩时会跳过,不会进包也不会被删除`},"已跳过",8,jA)):be("",!0)])]),m("td",zA,k(Ie(G)),1),m("td",GA,k(G.type==="dir"?"—":Z(dt)(G.size)),1),m("td",WA,k(Z(Yr)(G.mtime)),1)],42,BA))),128))])])):be("",!0),Z(R).viewMode===Z(Rs).GRID?(N(),L("div",qA,[(N(!0),L(Oe,null,ht(r.value,(G,Ke)=>(N(),L("article",{key:G.path,class:ft(["file-card",{"file-card--focused":Ke===O.value,"file-card--selected":re(G)}]),"data-name":G.name,"data-type":G.type,"data-testid":"file-card",onClick:Ot=>Eo(G),onContextmenu:Bt(Ot=>ie(Ot,G),["prevent","stop"]),onPointerdown:Ot=>wo(G,Ot),onPointerup:Bn,onPointermove:Bn,onPointercancel:Bn},[m("span",YA,[je(Kr,{name:ce(G),size:28},null,8,["name"])]),m("span",{class:"file-card__name",title:G.name},k(G.name),9,JA),m("span",QA,[ge(k(G.type==="dir"?"目录":Z(dt)(G.size))+" ",1),G.blacklisted?(N(),L("span",ZA,"已跳过")):be("",!0)])],42,KA))),128))])):be("",!0),s.value==="ready"?(N(),L("p",XA,[ge(" 共 "+k(l.value.total)+" 项",1),l.value.truncated?(N(),L(Oe,{key:0},[ge("(已截断,仅显示前 "+k(r.value.length)+" 项)",1)],64)):be("",!0)])):be("",!0)],64))])])],544),je(NS,{open:_.value.open,x:_.value.x,y:_.value.y,items:Fe.value,onClose:F[11]||(F[11]=G=>_.value={..._.value,open:!1}),onPick:St},null,8,["open","x","y","items"]),je(oR,{open:c.value!=="",path:c.value,"root-id":Q.value,onClose:F[12]||(F[12]=G=>c.value=""),onRenamed:st},null,8,["open","path","root-id"]),je(Hm,{open:g.value.open,mode:g.value.mode,title:g.value.title,label:g.value.label,value:g.value.value,danger:g.value.danger,busy:g.value.busy,onConfirm:$s,onCancel:it},null,8,["open","mode","title","label","value","danger","busy"]),be("",!0),je(nA,{"task-id":ke.value,onFinished:ye,onDismiss:Ae},null,8,["task-id"]),je(DR,{open:f.value,"root-id":Q.value,sources:oe.value,onClose:F[14]||(F[14]=G=>f.value=!1),onSubmitted:Y},null,8,["open","root-id","sources"]),je(zR,{open:d.value,"root-id":Q.value,"archive-path":M.value?M.value.path:"",onClose:F[15]||(F[15]=G=>d.value=!1),onSubmitted:Y},null,8,["open","root-id","archive-path"])],64))}};async function sT(e){return Ge.post("/hardlink/scan",e)}async function rT(e){return Ge.post("/hardlink/execute",e)}const lT={class:"card","data-testid":"hardlink-page"},oT={class:"hardlink-form"},iT={class:"hardlink-form__row"},aT={class:"card__desc","data-testid":"hardlink-root-hint"},uT={class:"hardlink-form__row"},cT=["disabled"],fT={key:0,class:"login-form__error",role:"alert","data-testid":"hardlink-scan-error"},dT={class:"hardlink-summary","data-testid":"hardlink-summary"},pT={key:0,class:"hardlink-groups"},hT={class:"hardlink-groups__all"},mT=["checked"],gT={class:"hardlink-group__head"},_T=["data-testid","checked","onChange"],yT={class:"hardlink-group__paths"},vT={class:"hardlink-group__master"},bT=["disabled"],wT={key:1,class:"card__desc","data-testid":"hardlink-empty"},ET={key:2,class:"badge badge--ok","data-testid":"hardlink-notice"},ST={key:3,class:"login-form__error",role:"alert","data-testid":"hardlink-execute-error"},RT="mp4, mkv, avi, mov, iso, zip, 7z",AT={__name:"HardlinkPage",setup(e){const t=Ps(),n=de(t.fsPath||"/"),s=de(RT),r=de(!1),l=de(""),o=de(null),i=de([]),a=de(!1),u=de(""),f=de(""),c=de(!1),d=de(null),h=xe(()=>s.value.split(",").map(U=>U.trim().replace(/^\./,"").toLowerCase()).filter(Boolean)),S=xe(()=>o.value?i.value.map(U=>o.value.groups[U]).filter(Boolean):[]),R=xe(()=>S.value.reduce((U,j)=>U+(j.savedBytes||0),0)),D=xe(()=>!o.value||o.value.groups.length===0?!1:i.value.length===o.value.groups.length);function _(U){const j=i.value.indexOf(U);j>=0?i.value.splice(j,1):i.value.push(U)}function g(){o.value&&(i.value=D.value?[]:o.value.groups.map((U,j)=>j))}function O(){n.value=t.fsPath||"/"}async function w(){r.value=!0,l.value="",o.value=null,i.value=[],d.value=null;try{o.value=await sT({path:n.value,extensions:h.value,rootId:t.currentRootId}),o.value.groups.length===0&&(i.value=[])}catch(U){l.value=U.message||"扫描失败"}finally{r.value=!1}}function T(){S.value.length!==0&&(u.value="",c.value=!0)}async function C(){c.value=!1,a.value=!0,u.value="",f.value="";try{const U=await rT({path:n.value,extensions:h.value,groups:S.value,confirmed:!0,rootId:t.currentRootId});d.value=U,await w(),f.value=`已合并 ${U.executed} 个副本,释放 ${dt(U.savedBytes)}`+(U.failed.length>0?`;失败 ${U.failed.length} 条`:"")+(result.skippedGroups.length>0?`;跳过 ${result.skippedGroups.length} 组(内容已变化)`:"")}catch(U){u.value=U.message||"执行失败"}finally{a.value=!1}}return(U,j)=>(N(),L("section",lT,[j[8]||(j[8]=m("h3",{class:"card__title"},"硬链接去重",-1)),j[9]||(j[9]=m("p",{class:"card__desc"},[ge(" 扫描目录内"),m("b",null,"内容完全相同"),ge("的文件副本,合并成一份物理数据(硬链接),省出整份空间。 判定链:按大小分组 → 头尾+中间抽样快筛 → "),m("b",null,"全量 SHA-256 终判"),ge("(抽样不能判重复, 同系列视频头尾一致但内容不同)。 ")],-1)),m("div",oT,[m("label",iT,[j[3]||(j[3]=m("span",null,"扫描目录",-1)),Tn(m("input",{"onUpdate:modelValue":j[0]||(j[0]=ee=>n.value=ee),type:"text","data-testid":"hardlink-path",placeholder:"/media/movies"},null,512),[[Xs,n.value]]),m("button",{type:"button",class:"hardlink-form__pick","data-testid":"hardlink-use-current",onClick:O}," 用当前目录 ")]),m("p",aT,[j[4]||(j[4]=ge(" 当前存储位置:",-1)),m("strong",null,k(Z(t).currentRootId),1),j[5]||(j[5]=ge("(扫描只在这个位置内解析路径) ",-1))]),m("label",uT,[j[6]||(j[6]=m("span",null,"扩展名白名单(逗号分隔)",-1)),Tn(m("input",{"onUpdate:modelValue":j[1]||(j[1]=ee=>s.value=ee),type:"text","data-testid":"hardlink-extensions"},null,512),[[Xs,s.value]])]),m("button",{type:"button",class:"login-form__submit","data-testid":"hardlink-scan",disabled:r.value||!n.value,onClick:w},k(r.value?"扫描中(大文件全量哈希可能较慢)…":"开始扫描(只读,不改文件)"),9,cT)]),l.value?(N(),L("p",fT,k(l.value),1)):be("",!0),o.value?(N(),L(Oe,{key:1},[m("div",dT,[m("span",null,"重复组:"+k(o.value.groups.length),1),m("span",null,"候选文件:"+k(o.value.stats.scanned),1),m("span",null,"可释放:"+k(Z(dt)(o.value.stats.savedBytes)),1)]),o.value.groups.length>0?(N(),L("div",pT,[m("label",hT,[m("input",{type:"checkbox","data-testid":"hardlink-select-all",checked:D.value,onChange:g},null,40,mT),ge(" 全选("+k(S.value.length)+"/"+k(o.value.groups.length)+" 组,可释放 "+k(Z(dt)(R.value))+") ",1)]),(N(!0),L(Oe,null,ht(o.value.groups,(ee,le)=>(N(),L("div",{key:ee.hash,class:ft(["hardlink-group",{"hardlink-group--selected":i.value.includes(le)}])},[m("label",gT,[m("input",{type:"checkbox","data-testid":`hardlink-group-${le}`,checked:i.value.includes(le),onChange:z=>_(le)},null,40,_T),m("b",null,k(Z(dt)(ee.size)),1),ge(" × "+k(ee.duplicates.length+1)+" 份 → 释放 ",1),m("b",null,k(Z(dt)(ee.savedBytes)),1),j[7]||(j[7]=m("span",{class:"badge"},"sha256 已校验",-1))]),m("ul",yT,[m("li",vT,k(ee.master)+"(主文件,保留)",1),(N(!0),L(Oe,null,ht(ee.duplicates,z=>(N(),L("li",{key:z},k(z)+"(将被合并)",1))),128))])],2))),128)),m("button",{type:"button",class:"login-form__submit","data-testid":"hardlink-execute",disabled:a.value||S.value.length===0,onClick:T},k(a.value?"执行中…":`合并选中 ${S.value.length} 组(释放 ${Z(dt)(R.value)})`),9,bT)])):(N(),L("p",wT,"未发现重复副本。"))],64)):be("",!0),f.value?(N(),L("p",ET,k(f.value),1)):be("",!0),u.value?(N(),L("p",ST,k(u.value),1)):be("",!0),je(Hm,{open:c.value,mode:"confirm",danger:"",title:"确认合并重复文件?",label:"建硬链接后,修改或删除其中任一文件会影响全部副本 —— 只对只读媒体(视频/镜像/压缩包等不再编辑的文件)使用。合并操作会写入服务端日志,可回滚排查但内容合并不可自动撤销。",busy:a.value,onConfirm:C,onCancel:j[2]||(j[2]=ee=>c.value=!1)},null,8,["open","busy"])]))}},TT=oc(AT,[["__scopeId","data-v-a34ec66d"]]),OT={class:"login-page","data-testid":"login-page"},kT={class:"card login-card"},xT={class:"login-card__brand"},CT={class:"topbar__brand-sub"},IT=["disabled"],DT=["disabled"],PT={key:0,class:"login-form__error","data-testid":"login-error",role:"alert"},NT=["disabled"],$T={__name:"LoginPage",setup(e){const t=Di(),n=Kh(),s=yo(),r=de(""),l=de(""),o=de(!1),i=de("");function a(){const f=n.query.redirect;return typeof f=="string"&&f.startsWith("/")?f:vt.FILES}async function u(){if(o.value)return;const f=r.value.trim();if(!f||!l.value){i.value="请输入用户名与密码";return}o.value=!0,i.value="";try{await s.login(f,l.value),l.value="",await t.replace(a())}catch(c){i.value=c&&c.code?`[${c.code}] ${c.message||"登录失败"}`:c&&c.message||"登录失败,请重试"}finally{o.value=!1}}return(f,c)=>(N(),L("div",OT,[m("section",kT,[m("h1",xT,[ge(k(Z(Im))+" ",1),m("span",CT,k(Z(Dm)),1)]),c[4]||(c[4]=m("p",{class:"card__desc"},"登录后即可浏览存储根目录下的文件。",-1)),m("form",{class:"login-form","data-testid":"login-form",onSubmit:Bt(u,["prevent"])},[c[2]||(c[2]=m("label",{class:"login-form__label",for:"login-username"},"用户名",-1)),Tn(m("input",{id:"login-username","onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),name:"username",type:"text",autocomplete:"username",placeholder:"admin",disabled:o.value},null,8,IT),[[Xs,r.value]]),c[3]||(c[3]=m("label",{class:"login-form__label",for:"login-password"},"密码",-1)),Tn(m("input",{id:"login-password","onUpdate:modelValue":c[1]||(c[1]=d=>l.value=d),name:"password",type:"password",autocomplete:"current-password",placeholder:"密码",disabled:o.value},null,8,DT),[[Xs,l.value]]),i.value?(N(),L("p",PT,k(i.value),1)):be("",!0),m("button",{type:"submit",class:"login-form__submit",disabled:o.value,"data-testid":"login-submit"},k(o.value?"登录中…":"登录"),9,NT)],32)])]))}},LT={class:"card"},MT={class:"placeholder-grid",style:{"margin-top":"var(--space-3)"}},FT={class:"card"},UT={class:"placeholder-grid",style:{"margin-top":"var(--space-3)"}},BT={class:"card"},HT={class:"tree",style:{"margin-top":"var(--space-3)"}},VT={class:"badge"},jT={__name:"TasksPage",setup(e){return(t,n)=>(N(),L(Oe,null,[n[5]||(n[5]=m("section",{class:"card"},[m("h3",{class:"card__title"},"压缩任务"),m("p",{class:"card__desc"},[ge(" 实际的任务列表、进度与取消按钮在"),m("b",null,"底部任务条"),ge("与"),m("b",null,"任务抽屉"),ge("里(由 "),m("code",null,"/api/v1/tasks/events"),ge(" 的 SSE 推送驱动,断线重连后先收 "),m("code",null,"snapshot"),ge(" 快照再收增量 —— 进度是「状态」不是「消息」)。 本页列出状态/阶段/模式的取值清单,供查阅。 ")])],-1)),m("section",LT,[n[1]||(n[1]=m("h3",{class:"card__title"},"任务状态(7 值,来自 shared/task-status.js)",-1)),m("ul",MT,[(N(!0),L(Oe,null,ht(Z(lw),s=>(N(),L("li",{key:s,class:"placeholder-block"},[m("strong",null,k(Z(xm)[s]),1),n[0]||(n[0]=m("br",null,null,-1)),m("code",null,k(s),1)]))),128))])]),m("section",FT,[n[3]||(n[3]=m("h3",{class:"card__title"},"执行阶段(6 步,来自 shared/task-phase.js)",-1)),m("ol",UT,[(N(!0),L(Oe,null,ht(Z(iw),(s,r)=>(N(),L("li",{key:s,class:"placeholder-block"},[m("strong",null,k(r+1)+". "+k(Z(rc)[s]),1),n[2]||(n[2]=m("br",null,null,-1)),m("code",null,k(s),1)]))),128))])]),m("section",BT,[n[4]||(n[4]=m("h3",{class:"card__title"},"压缩模式(互斥单选,来自 shared/compress-modes.js)",-1)),m("ul",HT,[(N(!0),L(Oe,null,ht(Z(aw),s=>(N(),L("li",{key:s,class:"tree__item"},[m("span",VT,k(s),1),m("span",null,k(Z(Cm)[s]),1)]))),128))])])],64))}},zT=!0,Ht="u-",GT="uplot",WT=Ht+"hz",qT=Ht+"vt",KT=Ht+"title",YT=Ht+"wrap",JT=Ht+"under",QT=Ht+"over",ZT=Ht+"axis",hr=Ht+"off",XT=Ht+"select",eO=Ht+"cursor-x",tO=Ht+"cursor-y",nO=Ht+"cursor-pt",sO=Ht+"legend",rO=Ht+"live",lO=Ht+"inline",oO=Ht+"series",iO=Ht+"marker",Td=Ht+"label",aO=Ht+"value",$l="width",Ll="height",xl="top",Od="bottom",Vr="left",Ha="right",ic="#000",kd=ic+"0",Va="mousemove",xd="mousedown",ja="mouseup",Cd="mouseenter",Id="mouseleave",Dd="dblclick",uO="resize",cO="scroll",Pd="change",ui="dppxchange",ac="--",cl=typeof window<"u",bu=cl?document:null,Jr=cl?window:null,fO=cl?navigator:null;let Xe,Fo;function wu(){let e=devicePixelRatio;Xe!=e&&(Xe=e,Fo&&Su(Pd,Fo,wu),Fo=matchMedia(`(min-resolution: ${Xe-.001}dppx) and (max-resolution: ${Xe+.001}dppx)`),wr(Pd,Fo,wu),Jr.dispatchEvent(new CustomEvent(ui)))}function An(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function Eu(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function yt(e,t,n){e.style[t]=n+"px"}function zn(e,t,n,s){let r=bu.createElement(e);return t!=null&&An(r,t),n!=null&&n.insertBefore(r,s),r}function Nn(e,t){return zn("div",e,t)}const Nd=new WeakMap;function rs(e,t,n,s,r){let l="translate("+t+"px,"+n+"px)",o=Nd.get(e);l!=o&&(e.style.transform=l,Nd.set(e,l),t<0||n<0||t>s||n>r?An(e,hr):Eu(e,hr))}const $d=new WeakMap;function Ld(e,t,n){let s=t+n,r=$d.get(e);s!=r&&($d.set(e,s),e.style.background=t,e.style.borderColor=n)}const Md=new WeakMap;function Fd(e,t,n,s){let r=t+""+n,l=Md.get(e);r!=l&&(Md.set(e,r),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=s?-t/2+"px":0,e.style.marginTop=s?-n/2+"px":0)}const uc={passive:!0},dO={...uc,capture:!0};function wr(e,t,n,s){t.addEventListener(e,n,s?dO:uc)}function Su(e,t,n,s){t.removeEventListener(e,n,uc)}cl&&wu();function Wn(e,t,n,s){let r;n=n||0,s=s||t.length-1;let l=s<=2147483647;for(;s-n>1;)r=l?n+s>>1:xn((n+s)/2),t[r]<e?n=r:s=r;return e-t[n]<=t[s]-e?n:s}function Vm(e){return(n,s,r)=>{let l=-1,o=-1;for(let i=s;i<=r;i++)if(e(n[i])){l=i;break}for(let i=r;i>=s;i--)if(e(n[i])){o=i;break}return[l,o]}}const jm=e=>e!=null,zm=e=>e!=null&&e>0,Ui=Vm(jm),pO=Vm(zm);function hO(e,t,n,s=0,r=!1){let l=r?pO:Ui,o=r?zm:jm;[t,n]=l(e,t,n);let i=e[t],a=e[t];if(t>-1)if(s==1)i=e[t],a=e[n];else if(s==-1)i=e[n],a=e[t];else for(let u=t;u<=n;u++){let f=e[u];o(f)&&(f<i?i=f:f>a&&(a=f))}return[i??ut,a??-ut]}function Bi(e,t,n,s){let r=Hd(e),l=Hd(t);e==t&&(r==-1?(e*=n,t/=n):(e/=n,t*=n));let o=n==10?ks:Gm,i=r==1?xn:$n,a=l==1?$n:xn,u=i(o(Ut(e))),f=a(o(Ut(t))),c=rl(n,u),d=rl(n,f);return n==10&&(u<0&&(c=ct(c,-u)),f<0&&(d=ct(d,-f))),s||n==2?(e=c*r,t=d*l):(e=Ym(e,c),t=Hi(t,d)),[e,t]}function cc(e,t,n,s){let r=Bi(e,t,n,s);return e==0&&(r[0]=0),t==0&&(r[1]=0),r}const fc=.1,Ud={mode:3,pad:fc},ql={pad:0,soft:null,mode:0},mO={min:ql,max:ql};function ci(e,t,n,s){return Vi(n)?Bd(e,t,n):(ql.pad=n,ql.soft=s?0:null,ql.mode=s?3:0,Bd(e,t,mO))}function Qe(e,t){return e??t}function gO(e,t,n){for(t=Qe(t,0),n=Qe(n,e.length-1);t<=n;){if(e[t]!=null)return!0;t++}return!1}function Bd(e,t,n){let s=n.min,r=n.max,l=Qe(s.pad,0),o=Qe(r.pad,0),i=Qe(s.hard,-ut),a=Qe(r.hard,ut),u=Qe(s.soft,ut),f=Qe(r.soft,-ut),c=Qe(s.mode,0),d=Qe(r.mode,0),h=t-e,S=ks(h),R=gn(Ut(e),Ut(t)),D=ks(R),_=Ut(D-S);(h<1e-24||_>10)&&(h=0,(e==0||t==0)&&(h=1e-24,c==2&&u!=ut&&(l=0),d==2&&f!=-ut&&(o=0)));let g=h||R||1e3,O=ks(g),w=rl(10,xn(O)),T=g*(h==0?e==0?.1:1:l),C=ct(Ym(e-T,w/10),24),U=e>=u&&(c==1||c==3&&C<=u||c==2&&C>=u)?u:ut,j=gn(i,C<U&&e>=U?U:Kn(U,C)),ee=g*(h==0?t==0?.1:1:o),le=ct(Hi(t+ee,w/10),24),z=t<=f&&(d==1||d==3&&le>=f||d==2&&le<=f)?f:-ut,ke=Kn(a,le>z&&t<=z?z:gn(z,le));return j==ke&&j==0&&(ke=100),[j,ke]}const _O=new Intl.NumberFormat(cl?fO.language:"en-US"),dc=e=>_O.format(e),In=Math,Yo=In.PI,Ut=In.abs,xn=In.floor,Mt=In.round,$n=In.ceil,Kn=In.min,gn=In.max,rl=In.pow,Hd=In.sign,ks=In.log10,Gm=In.log2,yO=(e,t=1)=>In.sinh(e)*t,za=(e,t=1)=>In.asinh(e/t),ut=1/0;function Vd(e){return(ks((e^e>>31)-(e>>31))|0)+1}function Ru(e,t,n){return Kn(gn(e,t),n)}function Wm(e){return typeof e=="function"}function We(e){return Wm(e)?e:()=>e}const vO=()=>{},qm=e=>e,Km=(e,t)=>t,bO=e=>null,jd=e=>!0,zd=(e,t)=>e==t,wO=/\.\d*?(?=9{6,}|0{6,})/gm,Tr=e=>{if(Qm(e)||tr.has(e))return e;const t=`${e}`,n=t.match(wO);if(n==null)return e;let s=n[0].length-1;if(t.indexOf("e-")!=-1){let[r,l]=t.split("e");return+`${Tr(r)}e${l}`}return ct(e,s)};function fr(e,t){return Tr(ct(Tr(e/t))*t)}function Hi(e,t){return Tr($n(Tr(e/t))*t)}function Ym(e,t){return Tr(xn(Tr(e/t))*t)}function ct(e,t=0){if(Qm(e))return e;let n=10**t,s=e*n*(1+Number.EPSILON);return Mt(s)/n}const tr=new Map;function Jm(e){return((""+e).split(".")[1]||"").length}function lo(e,t,n,s){let r=[],l=s.map(Jm);for(let o=t;o<n;o++){let i=Ut(o),a=ct(rl(e,o),i);for(let u=0;u<s.length;u++){let f=e==10?+`${s[u]}e${o}`:s[u]*a,c=(o>=0?0:i)+(o>=l[u]?0:l[u]),d=e==10?f:ct(f,c);r.push(d),tr.set(d,c)}}return r}const Kl={},pc=[],ll=[null,null],Ks=Array.isArray,Qm=Number.isInteger,EO=e=>e===void 0;function Gd(e){return typeof e=="string"}function Vi(e){let t=!1;if(e!=null){let n=e.constructor;t=n==null||n==Object}return t}function SO(e){return e!=null&&typeof e=="object"}const RO=Object.getPrototypeOf(Uint8Array),Zm="__proto__";function ol(e,t=Vi){let n;if(Ks(e)){let s=e.find(r=>r!=null);if(Ks(s)||t(s)){n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=ol(e[r],t)}else n=e.slice()}else if(e instanceof RO)n=e.slice();else if(t(e)){n={};for(let s in e)s!=Zm&&(n[s]=ol(e[s],t))}else n=e;return n}function $t(e){let t=arguments;for(let n=1;n<t.length;n++){let s=t[n];for(let r in s)r!=Zm&&(Vi(e[r])?$t(e[r],ol(s[r])):e[r]=ol(s[r]))}return e}const AO=0,TO=1,OO=2;function kO(e,t,n){for(let s=0,r,l=-1;s<t.length;s++){let o=t[s];if(o>l){for(r=o-1;r>=0&&e[r]==null;)e[r--]=null;for(r=o+1;r<n&&e[r]==null;)e[l=r++]=null}}}function xO(e,t){if(DO(e)){let o=e[0].slice();for(let i=1;i<e.length;i++)o.push(...e[i].slice(1));return PO(o[0])||(o=IO(o)),o}let n=new Set;for(let o=0;o<e.length;o++){let a=e[o][0],u=a.length;for(let f=0;f<u;f++)n.add(a[f])}let s=[Array.from(n).sort((o,i)=>o-i)],r=s[0].length,l=new Map;for(let o=0;o<r;o++)l.set(s[0][o],o);for(let o=0;o<e.length;o++){let i=e[o],a=i[0];for(let u=1;u<i.length;u++){let f=i[u],c=Array(r).fill(void 0),d=t?t[o][u]:TO,h=[];for(let S=0;S<f.length;S++){let R=f[S],D=l.get(a[S]);R===null?d!=AO&&(c[D]=R,d==OO&&h.push(D)):c[D]=R}kO(c,h,r),s.push(c)}}return s}const CO=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function IO(e){let t=e[0],n=t.length,s=Array(n);for(let l=0;l<s.length;l++)s[l]=l;s.sort((l,o)=>t[l]-t[o]);let r=[];for(let l=0;l<e.length;l++){let o=e[l],i=Array(n);for(let a=0;a<n;a++)i[a]=o[s[a]];r.push(i)}return r}function DO(e){let t=e[0][0],n=t.length;for(let s=1;s<e.length;s++){let r=e[s][0];if(r.length!=n)return!1;if(r!=t){for(let l=0;l<n;l++)if(r[l]!=t[l])return!1}}return!0}function PO(e,t=100){const n=e.length;if(n<=1)return!0;let s=0,r=n-1;for(;s<=r&&e[s]==null;)s++;for(;r>=s&&e[r]==null;)r--;if(r<=s)return!0;const l=gn(1,xn((r-s+1)/t));for(let o=e[s],i=s+l;i<=r;i+=l){const a=e[i];if(a!=null){if(a<=o)return!1;o=a}}return!0}const Xm=["January","February","March","April","May","June","July","August","September","October","November","December"],eg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function tg(e){return e.slice(0,3)}const NO=eg.map(tg),$O=Xm.map(tg),LO={MMMM:Xm,MMM:$O,WWWW:eg,WWW:NO};function Cl(e){return(e<10?"0":"")+e}function MO(e){return(e<10?"00":e<100?"0":"")+e}const FO={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Cl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Cl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Cl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return t==0?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Cl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Cl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>MO(e.getMilliseconds())};function hc(e,t){t=t||LO;let n=[],s=/\{([a-z]+)\}|[^{]+/gi,r;for(;r=s.exec(e);)n.push(r[0][0]=="{"?FO[r[1]]:r[0]);return l=>{let o="";for(let i=0;i<n.length;i++)o+=typeof n[i]=="string"?n[i]:n[i](l,t);return o}}const UO=new Intl.DateTimeFormat().resolvedOptions().timeZone;function BO(e,t){let n;return t=="UTC"||t=="Etc/UTC"?n=new Date(+e+e.getTimezoneOffset()*6e4):t==UO?n=e:(n=new Date(e.toLocaleString("en-US",{timeZone:t})),n.setMilliseconds(e.getMilliseconds())),n}const ng=e=>e%1==0,fi=[1,2,2.5,5],HO=lo(10,-32,0,fi),sg=lo(10,0,32,fi),VO=sg.filter(ng),dr=HO.concat(sg),mc=`
|
|
130
|
+
`,rg="{YYYY}",Wd=mc+rg,lg="{M}/{D}",Ml=mc+lg,Uo=Ml+"/{YY}",og="{aa}",jO="{h}:{mm}",Gr=jO+og,qd=mc+Gr,Kd=":{ss}",tt=null;function ig(e){let t=e*1e3,n=t*60,s=n*60,r=s*24,l=r*30,o=r*365,a=(e==1?lo(10,0,3,fi).filter(ng):lo(10,-3,0,fi)).concat([t,t*5,t*10,t*15,t*30,n,n*5,n*10,n*15,n*30,s,s*2,s*3,s*4,s*6,s*8,s*12,r,r*2,r*3,r*4,r*5,r*6,r*7,r*8,r*9,r*10,r*15,l,l*2,l*3,l*4,l*6,o,o*2,o*5,o*10,o*25,o*50,o*100]);const u=[[o,rg,tt,tt,tt,tt,tt,tt,1],[r*28,"{MMM}",Wd,tt,tt,tt,tt,tt,1],[r,lg,Wd,tt,tt,tt,tt,tt,1],[s,"{h}"+og,Uo,tt,Ml,tt,tt,tt,1],[n,Gr,Uo,tt,Ml,tt,tt,tt,1],[t,Kd,Uo+" "+Gr,tt,Ml+" "+Gr,tt,qd,tt,1],[e,Kd+".{fff}",Uo+" "+Gr,tt,Ml+" "+Gr,tt,qd,tt,1]];function f(c){return(d,h,S,R,D,_)=>{let g=[],O=D>=o,w=D>=l&&D<o,T=c(S),C=ct(T*e,3),U=Ga(T.getFullYear(),O?0:T.getMonth(),w||O?1:T.getDate()),j=ct(U*e,3);if(w||O){let ee=w?D/l:0,le=O?D/o:0,z=C==j?C:ct(Ga(U.getFullYear()+le,U.getMonth()+ee,1)*e,3),ke=new Date(Mt(z/e)),we=ke.getFullYear(),te=ke.getMonth();for(let W=0;z<=R;W++){let q=Ga(we+le*W,te+ee*W,1),H=q-c(ct(q*e,3));z=ct((+q+H)*e,3),z<=R&&g.push(z)}}else{let ee=D>=r?r:D,le=xn(S)-xn(C),z=j+le+Hi(C-j,ee);g.push(z);let ke=c(z),we=ke.getHours()+ke.getMinutes()/n+ke.getSeconds()/s,te=D/s,W=d.axes[h]._space,q=_/W;for(;z=ct(z+D,e==1?0:3),!(z>R);)if(te>1){let H=xn(ct(we+te,6))%24,_e=c(z).getHours()-H;_e>1&&(_e=-1),z-=_e*s,we=(we+te)%24;let Ee=g[g.length-1];ct((z-Ee)/D,3)*q>=.7&&g.push(z)}else g.push(z)}return g}}return[a,u,f]}const[zO,GO,WO]=ig(1),[qO,KO,YO]=ig(.001);lo(2,-53,53,[1]);function Yd(e,t){return e.map(n=>n.map((s,r)=>r==0||r==8||s==null?s:t(r==1||n[8]==0?s:n[1]+s)))}function Jd(e,t){return(n,s,r,l,o)=>{let i=t.find(S=>o>=S[0])||t[t.length-1],a,u,f,c,d,h;return s.map(S=>{let R=e(S),D=R.getFullYear(),_=R.getMonth(),g=R.getDate(),O=R.getHours(),w=R.getMinutes(),T=R.getSeconds(),C=D!=a&&i[2]||_!=u&&i[3]||g!=f&&i[4]||O!=c&&i[5]||w!=d&&i[6]||T!=h&&i[7]||i[1];return a=D,u=_,f=g,c=O,d=w,h=T,C(R)})}}function JO(e,t){let n=hc(t);return(s,r,l,o,i)=>r.map(a=>n(e(a)))}function Ga(e,t,n){return new Date(e,t,n)}function Qd(e,t){return t(e)}const QO="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Zd(e,t){return(n,s,r,l)=>l==null?ac:t(e(s))}function ZO(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null}function XO(e,t){return e.series[t].fill(e,t)}const ek={show:!0,live:!0,isolate:!1,mount:vO,markers:{show:!0,width:2,stroke:ZO,fill:XO,dash:"solid"},idx:null,idxs:null,values:[]};function tk(e,t){let n=e.cursor.points,s=Nn(),r=n.size(e,t);yt(s,$l,r),yt(s,Ll,r);let l=r/-2;yt(s,"marginLeft",l),yt(s,"marginTop",l);let o=n.width(e,t,r);return o&&yt(s,"borderWidth",o),s}function nk(e,t){let n=e.series[t].points;return n._fill||n._stroke}function sk(e,t){let n=e.series[t].points;return n._stroke||n._fill}function rk(e,t){return e.series[t].points.size}const Wa=[0,0];function lk(e,t,n){return Wa[0]=t,Wa[1]=n,Wa}function Bo(e,t,n,s=!0){return r=>{r.button==0&&(!s||r.target==t)&&n(r)}}function qa(e,t,n,s=!0){return r=>{(!s||r.target==t)&&n(r)}}const ok={show:!0,x:!0,y:!0,lock:!1,move:lk,points:{one:!1,show:tk,size:rk,width:0,stroke:sk,fill:nk},bind:{mousedown:Bo,mouseup:Bo,click:Bo,dblclick:Bo,mousemove:qa,mouseleave:qa,mouseenter:qa},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,s,r)=>s-r,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ag={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},gc=$t({},ag,{filter:Km}),ug=$t({},gc,{size:10}),cg=$t({},ag,{show:!1}),_c='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',fg="bold "+_c,dg=1.5,Xd={show:!0,scale:"x",stroke:ic,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:fg,side:2,grid:gc,ticks:ug,border:cg,font:_c,lineGap:dg,rotate:0},ik="Value",ak="Time",ep={show:!0,scale:"x",auto:!1,sorted:1,min:ut,max:-ut,idxs:[]};function uk(e,t,n,s,r){return t.map(l=>l==null?"":dc(l))}function ck(e,t,n,s,r,l,o){let i=[],a=tr.get(r)||0;n=o?n:ct(Hi(n,r),a);for(let u=n;u<=s;u=ct(u+r,a))i.push(Object.is(u,-0)?0:u);return i}function Au(e,t,n,s,r,l,o){const i=[],a=e.scales[e.axes[t].scale].log,u=a==10?ks:Gm,f=xn(u(n));r=rl(a,f),a==10&&(r=dr[Wn(r,dr)]);let c=n,d=r*a;a==10&&(d=dr[Wn(d,dr)]);do i.push(c),c=c+r,a==10&&!tr.has(c)&&(c=ct(c,tr.get(r))),c>=d&&(r=c,d=r*a,a==10&&(d=dr[Wn(d,dr)]));while(c<=s);return i}function fk(e,t,n,s,r,l,o){let a=e.scales[e.axes[t].scale].asinh,u=s>a?Au(e,t,gn(a,n),s,r):[a],f=s>=0&&n<=0?[0]:[];return(n<-a?Au(e,t,gn(a,-s),-n,r):[a]).reverse().map(d=>-d).concat(f,u)}const pg=/./,dk=/[12357]/,pk=/[125]/,tp=/1/,Tu=(e,t,n,s)=>e.map((r,l)=>t==4&&r==0||l%s==0&&n.test(r.toExponential()[r<0?1:0])?r:null);function hk(e,t,n,s,r){let l=e.axes[n],o=l.scale,i=e.scales[o],a=e.valToPos,u=l._space,f=a(10,o),c=a(9,o)-f>=u?pg:a(7,o)-f>=u?dk:a(5,o)-f>=u?pk:tp;if(c==tp){let d=Ut(a(1,o)-f);if(d<u)return Tu(t.slice().reverse(),i.distr,c,$n(u/d)).reverse()}return Tu(t,i.distr,c,1)}function mk(e,t,n,s,r){let l=e.axes[n],o=l.scale,i=l._space,a=e.valToPos,u=Ut(a(1,o)-a(2,o));return u<i?Tu(t.slice().reverse(),3,pg,$n(i/u)).reverse():t}function gk(e,t,n,s){return s==null?ac:t==null?"":dc(t)}const np={show:!0,scale:"y",stroke:ic,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:fg,side:3,grid:gc,ticks:ug,border:cg,font:_c,lineGap:dg,rotate:0};function _k(e,t){let n=3+(e||1)*2;return ct(n*t,3)}function yk(e,t){let{scale:n,idxs:s}=e.series[0],r=e._data[0],l=e.valToPos(r[s[0]],n,!0),o=e.valToPos(r[s[1]],n,!0),i=Ut(o-l),a=e.series[t],u=i/(a.points.space*Xe);return s[1]-s[0]<=u}const sp={scale:null,auto:!0,sorted:0,min:ut,max:-ut},hg=(e,t,n,s,r)=>r,rp={show:!0,auto:!0,sorted:0,gaps:hg,alpha:1,facets:[$t({},sp,{scale:"x"}),$t({},sp,{scale:"y"})]},lp={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:hg,alpha:1,points:{show:yk,filter:null},values:null,min:ut,max:-ut,idxs:[],path:null,clip:null};function vk(e,t,n,s,r){return n/10}const mg={time:zT,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},bk=$t({},mg,{time:!1,ori:1}),op={};function gg(e,t){let n=op[e];return n||(n={key:e,plots:[],sub(s){n.plots.push(s)},unsub(s){n.plots=n.plots.filter(r=>r!=s)},pub(s,r,l,o,i,a,u){for(let f=0;f<n.plots.length;f++)n.plots[f]!=r&&n.plots[f].pub(s,r,l,o,i,a,u)}},e!=null&&(op[e]=n)),n}const il=1,Ou=2;function Or(e,t,n){const s=e.mode,r=e.series[t],l=s==2?e._data[t]:e._data,o=e.scales,i=e.bbox;let a=l[0],u=s==2?l[1]:l[t],f=s==2?o[r.facets[0].scale]:o[e.series[0].scale],c=s==2?o[r.facets[1].scale]:o[r.scale],d=i.left,h=i.top,S=i.width,R=i.height,D=e.valToPosH,_=e.valToPosV;return f.ori==0?n(r,a,u,f,c,D,_,d,h,S,R,zi,fl,Wi,yg,bg):n(r,a,u,f,c,_,D,h,d,R,S,Gi,dl,bc,vg,wg)}function yc(e,t){let n=0,s=0,r=Qe(e.bands,pc);for(let l=0;l<r.length;l++){let o=r[l];o.series[0]==t?n=o.dir:o.series[1]==t&&(o.dir==1?s|=1:s|=2)}return[n,s==1?-1:s==2?1:s==3?2:0]}function wk(e,t,n,s,r){let l=e.mode,o=e.series[t],i=l==2?o.facets[1].scale:o.scale,a=e.scales[i];return r==-1?a.min:r==1?a.max:a.distr==3?a.dir==1?a.min:a.max:0}function xs(e,t,n,s,r,l){return Or(e,t,(o,i,a,u,f,c,d,h,S,R,D)=>{let _=o.pxRound;const g=u.dir*(u.ori==0?1:-1),O=u.ori==0?fl:dl;let w,T;g==1?(w=n,T=s):(w=s,T=n);let C=_(c(i[w],u,R,h)),U=_(d(a[w],f,D,S)),j=_(c(i[T],u,R,h)),ee=_(d(l==1?f.max:f.min,f,D,S)),le=new Path2D(r);return O(le,j,ee),O(le,C,ee),O(le,C,U),le})}function ji(e,t,n,s,r,l){let o=null;if(e.length>0){o=new Path2D;const i=t==0?Wi:bc;let a=n;for(let c=0;c<e.length;c++){let d=e[c];if(d[1]>d[0]){let h=d[0]-a;h>0&&i(o,a,s,h,s+l),a=d[1]}}let u=n+r-a,f=10;u>0&&i(o,a,s-f/2,u,s+l+f)}return o}function Ek(e,t,n){let s=e[e.length-1];s&&s[0]==t?s[1]=n:e.push([t,n])}function vc(e,t,n,s,r,l,o){let i=[],a=e.length;for(let u=r==1?n:s;u>=n&&u<=s;u+=r)if(t[u]===null){let c=u,d=u;if(r==1)for(;++u<=s&&t[u]===null;)d=u;else for(;--u>=n&&t[u]===null;)d=u;let h=l(e[c]),S=d==c?h:l(e[d]),R=c-r;h=o<=0&&R>=0&&R<a?l(e[R]):h;let _=d+r;S=o>=0&&_>=0&&_<a?l(e[_]):S,S>=h&&i.push([h,S])}return i}function ip(e){return e==0?qm:e==1?Mt:t=>fr(t,e)}function _g(e){let t=e==0?zi:Gi,n=e==0?(r,l,o,i,a,u)=>{r.arcTo(l,o,i,a,u)}:(r,l,o,i,a,u)=>{r.arcTo(o,l,a,i,u)},s=e==0?(r,l,o,i,a)=>{r.rect(l,o,i,a)}:(r,l,o,i,a)=>{r.rect(o,l,a,i)};return(r,l,o,i,a,u=0,f=0)=>{u==0&&f==0?s(r,l,o,i,a):(u=Kn(u,i/2,a/2),f=Kn(f,i/2,a/2),t(r,l+u,o),n(r,l+i,o,l+i,o+a,u),n(r,l+i,o+a,l,o+a,f),n(r,l,o+a,l,o,f),n(r,l,o,l+i,o,u),r.closePath())}}const zi=(e,t,n)=>{e.moveTo(t,n)},Gi=(e,t,n)=>{e.moveTo(n,t)},fl=(e,t,n)=>{e.lineTo(t,n)},dl=(e,t,n)=>{e.lineTo(n,t)},Wi=_g(0),bc=_g(1),yg=(e,t,n,s,r,l)=>{e.arc(t,n,s,r,l)},vg=(e,t,n,s,r,l)=>{e.arc(n,t,s,r,l)},bg=(e,t,n,s,r,l,o)=>{e.bezierCurveTo(t,n,s,r,l,o)},wg=(e,t,n,s,r,l,o)=>{e.bezierCurveTo(n,t,r,s,o,l)};function Eg(e){return(t,n,s,r,l)=>Or(t,n,(o,i,a,u,f,c,d,h,S,R,D)=>{let{pxRound:_,points:g}=o,O,w;u.ori==0?(O=zi,w=yg):(O=Gi,w=vg);const T=ct(g.width*Xe,3);let C=(g.size-g.width)/2*Xe,U=ct(C*2,3),j=new Path2D,ee=new Path2D,{left:le,top:z,width:ke,height:we}=t.bbox;Wi(ee,le-U,z-U,ke+U*2,we+U*2);const te=W=>{if(a[W]!=null){let q=_(c(i[W],u,R,h)),H=_(d(a[W],f,D,S));O(j,q+C,H),w(j,q,H,C,0,Yo*2)}};if(l)l.forEach(te);else for(let W=s;W<=r;W++)te(W);return{stroke:T>0?j:null,fill:j,clip:ee,flags:il|Ou}})}function Sg(e){return(t,n,s,r,l,o)=>{s!=r&&(l!=s&&o!=s&&e(t,n,s),l!=r&&o!=r&&e(t,n,r),e(t,n,o))}}const Sk=Sg(fl),Rk=Sg(dl);function Rg(e){const t=Qe(e==null?void 0:e.alignGaps,0);return(n,s,r,l)=>Or(n,s,(o,i,a,u,f,c,d,h,S,R,D)=>{[r,l]=Ui(a,r,l);let _=o.pxRound,g=we=>_(c(we,u,R,h)),O=we=>_(d(we,f,D,S)),w,T;u.ori==0?(w=fl,T=Sk):(w=dl,T=Rk);const C=u.dir*(u.ori==0?1:-1),U={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:il},j=U.stroke;let ee=!1;if(l-r>=R*4){let we=pe=>n.posToVal(pe,u.key,!0),te=null,W=null,q,H,Q,me=g(i[C==1?r:l]),_e=g(i[r]),Ee=g(i[l]),oe=we(C==1?_e+1:Ee-1);for(let pe=C==1?r:l;pe>=r&&pe<=l;pe+=C){let $e=i[pe],Me=(C==1?$e<oe:$e>oe)?me:g($e),M=a[pe];Me==me?M!=null?(H=M,te==null?(w(j,Me,O(H)),q=te=W=H):H<te?te=H:H>W&&(W=H)):M===null&&(ee=!0):(te!=null&&T(j,me,O(te),O(W),O(q),O(H)),M!=null?(H=M,w(j,Me,O(H)),te=W=q=H):(te=W=null,M===null&&(ee=!0)),me=Me,oe=we(me+C))}te!=null&&te!=W&&Q!=me&&T(j,me,O(te),O(W),O(q),O(H))}else for(let we=C==1?r:l;we>=r&&we<=l;we+=C){let te=a[we];te===null?ee=!0:te!=null&&w(j,g(i[we]),O(te))}let[z,ke]=yc(n,s);if(o.fill!=null||z!=0){let we=U.fill=new Path2D(j),te=o.fillTo(n,s,o.min,o.max,z),W=O(te),q=g(i[r]),H=g(i[l]);C==-1&&([H,q]=[q,H]),w(we,H,W),w(we,q,W)}if(!o.spanGaps){let we=[];ee&&we.push(...vc(i,a,r,l,C,g,t)),U.gaps=we=o.gaps(n,s,r,l,we),U.clip=ji(we,u.ori,h,S,R,D)}return ke!=0&&(U.band=ke==2?[xs(n,s,r,l,j,-1),xs(n,s,r,l,j,1)]:xs(n,s,r,l,j,ke)),U})}function Ak(e){const t=Qe(e.align,1),n=Qe(e.ascDesc,!1),s=Qe(e.alignGaps,0),r=Qe(e.extend,!1);return(l,o,i,a)=>Or(l,o,(u,f,c,d,h,S,R,D,_,g,O)=>{[i,a]=Ui(c,i,a);let w=u.pxRound,{left:T,width:C}=l.bbox,U=_e=>w(S(_e,d,g,D)),j=_e=>w(R(_e,h,O,_)),ee=d.ori==0?fl:dl;const le={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:il},z=le.stroke,ke=d.dir*(d.ori==0?1:-1);let we=j(c[ke==1?i:a]),te=U(f[ke==1?i:a]),W=te,q=te;r&&t==-1&&(q=T,ee(z,q,we)),ee(z,te,we);for(let _e=ke==1?i:a;_e>=i&&_e<=a;_e+=ke){let Ee=c[_e];if(Ee==null)continue;let oe=U(f[_e]),pe=j(Ee);t==1?ee(z,oe,we):ee(z,W,pe),ee(z,oe,pe),we=pe,W=oe}let H=W;r&&t==1&&(H=T+C,ee(z,H,we));let[Q,me]=yc(l,o);if(u.fill!=null||Q!=0){let _e=le.fill=new Path2D(z),Ee=u.fillTo(l,o,u.min,u.max,Q),oe=j(Ee);ee(_e,H,oe),ee(_e,q,oe)}if(!u.spanGaps){let _e=[];_e.push(...vc(f,c,i,a,ke,U,s));let Ee=u.width*Xe/2,oe=n||t==1?Ee:-Ee,pe=n||t==-1?-Ee:Ee;_e.forEach($e=>{$e[0]+=oe,$e[1]+=pe}),le.gaps=_e=u.gaps(l,o,i,a,_e),le.clip=ji(_e,d.ori,D,_,g,O)}return me!=0&&(le.band=me==2?[xs(l,o,i,a,z,-1),xs(l,o,i,a,z,1)]:xs(l,o,i,a,z,me)),le})}function ap(e,t,n,s,r,l,o=ut){if(e.length>1){let i=null;for(let a=0,u=1/0;a<e.length;a++)if(t[a]!==void 0){if(i!=null){let f=Ut(e[a]-e[i]);f<u&&(u=f,o=Ut(n(e[a],s,r,l)-n(e[i],s,r,l)))}i=a}}return o}function Tk(e){e=e||Kl;const t=Qe(e.size,[.6,ut,1]),n=e.align||0,s=e.gap||0;let r=e.radius;r=r==null?[0,0]:typeof r=="number"?[r,0]:r;const l=We(r),o=1-t[0],i=Qe(t[1],ut),a=Qe(t[2],1),u=Qe(e.disp,Kl),f=Qe(e.each,h=>{}),{fill:c,stroke:d}=u;return(h,S,R,D)=>Or(h,S,(_,g,O,w,T,C,U,j,ee,le,z)=>{let ke=_.pxRound,we=n,te=s*Xe,W=i*Xe,q=a*Xe,H,Q;w.ori==0?[H,Q]=l(h,S):[Q,H]=l(h,S);const me=w.dir*(w.ori==0?1:-1);let _e=w.ori==0?Wi:bc,Ee=w.ori==0?f:(ie,Pe,Fe,st,ot,St,Rt)=>{f(ie,Pe,Fe,ot,st,Rt,St)},oe=Qe(h.bands,pc).find(ie=>ie.series[0]==S),pe=oe!=null?oe.dir:0,$e=_.fillTo(h,S,_.min,_.max,pe),He=ke(U($e,T,z,ee)),Me,M,fe,ae=le,he=ke(_.width*Xe),v=!1,A=null,x=null,B=null,K=null;c!=null&&(he==0||d!=null)&&(v=!0,A=c.values(h,S,R,D),x=new Map,new Set(A).forEach(ie=>{ie!=null&&x.set(ie,new Path2D)}),he>0&&(B=d.values(h,S,R,D),K=new Map,new Set(B).forEach(ie=>{ie!=null&&K.set(ie,new Path2D)})));let{x0:X,size:se}=u;if(X!=null&&se!=null){we=1,g=X.values(h,S,R,D),X.unit==2&&(g=g.map(Fe=>h.posToVal(j+Fe*le,w.key,!0)));let ie=se.values(h,S,R,D);se.unit==2?M=ie[0]*le:M=C(ie[0],w,le,j)-C(0,w,le,j),ae=ap(g,O,C,w,le,j,ae),fe=ae-M+te}else ae=ap(g,O,C,w,le,j,ae),fe=ae*o+te,M=ae-fe;fe<1&&(fe=0),he>=M/2&&(he=0),fe<5&&(ke=qm);let J=fe>0,re=ae-fe-(J?he:0);M=ke(Ru(re,q,W)),Me=(we==0?M/2:we==me?0:M)-we*me*((we==0?te/2:0)+(J?he/2:0));const Y={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Ae=v?null:new Path2D;let ye=null;if(oe!=null)ye=h.data[oe.series[1]];else{let{y0:ie,y1:Pe}=u;ie!=null&&Pe!=null&&(O=Pe.values(h,S,R,D),ye=ie.values(h,S,R,D))}let Ie=H*M,ce=Q*M;for(let ie=me==1?R:D;ie>=R&&ie<=D;ie+=me){let Pe=O[ie];if(Pe==null)continue;if(ye!=null){let qe=ye[ie]??0;if(Pe-qe==0)continue;He=U(qe,T,z,ee)}let Fe=w.distr!=2||u!=null?g[ie]:ie,st=C(Fe,w,le,j),ot=U(Qe(Pe,$e),T,z,ee),St=ke(st-Me),Rt=ke(gn(ot,He)),Tt=ke(Kn(ot,He)),Dt=Rt-Tt;if(Pe!=null){let qe=Pe<0?ce:Ie,it=Pe<0?Ie:ce;v?(he>0&&B[ie]!=null&&_e(K.get(B[ie]),St,Tt+xn(he/2),M,gn(0,Dt-he),qe,it),A[ie]!=null&&_e(x.get(A[ie]),St,Tt+xn(he/2),M,gn(0,Dt-he),qe,it)):_e(Ae,St,Tt+xn(he/2),M,gn(0,Dt-he),qe,it),Ee(h,S,ie,St-he/2,Tt,M+he,Dt)}}return he>0?Y.stroke=v?K:Ae:v||(Y._fill=_.width==0?_._fill:_._stroke??_._fill,Y.width=0),Y.fill=v?x:Ae,Y})}function Ok(e,t){const n=Qe(t==null?void 0:t.alignGaps,0);return(s,r,l,o)=>Or(s,r,(i,a,u,f,c,d,h,S,R,D,_)=>{[l,o]=Ui(u,l,o);let g=i.pxRound,O=H=>g(d(H,f,D,S)),w=H=>g(h(H,c,_,R)),T,C,U;f.ori==0?(T=zi,U=fl,C=bg):(T=Gi,U=dl,C=wg);const j=f.dir*(f.ori==0?1:-1);let ee=O(a[j==1?l:o]),le=ee,z=[],ke=[];for(let H=j==1?l:o;H>=l&&H<=o;H+=j)if(u[H]!=null){let me=a[H],_e=O(me);z.push(le=_e),ke.push(w(u[H]))}const we={stroke:e(z,ke,T,U,C,g),fill:null,clip:null,band:null,gaps:null,flags:il},te=we.stroke;let[W,q]=yc(s,r);if(i.fill!=null||W!=0){let H=we.fill=new Path2D(te),Q=i.fillTo(s,r,i.min,i.max,W),me=w(Q);U(H,le,me),U(H,ee,me)}if(!i.spanGaps){let H=[];H.push(...vc(a,u,l,o,j,O,n)),we.gaps=H=i.gaps(s,r,l,o,H),we.clip=ji(H,f.ori,S,R,D,_)}return q!=0&&(we.band=q==2?[xs(s,r,l,o,te,-1),xs(s,r,l,o,te,1)]:xs(s,r,l,o,te,q)),we})}function kk(e){return Ok(xk,e)}function xk(e,t,n,s,r,l){const o=e.length;if(o<2)return null;const i=new Path2D;if(n(i,e[0],t[0]),o==2)s(i,e[1],t[1]);else{let a=Array(o),u=Array(o-1),f=Array(o-1),c=Array(o-1);for(let d=0;d<o-1;d++)f[d]=t[d+1]-t[d],c[d]=e[d+1]-e[d],u[d]=f[d]/c[d];a[0]=u[0];for(let d=1;d<o-1;d++)u[d]===0||u[d-1]===0||u[d-1]>0!=u[d]>0?a[d]=0:(a[d]=3*(c[d-1]+c[d])/((2*c[d]+c[d-1])/u[d-1]+(c[d]+2*c[d-1])/u[d]),isFinite(a[d])||(a[d]=0));a[o-1]=u[o-2];for(let d=0;d<o-1;d++)r(i,e[d]+c[d]/3,t[d]+a[d]*c[d]/3,e[d+1]-c[d]/3,t[d+1]-a[d+1]*c[d]/3,e[d+1],t[d+1])}return i}const ku=new Set;function up(){for(let e of ku)e.syncRect(!0)}cl&&(wr(uO,Jr,up),wr(cO,Jr,up,!0),wr(ui,Jr,()=>{ln.pxRatio=Xe}));const Ck=Rg(),Ik=Eg();function cp(e,t,n,s){return(s?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((l,o)=>xu(l,o,t,n))}function Dk(e,t){return e.map((n,s)=>s==0?{}:$t({},t,n))}function xu(e,t,n,s){return $t({},t==0?n:s,e)}function Ag(e,t,n){return t==null?ll:[t,n]}const Pk=Ag;function Nk(e,t,n){return t==null?ll:ci(t,n,fc,!0)}function Tg(e,t,n,s){return t==null?ll:Bi(t,n,e.scales[s].log,!1)}const $k=Tg;function Og(e,t,n,s){return t==null?ll:cc(t,n,e.scales[s].log,!1)}const Lk=Og;function Mk(e,t,n,s,r){let l=gn(Vd(e),Vd(t)),o=t-e,i=Wn(r/s*o,n);do{let a=n[i],u=s*a/o;if(u>=r&&l+(a<5?tr.get(a):0)<=17)return[a,u]}while(++i<n.length);return[0,0]}function fp(e){let t,n;return e=e.replace(/(\d+)px/,(s,r)=>(t=Mt((n=+r)*Xe))+"px"),[e,t,n]}function Fk(e){e.show&&[e.font,e.labelFont].forEach(t=>{let n=ct(t[2]*Xe,1);t[0]=t[0].replace(/[0-9.]+px/,n+"px"),t[1]=n})}function ln(e,t,n){const s={mode:Qe(e.mode,1)},r=s.mode;function l(p,y,b,E){let P=y.valToPct(p);return E+b*(y.dir==-1?1-P:P)}function o(p,y,b,E){let P=y.valToPct(p);return E+b*(y.dir==-1?P:1-P)}function i(p,y,b,E){return y.ori==0?l(p,y,b,E):o(p,y,b,E)}s.valToPosH=l,s.valToPosV=o;let a=!1;s.status=0;const u=s.root=Nn(GT);if(e.id!=null&&(u.id=e.id),An(u,e.class),e.title){let p=Nn(KT,u);p.textContent=e.title}const f=zn("canvas"),c=s.ctx=f.getContext("2d"),d=Nn(YT,u);wr("click",d,p=>{p.target===S&&(mt!=Pr||bt!=Nr)&&Qt.click(s,p)},!0);const h=s.under=Nn(JT,d);d.appendChild(f);const S=s.over=Nn(QT,d);e=ol(e);const R=+Qe(e.pxAlign,1),D=ip(R);(e.plugins||[]).forEach(p=>{p.opts&&(e=p.opts(s,e)||e)});const _=e.ms||.001,g=s.series=r==1?cp(e.series||[],ep,lp,!1):Dk(e.series||[null],rp),O=s.axes=cp(e.axes||[],Xd,np,!0),w=s.scales={},T=s.bands=e.bands||[];T.forEach(p=>{p.fill=We(p.fill||null),p.dir=Qe(p.dir,-1)});const C=r==2?g[1].facets[0].scale:g[0].scale,U={axes:Mg,series:Dg},j=(e.drawOrder||["axes","series"]).map(p=>U[p]);function ee(p){const y=p.distr==3?b=>ks(b>0?b:p.clamp(s,b,p.min,p.max,p.key)):p.distr==4?b=>za(b,p.asinh):p.distr==100?b=>p.fwd(b):b=>b;return b=>{let E=y(b),{_min:P,_max:V}=p,ne=V-P;return(E-P)/ne}}function le(p){let y=w[p];if(y==null){let b=(e.scales||Kl)[p]||Kl;if(b.from!=null){le(b.from);let E=$t({},w[b.from],b,{key:p});E.valToPct=ee(E),w[p]=E}else{y=w[p]=$t({},p==C?mg:bk,b),y.key=p;let E=y.time,P=y.range,V=Ks(P);if((p!=C||r==2&&!E)&&(V&&(P[0]==null||P[1]==null)&&(P={min:P[0]==null?Ud:{mode:1,hard:P[0],soft:P[0]},max:P[1]==null?Ud:{mode:1,hard:P[1],soft:P[1]}},V=!1),!V&&Vi(P))){let ne=P;P=(ue,ve,Re)=>ve==null?ll:ci(ve,Re,ne)}y.range=We(P||(E?Pk:p==C?y.distr==3?$k:y.distr==4?Lk:Ag:y.distr==3?Tg:y.distr==4?Og:Nk)),y.auto=We(V?!1:y.auto),y.clamp=We(y.clamp||vk),y._min=y._max=null,y.valToPct=ee(y)}}}le("x"),le("y"),r==1&&g.forEach(p=>{le(p.scale)}),O.forEach(p=>{le(p.scale)});for(let p in e.scales)le(p);const z=w[C],ke=z.distr;let we,te;z.ori==0?(An(u,WT),we=l,te=o):(An(u,qT),we=o,te=l);const W={};for(let p in w){let y=w[p];(y.min!=null||y.max!=null)&&(W[p]={min:y.min,max:y.max},y.min=y.max=null)}const q=e.tzDate||(p=>new Date(Mt(p/_))),H=e.fmtDate||hc,Q=_==1?WO(q):YO(q),me=Jd(q,Yd(_==1?GO:KO,H)),_e=Zd(q,Qd(QO,H)),Ee=[],oe=s.legend=$t({},ek,e.legend),pe=s.cursor=$t({},ok,{drag:{y:r==2}},e.cursor),$e=oe.show,He=pe.show,Me=oe.markers;oe.idxs=Ee,Me.width=We(Me.width),Me.dash=We(Me.dash),Me.stroke=We(Me.stroke),Me.fill=We(Me.fill);let M,fe,ae,he=[],v=[],A,x=!1,B={};if(oe.live){const p=g[1]?g[1].values:null;x=p!=null,A=x?p(s,1,0):{_:0};for(let y in A)B[y]=ac}if($e)if(M=zn("table",sO,u),ae=zn("tbody",null,M),oe.mount(s,M),x){fe=zn("thead",null,M,ae);let p=zn("tr",null,fe);zn("th",null,p);for(var K in A)zn("th",Td,p).textContent=K}else An(M,lO),oe.live&&An(M,rO);const X={show:!0},se={show:!1};function J(p,y){if(y==0&&(x||!oe.live||r==2))return ll;let b=[],E=zn("tr",oO,ae,ae.childNodes[y]);An(E,p.class),p.show||An(E,hr);let P=zn("th",null,E);if(Me.show){let ue=Nn(iO,P);if(y>0){let ve=Me.width(s,y);ve&&(ue.style.border=ve+"px "+Me.dash(s,y)+" "+Me.stroke(s,y)),ue.style.background=Me.fill(s,y)}}let V=Nn(Td,P);p.label instanceof HTMLElement?V.appendChild(p.label):V.textContent=p.label,y>0&&(Me.show||(V.style.color=p.width>0?Me.stroke(s,y):Me.fill(s,y)),Y("click",P,ue=>{if(pe._lock)return;gs(ue);let ve=g.indexOf(p);if((ue.ctrlKey||ue.metaKey)!=oe.isolate){let Re=g.some((Te,Ce)=>Ce>0&&Ce!=ve&&Te.show);g.forEach((Te,Ce)=>{Ce>0&&Xn(Ce,Re?Ce==ve?X:se:X,!0,Nt.setSeries)})}else Xn(ve,{show:!p.show},!0,Nt.setSeries)},!1),Ls&&Y(Cd,P,ue=>{pe._lock||(gs(ue),Xn(g.indexOf(p),Lr,!0,Nt.setSeries))},!1));for(var ne in A){let ue=zn("td",aO,E);ue.textContent="--",b.push(ue)}return[E,b]}const re=new Map;function Y(p,y,b,E=!0){const P=re.get(y)||{},V=pe.bind[p](s,y,b,E);V&&(wr(p,y,P[p]=V),re.set(y,P))}function Ae(p,y,b){const E=re.get(y)||{};for(let P in E)(p==null||P==p)&&(Su(P,y,E[P]),delete E[P]);p==null&&re.delete(y)}let ye=0,Ie=0,ce=0,ie=0,Pe=0,Fe=0,st=Pe,ot=Fe,St=ce,Rt=ie,Tt=0,Dt=0,qe=0,it=0;s.bbox={};let $s=!1,on=!1,Zn=!1,ms=!1,sr=!1,an=!1;function pl(p,y,b){(b||p!=s.width||y!=s.height)&&bo(p,y),xr(!1),Zn=!0,on=!0,Cr()}function bo(p,y){s.width=ye=ce=p,s.height=Ie=ie=y,Pe=Fe=0,Eo(),Yi();let b=s.bbox;Tt=b.left=fr(Pe*Xe,.5),Dt=b.top=fr(Fe*Xe,.5),qe=b.width=fr(ce*Xe,.5),it=b.height=fr(ie*Xe,.5)}const Ki=3;function Bn(){let p=!1,y=0;for(;!p;){y++;let b=$g(y),E=Lg(y);p=y==Ki||b&&E,p||(bo(s.width,s.height),on=!0)}}function wo({width:p,height:y}){pl(p,y)}s.setSize=wo;function Eo(){let p=!1,y=!1,b=!1,E=!1;O.forEach((P,V)=>{if(P.show&&P._show){let{side:ne,_size:ue}=P,ve=ne%2,Re=P.label!=null?P.labelSize:0,Te=ue+Re;Te>0&&(ve?(ce-=Te,ne==3?(Pe+=Te,E=!0):b=!0):(ie-=Te,ne==0?(Fe+=Te,p=!0):y=!0))}}),rr[0]=p,rr[1]=b,rr[2]=y,rr[3]=E,ce-=Fs[1]+Fs[3],Pe+=Fs[3],ie-=Fs[2]+Fs[0],Fe+=Fs[0]}function Yi(){let p=Pe+ce,y=Fe+ie,b=Pe,E=Fe;function P(V,ne){switch(V){case 1:return p+=ne,p-ne;case 2:return y+=ne,y-ne;case 3:return b-=ne,b+ne;case 0:return E-=ne,E+ne}}O.forEach((V,ne)=>{if(V.show&&V._show){let ue=V.side;V._pos=P(ue,V._size),V.label!=null&&(V._lpos=P(ue,V.labelSize))}})}if(pe.dataIdx==null){let p=pe.hover,y=p.skip=new Set(p.skip??[]);y.add(void 0);let b=p.prox=We(p.prox),E=p.bias??(p.bias=0);pe.dataIdx=(P,V,ne,ue)=>{if(V==0)return ne;let ve=ne,Re=b(P,V,ne,ue)??ut,Te=Re>=0&&Re<ut,Ce=z.ori==0?ce:ie,Be=pe.left,Ze=t[0],Ye=t[V];if(y.has(Ye[ne])){ve=null;let ze=null,Ue=null,Ne;if(E==0||E==-1)for(Ne=ne;ze==null&&Ne-- >0;)y.has(Ye[Ne])||(ze=Ne);if(E==0||E==1)for(Ne=ne;Ue==null&&Ne++<Ye.length;)y.has(Ye[Ne])||(Ue=Ne);if(ze!=null||Ue!=null)if(Te){let _t=ze==null?-1/0:we(Ze[ze],z,Ce,0),kt=Ue==null?1/0:we(Ze[Ue],z,Ce,0),Kt=Be-_t,lt=kt-Be;Kt<=lt?Kt<=Re&&(ve=ze):lt<=Re&&(ve=Ue)}else ve=Ue==null?ze:ze==null?Ue:ne-ze<=Ue-ne?ze:Ue}else Te&&Ut(Be-we(Ze[ne],z,Ce,0))>Re&&(ve=null);return ve}}const gs=p=>{pe.event=p};pe.idxs=Ee,pe._lock=!1;let Vt=pe.points;Vt.show=We(Vt.show),Vt.size=We(Vt.size),Vt.stroke=We(Vt.stroke),Vt.width=We(Vt.width),Vt.fill=We(Vt.fill);const wn=s.focus=$t({},e.focus||{alpha:.3},pe.focus),Ls=wn.prox>=0,Ms=Ls&&Vt.one;let yn=[],$=[],F=[];function G(p,y){let b=Vt.show(s,y);if(b instanceof HTMLElement)return An(b,nO),An(b,p.class),rs(b,-10,-10,ce,ie),S.insertBefore(b,yn[y]),b}function Ke(p,y){if(r==1||y>0){let b=r==1&&w[p.scale].time,E=p.value;p.value=b?Gd(E)?Zd(q,Qd(E,H)):E||_e:E||gk,p.label=p.label||(b?ak:ik)}if(Ms||y>0){p.width=p.width==null?1:p.width,p.paths=p.paths||Ck||bO,p.fillTo=We(p.fillTo||wk),p.pxAlign=+Qe(p.pxAlign,R),p.pxRound=ip(p.pxAlign),p.stroke=We(p.stroke||null),p.fill=We(p.fill||null),p._stroke=p._fill=p._paths=p._focus=null;let b=_k(gn(1,p.width),1),E=p.points=$t({},{size:b,width:gn(1,b*.2),stroke:p.stroke,space:b*2,paths:Ik,_stroke:null,_fill:null},p.points);E.show=We(E.show),E.filter=We(E.filter),E.fill=We(E.fill),E.stroke=We(E.stroke),E.paths=We(E.paths),E.pxAlign=p.pxAlign}if($e){let b=J(p,y);he.splice(y,0,b[0]),v.splice(y,0,b[1]),oe.values.push(null)}if(He){Ee.splice(y,0,null);let b=null;Ms?y==0&&(b=G(p,y)):y>0&&(b=G(p,y)),yn.splice(y,0,b),$.splice(y,0,0),F.splice(y,0,0)}qt("addSeries",y)}function Ot(p,y){y=y??g.length,p=r==1?xu(p,y,ep,lp):xu(p,y,{},rp),g.splice(y,0,p),Ke(g[y],y)}s.addSeries=Ot;function kg(p){if(g.splice(p,1),$e){oe.values.splice(p,1),v.splice(p,1);let y=he.splice(p,1)[0];Ae(null,y.firstChild),y.remove()}He&&(Ee.splice(p,1),yn.splice(p,1)[0].remove(),$.splice(p,1),F.splice(p,1)),qt("delSeries",p)}s.delSeries=kg;const rr=[!1,!1,!1,!1];function xg(p,y){if(p._show=p.show,p.show){let b=p.side%2,E=w[p.scale];E==null&&(p.scale=b?g[1].scale:C,E=w[p.scale]);let P=E.time;p.size=We(p.size),p.space=We(p.space),p.rotate=We(p.rotate),Ks(p.incrs)&&p.incrs.forEach(ne=>{!tr.has(ne)&&tr.set(ne,Jm(ne))}),p.incrs=We(p.incrs||(E.distr==2?VO:P?_==1?zO:qO:dr)),p.splits=We(p.splits||(P&&E.distr==1?Q:E.distr==3?Au:E.distr==4?fk:ck)),p.stroke=We(p.stroke),p.grid.stroke=We(p.grid.stroke),p.ticks.stroke=We(p.ticks.stroke),p.border.stroke=We(p.border.stroke);let V=p.values;p.values=Ks(V)&&!Ks(V[0])?We(V):P?Ks(V)?Jd(q,Yd(V,H)):Gd(V)?JO(q,V):V||me:V||uk,p.filter=We(p.filter||(E.distr>=3&&E.log==10?hk:E.distr==3&&E.log==2?mk:Km)),p.font=fp(p.font),p.labelFont=fp(p.labelFont),p._size=p.size(s,null,y,0),p._space=p._rotate=p._incrs=p._found=p._splits=p._values=null,p._size>0&&(rr[y]=!0,p._el=Nn(ZT,d))}}function hl(p,y,b,E){let[P,V,ne,ue]=b,ve=y%2,Re=0;return ve==0&&(ue||V)&&(Re=y==0&&!P||y==2&&!ne?Mt(Xd.size/3):0),ve==1&&(P||ne)&&(Re=y==1&&!V||y==3&&!ue?Mt(np.size/2):0),Re}const Ec=s.padding=(e.padding||[hl,hl,hl,hl]).map(p=>We(Qe(p,hl))),Fs=s._padding=Ec.map((p,y)=>p(s,y,rr,0));let Jt,jt=null,zt=null;const So=r==1?g[0].idxs:null;let Hn=null,ml=!1;function Sc(p,y){if(t=p??[],s.data=s._data=t,r==2){Jt=0;for(let b=1;b<g.length;b++)Jt+=t[b][0].length}else{t.length==0&&(s.data=s._data=t=[[]]),Hn=t[0],Jt=Hn.length;let b=t;if(ke==2){b=t.slice();let E=b[0]=Array(Jt);for(let P=0;P<Jt;P++)E[P]=P}s._data=t=b}if(xr(!0),qt("setData"),ke==2&&(Zn=!0),y!==!1){let b=z;b.auto(s,ml)?Ji():Bs(C,b.min,b.max),ms=ms||pe.left>=0,an=!0,Cr()}}s.setData=Sc;function Ji(){ml=!0;let p,y;r==1&&(Jt>0?(jt=So[0]=0,zt=So[1]=Jt-1,p=t[0][jt],y=t[0][zt],ke==2?(p=jt,y=zt):p==y&&(ke==3?[p,y]=Bi(p,p,z.log,!1):ke==4?[p,y]=cc(p,p,z.log,!1):z.time?y=p+Mt(86400/_):[p,y]=ci(p,y,fc,!0))):(jt=So[0]=p=null,zt=So[1]=y=null)),Bs(C,p,y)}let Ro,kr,Qi,Zi,Xi,ea,ta,na,sa,vn;function Rc(p,y,b,E,P,V){p??(p=kd),b??(b=pc),E??(E="butt"),P??(P=kd),V??(V="round"),p!=Ro&&(c.strokeStyle=Ro=p),P!=kr&&(c.fillStyle=kr=P),y!=Qi&&(c.lineWidth=Qi=y),V!=Xi&&(c.lineJoin=Xi=V),E!=ea&&(c.lineCap=ea=E),b!=Zi&&c.setLineDash(Zi=b)}function Ac(p,y,b,E){y!=kr&&(c.fillStyle=kr=y),p!=ta&&(c.font=ta=p),b!=na&&(c.textAlign=na=b),E!=sa&&(c.textBaseline=sa=E)}function ra(p,y,b,E,P=0){if(E.length>0&&p.auto(s,ml)&&(y==null||y.min==null)){let V=Qe(jt,0),ne=Qe(zt,E.length-1),ue=b.min==null?hO(E,V,ne,P,p.distr==3):[b.min,b.max];p.min=Kn(p.min,b.min=ue[0]),p.max=gn(p.max,b.max=ue[1])}}const Tc={min:null,max:null};function Cg(){for(let E in w){let P=w[E];W[E]==null&&(P.min==null||W[C]!=null&&P.auto(s,ml))&&(W[E]=Tc)}for(let E in w){let P=w[E];W[E]==null&&P.from!=null&&W[P.from]!=null&&(W[E]=Tc)}W[C]!=null&&xr(!0);let p={};for(let E in W){let P=W[E];if(P!=null){let V=p[E]=ol(w[E],SO);if(P.min!=null)$t(V,P);else if(E!=C||r==2)if(Jt==0&&V.from==null){let ne=V.range(s,null,null,E);V.min=ne[0],V.max=ne[1]}else V.min=ut,V.max=-ut}}if(Jt>0){g.forEach((E,P)=>{if(r==1){let V=E.scale,ne=W[V];if(ne==null)return;let ue=p[V];if(P==0){let ve=ue.range(s,ue.min,ue.max,V);ue.min=ve[0],ue.max=ve[1],jt=Wn(ue.min,t[0]),zt=Wn(ue.max,t[0]),zt-jt>1&&(t[0][jt]<ue.min&&jt++,t[0][zt]>ue.max&&zt--),E.min=Hn[jt],E.max=Hn[zt]}else E.show&&E.auto&&ra(ue,ne,E,t[P],E.sorted);E.idxs[0]=jt,E.idxs[1]=zt}else if(P>0&&E.show&&E.auto){let[V,ne]=E.facets,ue=V.scale,ve=ne.scale,[Re,Te]=t[P],Ce=p[ue],Be=p[ve];Ce!=null&&ra(Ce,W[ue],V,Re,V.sorted),Be!=null&&ra(Be,W[ve],ne,Te,ne.sorted),E.min=ne.min,E.max=ne.max}});for(let E in p){let P=p[E],V=W[E];if(P.from==null&&(V==null||V.min==null)){let ne=P.range(s,P.min==ut?null:P.min,P.max==-ut?null:P.max,E);P.min=ne[0],P.max=ne[1]}}}for(let E in p){let P=p[E];if(P.from!=null){let V=p[P.from];if(V.min==null)P.min=P.max=null;else{let ne=P.range(s,V.min,V.max,E);P.min=ne[0],P.max=ne[1]}}}let y={},b=!1;for(let E in p){let P=p[E],V=w[E];if(V.min!=P.min||V.max!=P.max){V.min=P.min,V.max=P.max;let ne=V.distr;V._min=ne==3?ks(V.min):ne==4?za(V.min,V.asinh):ne==100?V.fwd(V.min):V.min,V._max=ne==3?ks(V.max):ne==4?za(V.max,V.asinh):ne==100?V.fwd(V.max):V.max,y[E]=b=!0}}if(b){g.forEach((E,P)=>{r==2?P>0&&y.y&&(E._paths=null):y[E.scale]&&(E._paths=null)});for(let E in y)Zn=!0,qt("setScale",E);He&&pe.left>=0&&(ms=an=!0)}for(let E in W)W[E]=null}function Ig(p){let y=Ru(jt-1,0,Jt-1),b=Ru(zt+1,0,Jt-1);for(;p[y]==null&&y>0;)y--;for(;p[b]==null&&b<Jt-1;)b++;return[y,b]}function Dg(){if(Jt>0){let p=g.some(y=>y._focus)&&vn!=wn.alpha;p&&(c.globalAlpha=vn=wn.alpha),g.forEach((y,b)=>{if(b>0&&y.show&&(Oc(b,!1),Oc(b,!0),y._paths==null)){let E=vn;vn!=y.alpha&&(c.globalAlpha=vn=y.alpha);let P=r==2?[0,t[b][0].length-1]:Ig(t[b]);y._paths=y.paths(s,b,P[0],P[1]),vn!=E&&(c.globalAlpha=vn=E)}}),g.forEach((y,b)=>{if(b>0&&y.show){let E=vn;vn!=y.alpha&&(c.globalAlpha=vn=y.alpha),y._paths!=null&&kc(b,!1);{let P=y._paths!=null?y._paths.gaps:null,V=y.points.show(s,b,jt,zt,P),ne=y.points.filter(s,b,V,P);(V||ne)&&(y.points._paths=y.points.paths(s,b,jt,zt,ne),kc(b,!0))}vn!=E&&(c.globalAlpha=vn=E),qt("drawSeries",b)}}),p&&(c.globalAlpha=vn=1)}}function Oc(p,y){let b=y?g[p].points:g[p];b._stroke=b.stroke(s,p),b._fill=b.fill(s,p)}function kc(p,y){let b=y?g[p].points:g[p],{stroke:E,fill:P,clip:V,flags:ne,_stroke:ue=b._stroke,_fill:ve=b._fill,_width:Re=b.width}=b._paths;Re=ct(Re*Xe,3);let Te=null,Ce=Re%2/2;y&&ve==null&&(ve=Re>0?"#fff":ue);let Be=b.pxAlign==1&&Ce>0;if(Be&&c.translate(Ce,Ce),!y){let Ze=Tt-Re/2,Ye=Dt-Re/2,ze=qe+Re,Ue=it+Re;Te=new Path2D,Te.rect(Ze,Ye,ze,Ue)}y?la(ue,Re,b.dash,b.cap,ve,E,P,ne,V):Pg(p,ue,Re,b.dash,b.cap,ve,E,P,ne,Te,V),Be&&c.translate(-Ce,-Ce)}function Pg(p,y,b,E,P,V,ne,ue,ve,Re,Te){let Ce=!1;ve!=0&&T.forEach((Be,Ze)=>{if(Be.series[0]==p){let Ye=g[Be.series[1]],ze=t[Be.series[1]],Ue=(Ye._paths||Kl).band;Ks(Ue)&&(Ue=Be.dir==1?Ue[0]:Ue[1]);let Ne,_t=null;Ye.show&&Ue&&gO(ze,jt,zt)?(_t=Be.fill(s,Ze)||V,Ne=Ye._paths.clip):Ue=null,la(y,b,E,P,_t,ne,ue,ve,Re,Te,Ne,Ue),Ce=!0}}),Ce||la(y,b,E,P,V,ne,ue,ve,Re,Te)}const xc=il|Ou;function la(p,y,b,E,P,V,ne,ue,ve,Re,Te,Ce){Rc(p,y,b,E,P),(ve||Re||Ce)&&(c.save(),ve&&c.clip(ve),Re&&c.clip(Re)),Ce?(ue&xc)==xc?(c.clip(Ce),Te&&c.clip(Te),To(P,ne),Ao(p,V,y)):ue&Ou?(To(P,ne),c.clip(Ce),Ao(p,V,y)):ue&il&&(c.save(),c.clip(Ce),Te&&c.clip(Te),To(P,ne),c.restore(),Ao(p,V,y)):(To(P,ne),Ao(p,V,y)),(ve||Re||Ce)&&c.restore()}function Ao(p,y,b){b>0&&(y instanceof Map?y.forEach((E,P)=>{c.strokeStyle=Ro=P,c.stroke(E)}):y!=null&&p&&c.stroke(y))}function To(p,y){y instanceof Map?y.forEach((b,E)=>{c.fillStyle=kr=E,c.fill(b)}):y!=null&&p&&c.fill(y)}function Ng(p,y,b,E){let P=O[p],V;if(E<=0)V=[0,0];else{let ne=P._space=P.space(s,p,y,b,E),ue=P._incrs=P.incrs(s,p,y,b,E,ne);V=Mk(y,b,ue,E,ne)}return P._found=V}function oa(p,y,b,E,P,V,ne,ue,ve,Re){let Te=ne%2/2;R==1&&c.translate(Te,Te),Rc(ue,ne,ve,Re,ue),c.beginPath();let Ce,Be,Ze,Ye,ze=P+(E==0||E==3?-V:V);b==0?(Be=P,Ye=ze):(Ce=P,Ze=ze);for(let Ue=0;Ue<p.length;Ue++)y[Ue]!=null&&(b==0?Ce=Ze=p[Ue]:Be=Ye=p[Ue],c.moveTo(Ce,Be),c.lineTo(Ze,Ye));c.stroke(),R==1&&c.translate(-Te,-Te)}function $g(p){let y=!0;return O.forEach((b,E)=>{if(!b.show)return;let P=w[b.scale];if(P.min==null){b._show&&(y=!1,b._show=!1,xr(!1));return}else b._show||(y=!1,b._show=!0,xr(!1));let V=b.side,ne=V%2,{min:ue,max:ve}=P,[Re,Te]=Ng(E,ue,ve,ne==0?ce:ie);if(Te==0)return;let Ce=P.distr==2,Be=b._splits=b.splits(s,E,ue,ve,Re,Te,Ce),Ze=P.distr==2?Be.map(Ne=>Hn[Ne]):Be,Ye=P.distr==2?Hn[Be[1]]-Hn[Be[0]]:Re,ze=b._values=b.values(s,b.filter(s,Ze,E,Te,Ye),E,Te,Ye);b._rotate=V==2?b.rotate(s,ze,E,Te):0;let Ue=b._size;b._size=$n(b.size(s,ze,E,p)),Ue!=null&&b._size!=Ue&&(y=!1)}),y}function Lg(p){let y=!0;return Ec.forEach((b,E)=>{let P=b(s,E,rr,p);P!=Fs[E]&&(y=!1),Fs[E]=P}),y}function Mg(){for(let p=0;p<O.length;p++){let y=O[p];if(!y.show||!y._show)continue;let b=y.side,E=b%2,P,V,ne=y.stroke(s,p),ue=b==0||b==3?-1:1,[ve,Re]=y._found;if(y.label!=null){let cn=y.labelGap*ue,Rn=Mt((y._lpos+cn)*Xe);Ac(y.labelFont[0],ne,"center",b==2?xl:Od),c.save(),E==1?(P=V=0,c.translate(Rn,Mt(Dt+it/2)),c.rotate((b==3?-Yo:Yo)/2)):(P=Mt(Tt+qe/2),V=Rn);let ir=Wm(y.label)?y.label(s,p,ve,Re):y.label;c.fillText(ir,P,V),c.restore()}if(Re==0)continue;let Te=w[y.scale],Ce=E==0?qe:it,Be=E==0?Tt:Dt,Ze=y._splits,Ye=Te.distr==2?Ze.map(cn=>Hn[cn]):Ze,ze=Te.distr==2?Hn[Ze[1]]-Hn[Ze[0]]:ve,Ue=y.ticks,Ne=y.border,_t=Ue.show?Ue.size:0,kt=Mt(_t*Xe),Kt=Mt((y.alignTo==2?y._size-_t-y.gap:y.gap)*Xe),lt=y._rotate*-Yo/180,xt=D(y._pos*Xe),En=(kt+Kt)*ue,un=xt+En;V=E==0?un:0,P=E==1?un:0;let Dn=y.font[0],Vn=y.align==1?Vr:y.align==2?Ha:lt>0?Vr:lt<0?Ha:E==0?"center":b==3?Ha:Vr,ts=lt||E==1?"middle":b==2?xl:Od;Ac(Dn,ne,Vn,ts);let Sn=y.font[1]*y.lineGap,Pn=Ze.map(cn=>D(i(cn,Te,Ce,Be))),jn=y._values;for(let cn=0;cn<jn.length;cn++){let Rn=jn[cn];if(Rn!=null){E==0?P=Pn[cn]:V=Pn[cn],Rn=""+Rn;let ir=Rn.indexOf(`
|
|
131
|
+
`)==-1?[Rn]:Rn.split(/\n/gm);for(let fn=0;fn<ir.length;fn++){let Kc=ir[fn];lt?(c.save(),c.translate(P,V+fn*Sn),c.rotate(lt),c.fillText(Kc,0,0),c.restore()):c.fillText(Kc,P,V+fn*Sn)}}}Ue.show&&oa(Pn,Ue.filter(s,Ye,p,Re,ze),E,b,xt,kt,ct(Ue.width*Xe,3),Ue.stroke(s,p),Ue.dash,Ue.cap);let ns=y.grid;ns.show&&oa(Pn,ns.filter(s,Ye,p,Re,ze),E,E==0?2:1,E==0?Dt:Tt,E==0?it:qe,ct(ns.width*Xe,3),ns.stroke(s,p),ns.dash,ns.cap),Ne.show&&oa([xt],[1],E==0?1:0,E==0?1:2,E==1?Dt:Tt,E==1?it:qe,ct(Ne.width*Xe,3),Ne.stroke(s,p),Ne.dash,Ne.cap)}qt("drawAxes")}function xr(p){g.forEach((y,b)=>{b>0&&(y._paths=null,p&&(r==1?(y.min=null,y.max=null):y.facets.forEach(E=>{E.min=null,E.max=null})))})}let Oo=!1,ia=!1,gl=[];function Fg(){ia=!1;for(let p=0;p<gl.length;p++)qt(...gl[p]);gl.length=0}function Cr(){Oo||(CO(Cc),Oo=!0)}function Ug(p,y=!1){Oo=!0,ia=y,p(s),Cc(),y&&gl.length>0&&queueMicrotask(Fg)}s.batch=Ug;function Cc(){if($s&&(Cg(),$s=!1),Zn&&(Bn(),Zn=!1),on){if(yt(h,Vr,Pe),yt(h,xl,Fe),yt(h,$l,ce),yt(h,Ll,ie),yt(S,Vr,Pe),yt(S,xl,Fe),yt(S,$l,ce),yt(S,Ll,ie),yt(d,$l,ye),yt(d,Ll,Ie),f.width=Mt(ye*Xe),f.height=Mt(Ie*Xe),O.forEach(({_el:p,_show:y,_size:b,_pos:E,side:P})=>{if(p!=null)if(y){let V=P===3||P===0?b:0,ne=P%2==1;yt(p,ne?"left":"top",E-V),yt(p,ne?"width":"height",b),yt(p,ne?"top":"left",ne?Fe:Pe),yt(p,ne?"height":"width",ne?ie:ce),Eu(p,hr)}else An(p,hr)}),Ro=kr=Qi=Xi=ea=ta=na=sa=Zi=null,vn=1,vl(!0),Pe!=st||Fe!=ot||ce!=St||ie!=Rt){xr(!1);let p=ce/St,y=ie/Rt;if(He&&!ms&&pe.left>=0){pe.left*=p,pe.top*=y,Ir&&rs(Ir,Mt(pe.left),0,ce,ie),Dr&&rs(Dr,0,Mt(pe.top),ce,ie);for(let b=0;b<yn.length;b++){let E=yn[b];E!=null&&($[b]*=p,F[b]*=y,rs(E,$n($[b]),$n(F[b]),ce,ie))}}if(gt.show&&!sr&>.left>=0&>.width>0){gt.left*=p,gt.width*=p,gt.top*=y,gt.height*=y;for(let b in pa)yt($r,b,gt[b])}st=Pe,ot=Fe,St=ce,Rt=ie}qt("setSize"),on=!1}ye>0&&Ie>0&&(c.clearRect(0,0,f.width,f.height),qt("drawClear"),j.forEach(p=>p()),qt("draw")),gt.show&&sr&&(ko(gt),sr=!1),He&&ms&&(or(null,!0,!1),ms=!1),oe.show&&oe.live&&an&&(fa(),an=!1),a||(a=!0,s.status=1,qt("ready")),ml=!1,Oo=!1}s.redraw=(p,y)=>{Zn=y||!1,p!==!1?Bs(C,z.min,z.max):Cr()};function aa(p,y){let b=w[p];if(b.from==null){if(Jt==0){let E=b.range(s,y.min,y.max,p);y.min=E[0],y.max=E[1]}if(y.min>y.max){let E=y.min;y.min=y.max,y.max=E}if(Jt>1&&y.min!=null&&y.max!=null&&y.max-y.min<1e-16)return;p==C&&b.distr==2&&Jt>0&&(y.min=Wn(y.min,t[0]),y.max=Wn(y.max,t[0]),y.min==y.max&&y.max++),W[p]=y,$s=!0,Cr()}}s.setScale=aa;let ua,ca,Ir,Dr,Ic,Dc,Pr,Nr,Pc,Nc,mt,bt,Us=!1;const Qt=pe.drag;let Gt=Qt.x,Wt=Qt.y;He&&(pe.x&&(ua=Nn(eO,S)),pe.y&&(ca=Nn(tO,S)),z.ori==0?(Ir=ua,Dr=ca):(Ir=ca,Dr=ua),mt=pe.left,bt=pe.top);const gt=s.select=$t({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),$r=gt.show?Nn(XT,gt.over?S:h):null;function ko(p,y){if(gt.show){for(let b in p)gt[b]=p[b],b in pa&&yt($r,b,p[b]);y!==!1&&qt("setSelect")}}s.setSelect=ko;function Bg(p){if(g[p].show)$e&&Eu(he[p],hr);else if($e&&An(he[p],hr),He){let b=Ms?yn[0]:yn[p];b!=null&&rs(b,-10,-10,ce,ie)}}function Bs(p,y,b){aa(p,{min:y,max:b})}function Xn(p,y,b,E){y.focus!=null&&Gg(p),y.show!=null&&g.forEach((P,V)=>{V>0&&(p==V||p==null)&&(P.show=y.show,Bg(V),r==2?(Bs(P.facets[0].scale,null,null),Bs(P.facets[1].scale,null,null)):Bs(P.scale,null,null),Cr())}),b!==!1&&qt("setSeries",p,y),E&&bl("setSeries",s,p,y)}s.setSeries=Xn;function Hg(p,y){$t(T[p],y)}function Vg(p,y){p.fill=We(p.fill||null),p.dir=Qe(p.dir,-1),y=y??T.length,T.splice(y,0,p)}function jg(p){p==null?T.length=0:T.splice(p,1)}s.addBand=Vg,s.setBand=Hg,s.delBand=jg;function zg(p,y){g[p].alpha=y,He&&yn[p]!=null&&(yn[p].style.opacity=y),$e&&he[p]&&(he[p].style.opacity=y)}let _s,Hs,lr;const Lr={focus:!0};function Gg(p){if(p!=lr){let y=p==null,b=wn.alpha!=1;g.forEach((E,P)=>{if(r==1||P>0){let V=y||P==0||P==p;E._focus=y?null:V,b&&zg(P,V?1:wn.alpha)}}),lr=p,b&&Cr()}}$e&&Ls&&Y(Id,M,p=>{pe._lock||(gs(p),lr!=null&&Xn(null,Lr,!0,Nt.setSeries))});function es(p,y,b){let E=w[y];b&&(p=p/Xe-(E.ori==1?Fe:Pe));let P=ce;E.ori==1&&(P=ie,p=P-p),E.dir==-1&&(p=P-p);let V=E._min,ne=E._max,ue=p/P,ve=V+(ne-V)*ue,Re=E.distr;return Re==3?rl(10,ve):Re==4?yO(ve,E.asinh):Re==100?E.bwd(ve):ve}function Wg(p,y){let b=es(p,C,y);return Wn(b,t[0],jt,zt)}s.valToIdx=p=>Wn(p,t[0]),s.posToIdx=Wg,s.posToVal=es,s.valToPos=(p,y,b)=>w[y].ori==0?l(p,w[y],b?qe:ce,b?Tt:0):o(p,w[y],b?it:ie,b?Dt:0),s.setCursor=(p,y,b)=>{mt=p.left,bt=p.top,or(null,y,b)};function $c(p,y){yt($r,Vr,gt.left=p),yt($r,$l,gt.width=y)}function Lc(p,y){yt($r,xl,gt.top=p),yt($r,Ll,gt.height=y)}let _l=z.ori==0?$c:Lc,yl=z.ori==1?$c:Lc;function qg(){if($e&&oe.live)for(let p=r==2?1:0;p<g.length;p++){if(p==0&&x)continue;let y=oe.values[p],b=0;for(let E in y)v[p][b++].firstChild.nodeValue=y[E]}}function fa(p,y){if(p!=null&&(p.idxs?p.idxs.forEach((b,E)=>{Ee[E]=b}):EO(p.idx)||Ee.fill(p.idx),oe.idx=Ee[0]),$e&&oe.live){for(let b=0;b<g.length;b++)(b>0||r==1&&!x)&&Kg(b,Ee[b]);qg()}an=!1,y!==!1&&qt("setLegend")}s.setLegend=fa;function Kg(p,y){let b=g[p],E=p==0&&ke==2?Hn:t[p],P;x?P=b.values(s,p,y)??B:(P=b.value(s,y==null?null:E[y],p,y),P=P==null?B:{_:P}),oe.values[p]=P}function or(p,y,b){Pc=mt,Nc=bt,[mt,bt]=pe.move(s,mt,bt),pe.left=mt,pe.top=bt,He&&(Ir&&rs(Ir,Mt(mt),0,ce,ie),Dr&&rs(Dr,0,Mt(bt),ce,ie));let E,P=jt>zt;_s=ut,Hs=null;let V=z.ori==0?ce:ie,ne=z.ori==1?ce:ie;if(mt<0||Jt==0||P){E=pe.idx=null;for(let ue=0;ue<g.length;ue++){let ve=yn[ue];ve!=null&&rs(ve,-10,-10,ce,ie)}Ls&&Xn(null,Lr,!0,p==null&&Nt.setSeries),oe.live&&(Ee.fill(E),an=!0)}else{let ue,ve,Re;r==1&&(ue=z.ori==0?mt:bt,ve=es(ue,C),E=pe.idx=Wn(ve,t[0],jt,zt),Re=we(t[0][E],z,V,0));let Te=-10,Ce=-10,Be=0,Ze=0,Ye=!0,ze="",Ue="";for(let Ne=r==2?1:0;Ne<g.length;Ne++){let _t=g[Ne],kt=Ee[Ne],Kt=kt==null?null:r==1?t[Ne][kt]:t[Ne][1][kt],lt=pe.dataIdx(s,Ne,E,ve),xt=lt==null?null:r==1?t[Ne][lt]:t[Ne][1][lt];if(an=an||xt!=Kt||lt!=kt,Ee[Ne]=lt,Ne>0&&_t.show){let En=lt==null?-10:lt==E?Re:we(r==1?t[0][lt]:t[Ne][0][lt],z,V,0),un=xt==null?-10:te(xt,r==1?w[_t.scale]:w[_t.facets[1].scale],ne,0);if(Ls&&xt!=null){let Dn=z.ori==1?mt:bt,Vn=Ut(wn.dist(s,Ne,lt,un,Dn));if(Vn<_s){let ts=wn.bias;if(ts!=0){let Sn=es(Dn,_t.scale),Pn=xt>=0?1:-1,jn=Sn>=0?1:-1;jn==Pn&&(jn==1?ts==1?xt>=Sn:xt<=Sn:ts==1?xt<=Sn:xt>=Sn)&&(_s=Vn,Hs=Ne)}else _s=Vn,Hs=Ne}}if(an||Ms){let Dn,Vn;z.ori==0?(Dn=En,Vn=un):(Dn=un,Vn=En);let ts,Sn,Pn,jn,ns,cn,Rn=!0,ir=Vt.bbox;if(ir!=null){Rn=!1;let fn=ir(s,Ne);Pn=fn.left,jn=fn.top,ts=fn.width,Sn=fn.height}else Pn=Dn,jn=Vn,ts=Sn=Vt.size(s,Ne);if(cn=Vt.fill(s,Ne),ns=Vt.stroke(s,Ne),Ms)Ne==Hs&&_s<=wn.prox&&(Te=Pn,Ce=jn,Be=ts,Ze=Sn,Ye=Rn,ze=cn,Ue=ns);else{let fn=yn[Ne];fn!=null&&($[Ne]=Pn,F[Ne]=jn,Fd(fn,ts,Sn,Rn),Ld(fn,cn,ns),rs(fn,$n(Pn),$n(jn),ce,ie))}}}}if(Ms){let Ne=wn.prox,_t=lr==null?_s<=Ne:_s>Ne||Hs!=lr;if(an||_t){let kt=yn[0];kt!=null&&($[0]=Te,F[0]=Ce,Fd(kt,Be,Ze,Ye),Ld(kt,ze,Ue),rs(kt,$n(Te),$n(Ce),ce,ie))}}}if(gt.show&&Us)if(p!=null){let[ue,ve]=Nt.scales,[Re,Te]=Nt.match,[Ce,Be]=p.cursor.sync.scales,Ze=p.cursor.drag;if(Gt=Ze._x,Wt=Ze._y,Gt||Wt){let{left:Ye,top:ze,width:Ue,height:Ne}=p.select,_t=p.scales[Ce].ori,kt=p.posToVal,Kt,lt,xt,En,un,Dn=ue!=null&&Re(ue,Ce),Vn=ve!=null&&Te(ve,Be);Dn&&Gt?(_t==0?(Kt=Ye,lt=Ue):(Kt=ze,lt=Ne),xt=w[ue],En=we(kt(Kt,Ce),xt,V,0),un=we(kt(Kt+lt,Ce),xt,V,0),_l(Kn(En,un),Ut(un-En))):_l(0,V),Vn&&Wt?(_t==1?(Kt=Ye,lt=Ue):(Kt=ze,lt=Ne),xt=w[ve],En=te(kt(Kt,Be),xt,ne,0),un=te(kt(Kt+lt,Be),xt,ne,0),yl(Kn(En,un),Ut(un-En))):yl(0,ne)}else ha()}else{let ue=Ut(Pc-Ic),ve=Ut(Nc-Dc);if(z.ori==1){let Be=ue;ue=ve,ve=Be}Gt=Qt.x&&ue>=Qt.dist,Wt=Qt.y&&ve>=Qt.dist;let Re=Qt.uni;Re!=null?Gt&&Wt&&(Gt=ue>=Re,Wt=ve>=Re,!Gt&&!Wt&&(ve>ue?Wt=!0:Gt=!0)):Qt.x&&Qt.y&&(Gt||Wt)&&(Gt=Wt=!0);let Te,Ce;Gt&&(z.ori==0?(Te=Pr,Ce=mt):(Te=Nr,Ce=bt),_l(Kn(Te,Ce),Ut(Ce-Te)),Wt||yl(0,ne)),Wt&&(z.ori==1?(Te=Pr,Ce=mt):(Te=Nr,Ce=bt),yl(Kn(Te,Ce),Ut(Ce-Te)),Gt||_l(0,V)),!Gt&&!Wt&&(_l(0,0),yl(0,0))}if(Qt._x=Gt,Qt._y=Wt,p==null){if(b){if(qc!=null){let[ue,ve]=Nt.scales;Nt.values[0]=ue!=null?es(z.ori==0?mt:bt,ue):null,Nt.values[1]=ve!=null?es(z.ori==1?mt:bt,ve):null}bl(Va,s,mt,bt,ce,ie,E)}if(Ls){let ue=b&&Nt.setSeries,ve=wn.prox;lr==null?_s<=ve&&Xn(Hs,Lr,!0,ue):_s>ve?Xn(null,Lr,!0,ue):Hs!=lr&&Xn(Hs,Lr,!0,ue)}}an&&(oe.idx=E,fa()),y!==!1&&qt("setCursor")}let Vs=null;Object.defineProperty(s,"rect",{get(){return Vs==null&&vl(!1),Vs}});function vl(p=!1){p?Vs=null:(Vs=S.getBoundingClientRect(),qt("syncRect",Vs))}function Mc(p,y,b,E,P,V,ne){pe._lock||Us&&p!=null&&p.movementX==0&&p.movementY==0||(da(p,y,b,E,P,V,ne,!1,p!=null),p!=null?or(null,!0,!0):or(y,!0,!1))}function da(p,y,b,E,P,V,ne,ue,ve){if(Vs==null&&vl(!1),gs(p),p!=null)b=p.clientX-Vs.left,E=p.clientY-Vs.top;else{if(b<0||E<0){mt=-10,bt=-10;return}let[Re,Te]=Nt.scales,Ce=y.cursor.sync,[Be,Ze]=Ce.values,[Ye,ze]=Ce.scales,[Ue,Ne]=Nt.match,_t=y.axes[0].side%2==1,kt=z.ori==0?ce:ie,Kt=z.ori==1?ce:ie,lt=_t?V:P,xt=_t?P:V,En=_t?E:b,un=_t?b:E;if(Ye!=null?b=Ue(Re,Ye)?i(Be,w[Re],kt,0):-10:b=kt*(En/lt),ze!=null?E=Ne(Te,ze)?i(Ze,w[Te],Kt,0):-10:E=Kt*(un/xt),z.ori==1){let Dn=b;b=E,E=Dn}}ve&&(y==null||y.cursor.event.type==Va)&&((b<=1||b>=ce-1)&&(b=fr(b,ce)),(E<=1||E>=ie-1)&&(E=fr(E,ie))),ue?(Ic=b,Dc=E,[Pr,Nr]=pe.move(s,b,E)):(mt=b,bt=E)}const pa={width:0,height:0,left:0,top:0};function ha(){ko(pa,!1)}let Fc,Uc,Bc,Hc;function Vc(p,y,b,E,P,V,ne){Us=!0,Gt=Wt=Qt._x=Qt._y=!1,da(p,y,b,E,P,V,ne,!0,!1),p!=null&&(Y(ja,bu,jc,!1),bl(xd,s,Pr,Nr,ce,ie,null));let{left:ue,top:ve,width:Re,height:Te}=gt;Fc=ue,Uc=ve,Bc=Re,Hc=Te}function jc(p,y,b,E,P,V,ne){Us=Qt._x=Qt._y=!1,da(p,y,b,E,P,V,ne,!1,!0);let{left:ue,top:ve,width:Re,height:Te}=gt,Ce=Re>0||Te>0,Be=Fc!=ue||Uc!=ve||Bc!=Re||Hc!=Te;if(Ce&&Be&&ko(gt),Qt.setScale&&Ce&&Be){let Ze=ue,Ye=Re,ze=ve,Ue=Te;if(z.ori==1&&(Ze=ve,Ye=Te,ze=ue,Ue=Re),Gt&&Bs(C,es(Ze,C),es(Ze+Ye,C)),Wt)for(let Ne in w){let _t=w[Ne];Ne!=C&&_t.from==null&&_t.min!=ut&&Bs(Ne,es(ze+Ue,Ne),es(ze,Ne))}ha()}else pe.lock&&(pe._lock=!pe._lock,or(y,!0,p!=null));p!=null&&(Ae(ja,bu),bl(ja,s,mt,bt,ce,ie,null))}function Yg(p,y,b,E,P,V,ne){if(pe._lock)return;gs(p);let ue=Us;if(Us){let ve=!0,Re=!0,Te=10,Ce,Be;z.ori==0?(Ce=Gt,Be=Wt):(Ce=Wt,Be=Gt),Ce&&Be&&(ve=mt<=Te||mt>=ce-Te,Re=bt<=Te||bt>=ie-Te),Ce&&ve&&(mt=mt<Pr?0:ce),Be&&Re&&(bt=bt<Nr?0:ie),or(null,!0,!0),Us=!1}mt=-10,bt=-10,Ee.fill(null),or(null,!0,!0),ue&&(Us=ue)}function zc(p,y,b,E,P,V,ne){pe._lock||(gs(p),Ji(),ha(),p!=null&&bl(Dd,s,mt,bt,ce,ie,null))}function Gc(){O.forEach(Fk),pl(s.width,s.height,!0)}wr(ui,Jr,Gc);const Mr={};Mr.mousedown=Vc,Mr.mousemove=Mc,Mr.mouseup=jc,Mr.dblclick=zc,Mr.setSeries=(p,y,b,E)=>{let P=Nt.match[2];b=P(s,y,b),b!=-1&&Xn(b,E,!0,!1)},He&&(Y(xd,S,Vc),Y(Va,S,Mc),Y(Cd,S,p=>{gs(p),vl(!1)}),Y(Id,S,Yg),Y(Dd,S,zc),ku.add(s),s.syncRect=vl);const xo=s.hooks=e.hooks||{};function qt(p,y,b){ia?gl.push([p,y,b]):p in xo&&xo[p].forEach(E=>{E.call(null,s,y,b)})}(e.plugins||[]).forEach(p=>{for(let y in p.hooks)xo[y]=(xo[y]||[]).concat(p.hooks[y])});const Wc=(p,y,b)=>b,Nt=$t({key:null,setSeries:!1,filters:{pub:jd,sub:jd},scales:[C,g[1]?g[1].scale:null],match:[zd,zd,Wc],values:[null,null]},pe.sync);Nt.match.length==2&&Nt.match.push(Wc),pe.sync=Nt;const qc=Nt.key,ma=gg(qc);function bl(p,y,b,E,P,V,ne){Nt.filters.pub(p,y,b,E,P,V,ne)&&ma.pub(p,y,b,E,P,V,ne)}ma.sub(s);function Jg(p,y,b,E,P,V,ne){Nt.filters.sub(p,y,b,E,P,V,ne)&&Mr[p](null,y,b,E,P,V,ne)}s.pub=Jg;function Qg(){ma.unsub(s),ku.delete(s),re.clear(),Su(ui,Jr,Gc),u.remove(),M==null||M.remove(),qt("destroy")}s.destroy=Qg;function ga(){qt("init",e,t),Sc(t||e.data,!1),W[C]?aa(C,W[C]):Ji(),sr=gt.show&&(gt.width>0||gt.height>0),ms=an=!0,pl(e.width,e.height)}return g.forEach(Ke),O.forEach(xg),n?n instanceof HTMLElement?(n.appendChild(u),ga()):n(s,ga):ga(),s}ln.assign=$t;ln.fmtNum=dc;ln.rangeNum=ci;ln.rangeLog=Bi;ln.rangeAsinh=cc;ln.orient=Or;ln.pxRatio=Xe;ln.join=xO;ln.fmtDate=hc,ln.tzDate=BO;ln.sync=gg;{ln.addGap=Ek,ln.clipGaps=ji;let e=ln.paths={points:Eg};e.linear=Rg,e.stepped=Ak,e.bars=Tk,e.spline=kk}const Uk={__name:"TrendChart",props:{series:{type:Array,default:()=>[{}]},data:{type:Array,default:()=>[[],[]]},height:{type:Number,default:220},scales:{type:Object,default:()=>({x:{time:!1}})},showLegend:{type:Boolean,default:!1}},setup(e,{expose:t}){const n=e,s=Bp(null),r=de(null);let l=null;function o(){const u=r.value;if(!u)return;const f=u.clientWidth;f&&(i(),s.value=new ln({width:f,height:n.height,series:n.series,scales:n.scales,legend:{show:n.showLegend},cursor:{drag:{x:!1,y:!1}}},n.data,u))}function i(){s.value&&(s.value.destroy(),s.value=null)}function a(){const u=r.value;if(!u)return;const f=u.clientWidth;if(f){if(!s.value){o();return}s.value.setSize({width:f,height:n.height})}}return Cs(()=>{o(),typeof ResizeObserver<"u"&&(l=new ResizeObserver(()=>a()),r.value&&l.observe(r.value)),window.addEventListener("resize",a)}),Si(()=>{window.removeEventListener("resize",a),l&&(l.disconnect(),l=null),i()}),wt(()=>n.data,u=>{if(!s.value){o();return}s.value.setData(u)},{deep:!0}),wt(()=>n.height,u=>{s.value&&s.value.setSize({width:s.value.width,height:u})}),t({chartRef:s,handleResize:a}),(u,f)=>(N(),L("div",{ref_key:"containerRef",ref:r,class:"trend-chart","data-component":"trend-chart",style:Is({minHeight:`${e.height}px`})},null,4))}},Bk=oc(Uk,[["__scopeId","data-v-1e8d3936"]]),Hk={class:"card"},Vk={class:"card__desc"},jk={key:0,class:"badge badge--warn","data-testid":"metrics-error"},zk={class:"placeholder-grid","data-testid":"metrics-cards"},Gk={class:"card","data-testid":"card-cpu"},Wk={class:"metric__value"},qk={class:"card__desc"},Kk={key:0,style:{"margin-top":"var(--space-3)"}},Yk={key:1,class:"card__desc"},Jk={class:"card","data-testid":"card-memory"},Qk={class:"metric__value"},Zk={class:"card__desc"},Xk={class:"card","data-testid":"card-eventloop"},ex={class:"metric__value"},tx={class:"card__desc"},nx={class:"card__desc"},sx={class:"card","data-testid":"card-diskio"},rx={class:"metric__value"},lx={class:"card__desc"},ox={class:"card","data-testid":"card-tasks"},ix={class:"metric__value"},ax={class:"card__desc"},ux={class:"card","data-testid":"card-recent"},cx={key:0,class:"tree",style:{"margin-top":"var(--space-2)"}},fx={class:"badge"},dx={key:1,class:"card__desc","data-testid":"recent-empty"},px={__name:"MetricsPage",setup(e){const t=Bm(),n=[{maxMs:10,label:"正常",tone:"ok",hint:"事件循环响应及时,服务不卡"},{maxMs:50,label:"有压力",tone:"warn",hint:"主线程开始排队,长任务可能拖慢请求"},{maxMs:Number.POSITIVE_INFINITY,label:"卡顿",tone:"error",hint:"主线程被占用,接口会明显变慢"}],s=xe(()=>t.frame&&t.frame.system||{}),r=xe(()=>t.frame&&t.frame.process||{}),l=xe(()=>t.frame&&t.frame.tasks||{}),o=xe(()=>{const d=r.value.eventLoopDelayMs;return typeof d!="number"?null:n.find(h=>d<h.maxMs)}),i=xe(()=>[{},{label:"系统 CPU(%)",stroke:"#2f6fed",width:1.5},{label:"本进程 CPU(%)",stroke:"#16a34a",width:1.5}]),a=xe(()=>{const d=t.history||[];if(d.length===0)return[[],[],[]];const h=d[0].ts,S=d.map(_=>Math.round((_.ts-h)/1e3)),R=d.map(_=>Number(_.system.cpuPercent??0)),D=d.map(_=>Number(_.process.cpuPercent??0));return[S,R,D]}),u=xe(()=>{const d=s.value.memUsedBytes,h=s.value.memTotalBytes;return!d||!h?null:d/h*100}),f=xe(()=>(t.recent||[]).slice(0,3));function c(d){const h=d&&Array.isArray(d.sources)&&d.sources[0];if(!h)return"—";const S=h.name||h.path||"—",R=(d.sources||[]).length;return R>1?`${S} 等 ${R} 项`:S}return Cs(()=>t.start()),fo(()=>t.stop()),(d,h)=>(N(),L(Oe,null,[m("section",Hk,[h[1]||(h[1]=m("h3",{class:"card__title"},"性能看板",-1)),m("p",Vk,[h[0]||(h[0]=ge(" 每 2 秒轮询一次;系统指标 5 秒采一次、进程指标 1 秒采一次。采集开销实测 < 0.1% CPU。 ",-1)),Z(t).errorText?(N(),L("span",jk,k(Z(t).errorText),1)):be("",!0)])]),m("section",zk,[m("article",Gk,[h[3]||(h[3]=m("h4",{class:"card__title"},"CPU",-1)),m("p",Wk,k(Z(qn)(s.value.cpuPercent)),1),m("p",qk,"系统占用;本进程 "+k(Z(qn)(r.value.cpuPercent)),1),a.value[0].length>1?(N(),L("div",Kk,[je(Bk,{series:i.value,data:a.value,height:120},null,8,["series","data"]),h[2]||(h[2]=$y('<p class="chart-legend" data-testid="cpu-chart-legend"><span class="chart-legend__item"><i class="chart-legend__dot" style="background:#2f6fed;"></i>系统 CPU </span><span class="chart-legend__item"><i class="chart-legend__dot" style="background:#16a34a;"></i>本进程 CPU </span></p>',1))])):(N(),L("p",Yk,"最近 5 分钟还没有足够的采样点"))]),m("article",Jk,[h[4]||(h[4]=m("h4",{class:"card__title"},"内存",-1)),m("p",Qk,k(Z(dt)(r.value.rssBytes)),1),m("p",Zk,[ge(" RSS;Heap "+k(Z(dt)(r.value.heapUsedBytes))+" ",1),u.value!==null?(N(),L(Oe,{key:0},[ge(" · 系统已用 "+k(Z(qn)(u.value))+"("+k(Z(dt)(s.value.memUsedBytes))+" / "+k(Z(dt)(s.value.memTotalBytes))+")",1)],64)):(N(),L(Oe,{key:1},[ge(" · 系统内存数据不可用")],64))])]),m("article",Xk,[h[5]||(h[5]=m("h4",{class:"card__title"},"事件循环延迟",-1)),m("p",ex,k(typeof r.value.eventLoopDelayMs=="number"?`${r.value.eventLoopDelayMs.toFixed(1)} ms`:"—"),1),m("p",tx,[o.value?(N(),L("span",{key:0,class:ft(["badge",`badge--${o.value.tone}`]),"data-testid":"lag-tier"},k(o.value.label),3)):be("",!0),ge(" "+k(o.value?o.value.hint:"还没有采样数据"),1)]),m("p",nx,"事件循环利用率 "+k(typeof r.value.eventLoopUtilization=="number"?Z(qn)(r.value.eventLoopUtilization*100):"—"),1)]),m("article",sx,[h[6]||(h[6]=m("h4",{class:"card__title"},"磁盘 IO",-1)),m("p",rx,k(Z(wd)(s.value.diskReadBps)),1),m("p",lx,"读;写 "+k(Z(wd)(s.value.diskWriteBps)),1)]),m("article",ox,[h[7]||(h[7]=m("h4",{class:"card__title"},"活跃压缩任务",-1)),m("p",ix,k(Z(t).loadedOnce?Number(l.value.active||0):"—"),1),m("p",ax,"排队 "+k(Z(t).loadedOnce?Number(l.value.queued||0):"—")+" 个(串行执行)",1)]),m("article",ux,[h[8]||(h[8]=m("h4",{class:"card__title"},"最近完成",-1)),f.value.length>0?(N(),L("ul",cx,[(N(!0),L(Oe,null,ht(f.value,S=>(N(),L("li",{key:S.id,class:"tree__item","data-testid":"recent-item"},[m("span",fx,k(S.format),1),m("span",null,[ge(k(c(S))+" ",1),S.result&&typeof S.result.ratio=="number"?(N(),L(Oe,{key:0},[ge(" · 节省 "+k(Z(qn)(S.result.ratio*100)),1)],64)):be("",!0),ge(" · "+k(Z(Jw)(S.finishedAt||S.updatedAt)),1)])]))),128))])):(N(),L("p",dx,"还没有完成的任务(压缩完成后会出现在这里)"))])])],64))}},hx={class:"card","data-testid":"settings-blacklist"},mx={key:0,class:"card__desc"},gx={key:1,class:"login-form__error",role:"alert","data-testid":"blacklist-error"},_x={key:2,class:"badge badge--ok","data-testid":"blacklist-notice"},yx={class:"card"},vx={class:"tree","data-testid":"blacklist-global"},bx={key:0,class:"card__desc"},wx={class:"card"},Ex={class:"card__desc"},Sx={class:"field__option"},Rx=["checked","disabled"],Ax={class:"field__option"},Tx=["disabled"],Ox=["disabled"],kx={class:"tree","data-testid":"blacklist-user-list"},xx=["disabled","data-testid","onClick"],Cx={key:0,class:"tree__item"},Ix={class:"card"},Dx={class:"card__desc"},Px={__name:"SettingsPage",setup(e){const t=Ps(),n=de(!1),s=de(!1),r=de(""),l=de(""),o=de({locked:!0,enabled:!0,patterns:[]}),i=de({enabled:!0,patterns:[],updatedAt:null}),a=de(0),u=de(""),f=xe(()=>i.value&&i.value.patterns||[]),c=xe(()=>{const _=i.value&&i.value.updatedAt;return _?new Date(_).toLocaleString("zh-CN"):"尚未保存过"});async function d(){n.value=!0,r.value="";try{const _=await Ge.get("/blacklist");o.value=_&&_.global||o.value,i.value=_&&_.user||i.value,a.value=Number(_&&_.effectiveCount||0)}catch(_){r.value=`[${_.code||"ERROR"}] ${_.message}`}finally{n.value=!1}}async function h(_,g=i.value.enabled){s.value=!0,r.value="",l.value="";try{const O=await Ge.put("/blacklist/user",{patterns:_,enabled:g!==!1});i.value=O&&O.user||i.value,l.value="已保存(立即生效)",await d()}catch(O){r.value=`[${O.code||"ERROR"}] ${O.message}`}finally{s.value=!1}}async function S(){const _=u.value.trim();if(!_){r.value="请输入扩展名(如 *.bak)或文件名(如 Thumbs.db)";return}if(f.value.some(g=>g.toLowerCase()===_.toLowerCase())){r.value=`已存在同名规则:${_}`;return}await h([...f.value,_]),r.value||(u.value="")}async function R(_){await h(f.value.filter(g=>g!==_))}async function D(_){await h(f.value,!!_.target.checked)}return Cs(d),(_,g)=>(N(),L(Oe,null,[m("section",hx,[g[1]||(g[1]=m("h3",{class:"card__title"},"黑名单",-1)),g[2]||(g[2]=m("p",{class:"card__desc"},[ge(" 已压缩格式再压几乎没有收益(jpg/mp4/zip/docx…)。命中黑名单的文件会被"),m("b",null,"跳过"),ge(": 不进压缩包、也不会被「删除原文件」删掉。匹配由服务端完成(客户端不参与判定)。 ")],-1)),n.value?(N(),L("p",mx,"读取中…")):be("",!0),r.value?(N(),L("p",gx,k(r.value),1)):be("",!0),l.value?(N(),L("p",_x,k(l.value),1)):be("",!0)]),m("section",yx,[g[3]||(g[3]=m("h3",{class:"card__title"},[ge("全局默认 "),m("span",{class:"badge"},"locked")],-1)),g[4]||(g[4]=m("p",{class:"card__desc"},[ge(" 内置规则,"),m("b",null,"不可增删改"),ge("(已压缩格式 + 系统垃圾)。想压这些文件时,在压缩抽屉里关掉「启用黑名单」即可。 ")],-1)),m("div",vx,[(N(!0),L(Oe,null,ht(o.value.patterns,O=>(N(),L("span",{key:O,class:"badge"},k(O),1))),128)),o.value.patterns.length===0?(N(),L("span",bx,"(服务端未返回内置规则)")):be("",!0)])]),m("section",wx,[g[10]||(g[10]=m("h3",{class:"card__title"},"用户自定义",-1)),m("p",Ex,[g[5]||(g[5]=ge(" 保存在服务端 ",-1)),g[6]||(g[6]=m("code",null,"storage/blacklist-user.json",-1)),ge(",立即生效(当前 "+k(f.value.length)+" 条 · 共 "+k(a.value)+" 条有效规则 · 上次保存:"+k(c.value)+")。 ",1)]),m("label",Sx,[m("input",{type:"checkbox",checked:i.value.enabled!==!1,disabled:s.value,"data-testid":"blacklist-user-enabled",onChange:D},null,40,Rx),g[7]||(g[7]=m("span",null,"启用用户自定义层(关掉后只有全局默认生效)",-1))]),m("div",Ax,[Tn(m("input",{"onUpdate:modelValue":g[0]||(g[0]=O=>u.value=O),type:"text",placeholder:"例如 *.bak 或 Thumbs.db","data-testid":"blacklist-input",disabled:s.value,onKeyup:oi(S,["enter"])},null,40,Tx),[[Xs,u.value]]),m("button",{type:"button",class:"login-form__submit","data-testid":"blacklist-add",disabled:s.value,onClick:S}," 添加 ",8,Ox)]),g[11]||(g[11]=m("p",{class:"field__hint"},[ge("支持三种写法:"),m("code",null,"*.扩展名"),ge("(大小写不敏感)、精确文件名、目录名(如 "),m("code",null,"@eaDir"),ge(")。不允许包含路径分隔符。")],-1)),m("ul",kx,[(N(!0),L(Oe,null,ht(f.value,O=>(N(),L("li",{key:O,class:"tree__item"},[g[8]||(g[8]=m("span",{class:"badge"},"user",-1)),m("code",null,k(O),1),m("button",{type:"button",class:"badge badge--warn",disabled:s.value,"data-testid":`blacklist-remove-${O}`,onClick:w=>R(O)}," 删除 ",8,xx)]))),128)),f.value.length===0?(N(),L("li",Cx,[...g[9]||(g[9]=[m("span",{class:"card__desc"},"还没有自定义规则。",-1)])])):be("",!0)])]),m("section",Ix,[g[14]||(g[14]=m("h3",{class:"card__title"},"界面偏好(已是真交互)",-1)),m("p",Dx,[g[12]||(g[12]=ge(" 当前视图模式:",-1)),m("strong",null,k(Z(t).viewMode),1),g[13]||(g[13]=ge("(顶部栏可切换;该状态存在 pinia, 未登录也不影响)。 ",-1))])])],64))}},Nx={class:"card"},$x={style:{"margin-top":"var(--space-3)"}},Lx={__name:"NotFoundPage",setup(e){return(t,n)=>(N(),L("section",Nx,[n[1]||(n[1]=m("h3",{class:"card__title"},"页面不存在",-1)),n[2]||(n[2]=m("p",{class:"card__desc"},"地址可能输错了,或该功能还没实现(当前处于 F1 前端准备块阶段)。",-1)),m("p",$x,[je(Z(Ii),{to:Z(vt).FILES},{default:co(()=>[...n[0]||(n[0]=[ge("返回文件浏览",-1)])]),_:1},8,["to"])])]))}},Mx=[{path:"/",redirect:Pm},{path:vt.LOGIN,name:"login",component:$T,meta:{title:"登录",hint:"POST /api/v1/auth/login",public:!0}},{path:vt.FILES,name:"files",component:nT,meta:{title:"文件浏览",hint:"GET /api/v1/fs/list"}},{path:vt.TASKS,name:"tasks",component:jT,meta:{title:"压缩任务",hint:"GET /api/v1/tasks + SSE 推送"}},{path:vt.METRICS,name:"metrics",component:px,meta:{title:"性能看板",hint:"GET /api/v1/metrics/*"}},{path:vt.HARDLINK,name:"hardlink",component:TT,meta:{title:"硬链接去重",hint:"POST /hardlink/scan(只读扫描)+ execute(显式确认后执行)"}},{path:vt.SETTINGS,name:"settings",component:Px,meta:{title:"设置",hint:"GET/POST /api/v1/blacklist/*"}},{path:"/:pathMatch(.*)*",name:"not-found",component:Lx,meta:{title:"页面不存在",hint:"",public:!0}}],As=$0({history:h0(),routes:Mx});As.beforeEach(e=>e.meta&&e.meta.public||yo().authenticated?!0:{path:vt.LOGIN,query:e.fullPath&&e.fullPath!=="/"?{redirect:e.fullPath}:void 0});As.afterEach(e=>{const t=e.meta&&e.meta.title?e.meta.title:"";document.title=t?`${t} · ZipCalm`:"ZipCalm 压压惊"});const Cu=wv(xS),wc=Rv();Cu.use(wc);const Iu=yo(wc),Du=Ps(wc);window.__zipcalmErrors=[];const qi=(e,t)=>{window.__zipcalmErrors.push({kind:e,detail:String(t),at:Date.now()})};window.addEventListener("error",e=>{qi("error",e.message||e.error)});window.addEventListener("unhandledrejection",e=>{qi("unhandledrejection",e.reason&&e.reason.message?e.reason.message:e.reason)});const Fx=console.error.bind(console);console.error=(...e)=>{qi("console.error",e.join(" ")),Fx(...e)};tw(e=>{const t=As.currentRoute.value;t.path!==vt.LOGIN&&(Iu.markUnauthorized(e),As.replace({path:vt.LOGIN,query:t.fullPath&&t.fullPath!=="/"?{redirect:t.fullPath}:void 0}))});As.afterEach(e=>{Du.syncRoute(e)});async function Ux(){try{await Iu.ensureLoaded()}catch(e){qi("session-probe",e&&e.message||"登录态探测失败")}Cu.use(As),Cu.mount("#app"),await As.isReady(),Du.syncRoute(As.currentRoute.value),window.__zipcalmBoot={mountedAt:Date.now(),route:As.currentRoute.value.path,authenticated:Iu.authenticated,viewMode:Du.viewMode,regions:["topbar","sidebar","main-area","bottom-task-bar"].filter(e=>!!document.querySelector(`[data-region="${e}"]`))}}Ux();
|