ehbrowser 1.0.0
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 +202 -0
- package/README.md +531 -0
- package/dist/api/contract.js +7 -0
- package/dist/api/dto/auth.js +5 -0
- package/dist/api/dto/common.js +6 -0
- package/dist/api/dto/download.js +5 -0
- package/dist/api/dto/favorite.js +5 -0
- package/dist/api/dto/gallery.js +43 -0
- package/dist/api/dto/index.js +6 -0
- package/dist/api/dto/library.js +5 -0
- package/dist/api/dto/log.js +5 -0
- package/dist/api/dto/playlist.js +8 -0
- package/dist/api/dto/settings.js +5 -0
- package/dist/api/dto/storage.js +5 -0
- package/dist/api/dto/translate.js +6 -0
- package/dist/api/envelope.js +41 -0
- package/dist/api/events.js +20 -0
- package/dist/api/index.js +12 -0
- package/dist/api/routes.js +516 -0
- package/dist/config/atomic.js +85 -0
- package/dist/config/auth-setting.js +97 -0
- package/dist/config/cli.js +19 -0
- package/dist/config/db.js +168 -0
- package/dist/config/index.js +48 -0
- package/dist/config/json-store.js +219 -0
- package/dist/config/migrations.js +100 -0
- package/dist/config/schema.js +108 -0
- package/dist/config/user-setting.js +21 -0
- package/dist/config/validate.js +173 -0
- package/dist/eh/api.js +106 -0
- package/dist/eh/archives.js +100 -0
- package/dist/eh/auth.js +89 -0
- package/dist/eh/cookies.js +65 -0
- package/dist/eh/favorites.js +94 -0
- package/dist/eh/html.js +158 -0
- package/dist/eh/http.js +214 -0
- package/dist/eh/index.js +13 -0
- package/dist/eh/types.js +11 -0
- package/dist/eh/urls.js +81 -0
- package/dist/main.js +170 -0
- package/dist/platform/errors.js +76 -0
- package/dist/platform/open-external.js +90 -0
- package/dist/platform/os.js +28 -0
- package/dist/platform/paths.js +140 -0
- package/dist/server.js +1074 -0
- package/dist/services/auth-service.js +276 -0
- package/dist/services/config-service.js +227 -0
- package/dist/services/detail-cache.js +193 -0
- package/dist/services/detail-store.js +208 -0
- package/dist/services/download-file.js +127 -0
- package/dist/services/download-service.js +586 -0
- package/dist/services/favorite-service.js +237 -0
- package/dist/services/gallery-service.js +403 -0
- package/dist/services/local-library.js +471 -0
- package/dist/services/log-service.js +139 -0
- package/dist/services/playlist-service.js +85 -0
- package/dist/services/search-cache.js +78 -0
- package/dist/services/storage-service.js +27 -0
- package/dist/services/translate-service.js +208 -0
- package/dist/services/update-service.js +268 -0
- package/dist/services/upstream-service.js +64 -0
- package/dist/services/zip.js +210 -0
- package/dist/web/assets/index-C0tAHpmx.css +1 -0
- package/dist/web/assets/index-myYEnJ1q.js +4 -0
- package/dist/web/index.html +13 -0
- package/package.json +63 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function l(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var u={},d=[],f=()=>{},p=()=>!1,m=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),h=e=>e.startsWith(`onUpdate:`),g=Object.assign,_=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},v=Object.prototype.hasOwnProperty,y=(e,t)=>v.call(e,t),b=Array.isArray,x=e=>ne(e)===`[object Map]`,S=e=>ne(e)===`[object Set]`,C=e=>ne(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,ee=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),te=Object.prototype.toString,ne=e=>te.call(e),re=e=>ne(e).slice(8,-1),ie=e=>ne(e)===`[object Object]`,ae=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,oe=l(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),O=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},se=/-\w/g,ce=O(e=>e.replace(se,e=>e.slice(1).toUpperCase())),le=/\B([A-Z])/g,ue=O(e=>e.replace(le,`-$1`).toLowerCase()),de=O(e=>e.charAt(0).toUpperCase()+e.slice(1)),fe=O(e=>e?`on${de(e)}`:``),k=(e,t)=>!Object.is(e,t),pe=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},me=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},he=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ge=e=>{let t=T(e)?Number(e):NaN;return isNaN(t)?e:t},_e,ve=()=>_e||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ye(e){if(b(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=T(r)?Ce(r):ye(r);if(i)for(let e in i)t[e]=i[e]}return t}if(T(e)||D(e))return e}var be=/;(?![^(]*\))/g,xe=/:([^]+)/,Se=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Ce(e){let t={};return e.replace(Se,e=>e.startsWith(`/*`)?``:e).split(be).forEach(e=>{if(e){let n=e.split(xe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(T(e))t=e;else if(b(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+` `)}else if(D(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var we=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Te=l(we);we+``;function Ee(e){return!!e||e===``}function De(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=je(e[i],t[i],n);return r}function Oe(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&je(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function ke(e,t,n){let r=x(e),i=x(t);if(r||i||(r=S(e),i=S(t),r||i))return r&&i?Oe(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!je(e[r],t[r],n))return!1}return String(e)===String(t)}function Ae(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function je(e,t,n){if(e===t)return!0;let r=C(e),i=C(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=E(e),i=E(t),r||i?e===t:(r=b(e),i=b(t),r||i?r&&i?Ae(e,t,n,De):!1:(r=D(e),i=D(t),r||i?!r||!i?!1:Ae(e,t,n,ke):String(e)===String(t))))}function Me(e,t){return e.findIndex(e=>je(e,t))}var Ne=e=>!!(e&&e.__v_isRef===!0),j=e=>T(e)?e:e==null?``:b(e)||D(e)&&(e.toString===te||!w(e.toString))?Ne(e)?j(e.value):JSON.stringify(e,Pe,2):String(e),Pe=(e,t)=>Ne(t)?Pe(e,t.value):x(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Fe(t,r)+` =>`]=n,e),{})}:S(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Fe(e))}:E(t)?Fe(t):D(t)&&!b(t)&&!ie(t)?String(t):t,Fe=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,Ie,Le=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Ie&&(Ie.active?(this.parent=Ie,this.index=(Ie.scopes||(Ie.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=Ie;try{return Ie=this,e()}finally{Ie=t}}}on(){++this._on===1&&(this.prevScope=Ie,Ie=this)}off(){if(this._on>0&&--this._on===0){if(Ie===this)Ie=this.prevScope;else{let e=Ie;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Re(){return Ie}var M,ze=new WeakSet,Be=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ie&&(Ie.active?Ie.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ze.has(this)&&(ze.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||We(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rt(this),qe(this);let e=M,t=$e;M=this,$e=!0;try{return this.fn()}finally{Je(this),M=e,$e=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ze(e);this.deps=this.depsTail=void 0,rt(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ze.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ye(this)&&this.run()}get dirty(){return Ye(this)}},Ve=0,He,Ue;function We(e,t=!1){if(e.flags|=8,t){e.next=Ue,Ue=e;return}e.next=He,He=e}function Ge(){Ve++}function Ke(){if(--Ve>0)return;if(Ue){let e=Ue;for(Ue=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;He;){let t=He;for(He=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function qe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Je(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ze(r),Qe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ye(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Xe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===it)||(e.globalVersion=it,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ye(e))))return;e.flags|=2;let t=e.dep,n=M,r=$e;M=e,$e=!0;try{qe(e);let n=e.fn(e._value);(t.version===0||k(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{M=n,$e=r,Je(e),e.flags&=-3}}function Ze(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ze(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Qe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var $e=!0,et=[];function tt(){et.push($e),$e=!1}function nt(){let e=et.pop();$e=e===void 0||e}function rt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var it=0,at=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},ot=class{constructor(e){this.computed=e,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(e){if(!M||!$e||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new at(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,st(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=M.depsTail,t.nextDep=void 0,M.depsTail.nextDep=t,M.depsTail=t,M.deps===t&&(M.deps=e)}return t}trigger(e){this.version++,it++,this.notify(e)}notify(e){Ge();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ke()}}};function st(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)st(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var ct=new WeakMap,lt=Symbol(``),ut=Symbol(``),dt=Symbol(``);function ft(e,t,n){if($e&&M){let t=ct.get(e);t||ct.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new ot),r.map=t,r.key=n),r.track()}}function pt(e,t,n,r,i,a){let o=ct.get(e);if(!o){it++;return}let s=e=>{e&&e.trigger()};if(Ge(),t===`clear`)o.forEach(s);else{let i=b(e),a=i&&ae(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===dt||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(dt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(lt)),x(e)&&s(o.get(ut)));break;case`delete`:i||(s(o.get(lt)),x(e)&&s(o.get(ut)));break;case`set`:x(e)&&s(o.get(lt))}}Ke()}function mt(e){let t=N(e);return t===e||(ft(t,`iterate`,dt),$t(e))?t:Qt(e)?Zt(e)?t.map(e=>rn(nn(e))):t.map(rn):t.map(nn)}function ht(e){return ft(e=N(e),`iterate`,dt),e}function gt(e,t){return Qt(e)?rn(Zt(e)?nn(t):t):nn(t)}var _t={__proto__:null,[Symbol.iterator](){return vt(this,Symbol.iterator,e=>gt(this,e))},concat(...e){return mt(this).concat(...e.map(e=>b(e)?mt(e):e))},entries(){return vt(this,`entries`,e=>(e[1]=gt(this,e[1]),e))},every(e,t){return bt(this,`every`,e,t,void 0,arguments)},filter(e,t){return bt(this,`filter`,e,t,e=>e.map(e=>gt(this,e)),arguments)},find(e,t){return bt(this,`find`,e,t,e=>gt(this,e),arguments)},findIndex(e,t){return bt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return bt(this,`findLast`,e,t,e=>gt(this,e),arguments)},findLastIndex(e,t){return bt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return bt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return St(this,`includes`,e)},indexOf(...e){return St(this,`indexOf`,e)},join(e){return mt(this).join(e)},lastIndexOf(...e){return St(this,`lastIndexOf`,e)},map(e,t){return bt(this,`map`,e,t,void 0,arguments)},pop(){return Ct(this,`pop`)},push(...e){return Ct(this,`push`,e)},reduce(e,...t){return xt(this,`reduce`,e,t)},reduceRight(e,...t){return xt(this,`reduceRight`,e,t)},shift(){return Ct(this,`shift`)},some(e,t){return bt(this,`some`,e,t,void 0,arguments)},splice(...e){return Ct(this,`splice`,e)},toReversed(){return mt(this).toReversed()},toSorted(e){return mt(this).toSorted(e)},toSpliced(...e){return mt(this).toSpliced(...e)},unshift(...e){return Ct(this,`unshift`,e)},values(){return vt(this,`values`,e=>gt(this,e))}};function vt(e,t,n){let r=ht(e),i=r[t]();return r!==e&&!$t(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var yt=Array.prototype;function bt(e,t,n,r,i,a){let o=ht(e),s=o!==e&&!$t(e),c=o[t];if(c!==yt[t]){let t=c.apply(e,a);return s?nn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,gt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function xt(e,t,n,r){let i=ht(e),a=i!==e&&!$t(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=gt(e,t)),n.call(this,t,gt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?gt(e,c):c}function St(e,t,n){let r=N(e);ft(r,`iterate`,dt);let i=r[t](...n);return(i===-1||i===!1)&&en(n[0])?(n[0]=N(n[0]),r[t](...n)):i}function Ct(e,t,n=[]){tt(),Ge();let r=N(e)[t].apply(e,n);return Ke(),nt(),r}var wt=l(`__proto__,__v_isRef,__isVue`),Tt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function Et(e){E(e)||(e=String(e));let t=N(this);return ft(t,`has`,e),t.hasOwnProperty(e)}var Dt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Gt:Wt:i?Ut:Ht).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=b(e);if(!r){let e;if(a&&(e=_t[t]))return e;if(t===`hasOwnProperty`)return Et}let o=Reflect.get(e,t,an(e)?e:n);if((E(t)?Tt.has(t):wt(t))||(r||ft(e,`get`,t),i))return o;if(an(o)){let e=a&&ae(t)?o:o.value;return r&&D(e)?Yt(e):e}return D(o)?r?Yt(o):qt(o):o}},Ot=class extends Dt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=b(e)&&ae(t);if(!this._isShallow){let e=Qt(i);if(!$t(n)&&!Qt(n)&&(i=N(i),n=N(n)),!a&&an(i)&&!an(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:y(e,t),s=Reflect.set(e,t,n,an(e)?e:r);return e===N(r)&&s&&(o?k(n,i)&&pt(e,`set`,t,n,i):pt(e,`add`,t,n)),s}deleteProperty(e,t){let n=y(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&pt(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!E(t)||!Tt.has(t))&&ft(e,`has`,t),n}ownKeys(e){return ft(e,`iterate`,b(e)?`length`:lt),Reflect.ownKeys(e)}},kt=class extends Dt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},At=new Ot,jt=new kt,Mt=new Ot(!0),Nt=e=>e,Pt=e=>Reflect.getPrototypeOf(e);function Ft(e,t,n){return function(...r){let i=this.__v_raw,a=N(i),o=x(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Nt:t?rn:nn;return!t&&ft(a,`iterate`,c?ut:lt),g(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function It(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Lt(e,t){let n={get(n){let r=this.__v_raw,i=N(r),a=N(n);e||(k(n,a)&&ft(i,`get`,n),ft(i,`get`,a));let{has:o}=Pt(i),s=t?Nt:e?rn:nn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&ft(N(t),`iterate`,lt),t.size},has(t){let n=this.__v_raw,r=N(n),i=N(t);return e||(k(t,i)&&ft(r,`has`,t),ft(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=N(a),s=t?Nt:e?rn:nn;return!e&&ft(o,`iterate`,lt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return g(n,e?{add:It(`add`),set:It(`set`),delete:It(`delete`),clear:It(`clear`)}:{add(e){let n=N(this),r=Pt(n),i=N(e),a=!t&&!$t(e)&&!Qt(e)?i:e;return r.has.call(n,a)||k(e,a)&&r.has.call(n,e)||k(i,a)&&r.has.call(n,i)||(n.add(a),pt(n,`add`,a,a)),this},set(e,n){!t&&!$t(n)&&!Qt(n)&&(n=N(n));let r=N(this),{has:i,get:a}=Pt(r),o=i.call(r,e);o||=(e=N(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?k(n,s)&&pt(r,`set`,e,n,s):pt(r,`add`,e,n),this},delete(e){let t=N(this),{has:n,get:r}=Pt(t),i=n.call(t,e);i||=(e=N(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&pt(t,`delete`,e,void 0,a),o},clear(){let e=N(this),t=e.size!==0,n=e.clear();return t&&pt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ft(r,e,t)}),n}function Rt(e,t){let n=Lt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(y(n,r)&&r in t?n:t,r,i)}var zt={get:Rt(!1,!1)},Bt={get:Rt(!1,!0)},Vt={get:Rt(!0,!1)},Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap;function Kt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function qt(e){return Qt(e)?e:Xt(e,!1,At,zt,Ht)}function Jt(e){return Xt(e,!1,Mt,Bt,Ut)}function Yt(e){return Xt(e,!0,jt,Vt,Wt)}function Xt(e,t,n,r,i){if(!D(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Kt(re(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Zt(e){return Qt(e)?Zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Qt(e){return!!(e&&e.__v_isReadonly)}function $t(e){return!!(e&&e.__v_isShallow)}function en(e){return e?!!e.__v_raw:!1}function N(e){let t=e&&e.__v_raw;return t?N(t):e}function tn(e){return!y(e,`__v_skip`)&&Object.isExtensible(e)&&me(e,`__v_skip`,!0),e}var nn=e=>D(e)?qt(e):e,rn=e=>D(e)?Yt(e):e;function an(e){return e?e.__v_isRef===!0:!1}function P(e){return sn(e,!1)}function on(e){return sn(e,!0)}function sn(e,t){return an(e)?e:new cn(e,t)}var cn=class{constructor(e,t){this.dep=new ot,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:N(e),this._value=t?e:nn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||$t(e)||Qt(e);e=n?e:N(e),k(e,t)&&(this._rawValue=e,this._value=n?e:nn(e),this.dep.trigger())}};function F(e){return an(e)?e.value:e}var ln={get:(e,t,n)=>t===`__v_raw`?e:F(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return an(i)&&!an(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function un(e){return Zt(e)?e:new Proxy(e,ln)}var dn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new ot(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=it-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&M!==this)return We(this,!0),!0}get value(){let e=this.dep.track();return Xe(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function fn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new dn(r,i,n)}var pn={},mn=new WeakMap,hn=void 0;function gn(e,t=!1,n=hn){if(n){let t=mn.get(n);t||mn.set(n,t=[]),t.push(e)}}function _n(e,t,n=u){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:$t(e)||i===!1||i===0?vn(e,1):vn(e),d,p,m,h,g=!1,v=!1;if(an(e)?(p=()=>e.value,g=$t(e)):Zt(e)?(p=()=>l(e),g=!0):b(e)?(v=!0,g=e.some(e=>Zt(e)||$t(e)),p=()=>e.map(e=>{if(an(e))return e.value;if(Zt(e))return l(e);if(w(e))return c?c(e,2):e()})):p=w(e)?t?c?()=>c(e,2):e:()=>{if(m){tt();try{m()}finally{nt()}}let t=hn;hn=d;try{return c?c(e,3,[h]):e(h)}finally{hn=t}}:f,t&&i){let e=p,t=i===!0?1/0:i;p=()=>vn(e(),t)}let y=Re(),x=()=>{d.stop(),y&&y.active&&_(y.effects,d)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return x(),n}}let S=v?Array(e.length).fill(pn):pn,C=e=>{if(d.flags&1&&(d.dirty||e)){if(t){let n=d.run();if(e||i||g||(v?n.some((e,t)=>k(e,S[t])):k(n,S))){m&&m();let e=hn;hn=d;try{let e=[n,S===pn?void 0:v&&S[0]===pn?[]:S,h];S=n,c?c(t,3,e):t(...e)}finally{hn=e}}}else d.run()}};return s&&s(C),d=new Be(p),d.scheduler=o?()=>o(C,!1):C,h=e=>gn(e,!1,d),m=d.onStop=()=>{let e=mn.get(d);if(e){if(c)c(e,4);else for(let t of e)t();mn.delete(d)}},t?r?C(!0):S=d.run():o?o(C.bind(null,!0),!0):d.run(),x.pause=d.pause.bind(d),x.resume=d.resume.bind(d),x.stop=x,x}function vn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,an(e))vn(e.value,t,n);else if(b(e))for(let r=0;r<e.length;r++)vn(e[r],t,n);else if(S(e)||x(e))e.forEach(e=>{vn(e,t,n)});else if(ie(e)){for(let r in e)vn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&vn(e[r],t,n)}return e}function yn(e,t,n,r){try{return r?e(...r):e()}catch(e){xn(e,t,n)}}function bn(e,t,n,r){if(w(e)){let i=yn(e,t,n,r);return i&&ee(i)&&i.catch(e=>{xn(e,t,n)}),i}if(b(e)){let i=[];for(let a=0;a<e.length;a++)i.push(bn(e[a],t,n,r));return i}}function xn(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||u;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){tt(),yn(a,null,10,[e,i,o]),nt();return}}Sn(e,n,i,r,o)}function Sn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var Cn=[],wn=-1,Tn=[],En=null,Dn=0,On=Promise.resolve(),kn=null;function An(e){let t=kn||On;return e?t.then(this?e.bind(this):e):t}function jn(e){let t=wn+1,n=Cn.length;for(;t<n;){let r=t+n>>>1,i=Cn[r],a=Ln(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function Mn(e){if(!(e.flags&1)){let t=Ln(e),n=Cn[Cn.length-1];!n||!(e.flags&2)&&t>=Ln(n)?Cn.push(e):Cn.splice(jn(t),0,e),e.flags|=1,Nn()}}function Nn(){kn||=On.then(Rn)}function Pn(e){if(!b(e))En&&e.id===-1?En.splice(Dn+1,0,e):e.flags&1||(Tn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Tn.push(e[t]);Nn()}function Fn(e,t,n=wn+1){for(;n<Cn.length;n++){let t=Cn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;Cn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function In(e){if(Tn.length){let e=[...new Set(Tn)].sort((e,t)=>Ln(e)-Ln(t));if(Tn.length=0,En){for(let t=0;t<e.length;t++)En.push(e[t]);return}for(En=e,Dn=0;Dn<En.length;Dn++){let e=En[Dn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}En=null,Dn=0}}var Ln=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Rn(e){try{for(wn=0;wn<Cn.length;wn++){let e=Cn[wn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),yn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;wn<Cn.length;wn++){let e=Cn[wn];e&&(e.flags&=-2)}wn=-1,Cn.length=0,In(e),kn=null,(Cn.length||Tn.length)&&Rn(e)}}var zn=null,Bn=null;function Vn(e){let t=zn;return zn=e,Bn=e&&e.type.__scopeId||null,t}function I(e,t=zn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&wa(-1);let i=Vn(t),a=ba.length,o;try{o=e(...n)}finally{for(let e=ba.length;e>a;e--)Sa();Vn(i),r._d&&wa(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function L(e,t){if(zn===null)return e;let n=ro(zn),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=u]=t[e];i&&(w(i)&&(i={mounted:i,updated:i}),i.deep&&vn(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function Hn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(tt(),bn(c,n,8,[e.el,s,e,t]),nt())}}function Un(e,t){if(Ua){let n=Ua.provides,r=Ua.parent&&Ua.parent.provides;r===n&&(n=Ua.provides=Object.create(r)),n[e]=t}}function Wn(e,t,n=!1){let r=Wa();if(r||Di){let i=Di?Di._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&w(t)?t.call(r&&r.proxy):t}}var Gn=Symbol.for(`v-scx`),Kn=()=>Wn(Gn);function qn(e,t){return Yn(e,null,t)}function Jn(e,t,n){return Yn(e,t,n)}function Yn(e,t,n=u){let{immediate:r,deep:i,flush:a,once:o}=n,s=g({},n),c=t&&r||!t&&a!==`post`,l;if(Xa){if(a===`sync`){let e=Kn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=f,e.resume=f,e.pause=f,e}}let d=Ua;s.call=(e,t,n)=>bn(e,d,t,n);let p=!1;a===`post`?s.scheduler=e=>{ia(e,d&&d.suspense)}:a!==`sync`&&(p=!0,s.scheduler=(e,t)=>{t?e():Mn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),p&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};let m=_n(e,t,s);return Xa&&(l?l.push(m):c&&m()),m}function Xn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?Zn(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=qa(this),s=Yn(i,a.bind(r),n);return o(),s}function Zn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Qn=new WeakMap,$n=Symbol(`_vte`),er=e=>e.__isTeleport,tr=e=>e&&(e.disabled||e.disabled===``),nr=e=>e&&(e.defer||e.defer===``),rr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,ir=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,ar=(e,t)=>{let n=e&&e.to;return T(n)?t?t(n):null:n},or={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=tr(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=tr(e.props),r=e.target=ar(e.props,m),a=dr(r,e,h,p);r&&(o!==`svg`&&rr(r)?o=`svg`:o!==`mathml`&&ir(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ur(e,!1)))},S=e=>{let t=()=>{if(Qn.get(e)===t){if(Qn.delete(e),tr(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),ur(e,!0)}x(e)}};Qn.set(e,t),ia(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),nr(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ur(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Qn.get(e);if(u){u.flags|=8,Qn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=tr(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||rr(p)?o=`svg`:(o===`mathml`||ir(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),ua(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):sr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=ar(t.props,m);e&&(t.target=e,sr(t,e,null,l,0))}else g&&sr(t,p,h,l,1);ur(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=tr(f),m=a||!p,h=Qn.get(e);if(h&&(h.flags|=8,Qn.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,m,!!i.dynamicChildren)}},move:sr,hydrate:cr};function sr(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Qn.has(e)&&(!d||tr(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function cr(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=ar(t.props,c),h=tr(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||dr(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||dr(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),ur(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var lr=or;function ur(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function dr(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[$n]=o,e&&(r(a,e,i),r(o,e,i)),o}var fr=Symbol(`_leaveCb`),pr=Symbol(`_enterCb`);function mr(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vr(()=>{e.isMounted=!0}),Wr(()=>{e.isUnmounting=!0}),e}var hr=[Function,Array],gr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hr,onEnter:hr,onAfterEnter:hr,onEnterCancelled:hr,onBeforeLeave:hr,onLeave:hr,onAfterLeave:hr,onLeaveCancelled:hr,onBeforeAppear:hr,onAppear:hr,onAfterAppear:hr,onAppearCancelled:hr},_r=e=>{let t=e.subTree;return t.component?_r(t.component):t},vr={name:`BaseTransition`,props:gr,setup(e,{slots:t}){let n=Wa(),r=mr();return()=>{let i=t.default&&Er(t.default(),!0),a=i&&i.length?yr(i):n.subTree?G():void 0;if(!a)return;let o=N(e),{mode:s}=o;if(r.isLeaving)return Cr(a);let c=wr(a);if(!c)return Cr(a);let l=Sr(c,o,r,n,e=>l=e);c.type!==va&&Tr(c,l);let u=n.subTree&&wr(n.subTree);if(u&&u.type!==va&&!Oa(u,c)&&_r(n).type!==va){let e=Sr(u,o,r,n);if(Tr(u,e),s===`out-in`&&c.type!==va)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Cr(a);s===`in-out`&&c.type!==va?e.delayLeave=(e,t,n)=>{let i=xr(r,u);i[String(u.key)]=u,e[fr]=()=>{t(),e[fr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function yr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==va){t=n;break}}return t}var br=vr;function xr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Sr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,x=String(e.key),S=xr(n,e),C=(e,t)=>{e&&bn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),b(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted){if(a)r=g||c;else return}t[fr]&&t[fr](!0);let i=S[x];i&&Oa(e,i)&&i.el[fr]&&i.el[fr](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted){if(a)r=_||l,i=v||u,o=y||d;else return}let s=!1;t[pr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[pr]=void 0)};let c=t[pr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[pr]&&t[pr](!0),n.isUnmounting)return r();C(f,[t]);let a=!1;t[fr]=n=>{a||(a=!0,r(),C(n?h:m,[t]),t[fr]=void 0,S[i]===e&&delete S[i])};let o=t[fr].bind(null,!1);S[i]=e,p?w(p,[t,o]):o()},clone(e){let a=Sr(e,t,n,r,i);return i&&i(a),a}};return T}function Cr(e){if(Nr(e))return e=Na(e),e.children=null,e}function wr(e){if(!Nr(e))return er(e.type)&&e.children?yr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&w(n.default))return n.default()}}function Tr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Tr(er(n.type)&&wr(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Er(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===z?(o.patchFlag&128&&i++,r=r.concat(Er(o.children,t,s))):(t||o.type!==va)&&r.push(s==null?o:Na(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function R(e,t){return w(e)?g({name:e.name},t,{setup:e}):e}function Dr(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Or(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var kr=new WeakMap;function Ar(e,t,n,r,i=!1){if(b(e)){e.forEach((e,a)=>Ar(e,t&&(b(t)?t[a]:t),n,r,i));return}if(Mr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ar(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?ro(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,d=s.refs===u?s.refs={}:s.refs,f=s.setupState,m=N(f),h=f===u?p:e=>!Or(d,e)&&y(m,e),g=(e,t)=>!(t&&Or(d,t));if(l!=null&&l!==c){if(jr(t),T(l))d[l]=null,h(l)&&(f[l]=null);else if(an(l)){let e=t;g(l,e.k)&&(l.value=null),e.k&&(d[e.k]=null)}}if(w(c))yn(c,s,12,[o,d]);else{let t=T(c),r=an(c);if(t||r){let s=()=>{if(e.f){let n=t?h(c)?f[c]:d[c]:g(c)||!e.k?c.value:d[e.k];if(i)b(n)&&_(n,a);else if(b(n))n.includes(a)||n.push(a);else if(t)d[c]=[a],h(c)&&(f[c]=d[c]);else{let t=[a];g(c,e.k)&&(c.value=t),e.k&&(d[e.k]=t)}}else t?(d[c]=o,h(c)&&(f[c]=o)):r&&(g(c,e.k)&&(c.value=o),e.k&&(d[e.k]=o))};if(o){let t=()=>{s(),kr.delete(e)};t.id=-1,kr.set(e,t),ia(t,n)}else jr(e),s()}}}function jr(e){let t=kr.get(e);t&&(t.flags|=8,kr.delete(e))}ve().requestIdleCallback,ve().cancelIdleCallback;var Mr=e=>!!e.type.__asyncLoader,Nr=e=>e.type.__isKeepAlive;function Pr(e,t){Ir(e,`a`,t)}function Fr(e,t){Ir(e,`da`,t)}function Ir(e,t,n=Ua){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Rr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Nr(e.parent.vnode)&&Lr(r,t,n,e),e=e.parent}}function Lr(e,t,n,r){let i=Rr(t,e,r,!0);Gr(()=>{_(r[t],i)},n)}function Rr(e,t,n=Ua,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{tt();let i=qa(n),a=bn(t,n,e,r);return i(),nt(),a};return r?i.unshift(a):i.push(a),a}}var zr=e=>(t,n=Ua)=>{(!Xa||e===`sp`)&&Rr(e,(...e)=>t(...e),n)},Br=zr(`bm`),Vr=zr(`m`),Hr=zr(`bu`),Ur=zr(`u`),Wr=zr(`bum`),Gr=zr(`um`),Kr=zr(`sp`),qr=zr(`rtg`),Jr=zr(`rtc`);function Yr(e,t=Ua){Rr(`ec`,e,t)}var Xr=`components`,Zr=Symbol.for(`v-ndc`);function Qr(e){return T(e)?$r(Xr,e,!1)||e:e||Zr}function $r(e,t,n=!0,r=!1){let i=zn||Ua;if(i){let n=i.type;if(e===Xr){let e=io(n,!1);if(e&&(e===t||e===ce(t)||e===de(ce(t))))return n}let a=ei(i[e]||n[e],t)||ei(i.appContext[e],t);return!a&&r?n:a}}function ei(e,t){return e&&(e[t]||e[ce(t)]||e[de(ce(t))])}function ti(e,t,n,r){let i,a=n&&n[r],o=b(e);if(o||T(e)){let n=o&&Zt(e),r=!1,s=!1;n&&(r=!$t(e),s=Qt(e),e=ht(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?rn(nn(e[n])):nn(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(D(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function ni(e,t,n,r,i,a){if(n??={},zn.ce||zn.parent&&Mr(zn.parent)&&zn.parent.ce){let e=a!=null&&n.key==null?g({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),B(),Ea(z,null,[U(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=ba.length;B();let c;try{let i=o&&ri(o(n)),s=n.key||a||i&&i.key;c=Ea(z,{key:(s&&!E(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=ba.length;e>s;e--)Sa();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function ri(e){return e.some(e=>!Da(e)||!(e.type===va||e.type===z&&!ri(e.children)))?e:null}var ii=e=>e?Ya(e)?ro(e):ii(e.parent):null,ai=g(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=>ii(e.parent),$root:e=>ii(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>mi(e),$forceUpdate:e=>e.f||=()=>{Mn(e.update)},$nextTick:e=>e.n||=An.bind(e.proxy),$watch:e=>Xn.bind(e)}),oi=(e,t)=>e!==u&&!e.__isScriptSetup&&y(e,t),si={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(oi(r,t))return o[t]=1,r[t];else if(i!==u&&y(i,t))return o[t]=2,i[t];else if(y(a,t))return o[t]=3,a[t];else if(n!==u&&y(n,t))return o[t]=4,n[t];else li&&(o[t]=0)}let l=ai[t],d,f;if(l)return t===`$attrs`&&ft(e.attrs,`get`,``),l(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==u&&y(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,y(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return oi(i,t)?(i[t]=n,!0):r!==u&&y(r,t)?(r[t]=n,!0):y(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==u&&s[0]!==`$`&&y(e,s)||oi(t,s)||y(a,s)||y(r,s)||y(ai,s)||y(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?y(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ci(e){return b(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var li=!0;function ui(e){let t=mi(e),n=e.proxy,r=e.ctx;li=!1,t.beforeCreate&&fi(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:m,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:x,unmounted:S,render:C,renderTracked:T,renderTriggered:E,errorCaptured:ee,serverPrefetch:te,expose:ne,inheritAttrs:re,components:ie,directives:ae,filters:oe}=t;if(l&&di(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=qt(t))}if(li=!0,a)for(let e in a){let t=a[e],i=K({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):f,set:!w(t)&&w(t.set)?t.set.bind(n):f});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)pi(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Un(t,e[t])})}u&&fi(u,e,`c`);function O(e,t){b(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O(Br,d),O(Vr,p),O(Hr,m),O(Ur,h),O(Pr,g),O(Fr,_),O(Yr,ee),O(Jr,T),O(qr,E),O(Wr,y),O(Gr,S),O(Kr,te),b(ne)){if(ne.length){let t=e.exposed||={};ne.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}C&&e.render===f&&(e.render=C),re!=null&&(e.inheritAttrs=re),ie&&(e.components=ie),ae&&(e.directives=ae),te&&Dr(e)}function di(e,t,n=f){b(e)&&(e=yi(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Wn(r.from||n,r.default,!0):Wn(r.from||n):Wn(r),an(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function fi(e,t,n){bn(b(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function pi(e,t,n,r){let i=r.includes(`.`)?Zn(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Jn(i,n)}else if(w(e))Jn(i,e.bind(n));else if(D(e)){if(b(e))e.forEach(e=>pi(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Jn(i,r,e)}}}function mi(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>hi(c,e,o,!0)),hi(c,t,o)),D(t)&&a.set(t,c),c}function hi(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&hi(e,a,n,!0),i&&i.forEach(t=>hi(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=gi[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var gi={data:_i,props:Si,emits:Si,methods:xi,computed:xi,beforeCreate:bi,created:bi,beforeMount:bi,mounted:bi,beforeUpdate:bi,updated:bi,beforeDestroy:bi,beforeUnmount:bi,destroyed:bi,unmounted:bi,activated:bi,deactivated:bi,errorCaptured:bi,serverPrefetch:bi,components:xi,directives:xi,watch:Ci,provide:_i,inject:vi};function _i(e,t){return t?e?function(){return g(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function vi(e,t){return xi(yi(e),yi(t))}function yi(e){if(b(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function bi(e,t){return e?[...new Set([].concat(e,t))]:t}function xi(e,t){return e?g(Object.create(null),e,t):t}function Si(e,t){return e?b(e)&&b(t)?[...new Set([...e,...t])]:g(Object.create(null),ci(e),ci(t??{})):t}function Ci(e,t){if(!e)return t;if(!t)return e;let n=g(Object.create(null),e);for(let r in t)n[r]=bi(e[r],t[r]);return n}function wi(){return{app:null,config:{isNativeTag:p,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}}var Ti=0;function Ei(e,t){return function(n,r=null){w(n)||(n=g({},n)),r!=null&&!D(r)&&(r=null);let i=wi(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:Ti++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:so,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&w(e.install)?(a.add(e),e.install(c,...t)):w(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||U(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,ro(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(bn(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Di;Di=c;try{return e()}finally{Di=t}}};return c}}var Di=null,Oi=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ce(t)}Modifiers`]||e[`${ue(t)}Modifiers`];function ki(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||u,i=n,a=t.startsWith(`update:`),o=a&&Oi(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=i.map(he)));let s,c=r[s=fe(t)]||r[s=fe(ce(t))];!c&&a&&(c=r[s=fe(ue(t))]),c&&bn(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,bn(l,e,6,i)}}var Ai=new WeakMap;function ji(e,t,n=!1){let r=n?Ai:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=ji(e,t,!0);n&&(s=!0,g(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(b(a)?a.forEach(e=>o[e]=null):g(o,a),D(e)&&r.set(e,o),o)}function Mi(e,t){return!e||!m(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),y(e,t[0].toLowerCase()+t.slice(1))||y(e,ue(t))||y(e,t))}function Ni(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:g}=e,_=Vn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Fa(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=Fa(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:Pi(s)}}catch(t){ba.length=0,xn(t,e,1),v=U(va)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(h)&&(y=Fi(y,a)),b=Na(b,y,!1,!0))}return n.dirs&&(b=Na(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Tr(er(b.type)&&wr(b)||b,n.transition),v=b,Vn(_),v}var Pi=e=>{let t;for(let n in e)(n===`class`||n===`style`||m(n))&&((t||={})[n]=e[n]);return t},Fi=(e,t)=>{let n={};for(let r in e)(!h(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Ii(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Li(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ri(o,r,n)&&!Mi(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Li(r,o,l):!!o;return!1}function Li(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Ri(t,e,a)&&!Mi(n,a))return!0}return!1}function Ri(e,t,n){let r=e[n],i=t[n];return n===`style`&&D(r)&&D(i)?!je(r,i):r!==i}function zi({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Bi={},Vi=()=>Object.create(Bi),Hi=e=>Object.getPrototypeOf(e)===Bi;function Ui(e,t,n,r=!1){let i={},a=Vi();e.propsDefaults=Object.create(null),Gi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Jt(i):e.type.props?i:a,e.attrs=a}function Wi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=N(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Mi(e.emitsOptions,o))continue;let u=t[o];if(c){if(y(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=ce(o);i[t]=Ki(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Gi(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!y(t,a)&&((r=ue(a))===a||!y(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Ki(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!y(t,e))&&(delete a[e],l=!0)}l&&pt(e.attrs,`set`,``)}function Gi(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(oe(c))continue;let l=t[c],u;i&&y(i,u=ce(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:Mi(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=N(n),r=s||u;for(let o=0;o<a.length;o++){let s=a[o];n[s]=Ki(i,t,s,r[s],e,!y(r,s))}}return o}function Ki(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=y(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&w(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=qa(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===ue(n))&&(r=!0))}return r}var qi=new WeakMap;function Ji(e,t,n=!1){let r=n?qi:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!w(e)){let r=e=>{c=!0;let[n,r]=Ji(e,t,!0);g(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,d),d;if(b(a))for(let e=0;e<a.length;e++){let t=ce(a[e]);Yi(t)&&(o[t]=u)}else if(a)for(let e in a){let t=ce(e);if(Yi(t)){let n=a[e],r=o[t]=b(n)||w(n)?{type:n}:g({},n),i=r.type,c=!1,l=!0;if(b(i))for(let e=0;e<i.length;++e){let t=i[e],n=w(t)&&t.name;if(n===`Boolean`){c=!0;break}n===`String`&&(l=!1)}else c=w(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||y(r,`default`))&&s.push(t)}}let l=[o,s];return D(e)&&r.set(e,l),l}function Yi(e){return e[0]!==`$`&&!oe(e)}var Xi=e=>e===`_`||e===`_ctx`||e===`$stable`,Zi=e=>b(e)?e.map(Fa):[Fa(e)],Qi=(e,t,n)=>{if(t._n)return t;let r=I((...e)=>Zi(t(...e)),n);return r._c=!1,r},$i=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Xi(n))continue;let i=e[n];if(w(i))t[n]=Qi(n,i,r);else if(i!=null){let e=Zi(i);t[n]=()=>e}}},ea=(e,t)=>{let n=Zi(t);e.slots.default=()=>n},ta=(e,t,n)=>{for(let r in t)(n||!Xi(r))&&(e[r]=t[r])},na=(e,t,n)=>{let r=e.slots=Vi();if(e.vnode.shapeFlag&32){let e=t._;e?(ta(r,t,n),n&&me(r,`_`,e,!0)):$i(t,r)}else t&&ea(e,t)},ra=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=u;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:ta(i,t,n):(a=!t.$stable,$i(t,i)),o=t}else t&&(ea(e,t),o={default:1});if(a)for(let e in i)!Xi(e)&&o[e]==null&&delete i[e]},ia=ga;function aa(e){return oa(e)}function oa(e,t){let n=ve();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=f,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Oa(e,t)&&(r=ye(e),k(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===d&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:l,ref:u,shapeFlag:f}=t;switch(l){case _a:y(e,t,n,r);break;case va:b(e,t,n,r);break;case ya:e??x(t,n,r,o);break;case z:re(e,t,n,r,i,a,o,s,c);break;default:f&1?w(e,t,n,r,i,a,o,s,c):f&6?ie(e,t,n,r,i,a,o,s,c):(f&64||f&128)&&l.process(e,t,n,r,i,a,o,s,c,Se)}u!=null&&i?Ar(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Ar(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ee(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,i,s,c,l,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=o(e.type,c,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,i,s,sa(e,c),l,u),_&&Hn(e,null,i,`created`),E(d,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!oe(e)&&a(d,e,null,m[e],c,i);`value`in m&&a(d,`value`,null,m.value,c),(f=m.onVnodeBeforeMount)&&za(f,i,e)}_&&Hn(e,null,i,`beforeMount`);let v=la(s,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&ia(()=>{try{f&&za(f,i,e),v&&g.enter(d),_&&Hn(e,null,i,`mounted`)}finally{}},s)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||ha(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;E(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},D=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Ia(e[l]):Fa(e[l]);v(null,c,t,n,r,i,a,o,s)}},ee=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let m=e.props||u,h=t.props||u,g;if(n&&ca(n,!1),(g=h.onVnodeBeforeUpdate)&&za(g,n,t,e),f&&Hn(t,e,n,`beforeUpdate`),n&&ca(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(c,``),d?te(e.dynamicChildren,d,c,n,r,sa(t,i),o):s||le(e,t,c,null,n,r,sa(t,i),o,!1),l>0){if(l&16)ne(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=m[r],s=h[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&p(c,t.children)}else!s&&d==null&&ne(c,m,h,n,i);((g=h.onVnodeUpdated)||f)&&ia(()=>{g&&za(g,n,t,e),f&&Hn(t,e,n,`updated`)},r)},te=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===z||!Oa(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},ne=(e,t,n,r,i)=>{if(t!==n){if(t!==u)for(let o in t)!oe(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(oe(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},re=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),D(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(te(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&ua(e,t,!0)):le(e,t,n,f,a,o,c,l,u)},ie=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ae(t,n,r,i,a,o,c):O(e,t,c)},ae=(e,t,n,r,i,a,o)=>{let s=e.component=Ha(e,r,i);if(Nr(e)&&(s.ctx.renderer=Se),Za(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o),!e.el){let r=s.subTree=U(va);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},O=(e,t,n)=>{let r=t.component=e.component;if(Ii(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,ce(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=fa(e);if(n){t&&(t.el=c.el,ce(e,t,o)),n.asyncDep.then(()=>{ia(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ca(e,!1),t?(t.el=c.el,ce(e,t,o)):t=c,n&&pe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&za(d,s,t,c),ca(e,!0);let f=Ni(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&zi(e,f.el),r&&ia(r,i),(d=t.props&&t.props.onVnodeUpdated)&&ia(()=>za(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Mr(t);if(ca(e,!1),l&&pe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&za(o,d,t),ca(e,!0),s&&A){let t=()=>{e.subTree=Ni(e),A(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Ni(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&ia(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;ia(()=>za(o,d,e),i)}(t.shapeFlag&256||d&&Mr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&ia(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Be(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Mn(u),ca(e,!0),l()},ce=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Wi(e,t.props,r,n),ra(e,t.children,n),tt(),Fn(e),nt()},le=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){de(l,d,n,r,i,a,o,s,c);return}if(f&256){ue(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?de(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},ue=(e,t,n,r,i,a,o,s,c)=>{e||=d,t||=d;let l=e.length,u=t.length,f=Math.min(l,u),p=0;for(;p<f;p++){let r=t[p]=c?Ia(t[p]):Fa(t[p]);v(e[p],r,n,null,i,a,o,s,c)}l>u?_e(e,i,a,!0,!1,f):D(t,n,r,i,a,o,s,c,f)},de=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,f=e.length-1,p=u-1;for(;l<=f&&l<=p;){let r=e[l],u=t[l]=c?Ia(t[l]):Fa(t[l]);if(Oa(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=f&&l<=p;){let r=e[f],l=t[p]=c?Ia(t[p]):Fa(t[p]);if(Oa(r,l))v(r,l,n,null,i,a,o,s,c);else break;f--,p--}if(l>f){if(l<=p){let e=p+1,d=e<u?t[e].el:r;for(;l<=p;)v(null,t[l]=c?Ia(t[l]):Fa(t[l]),n,d,i,a,o,s,c),l++}}else if(l>p)for(;l<=f;)k(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=p;l++){let e=t[l]=c?Ia(t[l]):Fa(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(l=0;l<b;l++)C[l]=0;for(l=m;l<=f;l++){let r=e[l];if(y>=b){k(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Oa(r,t[_])){u=_;break}u===void 0?k(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?da(C):d;for(_=w.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1<u?f.el||ma(f):r;C[l]===0?v(null,d,n,p,i,a,o,s,c):x&&(_<0||l!==w[_]?fe(d,n,p,2):_--)}}},fe=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){fe(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,Se);return}if(c===z){r(s,t,n);for(let e=0;e<u.length;e++)fe(u[e],t,n,a);r(e.anchor,t,n);return}if(c===ya){S(e,t,n);return}if(a!==2&&d&1&&l){if(a===0)l.persisted&&!s[fr]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),ia(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[fr];s._isLeaving&&s[fr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}}else r(s,t,n)},k=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(tt(),Ar(s,null,n,e,!0),nt()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Mr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&za(_,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Hn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Se,r):l&&!l.hasOnce&&(a!==z||d>0&&d&64)?_e(l,t,n,!1,!0):(a===z&&d&384||!i&&u&16)&&_e(c,t,n),r&&me(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&ia(()=>{_&&za(_,t,e),h&&Hn(e,null,t,`unmounted`),v&&(e.el=null)},n)},me=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===z){he(n,r);return}if(t===ya){C(e),a&&!a.persisted&&a.afterLeave&&a.afterLeave();return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},he=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;pa(c),pa(l),r&&pe(r),i.stop(),a?(a.flags|=8,k(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,k(o,e,t,n)),s&&ia(s,t),ia(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)k(e[o],t,n,r,i)},ye=e=>{if(e.shapeFlag&6)return ye(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[$n];return n?h(n):t},be=!1,xe=(e,t,n)=>{let r;e==null?t._vnode&&(k(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,Fn(r),In(),!1)},Se={p:v,um:k,m:fe,r:me,mt:ae,mc:D,pc:le,pbc:te,n:ye,o:e},Ce,A;return t&&([Ce,A]=t(Se)),{render:xe,hydrate:Ce,createApp:Ei(xe,Ce)}}function sa({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 ca({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function la(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ua(e,t,n=!1){let r=e.children,i=t.children;if(b(r)&&b(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Ia(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ua(t,a)),a.type===_a&&(a.patchFlag===-1&&(a=i[e]=Ia(a)),a.el=t.el),a.type===va&&!a.el&&(a.el=t.el)}}function da(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function fa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fa(t)}function pa(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ma(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?ma(t.subTree):null}var ha=e=>e.__isSuspense;function ga(e,t){t&&t.pendingBranch?b(e)?t.effects.push(...e):t.effects.push(e):Pn(e)}var z=Symbol.for(`v-fgt`),_a=Symbol.for(`v-txt`),va=Symbol.for(`v-cmt`),ya=Symbol.for(`v-stc`),ba=[],xa=null;function B(e=!1){ba.push(xa=e?null:[])}function Sa(){ba.pop(),xa=ba[ba.length-1]||null}var Ca=1;function wa(e,t=!1){Ca+=e,e<0&&xa&&t&&(xa.hasOnce=!0)}function Ta(e){return e.dynamicChildren=Ca>0?xa||d:null,Sa(),Ca>0&&xa&&xa.push(e),e}function V(e,t,n,r,i,a){return Ta(H(e,t,n,r,i,a,!0))}function Ea(e,t,n,r,i){return Ta(U(e,t,n,r,i,!0))}function Da(e){return e?e.__v_isVNode===!0:!1}function Oa(e,t){return e.type===t.type&&e.key===t.key}var ka=({key:e})=>e??null,Aa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||an(e)||w(e)?{i:zn,r:e,k:t,f:!!n}:e);function H(e,t=null,n=null,r=0,i=null,a=e===z?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ka(t),ref:t&&Aa(t),scopeId:Bn,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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:zn};return s?(La(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),Ca>0&&!o&&xa&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&xa.push(c),c}var U=ja;function ja(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Zr)&&(e=va),Da(e)){let r=Na(e,t,!0);return n&&La(r,n),Ca>0&&!a&&xa&&(r.shapeFlag&6?xa[xa.indexOf(e)]=r:xa.push(r)),r.patchFlag=-2,r}if(ao(e)&&(e=e.__vccOpts),t){t=Ma(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=A(e)),D(n)&&(en(n)&&!b(n)&&(n=g({},n)),t.style=ye(n))}let o=T(e)?1:ha(e)?128:er(e)?64:D(e)?4:w(e)?2:0;return H(e,t,n,r,i,o,a,!0)}function Ma(e){return e?en(e)||Hi(e)?g({},e):e:null}function Na(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Ra(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ka(l),ref:t&&t.ref?n&&a?b(a)?a.concat(Aa(t)):[a,Aa(t)]:Aa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==z?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Na(e.ssContent),ssFallback:e.ssFallback&&Na(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Tr(u,c.clone(u)),u}function W(e=` `,t=0){return U(_a,null,e,t)}function Pa(e,t){let n=U(ya,null,e);return n.staticCount=t,n}function G(e=``,t=!1){return t?(B(),Ea(va,null,e)):U(va,null,e)}function Fa(e){return e==null||typeof e==`boolean`?U(va):b(e)?U(z,null,e.slice()):Da(e)?Ia(e):U(_a,null,String(e))}function Ia(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Na(e)}function La(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(b(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),La(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Hi(t)?t._ctx=zn:r===3&&zn&&(zn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(w(t)){if(r&65){La(e,{default:t});return}t={default:t,_ctx:zn},n=32}else t=String(t),r&64?(n=16,t=[W(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ra(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=A([t.class,r.class]));else if(e===`style`)t.style=ye([t.style,r.style]);else if(m(e)){let n=t[e],i=r[e];i&&n!==i&&!(b(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!h(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function za(e,t,n,r=null){bn(e,t,7,[n,r])}var Ba=wi(),Va=0;function Ha(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||Ba,a={uid:Va++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Le(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ji(r,i),emitsOptions:ji(r,i),emit:null,emitted:null,propsDefaults:u,inheritAttrs:r.inheritAttrs,ctx:u,data:u,props:u,attrs:u,slots:u,refs:u,setupState:u,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 a.ctx={_:a},a.root=t?t.root:a,a.emit=ki.bind(null,a),e.ce&&e.ce(a),a}var Ua=null,Wa=()=>Ua||zn,Ga,Ka;{let e=ve(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ga=t(`__VUE_INSTANCE_SETTERS__`,e=>Ua=e),Ka=t(`__VUE_SSR_SETTERS__`,e=>Xa=e)}var qa=e=>{let t=Ua;return Ga(e),e.scope.on(),()=>{e.scope.off(),Ga(t)}},Ja=()=>{Ua&&Ua.scope.off(),Ga(null)};function Ya(e){return e.vnode.shapeFlag&4}var Xa=!1;function Za(e,t=!1,n=!1){t&&Ka(t);let{props:r,children:i}=e.vnode,a=Ya(e);Ui(e,r,a,t),na(e,i,n||t);let o=a?Qa(e,t):void 0;return t&&Ka(!1),o}function Qa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,si);let{setup:r}=n;if(r){tt();let n=e.setupContext=r.length>1?no(e):null,i=qa(e),a=yn(r,e,0,[e.props,n]),o=ee(a);if(nt(),i(),(o||e.sp)&&!Mr(e)&&Dr(e),o){if(a.then(Ja,Ja),t)return a.then(n=>{Ka(!0);try{$a(e,n,t)}finally{Ka(!1)}}).catch(t=>{xn(t,e,0)});e.asyncDep=a}else $a(e,a,t)}else eo(e,t)}function $a(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=un(t)),eo(e,n)}function eo(e,t,n){let r=e.type;e.render||=r.render||f;{let t=qa(e);tt();try{ui(e)}finally{nt(),t()}}}var to={get(e,t){return ft(e,`get`,``),e[t]}};function no(e){return{attrs:new Proxy(e.attrs,to),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ro(e){return e.exposed?e.exposeProxy||=new Proxy(un(tn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ai)return ai[n](e)},has(e,t){return t in e||t in ai}}):e.proxy}function io(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function ao(e){return w(e)&&`__vccOpts`in e}var K=(e,t)=>fn(e,t,Xa);function oo(e,t,n){try{wa(-1);let r=arguments.length;return r===2?D(t)&&!b(t)?Da(t)?U(e,null,[t]):U(e,t):U(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Da(n)&&(n=[n]),U(e,t,n))}finally{wa(1)}}var so=`3.5.43`,co=void 0,lo=typeof window<`u`&&window.trustedTypes;if(lo)try{co=lo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var uo=co?e=>co.createHTML(e):e=>e,fo=`http://www.w3.org/2000/svg`,po=`http://www.w3.org/1998/Math/MathML`,mo=typeof document<`u`?document:null,ho=mo&&mo.createElement(`template`),go={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?mo.createElementNS(fo,e):t===`mathml`?mo.createElementNS(po,e):n?mo.createElement(e,{is:n}):mo.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>mo.createTextNode(e),createComment:e=>mo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mo.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{ho.innerHTML=uo(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ho.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},_o=`transition`,vo=`animation`,yo=Symbol(`_vtc`),bo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xo=g({},gr,bo),So=(e=>(e.displayName=`Transition`,e.props=xo,e))((e,{slots:t})=>oo(br,To(e),t)),Co=(e,t=[])=>{b(e)?e.forEach(e=>e(...t)):e&&e(...t)},wo=e=>e?b(e)?e.some(e=>e.length>1):e.length>1:!1;function To(e){let t={};for(let n in e)n in bo||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=Eo(i),h=m&&m[0],_=m&&m[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,ko(e,t?u:s),ko(e,t?l:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,ko(e,d),ko(e,p),ko(e,f),t&&t()},ee=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);Co(i,[t,o]),Ao(()=>{ko(t,e?c:a),Oo(t,e?u:s),wo(i)||Mo(t,r,h,o)})};return g(t,{onBeforeEnter(e){Co(v,[e]),Oo(e,a),Oo(e,o)},onBeforeAppear(e){Co(C,[e]),Oo(e,c),Oo(e,l)},onEnter:ee(!1),onAppear:ee(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Oo(e,d),e._enterCancelled?(Oo(e,f),Io(e)):(Io(e),Oo(e,f)),Ao(()=>{e._isLeaving&&(ko(e,d),Oo(e,p),wo(x)||Mo(e,r,_,n))}),Co(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),Co(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),Co(T,[e])},onLeaveCancelled(e){D(e),Co(S,[e])}})}function Eo(e){if(e==null)return null;if(D(e))return[Do(e.enter),Do(e.leave)];{let t=Do(e);return[t,t]}}function Do(e){return ge(e)}function Oo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[yo]||(e[yo]=new Set)).add(t)}function ko(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[yo];n&&(n.delete(t),n.size||(e[yo]=void 0))}function Ao(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var jo=0;function Mo(e,t,n,r){let i=e._endId=++jo,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=No(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function No(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${_o}Delay`),a=r(`${_o}Duration`),o=Po(i,a),s=r(`${vo}Delay`),c=r(`${vo}Duration`),l=Po(s,c),u=null,d=0,f=0;t===_o?o>0&&(u=_o,d=o,f=a.length):t===vo?l>0&&(u=vo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?_o:vo:null,f=u?u===_o?a.length:c.length:0);let p=u===_o&&/\b(?:transform|all)(?:,|$)/.test(r(`${_o}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Po(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Fo(t)+Fo(e[n])))}function Fo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Io(e){return(e?e.ownerDocument:document).body.offsetHeight}function Lo(e,t,n){let r=e[yo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ro=Symbol(`_vod`),zo=Symbol(`_vsh`),Bo=Symbol(``),Vo=/(?:^|;)\s*display\s*:/;function Ho(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t){if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Wo(r,t,``)}else for(let e in t)n[e]??Wo(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Wo(r,i,``):Jo(e,i,!T(t)&&t?t[i]:void 0,o)||Wo(r,i,o)}}else if(i){if(t!==n){let e=r[Bo];e&&(n+=`;`+e),r.cssText=n,a=Vo.test(n)}}else t&&e.removeAttribute(`style`);Ro in e&&(e[Ro]=a?r.display:``,e[zo]&&(r.display=`none`))}var Uo=/\s*!important$/;function Wo(e,t,n){if(b(n))n.forEach(n=>Wo(e,t,n));else if(n??=``,t.startsWith(`--`))Uo.test(n)?e.setProperty(t,n.replace(Uo,``),`important`):e.setProperty(t,n);else{let r=qo(e,t);Uo.test(n)?e.setProperty(ue(r),n.replace(Uo,``),`important`):e[r]=n}}var Go=[`Webkit`,`Moz`,`ms`],Ko={};function qo(e,t){let n=Ko[t];if(n)return n;let r=ce(t);if(r!==`filter`&&r in e)return Ko[t]=r;r=de(r);for(let n=0;n<Go.length;n++){let i=Go[n]+r;if(i in e)return Ko[t]=i}return t}function Jo(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&T(r)&&n===r}var Yo=`http://www.w3.org/1999/xlink`;function Xo(e,t,n,r,i,a=Te(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Yo,t.slice(6,t.length)):e.setAttributeNS(Yo,t,n):n==null||a&&!Ee(n)?e.removeAttribute(t):e.setAttribute(t,a?``:E(n)?String(n):n)}function Zo(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?uo(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Ee(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Qo(e,t,n,r){e.addEventListener(t,n,r)}function $o(e,t,n,r){e.removeEventListener(t,n,r)}var es=Symbol(`_vei`);function ts(e,t,n,r,i=null){let a=e[es]||(e[es]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=is(t);r?Qo(e,n,a[t]=cs(r,i),s):o&&($o(e,n,o,s),a[t]=void 0)}}var ns=/(Once|Passive|Capture)$/,rs=/^on:?(?:Once|Passive|Capture)$/;function is(e){let t,n;for(;(n=e.match(ns))&&!rs.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):ue(e.slice(2)),t]}var as=0,os=Promise.resolve(),ss=()=>as||=(os.then(()=>as=0),Date.now());function cs(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(b(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&bn(e,t,5,a)}}else bn(r,t,5,[e])};return n.value=e,n.attached=ss(),n}var ls=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,us=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Lo(e,r,o):t===`style`?Ho(e,n,r):m(t)?h(t)||ts(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):ds(e,t,r,o))?(Zo(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Xo(e,t,r,o,a,t!==`value`)):e._isVueCE&&(fs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?Zo(e,ce(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Xo(e,t,r,o))};function ds(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&ls(t)&&w(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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return ls(t)&&T(n)?!1:t in e}function fs(e,t){let n=e._def.props;if(!n)return!1;let r=ce(t);return Array.isArray(n)?n.some(e=>ce(e)===r):Object.keys(n).some(e=>ce(e)===r)}var ps=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return b(t)?e=>pe(t,e):t};function ms(e){e.target.composing=!0}function hs(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var gs=Symbol(`_assign`),_s=Symbol(`_initialValue`);function vs(e,t,n){return t&&(e=e.trim()),n&&(e=he(e)),e}var q={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[_s]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[_s]=e.defaultValue.replace(/\r\n?/g,`
|
|
2
|
+
`))),e[gs]=ps(i);let a=r||i.props&&i.props.type===`number`;Qo(e,t?`change`:`input`,t=>{t.target.composing||e[gs](vs(e.value,n,a))}),(n||a)&&Qo(e,`change`,()=>{e.value=vs(e.value,n,a)}),t||(Qo(e,`compositionstart`,ms),Qo(e,`compositionend`,hs),Qo(e,`change`,hs))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[_s];delete e[_s],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[gs](vs(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[gs]=ps(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?he(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},ys={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Qo(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?he(Ss(e)):Ss(e)),r=e.multiple,i=r?S(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?b(i)?t.slice():t:i];try{e[gs](i)}finally{An(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[gs]=ps(r)},mounted(e,{value:t}){xs(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[gs]=ps(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!bs(t,n[1],n[0]))&&xs(e,t)}};function bs(e,t,n){if(!n||b(e))return je(e,t);if(S(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function xs(e,t){let n=e.multiple,r=b(t);if(!n||r||S(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Ss(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Me(t,o)>-1}else a.selected=t.has(o)}else if(je(Ss(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ss(e){return`_value`in e?e._value:e.value}var Cs=[`ctrl`,`shift`,`alt`,`meta`],ws={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)=>Cs.some(n=>e[`${n}Key`]&&!t.includes(n))},Ts=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ws[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Es={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Ds=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ue(n.key);if(t.some(e=>e===r||Es[e]===r))return e(n)}))},Os=g({patchProp:us},go),ks;function As(){return ks||=aa(Os)}var js=((...e)=>{let t=As().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Ns(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ms(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Ms(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Ns(e){return T(e)?document.querySelector(e):e}var Ps={TOP_LEFT:`top-left`,TOP_RIGHT:`top-right`,TOP_CENTER:`top-center`,BOTTOM_LEFT:`bottom-left`,BOTTOM_RIGHT:`bottom-right`,BOTTOM_CENTER:`bottom-center`},Fs={LIGHT:`light`,DARK:`dark`,COLORED:`colored`,AUTO:`auto`},Is={INFO:`info`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},Ls={BOUNCE:`bounce`,SLIDE:`slide`,FLIP:`flip`,ZOOM:`zoom`,NONE:`none`},Rs={dangerouslyHTMLString:!1,multiple:!0,position:Ps.TOP_RIGHT,autoClose:5e3,transition:`bounce`,hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:``,bodyClassName:``,style:{},progressClassName:``,progressStyle:{},role:`alert`,theme:`light`},zs={rtl:!1,newestOnTop:!1,toastClassName:``},Bs={...Rs,...zs};Is.DEFAULT;var J=(e=>(e[e.COLLAPSE_DURATION=300]=`COLLAPSE_DURATION`,e[e.DEBOUNCE_DURATION=50]=`DEBOUNCE_DURATION`,e.CSS_NAMESPACE=`Toastify`,e))(J||{}),Vs=(e=>(e.ENTRANCE_ANIMATION_END=`d`,e))(Vs||{}),Hs={enter:`Toastify--animate Toastify__bounce-enter`,exit:`Toastify--animate Toastify__bounce-exit`,appendPosition:!0},Us={enter:`Toastify--animate Toastify__slide-enter`,exit:`Toastify--animate Toastify__slide-exit`,appendPosition:!0},Ws={enter:`Toastify--animate Toastify__zoom-enter`,exit:`Toastify--animate Toastify__zoom-exit`},Gs={enter:`Toastify--animate Toastify__flip-enter`,exit:`Toastify--animate Toastify__flip-exit`},Ks=`Toastify--animate Toastify__none-enter`;function qs(e,t=!1){let n=Hs;if(!e||typeof e==`string`)switch(e){case`flip`:n=Gs;break;case`zoom`:n=Ws;break;case`slide`:n=Us}else n=e;if(t)n.enter=Ks;else if(n.enter===Ks){let e=n.exit.split(`__`)[1]?.split(`-`)[0];n.enter=`Toastify--animate Toastify__${e}-enter`}return n}function Js(e){return e.containerId||String(e.position)}var Ys=`will-unmount`;function Xs(e=Ps.TOP_RIGHT){return!!document.querySelector(`.${J.CSS_NAMESPACE}__toast-container--${e}`)}function Zs(e=Ps.TOP_RIGHT){return`${J.CSS_NAMESPACE}__toast-container--${e}`}function Qs(e,t,n=!1){let r=[`${J.CSS_NAMESPACE}__toast-container`,`${J.CSS_NAMESPACE}__toast-container--${e}`,n?`${J.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(` `);return Ec(t)?t({position:e,rtl:n,defaultClassName:r}):`${r} ${t||``}`}function $s(e){var t;let{position:n,containerClassName:r,rtl:i=!1,style:a={}}=e,o=J.CSS_NAMESPACE,s=Zs(n),c=document.querySelector(`.${o}`),l=document.querySelector(`.${s}`),u=!!l&&!((t=l.className)!=null&&t.includes(Ys)),d=c||document.createElement(`div`),f=document.createElement(`div`);f.className=Qs(n,r,i),f.dataset.testid=`${J.CSS_NAMESPACE}__toast-container--${n}`,f.id=Js(e);for(let e in a)if(Object.prototype.hasOwnProperty.call(a,e)){let t=a[e];f.style[e]=t}return c||(d.className=J.CSS_NAMESPACE,document.body.appendChild(d)),u||d.appendChild(f),f}function ec(e){var t;let n=typeof e==`string`?e:e.currentTarget?.id||e.target?.id,r=document.getElementById(n);r&&r.removeEventListener(`animationend`,ec,!1);try{tc[n].unmount(),(t=document.getElementById(n))==null||t.remove(),delete tc[n],delete pc[n]}catch{}}var tc=qt({});function nc(e,t){let n=document.getElementById(String(t));n&&(tc[n.id]=e)}function rc(e,t=!0){let n=String(e);if(!tc[n])return;let r=document.getElementById(n);r&&r.classList.add(Ys),t?(oc(e),r&&r.addEventListener(`animationend`,ec,!1)):ec(n),mc.items=mc.items.filter(t=>t.containerId!==e)}function ic(e){for(let t in tc)rc(t,e);mc.items=[]}function ac(e,t){let n=document.getElementById(e.toastId);if(n){let r=e;r={...r,...qs(r.transition)};let i=r.appendPosition?`${r.exit}--${r.position}`:r.exit;n.className+=` ${i}`,t&&t(n)}}function oc(e){for(let t in pc)if(t===e)for(let e of pc[t]||[])ac(e)}function sc(e){return hc().find(t=>t.toastId===e)?.containerId}function cc(e){return document.getElementById(e)}function lc(e){let t=cc(e.containerId);return t&&t.classList.contains(Ys)}function uc(e){return(Da(e.content)?N(e.content.props):null)??N(e.data??{})}function dc(e){return e?mc.items.filter(t=>t.containerId===e).length>0:mc.items.length>0}function fc(){if(mc.items.length>0){let e=mc.items.shift();_c(e?.toastContent,e?.toastProps)}}var pc=qt({}),mc=qt({items:[]});function hc(){return Object.values(N(pc)).reduce((e,t)=>[...e,...t],[])}function gc(e){return hc().find(t=>t.toastId===e)}function _c(e,t={}){if(lc(t)){let n=cc(t.containerId);n&&n.addEventListener(`animationend`,vc.bind(null,e,t),!1)}else vc(e,t)}function vc(e,t={}){let n=cc(t.containerId);n&&n.removeEventListener(`animationend`,vc.bind(null,e,t),!1);let r=pc[t.containerId]||[],i=r.length>0;if(!i&&!Xs(t.position)){let e=$s(t),n=js(rl,t);t.useHandler&&t.useHandler(n),n.mount(e),nc(n,e.id)}i&&!t.updateId&&(t.position=r[0].position),An(()=>{t.updateId?yc.update(t):yc.add(e,t)})}var yc={add(e,t){let{containerId:n=``}=t;n&&(pc[n]=pc[n]||[],pc[n].find(e=>e.toastId===t.toastId)||setTimeout(()=>{var e,r;t.newestOnTop?(e=pc[n])==null||e.unshift(t):(r=pc[n])==null||r.push(t),t.onOpen&&t.onOpen(uc(t))},t.delay||0))},remove(e){if(e){let t=sc(e);if(t){let n=pc[t],r=n.find(t=>t.toastId===e);pc[t]=n.filter(t=>t.toastId!==e),!pc[t].length&&!dc(t)&&rc(t,!1),fc(),An(()=>{r!=null&&r.onClose&&(r.onClose(uc(r)),r=void 0)})}}},update(e={}){let{containerId:t=``}=e;if(t&&e.updateId){pc[t]=pc[t]||[];let n=pc[t].find(t=>t.toastId===e.toastId),r=n?.position!==e.position||n?.transition!==e.transition,i={...e,disabledEnterTransition:!r,updateId:void 0};yc.dismissForce(e?.toastId),setTimeout(()=>{Y(i.content,i)},e.delay||0)}},clear(e,t=!0){e?rc(e,t):ic(t)},dismissCallback(e){let t=e.currentTarget?.id,n=document.getElementById(t);n&&(n.removeEventListener(`animationend`,yc.dismissCallback,!1),setTimeout(()=>{yc.remove(t)}))},dismiss(e){if(e){let t=hc();for(let n of t)if(n.toastId===e){ac(n,e=>{e.addEventListener(`animationend`,yc.dismissCallback,!1)});break}}},dismissForce(e){if(e){let t=hc();for(let n of t)if(n.toastId===e){let t=document.getElementById(e);t&&(t.remove(),t.removeEventListener(`animationend`,yc.dismissCallback,!1),yc.remove(e));break}}}},bc=qt({useHandler:void 0}),xc=qt({}),Sc=qt({});function Cc(){return Math.random().toString(36).substring(2,9)}function wc(e){return typeof e==`number`&&!isNaN(e)}function Tc(e){return typeof e==`string`}function Ec(e){return typeof e==`function`}function Dc(...e){return Ra(...e)}function Oc(e){return typeof e==`object`&&(!!(e!=null&&e.render)||!!(e!=null&&e.setup)||typeof e?.type==`object`)}function kc(e={}){xc[`${J.CSS_NAMESPACE}-default-options`]=e}function Ac(){return xc[`${J.CSS_NAMESPACE}-default-options`]||Bs}function jc(){let e=window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return document.documentElement.classList.contains(`dark`)||e?`dark`:`light`}var Mc=(e=>(e[e.Enter=0]=`Enter`,e[e.Exit=1]=`Exit`,e))(Mc||{}),Nc={containerId:{type:[String,Number],required:!1,default:``},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:Ps.TOP_LEFT},bodyClassName:{type:String,required:!1,default:``},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:`bounce`},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:``},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:`alert`},theme:{type:String,required:!1,default:Fs.AUTO},content:{type:[String,Object,Function],required:!1,default:``},toastId:{type:[String,Number],required:!1,default:``},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Is.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:``},updateId:{type:[String,Number],required:!1,default:``},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},Pc=R({name:`ProgressBar`,props:{autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Is.DEFAULT},theme:{type:String,required:!1,default:Fs.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:``},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},setup(e,{attrs:t}){let n=P(),r=K(()=>e.hide?`true`:`false`),i=K(()=>({...t.style||{},animationDuration:`${e.autoClose===!0?5e3:e.autoClose}ms`,animationPlayState:e.isRunning?`running`:`paused`,opacity:e.hide||e.autoClose===!1?0:1,transform:e.controlledProgress?`scaleX(${e.progress})`:`none`})),a=K(()=>[`${J.CSS_NAMESPACE}__progress-bar`,e.controlledProgress?`${J.CSS_NAMESPACE}__progress-bar--controlled`:`${J.CSS_NAMESPACE}__progress-bar--animated`,`${J.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`,`${J.CSS_NAMESPACE}__progress-bar--${e.type}`,e.rtl?`${J.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(` `)),o=K(()=>`${a.value} ${t?.class||``}`),s=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{e.isIn&&e.closeToast&&e.autoClose!==!1&&(e.closeToast(),s())},l=K(()=>e.controlledProgress?null:c),u=K(()=>e.controlledProgress?c:null);return qn(()=>{n.value&&(s(),n.value.onanimationend=l.value,n.value.ontransitionend=u.value)}),()=>U(`div`,{ref:n,role:`progressbar`,"aria-hidden":r.value,"aria-label":`notification timer`,class:o.value,style:i.value},null)}}),Fc=R({name:`CloseButton`,inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Fs.AUTO},type:{type:String,required:!1,default:Fs.LIGHT},ariaLabel:{type:String,required:!1,default:`close`},closeToast:{type:Function,required:!1,default:void 0}},setup(e){return()=>U(`button`,{class:`${J.CSS_NAMESPACE}__close-button ${J.CSS_NAMESPACE}__close-button--${e.theme}`,type:`button`,onClick:t=>{t.stopPropagation(),e.closeToast&&e.closeToast(t)},"aria-label":e.ariaLabel},[U(`svg`,{"aria-hidden":`true`,viewBox:`0 0 14 16`},[U(`path`,{"fill-rule":`evenodd`,d:`M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z`},null)])])}}),Ic=({theme:e,type:t,path:n,...r})=>U(`svg`,Ra({viewBox:`0 0 24 24`,width:`100%`,height:`100%`,style:{fill:e===`colored`?`currentColor`:`var(--toastify-icon-color-${t})`}},r),[U(`path`,{d:n},null)]);function Lc(e){return U(Ic,Ra(e,{path:`M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z`}),null)}function Rc(e){return U(Ic,Ra(e,{path:`M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z`}),null)}function zc(e){return U(Ic,Ra(e,{path:`M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z`}),null)}function Bc(e){return U(Ic,Ra(e,{path:`M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z`}),null)}function Vc(){return U(`div`,{class:`${J.CSS_NAMESPACE}__spinner`},null)}var Hc={info:Rc,warning:Lc,success:zc,error:Bc,spinner:Vc},Uc=e=>e in Hc;function Wc({theme:e,type:t,isLoading:n,icon:r}){let i,a=!!n||t===`loading`,o={theme:e,type:t};if(a&&(r===void 0||typeof r==`boolean`))return Hc.spinner();if(r!==!1){if(Oc(r))i=N(r);else if(Ec(r)){let e=r;o.type=a?`loading`:t,i=e(o),i=!i&&a?Hc.spinner():i}else Da(r)?i=Na(r,o):Tc(r)||wc(r)?i=r:Uc(t)&&(i=Hc[t](o));return i}}var Gc=()=>{};function Kc(e,t,n=J.COLLAPSE_DURATION){let{scrollHeight:r,style:i}=e,a=n;requestAnimationFrame(()=>{i.minHeight=`initial`,i.height=r+`px`,i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height=`0`,i.padding=`0`,i.margin=`0`,setTimeout(t,a)})})}function qc(e){let t=P(!1),n=P(!1),r=P(!1),i=P(Mc.Enter),a=qt({...e,appendPosition:e.appendPosition||!1,collapse:typeof e.collapse>`u`||e.collapse,collapseDuration:e.collapseDuration||J.COLLAPSE_DURATION}),o=a.done||Gc,s=K(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),c=K(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),l=K(()=>e.pauseOnHover?{onMouseenter:g,onMouseleave:h}:{});function u(){let t=s.value.split(` `);f().addEventListener(Vs.ENTRANCE_ANIMATION_END,h,{once:!0});let n=e=>{let r=f();e.target===r&&(r.dispatchEvent(new Event(Vs.ENTRANCE_ANIMATION_END)),r.removeEventListener(`animationend`,n),r.removeEventListener(`animationcancel`,n),i.value===Mc.Enter&&e.type!==`animationcancel`&&r.classList.remove(...t))};e.pauseOnFocusLoss&&p(),(()=>{let e=f();e.classList.add(...t),e.addEventListener(`animationend`,n),e.addEventListener(`animationcancel`,n)})()}function d(){if(!f())return;let e=()=>{let t=f();t.removeEventListener(`animationend`,e),a.collapse?Kc(t,o,a.collapseDuration):o()};n.value||(r.value?e():setTimeout(()=>{let t=f();i.value=Mc.Exit,t&&(t.className+=` ${c.value}`,t.addEventListener(`animationend`,e))}))}function f(){return e.toastRef.value}function p(){document.hasFocus()||g(),window.addEventListener(`focus`,h),window.addEventListener(`blur`,g)}function m(){window.removeEventListener(`focus`,h),window.removeEventListener(`blur`,g)}function h(){(!e.loading.value||e.isLoading===void 0)&&(t.value=!0)}function g(){t.value=!1}function _(e){e&&(e.stopPropagation(),e.preventDefault()),n.value=!1}return qn(d),qn(()=>{let e=hc();n.value=e.findIndex(e=>e.toastId===a.toastId)>-1}),qn(()=>{e.isLoading!==void 0&&(e.loading.value?g():h())}),Vr(u),Gr(()=>{e.pauseOnFocusLoss&&m()}),{isIn:n,isRunning:t,hideToast:_,eventHandlers:l}}function Jc(e){if(!e||typeof e!=`object`||Array.isArray(e)||e.__v_isVNode)return!1;let t=e;return[`title`,`content`].some(e=>e in t)}var Yc=R({name:`ToastItem`,inheritAttrs:!1,props:Nc,setup(e){let t=P(),n=K(()=>!!e.isLoading),r=K(()=>e.progress!==void 0&&e.progress!==null),i=K(()=>Wc(e)),a=K(()=>[`${J.CSS_NAMESPACE}__toast`,`${J.CSS_NAMESPACE}__toast-theme--${e.theme}`,`${J.CSS_NAMESPACE}__toast--${e.type}`,e.rtl?`${J.CSS_NAMESPACE}__toast--rtl`:void 0,e.toastClassName||``].filter(Boolean).join(` `)),{isRunning:o,isIn:s,hideToast:c,eventHandlers:l}=qc({toastRef:t,loading:n,done:()=>{yc.remove(e.toastId)},...qs(e.transition,e.disabledEnterTransition),...e});function u(){let t=e.content;if(Jc(t)){let e=[];return t.title!==void 0&&e.push(U(`div`,{"data-testid":`toast-text-title`,class:`${J.CSS_NAMESPACE}__toast-text-title`},[t.title])),t.content!==void 0&&e.push(U(`div`,{"data-testid":`toast-text-content`,class:`${J.CSS_NAMESPACE}__toast-text-content`},[t.content])),U(`div`,{"data-testid":`toast-text-content-wrapper`,class:`${J.CSS_NAMESPACE}__toast-text`},[e])}return Oc(t)?oo(N(t),{toastProps:N(e),closeToast:c,data:e.data,...e.expandCustomProps?e.contentProps:{contentProps:e.contentProps||{}}}):Ec(t)?t({toastProps:N(e),closeToast:c,data:e.data}):e.dangerouslyHTMLString?oo(`div`,{innerHTML:t}):t}return()=>U(`div`,Ra({id:e.toastId,class:a.value,style:e.toastStyle||{},ref:t,"data-testid":`toast-item-${e.toastId}`,onClick:t=>{e.closeOnClick&&c(),e.onClick&&e.onClick(t)}},l.value),[U(`div`,{role:e.role,"data-testid":`toast-body`,class:`${J.CSS_NAMESPACE}__toast-body ${e.bodyClassName||``}`},[i.value!=null&&U(`div`,{"data-testid":`toast-icon-${e.type}`,class:[`${J.CSS_NAMESPACE}__toast-icon`,e.isLoading?``:`${J.CSS_NAMESPACE}--animate-icon ${J.CSS_NAMESPACE}__zoom-enter`].join(` `)},[Oc(i.value)?oo(N(i.value),{theme:e.theme,type:e.type}):Ec(i.value)?i.value({theme:e.theme,type:e.type}):i.value]),U(`div`,{"data-testid":`toast-content`},[u()])]),(e.closeButton===void 0||e.closeButton===!0)&&U(Fc,{theme:e.theme,closeToast:e=>{e.stopPropagation(),e.preventDefault(),c()}},null),Oc(e.closeButton)?oo(N(e.closeButton),{closeToast:c,type:e.type,theme:e.theme}):Ec(e.closeButton)?e.closeButton({closeToast:c,type:e.type,theme:e.theme}):null,U(Pc,{className:e.progressClassName,style:e.progressStyle,rtl:e.rtl,theme:e.theme,isIn:s.value,type:e.type,hide:e.hideProgressBar,isRunning:o.value,autoClose:e.autoClose,controlledProgress:r.value,progress:e.progress,closeToast:e.isLoading?void 0:c},null)])}}),Xc=`vue3-toastify:url-change`,Zc=0,Qc;function $c(){if(typeof window<`u`&&Sc.lastUrl!==window.location.href){Sc.lastUrl=window.location.href;let e=e=>typeof e.clearOnUrlChange==`boolean`?e.clearOnUrlChange:Ac().clearOnUrlChange!==!1,t=Object.values(pc).reduce((e,t)=>(Array.isArray(t)&&e.push(...t),e),[]);for(let n of t)n.toastId&&e(n)&&yc.dismiss(n.toastId);mc.items=mc.items.filter(t=>!e(t.toastProps))}}function el(){let{history:e}=window,t=e.pushState,n=e.replaceState;return e.pushState=function(...e){let n=t.apply(this,e);return window.dispatchEvent(new Event(Xc)),n},e.replaceState=function(...e){let t=n.apply(this,e);return window.dispatchEvent(new Event(Xc)),t},()=>{e.pushState=t,e.replaceState=n}}function tl(){if(typeof window>`u`||Qc)return;let e=el(),t=()=>$c();window.addEventListener(Xc,t),window.addEventListener(`popstate`,t),window.addEventListener(`hashchange`,t),Qc=()=>{e(),window.removeEventListener(Xc,t),window.removeEventListener(`popstate`,t),window.removeEventListener(`hashchange`,t),Qc=void 0}}function nl(){Qc&&(Qc(),Sc.lastUrl=``)}var rl=R({name:`ToastifyContainer`,inheritAttrs:!1,props:Nc,setup(e){let t=K(()=>e.containerId),n=K(()=>pc[t.value]||[]),r=K(()=>n.value.filter(t=>t.position===e.position));return Vr(()=>{typeof window<`u`&&(Zc+=1,tl())}),Gr(()=>{typeof window<`u`&&Zc>0&&(--Zc,Zc===0&&nl())}),()=>U(z,null,[r.value.map(e=>{let{toastId:t=``}=e;return U(Yc,Ra({key:t},e),null)})])}}),il=!1,al={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function ol(){let e=[];return hc().forEach(t=>{let n=document.getElementById(t.containerId);n&&!n.classList.contains(Ys)&&e.push(t)}),e}function sl(e){let t=ol().length,n=e??0;return n>0&&t+mc.items.length>=n}function cl(e){sl(e.limit)&&!e.updateId&&mc.items.push({toastId:e.toastId,containerId:e.containerId,toastContent:e.content,toastProps:e})}function ll(e,t,n={}){if(il)return;n=Dc(Ac(),{type:t},N(n)),(!n.toastId||typeof n.toastId!=`string`&&typeof n.toastId!=`number`)&&(n.toastId=Cc()),n={...n,...n.type===`loading`?al:{},content:e,containerId:n.containerId||String(n.position)};let r=Number(n?.progress);return!isNaN(r)&&r<0&&(n.progress=0),r>1&&(n.progress=1),n.theme===`auto`&&(n.theme=jc()),cl(n),Sc.lastUrl=window.location.href,n.multiple?mc.items.length?n.updateId&&_c(e,n):_c(e,n):(il=!0,Y.clearAll(void 0,!1),setTimeout(()=>{_c(e,n)},0),setTimeout(()=>{il=!1},390)),n.toastId}var Y=(e,t)=>ll(e,Is.DEFAULT,t);Y.info=(e,t)=>ll(e,Is.DEFAULT,{...t,type:Is.INFO}),Y.error=(e,t)=>ll(e,Is.DEFAULT,{...t,type:Is.ERROR}),Y.warning=(e,t)=>ll(e,Is.DEFAULT,{...t,type:Is.WARNING}),Y.warn=Y.warning,Y.success=(e,t)=>ll(e,Is.DEFAULT,{...t,type:Is.SUCCESS}),Y.loading=(e,t)=>ll(e,Is.DEFAULT,Dc(t,al)),Y.dark=(e,t)=>ll(e,Is.DEFAULT,Dc(t,{theme:Fs.DARK})),Y.remove=e=>{e?yc.dismiss(e):yc.clear()},Y.clearAll=(e,t)=>{An(()=>{yc.clear(e,t)})},Y.isActive=e=>{let t=!1;return t=ol().findIndex(t=>t.toastId===e)>-1,t},Y.update=(e,t={})=>{setTimeout(()=>{let n=gc(e);if(n){let r=N(n),{content:i}=r,a={...r,...t,toastId:t.toastId||e,updateId:Cc()},o=a.render||i;delete a.render,ll(o,a.type,a)}},0)},Y.done=e=>{Y.update(e,{isLoading:!1,progress:1})},Y.promise=ul;function ul(e,{pending:t,error:n,success:r},i){let a,o={...i||{},autoClose:!1};t&&(a=Tc(t)?Y.loading(t,o):Y.loading(t.render,{...o,...t}));let s={autoClose:i?.autoClose??!0,closeOnClick:i?.closeOnClick??!0,closeButton:i?.autoClose??null,isLoading:void 0,draggable:null,delay:100},c=(e,t,n)=>{if(t==null){Y.remove(a);return}let r={type:e,...s,...i,data:n},o=Tc(t)?{render:t}:t;return a?Y.update(a,{...r,...o,isLoading:!1}):Y(o.render,{...r,...o,isLoading:!1}),n},l=Ec(e)?e():e;return l.then(e=>{c(`success`,r,e)}).catch(e=>{c(`error`,n,e)}),l}Y.POSITION=Ps,Y.THEME=Fs,Y.TYPE=Is,Y.TRANSITIONS=Ls;var dl={install(e,t={}){bc.useHandler=t.useHandler||(()=>{}),fl(t)}};typeof window<`u`&&(window.Vue3Toastify=dl);function fl(e={}){kc(Dc(Bs,e))}var pl=e=>e.startsWith(`/`);function ml(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function hl(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&ml(e.default)}var X=Object.assign;function gl(e,t){let n={};for(let r in t){let i=t[r];n[r]=vl(i)?i.map(e):e(i)}return n}var _l=()=>{},vl=Array.isArray;function yl(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var bl=Symbol(``);function xl(e,t){return X(Error(),{type:e,[bl]:!0},t)}function Sl(e,t){return e instanceof Error&&bl in e&&(t==null||!!(e.type&t))}var Cl=Symbol(``),wl=Symbol(``),Tl=Symbol(``),El=Symbol(``),Dl=Symbol(``);function Ol(){return Wn(Tl)}function kl(e){return Wn(El)}var Al=typeof document<`u`,jl=/#/g,Ml=/&/g,Nl=/\//g,Pl=/=/g,Fl=/\?/g,Il=/\+/g,Ll=/%5B/g,Rl=/%5D/g,zl=/%5E/g,Bl=/%60/g,Vl=/%7B/g,Hl=/%7C/g,Ul=/%7D/g,Wl=/%20/g;function Gl(e){return e==null?``:encodeURI(``+e).replace(Hl,`|`).replace(Ll,`[`).replace(Rl,`]`)}function Kl(e){return Gl(e).replace(Vl,`{`).replace(Ul,`}`).replace(zl,`^`)}function ql(e){return Gl(e).replace(Il,`%2B`).replace(Wl,`+`).replace(jl,`%23`).replace(Ml,`%26`).replace(Bl,"`").replace(Vl,`{`).replace(Ul,`}`).replace(zl,`^`)}function Jl(e){return ql(e).replace(Pl,`%3D`)}function Yl(e){return Gl(e).replace(jl,`%23`).replace(Fl,`%3F`)}function Xl(e){return Yl(e).replace(Nl,`%2F`)}function Zl(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Ql=/\/$/,$l=e=>e.replace(Ql,``);function eu(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=cu(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Zl(o)}}function tu(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function nu(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function ru(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&iu(t.matched[r],n.matched[i])&&au(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function iu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function au(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ou(e[n],t[n]))return!1;return!0}function ou(e,t){return vl(e)?su(e,t):vl(t)?su(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function su(e,t){return vl(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function cu(e,t){if(pl(e))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`){if(s===`..`)a>1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var lu={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function uu(e){if(!e){if(Al){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),$l(e)}var du=/^[^#]+#/;function fu(e,t){return e.replace(du,`#`)+t}function pu(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var mu=()=>history.scrollRestoration===`manual`?{left:window.scrollX,top:window.scrollY}:null;function hu(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pu(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gu(e,t){return(history.state?history.state.position-t:-1)+e}var _u=new Map;function vu(e){_u.set(e,mu())}function yu(e){let t=_u.get(e);return _u.delete(e),t}function bu(e){return typeof e==`string`||e&&typeof e==`object`}function xu(e){return typeof e==`string`||typeof e==`symbol`}function Su(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Il,` `),i=r.indexOf(`=`),a=Zl(i<0?r:r.slice(0,i)),o=i<0?null:Zl(r.slice(i+1));if(a in t){let e=t[a];vl(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Cu(e){let t=``;for(let n in e){let r=e[n];if(n=Jl(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(vl(r)?r.map(e=>e&&ql(e)):[r&&ql(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function wu(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=vl(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Tu(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Eu(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(xl(4,{from:n,to:t})):e instanceof Error?c(e):bu(e)?c(xl(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Du(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t===`beforeRouteEnter`||o.instances[e]){if(ml(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Eu(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=hl(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Eu(c,n,r,o,e,i)()}))}}}return a}function Ou(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>iu(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>iu(e,s))||i.push(s))}return[n,r,i]}var ku=()=>location.protocol+`//`+location.host;function Au(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),nu(n,``)}return nu(n,e)+r+i}function ju(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Au(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(X({},e.state,{scroll:mu()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),{pauseListeners:c,listen:l,destroy:d}}function Mu(e,t,n,r=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:null}}function Nu(e){let{history:t,location:n}=window,r={value:Au(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:ku()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,X({},t.state,Mu(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=X({},i.value,t.state,{forward:e,scroll:mu()});a(o.current,o,!0),a(e,X({},Mu(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Pu(e){e=uu(e);let t=Nu(e),n=ju(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=X({location:``,base:e,go:r,createHref:fu.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Fu={type:0,value:``},Iu=/[a-zA-Z0-9_]/;function Lu(e){if(!e)return[[]];if(e===`/`)return[[Fu]];if(!pl(e))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Iu.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Ru=`[^/]+?`,zu={sensitive:!1,strict:!1,start:!0,end:!0},Bu=/[.+*?^${}()[\]/\\]/g;function Vu(e,t){let n=X({},zu,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(Bu,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Ru;if(u!==Ru){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(vl(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=vl(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Hu(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Uu(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Hu(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Wu(r))return 1;if(Wu(i))return-1}return i.length-r.length}function Wu(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Gu={strict:!1,end:!0,sensitive:!1};function Ku(e,t,n){let r=X(Vu(Lu(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function qu(e,t){let n=[],r=new Map;t=yl(Gu,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Yu(e);s.aliasOf=r&&r.record;let l=yl(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Yu(X({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&!pl(u)){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Ku(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Zu(d)&&o(e.name)),td(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:_l}function o(e){if(xu(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=$u(e,n);n.splice(t,0,e),e.record.name&&!Zu(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw xl(1,{location:e});s=i.record.name,a=X(Ju(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Ju(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw xl(1,{location:e,currentLocation:t});s=i.record.name,a=X({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Qu(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Ju(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Yu(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xu(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 Xu(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Zu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qu(e){return e.reduce((e,t)=>X(e,t.meta),{})}function $u(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Uu(e,t[i])<0?r=i:n=i+1}let i=ed(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function ed(e){let t=e;for(;t=t.parent;)if(td(t)&&Uu(e,t)===0)return t}function td({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function nd(e){let t=Wn(Tl),n=Wn(El),r=K(()=>{let n=F(e.to);return t.resolve(n)}),i=K(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(iu.bind(null,i));if(o>-1)return o;let s=sd(e[t-2]);return t>1&&sd(i)===s&&a[a.length-1].path!==s?a.findIndex(iu.bind(null,e[t-2])):o}),a=K(()=>i.value>-1&&od(n.params,r.value.params)),o=K(()=>i.value>-1&&i.value===n.matched.length-1&&au(n.params,r.value.params));function s(n={}){if(ad(n)){let n=t[F(e.replace)?`replace`:`push`](F(e.to)).catch(_l);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:K(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function rd(e){return e.length===1?e[0]:e}var id=R({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:nd,setup(e,{slots:t}){let n=qt(nd(e)),{options:r}=Wn(Tl),i=K(()=>({[cd(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[cd(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&rd(t.default(n));return e.custom?r:oo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function ad(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function od(e,t){for(let n in t){let r=t[n],i=e[n];if(vl(r)){if(!vl(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}else if(r!==i)return!1}return!0}function sd(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var cd=(e,t,n)=>e??t??n,ld=R({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Wn(Dl),i=K(()=>e.route||r.value),a=Wn(wl,0),o=K(()=>{let e=F(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=K(()=>i.value.matched[o.value]);Un(wl,K(()=>o.value+1)),Un(Cl,s),Un(Dl,i);let c=P();return Jn(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!iu(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return ud(n.default,{Component:l,route:r});let u=o.props[a],d=oo(l,X({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return ud(n.default,{Component:d,route:r})||d}}});function ud(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var dd=ld;function fd(e){let t=qu(e.routes,e),n=e.parseQuery||Su,r=e.stringifyQuery||Cu,i=e.history,a=Tu(),o=Tu(),s=Tu(),c=on(lu),l=on(0),u=lu;Al&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=gl.bind(null,e=>``+e),f=gl.bind(null,Xl),p=gl.bind(null,Zl);function m(e,n){let r,i;xu(e)?(r=t.getRecordMatcher(e),i=n):i=e;let a=t.addRoute(i,r);return l.value++,()=>{a(),l.value++}}function h(e){let n=t.getRecordMatcher(e);n&&(t.removeRoute(n),l.value++)}function g(){t.clearRoutes(),l.value++}function _(){return t.getRoutes().map(e=>e.record)}function v(e){return!!t.getRecordMatcher(e)}function y(e,a){if(l.value,typeof e==`string`){a||=e.startsWith(`/`)?lu:c.value;let r=eu(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return X(r,o,{params:p(o.params),redirectedFrom:void 0,href:s})}a=X({},a||(e.path!=null&&e.path.startsWith(`/`)&&!(`name`in e&&e.name)?lu:c.value));let o;if(e.path!=null)o=X({},e,{path:eu(n,e.path,a.path).path});else{let t=X({},e.params);for(let e in t)t[e]??delete t[e];o=X({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),u=e.hash||``;s.params=d(p(s.params));let m=tu(r,X({},e,{hash:Kl(u),path:s.path})),h=i.createHref(m);return X({fullPath:m,hash:u,query:r===Cu?wu(e.query):e.query||{}},s,{redirectedFrom:void 0,href:h})}function b(e){return typeof e==`string`?eu(n,e,c.value.path):X({},e)}function x(e,t){if(u!==e)return xl(8,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(X(b(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),X({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=u=y(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,l=w(n,i);if(l)return T(X(b(l),{state:typeof l==`object`?X({},a,l.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&ru(r,i,n)&&(f=xl(16,{to:d,from:i}),ue(i,i,!0,!1)),(f?Promise.resolve(f):ee(d,i)).catch(e=>Sl(e)?Sl(e,2)?e:le(e):se(e,d,i)).then(e=>{if(e){if(Sl(e,2))return T(X({replace:s},b(e.to),{state:typeof e.to==`object`?X({},a,e.to.state):a,force:o}),t||d)}else e=ne(d,i,!0,s,a);return te(d,i,e),e})}function E(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){let t=k.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function ee(e,t){let n,[r,i,s]=Ou(e,t);n=Du(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Eu(r,e,t))});let c=E.bind(null,e,t);return n.push(c),me(n).then(()=>{n=[];for(let r of a.list())n.push(Eu(r,e,t));return n.push(c),me(n)}).then(()=>{n=Du(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Eu(r,e,t))});return n.push(c),me(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(vl(r.beforeEnter))for(let i of r.beforeEnter)n.push(Eu(i,e,t));else n.push(Eu(r.beforeEnter,e,t))}return n.push(c),me(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Du(s,`beforeRouteEnter`,e,t,D),n.push(c),me(n))).then(()=>{n=[];for(let r of o.list())n.push(Eu(r,e,t));return n.push(c),me(n)}).catch(e=>Sl(e,8)?e:Promise.reject(e))}function te(e,t,n){s.list().forEach(r=>D(()=>r(e,t,n)))}function ne(e,t,n,r,a){let o=x(e,t);if(o)return o;let s=t===lu,l=Al?history.state:{};n&&(r||s?i.replace(e.fullPath,X({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ue(e,t,n,s),le()}let re;function ie(){re||=i.listen((e,t,n)=>{if(!pe.listening)return;let r=y(e),a=w(r,pe.currentRoute.value);if(a){T(X(a,{replace:!0,force:!0}),r).catch(_l);return}u=r;let o=c.value;Al&&n.delta&&vu(gu(o.fullPath,n.delta)),ee(r,o).catch(e=>Sl(e,12)?e:Sl(e,2)?(T(X(b(e.to),{force:!0}),r).then(e=>{Sl(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(_l),Promise.reject()):(n.delta&&i.go(-n.delta,!1),se(e,r,o))).then(e=>{e||=ne(r,o,!1),e&&(n.delta&&!Sl(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Sl(e,20)&&i.go(-1,!1)),te(r,o,e)}).catch(_l)})}let ae=Tu(),oe=Tu(),O;function se(e,t,n){le(e);let r=oe.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ce(){return O&&c.value!==lu?Promise.resolve():new Promise((e,t)=>{ae.add([e,t])})}function le(e){return O||(O=!e,ie(),ae.list().forEach(([t,n])=>e?n(e):t()),ae.reset()),e}function ue(t,n,r,i){let{scrollBehavior:a}=e;if(!Al||!a)return Promise.resolve();let o=!r&&yu(gu(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return An().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&hu(e)).catch(e=>t===c.value&&se(e,t,n))}let de=e=>i.go(e),fe,k=new Set,pe={currentRoute:c,listening:!0,addRoute:m,removeRoute:h,clearRoutes:g,hasRoute:v,getRoutes:_,resolve:y,options:e,push:S,replace:C,go:de,back:()=>de(-1),forward:()=>de(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:oe.add,isReady:ce,install(e){e.component(`RouterLink`,id),e.component(`RouterView`,dd),e.config.globalProperties.$router=pe,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>F(c)}),Al&&!fe&&c.value===lu&&(fe=!0,S(i.location).catch(e=>{}));let t={};for(let e in lu)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Tl,pe),e.provide(El,Jt(t)),e.provide(Dl,c);let n=e.unmount;k.add(e),e.unmount=function(){k.delete(e),k.size<1&&(u=lu,re&&re(),re=null,c.value=lu,fe=!1,O=!1),n()}}};function me(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return pe}var pd=c(o(((e,t)=>{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof e==`object`?t.exports=r():n.NProgress=r()})(e,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},(function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}})(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`};return a.transition=`all `+n+`ms `+i,a}var a=(function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}})(),o=(function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}})();function s(e,t){return(typeof e==`string`?e:u(e)).indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})}))(),1);pd.default.configure({showSpinner:!1,minimum:.1,easing:`ease`,speed:200,trickle:!0});var md=0;function hd(){md+=1,md===1&&pd.default.start()}function gd(){md=Math.max(0,md-1),md===0&&pd.default.done()}function _d(){md=0,pd.default.done()}async function vd(e){hd();try{return await e}finally{gd()}}function yd(e){return!e.ok}var bd=`x-ehbrowser-token`,xd={"system.health":{method:`GET`,path:`/api/health`,description:`服务健康状态、版本与运行时长`,requiresToken:!1,requiresAccount:!1},"system.shutdown":{method:`POST`,path:`/api/system/shutdown`,description:`关闭本地服务;界面与事件流随之断开`,requiresToken:!0,requiresAccount:!1},"system.events":{method:`GET`,path:`/api/events`,description:`SSE 事件流:配置变更、鉴权变更、下载进度、日志`,requiresToken:!0,requiresAccount:!1},"config.get":{method:`GET`,path:`/api/config`,description:`取配置快照(生效值 + 每个字段的来源层)`,requiresToken:!0,requiresAccount:!1},"config.patch":{method:`PATCH`,path:`/api/config`,description:`局部更新用户配置(深合并)`,requiresToken:!0,requiresAccount:!1},"config.paths":{method:`GET`,path:`/api/config/paths`,description:`数据目录及其来源层(排错用)`,requiresToken:!0,requiresAccount:!1},"config.export":{method:`POST`,path:`/api/config/export`,description:`导出配置包(可选包含账号凭据)`,requiresToken:!0,requiresAccount:!1},"config.import":{method:`POST`,path:`/api/config/import`,description:`导入配置包(自动备份并迁移版本)`,requiresToken:!0,requiresAccount:!1},"auth.status":{method:`GET`,path:`/api/auth/status`,description:`登录状态摘要(不含任何凭据)`,requiresToken:!0,requiresAccount:!1},"auth.login":{method:`POST`,path:`/api/auth/login`,description:`用账号密码登录,cookie 由服务端持有`,requiresToken:!0,requiresAccount:!1},"auth.logout":{method:`POST`,path:`/api/auth/logout`,description:`清除当前账号的登录态`,requiresToken:!0,requiresAccount:!1},"auth.accounts.list":{method:`GET`,path:`/api/auth/accounts`,description:`账号列表(脱敏)`,requiresToken:!0,requiresAccount:!1},"auth.accounts.create":{method:`POST`,path:`/api/auth/accounts`,description:`新增账号(提交 cookie 或密码)`,requiresToken:!0,requiresAccount:!1},"auth.accounts.update":{method:`PATCH`,path:`/api/auth/accounts/:accountId`,description:`更新账号备注或凭据`,requiresToken:!0,requiresAccount:!1},"auth.accounts.remove":{method:`DELETE`,path:`/api/auth/accounts/:accountId`,description:`删除账号`,requiresToken:!0,requiresAccount:!1},"auth.accounts.activate":{method:`POST`,path:`/api/auth/accounts/:accountId/activate`,description:`切换当前使用的账号`,requiresToken:!0,requiresAccount:!1},"galleries.search":{method:`GET`,path:`/api/galleries`,description:`搜索/浏览画廊列表`,requiresToken:!0,requiresAccount:!0},"galleries.detailCache":{method:`GET`,path:`/api/galleries/detail-cache`,description:`详情页缓存的状态(条数、上限、体积)`,requiresToken:!0,requiresAccount:!1},"galleries.detailCache.clear":{method:`DELETE`,path:`/api/galleries/detail-cache`,description:`清空详情页缓存`,requiresToken:!0,requiresAccount:!1},"galleries.searchCache":{method:`GET`,path:`/api/galleries/cache`,description:`上一次检索的条件与结果;进程内缓存,应用重启即丢`,requiresToken:!0,requiresAccount:!1},"galleries.newer":{method:`GET`,path:`/api/galleries/:gid/:token/newer`,description:`查询是否存在更新的版本,结果落盘缓存`,requiresToken:!0,requiresAccount:!1},"galleries.detail":{method:`GET`,path:`/api/galleries/:gid/:token`,description:`画廊详情(标签、预览、评论)`,requiresToken:!0,requiresAccount:!0},"galleries.page":{method:`GET`,path:`/api/galleries/:gid/:token/pages/:page`,description:`取单页图片地址(服务端代为调用 showpage)`,requiresToken:!0,requiresAccount:!0},"galleries.token":{method:`POST`,path:`/api/galleries/token`,description:`由单页链接反查画廊 token(gtoken)`,requiresToken:!0,requiresAccount:!0},"galleries.rate":{method:`POST`,path:`/api/galleries/:gid/:token/rating`,description:`评分(需要 apiuid/apikey)`,requiresToken:!0,requiresAccount:!0},"galleries.favorite":{method:`POST`,path:`/api/galleries/:gid/:token/favorite`,description:`收藏到指定分类,slot<0 表示取消收藏`,requiresToken:!0,requiresAccount:!0},"galleries.torrents":{method:`GET`,path:`/api/galleries/:gid/:token/torrents`,description:`种子列表`,requiresToken:!0,requiresAccount:!1},"galleries.previews":{method:`GET`,path:`/api/galleries/:gid/:token/previews`,description:`某一组预览图,每 20 页一组`,requiresToken:!0,requiresAccount:!1},"galleries.archives":{method:`GET`,path:`/api/galleries/:gid/:token/archives`,description:`归档选项与账户资金`,requiresToken:!0,requiresAccount:!0},"library.list":{method:`GET`,path:`/api/library`,description:`本地已下载的画廊列表`,requiresToken:!0,requiresAccount:!1},"library.progress":{method:`PATCH`,path:`/api/library/:gid/:resolution`,description:`写回某个本地画廊的阅读进度`,requiresToken:!0,requiresAccount:!1},"library.image":{method:`GET`,path:`/api/library/:gid/:resolution/pages/:page`,description:`取本地已下载的第 page 页图片`,requiresToken:!0,requiresAccount:!1},"library.updates":{method:`GET`,path:`/api/library/updates`,description:`更新检查的缓存与进度(只读)`,requiresToken:!0,requiresAccount:!1},"library.check":{method:`POST`,path:`/api/library/updates`,description:`发起更新检查,结果经 SSE 逐条推送`,requiresToken:!0,requiresAccount:!0},"library.updates.forget":{method:`POST`,path:`/api/library/updates/forget`,description:`从更新列表里移除若干条目(不删除本地文件)`,requiresToken:!0,requiresAccount:!1},"library.remove":{method:`DELETE`,path:`/api/library/:gid/:resolution`,description:`删除本地画廊及其目录`,requiresToken:!0,requiresAccount:!1},"storage.stats":{method:`GET`,path:`/api/storage`,description:`本地画廊与画廊缓存的占用统计`,requiresToken:!0,requiresAccount:!1},"storage.cleanup":{method:`POST`,path:`/api/storage/cleanup`,description:`按时间清理画廊缓存`,requiresToken:!0,requiresAccount:!1},"favorites.state":{method:`GET`,path:`/api/favorites`,description:`本地收藏夹与云端收藏分类`,requiresToken:!0,requiresAccount:!1},"favorites.folder.create":{method:`POST`,path:`/api/favorites/folders`,description:`新建本地收藏夹`,requiresToken:!0,requiresAccount:!1},"favorites.folder.remove":{method:`DELETE`,path:`/api/favorites/folders/:folderId`,description:`删除本地收藏夹及其条目`,requiresToken:!0,requiresAccount:!1},"favorites.items":{method:`GET`,path:`/api/favorites/folders/:folderId/items`,description:`本地收藏夹里的画廊`,requiresToken:!0,requiresAccount:!1},"favorites.items.add":{method:`POST`,path:`/api/favorites/items`,description:`把一个画廊加入本地收藏夹(可同时指定云端槽位)`,requiresToken:!0,requiresAccount:!1},"favorites.items.remove":{method:`DELETE`,path:`/api/favorites/folders/:folderId/items/:gid`,description:`从本地收藏夹移除一个画廊`,requiresToken:!0,requiresAccount:!1},"favorites.items.slot":{method:`PATCH`,path:`/api/favorites/folders/:folderId/items/:gid`,description:`改这条收藏的标记号(云端槽位),登录时同步到上游`,requiresToken:!0,requiresAccount:!1},"favorites.cloud":{method:`GET`,path:`/api/favorites/cloud`,description:`云端某个收藏分类里的画廊`,requiresToken:!0,requiresAccount:!0},"favorites.items.refresh":{method:`POST`,path:`/api/favorites/folders/:folderId/items/refresh`,description:`更新标记号:把收藏从这一版挪到上游的最新版本`,requiresToken:!0,requiresAccount:!1},"log.state":{method:`GET`,path:`/api/logs`,description:`日志目录、文件名与最近若干条日志`,requiresToken:!0,requiresAccount:!1},"translate.status":{method:`GET`,path:`/api/translate`,description:`标签翻译词库的状态`,requiresToken:!0,requiresAccount:!1},"translate.tags":{method:`GET`,path:`/api/translate/tags`,description:`整份标签翻译词库(原文 → 中文名)`,requiresToken:!0,requiresAccount:!1},"translate.update":{method:`POST`,path:`/api/translate/update`,description:`从 EhTagTranslation/Database 的发布包下载并重建词库`,requiresToken:!0,requiresAccount:!1},"translate.remove":{method:`DELETE`,path:`/api/translate`,description:`删除本地词库,回到内置的常用翻译`,requiresToken:!0,requiresAccount:!1},"playlist.list":{method:`GET`,path:`/api/playlist`,description:`用户播放列表与当前播放项`,requiresToken:!0,requiresAccount:!1},"playlist.add":{method:`POST`,path:`/api/playlist`,description:`把一个画廊加入用户播放列表`,requiresToken:!0,requiresAccount:!1},"playlist.play":{method:`POST`,path:`/api/playlist/:key/play`,description:`把某一项设为当前播放项`,requiresToken:!0,requiresAccount:!1},"playlist.progress":{method:`PATCH`,path:`/api/playlist/:key`,description:`写回某个画廊的播放进度`,requiresToken:!0,requiresAccount:!1},"playlist.remove":{method:`DELETE`,path:`/api/playlist/:key`,description:`从播放列表移除一项`,requiresToken:!0,requiresAccount:!1},"playlist.clear":{method:`DELETE`,path:`/api/playlist`,description:`清空播放列表`,requiresToken:!0,requiresAccount:!1},"downloads.list":{method:`GET`,path:`/api/downloads`,description:`下载任务列表`,requiresToken:!0,requiresAccount:!1},"downloads.create":{method:`POST`,path:`/api/downloads`,description:`新建归档下载任务`,requiresToken:!0,requiresAccount:!0},"downloads.retry":{method:`POST`,path:`/api/downloads/:taskId/retry`,description:`重新排队失败或已取消的下载任务`,requiresToken:!0,requiresAccount:!1},"downloads.cancel":{method:`DELETE`,path:`/api/downloads/:taskId`,description:`取消或移出下载任务`,requiresToken:!0,requiresAccount:!1}};function Sd(e,t={}){return e.replace(/:([A-Za-z0-9_]+)/g,(n,r)=>{let i=t[r];if(i===void 0)throw Error(`缺少路径参数:${r}(模板 ${e})`);return encodeURIComponent(String(i))})}function Cd(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!=null&&r!==``){if(Array.isArray(r)){if(r.length===0)continue;t.set(n,r.map(e=>String(e)).join(`,`))}else typeof r==`boolean`?t.set(n,r?`1`:`0`):t.set(n,String(r))}let n=t.toString().replaceAll(`+`,`%20`);return n===``?``:`?${n}`}function wd(e,...t){let n=t[0];return Sd(xd[e].path,n??{})}var Td=[`Doujinshi`,`Manga`,`Artist CG`,`Game CG`,`Western`,`Image Set`,`Non-H`,`Cosplay`,`Asian Porn`,`Misc`,`Private`],Ed=[`chinese`,`dutch`,`english`,`french`,`german`,`hungarian`,`italian`,`japanese`,`korean`,`polish`,`portuguese`,`russian`,`spanish`,`thai`,`vietnamese`],Dd=class extends Error{code;issues;constructor(e,t,n){super(t),this.name=`ApiCallError`,this.code=e,this.issues=n}};function Od(){let e=globalThis.window?.__EHBROWSER__;if(e===void 0)throw Error(`页面未注入启动信息,请通过服务端地址访问`);return e}function kd(e,t,n){return wd(`library.image`,{gid:e,resolution:t,page:n})+Cd({_token:Od().token})}var Ad={"system.health":`GET`,"system.shutdown":`POST`,"system.events":`GET`,"config.get":`GET`,"config.patch":`PATCH`,"config.paths":`GET`,"config.export":`POST`,"config.import":`POST`,"auth.status":`GET`,"auth.login":`POST`,"auth.logout":`POST`,"auth.accounts.list":`GET`,"auth.accounts.create":`POST`,"auth.accounts.update":`PATCH`,"auth.accounts.remove":`DELETE`,"auth.accounts.activate":`POST`,"galleries.search":`GET`,"galleries.detailCache":`GET`,"galleries.detailCache.clear":`DELETE`,"galleries.searchCache":`GET`,"galleries.newer":`GET`,"galleries.detail":`GET`,"galleries.page":`GET`,"galleries.token":`POST`,"galleries.rate":`POST`,"galleries.favorite":`POST`,"galleries.previews":`GET`,"galleries.torrents":`GET`,"galleries.archives":`GET`,"favorites.state":`GET`,"favorites.folder.create":`POST`,"favorites.folder.remove":`DELETE`,"favorites.items":`GET`,"favorites.items.add":`POST`,"favorites.items.remove":`DELETE`,"favorites.items.slot":`PATCH`,"favorites.cloud":`GET`,"favorites.items.refresh":`POST`,"log.state":`GET`,"translate.status":`GET`,"translate.tags":`GET`,"translate.update":`POST`,"translate.remove":`DELETE`,"playlist.list":`GET`,"playlist.add":`POST`,"playlist.play":`POST`,"playlist.progress":`PATCH`,"playlist.remove":`DELETE`,"playlist.clear":`DELETE`,"library.updates":`GET`,"library.check":`POST`,"library.updates.forget":`POST`,"library.list":`GET`,"library.progress":`PATCH`,"library.image":`GET`,"library.remove":`DELETE`,"storage.stats":`GET`,"storage.cleanup":`POST`,"downloads.retry":`POST`,"downloads.list":`GET`,"downloads.create":`POST`,"downloads.cancel":`DELETE`};async function Z(e,t={}){let n=wd(e,t.params)+(t.query===void 0?``:Cd(t.query)),r=await(await vd(fetch(n,{method:Ad[e],headers:{[bd]:Od().token,"content-type":`application/json`},body:t.body===void 0?void 0:JSON.stringify(t.body),signal:t.signal}))).json();if(yd(r)){let e=r.error;throw new Dd(e.code,e.message,e.issues??[])}return r.data}function jd(e){return e instanceof Error&&e.name===`AbortError`||globalThis.DOMException!==void 0&&e instanceof globalThis.DOMException}function Q(e){if(e instanceof Dd){if(e.issues.length===0)return`${e.code}:${e.message}`;let t=e.issues.map(e=>`${e.path} ${e.message}`).join(`;`);return`${e.code}:${t}`}return e instanceof Error?e.message:String(e)}function Md(e){let t=new EventSource(`${wd(`system.events`)}${Cd({_token:Od().token})}`);for(let[n,r]of Object.entries(e))t.addEventListener(n,e=>{r(JSON.parse(e.data))});return()=>{t.close()}}var Nd=P([]),Pd=K(()=>Nd.value.filter(e=>e.status===`queued`||e.status===`running`)),Fd=K(()=>Pd.value.length);async function Id(){try{Nd.value=[...await Z(`downloads.list`)]}catch{}}async function Ld(e){if(e===``)return!1;let t=Rd();if(t!==null)try{return await t.writeText(e),!0}catch{}return zd(e)}function Rd(){return globalThis.navigator?.clipboard??null}function zd(e){let t=globalThis.document;if(t===void 0||typeof t.execCommand!=`function`)return!1;let n=t.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.style.position=`fixed`,n.style.opacity=`0`,t.body.append(n),n.select();let r=!1;try{r=t.execCommand(`copy`)}catch{r=!1}return n.remove(),r}var Bd={closeOnClick:!0,pauseOnHover:!0},Vd={success:{autoClose:2500},info:{autoClose:3e3},warning:{autoClose:4e3},error:{autoClose:!1,closeOnClick:!1},loading:{autoClose:!1}},Hd=`error-copied`;function Ud(e,t){return Y.success(e,{...Bd,...Vd.success,...t})}function Wd(e,t){let n=typeof e==`string`?e:``;return Y.error(e,{...Bd,...Vd.error,...n===``?{}:{onClick:()=>void Gd(n)},...t})}async function Gd(e){if(await Ld(e)){Ud(`错误信息已复制`,{toastId:Hd,autoClose:1500});return}Kd(`复制失败,请手动选中文本`,{autoClose:3e3})}function Kd(e,t){return Y.warning(e,{...Bd,...Vd.warning,...t})}function qd(e,t){return Y.info(e,{...Bd,...Vd.info,...t})}function Jd(e,t){return Y.loading(e,{...Bd,...Vd.loading,...t})}function Yd(e,t){if(e!==void 0)return typeof e==`string`?{render:e,...t}:{...t,...e}}function Xd(e,t,n){return Y.promise(e,{pending:t.pending,success:Yd(t.success,Vd.success),error:Yd(t.error,Vd.error)},{...Bd,...n})}function Zd(e,t){Y.update(e,{isLoading:!1,...t})}function Qd(e){return Y.isActive(e)}function $d(e){Y.remove(e)}function ef(e,t){Y.clearAll(e,t)}var $={success:Ud,error:Wd,warning:Kd,info:qd,loading:Jd,promise:Xd,update:Zd,isActive:Qd,remove:$d,clearAll:ef,POSITION:Y.POSITION,THEME:Y.THEME,TYPE:Y.TYPE},tf={class:`box`},nf={key:0},rf={key:0,class:`err`},af={class:`grid`},of={class:`actions`},sf=[`disabled`],cf=[`disabled`],lf={key:1},uf={class:`ops`},df=[`disabled`,`onClick`],ff=[`disabled`,`onClick`],pf={key:2,class:`muted`},mf={class:`grid`},hf={class:`actions`},gf=[`disabled`],_f=R({__name:`AccountPanel`,setup(e){let t=P(null),n=P([]),r=P(!1),i=P(``),a=P(``),o=P(`e-hentai`),s=P(``),c=P(``),l=P(``),u=P(``);async function d(){try{t.value=await Z(`auth.status`),n.value=[...await Z(`auth.accounts.list`)]}catch(e){$.error(Q(e))}}async function f(e,t){r.value=!0;try{await e(),await d(),$.success(t)}catch(e){$.error(Q(e))}finally{r.value=!1}}function p(){f(async()=>{t.value=await Z(`auth.login`,{body:{username:i.value,password:a.value,site:o.value}}),a.value=``},`登录完成`)}function m(){f(async()=>{await Z(`auth.accounts.create`,{body:{label:s.value===``?`导入的账号`:s.value,site:o.value,cookies:{ipbMemberId:c.value,ipbPassHash:l.value,igneous:u.value}}}),c.value=``,l.value=``,u.value=``},`账号已导入`)}function h(){f(async()=>{t.value=await Z(`auth.logout`)},`已清除登录态`)}function g(e){f(async()=>{t.value=await Z(`auth.accounts.activate`,{params:{accountId:e}})},`已切换账号`)}function _(e){f(async()=>{await Z(`auth.accounts.remove`,{params:{accountId:e}})},`账号已删除`)}return Vr(()=>{d()}),(e,d)=>(B(),V(`section`,tf,[d[21]||=H(`h2`,null,`登录状态`,-1),t.value?(B(),V(`dl`,nf,[d[7]||=H(`dt`,null,`已登录`,-1),H(`dd`,null,j(t.value.loggedIn?`是`:`否`),1),d[8]||=H(`dt`,null,`当前账号`,-1),H(`dd`,null,j(t.value.activeAccount?.label??`—`),1),d[9]||=H(`dt`,null,`账号数`,-1),H(`dd`,null,j(t.value.accountCount),1),d[10]||=H(`dt`,null,`igneous`,-1),H(`dd`,null,[t.value.igneousAgeDays===null?(B(),V(z,{key:0},[W(`未知`)],64)):(B(),V(z,{key:1},[W(` 已 `+j(t.value.igneousAgeDays)+` 天 `,1),t.value.igneousStale?(B(),V(`span`,rf,`(临近过期,建议重新登录)`)):G(``,!0)],64))]),d[11]||=H(`dt`,null,`里站可达`,-1),H(`dd`,null,j(t.value.exAccessible===null?`未探测`:t.value.exAccessible?`是`:`否`),1)])):G(``,!0),d[22]||=H(`h2`,null,`账号密码登录`,-1),d[23]||=H(`p`,{class:`muted`},` 登录在论坛域完成,Cookie 保存在服务端。取不到 igneous 时通常需要更换出口节点。 `,-1),H(`div`,af,[H(`div`,null,[d[12]||=H(`label`,null,`用户名`,-1),L(H(`input`,{"onUpdate:modelValue":d[0]||=e=>i.value=e,autocomplete:`username`},null,512),[[q,i.value]])]),H(`div`,null,[d[13]||=H(`label`,null,`密码`,-1),L(H(`input`,{"onUpdate:modelValue":d[1]||=e=>a.value=e,type:`password`,autocomplete:`current-password`},null,512),[[q,a.value]])]),H(`div`,null,[d[15]||=H(`label`,null,`站点`,-1),L(H(`select`,{"onUpdate:modelValue":d[2]||=e=>o.value=e},[...d[14]||=[H(`option`,{value:`e-hentai`},`外站`,-1),H(`option`,{value:`exhentai`},`里站`,-1)]],512),[[ys,o.value]])])]),H(`div`,of,[H(`button`,{disabled:r.value||i.value===``||a.value===``,onClick:p},` 登录 `,8,sf),H(`button`,{disabled:r.value,onClick:h},`清除登录态`,8,cf)]),d[24]||=H(`h2`,null,`已有账号`,-1),n.value.length>0?(B(),V(`table`,lf,[d[16]||=H(`thead`,null,[H(`tr`,null,[H(`th`,null,`备注`),H(`th`,null,`站点`),H(`th`,null,`当前`),H(`th`,null,`igneous`),H(`th`,null,`api key`),H(`th`)])],-1),H(`tbody`,null,[(B(!0),V(z,null,ti(n.value,e=>(B(),V(`tr`,{key:e.id},[H(`td`,null,j(e.label),1),H(`td`,null,j(e.site===`exhentai`?`里站`:`外站`),1),H(`td`,null,j(e.active?`✓`:``),1),H(`td`,null,j(e.igneousUpdatedAt===null?`—`:new Date(e.igneousUpdatedAt*1e3).toLocaleDateString()),1),H(`td`,null,j(e.hasApiKey?`有`:`无`),1),H(`td`,uf,[H(`button`,{disabled:r.value||e.active,onClick:t=>g(e.id)},` 切换 `,8,df),H(`button`,{disabled:r.value,onClick:t=>_(e.id)},`删除`,8,ff)])]))),128))])])):(B(),V(`p`,pf,`暂无账号。`)),d[25]||=H(`h2`,null,`导入 Cookie`,-1),d[26]||=H(`p`,{class:`muted`},`从别处已有的登录态导入,三项均为必填。`,-1),H(`div`,mf,[H(`div`,null,[d[17]||=H(`label`,null,`备注`,-1),L(H(`input`,{"onUpdate:modelValue":d[3]||=e=>s.value=e},null,512),[[q,s.value]])]),H(`div`,null,[d[18]||=H(`label`,null,`ipb_member_id`,-1),L(H(`input`,{"onUpdate:modelValue":d[4]||=e=>c.value=e},null,512),[[q,c.value]])]),H(`div`,null,[d[19]||=H(`label`,null,`ipb_pass_hash`,-1),L(H(`input`,{"onUpdate:modelValue":d[5]||=e=>l.value=e},null,512),[[q,l.value]])]),H(`div`,null,[d[20]||=H(`label`,null,`igneous`,-1),L(H(`input`,{"onUpdate:modelValue":d[6]||=e=>u.value=e},null,512),[[q,u.value]])])]),H(`div`,hf,[H(`button`,{disabled:r.value||c.value===``||l.value===``||u.value===``,onClick:m},` 导入 `,8,gf)])]))}}),vf=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},yf=vf(_f,[[`__scopeId`,`data-v-802c20c9`]]),bf=P(0),xf=[0,2,3,4,5,6,8];function Sf(e){return e===0?`自动`:`${e} 个`}var Cf=P([]),wf=P([]),Tf=P(null),Ef=P(``),Df=P([]);function Of(e){Cf.value=e.folders,wf.value=e.cloud,Tf.value=e.cloudError,Ef.value===``&&e.folders[0]!==void 0&&(Ef.value=e.folders[0].id)}async function kf(){try{Of(await Z(`favorites.state`))}catch(e){$.error(Q(e))}}async function Af(){let e=Ef.value;if(e===``){Df.value=[];return}try{if(e.startsWith(`cloud:`)){Df.value=(await Z(`favorites.cloud`,{query:{slot:Number(e.slice(6))}})).map(jf);return}Df.value=await Z(`favorites.items`,{params:{folderId:e}})}catch(e){Df.value=[],$.error(Q(e))}}function jf(e){return{gid:e.gid,token:e.token,title:e.title,thumbUrl:e.thumbUrl,pageCount:e.pageCount,slot:-1,addedAt:e.postedAt}}async function Mf(e){try{Of(await Z(`favorites.folder.create`,{body:{name:e}}));let t=Cf.value.at(-1);t!==void 0&&(Ef.value=t.id),await Af(),$.success(`已新建收藏夹`)}catch(e){$.error(Q(e))}}async function Nf(e){try{Of(await Z(`favorites.folder.remove`,{params:{folderId:e}})),Ef.value=Cf.value[0]?.id??``,await Af()}catch(e){$.error(Q(e))}}async function Pf(e,t){let n=t??(Ef.value.startsWith(`cloud:`)?``:Ef.value);if(n===``)return $.warning(`请先选中一个本地收藏夹`),!1;try{return Df.value=await Z(`favorites.items.add`,{body:{folderId:n,...e}}),!0}catch(e){return $.error(Q(e)),!1}}async function Ff(e,t){try{Df.value=await Z(`favorites.items.remove`,{params:{folderId:e,gid:t}})}catch(e){$.error(Q(e))}}async function If(e,t,n){try{Df.value=await Z(`favorites.items.slot`,{params:{folderId:e,gid:t},body:{slot:n}})}catch(e){$.error(Q(e))}}var Lf=P([]),Rf=P(null),zf=P([]),Bf=P(null),Vf=K(()=>zf.value.findIndex(e=>e.key===Bf.value)),Hf=K(()=>zf.value.reduce((e,t)=>e+t.pageCount,0)),Uf=K(()=>{let e=Vf.value;if(e===-1)return 0;let t=0;for(let n=0;n<e;n+=1)t+=zf.value[n]?.pageCount??0;return t+(zf.value[e]?.page??1)});function Wf(e){zf.value=e.items,Bf.value=e.currentKey}async function Gf(){try{Wf(await Z(`playlist.list`))}catch(e){$.error(Q(e))}}async function Kf(e){try{return Wf(await Z(`playlist.add`,{body:e})),!0}catch(e){return $.error(Q(e)),!1}}async function qf(e){try{Wf(await Z(`playlist.play`,{params:{key:e}}))}catch{}}async function Jf(e,t){try{Wf(await Z(`playlist.progress`,{params:{key:e},body:{page:t}}))}catch{}}async function Yf(e){try{Wf(await Z(`playlist.remove`,{params:{key:e}}))}catch(e){$.error(Q(e))}}async function Xf(){try{Wf(await Z(`playlist.clear`)),$.info(`播放列表已清空`)}catch(e){$.error(Q(e))}}var Zf=P(!1),Qf=P(0),$f=P([]);function ep(e){let t=[...$f.value],n=t.findIndex(t=>t.key===e.key);n===-1?t.push(e):t[n]=e,$f.value=t}function tp(e){Zf.value=e.checking,Qf.value=e.pending,$f.value=e.entries}function np(e){Zf.value=e.checking,Qf.value=e.pending}async function rp(){try{tp(await Z(`library.updates`))}catch(e){$.error(Q(e))}}async function ip(e){try{tp(await Z(`library.check`,{body:e}))}catch(e){$.error(Q(e))}}async function ap(e){try{tp(await Z(`library.updates.forget`,{body:{keys:[e]}}))}catch(e){$.error(Q(e))}}async function op(e){let t=e.latest;if(t===null)return!1;let n={gid:t.gid,token:t.token,resolution:e.resolution};try{return await Z(`downloads.create`,{body:n}),!0}catch(t){let r=`pages-${e.resolution}`;if(!(t instanceof Dd&&t.code===`not_logged_in`))return $.error(Q(t)),!1;try{return await Z(`downloads.create`,{body:{...n,resolution:r}}),$.info(`未登录,归档下不了:已改为逐页下载(${r})`),!0}catch(e){return $.error(Q(e)),!1}}}var sp={key:0,class:`mask`},cp=[`aria-label`],lp={class:`head`},up={class:`body`},dp={class:`foot`},fp=vf(R({__name:`Dialog`,props:{modelValue:{type:Boolean},title:{},width:{default:`420px`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=P(null),a=null;function o(){r(`update:modelValue`,!1)}function s(e){e.key===`Escape`&&(e.stopPropagation(),o())}return Jn(()=>n.modelValue,e=>{if(e){a=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener(`keydown`,s,!0),An(()=>i.value?.focus());return}window.removeEventListener(`keydown`,s,!0),a?.focus(),a=null},{immediate:!0}),Gr(()=>{window.removeEventListener(`keydown`,s,!0)}),(t,n)=>(B(),Ea(lr,{to:`body`},[U(So,{name:`dialog`},{default:I(()=>[e.modelValue?(B(),V(`div`,sp,[H(`div`,{ref_key:`panel`,ref:i,class:`dialog`,style:ye({"--dialog-width":e.width}),role:`dialog`,"aria-modal":`true`,"aria-label":e.title,tabindex:`-1`},[H(`header`,lp,[H(`h2`,null,j(e.title),1),H(`button`,{type:`button`,class:`close`,"aria-label":`关闭`,onClick:o},[...n[0]||=[H(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`path`,{d:`M4 4l8 8M12 4l-8 8`})],-1)]])]),H(`div`,up,[ni(t.$slots,`default`,{},void 0,!0)]),H(`footer`,dp,[ni(t.$slots,`buttons`,{},()=>[H(`button`,{type:`button`,onClick:o},`取消`)],!0)])],12,cp)])):G(``,!0)]),_:3})]))}}),[[`__scopeId`,`data-v-ab613432`]]),pp=e=>1-(1-e)**3,mp=e=>e*e*e;function hp(e){let t=e.easing??pp,n=-1,r=0,i=!1,a=o=>{if(i)return;if(n<0){n=o,r=requestAnimationFrame(a);return}let s=e.duration<=0?1:Math.min(1,(o-n)/e.duration);if(e.onUpdate(t(s)),s<1){r=requestAnimationFrame(a);return}e.onDone?.()};return r=requestAnimationFrame(a),{cancel(){i=!0,cancelAnimationFrame(r)}}}function gp(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function _p(e,t,n){return Math.min(Math.max(e,Math.min(t,n)),Math.max(t,n))}var vp={lift:4,scale:1.04,rotate:-1.5},yp={width:1.9,height:1.2},bp={width:420,height:320},xp={width:620,height:560},Sp=16,Cp=2/3,wp=220,Tp=.32;function Ep(e,t,n=vp){let r=1+(n.scale-1)*t;return{centreX:e.left+e.width/2,centreY:e.top+e.height/2-n.lift*t,width:e.width*r,height:e.height*r,rotate:n.rotate*t}}function Dp(e){let t=e.rotate*Math.PI/180,n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=e.width*n+e.height*r,a=e.width*r+e.height*n;return{left:e.centreX-i/2,top:e.centreY-a/2,width:i,height:a}}function Op(e){return Math.round(Math.max(0,e-28)*Cp)}function kp(e){return 28+Op(e)+14+wp}function Ap(e,t){let n=Dp(Ep(e,1)),r=Math.max(n.width,Math.min(xp.width,t.width-32)),i=Math.max(n.height,Math.min(xp.height,t.height-32)),a=_p(Math.max(n.height*yp.height,bp.height),n.height,i),o=_p(Math.max(n.width*yp.width,bp.width,kp(a)),n.width,r),s=Math.max(Sp,n.left+n.width-o),c=Math.min(n.left,t.width-Sp-o),l=Math.max(Sp,n.top+n.height-a),u=Math.min(n.top,t.height-Sp-a);return{left:_p(n.left+n.width/2-o/2,s,c),top:_p(n.top+n.height/2-a/2,l,u),width:o,height:a}}function jp(e,t){return{dx:e.centreX-(t.left+t.width/2),dy:e.centreY-(t.top+t.height/2),scaleX:e.width/t.width,scaleY:e.height/t.height,rotate:e.rotate}}function Mp(e,t){let n=1-t,r=e.scaleX+(1-e.scaleX)*t,i=e.scaleY+(1-e.scaleY)*t;return`translate(${e.dx*n}px, ${e.dy*n}px) rotate(${e.rotate*n}deg) scale(${r}, ${i})`}function Np(e){return _p((e-Tp)/.6799999999999999,0,1)}var Pp={Doujinshi:`同人志`,Manga:`漫画`,"Artist CG":`画师 CG`,"Game CG":`游戏 CG`,Western:`欧美`,"Image Set":`图集`,"Non-H":`无色情内容`,Cosplay:`角色扮演`,"Asian Porn":`亚洲成人`,Misc:`其他`,Private:`私有`},Fp={language:`语言`,parody:`原作`,character:`角色`,group:`社团`,artist:`画师`,cosplayer:`扮演者`,male:`男性`,female:`女性`,mixed:`混合`,other:`其他`,reclass:`重分类`,temp:`临时`,rows:`行`},Ip={chinese:`中文`,english:`英语`,japanese:`日语`,korean:`韩语`,spanish:`西班牙语`,french:`法语`,german:`德语`,italian:`意大利语`,portuguese:`葡萄牙语`,russian:`俄语`,thai:`泰语`,vietnamese:`越南语`,dutch:`荷兰语`,hungarian:`匈牙利语`,polish:`波兰语`,translated:`已翻译`,rewrite:`重写`,"rough translation":`粗翻`,"ai generated":`AI 生成`,"ai translated":`AI 翻译`,uncensored:`无修正`,"mosaic censorship":`马赛克`,"full censorship":`全遮罩`,"no censorship":`无审查`,"no mosaic":`无马赛克`,"no text":`无文字`,webtoon:`条漫`,fullcolor:`全彩`,"full color":`全彩`,sample:`样张`,animated:`动图`,"3d":`3D`,"3d imageset":`3D 图集`,"non-h":`无色情内容`,"story arc":`篇章`,tankoubon:`单行本`,compilation:`合集`,"multi-work series":`多篇系列`,"multi-work":`多篇系列`,soushuuhen:`总集篇`,oneshot:`短篇`,webcomic:`网络漫画`,artbook:`画集`,anthology:`选集`,novel:`小说`,game:`游戏`,"big breasts":`巨乳`,"small breasts":`贫乳`,"huge breasts":`爆乳`,"flat chest":`平胸`,oppai:`巨乳`,"inverted nipples":`凹陷乳头`,"big nipples":`大乳头`,"puffy nipples":`凸乳首`,hairy:`有毛`,"pubic hair":`阴毛`,thick:`粗壮`,muscle:`肌肉`,tanlines:`晒痕`,"dark skin":`深肤色`,gyaru:`辣妹`,pregnant:`怀孕`,lactation:`泌乳`,squirting:`潮吹`,sweating:`出汗`,smell:`气味`,kemonomimi:`兽耳`,"animal ears":`兽耳`,tail:`尾巴`,"monster girl":`魔物娘`,giantess:`巨大娘`,stockings:`丝袜`,pantyhose:`连裤袜`,"thigh highs":`过膝袜`,"schoolgirl uniform":`女学生制服`,"school uniform":`校服`,maid:`女仆`,"bunny girl":`兔女郎`,nurse:`护士`,kimono:`和服`,yukata:`浴衣`,miko:`巫女`,swimsuit:`泳装`,bikini:`比基尼`,"school swimsuit":`学校泳装`,latex:`乳胶`,leotard:`紧身衣`,bodysuit:`连体衣`,"high heels":`高跟鞋`,glasses:`眼镜`,bondage:`捆绑`,blindfold:`眼罩`,collar:`项圈`,leash:`牵引绳`,gag:`口塞`,crotchless:`开裆`,"no panties":`无内裤`,underwear:`内衣`,lingerie:`情趣内衣`,cosplay:`角色扮演`,pool:`泳池`,onsen:`温泉`,"public use":`公共场合`,"sole female":`单一女性`,"sole male":`单一男性`,"sole dickgirl":`单一扶她`,"sole futa":`单一扶她`,"males only":`仅男性`,"females only":`仅女性`,yaoi:`男同`,yuri:`女同`,futanari:`扶她`,"dickgirl on male":`扶她×男`,"dickgirl on dickgirl":`扶她×扶她`,tomgirl:`伪娘`,crossdressing:`变装`,femboy:`男娘`,"gender bender":`性别转换`,netorare:`NTR`,cheating:`出轨`,netorase:`绿帽`,group:`群交`,threesome:`3P`,"mmm threesome":`男男男 3P`,"ffm threesome":`女女男 3P`,"fft threesome":`女女扶她 3P`,nakadashi:`内射`,creampie:`内射`,anal:`肛门`,"anal intercourse":`肛交`,"double anal":`双插肛`,"double penetration":`双插`,"vaginal sex":`性交`,oral:`口交`,blowjob:`口交`,deepthroat:`深喉`,handjob:`手交`,footjob:`足交`,titjob:`乳交`,paizuri:`乳交`,masturbation:`自慰`,exhibitionism:`露出`,humiliation:`羞辱`,rape:`强暴`,forniphilia:`家具化`,femdom:`女性主导`,maledom:`男性主导`,bdsm:`BDSM`,tickling:`挠痒`,scat:`粪便`,enema:`灌肠`,urination:`放尿`,bestiality:`兽交`,insect:`昆虫`,tentacles:`触手`,monster:`怪物`,"unusual insertions":`异物插入`,"sex toys":`性玩具`,"nipple stimulation":`乳头刺激`,cunnilingus:`舔阴`,facesitting:`坐脸`,"x-ray":`透视`,"hidden sex":`隐奸`,"big penis":`巨根`,"small penis":`小阴茎`,"huge penis":`巨根`,mosaic:`马赛克`,"breast feeding":`哺乳`,ahegao:`潮红脸`,incest:`近亲`,impregnation:`播种`,lolicon:`萝莉`,shotacon:`正太`,furry:`兽人`,vore:`吞食`,amputee:`截肢`,farts:`放屁`,vtuber:`虚拟主播`,ffm:`女女男`},Lp=null,Rp={};function zp(e){Lp=e?.namespaces??null;let t={};for(let n of Object.values(e?.namespaces??{}))for(let[e,r]of Object.entries(n.tags))t[e]??=r;Rp=t}function Bp(e){return Pp[e]??e}function Vp(e){return Lp?.[e]?.label??Fp[e]??e}function Hp(e,t=``){let n=e.toLowerCase();return(t===``?Rp[n]:Lp?.[t]?.tags[n])??Ip[n]??Ip[e]??e}var Up=P(!1),Wp=P(null);function Gp(e){let t=e.indexOf(`:`);if(t===-1)return{namespace:``,name:qp(e)};let n=e.slice(0,t),r=e.slice(t+1);return Up.value?{namespace:Kp(n),name:qp(r,n)}:{namespace:n,name:r}}function Kp(e){return Up.value?Vp(e):e}function qp(e,t=``){return Up.value?Hp(e,t):e}function Jp(e){return Up.value?Bp(e):e}async function Yp(){try{Wp.value=await Z(`translate.status`)}catch(e){$.error(Q(e))}}async function Xp(){if(!Up.value){zp(null);return}try{zp(await Z(`translate.tags`)),Wp.value=await Z(`translate.status`)}catch(e){$.error(Q(e))}}async function Zp(){try{let e=await Z(`translate.update`);if(Wp.value=e,e.error!==null){$.error(`词库更新失败:${e.error}`);return}await Xp(),$.success(`词库已更新到 ${e.version??`未知版本`}:${e.namespaceCount} 个命名空间、${e.tagCount} 条标签`)}catch(e){$.error(Q(e))}}async function Qp(){try{Wp.value=await Z(`translate.remove`),zp(null),$.info(`词库已删除,标签翻译回到内置的常用表`)}catch(e){$.error(Q(e))}}var $p={key:0,class:`slow`,"aria-hidden":`true`},em={key:1,class:`failure`},tm={class:`label`},nm={key:2,class:`bar`,"aria-hidden":`true`},rm=3e3,im=vf(R({__name:`ImagePlaceholder`,props:{status:{},retryable:{type:Boolean,default:!1},errorText:{default:`加载失败`}},emits:[`retry`],setup(e,{emit:t}){let n=e,r=t,i=P(!1),a=null;function o(){a!==null&&(clearTimeout(a),a=null)}function s(){if(o(),n.status!==`loading`){i.value=!1;return}a=setTimeout(()=>{i.value=!0},rm)}return Jn(()=>n.status,s,{immediate:!0}),Gr(o),(t,n)=>(B(),V(`div`,{class:A([`veil`,e.status])},[i.value&&e.status===`loading`?(B(),V(`p`,$p,`仍在加载…`)):G(``,!0),e.status===`error`?(B(),V(`div`,em,[n[1]||=H(`svg`,{class:`glyph`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`rect`,{x:`3`,y:`4.5`,width:`18`,height:`15`,rx:`2.5`}),H(`path`,{d:`M3.6 16.2 8.4 11l4 4.2 2.6-2.4 5.4 5`}),H(`path`,{d:`M4.4 4.2 19.6 19.8`})],-1),H(`span`,tm,j(e.errorText),1),e.retryable?(B(),V(`button`,{key:0,type:`button`,class:`retry`,title:`重新加载图片`,onClick:n[0]||=e=>r(`retry`)},` 重试 `)):G(``,!0)])):(B(),V(`div`,nm,[...n[2]||=[H(`i`,null,null,-1)]]))],2))}}),[[`__scopeId`,`data-v-49ad4a53`]]),am=[`aria-busy`],om=[`src`,`alt`,`loading`],sm=vf(R({__name:`SkeletonImage`,props:{src:{},alt:{},ratio:{default:`4 / 3`},eager:{type:Boolean,default:!1},retryable:{type:Boolean,default:!1}},setup(e){let t=e,n=P(`loading`),r=P(0),i=P(``),a=K(()=>{if(t.src===``)return``;if(r.value===0)return t.src;let e=t.src.includes(`?`)?`&`:`?`;return`${t.src}${e}ehb-retry=${r.value}`}),o=K(()=>({"--skeleton-ratio":t.ratio,...i.value===``?{}:{"--media-ratio":i.value}}));function s(e){let t=e.target;t.naturalWidth>0&&t.naturalHeight>0&&(i.value=`${t.naturalWidth} / ${t.naturalHeight}`),n.value=`loaded`}function c(){r.value+=1,n.value=`loading`}function l(){if(r.value===0&&t.src!==``){c();return}n.value=`error`}return Jn(()=>t.src,()=>{r.value=0,i.value=``,n.value=`loading`}),(t,r)=>(B(),V(`div`,{class:A([`skeleton`,n.value]),style:ye(o.value),"aria-busy":n.value===`loading`},[a.value===``?G(``,!0):(B(),V(`img`,{key:0,src:a.value,alt:e.alt,loading:e.eager?`eager`:`lazy`,decoding:`async`,onLoad:s,onError:l},null,40,om)),U(im,{status:n.value,retryable:e.retryable,onRetry:c},null,8,[`status`,`retryable`])],14,am))}}),[[`__scopeId`,`data-v-88927a4b`]]),cm={class:`groups`},lm={key:0,class:`group-title`},um={key:1,class:`muted empty`},dm={class:`meta`},fm={class:`title`},pm={class:`sub muted`},mm={class:`preview-body`},hm={class:`preview-title`},gm={class:`preview-rating`},_m={class:`score`},vm={class:`muted`},ym={class:`preview-tags`},bm={key:0,class:`ns`},xm={key:0,class:`muted more`},Sm=500,Cm=180,wm=320,Tm=160,Em=18,Dm=vf(R({__name:`GalleryGrid`,props:{groups:{},to:{},mode:{default:`browse`},selected:{default:()=>[]},columns:{default:0},thumbHeight:{default:220},emptyText:{default:``}},emits:[`update:selected`],setup(e,{emit:t}){let n=e,r=t,i=Ol(),a=P(null),o=P(null),s=P(null),c=P(null),l=null,u=null,d=null,f=null,p=0,m=!1,h=new Map,g=null,_=null,v={x:0,y:0},y=0,b=!1,x=K(()=>n.groups.flatMap(e=>e.items)),S=K(()=>new Map(x.value.map(e=>[e.gid,e]))),C=K(()=>({"--thumb-height":`${n.thumbHeight}px`,...n.columns>0?{gridTemplateColumns:`repeat(${n.columns}, minmax(0, 1fr))`}:{}})),w=K(()=>new Set(n.selected));function T(e){return w.value.has(e.gid)}function E(e){if(he(),n.mode!==`select`)return;let t=[...n.selected],i=t.indexOf(e.gid);i===-1?t.push(e.gid):t.splice(i,1),r(`update:selected`,t)}function D(e){return+(l===e||u===e)}function ee(e,t){if(t<=1e-4){e.style.transform=``;return}let n=1+(vp.scale-1)*t;e.style.transform=`translateY(${-vp.lift*t}px) rotate(${vp.rotate*t}deg) scale(${n})`}function te(e,t=Cm){if(e===null)return;let n=h.get(e);n===void 0&&(n={value:0,tween:null},h.set(e,n));let r=n;r.tween?.cancel(),r.tween=null;let i=D(e),a=r.value;if(gp()||t<=0||Math.abs(i-a)<.001){r.value=i,ee(e,i);return}r.tween=hp({duration:t*Math.abs(i-a),easing:i>a?pp:mp,onUpdate:t=>{r.value=a+(i-a)*t,ee(e,r.value)},onDone:()=>{r.value=i,r.tween=null,ee(e,i)}})}function ne(e){let t=e.getBoundingClientRect(),n=h.get(e)?.value??0,r=t.left+t.width/2,i=t.top+t.height/2+vp.lift*n;return{left:r-e.offsetWidth/2,top:i-e.offsetHeight/2,width:e.offsetWidth,height:e.offsetHeight}}function re(){let e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function ie(e){let t=ne(e),n=Ap(t,re());return{from:jp(Ep(t,h.get(e)?.value??0),n),target:n}}function ae(e,t){e.style.left=`${t.target.left}px`,e.style.top=`${t.target.top}px`,e.style.width=`${t.target.width}px`,e.style.height=`${t.target.height}px`,e.style.setProperty(`--thumb-w`,`${Op(t.target.height)}px`),e.style.setProperty(`--preview-pad`,`14px`),e.style.setProperty(`--preview-gap`,`14px`),e.style.visibility=`visible`}function oe(e,t){let n=s.value;if(n===null)return;n.style.transform=Mp(e.from,t);let r=c.value;r!==null&&(r.style.opacity=String(Np(t)))}function O(){g!==null&&(clearTimeout(g),g=null)}function se(e){let t=Number(e.dataset.gid);return Number.isFinite(t)?S.value.get(t)??null:null}function ce(e){O();let t=se(e);t!==null&&(g=setTimeout(()=>{g=null,fe(t,e)},Sm))}function le(e){let t=l;if(t===e){e!==null&&e!==d&&e!==u&&g===null&&ce(e);return}l=e,O(),e!==d&&(d=null),a.value=e===null?null:Number(e.dataset.gid),e===u?m&&pe():e!==null&&ce(e),te(t),te(e)}function ue(){if(y=0,b)return;let e=document.elementFromPoint(v.x,v.y),t=s.value;if(e!==null&&t!==null&&t.contains(e)){m&&pe();return}let n=e?.closest(`[data-gid]`)??null,r=n!==null&&se(n)!==null?n:null;le(r),u!==null&&r!==u&&k()}function de(e){v={x:e.clientX,y:e.clientY},y===0&&(y=requestAnimationFrame(ue))}async function fe(e,t){if(b||l!==t)return;if(u===t){m&&pe();return}me(),u=t;let n=ie(t);f=n,p=0,o.value=e,await An();let r=s.value;if(!(r===null||b||u!==t)){if(ae(r,n),oe(n,0),_?.cancel(),gp()){p=1,oe(n,1);return}_=hp({duration:wm,easing:pp,onUpdate:e=>{p=e,oe(n,e)},onDone:()=>{_=null,p=1,oe(n,1)}})}}function k(){if(m)return;let e=f;if(u===null||e===null||s.value===null){me();return}_?.cancel(),_=null;let t=p;if(gp()||t<=.001){me();return}m=!0,_=hp({duration:Tm*t,easing:mp,onUpdate:n=>{p=t*(1-n),oe(e,p)},onDone:()=>{_=null,me()}})}function pe(){let e=f;if(!m||u===null||e===null||s.value===null)return;_?.cancel(),_=null,m=!1;let t=p;if(gp()||t>=1){p=1,oe(e,1);return}_=hp({duration:wm*(1-t),easing:pp,onUpdate:n=>{p=t+(1-t)*n,oe(e,p)},onDone:()=>{_=null,p=1,oe(e,1)}})}function me(){_?.cancel(),_=null;let e=u;u=null,f=null,p=0,m=!1,o.value=null,e!==null&&te(e,0)}function he(){O(),me()}function ge(){for(let[e,t]of h)t.tween?.cancel(),e.style.transform=``;h.clear(),l=null,a.value=null}function _e(e){let t=s.value;t!==null&&e.target instanceof Node&&t.contains(e.target)||(he(),le(null))}function ve(e){e.key===`Escape`&&(d=l,k())}function be(e){le(e.currentTarget)}function xe(){le(null),k()}function Se(){le(null),k()}function Ce(e){he(),i.push(n.to(e))}return Jn(()=>n.groups,()=>{he(),ge()}),Vr(()=>{window.addEventListener(`keydown`,ve),window.addEventListener(`pointermove`,de),window.addEventListener(`scroll`,_e,{passive:!0,capture:!0}),document.addEventListener(`mouseleave`,Se)}),Gr(()=>{b=!0,y!==0&&(cancelAnimationFrame(y),y=0),window.removeEventListener(`keydown`,ve),window.removeEventListener(`pointermove`,de),window.removeEventListener(`scroll`,_e,{capture:!0}),document.removeEventListener(`mouseleave`,Se),he(),ge()}),(t,n)=>(B(),V(z,null,[H(`div`,cm,[(B(!0),V(z,null,ti(e.groups,(t,n)=>(B(),V(`section`,{key:`${n}-${t.title}`,class:`group`},[t.title===``?G(``,!0):(B(),V(`h3`,lm,j(t.title),1)),t.items.length===0&&e.emptyText!==``?(B(),V(`p`,um,j(e.emptyText),1)):G(``,!0),H(`div`,{class:`cards`,style:ye(C.value)},[(B(!0),V(z,null,ti(t.items,t=>(B(),Ea(Qr(e.mode===`select`?`button`:F(id)),{key:t.gid,class:A([`card`,{popped:a.value===t.gid,picked:T(t)}]),"data-gid":t.gid,type:e.mode===`select`?`button`:void 0,to:e.mode===`select`?void 0:e.to(t),"aria-pressed":e.mode===`select`?T(t):void 0,onFocus:be,onBlur:xe,onClick:e=>E(t)},{default:I(()=>[U(sm,{class:`thumb`,src:t.thumbUrl,alt:t.title},null,8,[`src`,`alt`]),H(`div`,dm,[H(`div`,fm,j(t.title),1),H(`div`,pm,j(F(Jp)(t.category))+` · `+j(t.pageCount)+` 页 · ★ `+j(t.rating),1)])]),_:2},1064,[`class`,`data-gid`,`type`,`to`,`aria-pressed`,`onClick`]))),128))],4)]))),128))]),(B(),Ea(lr,{to:`body`},[o.value?(B(),V(`div`,{key:0,ref_key:`previewEl`,ref:s,class:`preview-card`,"aria-hidden":`true`,onClick:n[0]||=e=>Ce(o.value)},[H(`div`,{ref_key:`previewInnerEl`,ref:c,class:`preview-inner`},[U(sm,{class:`preview-thumb`,src:o.value.thumbUrl,alt:o.value.title,eager:``},null,8,[`src`,`alt`]),H(`div`,mm,[H(`div`,hm,j(o.value.title),1),H(`div`,gm,[H(`span`,_m,`★ `+j(o.value.rating),1),H(`span`,vm,j(F(Jp)(o.value.category))+` · `+j(o.value.pageCount)+` 页 `,1)]),H(`div`,ym,[(B(!0),V(z,null,ti(o.value.tags.slice(0,Em),e=>(B(),V(`span`,{key:e,class:`chip`},[F(Gp)(e).namespace?(B(),V(`span`,bm,j(F(Gp)(e).namespace)+`: `,1)):G(``,!0),W(` `+j(F(Gp)(e).name),1)]))),128)),o.value.tags.length>Em?(B(),V(`span`,xm,` 还有 `+j(o.value.tags.length-Em)+` 个标签 `,1)):G(``,!0)]),n[1]||=H(`div`,{class:`preview-hint muted`},`点击进入`,-1)])],512)],512)):G(``,!0)]))],64))}}),[[`__scopeId`,`data-v-be49e711`]]),Om={key:0,class:`mask`},km=[`aria-label`],Am={class:`head`},jm={class:`body`},Mm={key:0,class:`muted empty`},Nm={key:1,class:`rows`},Pm={class:`info`},Fm={class:`title`},Im={class:`sub muted`},Lm={class:`err`},Rm={class:`dates`},zm={class:`muted`},Bm={key:0,class:`muted`},Vm={key:1,class:`latest`},Hm={class:`acts`},Um=[`disabled`,`onClick`],Wm=[`disabled`,`onClick`],Gm=[`disabled`,`onClick`],Km={class:`foot`},qm=[`disabled`],Jm={class:`muted summary`},Ym=[`disabled`],Xm=[`disabled`],Zm=[`disabled`],Qm=vf(R({__name:`UpdateManager`,props:{open:{type:Boolean},mode:{},folderId:{},pendingKeys:{},targets:{}},emits:[`update:open`,`moved`],setup(e,{emit:t}){let n=e,r=t,i=K(()=>n.mode===`favorite`),a=K(()=>i.value?`更新标记号`:`更新管理器`),o=P(!1),s=P([]),c=P(new Set),l=P(new Set),u=K(()=>{let e=i.value?`favorites`:`library`,t=new Set(Nd.value.filter(e=>e.status===`queued`||e.status===`running`).map(e=>e.gid));return $f.value.filter(n=>n.source===e?i.value?!0:n.latest===null||!t.has(n.latest.gid):!1)}),d=K(()=>u.value.filter(e=>e.latest!==null&&!l.value.has(e.key))),f=K(()=>d.value.length),p=K(()=>{let e=i.value?`标记号`:`画廊更新`;return Zf.value?`正在检查可用${e}${Qf.value>0?`(还剩 ${Qf.value})`:``}`:i.value?`检查标记号*`:`检查更新*`});function m(){r(`update:open`,!1)}function h(e){return e.localPageCount===0?`—`:i.value?`${e.localPageCount} 页`:`${e.resolution} · ${e.localPageCount} 页`}function g(e){if(e<=0)return`—`;let t=new Date(e*1e3);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`}async function _(e){if(i.value){if(s.value.length===0){$.info(`没有要检查的收藏项:请在收藏页选中画廊后再更新标记号`);return}await ip({targets:s.value,reset:!0});return}await ip({keys:e,reset:!0})}async function v(e){if(e.latest!==null&&await op(e)){let t=new Set(c.value);t.add(e.key),c.value=t,await Id(),$.success(`已加入下载队列:${e.title}`)}}async function y(){o.value=!0;let e=0;try{for(let t of u.value)if(!(t.latest===null||c.value.has(t.key))&&await op(t)){e+=1;let n=new Set(c.value);n.add(t.key),c.value=n}await Id(),$.success(e===0?`没有需要更新的画廊`:`已把 ${e} 个画廊加入下载队列`)}finally{o.value=!1}}async function b(e){let t=e.filter(e=>e.latest!==null&&!l.value.has(e.key));if(t.length!==0&&n.folderId!==void 0){o.value=!0;try{let e=await Z(`favorites.items.refresh`,{params:{folderId:n.folderId},body:{gids:t.map(e=>e.gid)}}),i=new Set(l.value),a=0,o=0;for(let n of e.entries){if(!n.moved)continue;a+=1;let e=t.find(e=>e.gid===n.gid);e!==void 0&&i.add(e.key),n.reason!==null&&(o+=1)}l.value=i;let c=new Map(e.entries.filter(e=>e.moved&&e.latestGid!==null).map(e=>[e.gid,e.latestGid]));s.value=s.value.map(e=>{let n=c.get(e.gid),r=t.find(t=>t.gid===e.gid);return n===void 0||r?.latest==null?e:{...e,gid:n,token:r.latest.token,postedAt:r.latest.postedAt,pageCount:r.latest.pageCount}}),r(`moved`),a===0?$.info(`没有需要挪到新版本的收藏`):o>0?$.warning(`已更新 ${a} 条标记号,其中 ${o} 条只改了本地`):$.success(`已把 ${a} 条收藏挪到最新版本`)}catch(e){$.error(Q(e))}finally{o.value=!1}}}async function x(){o.value=!0;try{let e=(await Z(`downloads.list`)).filter(e=>(e.status===`queued`||e.status===`running`)&&u.value.some(t=>t.latest?.gid===e.gid));for(let t of e)await Z(`downloads.cancel`,{params:{taskId:t.id}});c.value=new Set,$.info(e.length===0?`没有可取消的更新任务`:`已取消 ${e.length} 个更新任务`)}catch(e){$.error(Q(e))}finally{o.value=!1}}async function S(e){await ap(e.key),$.info(`已从更新列表移除`)}Jn(()=>n.open,e=>{if(!e){window.removeEventListener(`keydown`,C,!0);return}if(window.addEventListener(`keydown`,C,!0),n.targets!==void 0&&n.targets.length>0){s.value=n.targets,_();return}if(n.pendingKeys!==void 0&&n.pendingKeys.length>0){_(n.pendingKeys);return}rp()});function C(e){e.key===`Escape`&&n.open&&(e.stopPropagation(),m())}return Gr(()=>{window.removeEventListener(`keydown`,C,!0)}),(t,n)=>(B(),Ea(lr,{to:`body`},[U(So,{name:`manager`},{default:I(()=>[e.open?(B(),V(`div`,Om,[H(`section`,{class:`manager`,role:`dialog`,"aria-modal":`true`,"aria-label":a.value},[H(`header`,Am,[H(`h2`,null,j(a.value),1),H(`button`,{class:`close`,"aria-label":`关闭`,onClick:m},[...n[2]||=[H(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`path`,{d:`M4 4l8 8M12 4l-8 8`})],-1)]])]),H(`div`,jm,[u.value.length===0?(B(),V(`p`,Mm,j(F(Zf)?`正在检查…`:`还没有检查结果。点下方「${p.value}」开始,有缓存时会直接显示缓存。`),1)):(B(),V(`ul`,Nm,[(B(!0),V(z,null,ti(u.value,e=>(B(),V(`li`,{key:e.key,class:`row`},[U(sm,{class:`cover`,src:e.thumbUrl,alt:e.title,ratio:`2 / 3`},null,8,[`src`,`alt`]),H(`div`,Pm,[H(`div`,Fm,j(e.title),1),H(`div`,Im,[W(j(h(e))+` `,1),e.error===null?G(``,!0):(B(),V(z,{key:0},[n[3]||=W(` · `,-1),H(`span`,Lm,j(e.error),1)],64))])]),H(`div`,Rm,[H(`span`,zm,j(g(e.localPostedAt)),1),n[5]||=H(`span`,{class:`arrow`},`→`,-1),e.latest===null?(B(),V(`span`,Bm,`已是最新`)):(B(),V(`span`,Vm,[W(j(g(e.latest.postedAt))+` `,1),n[4]||=H(`span`,{class:`badge`},`v`,-1)]))]),H(`div`,Hm,[i.value?G(``,!0):(B(),V(`button`,{key:0,disabled:o.value,title:`从更新列表里移除这一条(不会删除已下载的本地文件)`,onClick:t=>S(e)},` 删除更新任务 `,8,Um)),i.value?(B(),V(`button`,{key:1,disabled:o.value||e.latest===null||l.value.has(e.key),onClick:t=>b([e])},j(l.value.has(e.key)?`已更新`:`更新标记号`),9,Wm)):(B(),V(`button`,{key:2,disabled:o.value||e.latest===null||c.value.has(e.key),onClick:t=>v(e)},j(c.value.has(e.key)?`已加入`:`更新`),9,Gm))])]))),128))]))]),H(`footer`,Km,[H(`button`,{disabled:F(Zf),onClick:n[0]||=e=>_()},j(p.value),9,qm),n[6]||=H(`span`,{class:`grow`},null,-1),H(`span`,Jm,j(f.value)+` 个可更新`,1),i.value?(B(),V(`button`,{key:0,disabled:o.value||f.value===0,onClick:n[1]||=e=>b(u.value)},` 全部更新标记号 `,8,Ym)):(B(),V(z,{key:1},[H(`button`,{disabled:o.value||f.value===0,onClick:y},` 更新全部 `,8,Xm),H(`button`,{disabled:o.value,onClick:x},`取消全部更新`,8,Zm)],64))])],8,km)])):G(``,!0)]),_:1})]))}}),[[`__scopeId`,`data-v-1111208e`]]),$m={class:`panel`},eh={class:`head`},th={class:`muted`},nh={key:0,class:`muted`},rh={key:1,class:`muted`},ih={key:3,class:`rail`},ah={key:0,class:`group sub`},oh=[`disabled`],sh=[`disabled`],ch=[`disabled`],lh=[`disabled`],uh=[`disabled`],dh=[`disabled`],fh=[`disabled`],ph={class:`group main`},mh=[`title`],hh={class:`label`},gh={class:`size`},_h={class:`label`},vh={key:0,class:`popover`},yh=[`onClick`],bh=[`disabled`],xh=[`disabled`],Sh=[`disabled`],Ch=vf(R({__name:`GalleryLibraryPage`,setup(e){Ol();let t=P([]),n=P(!0),r=P(!1),i=P([]),a=P(!1),o=P(!1),s=P(!1),c=P(void 0),l=P(!1),u=P(!1),d=P(!1),f=K(()=>[{title:`本地画廊${t.value.length>0?`(${t.value.length})`:``}`,items:t.value.map(p)}]);function p(e){let t=e.summary;return t===null?{gid:e.gid,token:e.token,title:e.title,titleJpn:``,category:`Misc`,thumbUrl:``,uploader:``,postedAt:e.downloadedAt,pageCount:e.pageCount,sizeBytes:e.sizeBytes,rating:0,torrentCount:0,expunged:!1,tags:[],language:null,favorite:null}:t}function m(e){return{name:`gallery-player`,params:{gid:e.gid,token:e.token}}}let h=K(()=>t.value.filter(e=>i.value.includes(e.gid))),g=K(()=>h.value.map(e=>`${e.gid}-${e.resolution}`));async function _(){n.value=!0;try{t.value=await Z(`library.list`)}catch(e){$.error(Q(e))}finally{n.value=!1}}function v(){r.value=!r.value,r.value||(a.value=!1,i.value=[])}async function y(e){if(c.value=e,s.value=!0,e!==void 0&&e.length>0){await ip({keys:e,reset:!0});return}await rp()}async function b(){d.value=!0;let e=0;try{for(let t of h.value)(await Z(`library.remove`,{params:{gid:t.gid,resolution:t.resolution}})).removed&&(e+=1);$.success(`已删除 ${e} 个本地画廊`),i.value=[],l.value=!1,await _()}catch(e){$.error(Q(e))}finally{d.value=!1}}async function x(){d.value=!0;let e=0;try{for(let t of h.value)await Z(`downloads.create`,{body:{gid:t.gid,token:t.token,resolution:t.resolution}}),e+=1;$.success(`已把 ${e} 个画廊加入下载队列`)}catch(e){$.error(Q(e))}finally{d.value=!1}}async function S(){d.value=!0;let e=0;try{for(let t of h.value)await Kf({gid:t.gid,token:t.token,title:t.title,thumbUrl:t.summary?.thumbUrl??``,pageCount:t.pageCount,resolution:t.resolution,bytesPerPage:t.files>0?Math.round(t.sizeBytes/t.files):0})&&(e+=1);$.success(`已把 ${e} 个画廊加入播放列表`)}finally{d.value=!1}}async function C(){d.value=!0;let e=Cf.value[0];try{e===void 0&&await kf();let t=0;for(let e of h.value)await Pf({gid:e.gid,token:e.token,title:e.title,thumbUrl:e.summary?.thumbUrl??``,pageCount:e.pageCount,slot:0})&&(t+=1);$.success(t===0?`没有可收藏的项`:`已收藏 ${t} 个画廊`)}finally{d.value=!1}}async function w(){let e=Cf.value[0];if(e===void 0){await kf(),u.value=!1;return}d.value=!0;try{await T(e.id),u.value=!1}finally{d.value=!1}}async function T(e){let t=0;for(let n of h.value)try{await Z(`favorites.items.slot`,{params:{folderId:e,gid:n.gid},body:{slot:-1}}),await Z(`favorites.items.remove`,{params:{folderId:e,gid:n.gid}}),t+=1}catch(e){$.error(Q(e))}$.success(`已取消 ${t} 个画廊的收藏`)}async function E(){d.value=!0;try{for(let e of h.value)await Yf(`${e.gid}-${e.resolution}`);$.info(`已尝试从播放列表移除选中项`)}finally{d.value=!1}}function D(e){e.key===`Escape`&&r.value&&!a.value&&v()}return Vr(()=>{_(),window.addEventListener(`keydown`,D)}),Gr(()=>{window.removeEventListener(`keydown`,D)}),(e,p)=>(B(),V(`div`,$m,[H(`header`,eh,[p[14]||=H(`h2`,null,`本地画廊`,-1),H(`span`,th,j(t.value.length)+` 个 · 共 `+j(t.value.reduce((e,t)=>e+t.files,0))+` 页 `,1),H(`button`,{class:`top-manager`,title:`打开更新管理`,onClick:p[0]||=e=>y()},[...p[13]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 4v10M8 10.5l4 4 4-4`}),H(`path`,{d:`M5 19h14`})],-1),W(` 更新管理 `,-1)]])]),n.value&&t.value.length===0?(B(),V(`p`,nh,`读取本地库中…`)):t.value.length===0?(B(),V(`p`,rh,` 本地还没有画廊。在画廊详情页或播放器里点下载,落盘后就会出现在这里。 `)):(B(),Ea(Dm,{key:2,groups:f.value,to:m,mode:r.value?`select`:`browse`,selected:i.value,columns:F(bf),"thumb-height":200,"onUpdate:selected":p[1]||=e=>i.value=e},null,8,[`groups`,`mode`,`selected`,`columns`])),t.value.length>0?(B(),V(`div`,ih,[a.value?(B(),V(`div`,ah,[H(`button`,{title:`收藏选中画廊`,disabled:d.value,onClick:C},[...p[15]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20s-7-4.6-7-9.5A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.5C19 15.4 12 20 12 20z`})],-1),H(`span`,{class:`label`},`收藏选中画廊`,-1)]],8,oh),H(`button`,{title:`取消收藏选中画廊`,disabled:d.value,onClick:p[2]||=e=>u.value=!0},[...p[16]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20s-7-4.6-7-9.5A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.5C19 15.4 12 20 12 20z`}),H(`path`,{d:`M4 4l16 16`})],-1),H(`span`,{class:`label`},`取消收藏`,-1)]],8,sh),H(`button`,{title:`升级选中画廊`,disabled:d.value,onClick:p[3]||=e=>y(g.value)},[...p[17]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20V9M8 13.5l4-4 4 4`}),H(`path`,{d:`M5 5h14`})],-1),H(`span`,{class:`label`},`升级选中画廊`,-1)]],8,ch),H(`button`,{title:`加入播放列表`,disabled:d.value,onClick:S},[...p[18]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M8 6l10 6-10 6z`}),H(`path`,{d:`M18 4v6M15 7h6`})],-1),H(`span`,{class:`label`},`加入播放列表`,-1)]],8,lh),H(`button`,{title:`从播放列表移除`,disabled:d.value,onClick:E},[...p[19]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M8 6l10 6-10 6z`}),H(`path`,{d:`M15 7h6`})],-1),H(`span`,{class:`label`},`移出播放列表`,-1)]],8,uh),H(`button`,{title:`继续下载选中画廊`,disabled:d.value,onClick:x},[...p[20]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 4v10M8 10.5l4 4 4-4`}),H(`path`,{d:`M5 19h14`})],-1),H(`span`,{class:`label`},`继续下载`,-1)]],8,dh),H(`button`,{class:`danger`,title:`删除选中画廊`,disabled:d.value||i.value.length===0,onClick:p[4]||=e=>l.value=!0},[...p[21]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M5 7h14M10 7V5h4v2M7 7l1 12h8l1-12`}),H(`path`,{d:`M11 11v5M13 11v5`})],-1),H(`span`,{class:`label`},`删除选中画廊`,-1)]],8,fh)])):G(``,!0),H(`div`,ph,[H(`button`,{class:A([`rail-btn`,{on:r.value}]),title:r.value?`退出批量操作`:`批量操作`,onClick:p[5]||=e=>{v(),a.value=r.value}},[p[22]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 7h16M4 12h16M4 17h10`}),H(`path`,{d:`M17 15l2 2 3-4`})],-1),H(`span`,hh,j(r.value?`批量操作(已选 ${i.value.length})`:`批量操作`),1)],10,mh),H(`div`,gh,[H(`button`,{class:`rail-btn`,title:`调整排列尺寸`,onClick:p[6]||=e=>o.value=!o.value},[p[23]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5`})],-1),H(`span`,_h,`每行 `+j(F(Sf)(F(bf))),1)]),o.value?(B(),V(`div`,vh,[(B(!0),V(z,null,ti(F(xf),e=>(B(),V(`button`,{key:e,class:A({on:F(bf)===e}),onClick:t=>bf.value=e},j(e===0?`自动`:e),11,yh))),128))])):G(``,!0)]),H(`button`,{class:`rail-btn`,title:`打开更新管理`,onClick:p[7]||=e=>y()},[...p[24]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 19V9M8 12.5l4-4 4 4`}),H(`path`,{d:`M5 5h14`})],-1),H(`span`,{class:`label`},`更新管理`,-1)]])])])):G(``,!0),U(fp,{modelValue:l.value,"onUpdate:modelValue":p[9]||=e=>l.value=e,title:`删除本地画廊`},{buttons:I(()=>[H(`button`,{disabled:d.value,onClick:p[8]||=e=>l.value=!1},`取消`,8,bh),H(`button`,{disabled:d.value,onClick:b},`删除`,8,xh)]),default:I(()=>[H(`p`,null,`要删除选中的 `+j(i.value.length)+` 个本地画廊吗?文件会从磁盘删掉,无法恢复。`,1)]),_:1},8,[`modelValue`]),U(fp,{modelValue:u.value,"onUpdate:modelValue":p[11]||=e=>u.value=e,title:`取消收藏`},{buttons:I(()=>[H(`button`,{onClick:p[10]||=e=>u.value=!1},`取消`),H(`button`,{disabled:d.value,onClick:w},`确定`,8,Sh)]),default:I(()=>[H(`p`,null,`要取消收藏选中的 `+j(i.value.length)+` 个画廊吗?会同时从收藏夹与云端移除。`,1)]),_:1},8,[`modelValue`]),U(Qm,{open:s.value,"onUpdate:open":p[12]||=e=>s.value=e,"pending-keys":c.value},null,8,[`open`,`pending-keys`])]))}}),[[`__scopeId`,`data-v-70ae6ddb`]]);function wh(e){let t=e.trim();if(t===``)return``;let n=t.indexOf(`:`),r=n===-1?``:t.slice(0,n).trim(),i=(n===-1?t:t.slice(n+1)).trim();if(i===``)return``;let a=/[\s"]/.test(i)?`"${i.replaceAll(`"`,``)}"`:i;return`${r===``?``:`${r}:`}${a}$`}function Th(e){return e.map(wh).filter(e=>e!==``).join(` `)}var Eh={key:0,class:`muted hint`},Dh={key:1,class:`muted hint`},Oh=[`disabled`],kh=[`disabled`,`onClick`],Ah=[`disabled`],jh=[`disabled`],Mh=vf(R({__name:`DownloadDialog`,props:{open:{type:Boolean},gid:{},token:{},pageCount:{}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=P([]),a=P(``),o=P(!1),s=P(!1);function c(){r(`update:open`,!1)}async function l(){o.value=!0,i.value=[],a.value=``;try{let e=await Z(`galleries.archives`,{params:{gid:n.gid,token:n.token}});i.value=e.options}catch(e){a.value=Q(e)}finally{o.value=!1}}async function u(e){s.value=!0;try{await Z(`downloads.create`,{body:{gid:n.gid,token:n.token,resolution:e}}),c(),$.success(`已加入下载队列(${e})`)}catch(e){$.error(Q(e))}finally{s.value=!1}}return Jn(()=>[n.open,n.gid,n.token],()=>{n.open&&l()},{immediate:!0}),(t,n)=>(B(),Ea(fp,{"model-value":e.open,title:`下载此画廊`,width:`520px`,"onUpdate:modelValue":n[2]||=e=>r(`update:open`,e)},{buttons:I(()=>[H(`button`,{disabled:s.value,onClick:c},`取消`,8,Oh),(B(!0),V(z,null,ti(i.value,e=>(B(),V(`button`,{key:e.resolution,disabled:s.value,onClick:t=>u(e.resolution)},` 下载`+j(e.resolution)+j(e.sizeText),9,kh))),128)),H(`button`,{disabled:s.value,onClick:n[0]||=e=>u(`pages-res`)},`逐页下载(重采样图)`,8,Ah),H(`button`,{disabled:s.value,onClick:n[1]||=e=>u(`pages-org`)},`逐页下载(原图)`,8,jh)]),default:I(()=>[H(`p`,null,`要下载此画廊吗?共 `+j(e.pageCount)+` 页。`,1),n[3]||=H(`p`,{class:`muted hint`},` 逐页下载不需要登录:一页一次请求上游,页数多时耗时较长(上游限流约 5 秒一次)。 归档下载更快,但需要登录并消耗 GP。 `,-1),o.value?(B(),V(`p`,Eh,`正在读取归档选项…`)):a.value===``?G(``,!0):(B(),V(`p`,Dh,` 归档选项读不到(`+j(a.value)+`),下面只列出逐页下载。 `,1))]),_:1},8,[`model-value`]))}}),[[`__scopeId`,`data-v-f714dab6`]]),Nh={class:`stage`},Ph={key:0,class:`placeholder`},Fh=[`src`,`alt`],Ih={class:`bar`},Lh={class:`muted`},Rh=[`disabled`],zh=[`disabled`],Bh=vf(R({__name:`ImageLightbox`,props:{open:{type:Boolean},gid:{},token:{},pages:{},page:{},quality:{}},emits:[`update:open`,`update:page`],setup(e,{emit:t}){let n=e,r=t,i=P(null),a=P(!1),o=P(``),s=P(!1),c=new AbortController,l=K(()=>{let e=n.pages.indexOf(n.page);return e===-1?0:e}),u=K(()=>n.pages[l.value]??1),d=K(()=>{let e=i.value;return e===null?``:n.quality===`org`&&e.originalImageUrl!==null?e.originalImageUrl:e.imageUrl}),f=K(()=>d.value!==``&&o.value===``),p=K(()=>!f.value||!s.value);function m(){r(`update:open`,!1)}function h(e){let t=n.pages[l.value+e];t!==void 0&&r(`update:page`,t)}async function g(){c.abort(),c=new AbortController;let e=c.signal;i.value=null,o.value=``,s.value=!1,a.value=!0;try{let t=await Z(`galleries.page`,{params:{gid:n.gid,token:n.token,page:u.value},signal:e});e.aborted||(i.value=t)}catch(t){if(e.aborted)return;o.value=Q(t)}finally{e.aborted||(a.value=!1)}}function _(e){if(n.open){if(e.key===`Escape`){e.stopPropagation(),m();return}if(e.key===`ArrowLeft`){e.preventDefault(),h(-1);return}e.key===`ArrowRight`&&(e.preventDefault(),h(1))}}Jn(()=>[n.open,n.page,n.gid,n.token],()=>{if(!n.open){c.abort(),window.removeEventListener(`keydown`,_,!0);return}window.addEventListener(`keydown`,_,!0),g()},{immediate:!0}),Gr(()=>{c.abort(),window.removeEventListener(`keydown`,_,!0)});let v=K(()=>`${u.value} / ${n.pages.length===0?0:n.pages.length}`);return(t,n)=>(B(),Ea(lr,{to:`body`},[U(So,{name:`lightbox`},{default:I(()=>[e.open?(B(),V(`div`,{key:0,class:`mask`,onClick:Ts(m,[`self`])},[H(`figure`,Nh,[p.value?(B(),V(`div`,Ph,[U(im,{status:o.value===``?`loading`:`error`,"error-text":o.value===``?`加载失败`:o.value},null,8,[`status`,`error-text`])])):G(``,!0),f.value?(B(),V(`img`,{key:1,class:A({waiting:!s.value}),src:d.value,alt:`第 ${u.value} 页`,onLoad:n[0]||=e=>s.value=!0,onError:n[1]||=e=>o.value=`图片加载失败`},null,42,Fh)):G(``,!0),H(`figcaption`,Ih,[H(`span`,Lh,`第 `+j(v.value)+` 页`,1),n[4]||=H(`span`,{class:`grow`},null,-1),H(`button`,{disabled:l.value===0,title:`上一张(←)`,onClick:n[2]||=e=>h(-1)},` ‹ `,8,Rh),H(`button`,{disabled:l.value>=e.pages.length-1,title:`下一张(→)`,onClick:n[3]||=e=>h(1)},` › `,8,zh),H(`button`,{title:`关闭(Esc)`,onClick:m},`×`)])])])):G(``,!0)]),_:1})]))}}),[[`__scopeId`,`data-v-9d52e33c`]]),Vh={status:`loading`,url:``,width:0,height:0},Hh={status:`error`,url:``,width:0,height:0},Uh=new Map;function Wh(e,t){if(e===``)return t(Hh),()=>void 0;let n=Uh.get(e);if(n===void 0&&(n={result:Vh,listeners:new Set},Uh.set(e,n),Kh(e,n,!1)),n.result.status!==`loading`)return t(n.result),()=>void 0;let r=n,i=e=>t(e);return r.listeners.add(i),()=>{r.listeners.delete(i)}}function Gh(e){return`${e}${e.includes(`?`)?`&`:`?`}ehb-retry=1`}function Kh(e,t,n){let r=n?Gh(e):e,i=e=>{if(t.result.status===`loading`){t.result=e;for(let n of t.listeners)n(e);t.listeners.clear()}},a=()=>{if(n){i(Hh);return}Kh(e,t,!0)},o=new Image;o.onload=()=>{if(o.naturalWidth>0&&o.naturalHeight>0){i({status:`loaded`,url:r,width:o.naturalWidth,height:o.naturalHeight});return}a()},o.onerror=a,o.src=r,o.complete&&o.naturalWidth>0&&i({status:`loaded`,url:r,width:o.naturalWidth,height:o.naturalHeight})}var qh=[`aria-label`,`aria-busy`],Jh=vf(R({__name:`SpriteImage`,props:{src:{},width:{},height:{},offsetX:{},offsetY:{},alt:{}},setup(e){let t=e,n=P(`loading`),r=P(null);function i(e,t){return t<=0?0:Math.max(-100,Math.min(0,e/t*100))}let a=K(()=>{let e={},a=r.value,o=n.value===`loaded`&&a!==null&&a.width>0&&a.height>0;if(e[`--cell-ratio`]=t.width>0&&t.height>0?`${t.width} / ${t.height}`:o?`${a.width} / ${a.height}`:`2 / 3`,!o)return e;let s=t.width>0&&t.height>0?a.width/t.width:1;return e[`--sprite-url`]=`url("${t.src}")`,e[`--sheet-width`]=`${s*100}%`,e[`--sheet-ratio`]=`${a.width} / ${a.height}`,e[`--sheet-shift-x`]=`${i(t.offsetX,a.width)}%`,e[`--sheet-shift-y`]=`${i(t.offsetY,a.height)}%`,e}),o=()=>void 0;function s(){o(),n.value=`loading`,r.value=null,o=Wh(t.src,e=>{n.value=e.status,r.value=e.status===`loaded`?{width:e.width,height:e.height}:null})}return Jn(()=>t.src,s,{immediate:!0}),Gr(()=>{o()}),(t,r)=>(B(),V(`div`,{class:A([`sprite`,n.value]),style:ye(a.value),role:`img`,"aria-label":e.alt,"aria-busy":n.value===`loading`},[r[0]||=H(`div`,{class:`sheet`,"aria-hidden":`true`},null,-1),U(im,{status:n.value},null,8,[`status`])],14,qh))}}),[[`__scopeId`,`data-v-d2fdd293`]]),Yh={class:`panel`},Xh={key:0,class:`err`},Zh={key:1,class:`gallery loading`,"aria-busy":`true`,"aria-live":`polite`},Qh={class:`media`},$h={class:`page`},eg={key:2,class:`gallery`},tg={class:`media`},ng={class:`cover-note muted`},rg={class:`previews`},ig={class:`info`},ag={key:0,class:`muted jpn`},og={key:1,class:`update-note`},sg=[`disabled`],cg={class:`meta`},lg={class:`actions`},ug=[`href`],dg={class:`tags`},fg={class:`ns`},pg={class:`chips`},mg=[`aria-pressed`,`onClick`],hg={class:`versions`},gg={class:`ver-title`},_g={class:`muted`},vg={key:0},yg={class:`ver-title`},bg={class:`muted`},xg={key:1},Sg={class:`line`},Cg={class:`preview-of-selection`},wg={key:0,class:`warn`},Tg=20,Eg=vf(R({__name:`GalleryPage`,props:{gid:{},token:{}},setup(e){let t=e,n=kl(),r=Ol(),i=P(null),a=P(null),o=P(null),s=P(``),c=P(!1),l=P(!1),u=P(1),d=P(`res`),f=P(null),p=P(!1),m=P(null),h=P(!1),g=P([]),_=K(()=>Th(g.value)),v=K(()=>g.value.length>8),y=K(()=>`https://e-hentai.net/g/${t.gid}/${t.token}/`),b=K(()=>(i.value?.previewPages??[]).slice(0,Tg)),x=K(()=>o.value===null?a.value?.imageUrl??``:kd(t.gid,o.value,1)),S=new AbortController,C=S.signal;function w(){return S.abort(),S=new AbortController,C=S.signal,C}function T(e){g.value=g.value.includes(e)?g.value.filter(t=>t!==e):[...g.value,e]}function E(e){r.push({path:`/`,query:{query:e}})}function D(){let e=_.value;e!==``&&$.promise(Z(`galleries.search`,{query:{query:e,page:1,limit:24},signal:C}),{pending:`正在搜索选中的 ${g.value.length} 个标签…`,success:{render:({data:e})=>`找到 ${e.items.length} 条结果`},error:{render:({data:e})=>jd(e)?`搜索已取消`:Q(e)}}).then(()=>E(e),t=>{jd(t)||E(e)})}function ee(){r.push({name:`gallery-previews`,params:{gid:t.gid,token:t.token}})}async function te(){let e=i.value;if(e===null)return;let n=null,r=0;try{let e=(await Z(`library.list`,{signal:C})).find(e=>e.gid===t.gid);e!==void 0&&(n=e.resolution,r=e.files>0?Math.round(e.sizeBytes/e.files):0)}catch{}await Kf({gid:e.gid,token:e.token,title:e.title,thumbUrl:e.thumbUrl,pageCount:e.pageCount,resolution:n,bytesPerPage:r})&&$.success(`已加入播放列表`)}async function ne(){let e=i.value;e!==null&&(await kf(),await Pf({gid:e.gid,token:e.token,title:e.title,thumbUrl:e.thumbUrl,pageCount:e.pageCount,slot:0})&&$.success(`已加入收藏夹`))}function re(e){u.value=e,l.value=!0}async function ie(e=1){try{(await Z(`library.list`,{signal:C})).some(e=>e.gid===t.gid)||await Z(`galleries.page`,{params:{gid:t.gid,token:t.token,page:1},query:{fresh:!0},signal:C})}catch(e){if(C.aborted||jd(e))return;$.error(`该画廊可能已失效:${Q(e)}`);return}r.push({name:`gallery-player`,params:{gid:t.gid,token:t.token},query:e>1?{page:String(e)}:{}})}async function ae(e){try{let n=await Z(`galleries.newer`,{params:{gid:t.gid,token:t.token},signal:e});e.aborted||(f.value=n.newer)}catch{}}async function oe(){let e=f.value;if(e!==null&&(p.value=!0,m.value===null)){h.value=!0;try{m.value=await Z(`galleries.detail`,{params:{gid:e.gid,token:e.token},signal:C})}catch(e){$.error(`新版本信息读取失败:${Q(e)}`)}finally{h.value=!1}}}function O(e,t){p.value=!1,r.push({name:`gallery`,params:{gid:e,token:t}})}async function se(){try{let e=await Z(`config.get`);d.value=e.setting.viewer.imageQuality}catch{}}async function ce(e){try{return(await Z(`library.list`,{signal:e})).find(e=>e.gid===t.gid)?.resolution??null}catch{return null}}async function le(){let e=Math.max(1,Number(n.query.page??1)||1);if(e>1){r.replace({name:`gallery-player`,params:{gid:t.gid,token:t.token},query:{page:String(e)}});return}let c=w();s.value=``,i.value=null,a.value=null,o.value=null,g.value=[];try{let[e,n]=await Promise.all([Z(`galleries.detail`,{params:{gid:t.gid,token:t.token},signal:c}),ce(c)]);if(c.aborted||(i.value=e,o.value=n,document.title=`${e.title} - EhBrowser`,f.value=null,m.value=null,ae(c),n!==null))return;let r=await Z(`galleries.page`,{params:{gid:t.gid,token:t.token,page:1},signal:c});if(c.aborted)return;a.value=r}catch(e){if(c.aborted||jd(e))return;s.value=Q(e),$.error(s.value)}}return Jn(()=>[t.gid,t.token],()=>{le(),se()},{immediate:!0}),Gr(()=>{S.abort()}),(t,n)=>(B(),V(`div`,Yh,[s.value?(B(),V(`p`,Xh,j(s.value),1)):i.value===null?(B(),V(`div`,Zh,[H(`section`,Qh,[H(`div`,$h,[U(im,{status:`loading`})])]),n[8]||=Pa(`<section class="info" data-v-243b771b><p class="loading-note" data-v-243b771b>正在读取画廊信息…</p><div class="skeleton-bar wide" data-v-243b771b></div><div class="skeleton-bar" data-v-243b771b></div><div class="skeleton-bar short" data-v-243b771b></div><div class="bar-row" data-v-243b771b><div class="skeleton-bar button" data-v-243b771b></div><div class="skeleton-bar button" data-v-243b771b></div><div class="skeleton-bar button" data-v-243b771b></div></div><p class="muted hint" data-v-243b771b> 首次进入要等上游(限流较严,一次请求约几秒);进过的画廊会命中详情缓存,再进来是秒开 </p></section>`,1)])):(B(),V(`div`,eg,[H(`section`,tg,[U(sm,{class:`page`,src:x.value,alt:`${i.value.title} 封面`,ratio:`2 / 3`,eager:``,retryable:``},null,8,[`src`,`alt`]),H(`p`,ng,j(o.value===null?`封面。点缩略图就地放大,进阅读器请点「阅读」`:`封面(本地副本第 1 页)。点缩略图就地放大,进阅读器请点「阅读」`),1),H(`div`,rg,[(B(!0),V(z,null,ti(b.value,e=>(B(),Ea(Jh,{key:e.page,class:`preview`,src:e.thumbUrl,width:e.width,height:e.height,"offset-x":e.offsetX,"offset-y":e.offsetY,alt:`第 ${e.page} 页缩略图`,onClick:t=>re(e.page)},null,8,[`src`,`width`,`height`,`offset-x`,`offset-y`,`alt`,`onClick`]))),128))]),H(`button`,{class:`more`,onClick:ee},` 加载更多预览图(共 `+j(i.value.pageCount)+` 页) `,1)]),H(`section`,ig,[H(`h2`,null,j(i.value.title),1),i.value.titleJpn?(B(),V(`p`,ag,j(i.value.titleJpn),1)):G(``,!0),f.value===null?G(``,!0):(B(),V(`p`,og,[n[9]||=W(` 有可用的更新的版本 `,-1),H(`button`,{disabled:h.value,onClick:oe},`查看新版本`,8,sg)])),H(`dl`,cg,[n[10]||=H(`dt`,null,`分类`,-1),H(`dd`,null,j(F(Jp)(i.value.category)),1),n[11]||=H(`dt`,null,`上传者`,-1),H(`dd`,null,j(i.value.uploader||`—`),1),n[12]||=H(`dt`,null,`页数 / 体积`,-1),H(`dd`,null,j(i.value.pageCount)+` 页 · `+j(i.value.sizeText),1),n[13]||=H(`dt`,null,`评分`,-1),H(`dd`,null,`★ `+j(i.value.rating)+`(`+j(i.value.ratingCount)+` 人)`,1),n[14]||=H(`dt`,null,`收藏`,-1),H(`dd`,null,j(i.value.favoriteCount),1),n[15]||=H(`dt`,null,`可见性`,-1),H(`dd`,null,j(i.value.visibility),1)]),H(`div`,lg,[H(`button`,{title:`下载此画廊:归档或逐页,逐页不需要登录`,onClick:n[0]||=e=>c.value=!0},` 下载 `),H(`button`,{title:`加入收藏(默认放进第一个本地收藏夹)`,onClick:ne},j(i.value.favorite===null?`收藏`:`已收藏`),1),H(`button`,{title:`进入播放器,逐页看全部图片`,onClick:n[1]||=e=>ie()},`阅读`),H(`button`,{title:`加入用户播放列表(只追加,不清空)`,onClick:te},` 加入播放列表 `),H(`a`,{href:y.value,target:`_blank`,rel:`noreferrer`},`上游页面`,8,ug),U(F(id),{to:`/`},{default:I(()=>[...n[16]||=[W(`返回搜索`,-1)]]),_:1})]),H(`ul`,dg,[(B(!0),V(z,null,ti(i.value.tagGroups,e=>(B(),V(`li`,{key:e.namespace},[H(`div`,fg,j(F(Kp)(e.namespace)),1),H(`div`,pg,[(B(!0),V(z,null,ti(e.tags,t=>(B(),V(`button`,{key:t,class:A([`chip`,{on:g.value.includes(`${e.namespace}:${t}`)}]),"aria-pressed":g.value.includes(`${e.namespace}:${t}`),onClick:n=>T(`${e.namespace}:${t}`)},j(F(qp)(t,e.namespace)),11,mg))),128))])]))),128))])])])),U(Bh,{open:l.value,"onUpdate:open":n[2]||=e=>l.value=e,page:u.value,"onUpdate:page":n[3]||=e=>u.value=e,gid:e.gid,token:e.token,pages:b.value.map(e=>e.page),quality:d.value},null,8,[`open`,`page`,`gid`,`token`,`pages`,`quality`]),U(fp,{modelValue:p.value,"onUpdate:modelValue":n[6]||=e=>p.value=e,title:`选择要切换到的版本`},{default:I(()=>[n[21]||=H(`p`,{class:`muted`},` 同一本画廊在上游分版本时旧地址仍然可用,切换只是打开另一版的详情页,不会删掉任何东西。 `,-1),H(`ul`,hg,[H(`li`,null,[n[17]||=H(`span`,{class:`tag muted`},`当前`,-1),H(`span`,gg,j(i.value.title),1),H(`span`,_g,j(i.value.pageCount)+` 页`,1)]),m.value===null?f.value===null?G(``,!0):(B(),V(`li`,xg,[n[19]||=H(`span`,{class:`tag accent`},`最新`,-1),n[20]||=H(`span`,{class:`ver-title muted`},`正在读取…`,-1),H(`button`,{onClick:n[5]||=e=>O(f.value.gid,f.value.token)},` 直接切换 `)])):(B(),V(`li`,vg,[n[18]||=H(`span`,{class:`tag accent`},`最新`,-1),H(`span`,yg,j(m.value.title),1),H(`span`,bg,j(m.value.pageCount)+` 页`,1),H(`button`,{onClick:n[4]||=e=>O(m.value.gid,m.value.token)},` 切换到这个版本 `)]))]),n[22]||=H(`p`,{class:`muted hint`},`更新收藏里的标记号(把收藏挪到最新版本)在收藏页的批量操作里。`,-1)]),_:1},8,[`modelValue`]),U(Mh,{open:c.value,"onUpdate:open":n[7]||=e=>c.value=e,gid:e.gid,token:e.token,"page-count":i.value?.pageCount??0},null,8,[`open`,`gid`,`token`,`page-count`]),U(So,{name:`tag-search`},{default:I(()=>[g.value.length>0?(B(),V(`button`,{key:0,class:`tag-search`,onClick:D},[H(`span`,Sg,`搜索选中的 `+j(g.value.length)+` 个标签`,1),H(`span`,Cg,j(_.value),1),v.value?(B(),V(`span`,wg,` 上游一次最多 `+j(F(8))+` 个词条,超出的会被忽略 `,1)):G(``,!0)])):G(``,!0)]),_:1})]))}}),[[`__scopeId`,`data-v-243b771b`]]),Dg={class:`panel`},Og={class:`head`},kg={class:`muted count`},Ag={class:`head-actions`},jg={key:0,class:`err`},Mg={key:1,class:`muted`},Ng={class:`grid`},Pg={class:`num`},Fg={key:2,class:`muted foot`},Ig=500,Lg=vf(R({__name:`GalleryPreviewsPage`,props:{gid:{},token:{}},setup(e){let t=e,n=P(``),r=P(0),i=P([]),a=P(0),o=P(!1),s=P(!1),c=P(!1),l=P(``),u=new AbortController,d=u.signal,f=K(()=>Math.max(r.value,i.value.length));async function p(){let e=d,n=await Z(`galleries.previews`,{params:{gid:t.gid,token:t.token},query:{index:a.value},signal:e});return!e.aborted&&(i.value=[...i.value,...n.previews],a.value=n.index+1,n.hasMore&&n.previews.length>0)}async function m(){o.value=!0,l.value=``;try{for(;!s.value&&!d.aborted&&a.value<Ig;)if(!await p()){c.value=!0;return}}catch(e){if(d.aborted||jd(e))return;l.value=Q(e),$.error(l.value)}finally{d.aborted||(o.value=!1)}}function h(){u.abort(),u=new AbortController,d=u.signal,s.value=!0,o.value=!1}function g(){s.value&&(s.value=!1,m())}async function _(){u.abort(),u=new AbortController,d=u.signal,n.value=``,r.value=0,i.value=[],a.value=0,s.value=!1,c.value=!1;try{let e=await Z(`galleries.detail`,{params:{gid:t.gid,token:t.token},signal:d});if(d.aborted)return;n.value=e.title,r.value=e.pageCount,document.title=`全部预览 - ${e.title} - EhBrowser`,await m()}catch(e){if(d.aborted||jd(e))return;l.value=Q(e),$.error(l.value)}}return Jn(()=>[t.gid,t.token],()=>void _(),{immediate:!0}),Gr(()=>{u.abort()}),(t,r)=>(B(),V(`div`,Dg,[H(`header`,Og,[H(`div`,null,[H(`h2`,null,j(n.value||`全部预览`),1),H(`p`,kg,[W(` 已加载 `+j(i.value.length)+` 张`,1),f.value>0?(B(),V(z,{key:0},[W(` / 共 `+j(f.value)+` 页`,1)],64)):G(``,!0),o.value?(B(),V(z,{key:1},[W(`,继续取图中…`)],64)):G(``,!0)])]),H(`div`,Ag,[o.value?(B(),V(`button`,{key:0,onClick:h},`停止加载`)):s.value?(B(),V(`button`,{key:1,onClick:g},`继续加载`)):G(``,!0),U(F(id),{to:{name:`gallery`,params:{gid:e.gid,token:e.token}}},{default:I(()=>[...r[0]||=[W(`返回详情`,-1)]]),_:1},8,[`to`])])]),l.value?(B(),V(`p`,jg,j(l.value),1)):G(``,!0),!o.value&&!s.value&&i.value.length===0&&l.value===``?(B(),V(`p`,Mg,` 正在读取第一组预览… `)):G(``,!0),H(`section`,Ng,[(B(!0),V(z,null,ti(i.value,t=>(B(),Ea(F(id),{key:t.page,class:`cell`,to:{name:`gallery-player`,params:{gid:e.gid,token:e.token},query:{page:t.page}}},{default:I(()=>[U(Jh,{class:`thumb`,src:t.thumbUrl,width:t.width,height:t.height,"offset-x":t.offsetX,"offset-y":t.offsetY,alt:`第 ${t.page} 页`},null,8,[`src`,`width`,`height`,`offset-x`,`offset-y`,`alt`]),H(`span`,Pg,j(t.page),1)]),_:2},1032,[`to`]))),128))]),s.value||c.value?(B(),V(`p`,Fg,j(s.value?`已停止,可继续加载`:`已到最后一页`),1)):G(``,!0)]))}}),[[`__scopeId`,`data-v-4ab64e6c`]]),Rg=2097152,zg=`ehbrowser.player-warm`;function Bg(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}function Vg(e,t=Bg()){let n=new Map,r=0,i=Math.max(0,e),a=0,o=``;function s(){for(;r>i&&n.size>1;){let e=n.keys().next();if(e.done)break;r-=n.get(e.value)??0,n.delete(e.value)}}function c(){if(t===null||a===0)return;let e=JSON.stringify({scope:a,entries:[...n]});if(e!==o)try{t.setItem(zg,e),o=e}catch{}}function l(){if(n.clear(),r=0,o=``,t===null||a===0)return;let e=null;try{e=t.getItem(zg)}catch{return}if(e!==null)try{let i=JSON.parse(e);if(Number(i.scope)!==a||!Array.isArray(i.entries)){t.removeItem(zg);return}for(let e of i.entries){if(!Array.isArray(e)||typeof e[0]!=`string`)continue;let t=Number(e[1])||0;n.set(e[0],t),r+=t}s(),o=JSON.stringify({scope:a,entries:[...n]})}catch{}}return{get size(){return n.size},get bytes(){return r},get scope(){return a},has(e){return n.has(e)},touch(e,t){let i=n.get(e);i!==void 0&&(r-=i,n.delete(e)),n.set(e,t),r+=t,s(),c()},resize(e){i=Math.max(0,e),s(),c()},useScope(e){e!==a&&(a=e,l())},clear(){if(n.clear(),r=0,o=``,t!==null)try{t.removeItem(zg)}catch{}}}}var Hg=null;function Ug(e){return Hg===null?Hg=Vg(e??536870912):e!==void 0&&Hg.resize(e),Hg}function Wg(e){let t=e.resolution!==null,n=P(Array(e.pageCount).fill(null)),r=new Set,i=[],a=0,o=!1,s=new Map;function c(t,r,i){if(t<1||t>e.pageCount)return;let a=[...n.value];a[t-1]={page:t,url:r,bytes:i},n.value=a}if(t)for(let t=1;t<=e.pageCount;t+=1)c(t,kd(e.gid,e.resolution??``,t),e.bytesPerPage);function l(t){return e.quality===`org`&&t.originalImageUrl!==null?t.originalImageUrl:t.imageUrl}async function u(t){if(o||e.signal.aborted)return;let n=s.get(t),r=await Z(`galleries.page`,{params:{gid:e.gid,token:e.token,page:t},query:n===void 0?{}:{pageToken:n},signal:e.signal});o||e.signal.aborted||(r.nextPageToken!==null&&s.set(r.page+1,r.nextPageToken),c(t,l(r),Rg))}function d(){for(;!o&&a<e.maxConcurrent&&i.length>0;){let t=i.shift();if(t===void 0)return;a+=1,u(t).catch(n=>{e.signal.aborted||jd(n)||(r.delete(t),$.error(`第 ${t} 页地址读取失败:${Q(n)}`))}).finally(()=>{--a,d()})}}return{tracks:n,local:t,url(e){return n.value[e-1]?.url},ensure(a){if(!t){for(let t of a)t<1||t>e.pageCount||r.has(t)||n.value[t-1]!==null||(r.add(t),i.push(t));d()}},dispose(){o=!0,i.length=0,r.clear()}}}var Gg=500,Kg=P(!0),qg=P(``),Jg=P(``),Yg=P(``),Xg=P([]);function Zg(e){return e.length>Gg?e.slice(e.length-Gg):e}async function Qg(){try{let e=await Z(`log.state`,{query:{limit:Gg}});Kg.value=e.enabled,qg.value=e.directory,Jg.value=e.defaultDirectory,Yg.value=e.file,Xg.value=Zg(e.entries)}catch(e){$.error(Q(e))}}function $g(e){Xg.value=Zg([...Xg.value,e])}function e_(e){return new Date(e*1e3).toLocaleTimeString()}var t_=P(`about:blank`),n_=P(!0);function r_(){return`Tips:使用 Ctrl + 空格 来紧急避险,当前设置的避险地点为 ${t_.value},EhBrowser 会在你按下快捷键后将当前页面替换为避险地点`}var i_=!1;function a_(){n_.value&&!i_&&(i_=!0,$.info(r_(),{position:$.POSITION.BOTTOM_RIGHT,autoClose:8e3}))}function o_(){let e=t_.value.trim()===``?`about:blank`:t_.value.trim();window.location.replace(e)}function s_(e){return e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.key===` `||e.code===`Space`)}var c_=P(``),l_=P(0),u_=P(`未知`),d_=P([]);function f_(e){d_.value=[`${new Date().toLocaleTimeString()} ${e}`,...d_.value].slice(0,50)}async function p_(){try{let e=await Z(`system.health`);c_.value=e.version,l_.value=e.startedAt;let t=await Z(`config.get`),n=t.setting.network.proxy;u_.value=n.enabled?`${n.protocol}://${n.host}:${n.port}`:`未启用`;let r=Up.value!==t.setting.translate.tags;Up.value=t.setting.translate.tags,Up.value&&r&&Xp(),t_.value=t.setting.safety.url,n_.value=t.setting.safety.hintEnabled}catch(e){$.error(Q(e))}}function m_(){return Md({"server.ready":e=>{f_(`server.ready ${String(e.version)}`)},"config.changed":()=>{f_(`config.changed`),p_()},"auth.changed":()=>{f_(`auth.changed`)},"download.changed":()=>{f_(`download.changed`),Id()},"library.update":e=>{f_(`library.update ${String(e.key)}`),ep(e)},"library.progress":e=>{np(e)},"log.appended":e=>{let t=e;f_(t.tag===``?t.message:`[${t.tag}] ${t.message}`),$g(t)}})}var h_={key:0,class:`corner left`},g_={key:1,class:`corner right`},__=[`disabled`],v_={class:`frame`},y_=[`disabled`],b_={class:`count`},x_=[`aria-valuemax`,`aria-valuenow`],S_=[`disabled`],C_=[`title`],w_={key:0,viewBox:`0 0 24 24`,"aria-hidden":`true`},T_={key:1,viewBox:`0 0 24 24`,"aria-hidden":`true`},E_=[`disabled`],D_={class:`auto`},O_=[`value`],k_={class:`tune`},A_={key:0,class:`popover`},j_=[`value`],M_=[`value`],N_=[`title`],P_=[`title`],F_=[`title`],I_=[`title`],L_=.25,R_=8,z_=.15,B_=160,V_=1200,H_=vf(R({__name:`Player`,props:{tracks:{},pageCount:{},title:{},startPage:{default:1},downloaded:{type:Boolean,default:!1},favorited:{type:Boolean,default:!1},maxCacheMb:{default:512},preloadCount:{default:2},autoplayEnabled:{type:Boolean,default:!1},autoplayIntervalSeconds:{default:5},autoplayLoop:{type:Boolean,default:!1},archives:{default:()=>[]}},emits:[`update:page`,`need`,`autoplay`,`favorite`,`download`,`detail`],setup(e,{emit:t}){let n=e,r=t,i=P(Math.max(1,n.startPage)),a=P(1),o=P(!1),s=P(!1),c=P(!1),l=P(!1),u=P(!1),d=P(null),f=Ug(n.maxCacheMb*1024*1024),p=null,m=0,h=null,g=K(()=>n.tracks[i.value-1]??null),_=K(()=>g.value?.url??``),v=K(()=>n.pageCount===0?0:i.value/n.pageCount*100),y=K(()=>n.autoplayEnabled&&!s.value);function b(e){let t=[];for(let r=-1;r<=n.preloadCount;r+=1){let i=e+r;i>=1&&i<=n.pageCount&&t.push(i)}return t}function x(e){r(`need`,b(e))}function S(e){for(let t of b(e)){let e=n.tracks[t-1];if(e==null||e.url===``||f.has(e.url))continue;let r=new Image;r.src=e.url,f.touch(e.url,e.bytes>0?e.bytes:Rg)}}function C(e){let t=Math.min(Math.max(1,Math.round(e)),Math.max(1,n.pageCount));t!==i.value&&(i.value=t,r(`update:page`,t))}function w(e){C(i.value+e)}function T(e){a.value=Math.min(Math.max(L_,Number(e.toFixed(2))),R_)}function E(e){T(a.value+e)}function D(){a.value=1}function ee(){p!==null&&(clearTimeout(p),p=null)}function te(){ee(),y.value&&(p=setTimeout(()=>{if(i.value>=n.pageCount){if(n.autoplayLoop)C(1);else{s.value=!0;return}}else w(1);te()},Math.max(1,n.autoplayIntervalSeconds)*1e3))}function ne(){if(!n.autoplayEnabled){r(`autoplay`,{enabled:!0,intervalSeconds:n.autoplayIntervalSeconds,loop:n.autoplayLoop}),s.value=!1;return}s.value=!s.value}function re(e){s.value=!1,r(`autoplay`,{enabled:e.enabled??n.autoplayEnabled,intervalSeconds:e.intervalSeconds??n.autoplayIntervalSeconds,loop:e.loop??n.autoplayLoop})}function ie(e){if(e.shiftKey){e.preventDefault(),E(e.deltaY>0?-.15:z_);return}e.preventDefault();let t=Date.now();t-m<B_||(m=t,w(e.deltaY>0?1:-1))}function ae(e){if(!(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement))switch(e.key){case`ArrowLeft`:w(-1);break;case`ArrowRight`:w(1);break;case`ArrowUp`:e.preventDefault(),E(z_);break;case`ArrowDown`:e.preventDefault(),E(-.15);break;case` `:n.autoplayEnabled&&(e.preventDefault(),s.value=!s.value);break;case`Escape`:o.value&&=!1;break;default:return}}function oe(e){let t=d.value;if(t===null)return i.value;let r=t.getBoundingClientRect();if(r.width<1)return i.value;let a=Math.min(Math.max((e-r.left)/r.width,0),1);return Math.max(1,Math.round(a*n.pageCount))}function O(e){u.value=!0,C(oe(e.clientX)),e.currentTarget.setPointerCapture(e.pointerId)}function se(e){u.value&&C(oe(e.clientX))}function ce(e){u.value=!1,e.currentTarget.releasePointerCapture(e.pointerId)}function le(){c.value=!0,h!==null&&(clearTimeout(h),h=null)}function ue(){h!==null&&clearTimeout(h),h=setTimeout(()=>{c.value=!1,h=null,l.value=!1},V_)}function de(){o.value=!o.value,o.value&&(le(),ue())}return Jn(()=>n.startPage,e=>C(e)),Jn(()=>[i.value,n.tracks,n.preloadCount,n.pageCount],()=>{x(i.value),S(i.value)},{immediate:!0}),Jn(()=>[y.value,n.autoplayIntervalSeconds,n.autoplayLoop,n.pageCount],()=>te(),{immediate:!0}),Jn(()=>n.maxCacheMb,e=>{f.resize(Math.max(64,e)*1024*1024),S(i.value)}),Jn(l_,e=>{e!==0&&(f.useScope(e),S(i.value))},{immediate:!0}),Jn(i,()=>D()),Vr(()=>{window.addEventListener(`keydown`,ae)}),Gr(()=>{window.removeEventListener(`keydown`,ae),ee(),h!==null&&clearTimeout(h)}),(t,n)=>(B(),V(`div`,{class:A([`player`,{full:o.value}])},[o.value?(B(),V(`div`,h_,j(i.value)+`/`+j(e.pageCount),1)):G(``,!0),o.value&&e.autoplayEnabled?(B(),V(`div`,g_,`AUTO`)):G(``,!0),H(`div`,{class:A([`stage`,{zoomed:a.value!==1}]),onWheel:ie,onPointermove:n[2]||=e=>o.value?le():void 0},[H(`button`,{class:`side prev`,disabled:i.value<=1,title:`上一张(←)`,"aria-label":`上一张`,onClick:n[0]||=e=>w(-1)},[...n[12]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M15 5l-7 7 7 7`})],-1)]],8,__),H(`div`,v_,[(B(),Ea(sm,{key:_.value===``?`p${i.value}`:_.value,class:`sheet`,style:ye({transform:`scale(${a.value})`}),src:_.value,alt:`${e.title} 第 ${i.value} 页`,eager:``,retryable:``},null,8,[`style`,`src`,`alt`]))]),H(`button`,{class:`side next`,disabled:i.value>=e.pageCount,title:`下一张(→)`,"aria-label":`下一张`,onClick:n[1]||=e=>w(1)},[...n[13]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M9 5l7 7-7 7`})],-1)]],8,y_)],34),H(`div`,{class:A([`controls`,{floating:o.value,shown:!o.value||c.value}]),onPointerenter:le,onPointerleave:ue},[H(`span`,b_,j(i.value)+`/`+j(e.pageCount),1),H(`div`,{ref_key:`bar`,ref:d,class:`track`,role:`slider`,"aria-valuemin":1,"aria-valuemax":e.pageCount,"aria-valuenow":i.value,"aria-label":`播放进度`,tabindex:`0`,onPointerdown:O,onPointermove:se,onPointerup:ce},[H(`i`,{style:ye({width:`${v.value}%`})},null,4)],40,x_),H(`button`,{class:`icon`,disabled:i.value<=1,title:`上一张`,onClick:n[3]||=e=>w(-1)},[...n[14]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M15 5l-7 7 7 7`})],-1)]],8,S_),H(`button`,{class:`icon`,title:y.value?`暂停自动播放`:`继续自动播放`,onClick:ne},[y.value?(B(),V(`svg`,w_,[...n[15]||=[H(`path`,{d:`M9 6v12M15 6v12`},null,-1)]])):(B(),V(`svg`,T_,[...n[16]||=[H(`path`,{d:`M8 5l11 7-11 7z`},null,-1)]]))],8,C_),H(`button`,{class:`icon`,disabled:i.value>=e.pageCount,title:`下一张`,onClick:n[4]||=e=>w(1)},[...n[17]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M9 5l7 7-7 7`})],-1)]],8,E_),H(`label`,D_,[n[19]||=H(`span`,{class:`muted`},`自动播放`,-1),H(`select`,{value:e.autoplayEnabled?`on`:`off`,onChange:n[5]||=e=>re({enabled:e.target.value===`on`})},[...n[18]||=[H(`option`,{value:`off`},`off`,-1),H(`option`,{value:`on`},`on`,-1)]],40,O_)]),H(`div`,k_,[H(`button`,{class:`icon`,title:`自动播放设置`,onClick:n[6]||=e=>l.value=!l.value},[...n[20]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z`}),H(`path`,{d:`M4 12h2M18 12h2M12 4v2M12 18v2M6.3 6.3l1.4 1.4M16.3 16.3l1.4 1.4M17.7 6.3l-1.4 1.4M7.7 16.3l-1.4 1.4`})],-1)]]),l.value?(B(),V(`div`,A_,[H(`label`,null,[n[21]||=H(`span`,{class:`muted`},`间隔(秒)`,-1),H(`input`,{type:`number`,min:`1`,max:`120`,value:e.autoplayIntervalSeconds,onChange:n[7]||=e=>re({intervalSeconds:Number(e.target.value)})},null,40,j_)]),H(`label`,null,[n[23]||=H(`span`,{class:`muted`},`播完循环`,-1),H(`select`,{value:e.autoplayLoop?`on`:`off`,onChange:n[8]||=e=>re({loop:e.target.value===`on`})},[...n[22]||=[H(`option`,{value:`off`},`off`,-1),H(`option`,{value:`on`},`on`,-1)]],40,M_)])])):G(``,!0)]),n[28]||=Pa(`<label class="auto" data-v-23add80b><span class="muted" data-v-23add80b>翻译</span><select disabled title="图片翻译尚未实现" data-v-23add80b><option data-v-23add80b>off</option></select></label><button class="icon" title="图片翻译设置:功能尚未实现" disabled data-v-23add80b><svg viewBox="0 0 24 24" aria-hidden="true" data-v-23add80b><path d="M4 6h10M9 4v2M6 6c0 4 3 7 7 8M14 6c0 4-3 7-7 8" data-v-23add80b></path><path d="M13 19l3-7 3 7M14 17h4" data-v-23add80b></path></svg></button>`,2),H(`button`,{class:A([`icon heart`,{on:e.favorited}]),title:e.favorited?`已收藏`:`收藏此画廊`,onClick:n[9]||=e=>t.$emit(`favorite`)},[...n[24]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20s-7-4.6-7-9.5A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.5C19 15.4 12 20 12 20z`})],-1)]],10,N_),H(`button`,{class:A([`icon`,{on:e.downloaded}]),title:e.downloaded?`已下载`:`下载此画廊`,onClick:n[10]||=e=>t.$emit(`download`)},[...n[25]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 4v10M8 10.5l4 4 4-4M5 19h14`})],-1)]],10,P_),H(`button`,{class:`icon zoom`,title:`重置缩放(当前 ${Math.round(a.value*100)}%)`,onClick:D},j(Math.round(a.value*100))+`% `,9,F_),H(`button`,{class:`icon`,title:`返回详情`,onClick:n[11]||=e=>t.$emit(`detail`)},[...n[26]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M14 6l-6 6 6 6`})],-1)]]),H(`button`,{class:`icon`,title:o.value?`退出网页全屏(Esc)`:`网页全屏`,onClick:de},[...n[27]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5`})],-1)]],8,I_)],34)],2))}}),[[`__scopeId`,`data-v-23add80b`]]),U_={class:`panel`},W_={class:`head`},G_={key:0,class:`tag muted`},K_={class:`muted`},q_={class:`actions`},J_={key:0,class:`err`},Y_={key:2,class:`muted`},X_=vf(R({__name:`PlayerPage`,props:{gid:{},token:{}},setup(e){let t=e,n=kl(),r=Ol(),i=P(null),a=P(``),o=P(1),s=P(null),c=P({maxCacheMb:512,maxConcurrentLoads:3,preloadCount:2,autoplayEnabled:!1,autoplayIntervalSeconds:5,autoplayLoop:!1,quality:`res`}),l=P(!1),u=P(null),d=P(0),f=P(0),p=new AbortController,m=p.signal,h=K(()=>u.value===null?i.value?.pageCount??0:f.value),g=K(()=>s.value?.tracks??[]),_=K(()=>(i.value?.favorite?.slot??-1)>=0),v=K(()=>u.value!==null);async function y(){try{let e=(await Z(`config.get`)).setting.viewer;c.value={maxCacheMb:e.maxCacheMb,preloadCount:e.preloadCount,maxConcurrentLoads:e.maxConcurrentLoads,autoplayEnabled:e.autoplay.enabled,autoplayIntervalSeconds:e.autoplay.intervalSeconds,autoplayLoop:e.autoplay.loop,quality:e.imageQuality}}catch{}}async function b(e){c.value={...c.value,autoplayEnabled:e.enabled,autoplayIntervalSeconds:e.intervalSeconds,autoplayLoop:e.loop};try{await Z(`config.patch`,{body:{viewer:{autoplay:e}}})}catch(e){$.error(Q(e))}}async function x(){try{let e=(await Z(`library.list`)).find(e=>e.gid===t.gid);return e===void 0?null:{resolution:e.resolution,bytesPerPage:e.files>0?Math.round(e.sizeBytes/e.files):0,pageCount:e.files>0?e.files:e.pageCount}}catch{return null}}function S(e){s.value?.dispose(),s.value=Wg({gid:t.gid,token:t.token,resolution:u.value,pageCount:e,bytesPerPage:d.value,maxConcurrent:c.value.maxConcurrentLoads,quality:c.value.quality,signal:m})}Jn(()=>s.value?.tracks,e=>{e!==void 0&&(Lf.value=e.filter(e=>e!==null).map(e=>({page:e.page,url:e.url,bytes:e.bytes})))});function C(e){r.replace({path:n.path,query:e>1?{page:String(e)}:{}}),Bf.value?.startsWith(`${t.gid}-`)===!0&&Bf.value!==null&&Jf(Bf.value,e);let i=u.value;i!==null&&Z(`library.progress`,{params:{gid:t.gid,resolution:i},body:{page:e}}).catch(()=>void 0)}async function w(){p.abort(),p=new AbortController,m=p.signal,a.value=``,i.value=null,s.value?.dispose(),s.value=null,o.value=Math.max(1,Number(n.query.page??1)||1),await Promise.all([y(),T()])}async function T(){let e=await x();try{let e=await Z(`galleries.detail`,{params:{gid:t.gid,token:t.token},signal:m});if(m.aborted)return;i.value=e,document.title=`${e.title} - EhBrowser`}catch(t){if(m.aborted||jd(t))return;if(e===null){a.value=Q(t),$.error(a.value);return}}u.value=e?.resolution??null,d.value=e?.bytesPerPage??0,f.value=e?.pageCount??0;let n=h.value;Rf.value={gid:t.gid,token:t.token,title:i.value?.title??`#${t.gid}`,thumbUrl:i.value?.thumbUrl??``,pageCount:n,resolution:e?.resolution??null,page:o.value,bytesPerPage:d.value},Lf.value=[],S(n),n>0&&C(o.value)}function E(){l.value=!0}function D(){$.info(`收藏接口尚未实现`)}function ee(){r.push({name:`gallery`,params:{gid:t.gid,token:t.token}})}return Jn(()=>[t.gid,t.token],()=>void w(),{immediate:!0}),Gr(()=>{p.abort(),s.value?.dispose()}),(t,n)=>(B(),V(`div`,U_,[H(`header`,W_,[U(F(id),{class:`title`,to:{name:`gallery`,params:{gid:e.gid,token:e.token}}},{default:I(()=>[W(j(i.value?.title??`#${e.gid}`),1)]),_:1},8,[`to`]),v.value?(B(),V(`span`,G_,`本地`)):G(``,!0),H(`span`,K_,j(h.value)+` 页`,1),H(`span`,q_,[U(F(id),{to:{name:`gallery-previews`,params:{gid:e.gid,token:e.token}},class:`muted`},{default:I(()=>[...n[2]||=[W(` 全部预览 `,-1)]]),_:1},8,[`to`]),U(F(id),{to:{name:`gallery`,params:{gid:e.gid,token:e.token}},class:`muted`},{default:I(()=>[...n[3]||=[W(` 返回详情 `,-1)]]),_:1},8,[`to`])])]),a.value?(B(),V(`p`,J_,j(a.value),1)):G(``,!0),h.value>0?(B(),Ea(H_,{key:1,tracks:g.value,"page-count":h.value,title:i.value?.title??``,"start-page":o.value,downloaded:v.value,favorited:_.value,"max-cache-mb":c.value.maxCacheMb,"preload-count":c.value.preloadCount,"autoplay-enabled":c.value.autoplayEnabled,"autoplay-interval-seconds":c.value.autoplayIntervalSeconds,"autoplay-loop":c.value.autoplayLoop,archives:t.archives,"onUpdate:page":C,onNeed:n[0]||=e=>s.value?.ensure(e),onAutoplay:b,onFavorite:D,onDownload:E,onDetail:ee},null,8,[`tracks`,`page-count`,`title`,`start-page`,`downloaded`,`favorited`,`max-cache-mb`,`preload-count`,`autoplay-enabled`,`autoplay-interval-seconds`,`autoplay-loop`,`archives`])):a.value?G(``,!0):(B(),V(`p`,Y_,`读取画廊中…`)),U(Mh,{open:l.value,"onUpdate:open":n[1]||=e=>l.value=e,gid:e.gid,token:e.token,"page-count":h.value},null,8,[`open`,`gid`,`token`,`page-count`])]))}}),[[`__scopeId`,`data-v-7dbd25d2`]]),Z_={class:`panel`},Q_={class:`head`},$_={class:`picker`},ev=[`disabled`],tv={key:0,class:`menu`},nv=[`onClick`],rv={class:`muted`},iv={class:`group-title muted`},av={key:0,class:`err`},ov=[`onClick`],sv={class:`muted`},cv={key:0,class:`muted empty`},lv={class:`new-row`},uv=[`disabled`],dv=[`disabled`],fv={class:`muted`},pv={key:0,class:`muted`},mv={key:2,class:`rail`},hv={key:0,class:`group sub`},gv=[`disabled`],_v=[`disabled`],vv={class:`size`},yv=[`disabled`],bv={class:`size`},xv=[`disabled`],Sv={key:0,class:`popover wrap`},Cv=[`disabled`],wv=[`disabled`,`onClick`],Tv=[`disabled`],Ev=[`disabled`],Dv={class:`group main`},Ov=[`title`],kv={class:`label`},Av={class:`size`},jv={class:`label`},Mv={key:0,class:`popover`},Nv=[`onClick`],Pv=[`disabled`],Fv=[`disabled`],Iv=[`disabled`],Lv=[`disabled`],Rv=[`disabled`],zv=vf(R({__name:`FavoritesPage`,setup(e){Ol();let t=P(!1),n=P([]),r=P(!1),i=P(!1),a=P(!1),o=P(!1),s=P(``),c=P(!1),l=P(!1),u=P(!1),d=P(!1),f=P(!1),p=P([]),m=K(()=>Ef.value.startsWith(`cloud:`)),h=K(()=>(m.value,Df.value)),g=K(()=>[{title:`${v(Ef.value)}${h.value.length>0?`(${h.value.length})`:``}`,items:h.value.map(y)}]),_=K(()=>h.value.filter(e=>n.value.includes(e.gid)));function v(e){if(e.startsWith(`cloud:`)){let t=Number(e.slice(6));return wf.value.find(e=>e.slot===t)?.name??`云端收藏 ${t}`}return Cf.value.find(t=>t.id===e)?.name??`收藏`}function y(e){return{gid:e.gid,token:e.token,title:e.title,titleJpn:``,category:`Misc`,thumbUrl:e.thumbUrl,uploader:``,postedAt:e.addedAt,pageCount:e.pageCount,sizeBytes:0,rating:0,torrentCount:0,expunged:!1,tags:[],language:null,favorite:e.slot>=0?{slot:e.slot,name:``}:null}}function b(e){return{name:`gallery`,params:{gid:e.gid,token:e.token}}}function x(){t.value=!t.value,t.value||(r.value=!1,n.value=[])}async function S(e){if(m.value){$.info(`云端收藏夹里的条目不能改本地标记号,请选中一个本地收藏夹`);return}d.value=!0;try{for(let t of _.value)await If(Ef.value,t.gid,e);a.value=!1,$.success(`已把 ${_.value.length} 项标记号改为 ${e<0?`取消收藏`:e}`)}finally{d.value=!1}}function C(e){return{key:`fav:${e.gid}`,gid:e.gid,token:e.token,title:e.title,thumbUrl:e.thumbUrl,postedAt:e.addedAt,pageCount:e.pageCount}}function w(){if(m.value){$.info(`云端收藏夹里的条目不能更新本地标记号,请选中一个本地收藏夹`);return}p.value=_.value.map(C),a.value=!1,f.value=!0}async function T(){d.value=!0;try{for(let e of _.value)await Ff(Ef.value,e.gid);n.value=[],l.value=!1,$.success(`已从收藏夹移除`)}finally{d.value=!1}}async function E(){d.value=!0;try{let e=0;for(let t of _.value)t.slot>=0||(await If(Ef.value,t.gid,0),e+=1);$.success(e===0?`选中项都已在云端收藏里`:`已收藏 ${e} 项到云端槽位 0`)}finally{d.value=!1}}async function D(){await Nf(Ef.value),c.value=!1,$.info(`收藏夹已删除`)}async function ee(){s.value.trim()!==``&&(await Mf(s.value),s.value=``)}async function te(){d.value=!0;let e=0;try{for(let t of _.value)await Z(`playlist.add`,{body:{gid:t.gid,token:t.token,title:t.title,thumbUrl:t.thumbUrl,pageCount:t.pageCount,resolution:null}})!==void 0&&(e+=1);$.success(`已把 ${e} 个画廊加入播放列表`)}catch(e){$.error(Q(e))}finally{d.value=!1}}async function ne(e){u.value=!1,d.value=!0;let t=0,n=0,r=``;try{for(let i of _.value)try{await Z(`downloads.create`,{body:{gid:i.gid,token:i.token,resolution:e}}),t+=1}catch(e){n+=1,r=Q(e)}}finally{d.value=!1}if(n===0){$.success(`已把 ${t} 个画廊加入下载队列(${e})`);return}if(t>0){$.info(`${t} 个已加入队列,${n} 个没排上:${r}`);return}$.error(`${n} 个都没排上:${r}`)}return Jn(Ef,()=>{n.value=[],Af()}),Vr(async()=>{await kf(),await Af()}),(e,_)=>(B(),V(`div`,Z_,[H(`header`,Q_,[_[25]||=H(`h2`,null,`收藏`,-1),H(`div`,$_,[_[24]||=H(`span`,{class:`muted`},`收藏夹:`,-1),H(`button`,{class:`folder`,disabled:d.value,onClick:_[0]||=e=>o.value=!o.value},[W(j(v(F(Ef)))+` `,1),_[20]||=H(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`path`,{d:`M4 6l4 4 4-4`})],-1)],8,ev),o.value?(B(),V(`div`,tv,[_[22]||=H(`div`,{class:`group-title muted`},`本地收藏夹`,-1),(B(!0),V(z,null,ti(F(Cf),e=>(B(),V(`button`,{key:e.id,class:A({on:F(Ef)===e.id}),onClick:t=>{Ef.value=e.id,o.value=!1}},[W(j(e.name)+` `,1),H(`span`,rv,`(`+j(e.count)+`)`,1)],10,nv))),128)),H(`div`,iv,[_[21]||=W(` 云端收藏夹 `,-1),F(Tf)===null?G(``,!0):(B(),V(`span`,av,`· `+j(F(Tf)),1))]),(B(!0),V(z,null,ti(F(wf),e=>(B(),V(`button`,{key:e.slot,class:A({on:F(Ef)===`cloud:${e.slot}`}),onClick:t=>{Ef.value=`cloud:${e.slot}`,o.value=!1}},[W(j(e.name)+` `,1),H(`span`,sv,`(`+j(e.count)+`)`,1)],10,ov))),128)),F(wf).length===0?(B(),V(`p`,cv,` 没有可显示的云端收藏夹 `)):G(``,!0),_[23]||=H(`div`,{class:`divider`},null,-1),H(`div`,lv,[L(H(`input`,{"onUpdate:modelValue":_[1]||=e=>s.value=e,placeholder:`新收藏夹名称`,onKeyup:Ds(ee,[`enter`])},null,544),[[q,s.value]]),H(`button`,{disabled:d.value,onClick:ee},`+ 新建本地收藏夹`,8,uv)]),m.value?G(``,!0):(B(),V(`button`,{key:1,class:`danger`,disabled:d.value||F(Cf).length<=1,onClick:_[2]||=e=>{o.value=!1,c.value=!0}},` 删除当前收藏夹 `,8,dv))])):G(``,!0)]),H(`span`,fv,j(h.value.length)+` 项`,1)]),h.value.length===0?(B(),V(`p`,pv,j(m.value?`这个云端收藏夹里没有内容,或需要登录才能读取。`:`这个收藏夹还是空的。在画廊详情页点「加入收藏」,或在本地画廊里批量收藏。`),1)):(B(),Ea(Dm,{key:1,groups:g.value,to:b,mode:t.value?`select`:`browse`,selected:n.value,columns:F(bf),"thumb-height":200,"onUpdate:selected":_[3]||=e=>n.value=e},null,8,[`groups`,`mode`,`selected`,`columns`])),h.value.length>0?(B(),V(`div`,mv,[r.value?(B(),V(`div`,hv,[H(`button`,{title:`收藏选中项到云端`,disabled:d.value||m.value,onClick:E},[..._[26]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20s-7-4.6-7-9.5A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.5C19 15.4 12 20 12 20z`})],-1),H(`span`,{class:`label`},`收藏选中项`,-1)]],8,gv),H(`button`,{title:`取消收藏选中项`,disabled:d.value||m.value,onClick:_[4]||=e=>l.value=!0},[..._[27]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20s-7-4.6-7-9.5A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.5C19 15.4 12 20 12 20z`}),H(`path`,{d:`M4 4l16 16`})],-1),H(`span`,{class:`label`},`取消收藏`,-1)]],8,_v),H(`div`,vv,[H(`button`,{title:`更新标记号:把收藏挪到该画廊的最新版本`,disabled:d.value||m.value,onClick:w},[..._[28]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 20V9M8 13.5l4-4 4 4`}),H(`path`,{d:`M5 5h14`})],-1),H(`span`,{class:`label`},`更新标记号`,-1)]],8,yv)]),H(`div`,bv,[H(`button`,{title:`设置标记号:改这条收藏的云端槽位`,disabled:d.value||m.value,onClick:_[5]||=e=>a.value=!a.value},[..._[29]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 7h16M4 12h16M4 17h16`})],-1),H(`span`,{class:`label`},`设置标记号`,-1)]],8,xv),a.value?(B(),V(`div`,Sv,[H(`button`,{disabled:d.value,onClick:_[6]||=e=>S(-1)},`取消云端`,8,Cv),(B(),V(z,null,ti(10,e=>H(`button`,{key:e,disabled:d.value,onClick:t=>S(e-1)},j(e-1),9,wv)),64))])):G(``,!0)]),H(`button`,{title:`加入播放列表`,disabled:d.value,onClick:te},[..._[30]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M8 6l10 6-10 6z`}),H(`path`,{d:`M18 4v6M15 7h6`})],-1),H(`span`,{class:`label`},`加入播放列表`,-1)]],8,Tv),H(`button`,{title:`把选中项加入下载队列,归档分辨率二选一`,disabled:d.value||n.value.length===0,onClick:_[7]||=e=>u.value=!0},[..._[31]||=[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M12 4v10M8 10.5l4 4 4-4`}),H(`path`,{d:`M5 19h14`})],-1),H(`span`,{class:`label`},`下载选中项`,-1)]],8,Ev)])):G(``,!0),H(`div`,Dv,[H(`button`,{class:A([`rail-btn`,{on:t.value}]),title:t.value?`退出批量操作`:`批量操作`,onClick:_[8]||=e=>{x(),r.value=t.value}},[_[32]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 7h16M4 12h16M4 17h10`}),H(`path`,{d:`M17 15l2 2 3-4`})],-1),H(`span`,kv,j(t.value?`批量操作(已选 ${n.value.length})`:`批量操作`),1)],10,Ov),H(`div`,Av,[H(`button`,{class:`rail-btn`,title:`调整排列尺寸`,onClick:_[9]||=e=>i.value=!i.value},[_[33]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5`})],-1),H(`span`,jv,`每行 `+j(F(Sf)(F(bf))),1)]),i.value?(B(),V(`div`,Mv,[(B(!0),V(z,null,ti(F(xf),e=>(B(),V(`button`,{key:e,class:A({on:F(bf)===e}),onClick:t=>bf.value=e},j(e===0?`自动`:e),11,Nv))),128))])):G(``,!0)])])])):G(``,!0),U(fp,{modelValue:u.value,"onUpdate:modelValue":_[13]||=e=>u.value=e,title:`下载选中项`},{buttons:I(()=>[H(`button`,{disabled:d.value,onClick:_[10]||=e=>u.value=!1},`取消`,8,Pv),H(`button`,{disabled:d.value,onClick:_[11]||=e=>ne(`res`)},`重采样 res`,8,Fv),H(`button`,{disabled:d.value,onClick:_[12]||=e=>ne(`org`)},`原档 org`,8,Iv)]),default:I(()=>[H(`p`,null,`要把选中的 `+j(n.value.length)+` 个画廊加入下载队列吗?归档分辨率二选一。`,1),_[34]||=H(`p`,{class:`muted`},` 归档下载需要登录并消耗 GP。未登录时请到画廊详情页用逐页下载(游客可用)。 `,-1)]),_:1},8,[`modelValue`]),U(fp,{modelValue:l.value,"onUpdate:modelValue":_[15]||=e=>l.value=e,title:`取消收藏`},{buttons:I(()=>[H(`button`,{onClick:_[14]||=e=>l.value=!1},`取消`),H(`button`,{disabled:d.value,onClick:T},`确定`,8,Lv)]),default:I(()=>[H(`p`,null,`要把选中的 `+j(n.value.length)+` 项从当前收藏夹移除吗?`,1)]),_:1},8,[`modelValue`]),U(fp,{modelValue:c.value,"onUpdate:modelValue":_[17]||=e=>c.value=e,title:`删除收藏夹`},{buttons:I(()=>[H(`button`,{onClick:_[16]||=e=>c.value=!1},`取消`),H(`button`,{disabled:d.value,onClick:D},`删除`,8,Rv)]),default:I(()=>[H(`p`,null,`要删除「`+j(v(F(Ef)))+`」及其中的条目吗?无法恢复。`,1)]),_:1},8,[`modelValue`]),U(Qm,{open:f.value,"onUpdate:open":_[18]||=e=>f.value=e,mode:`favorite`,"folder-id":F(Ef),targets:p.value,onMoved:_[19]||=e=>F(Af)()},null,8,[`open`,`folder-id`,`targets`])]))}}),[[`__scopeId`,`data-v-87b0c578`]]),Bv={class:`panel`},Vv={class:`head`},Hv={class:`progress`},Uv={class:`acts`},Wv=[`disabled`],Gv=[`disabled`],Kv=[`disabled`],qv={key:0,class:`muted empty`},Jv={key:1,class:`rows`},Yv=[`disabled`,`onClick`],Xv={class:`info`},Zv={class:`title`},Qv={class:`sub muted`},$v={class:`count`},ey=[`disabled`,`onClick`],ty=vf(R({__name:`PlaylistPage`,setup(e){let t=Ol(),n=P(!1),r=P(!1),i=K(()=>Vf.value===-1?0:Vf.value+1);function a(e,t){if(e.key===Bf.value)return`current`;let n=Vf.value;return n!==-1&&t<n?`done`:`todo`}async function o(e){r.value=!0,await qf(e.key),r.value=!1,t.push({name:`gallery-player`,params:{gid:e.gid,token:e.token},query:e.page>1?{page:String(e.page)}:{}})}async function s(){let e=zf.value[0];e!==void 0&&await o({...e,page:1})}async function c(){let e=zf.value[Vf.value]??zf.value[0];e!==void 0&&await o(e)}async function l(){await Xf(),n.value=!1}return Vr(()=>{Gf()}),(e,t)=>(B(),V(`div`,Bv,[H(`header`,Vv,[H(`div`,Hv,[H(`span`,null,` 画廊进度 `+j(i.value)+`/`+j(F(zf).length),1),t[3]||=H(`span`,{class:`muted`},`·`,-1),H(`span`,null,` 播放进度 `+j(F(Uf))+`/`+j(F(Hf))+` 页 `,1)]),H(`div`,Uv,[H(`button`,{disabled:r.value||F(zf).length===0,onClick:c},` 播放 `,8,Wv),H(`button`,{disabled:r.value||F(zf).length===0,onClick:s},` 从头播放 `,8,Gv),H(`button`,{class:`danger`,disabled:r.value||F(zf).length===0,onClick:t[0]||=e=>n.value=!0},` 清空播放列表 `,8,Kv)])]),F(zf).length===0?(B(),V(`p`,qv,` 播放列表是空的。在画廊详情页点「加入播放列表」,或到本地画廊里多选后加入。 `)):(B(),V(`ul`,Jv,[(B(!0),V(z,null,ti(F(zf),(e,n)=>(B(),V(`li`,{key:e.key,class:A([`row`,a(e,n)])},[H(`button`,{class:`open`,disabled:r.value,onClick:t=>o(e)},[U(sm,{class:`cover`,src:e.thumbUrl,alt:e.title,ratio:`2 / 3`},null,8,[`src`,`alt`]),H(`span`,Xv,[H(`span`,Zv,j(e.title),1),H(`span`,Qv,j(e.pageCount)+` 页 · `+j(e.resolution===null?`网络`:`本地 ${e.resolution}`)+` · `+j(a(e,n)===`done`?`已播放`:a(e,n)===`current`?`正在播放`:`未播放`),1)]),H(`span`,$v,j(e.page)+`/`+j(e.pageCount),1)],8,Yv),H(`button`,{class:`drop`,title:`从播放列表移除`,disabled:r.value,onClick:t=>F(Yf)(e.key)},[...t[4]||=[H(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`path`,{d:`M4 4l8 8M12 4l-8 8`})],-1)]],8,ey)],2))),128))])),U(fp,{modelValue:n.value,"onUpdate:modelValue":t[2]||=e=>n.value=e,title:`清空播放列表`},{buttons:I(()=>[H(`button`,{onClick:t[1]||=e=>n.value=!1},`取消`),H(`button`,{onClick:l},`确定`)]),default:I(()=>[H(`p`,null,`要清空播放列表吗?共 `+j(F(zf).length)+` 个画廊,清空后无法恢复。`,1)]),_:1},8,[`modelValue`])]))}}),[[`__scopeId`,`data-v-f0b83524`]]),ny=[`log.enabled`,`log.directory`,`ui.cachedGalleries`];function ry(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function iy(e,t=ny){return t.filter(t=>ry(e,t)===void 0)}function ay(e,t){for(let n of t){let t=n.split(`.`),r=t.pop();if(r===void 0)continue;let i=e;for(let e of t){if(typeof i!=`object`||!i||Array.isArray(i)){i=null;break}i=i[e]}typeof i==`object`&&i&&!Array.isArray(i)&&delete i[r]}return e}var oy={key:0,class:`box`},sy=[`open`],cy={class:`grid`},ly={class:`hint muted`},uy={key:0,class:`err`},dy={class:`grid`},fy={key:0,class:`err`},py={key:0,class:`err`},my=[`open`],hy={class:`grid`},gy={class:`muted hint`},_y={key:0,class:`err`},vy={class:`row`},yy=[`disabled`],by=[`open`],xy={class:`rows`},Sy={class:`row-line`},Cy={class:`muted`},wy={class:`row-line`},Ty={class:`muted`},Ey=[`disabled`],Dy={class:`muted hint`},Oy=[`open`],ky={class:`grid`},Ay={key:0,class:`err`},jy={key:0,class:`err`},My={key:0,class:`err`},Ny={key:0,class:`err`},Py=[`open`],Fy={class:`grid`},Iy={class:`muted hint`},Ly={key:0,class:`err`},Ry={class:`row`},zy=[`disabled`],By=[`disabled`],Vy=[`open`],Hy={class:`grid`},Uy={key:0,class:`err`},Wy=[`open`],Gy={class:`grid`},Ky={key:0,class:`err`},qy=[`open`],Jy={class:`grid`},Yy=[`placeholder`],Xy={class:`muted hint`},Zy={key:0,class:`err`},Qy={key:0,class:`notice`},$y={class:`actions`},eb=[`disabled`],tb=[`disabled`],nb={class:`muted`},rb={class:`row keep`},ib=[`disabled`],ab=[`disabled`],ob=[`disabled`],sb=[`disabled`],cb=[`disabled`],lb={key:1,class:`muted`},ub=vf(R({__name:`ConfigPanel`,setup(e){let t=P(null),n=P({}),r=P([]),i=P(!1),a=P(!1),o=P([]),s=P(null),c=K(()=>{let e=s.value?.perGallery??24576,n=t.value?.ui.cachedGalleries??0;return n<=0?`不缓存`:`约 ${l(e*n)}`});function l(e){let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(r<=1?0:1)} ${t[r]}`}async function u(){a.value=!0;try{s.value=await Z(`galleries.detailCache.clear`),$.info(`详情缓存已清空`)}catch(e){$.error(Q(e))}finally{a.value=!1}}async function d(){try{s.value=await Z(`galleries.detailCache`)}catch{}}let f=P(null),p=P(!1),m=P(30);async function h(){try{f.value=await Z(`storage.stats`)}catch{}}async function g(e){if(!Number.isFinite(e)||e<0){$.error(`天数要是 0 或正整数`);return}a.value=!0;try{let t=await Z(`storage.cleanup`,{body:{days:e}});f.value=t.stats,p.value=!1,$.success(t.removed===0?`没有超过 ${e} 天没用过的缓存`:`已清理 ${t.removed} 条缓存,腾出 ${l(t.bytes)}`)}catch(e){$.error(Q(e))}finally{a.value=!1}}let _=P({network:!1,browse:!1,player:!1,translate:!1,safety:!1,download:!1,log:!1,storage:!1}),v=kl();function y(e,t){_.value[e]=t.target?.open??!1}function b(e){return e.startsWith(`network.`)?`network`:e.startsWith(`download.`)?`download`:e.startsWith(`viewer.`)?`player`:e.startsWith(`translate.`)?`translate`:e.startsWith(`safety.`)?`safety`:e.startsWith(`log.`)?`log`:`browse`}function x(){let e={..._.value};for(let t of r.value)e[b(t.path)]=!0;_.value=e}async function S(){try{let e=await Z(`config.get`);t.value=JSON.parse(JSON.stringify(e.setting)),n.value={...e.origins},o.value=iy(e.setting)}catch(e){$.error(Q(e))}}function C(e){return r.value.find(t=>t.path===e)?.message??``}async function w(){if(t.value!==null){i.value=!0,r.value=[];try{let e=t.value,r=await Z(`config.patch`,{body:ay({locale:e.locale,preferredSite:e.preferredSite,network:e.network,viewer:e.viewer,translate:e.translate,safety:e.safety,download:e.download,log:e.log,ui:e.ui},o.value)});t.value=JSON.parse(JSON.stringify(r.setting)),n.value={...r.origins},o.value=iy(r.setting),$.success(`配置已保存`),await p_()}catch(e){e instanceof Dd?(r.value=[...e.issues],x(),e.issues.length===0&&$.error(Q(e))):$.error(Q(e))}finally{i.value=!1}}}function T(e){if(e===null||e<=0)return`—`;let t=new Date(e*1e3);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`}async function E(){a.value=!0;try{await Zp()}finally{a.value=!1}}async function D(){a.value=!0;try{await Qp()}finally{a.value=!1}}function ee(){let e=v.query.module;typeof e==`string`&&e in _.value&&(_.value={..._.value,[e]:!0})}return Vr(async()=>{await S(),ee(),await Yp(),await Qg(),await h(),await d()}),(e,r)=>t.value?(B(),V(`section`,oy,[H(`details`,{class:`module`,open:_.value.network,onToggle:r[7]||=e=>y(`network`,e)},[r[54]||=H(`summary`,null,[H(`h2`,null,`网络`)],-1),H(`div`,cy,[H(`div`,null,[r[44]||=H(`label`,null,`请求间隔(毫秒)`,-1),L(H(`input`,{"onUpdate:modelValue":r[0]||=e=>t.value.network.requestIntervalMs=e,type:`number`,min:`1000`,max:`60000`},null,512),[[q,t.value.network.requestIntervalMs,void 0,{number:!0}]]),H(`p`,ly,j(n.value[`network.requestIntervalMs`]??`default`),1),C(`network.requestIntervalMs`)?(B(),V(`p`,uy,j(C(`network.requestIntervalMs`)),1)):G(``,!0)]),H(`div`,null,[r[45]||=H(`label`,null,`单次最多连续请求`,-1),L(H(`input`,{"onUpdate:modelValue":r[1]||=e=>t.value.network.maxSequentialRequests=e,type:`number`,min:`1`,max:`25`},null,512),[[q,t.value.network.maxSequentialRequests,void 0,{number:!0}]]),r[46]||=H(`p`,{class:`hint muted`},` 一批最多连发几次,发满之后等「请求间隔」再发下一批(上游建议 4~5 次) `,-1)]),H(`div`,null,[r[47]||=H(`label`,null,`超时(毫秒)`,-1),L(H(`input`,{"onUpdate:modelValue":r[2]||=e=>t.value.network.requestTimeoutMs=e,type:`number`,min:`1000`,max:`300000`},null,512),[[q,t.value.network.requestTimeoutMs,void 0,{number:!0}]])])]),r[55]||=H(`h3`,null,`代理`,-1),r[56]||=H(`p`,{class:`muted`},`未配置代理时上游不可达。SOCKS5 暂不支持。`,-1),H(`div`,dy,[H(`div`,null,[r[49]||=H(`label`,null,`启用`,-1),L(H(`select`,{"onUpdate:modelValue":r[3]||=e=>t.value.network.proxy.enabled=e},[...r[48]||=[H(`option`,{value:!1},`否`,-1),H(`option`,{value:!0},`是`,-1)]],512),[[ys,t.value.network.proxy.enabled]])]),H(`div`,null,[r[51]||=H(`label`,null,`协议`,-1),L(H(`select`,{"onUpdate:modelValue":r[4]||=e=>t.value.network.proxy.protocol=e},[...r[50]||=[H(`option`,{value:`http`},`http`,-1),H(`option`,{value:`socks5`},`socks5`,-1)]],512),[[ys,t.value.network.proxy.protocol]])]),H(`div`,null,[r[52]||=H(`label`,null,`主机`,-1),L(H(`input`,{"onUpdate:modelValue":r[5]||=e=>t.value.network.proxy.host=e},null,512),[[q,t.value.network.proxy.host]]),C(`network.proxy.host`)?(B(),V(`p`,fy,j(C(`network.proxy.host`)),1)):G(``,!0)]),H(`div`,null,[r[53]||=H(`label`,null,`端口`,-1),L(H(`input`,{"onUpdate:modelValue":r[6]||=e=>t.value.network.proxy.port=e,type:`number`,min:`1`,max:`65535`},null,512),[[q,t.value.network.proxy.port,void 0,{number:!0}]]),C(`network.proxy.port`)?(B(),V(`p`,py,j(C(`network.proxy.port`)),1)):G(``,!0)])])],40,sy),H(`details`,{class:`module`,open:_.value.browse,onToggle:r[13]||=e=>y(`browse`,e)},[r[63]||=H(`summary`,null,[H(`h2`,null,`浏览`)],-1),H(`div`,hy,[H(`div`,null,[r[58]||=H(`label`,null,`默认站点`,-1),L(H(`select`,{"onUpdate:modelValue":r[8]||=e=>t.value.preferredSite=e},[...r[57]||=[H(`option`,{value:`e-hentai`},`外站`,-1),H(`option`,{value:`exhentai`},`里站`,-1)]],512),[[ys,t.value.preferredSite]])]),H(`div`,null,[r[59]||=H(`label`,null,`缩略图尺寸`,-1),L(H(`input`,{"onUpdate:modelValue":r[9]||=e=>t.value.ui.thumbnailSize=e,type:`number`,min:`100`,max:`1000`},null,512),[[q,t.value.ui.thumbnailSize,void 0,{number:!0}]])]),H(`div`,null,[r[60]||=H(`label`,null,`每页条目数`,-1),L(H(`input`,{"onUpdate:modelValue":r[10]||=e=>t.value.ui.pageSize=e,type:`number`,min:`5`,max:`100`},null,512),[[q,t.value.ui.pageSize,void 0,{number:!0}]])]),H(`div`,null,[r[61]||=H(`label`,null,`语言标签`,-1),L(H(`input`,{"onUpdate:modelValue":r[11]||=e=>t.value.locale=e},null,512),[[q,t.value.locale]])]),H(`div`,null,[r[62]||=H(`label`,null,`最多缓存画廊`,-1),L(H(`input`,{"onUpdate:modelValue":r[12]||=e=>t.value.ui.cachedGalleries=e,type:`number`,min:`0`,max:`500`},null,512),[[q,t.value.ui.cachedGalleries,void 0,{number:!0}]]),H(`p`,gy,` 详情页的信息、封面与缩略图缓存在内存里,再次进入同一画廊就不再请求上游。当前: `+j(c.value)+`(按每个画廊 `+j(l(s.value?.perGallery??24576))+` 估算),填 0 表示不缓存。 `,1),C(`ui.cachedGalleries`)?(B(),V(`p`,_y,j(C(`ui.cachedGalleries`)),1)):G(``,!0),H(`div`,vy,[H(`button`,{disabled:a.value,onClick:u},` 清空详情缓存(当前 `+j(s.value?.entries??0)+` 个) `,9,yy)])])])],40,my),H(`details`,{class:`module`,open:_.value.storage,onToggle:r[15]||=e=>y(`storage`,e)},[r[66]||=H(`summary`,null,[H(`h2`,null,`储存空间`)],-1),H(`div`,xy,[H(`div`,Sy,[r[64]||=H(`span`,{class:`muted`},`本地画廊`,-1),H(`strong`,null,j(l(f.value?.libraryBytes??0)),1),H(`span`,Cy,j(f.value?.libraryGalleries??0)+` 个`,1)]),H(`div`,wy,[r[65]||=H(`span`,{class:`muted`},`画廊缓存`,-1),H(`strong`,null,j(l(f.value?.cacheBytes??0)),1),H(`span`,Ty,j(f.value?.cacheEntries??0)+` 条`,1),H(`button`,{disabled:a.value,onClick:r[14]||=e=>p.value=!0},`清理缓存`,8,Ey)])]),H(`p`,Dy,` 画廊缓存是详情页那份(标签、评分、预览图),落盘后重启不丢,进过的画廊不再问上游; 本地的画廊文件不在这里清理。最近使用:`+j(f.value?.cacheNewestAt==null?`—`:new Date(f.value.cacheNewestAt*1e3).toLocaleString()),1)],40,by),H(`details`,{class:`module`,open:_.value.player,onToggle:r[24]||=e=>y(`player`,e)},[r[80]||=H(`summary`,null,[H(`h2`,null,`播放器`)],-1),H(`div`,ky,[H(`div`,null,[r[68]||=H(`label`,null,`查看模式`,-1),L(H(`select`,{"onUpdate:modelValue":r[16]||=e=>t.value.viewer.mode=e},[...r[67]||=[H(`option`,{value:`mpv`},`连续`,-1),H(`option`,{value:`single`},`单页`,-1)]],512),[[ys,t.value.viewer.mode]])]),H(`div`,null,[r[70]||=H(`label`,null,`图片质量`,-1),L(H(`select`,{"onUpdate:modelValue":r[17]||=e=>t.value.viewer.imageQuality=e},[...r[69]||=[H(`option`,{value:`org`},`原图`,-1),H(`option`,{value:`res`},`重采样`,-1)]],512),[[ys,t.value.viewer.imageQuality]])]),H(`div`,null,[r[71]||=H(`label`,null,`向后预加载张数`,-1),L(H(`input`,{"onUpdate:modelValue":r[18]||=e=>t.value.viewer.preloadCount=e,type:`number`,min:`0`,max:`20`},null,512),[[q,t.value.viewer.preloadCount,void 0,{number:!0}]]),C(`viewer.preloadCount`)?(B(),V(`p`,Ay,j(C(`viewer.preloadCount`)),1)):G(``,!0)]),H(`div`,null,[r[72]||=H(`label`,null,`图片缓存上限(MB)`,-1),L(H(`input`,{"onUpdate:modelValue":r[19]||=e=>t.value.viewer.maxCacheMb=e,type:`number`,min:`64`,max:`8192`},null,512),[[q,t.value.viewer.maxCacheMb,void 0,{number:!0}]]),r[73]||=H(`p`,{class:`muted hint`},`超出后按最早使用淘汰`,-1),C(`viewer.maxCacheMb`)?(B(),V(`p`,jy,j(C(`viewer.maxCacheMb`)),1)):G(``,!0)]),H(`div`,null,[r[74]||=H(`label`,null,`同时加载张数`,-1),L(H(`input`,{"onUpdate:modelValue":r[20]||=e=>t.value.viewer.maxConcurrentLoads=e,type:`number`,min:`1`,max:`8`},null,512),[[q,t.value.viewer.maxConcurrentLoads,void 0,{number:!0}]]),C(`viewer.maxConcurrentLoads`)?(B(),V(`p`,My,j(C(`viewer.maxConcurrentLoads`)),1)):G(``,!0)]),H(`div`,null,[r[76]||=H(`label`,null,`自动播放`,-1),L(H(`select`,{"onUpdate:modelValue":r[21]||=e=>t.value.viewer.autoplay.enabled=e},[...r[75]||=[H(`option`,{value:!1},`关闭`,-1),H(`option`,{value:!0},`开启`,-1)]],512),[[ys,t.value.viewer.autoplay.enabled]])]),H(`div`,null,[r[77]||=H(`label`,null,`自动播放间隔(秒)`,-1),L(H(`input`,{"onUpdate:modelValue":r[22]||=e=>t.value.viewer.autoplay.intervalSeconds=e,type:`number`,min:`1`,max:`120`},null,512),[[q,t.value.viewer.autoplay.intervalSeconds,void 0,{number:!0}]]),C(`viewer.autoplay.intervalSeconds`)?(B(),V(`p`,Ny,j(C(`viewer.autoplay.intervalSeconds`)),1)):G(``,!0)]),H(`div`,null,[r[79]||=H(`label`,null,`播完循环`,-1),L(H(`select`,{"onUpdate:modelValue":r[23]||=e=>t.value.viewer.autoplay.loop=e},[...r[78]||=[H(`option`,{value:!1},`不循环`,-1),H(`option`,{value:!0},`循环`,-1)]],512),[[ys,t.value.viewer.autoplay.loop]])])])],40,Oy),H(`details`,{class:`module`,open:_.value.translate,onToggle:r[26]||=e=>y(`translate`,e)},[r[86]||=H(`summary`,null,[H(`h2`,null,`翻译`)],-1),H(`div`,Fy,[H(`div`,null,[r[82]||=H(`label`,null,`开启标签翻译`,-1),L(H(`select`,{"onUpdate:modelValue":r[25]||=e=>t.value.translate.tags=e},[...r[81]||=[H(`option`,{value:!1},`关闭`,-1),H(`option`,{value:!0},`开启`,-1)]],512),[[ys,t.value.translate.tags]]),r[83]||=H(`p`,{class:`muted hint`},` 把类别与标签翻成中文,例如 Non-H → 无色情内容、male:femboy → 男性:男娘 `,-1)]),H(`div`,null,[r[84]||=H(`label`,null,`标签翻译词库`,-1),H(`p`,Iy,[F(Wp)?.installed===!0?(B(),V(z,{key:0},[W(` 已装 `+j(F(Wp).version)+`:`+j(F(Wp).namespaceCount)+` 个命名空间、`+j(F(Wp).tagCount)+` 条标签,`+j(T(F(Wp).updatedAt))+`下载 `,1)],64)):(B(),V(z,{key:1},[W(`未装,现在只用内置的常用标签表`)],64))]),F(Wp)!==null&&F(Wp).error!==null?(B(),V(`p`,Ly,j(F(Wp).error),1)):G(``,!0),H(`div`,Ry,[H(`button`,{disabled:a.value,onClick:E},j(a.value?`正在更新…`:`下载/更新词库`),9,zy),H(`button`,{disabled:a.value||F(Wp)?.installed!==!0,onClick:D},` 删除词库 `,8,By)]),r[85]||=H(`p`,{class:`muted hint`},` 词库来自 EhTagTranslation/Database 的发布包,按需下载到本机,程序本身不分发这些数据(数据遵循 CC BY-NC-SA 3.0)。没装词库时画师、角色、原作名不会被翻译。 `,-1)])])],40,Py),H(`details`,{class:`module`,open:_.value.safety,onToggle:r[29]||=e=>y(`safety`,e)},[r[91]||=H(`summary`,null,[H(`h2`,null,`避险`)],-1),H(`div`,Hy,[H(`div`,null,[r[88]||=H(`label`,null,`进入页面时提示`,-1),L(H(`select`,{"onUpdate:modelValue":r[27]||=e=>t.value.safety.hintEnabled=e},[...r[87]||=[H(`option`,{value:!0},`开启`,-1),H(`option`,{value:!1},`关闭`,-1)]],512),[[ys,t.value.safety.hintEnabled]])]),H(`div`,null,[r[89]||=H(`label`,null,`避险地点(网页地址或 file:// 本地地址)`,-1),L(H(`input`,{"onUpdate:modelValue":r[28]||=e=>t.value.safety.url=e,placeholder:`about:blank`},null,512),[[q,t.value.safety.url]]),r[90]||=H(`p`,{class:`muted hint`},` 按 Ctrl + 空格 会把当前页面整个替换成这个地址,后退键回不到原页面 `,-1),C(`safety.url`)?(B(),V(`p`,Uy,j(C(`safety.url`)),1)):G(``,!0)])])],40,Vy),H(`details`,{class:`module`,open:_.value.download,onToggle:r[33]||=e=>y(`download`,e)},[r[96]||=H(`summary`,null,[H(`h2`,null,`下载`)],-1),H(`div`,Gy,[H(`div`,null,[r[92]||=H(`label`,null,`目录(留空表示未设置,需绝对路径)`,-1),L(H(`input`,{"onUpdate:modelValue":r[30]||=e=>t.value.download.directory=e},null,512),[[q,t.value.download.directory]]),C(`download.directory`)?(B(),V(`p`,Ky,j(C(`download.directory`)),1)):G(``,!0)]),H(`div`,null,[r[94]||=H(`label`,null,`保留归档`,-1),L(H(`select`,{"onUpdate:modelValue":r[31]||=e=>t.value.download.keepArchive=e},[...r[93]||=[H(`option`,{value:!0},`是`,-1),H(`option`,{value:!1},`否`,-1)]],512),[[ys,t.value.download.keepArchive]])]),H(`div`,null,[r[95]||=H(`label`,null,`并发数`,-1),L(H(`input`,{"onUpdate:modelValue":r[32]||=e=>t.value.download.concurrency=e,type:`number`,min:`1`,max:`8`},null,512),[[q,t.value.download.concurrency,void 0,{number:!0}]])])])],40,Wy),H(`details`,{class:`module`,open:_.value.log,onToggle:r[36]||=e=>y(`log`,e)},[r[100]||=H(`summary`,null,[H(`h2`,null,`日志`)],-1),H(`div`,Jy,[H(`div`,null,[r[98]||=H(`label`,null,`写入日志文件`,-1),L(H(`select`,{"onUpdate:modelValue":r[34]||=e=>t.value.log.enabled=e},[...r[97]||=[H(`option`,{value:!0},`开启`,-1),H(`option`,{value:!1},`关闭(只在控制台与「服务」页显示)`,-1)]],512),[[ys,t.value.log.enabled]])]),H(`div`,null,[r[99]||=H(`label`,null,`日志目录(留空用默认目录)`,-1),L(H(`input`,{"onUpdate:modelValue":r[35]||=e=>t.value.log.directory=e,placeholder:F(Jg)},null,8,Yy),[[q,t.value.log.directory]]),H(`p`,Xy,` 默认 `+j(F(Jg))+`;当前生效:`+j(F(qg))+`。支持绝对路径与 ~ 开头,按天一个文件(ehbrowser-YYYY-MM-DD.log),改完立即生效。 `,1),C(`log.directory`)?(B(),V(`p`,Zy,j(C(`log.directory`)),1)):G(``,!0)])])],40,qy),o.value.length>0?(B(),V(`p`,Qy,[W(` 服务端不认识这些设置项:`+j(o.value.join(`、`))+`。 多半是服务端还在跑改动之前启动的那个进程(界面已经更新、配置结构还是旧的)。 `,1),r[101]||=H(`strong`,null,`重启 EhBrowser 服务`,-1),r[102]||=W(`(Ctrl+C 后重新 npm start)即可;这次保存会自动跳过这些项,其余设置照常保存。 `,-1)])):G(``,!0),H(`div`,$y,[H(`button`,{disabled:i.value,onClick:w},j(i.value?`保存中…`:`保存`),9,eb),H(`button`,{disabled:i.value,onClick:S},`重置`,8,tb)]),U(fp,{modelValue:p.value,"onUpdate:modelValue":r[43]||=e=>p.value=e,title:`清理画廊缓存`},{buttons:I(()=>[H(`button`,{disabled:a.value,onClick:r[39]||=e=>p.value=!1},`取消`,8,ab),H(`button`,{disabled:a.value,onClick:r[40]||=e=>g(1)},`一天之前`,8,ob),H(`button`,{disabled:a.value,onClick:r[41]||=e=>g(7)},`七天之前`,8,sb),H(`button`,{disabled:a.value,onClick:r[42]||=e=>g(30)},`一个月之前`,8,cb)]),default:I(()=>[r[104]||=H(`p`,null,`只保留最近用过的画廊缓存,更早的删掉。本地画廊的文件不受影响。`,-1),H(`p`,nb,` 当前缓存 `+j(l(f.value?.cacheBytes??0))+`(`+j(f.value?.cacheEntries??0)+` 条) `,1),H(`div`,rb,[r[103]||=H(`label`,{for:`cleanup-days`},`自定义天数`,-1),L(H(`input`,{id:`cleanup-days`,"onUpdate:modelValue":r[37]||=e=>m.value=e,type:`number`,min:`0`},null,512),[[q,m.value,void 0,{number:!0}]]),H(`button`,{disabled:a.value,onClick:r[38]||=e=>g(m.value)},j(m.value)+` 天之前 `,9,ib)])]),_:1},8,[`modelValue`])])):(B(),V(`p`,lb,`读取配置中…`))}}),[[`__scopeId`,`data-v-124c9b62`]]),db={class:`panel page`},fb={class:`head`},pb={key:0,class:`muted`},mb=[`disabled`],hb={key:0,class:`muted`},gb={key:1,class:`rows`},_b={class:`main`},vb={class:`line`},yb={class:`name`},bb={class:`muted tag`},xb={class:`bar-row`},Sb=[`aria-valuenow`,`aria-label`],Cb={class:`pct`},wb={class:`speed muted`},Tb=[`disabled`,`onClick`],Eb=[`disabled`,`onClick`],Db=[`disabled`,`onClick`],Ob={key:0,class:`err`},kb=vf(R({__name:`DownloadsPanel`,setup(e){let t=P(!1),n=P(new Map),r=K(()=>Nd.value.filter(e=>e.status===`queued`||e.status===`running`)),i=K(()=>Nd.value.filter(e=>e.status!==`queued`&&e.status!==`running`));async function a(){await Id();try{let e=await Z(`library.list`);n.value=new Map(e.map(e=>[e.gid,e]))}catch{}}async function o(e){t.value=!0;try{await Z(`downloads.retry`,{params:{taskId:e.id}}),await a(),$.info(`已重新排队`)}catch(e){$.error(Q(e))}finally{t.value=!1}}async function s(e){t.value=!0;try{await Z(`downloads.cancel`,{params:{taskId:e.id}}),await a(),$.info(`任务已取消`)}catch(e){$.error(Q(e))}finally{t.value=!1}}function c(e){return e.progress===null?l(e.bytesDone):`${(e.progress*100).toFixed(1)}%`}function l(e){if(e===null)return`—`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(r===0?0:1)} ${t[r]}`}function u(e){return e.speedBps===null?``:`${l(e.speedBps)}/s`}function d(e){return n.value.get(e.gid)?.summary?.thumbUrl??``}function f(e){return e.progress===null?0:Math.max(0,Math.min(1,e.progress))}function p(e){switch(e.status){case`queued`:return`排队中`;case`running`:return`下载中`;case`completed`:return`已完成`;case`cancelled`:return`已取消`;default:return`失败`}}return Vr(()=>{a()}),(e,n)=>(B(),V(`section`,db,[H(`header`,fb,[H(`h2`,null,[n[0]||=W(` 下载`,-1),r.value.length>0?(B(),V(`span`,pb,` · `+j(r.value.length)+` 个进行中`,1)):G(``,!0)]),H(`button`,{class:`plain`,disabled:t.value,onClick:a},`刷新`,8,mb)]),F(Nd).length===0?(B(),V(`p`,hb,` 暂无任务。可在画廊详情页或播放器里点下载,落盘后本地画廊里就能看到。 `)):(B(),V(`ul`,gb,[(B(!0),V(z,null,ti([...r.value,...i.value],e=>(B(),V(`li`,{key:e.id,class:`row`},[U(sm,{class:`cover`,src:d(e),alt:e.title||`#${e.gid}`,ratio:`2 / 3`},null,8,[`src`,`alt`]),H(`div`,_b,[H(`div`,vb,[H(`span`,yb,j(e.title||`#${e.gid}`),1),H(`span`,bb,j(e.resolution)+` · `+j(p(e)),1)]),H(`div`,xb,[H(`div`,{class:`bar`,role:`progressbar`,"aria-valuenow":Math.round(f(e)*100),"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-label":`${e.title||e.gid} 下载进度`},[H(`i`,{style:ye({width:`${f(e)*100}%`})},null,4)],8,Sb),H(`span`,Cb,[e.pageCount===null?(B(),V(z,{key:1},[W(j(c(e)),1)],64)):(B(),V(z,{key:0},[W(` 第 `+j(e.pagesDone)+`/`+j(e.pageCount)+` 页 `,1)],64))]),H(`span`,wb,j(u(e)),1),e.status===`queued`||e.status===`running`?(B(),V(`button`,{key:0,disabled:t.value,onClick:t=>s(e)},` 取消 `,8,Tb)):(B(),V(z,{key:1},[e.status===`failed`||e.status===`cancelled`?(B(),V(`button`,{key:0,disabled:t.value,title:`重新排队,复用同一条任务`,onClick:t=>o(e)},` 重试 `,8,Eb)):G(``,!0),H(`button`,{disabled:t.value,onClick:t=>s(e)},`移除`,8,Db)],64))]),e.error?(B(),V(`p`,Ob,j(e.error),1)):G(``,!0)])]))),128))])),U(F(id),{class:`settings`,to:{path:`/config`,query:{module:`download`}}},{default:I(()=>[...n[1]||=[H(`i`,{class:`iconfont icon-setting`,"aria-hidden":`true`},null,-1),W(` 下载设置 `,-1)]]),_:1})]))}}),[[`__scopeId`,`data-v-ca762390`]]);function Ab(e){return`搜索 ${e===``?`EhBrowser`:e} 的结果`}var jb={class:`panel`},Mb={class:`filters`},Nb={class:`row`},Pb={class:`grow`},Fb=[`value`],Ib=[`value`],Lb=[`value`],Rb={class:`size`},zb={key:0,class:`popover`},Bb=[`onClick`],Vb=[`disabled`],Hb={class:`cats`},Ub=[`title`,`onClick`],Wb={key:0},Gb=[`disabled`],Kb={class:`muted`},qb=[`disabled`],Jb=vf(R({__name:`SearchPanel`,setup(e){let t=kl(),n=Ol(),r=P(``),i=P(``),a=P(null),o=P([]),s=P([]),c=P(1),l=P(!1),u=P(!1),d=P(``),f=K(()=>[{title:Ab(d.value),items:s.value}]),p=K(()=>[1,2,3,4,5]),m=P(!1);function h(e){return{name:`gallery`,params:{gid:e.gid,token:e.token}}}function g(e){o.value.indexOf(e)===-1?o.value=[...o.value,e]:o.value=o.value.filter(t=>t!==e)}function _(e){let s={};r.value.trim()!==``&&(s.query=r.value.trim()),i.value!==``&&(s.language=i.value),a.value!==null&&(s.minRating=String(a.value)),o.value.length>0&&(s.categories=o.value.join(`,`)),e>1&&(s.page=String(e)),n.replace({path:t.path,query:s})}function v(){let e=t.query;r.value=typeof e.query==`string`?e.query:``,i.value=typeof e.language==`string`?e.language:``,a.value=typeof e.minRating==`string`?Number(e.minRating):null;let n=typeof e.categories==`string`?e.categories.split(`,`):[];return o.value=n.filter(e=>Td.includes(e)),typeof e.page==`string`?Math.max(1,Number(e.page)):1}function y(e){let t=r.value.trim();return{...t===``?{}:{query:t},...i.value===``?{}:{language:i.value},...a.value===null?{}:{minRating:a.value},...o.value.length===0?{}:{categories:[...o.value]},page:e,limit:24}}function b(e,t){let n=e=>JSON.stringify([e.query??``,e.language??``,e.minRating??0,[...e.categories??[]].sort(),e.page??1,e.limit??0]);return n(e)===n(t)}function x(e){let t=e.query;r.value=t.query??``,d.value=t.query??``,i.value=t.language??``,a.value=t.minRating??null,o.value=[...t.categories??[]],s.value=[...e.result.items],c.value=e.result.page,l.value=e.result.hasNext,_(e.result.page)}async function S(e=1){u.value=!0;let t=y(e);try{let e=await Z(`galleries.search`,{query:t});d.value=t.query??``,s.value=[...e.items],c.value=e.page,l.value=e.hasNext,_(e.page)}catch(e){$.error(Q(e))}finally{u.value=!1}}async function C(){let e=v(),n=Object.keys(t.query).length>0;u.value=!0;let r=null;try{r=await Z(`galleries.searchCache`,{})}catch{r=null}finally{u.value=!1}if(r!==null&&(!n||b(r.query,y(e)))){x(r);return}await S(e)}return Vr(()=>{C()}),(e,t)=>(B(),V(`div`,jb,[H(`section`,Mb,[H(`div`,Nb,[H(`div`,Pb,[t[8]||=H(`label`,{for:`q`},`关键词`,-1),L(H(`input`,{id:`q`,"onUpdate:modelValue":t[0]||=e=>r.value=e,placeholder:`留空表示不限定`,onKeyup:t[1]||=Ds(e=>S(1),[`enter`])},null,544),[[q,r.value]]),t[9]||=H(`p`,{class:`muted hint`},` 标签写成 namespace:tag;多词标签加引号,尾部 $ 表示精确匹配该标签。详情页选中标签后会自动填成这种写法 `,-1)]),H(`div`,null,[t[11]||=H(`label`,{for:`lang`},`语言`,-1),L(H(`select`,{id:`lang`,"onUpdate:modelValue":t[2]||=e=>i.value=e},[t[10]||=H(`option`,{value:``},`不限`,-1),(B(!0),V(z,null,ti(F(Ed),e=>(B(),V(`option`,{key:e,value:e},j(F(qp)(e,`language`)),9,Fb))),128))],512),[[ys,i.value]])]),H(`div`,null,[t[13]||=H(`label`,{for:`rate`},`最低评分`,-1),H(`select`,{id:`rate`,value:a.value??``,onChange:t[3]||=e=>a.value=e.target.value===``?null:Number(e.target.value)},[t[12]||=H(`option`,{value:``},`不限`,-1),(B(!0),V(z,null,ti(p.value,e=>(B(),V(`option`,{key:e,value:e},j(e)+` 星 `,9,Lb))),128))],40,Ib)]),H(`div`,Rb,[H(`button`,{title:`调整排列尺寸`,onClick:t[4]||=e=>m.value=!m.value},j(F(Sf)(F(bf))===`自动`?`排列:自动`:`排列:每行 ${F(bf)}`),1),m.value?(B(),V(`div`,zb,[(B(!0),V(z,null,ti(F(xf),e=>(B(),V(`button`,{key:e,class:A({on:F(bf)===e}),onClick:t=>{bf.value=e,m.value=!1}},j(e===0?`自动`:e),11,Bb))),128))])):G(``,!0)]),H(`button`,{class:`search`,disabled:u.value,onClick:t[5]||=e=>S(1)},[t[14]||=H(`i`,{class:`iconfont icon-search`,"aria-hidden":`true`},null,-1),W(` `+j(u.value?`搜索中…`:`搜索`),1)],8,Vb)]),H(`div`,Hb,[(B(!0),V(z,null,ti(F(Td),e=>(B(),V(`button`,{key:e,class:A({on:o.value.includes(e)}),title:F(Jp)(e),onClick:t=>g(e)},j(F(Jp)(e)),11,Ub))),128))])]),U(Dm,{class:`results`,groups:f.value,to:h,columns:F(bf),"empty-text":u.value?``:`没有符合条件的结果,换个关键词或放宽筛选试试`},null,8,[`groups`,`columns`,`empty-text`]),s.value.length>0?(B(),V(`footer`,Wb,[H(`button`,{disabled:u.value||c.value<=1,onClick:t[6]||=e=>S(c.value-1)},`上一页`,8,Gb),H(`span`,Kb,`第 `+j(c.value)+` 页`,1),H(`button`,{disabled:u.value||!l.value,onClick:t[7]||=e=>S(c.value+1)},`下一页`,8,qb)])):G(``,!0)]))}}),[[`__scopeId`,`data-v-1c386992`]]),Yb={class:`box`},Xb={key:0},Zb={key:1},Qb={class:`muted`},$b={class:`muted`},ex={class:`muted`},tx={class:`logs`},nx={class:`actions`},rx=[`disabled`],ix=[`disabled`],ax=vf(R({__name:`ServicePanel`,setup(e){let t=P(null),n=K(()=>Xg.value.length===0?`(暂无)`:Xg.value.map(e=>{let t=e.tag===``?``:`[${e.tag}] `;return`${e_(e.at)} [${e.level}] ${t}${e.message}`}).join(`
|
|
3
|
+
`)),r=P(null),i=P(!1),a=P(!1);async function o(){a.value=!0;try{await Z(`system.shutdown`),i.value=!1,$.info(`服务器已关闭。下次使用 EhBrowser 需要先启动服务器`)}catch(e){$.error(Q(e))}finally{a.value=!1}}async function s(){try{t.value=await Z(`system.health`),r.value=await Z(`config.paths`),await p_(),await Qg()}catch(e){$.error(Q(e))}}return Vr(()=>{s()}),(e,c)=>(B(),V(`section`,Yb,[c[16]||=H(`h2`,null,`服务`,-1),t.value?(B(),V(`dl`,Xb,[c[3]||=H(`dt`,null,`状态`,-1),H(`dd`,null,j(t.value.status),1),c[4]||=H(`dt`,null,`版本`,-1),H(`dd`,null,j(t.value.version),1),c[5]||=H(`dt`,null,`Node`,-1),H(`dd`,null,j(t.value.nodeVersion),1),c[6]||=H(`dt`,null,`平台`,-1),H(`dd`,null,j(t.value.platform),1),c[7]||=H(`dt`,null,`已运行`,-1),H(`dd`,null,j(t.value.uptimeSeconds)+` 秒`,1)])):G(``,!0),c[17]||=H(`h2`,null,`数据目录`,-1),r.value?(B(),V(`dl`,Zb,[c[8]||=H(`dt`,null,`config`,-1),H(`dd`,null,[W(j(r.value.configDir)+` `,1),H(`span`,Qb,`(`+j(r.value.sources.configDir)+`)`,1)]),c[9]||=H(`dt`,null,`data`,-1),H(`dd`,null,[W(j(r.value.dataDir)+` `,1),H(`span`,$b,`(`+j(r.value.sources.dataDir)+`)`,1)]),c[10]||=H(`dt`,null,`cache`,-1),H(`dd`,null,[W(j(r.value.cacheDir)+` `,1),H(`span`,ex,`(`+j(r.value.sources.cacheDir)+`)`,1)])])):G(``,!0),c[18]||=H(`h2`,null,`日志`,-1),H(`dl`,null,[c[12]||=H(`dt`,null,`目录`,-1),H(`dd`,null,j(F(qg)===``?`读取中…`:F(qg)),1),c[13]||=H(`dt`,null,`文件`,-1),H(`dd`,null,j(F(Yg)===``?`读取中…`:F(Yg)),1),c[14]||=H(`dt`,null,`写入`,-1),H(`dd`,null,[W(j(F(Kg)?`已开启(按天一个文件)`:`已关闭,只在控制台与这里显示`)+` `,1),c[11]||=H(`span`,{class:`muted`},`· 可在设置 > 日志里改目录`,-1)])]),H(`pre`,tx,j(n.value),1),c[19]||=H(`h2`,null,`事件流`,-1),H(`pre`,null,j(F(d_).length===0?`(暂无)`:F(d_).join(`
|
|
4
|
+
`)),1),H(`div`,nx,[H(`button`,{onClick:s},`重新读取`),H(`button`,{class:`danger`,onClick:c[0]||=e=>i.value=!0},`关闭服务器`)]),U(fp,{modelValue:i.value,"onUpdate:modelValue":c[2]||=e=>i.value=e,title:`关闭服务器`},{buttons:I(()=>[H(`button`,{disabled:a.value,onClick:c[1]||=e=>i.value=!1},`取消`,8,rx),H(`button`,{disabled:a.value,onClick:o},j(a.value?`关闭中…`:`确定`),9,ix)]),default:I(()=>[c[15]||=H(`p`,null,`要关闭服务器吗?下次使用 EhBrowser 时需要先启动服务器。`,-1)]),_:1},8,[`modelValue`])]))}}),[[`__scopeId`,`data-v-008b7c43`]]),ox=`EhBrowser`,sx=[{path:`/`,label:`EhBrowser`,title:`EhBrowser`,component:Jb},{path:`/config`,label:`配置`,title:`配置`,component:ub},{path:`/account`,label:`账号`,title:`账号`,component:yf},{path:`/library`,label:`本地画廊`,title:`本地画廊`,component:Ch},{path:`/favorites`,label:`收藏`,title:`收藏`,component:zv},{path:`/playlist`,label:`播放列表`,title:`播放列表`,component:ty},{path:`/downloads`,label:`下载`,title:`下载`,component:kb},{path:`/service`,label:`服务`,title:`服务`,component:ax}],cx=[...sx.map(e=>({path:e.path,component:e.component,meta:{title:e.title}})),{path:`/g/:gid/:token`,name:`gallery`,component:Eg,props:e=>({gid:Number(e.params.gid),token:String(e.params.token)}),meta:{title:`画廊`}},{path:`/g/:gid/:token/play`,name:`gallery-player`,component:X_,props:e=>({gid:Number(e.params.gid),token:String(e.params.token)}),meta:{title:`播放`}},{path:`/g/:gid/:token/read`,redirect:e=>({name:`gallery-player`,params:e.params,query:e.query})},{path:`/g/:gid/:token/previews`,name:`gallery-previews`,component:Lg,props:e=>({gid:Number(e.params.gid),token:String(e.params.token)}),meta:{title:`全部预览`}},{path:`/:pathMatch(.*)*`,redirect:`/`}],lx=fd({history:Pu(),routes:cx,scrollBehavior:()=>({top:0})});lx.beforeEach(()=>{hd()}),lx.afterEach(e=>{_d();let t=e.meta.title;document.title=typeof t==`string`&&t!==ox?`${t} - ${ox}`:ox}),lx.onError(()=>{gd()});var ux=`ehbrowser.welcome.seen`,dx=P(!1);function fx(){mx()||(dx.value=!0)}function px(){dx.value=!1;try{localStorage.setItem(ux,`1`)}catch{}}function mx(){try{return localStorage.getItem(ux)!==null}catch{return!1}}var hx=`https://github.com/EtherosGroup/EhBrowser`,gx=`597399171`,_x=vf(R({__name:`WelcomeDialog`,setup(e){return(e,t)=>(B(),Ea(fp,{"model-value":F(dx),title:`这是免费软件`,width:`620px`,"onUpdate:modelValue":F(px)},{buttons:I(()=>[H(`button`,{onClick:t[0]||=(...e)=>F(px)&&F(px)(...e)},`知道了`)]),default:I(()=>[t[4]||=H(`p`,null,`这是一个免费软件,如果是购买的那么你被骗啦哈哈哈!`,-1),H(`p`,null,[t[1]||=W(` 如果商家给你的安装包里没有 LICENSE 文件,请到 `,-1),H(`a`,{href:hx,target:`_blank`,rel:`noreferrer`},j(hx)),W(` 提交 Issues,或者到 QQ 群 `+j(gx)+` 提交帮助请求,别嫌麻烦,你就不想当一把爽文男主狠狠制裁导狗吗? `)]),H(`p`,null,[t[2]||=W(` 如果确实有 LICENSE 文件,那么你应该意识到这个软件可以免费下载( `,-1),H(`a`,{href:hx,target:`_blank`,rel:`noreferrer`},j(hx)),t[3]||=W(` 这里还有详细的安装说明),赶紧退货吧! `,-1)]),t[5]||=H(`p`,null,`最后祝愿各位机长愉快起飞~`,-1)]),_:1},8,[`model-value`,`onUpdate:modelValue`]))}}),[[`__scopeId`,`data-v-1b1675e1`]]),vx={class:`brand`},yx={class:`muted`},bx={class:`status muted`},xx={key:0,class:`badge`};js(vf(R({__name:`App`,setup(e){let t=kl(),n=null;function r(e){s_(e)&&(e.preventDefault(),o_())}return Vr(async()=>{window.addEventListener(`keydown`,r),fx(),await p_(),n=m_(),Id(),a_()}),Jn(()=>t.path,e=>{e===`/`&&a_()}),Gr(()=>{window.removeEventListener(`keydown`,r),n?.()}),(e,t)=>(B(),V(z,null,[H(`header`,null,[H(`div`,vx,[t[0]||=H(`strong`,null,`EhBrowser`,-1),H(`span`,yx,`v`+j(F(c_)||`…`),1)]),H(`nav`,null,[(B(!0),V(z,null,ti(F(sx),e=>(B(),Ea(F(id),{key:e.path,to:e.path,"active-class":`active`,"exact-active-class":`active`},{default:I(()=>[W(j(e.label),1)]),_:2},1032,[`to`]))),128))]),H(`div`,bx,`代理:`+j(F(u_)),1),U(F(id),{class:`downloads`,to:`/downloads`,title:`下载任务`,"aria-label":`下载任务`},{default:I(()=>[t[1]||=H(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`},[H(`path`,{d:`M10 3v9`}),H(`path`,{d:`M6 8.5 10 12.5l4-4`}),H(`path`,{d:`M4 16h12`})],-1),F(Fd)>0?(B(),V(`span`,xx,j(F(Fd)),1)):G(``,!0)]),_:1})]),H(`main`,null,[U(F(dd),null,{default:I(({Component:e,route:t})=>[U(So,{name:`page`,mode:`out-in`},{default:I(()=>[(B(),Ea(Qr(e),{key:t.path}))]),_:2},1024)]),_:1})]),U(_x)],64))}}),[[`__scopeId`,`data-v-5b5b1bdd`]])).use(lx).use(dl,{position:Y.POSITION.BOTTOM_RIGHT,theme:Y.THEME.DARK,multiple:!0,limit:4}).mount(`#app`);
|